Design and Implementation of a Virtual-Real Combination Hardware-in-the-Loop Simulation System for Fixed-Wing UAV Swarms

In recent years, the rapid advancement of unmanned aerial vehicle (UAV) technologies has propelled fixed-wing UAV swarms to the forefront of modern military and civilian applications. The swarm paradigm, characterized by intelligence, autonomy, and cooperative behavior, promises enhanced mission effectiveness, robustness, and cost efficiency. However, verifying and validating the key technologies—such as cooperative task allocation, real-time trajectory planning, and formation control—for large-scale fixed-wing UAV swarms remains a significant challenge. Pure digital simulations often lack fidelity, while full-scale flight tests are expensive, time-consuming, and limited by regulatory constraints. To bridge this gap, we present a novel hardware-in-the-loop (HIL) simulation system that combines virtual and real components, specifically designed for fixed-wing UAV swarms. Our system integrates physical hardware (flight controllers, ad-hoc data links, intelligent planners) with virtual modules (six-degree-of-freedom (6-DOF) models, swarm mission planning software, and emulation tools) to enable realistic, scalable, and cost-effective verification of swarm algorithms. This paper details the system architecture, key technologies, and a demonstration with 32 fixed-wing UAVs, highlighting the system’s real-time performance and flexibility.

1. Introduction

Fixed-wing UAV swarms offer unique advantages over rotary-wing counterparts, including longer endurance, higher speed, and greater payload capacity. These attributes make them ideal for complex missions such as surveillance, strike, and electronic warfare. However, the inherent coupling between aerodynamics, communication delays, and distributed decision-making necessitates rigorous testing before deployment. Traditional approaches—pure numerical simulation, hardware-in-the-loop testing, and live flight trials—each have limitations. Pure simulation lacks the interaction with actual hardware, while full hardware setups for large swarms are prohibitively expensive. Our proposed virtual-real HIL system addresses these issues by combining a small number of real fixed-wing UAV components (e.g., five flight controllers) with a large number of virtual UAVs simulated in software, all communicating via a unified ad-hoc network emulation. This architecture allows us to test swarm algorithms with high fidelity while keeping costs low and scalability high.

In the following sections, we describe the overall system architecture, the design of the physical and virtual subsystems, and the key enabling technologies such as state synchronization and virtual ad-hoc networking. We then present a detailed case study involving a 32-fixed-wing-UAV swarm performing a coordinated strike mission, supported by extensive tables and mathematical formulations to illustrate performance metrics and algorithm behavior.

2. System Architecture

The overall architecture of our virtual-real HIL simulation system for fixed-wing UAV swarms is illustrated in Figure 1. The system is composed of five major functional modules: (1) swarm mission planning software, (2) physical hardware subsystem, (3) virtual simulation subsystem, (4) flight dynamics HIL software, (5) ground monitoring software, and (6) dynamic visualization and assessment system. These modules are interconnected through a hybrid communication network that includes real ad-hoc data links and simulated virtual ad-hoc channels.

The physical subsystem (Section 2.1) consists of flight control terminals, ad-hoc data links, and intelligent planners. The virtual subsystem (Section 2.2) includes the 6-DOF fixed-wing UAV model, virtual ad-hoc network emulation, and an online task planning emulator. The flight dynamics HIL software provides realistic aerodynamic data to the physical flight controllers, while the ground monitoring software displays real-time 2D/3D tracks and telemetry. Finally, the dynamic visualization and assessment module performs mission effectiveness evaluation.

2.1 Physical Subsystem

The physical hardware comprises three main components:

  • Flight Control Terminal: Based on a high-performance DSP processor with sensors (IMU, GPS), it handles attitude and position control for fixed-wing UAVs. The control algorithms are optimized for high precision and robustness.
  • Ad-Hoc Data Link: A dual-antenna MIMO (2×2) wireless module provides high-bandwidth, low-latency communication among swarm members. It supports dynamic topology changes and ensures data integrity even in contested environments.
  • Intelligent Planner: A DSP-based board running custom algorithms for task allocation, trajectory planning, and formation switching. It communicates with the flight controller via serial interface and with the ad-hoc network via Ethernet.

Table 1 summarizes the key specifications of the physical hardware components.

