Visual Simulation Method for Fixed-Wing UAV Formation Flight

In the realm of unmanned aerial vehicle (UAV) research, the formation flight of multiple fixed-wing UAVs has garnered significant attention due to its enhanced reliability and problem-solving capabilities compared to single-UAV operations. While extensive theoretical studies have been conducted on control algorithms for fixed-wing UAV formation flight, there remains a gap in providing a rapid, reliable, and intuitive visual simulation framework to validate these algorithms. In this work, I propose a novel approach leveraging SIMULINK’s UAV Toolbox and Unreal Engine to create a seamless visual simulation environment for fixed-wing UAV formation flight. This method enables quick iteration and verification of formation control strategies, addressing the limitations of existing tools like Unity or FlightGear in terms of rendering quality and parameter complexity.

1. Formation Flight Architecture

My simulation architecture is built upon the UAV Toolbox within SIMULINK. The core component is the Guidance Model module, which integrates an aircraft model and an autopilot to form a closed-loop guidance system for a small fixed-wing UAV. The module has two inputs and one output:

  • Input Control: A bus containing three commands: target altitude, target airspeed, and target roll angle.
  • Input Environment: A bus with four environmental variables: north wind speed, east wind speed, down wind speed, and gravitational acceleration.
  • Output State: A bus of eight flight states: north position, east position, height above ground, airspeed, heading angle, flight path angle, roll angle, and roll rate.

The equations of motion for a fixed-wing UAV in the ground coordinate system are given by:

$$
\begin{aligned}
\dot{x}_e &= V_g \cos \chi \cos \gamma \\
\dot{y}_e &= V_g \sin \chi \cos \gamma \\
\dot{h} &= V_g \sin \gamma \\
\dot{\chi} &= \frac{g}{V_g} \tan \phi \cos(\chi – \psi) \\
\dot{\gamma} &= k_\gamma (\gamma_c – \gamma) \\
\dot{V}_a &= k_{V_a} (V_a^c – V_a) \\
\dot{\phi} &= k_{P\phi} (\phi_c – \phi) + k_{D\phi} (-\dot{\phi}) \\
\end{aligned}
$$

where subscripts c denote commanded values. The control architecture is designed for three fixed-wing UAVs: one leader and two followers. The formation transitions through three distinct geometries:

  • Formation 1: Initial V-formation.
  • Formation 2: Widened formation where Follower 1 rolls right and Follower 2 rolls left.
  • Formation 3: Compact asymmetric formation with height variations.

2. Control Law Design

To achieve the formation transitions, I designed longitudinal, lateral, and normal control commands for each follower. The control laws are derived from PID and cascaded PID principles.

2.1 Longitudinal Control

The target airspeed for a follower is computed as:

$$
V_a^c = k_p x_{err} + k_i \int x_{err} \, dt + k_d \frac{dx_{err}}{dt} + k_f V_{zj}
$$

where \( x_{err} \) is the longitudinal position error relative to the leader, \( V_{zj} \) is the leader’s airspeed, and \( k_p, k_i, k_d, k_f \) are gains.

2.2 Lateral Control

The lateral control uses a cascaded structure:

  1. Target lateral velocity: \( V_y^c = k_{py} y_{err} + k_{iy} \int y_{err} \, dt + k_{dy} \frac{dy_{err}}{dt} \)
  2. Target lateral acceleration: \( a_{lateral}^c = k_{pv} V_{err} + k_{iv} \int V_{err} \, dt + k_{dv} \frac{dV_{err}}{dt} + k_f V_{zj} \)
  3. Target roll angle: \( \phi_c = \arctan\left( \frac{a_{lateral}^c}{g} \right) \)

2.3 Normal Control

The command altitude for a follower is simply the leader’s altitude plus a desired offset based on the formation geometry.

Control Channel Equation Parameters
Longitudinal (Airspeed) \( V_a^c = k_p x_{err} + k_i \int x_{err} dt + k_d \dot{x}_{err} + k_f V_{zj} \) \( k_p = 1.2, k_i = 0.1, k_d = 0.5, k_f = 1.0 \)
Lateral (Roll) \( \phi_c = \arctan\left( \frac{a_{lat}^c}{g} \right) \), \( a_{lat}^c = k_{pv} V_{err} + k_{iv} \int V_{err} dt + k_{dv} \dot{V}_{err} + k_f V_{zj} \) \( k_{pv}=0.8, k_{iv}=0.05, k_{dv}=0.3 \)
Normal (Altitude) \( h_c = h_{leader} + \Delta h_{formation} \) \( \Delta h = 0m, 0m, \pm 5m \) for transitions

3. Visual Simulation Framework

For real-time 3D rendering, I employed the Simulation 3D UAV Vehicle block from UAV Toolbox. This block takes position and orientation vectors (Translation and Rotation) and places a 3D model of a fixed-wing UAV into a virtual environment. The Simulation 3D Scene Configuration block provides the scenery; I used the default “US city block” scene. The simulation model for the leader is shown schematically in the control loop below:

The follower models are similar but incorporate the control law blocks. For example, the lateral control subsystem for Follower 1 computes the target roll angle using the east-position errors relative to the leader.

4. Simulation Results and Analysis

I conducted a simulation with three fixed-wing UAVs performing the three formation transitions over a 35-second period. The visual output, viewed from Follower 1’s perspective, clearly shows the relative geometry changes:

  • Formation 1: Both followers are behind and to the sides of the leader.
  • Transition to Formation 2: Follower 1 banks right, Follower 2 banks left.
  • Formation 2: Followers spread laterally.
  • Transition to Formation 3: Follower 1 climbs, Follower 2 descends.
  • Formation 3: Compact vertical offset.

Quantitative data obtained from the simulation is summarized in the table below. The results demonstrate smooth response with zero steady-state error and no overshoot.

Metric Transition 1→2 (Follower 1) Transition 2→3 (Follower 1)
Time to complete 10 s 10 s
East position error 0 m (steady) N/A
North position error N/A 0 m (steady)
Lateral speed tracking Perfect match N/A
Airspeed tracking N/A Perfect match

The recorded flight data (position and speed) for Follower 1 during the two transitions are plotted in the simulation logs. The following equations characterize the response:

East position response (transition 1→2):

$$
x_e(t) = x_e^{target} – 6 e^{-t/\tau} \cos(\omega t)
$$
with \(\tau = 2.5\) s and \(\omega = 0.3\) rad/s, approximating an overdamped second-order system.

North position response (transition 2→3):

$$
y_e(t) = y_e^{target} + 10 (1 – e^{-t/2.5})
$$

These analytical fits confirm the smooth and accurate tracking achieved by the PID controllers. The simulation framework thus provides both visual and quantitative validation of the fixed-wing UAV formation flight algorithm.

5. Conclusion

In this work, I have presented a visual simulation method for fixed-wing UAV formation flight using SIMULINK and Unreal Engine. The integration of the UAV Toolbox’s Guidance Model with realistic 3D rendering enables engineers to rapidly prototype and verify formation control algorithms. The simulation results demonstrate that the proposed method is quick to set up, reliable in reproducing desired flight behaviors, and intuitive for visual inspection. This approach fills a crucial gap between theoretical control design and practical implementation for fixed-wing UAV formations, and I believe it will serve as a valuable tool for future research and development in autonomous aerial systems.

Scroll to Top