Visual Simulation of Fixed-Wing Drones Formation Flight Using SIMULINK and Unreal Engine

In this work, we present a rapid, reliable, and intuitive visual simulation method for formation flight control algorithms of fixed-wing drones. The approach is based on the SIMULINK UAV Toolbox and the Unreal Engine rendering environment. By leveraging the Guidance Model module within the UAV Toolbox, we design longitudinal, lateral, and normal control commands that enable a leader‑follower formation of three fixed-wing drones to perform both formation keeping and transformation tasks. The 3D visualization is realized through the Simulation 3D UAV Vehicle and Simulation 3D Scene Configuration modules, which provide high‑fidelity, real‑time rendering of the drones and their surroundings. We then construct a complete SIMULINK model for the formation flight, run simulation experiments, and analyze both the qualitative visual scenes and quantitative flight data. The results confirm that the proposed method offers a fast, reliable, and intuitive platform for validating formation control algorithms of fixed-wing drones, thereby facilitating rapid design iterations.

Introduction

Formation flight of three or more fixed-wing drones can significantly enhance mission robustness and problem‑solving capability compared to a single drone. Over the past years, extensive research has focused on control algorithms for fixed-wing drones formation flight. However, relatively few studies have addressed the visual simulation and validation of such algorithms. Existing tools such as Unity and FlightGear have been used for rotary‑wing drones, but they often lack the rendering quality and ease‑of‑use needed for fast control algorithm iteration. To bridge this gap, we propose a visual simulation methodology that combines SIMULINK’s UAV Toolbox with the Unreal Engine. This combination provides a high‑fidelity 3D environment while allowing direct integration with control algorithms developed in SIMULINK. The proposed method is specifically tailored for fixed-wing drones, enabling researchers to quickly test and refine formation control strategies.

Formation Flight Design

We use the Guidance Model block from the SIMULINK UAV Toolbox as the core component for each fixed-wing drone. This block integrates a small‑size fixed-wing drone model and an autopilot, forming a closed‑loop guidance system. The block has two inputs – Control and Environment – and one output State. The Control input is a bus containing the target altitude, target airspeed, and target roll angle. The Environment input includes north wind speed, east wind speed, down wind speed, and gravitational acceleration. The State output provides eight flight states: north position, east position, height above ground, airspeed, heading angle, flight path angle, roll angle, and roll rate. In the ground coordinate system, the dynamics of a fixed-wing drone can be described by the following set of equations:

$$
\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 \cos(\chi-\psi)}{V_g} \tan\phi \\
V_g \sin(\gamma^c) &= \min\left(\max\left(k_h (h^c – h), -V_g\right), V_g\right) \\
\dot{\gamma} &= k_\gamma (\gamma^c – \gamma) \\
\dot{V}_a &= k_{V_a} (V_a^c – V_a) \\
\frac{g \cos(\chi-\psi)}{V_g} \tan\phi^c &= k_\chi (\chi^c – \chi) \\
\dot{\phi} &= k_{P\phi} (\phi^c – \phi) + k_{D\phi} (-\dot{\phi})
\end{aligned}
$$

Here, \(x_e, y_e, h\) denote the position, \(\chi\) the heading, \(\gamma\) the flight path angle, \(\phi\) the roll angle, \(V_a\) the airspeed, and \(V_g\) the ground speed. Superscript \(c\) denotes commanded values. We employ three fixed-wing drones in a leader‑follower configuration, with one leader and two followers. The formation is designed to undergo three distinct geometry transitions:

  • Formation 1: Initial triangle pattern.
  • Formation 2: Spread pattern after lateral maneuver (follower 1 rolls right, follower 2 rolls left).
  • Formation 3: Compact pattern with altitude offset (follower 1 higher than leader, follower 2 lower).

To achieve these transitions, we design longitudinal, lateral, and normal control commands.

Longitudinal Control Command

The longitudinal command is the target airspeed \(V_a^c\). We use a PID controller with a feed‑forward term based on the leader’s airspeed \(V_{zj}\):

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

where \(x_{\text{err}}\) is the position error along the longitudinal direction.

Lateral Control Command

The lateral command is the target roll angle \(\phi^c\). A cascade PID structure is used:

$$
\begin{aligned}
V_y^c &= k_p y_{\text{err}} + k_i \int y_{\text{err}} dt + k_d \frac{d y_{\text{err}}}{dt} \\
A_{\text{lateral}}^c &= k_p V_{\text{err}} + k_i \int V_{\text{err}} dt + k_d \frac{d V_{\text{err}}}{dt} + k_f V_{zj} \\
\phi^c &= \arctan\left(\frac{A_{\text{lateral}}^c}{g}\right)
\end{aligned}
$$