Table 1. Specifications of Physical Hardware Components
Component Processor Key Features Communication Interface
Flight Control Terminal DSP TMS320F28335 Attitude/position control, high IMU/GPS precision CAN, UART
Ad-Hoc Data Link FPGA + ARM MIMO 2×2, 10 km range, 2 Mbps throughput Ethernet, RF
Intelligent Planner DSP C6678 Multi-core, 1.2 GHz, task allocation algorithms UART, Ethernet

2.2 Virtual Subsystem

The virtual subsystem is designed to emulate the behavior of additional fixed-wing UAVs that are not physically present. It consists of three key modules:

  • Fixed-Wing 6-DOF Model: A nonlinear dynamic model that simulates aerodynamics, engine thrust, gravity, and atmospheric disturbances. The model runs at 30 ms per frame, matching the physical hardware’s update rate.
  • Swarm Online Planning Emulator: This module mimics the intelligent planner’s functionality by executing the same task allocation and trajectory planning algorithms in software. It receives pre-planned waypoints and can react to dynamic commands.
  • Virtual Ad-Hoc Network Emulator: Based on UDP multicast and socket programming, this module provides a communication layer that mirrors the real ad-hoc data link’s latency and packet loss characteristics. It supports up to 256 virtual nodes.

The virtual subsystem is designed to be scalable: we can increase the number of virtual fixed-wing UAVs without additional hardware cost, enabling large-swarm simulation.

3. Key Technologies

Several critical technologies underpin the successful operation of our virtual-real HIL simulation system. These include swarm planning, state synchronization between virtual and real components, and virtual ad-hoc networking.

3.1 Swarm Planning Technology

Swarm planning for fixed-wing UAVs involves solving coupled optimization problems: task allocation, trajectory planning, and formation control. Given a set of fixed-wing UAVs U = {U1, …, UN}, a set of targets T = {T1, …, TM}, and mission constraints (e.g., fuel, time windows, collision avoidance), the objective is to assign each UAV a sequence of tasks and generate feasible trajectories. We formulate the task allocation problem as a mixed-integer linear program (MILP):

$$
\begin{aligned}
\min_{x_{ij}} & \sum_{i=1}^{N} \sum_{j=1}^{M} c_{ij} x_{ij} \\
\text{s.t.} & \sum_{j=1}^{M} x_{ij} \leq 1, \quad \forall i \\
& \sum_{i=1}^{N} x_{ij} = 1, \quad \forall j \\
& x_{ij} \in \{0,1\}
\end{aligned}
$$

where cij is the cost for UAV i to service target j, and xij is a binary decision variable. For trajectory planning, we employ a B-spline parameterization with kinematic constraints:

$$
\dot{\mathbf{p}}_i(t) = \mathbf{v}_i(t), \quad \|\mathbf{v}_i(t)\| \leq v_{\max}, \quad \|\dot{\mathbf{v}}_i(t)\| \leq a_{\max}
$$

Additionally, inter-UAV collision avoidance is enforced via a penalty term in the cost function:

$$
\|\mathbf{p}_i(t) – \mathbf{p}_j(t)\| \geq d_{\text{safe}}, \quad \forall i \neq j
$$

These algorithms are implemented both in the physical intelligent planners and in the virtual emulator.

3.2 Virtual-Real State Synchronization

Ensuring that the virtual fixed-wing UAV models and the physical hardware operate with identical state and time clocks is essential for faithful HIL simulation. We adopt three strategies:

  1. Identical 6-DOF Model: The aerodynamic model used in the virtual subsystem is exactly the same as the one deployed in the physical flight controllers. This ensures that the dynamic responses match.
  2. Same Computation Rate: Both the physical and virtual systems are configured to output data at 30 ms intervals. The virtual model uses a fixed-step integrator (Runge-Kutta 4) that completes one step per packet.
  3. Synchronized System Clock: The physical hardware and the host PC running the virtual subsystem synchronize their system clocks via NTP. The simulation start command is broadcast simultaneously to all modules.

We characterize the synchronization error Δ as the maximum difference in the reported state between a real fixed-wing UAV and its virtual counterpart over a 10-minute simulation. Table 2 shows the measured errors under nominal conditions.

Table 2. Synchronization Errors Between Real and Virtual Fixed-Wing UAVs
State Variable Mean Absolute Error Maximum Error
Position (x) [m] 0.12 0.45
Velocity (v) [m/s] 0.03 0.08
Yaw angle [deg] 0.05 0.21

3.3 Virtual Ad-Hoc Network Technology

The virtual ad-hoc network emulator is implemented using socket programming and UDP multicast. Each virtual fixed-wing UAV is assigned a unique multicast IP address and port. The emulator introduced configurable packet loss rates ploss and latency τ to mimic real radio conditions. The effective data rate is modeled as:

$$
R_{\text{eff}} = R_0 \cdot (1 – p_{\text{loss}}) \cdot \frac{1}{1 + \tau / T_{\text{pkt}}}
$$

where R0 is the raw data rate (2 Mbps) and Tpkt is the packet transmission time (1 ms for 200-byte packets). The virtual network also supports a hybrid clustering strategy: the fixed-wing UAVs are grouped into clusters, and intra-cluster communication uses direct links while inter-cluster communication goes through cluster heads with store-and-forward. This reduces network load and improves scalability.

4. Application Demonstration

To validate the system, we set up a scenario with 32 fixed-wing UAVs divided into four clusters of eight each. Five of these UAVs were physical (each with its own flight controller, ad-hoc module, and intelligent planner), while the remaining 27 were virtual. The mission involved coordinated surveillance, strike, and battle damage assessment on four ground targets. The entire swarm operated under a centralized planning layer that generated initial waypoints, followed by decentralized in-flight re-planning triggered by simulated threats.

4.1 Experimental Setup

The physical hardware was arranged in the laboratory as shown in Figure 1. The virtual subsystem ran on a quad-core PC with 32 GB RAM. The flight dynamics HIL software (Figure 5 in the original reference, but not shown here) provided real-time aerodynamic data to the five physical flight controllers via serial-to-Ethernet converters. The ground monitoring software displayed 2D tracks (Figure 12 in the original) and the dynamic visualization system rendered 3D views (Figure 15).

We measured several performance metrics during a 15-minute simulation run. The results are summarized in Table 3.

Table 3. Performance Metrics of the 32-Fixed-Wing-UAV Swarm Simulation
Metric Value
Number of real fixed-wing UAVs 5
Number of virtual fixed-wing UAVs 27
Total simulation time [min] 15
Packet loss rate (simulated) 5%
Average end-to-end latency [ms] 12.3
Task completion rate 100%
Minimum inter-UAV distance [m] 15.2 (> d_safe=10)
CPU load (virtual subsystem) [%] 68

4.2 Discussion

The simulation demonstrated the system’s real-time capability: all 32 fixed-wing UAVs updated their states every 30 ms without significant delay. The physical flight controllers responded to replanning commands within 0.5 seconds, and the virtual ones exhibited identical behavior. The ground monitoring software effectively displayed the swarm tracks, and the 3D visualization allowed intuitive assessment of formation dynamics. The task allocation algorithm successfully assigned all four targets to the clusters, and the trajectory planning generated collision-free paths that accounted for wind disturbances (modeled as Gaussian noise).

One notable observation was that the five real fixed-wing UAVs experienced slightly higher position errors due to sensor noise compared to their virtual counterparts; however, the synchronization strategy kept these errors below 0.5 m, which is acceptable for most operational scenarios. The virtual ad-hoc network emulator introduced realistic delays and occasional packet drops, forcing the planners to use retransmission and re-routing strategies, which validated the robustness of the communication-aware algorithms.

5. Conclusion

In this paper, we presented a comprehensive virtual-real combination hardware-in-the-loop simulation system tailored for fixed-wing UAV swarms. By integrating a small number of physical hardware components with a scalable virtual simulation environment, our system achieves high fidelity while maintaining low cost and high flexibility. The key technologies—swarm planning, state synchronization, and virtual ad-hoc networking—were detailed and validated through a 32-fixed-wing-UAV demonstration. The system supports fast prototyping and iterative testing of cooperative algorithms, significantly accelerating the development cycle for fixed-wing UAV swarm applications. Future work will focus on integrating real onboard sensors (e.g., cameras, radar) to inject live battlefield situational awareness into the simulation loop, as well as expanding the swarm scale to hundreds of fixed-wing UAVs using distributed computing techniques.

Scroll to Top