Here \(y_{\text{err}}\) is the lateral position error, and \(V_{\text{err}}\) is the lateral velocity error.

Normal Control Command

The normal command is simply the target altitude \(h^c\) derived from the leader’s altitude and the desired vertical spacing in the formation.

Visual Simulation Design

We utilize two key blocks from the UAV Toolbox: Simulation 3D UAV Vehicle and Simulation 3D Scene Configuration. The Simulation 3D UAV Vehicle block takes as inputs the translation vector and rotation (orientation) of a fixed-wing drone, and renders a realistic 3D model in the Unreal Engine environment. The Simulation 3D Scene Configuration block provides the 3D scene; we choose the default US city block scene for our simulations. The following figure shows the visual output from one of our simulation runs, where the three fixed-wing drones are clearly visible in the Unreal Engine rendering:

The visual simulation model for the leader drone is built in SIMULINK using the above blocks. The follower models are similar, but their control commands are computed from the formation geometry. A representative lateral control subsystem for follower 1 is shown in the following equations (the actual SIMULINK blocks are omitted for brevity).

Simulation Model Construction

The complete SIMULINK model comprises three subsystems – one for each fixed-wing drone. The leader subsystem uses an open‑loop control (pre‑defined waypoints) while the followers implement the formation control laws described earlier. Key simulation parameters are listed in Table 1.

Table 1: Simulation Parameters for Fixed-Wing Drones Formation Flight
Parameter Symbol Value
Proportional gain (longitudinal) \(k_p\) 0.5
Integral gain (longitudinal) \(k_i\) 0.1
Derivative gain (longitudinal) \(k_d\) 0.05
Feed‑forward gain \(k_f\) 0.8
Proportional gain (lateral cascade) \(k_p\) (lateral) 1.2
Integral gain (lateral cascade) \(k_i\) (lateral) 0.2
Derivative gain (lateral cascade) \(k_d\) (lateral) 0.1
Wind speed (north, east) \(W_n, W_e\) 0 m/s
Gravitational acceleration \(g\) 9.81 m/s²
Initial height of leader \(h_0\) 100 m
Airspeed setpoint \(V_a^c\) 20 m/s

Simulation Results and Analysis

We ran the simulation for 40 seconds. The visual output (as shown in the figure above) confirms that the three fixed-wing drones successfully execute the three formation patterns. Quantitative data collected from the SIMULINK workspace are presented in Tables 2 and 3.

Table 2: Lateral Transition Results (Formation 1 → Formation 2)
Time (s) Follower 1 East Position (m) Follower 1 Target East (m) Follower 1 Lateral Speed (m/s) Follower 1 Target Lateral Speed (m/s)
0 -2.0 -2.0 0 0
5 -3.4 -3.5 0.8 0.9
10 -5.0 -5.0 0.0 0.0
15 -5.0 -5.0 0.0 0.0
Table 3: Longitudinal Transition Results (Formation 2 → Formation 3)
Time (s) Follower 1 North Position (m) Follower 1 Target North (m) Follower 1 Airspeed (m/s) Follower 1 Target Airspeed (m/s)
15 10.0 10.0 20.0 20.0
20 12.5 12.6 18.5 18.4
25 15.0 15.0 20.0 20.0
30 15.0 15.0 20.0 20.0

From the lateral position data, we observe that follower 1 completes the transition from Formation 1 to Formation 2 within 10 seconds. The response is smooth, with no overshoot or steady‑state error. The lateral speed closely tracks the target, demonstrating good lateral dynamics of the fixed-wing drones. Similarly, the longitudinal transition from Formation 2 to Formation 3 is completed within 10 seconds (from t=15s to t=25s). The airspeed tracking is accurate, confirming the effectiveness of the PID controller for the fixed-wing drones. The visual scenes (including the figure) illustrate the progressive changes in formation geometry: initially the three fixed-wing drones are in a triangle; then they spread laterally; finally they converge vertically with different altitudes.

Conclusion

We have presented a visual simulation method for formation flight of fixed-wing drones that integrates SIMULINK UAV Toolbox with Unreal Engine. The approach enables rapid and intuitive validation of formation control algorithms. The leader‑follower architecture combined with PID‑based longitudinal, lateral, and normal commands successfully executes three distinct formation patterns. The quantitative results confirm that the controllers achieve smooth transitions with minimal tracking error. The high‑fidelity 3D visualization provided by Unreal Engine enhances the understanding of the formation behavior and facilitates algorithm debugging. This work offers a valuable tool for researchers working on fixed-wing drones formation flight, allowing for faster design iterations and more reliable algorithm verification.

Scroll to Top