Next Article in Journal
A Rapid Trajectory Planning Method for Heterogeneous Swarms via Fusion of Visual Navigation and Explainable Decision Trees
Previous Article in Journal
Spherical Coordinate System-Based Fusion Path Planning Algorithm for UAVs in Complex Emergency Rescue and Civil Environments
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Leader–Follower UAV Formation Control with Cost-Effective Coordination and Pre-Flight Simulation

1
Graduate Institute of Communication Engineering, National Taiwan University, Taipei 10617, Taiwan
2
Department of Electrical Engineering, National Taiwan University, Taipei 10617, Taiwan
*
Author to whom correspondence should be addressed.
Drones 2026, 10(4), 286; https://doi.org/10.3390/drones10040286
Submission received: 1 February 2026 / Revised: 6 April 2026 / Accepted: 8 April 2026 / Published: 14 April 2026
(This article belongs to the Section Drone Communications)

Highlights

What are the main findings?
  • The study designed and experimentally demonstrated a GPS-based leader–follower architecture for a small-scale (three-UAV) heterogeneous swarm, integrating different autopilots, Raspberry Pi onboard processors, and Wi-Fi ad hoc networking. Using real-time inter-UAV communication (UDP over Wi-Fi) and an embedded outer-loop PI controller, the system achieved stable wedge formation tracking with sub-meter-level horizontal and vertical formation errors under the tested conditions. The results provide initial experimental validation of the feasibility of heterogeneous UAV coordination, complementing prior simulation-based studies.
  • A Python-based formation simulator, driven by recorded flight and environmental data with 3D visualization, was developed to support preliminary behavior prediction and control tuning. The simulator achieved approximately 93% agreement with observed formation error trends in the conducted trials. However, the validation is limited to the tested scenarios, and its general predictive accuracy across broader operating conditions or swarm scales has yet to be established.
What are the implication of the main findings?
  • The results suggest that heterogeneous UAV formation control can be practically implemented at a small scale using off-the-shelf hardware, lightweight control (outer-loop PI), GPS positioning, and Wi-Fi networking. While interoperability via middleware (e.g., MAVLink) was demonstrated, scalability to larger swarms, robustness to communication loss, latency, and sensing degradation, and performance under disturbances remain open issues requiring further investigation.
  • The use of a pre-flight simulator indicates a promising but preliminary engineering workflow for supporting field deployment by enabling data-driven tuning and risk reduction prior to experiments. Its applicability to safety-critical or large-scale swarm operations has yet to be validated, particularly under conditions involving packet loss, GPS denial, environmental disturbances, or more complex multi-agent interactions.

Abstract

This study presents a leader–follower flight control architecture for a small-scale UAV swarm, demonstrated using a three-UAV system built on heterogeneous autopilots, GPS positioning, Raspberry Pi 3B+ units, and Wi-Fi communication. The follower UAVs autonomously maintain predefined formations while tracking the leader’s trajectory. During flight, each Raspberry Pi establishes inter-UAV communication via a Wi-Fi network using the UDP protocol, enabling real-time data exchange and attitude adjustments. An outer-loop proportional–integral control design implemented on the Raspberry Pi generates corrective commands to the corresponding autopilot to reduce the followers’ position errors. Under the tested conditions, the framework achieves formation tracking with horizontal and vertical errors of approximately 60 and 20 cm, respectively, providing initial experimental validation in a small-scale setting. In addition, a simulation environment based on pre-recorded UAV and environmental data with 3D visualization is developed to support behavior prediction, performance evaluation, and control tuning prior to real-world deployment, although its applicability beyond the tested scenarios remains to be established.

1. Introduction

UAV swarms offer significant advantages over individual UAVs by enabling multiple units to collaborate, covering larger areas and performing tasks simultaneously [1]. This enhances scalability, flexibility, and resilience, making swarms ideal for dynamic environments like disaster response, search and rescue, and environmental monitoring [2]. Swarms provide redundancy, ensuring mission success even if some UAVs fail, and can adapt in real time to maintain formations and execute coordinated maneuvers [3]. These capabilities make UAV swarms more efficient, reliable, and precise, revolutionizing industries that require high coordination and complex tasks.
Collaborative UAV swarm research has made significant progress by employing advanced control strategies, such as model predictive control (MPC), consensus algorithms, and adaptive control methods. These techniques have enabled autonomous coordination and formation maintenance in UAV groups with promising results [4,5]. Rotary-wing UAV (e.g., quadrotor) formation control has been widely studied to enable cooperative sensing, surveillance, and mapping.
The main approaches can be categorized into leader–follower control, behavior-based control, virtual structure control, and consensus-based distributed control. Each approach adopts either centralized or decentralized (distributed) formation control architectures [6,7]. The former relies on a global controller that collects all agent states and computes commands, offering optimal coordination but suffering from scalability limits, high communication load, and single-point failure risks. The latter uses local interactions among UAVs, improving robustness, scalability, and adaptability in dynamic environments, though often at the cost of suboptimal global performance and more complex stability analysis.
The leader–follower approach is widely used due to its simplicity and practical deployability. A leader UAV flies along the mission trajectory, while followers regulate their relative positions with respect to the leader or neighboring UAVs. Stability is typically analyzed using Lyapunov methods or graph-based tools to ensure convergence of relative position errors [8,9]. The behavior-based approach combines multiple behaviors—such as formation keeping, collision avoidance, and target search—into weighted control actions, offering flexibility but sometimes limited theoretical guarantees [10]. Flocking theory is a canonical example of such an approach. It enables emergent collective behavior without global coordination, allowing UAV swarms to achieve formation, collision avoidance, and velocity consensus through local sensing and communication [11]. The virtual structure approach treats the formation as a rigid body whose geometry is maintained by each UAV tracking its designated position [12]. More recently, consensus-based distributed control has become prominent, enabling scalable swarm coordination with stability analyzed using graph Laplacian theory [13]. However, most prior work has concentrated on homogeneous UAV swarms, where identical hardware and software simplify control and communication requirements.
In contrast, heterogeneous UAV swarms—composed of UAVs with different hardware, sensors, and communication modules—pose unique challenges but remain relatively underexplored. In particular, leader–follower architectures in wedge-shaped formations require robust communication, reliable positioning, and adaptive control to ensure stability and precision. While prior studies often relied heavily on simulation, there is a pressing need for real-world experimental validation to confirm practical feasibility. Furthermore, communication delays, packet loss, and synchronization difficulties can degrade formation accuracy and system robustness during complex maneuvers [14,15]. Addressing these issues calls for integrated solutions that combine Wi-Fi ad hoc networking, GPS positioning, and lightweight control algorithms on embedded platforms, such as Raspberry Pi. To ensure safety in real-world flights, simulation frameworks are also required to refine control logic under realistic operating conditions before physical deployment.
Precise and autonomous formation control in heterogeneous UAV swarms remains challenging due to differences in hardware, software, and communication reliability. Achieving robust coordination is particularly critical in wedge-shaped formations of multirotor UAVs [16], where centralized control through a leader–follower architecture must ensure precision, efficiency, and scalability in multi-UAV collaboration [4,17]. Moreover, real-world experiments with UAVs weighing between 2 and 15 kg pose significant safety risks, requiring strict operational precautions and compliance with aviation regulations [18,19].
This study responds to these needs with innovative ideas, as follows: (i) designing and validating a GPS-based small-scale leader–follower formation system for three heterogeneous UAVs, (ii) employing Wi-Fi and an outer-loop PI control to enable wedge-shaped formation in a star network under test conditions, (iii) developing a Python 2.7.9-based UAV formation simulator that achieves high following accuracy using experimental data, and (iv) demonstrating the practical proof-of-concept feasibility of heterogeneous UAV swarm formation through real-world experiments for safety and regulatory compliance.
This paper integrates GPS satellite positioning, Wi-Fi ad hoc networking, and an outer-loop PI controller on heterogeneous UAV platforms with different hardware and software. The formation is designed in a star network topology with a fixed leader UAV coordinating follower units. To ensure safety and reliability, a Python-based UAV simulator was also developed, enabling the design, refinement, and validation of formation control logic under realistic conditions before full-scale deployment.
Specific results and contributions are as follows:
  • Design and validation of a GPS-based small-scale leader–follower formation system for a heterogeneous UAV swarm, whose practical proof-of-concept feasibility is demonstrated through successful real-world implementation.
  • Forming and controlling a wedge-shaped swarm of three heterogeneous UAVs under test conditions with different hardware/software by following MAVlink protocol and using an outer-loop PI controller and an ad hoc Wi-Fi network for real-time coordination.
  • A customized Python-based pre-flight simulator for formation flight, which achieved 93% follow-error accuracy by incorporating experimental data and statistical analysis without resorting to models of detailed flight dynamics.
  • Off-the-shelf and low-cost hardware and software implementation of controllers and a simulator.
The principal novelty lies in the system-level integration and real-world validation of a GPS-based small-scale leader–follower formation architecture for a heterogeneous UAV swarm, whereas most literature on quadrotor UAV formations assumes homogeneous platforms and primarily verifies performance through simulation or simplified experimental setups. This work demonstrates practical proof-of-concept interoperability across different hardware/software stacks via MAVLink, ad hoc Wi-Fi networking, and an outer-loop PI-based coordination layer, highlighting deployment flexibility rather than purely theoretical control optimality.
The remainder of this study is organized as follows. Section 2 describes the statements of the problem, and the UAV controller design is described in Section 3. Section 4 describes part of the UAV formation control simulator architecture. Section 5 presents the experimental and simulation results, and conclusions are outlined in Section 6.

2. Formation Control Problem Among Heterogeneous UAVs

While UAV swarms have shown great potential in surveillance, mapping, and coordinated missions, most existing systems are built on homogeneous UAVs to ensure consistency in control and communication [20]. In contrast, heterogeneous UAV swarms—composed of drones with various dynamics, sensor capabilities, and communication protocols—introduce a broader set of challenges. Difficulties include maintaining synchronized flight behavior, variations in localization accuracy due to sensor discrepancies, and communication instability arising from hardware diversity [21].
Moreover, the lack of standardized integration frameworks complicates the coordination among dissimilar UAVs, especially in dynamic or mission-critical environments. Despite recent research interest, practical implementations of heterogeneous swarms remain limited, and many proposed solutions rely heavily on simulation with insufficient real-world validation [14,15].

2.1. UAV System and Control

In this research, two hexarotor UAVs and one quadrotor UAV were used to form a small heterogeneous swarm, as shown in Figure 1. Besides the frame and motors and propellers for flight, each UAV system consists of flight control, communication, sensor fusion, and positioning modules. Such a swarm reflects real-world heterogeneity in hardware configuration and flight controls. This setup requires integration among UAVs of diverse vehicle dynamics and flight controllers and serves the purpose of performance evaluation for the integrated formation control.
Let us take the quadrotor for example. A quadrotor typically controls attitude and position through the thrust of four propellers. Its dynamics follow Newton–Euler equations [22] and differ among UAV types and models.
An autopilot controller for a UAV is a closed-loop control system that utilizes onboard sensors and estimation algorithms to autonomously stabilize the vehicle’s attitude and track a desired flight trajectory. Mahony et al. defined UAV autopilots as systems managing stability and path-following via control loops [23]. PX4 is a modular autopilot platform with real-time support for flight control tasks [24]. Bouabdallah et al. showed that common autopilot designs use PID-based inner loops for attitude control and outer loops for position tracking [25].
Figure 2 illustrates an inner and an outer control loop for executing mission plan and commands of a flight mission that an autopilot controller receives. The inner control loop is responsible for maintaining and stabilizing the UAV’s attitude, while the outer control loop converts UAV position error to control settings of pitch, roll, yaw, and throttle as input to the inner loop. The outer control loop can either be carried out by the built-in autopilot or can be switched to an external controller for setting pitch, roll, yaw, and throttle controls through the data input interface to the inner control loop of the autopilot. The mission command of the leader is from the pilot, while the mission commands to the followers are given by the leader from the wireless communications.
The control system shown in Figure 2 is a cascaded control system, where the inner loop is a fast subsystem while the outer loop generates control references based on the position or trajectory errors. When the inner attitude loop is already stabilized, the stability of the outer loop is, therefore, defined as the stability of the closed-loop translational dynamics when the inner loop is approximated as a stable, fast tracking system. In practice, the outer-loop stability analysis means that, under the assumption that the inner loop accurately tracks the commanded attitude inputs, the position/velocity error converges asymptotically to zero or remains bounded [8,26].
In performing formation control among UAVs, the autopilot controller of each UAV has to coordinate with other UAVs. We exploit the option of using the external controller to design coordinating outer-loop control for autopiloting each UAV. We shall add a single board computer as a companion board to an autopilot that implements the outer-loop controller.

2.2. Proportional–Integral–Derivative (PID) Control in Outer Loop

We shall consider PID control-based outer-loop design for coordinating control of formation. In industrial applications, PID control has advantages of responsiveness, low complexity, good control performance, easy to tune, and low implementation cost [27]. Specific to automated UAV system applications, PID control is well-suited due to its simplicity, real-time responsiveness, and cost effectiveness in handling various system dynamics.
The common PID control formula is as follows [28]:
u t = K P e ( t ) + K i 0 t e τ d τ + K d d d t e ( t ) ,
where u(t) is a 4-tuple control, K’s are gain parameters, and e(t) is an error signal of the controlled UAV. In this expression, u(t) represents the correction command (mapped to roll, pitch, throttle, or yaw), which is derived from the weighted sum of the current error (proportional), its accumulated past (integral), and its predicted future rate of change (derivative). In the subsequent study, we employ PI control. The derivative term is deactivated ( K d = 0 ) to prevent amplification of high-frequency GPS noise, thereby ensuring better stability in outdoor environments.
The control inputs u = [u1, u2, u3, u4] correspond to roll, pitch, throttle, and yaw controls [29]. Both the outer- and inner-loop controllers manage stabilization of the UAV flight. The changes in UAV attitude are described by [30]
ω ˙ = J 1 τ ω × J ω ,
where ω ˙ is the agular acceleration vector, ω is the angular velocity vector, J is the inertia matrix, and τ is the control torque. The vector τ represents the total external torque applied to the UAV’s fuselage frame. It is the physical manifestation of control commands—generated by differential rotor thrust—that overcomes inertial resistance J and gyroscopic effects to drive the angular acceleration ω ˙ .
This study designs the outer control loop using a PID framework. A leader–follower structure addresses the compatibility between the Inno-flight and Durandal controllers, while the PID-based outer control loop resolves hardware heterogeneity between the two follower UAVs. The proposed outer control loop is adaptable to different UAV platforms.

2.3. Leader–Follower Formation Control: Problem Definition

The leader–follower control framework is a widely adopted strategy in multi-UAV systems, wherein a designated leader UAV generates the reference trajectory, and the follower UAVs regulate their motions to maintain a prescribed relative formation along that path [31,32]. This architecture reduces the computational burden on the followers and streamlines coordination logic, thereby supporting efficient decentralized or semi-centralized formation control. It is particularly advantageous in environments that demand real-time responsiveness, robustness, and scalable coordination.
When applied to heterogeneous UAV swarms—with variations in propulsion systems, control dynamics, sensing capabilities, and communication modules—the leader–follower paradigm presents substantial challenges. Core control issues include compensating for disparate dynamic responses, handling asynchronous sensing, and mitigating communication delays [33,34]. If unaddressed, these discrepancies can degrade formation stability and increase tracking errors, underscoring the need for robust control design and real-time adaptive mechanisms.
Figure 3 depicts the leader–follower formation control framework of our controller design and system integration of a three-UAV swarm. The three UAVs, one hexarotor as the leader and one quadrotor and one hexarotor as the followers, have Jupiter and Durandal as their autopilots, respectively. Each UAV is also equipped with GPS positioning, Raspberry Pi 3B+ units, and Wi-Fi communication. The leader UAV is manually piloted by an operator sending remote controls to its Jupiter autopilot, while the two follower UAVs operate autonomously to keep the formation. During flight, each Raspberry Pi establishes inter-UAV communications via a Wi-Fi network using the UDP protocol, enabling real-time data exchange for the outer-loop controllers of follower UAVs.
The control objective is that follower UAVs can autonomously maintain predefined formations while closely tracking the leader’s trajectory [9,35]. The control objective is typically formulated by exploiting relative position error dynamics, which are often regulated by PID, MPC, or adaptive control schemes [36]. Formation control performance is commonly assessed by using metrics such as root mean square (RMS) formation error, reference flight path tracking delay, and inter-UAV distance deviation. Formation control stability typically means follower–leader distance errors converge to a small value, formation geometry remains preserved during maneuvers, and tracking errors remain bounded under disturbances [35]. The design challenge to such leader–follower formation control is to ensure that each follower maintains a fixed relative pose with respect to the leader, despite system heterogeneity and external disturbances.

3. Outer-Loop Control Design for Leader–Follower Formation Control

UAV maneuverability is governed by four degrees of freedom: roll and pitch modulate lateral and longitudinal inclinations, respectively, for horizontal displacement, while throttle regulates total thrust for altitude control. Yaw manages the aerodynamic counter-torque to orient the vehicle’s heading. In this framework, these inputs are dynamically adjusted to maintain the stipulated 1.0 m horizontal and 0.1 m vertical error constraints.
This section describes the outer-loop controller design using the PI control method to solve the outer-loop control problem stated in Section 2.2 and as the foundation of realizing the leader–follower formation control stated in Section 2.3. Although the two follower UAVs share the same software architecture, hardware differences result in variations in setting outer-loop control parameters as input to their respective autopilots for inner-loop controls.
Table 1 defines the operational ranges for the outer-loop control signals, including dead zones and saturation limits for both dynamic motion and steady-state hold. The proposed controller must accommodate these hardware-specific constraints—ranging from a neutral value of 1500 μ s to defined PWM extremes—to ensure consistent performance across various UAV platforms.
Let us first define the coordinate systems that are typically used in flight control modeling. Figure 4a defines UAV-centric coordinates, the standard aerospace body frame, where C is the center of UAV mass. The XYZ and roll–pitch–yaw coordinates, ( x ,   y ,   z ;   θ ,   ϕ ,   φ ) , correspond to UAV’s six degrees of freedom, where ( x , y , z ) describe translational motion and ( θ , ϕ , φ ) denote rotational motion.
To simplify the discussion of individual UAV outer-loop controller design without loss of generality, we shall first focus on the planar motions of a UAV. Figure 4b depicts the two-dimensional coordinates of three reference frames that use the center of UAV mass center as the common origin: the north–east–down (NED) earth-fixed frame, the mission frame, and the body frame. As illustrated in Figure 4b, the UAV position, i.e., the center of UAV mass center position, is obtained from GPS in reduced NED coordinates, ( l a t U , l o n U ) . The leader UAV position is also in reduced NED coordinates, ( l a t m , l o n m ) . The relative position of a follower UAV to the leader UAV is represented in spherical coordinates ( D , φ m ) , which are the distance and heading angle differences between the follower and the leader positions. In formation control design, since the formation flight is conducted at approximately constant altitude with small altitude variations, the vertical position z , as well as the roll and pitch angles ( θ , ϕ ) , are neglected. Therefore, the discussion will be based on the horizontal planar displacement ( D x , D y ) and the yaw angle φ .
As depicted in Figure 2, our outer-loop controller inputs from mission planning commands the mission XYZ coordinates, roll–pitch–yaw coordinates, and mission speed ( l a t m , l o n m , a l t m ; θ m , ϕ m , φ m ; v p ), and from the autopilot the UAV’s current coordinates and speed ( l a t U , l o n U , a l t U ; θ U , ϕ U , φ U ; v U ). The differences between these two items of input are errors. Our controller design exploits the error information and Equations (1) and (2) to calculate control settings of pitch, roll, yaw, throttle, and hovering speed and outputs to the inner-loop controller.
The outer-loop PID parameters were optimized through iterative trial and error, anchored by the stabilized inner-loop control. Tuning centered on a trade-off between response speed and attitude error to meet high-mobility requirements: horizontal speeds of 1–2 m/s and vertical rates up to 10 m/s. The objective was to maintain steady-state errors within 1 m (horizontal) and 0.1 m (vertical). This empirical process was supported by a Python-based Newtonian point-mass simulation, ensuring the control signal u(t) remained within the operational PWM limits defined in Table 1. Design details of the outer-loop controller are as follows.

3.1. Yaw Controller

Yaw control manages the UAV’s yaw motion in the φ-axis in Figure 4. This design requires UAV’s heading of angle φ U   to align with the mission coordinate angle φ m at a fast and stable speed. A UAV adjusts its yaw direction when the following two conditions hold: (C1) the distance D from the mission coordinates exceeds a safe distance of 1 m, and (C2) the angular error magnitude is greater than 1°. Otherwise, the UAV maintains its current heading. Table 1 indicates that if the yaw setting is between 1100 and 1480, the UAV rotates counterclockwise, holds the current direction if it is between 1480 and 1520, and rotates clockwise for a setting between 1520 and 1900. The larger/smaller the setting value, the faster the clockwise/counterclockwise angular acceleration.
Input to yaw control is the heading error φ m φ U , which will be converted to clockwise, counterclockwise, or no rotation settings. First, let:
φ e = φ m φ U m o d 360 ° .
The minimum heading error, φ , as shown in Figure 4b, is then calculated as:
φ =      φ e ,                     i f   φ e   180 ° , 360 ° φ e ,        o t h e r w i s e ,
so φ   l i e s   b e t w e e n   0 °   a n d   180 ° .
The proportional yaw control is designed as follows. When conditions C1 and C2 hold, there is a control setting dead zone of ± 20   around the median setting value 1500. The effective parameter setting range is 380 for both the upper/clockwise and lower/counterclockwise rotation. We set the proportion coefficient as 380/360° and multiply it by φ sgn φ to calculate the yaw control setting. Therefore:
Y a w = 1500 + 20 + 380 360 φ sgn φ ,    i f   D > 1   m   and   ϕ > 1 ° 1500 ,                                                   else .                                       

3.2. Roll and Pitch Controller

Jointly with yaw control, the roll and pitch controllers enable a UAV to travel at a constant speed along the shortest path to the mission coordinates and to maintain sufficient distance to decelerate and avoid overshooting the target. The effects of roll and pitch control parameters on the UAV are shown in Table 1.
The UAV’s GPS coordinate ( l a t U , l o n U , a l t U ) defines the center of a UAV plane, where Figure 4b is a two-dimensional depiction. The distance D between UAV and mission coordinates ( l a t m , l o n m , a l t m ) is calculated, and D x ,   D y ,   D z are calculated as:
D x = D · sin φ ,    D y = D · cos φ ,
D z = a l t m a l t U .
The pitch parameter governs forward and backward movement in the horizontal plane. Divide the setting range of 380 by the UAV’s maximum speed of 8   m / s to serve as the proportion coefficient of horizontal speed. The velocity parameter v p is a shared factor to act as the UAV’s gas pedal.
The proportional pitch control design is similar to that of yaw control by multiplying the sign of the y-axis error value, s g n ( D y ) , combined with the parameters mentioned above and the condition that the speed parameter v p 0   m / s . Therefore:
P i t c h = 1500 20 + 380 8 v p sgn D y ,    if   v p 0 , 1500 ,                                                    else ,          
where the speed is set as follows. In Equation (8), velocity parameter v p adjusts the UAV’s velocity. Similar to how a driver visually gauges the braking or accelerating distance, the UAV adjusts its acceleration based on the distance D . Real experiments show that braking occurs for 2 s by maintaining roll and pitch within the dead zone, so v p is set to 1 m/s and D y > 0 to ensure forward flight, which produces a speed of v U = 1.8 m/s. The speed parameter is set to v p = 0.1   m / s to allow slow approaching of | v U | = 0.2   m / s . If | v U | exceeds 0.25   m / s , v p reduces to zero. If the UAV is less than 0.15 m from the target, it hovers, subject to the following conditions:
v p = 1 ,        if   D > 1.7 v U ,                       0.1 ,    else   if    v U < 0.25   m / s   and 0 ,       else .                                          1.7 v U > D > 0.15   m ,
The roll controller compensates for x-axis errors using the parameters in Table 1. For x-axis errors D x of 0.1~0.2 m, the controller uses 25 D x . The experimental results show that the x-axis errors are corrected to within 0.15 m. If v p 0   m / s , roll and pitch remain within the dead zone during braking. In addition, D < 1.7 | v U | , where | v U | is the UAV’s velocity. Combining these conditions and extracting the sign of D x as s g n ( D x ) , the final roll controller equation is:
R o l l = 500 + 20 · sgn D x + 25 D x ,    if   v p 0   a n d   D < 1.7 v U ,   1500 ,                                           else .                                          
Figure 5 summarizes the parameter design for braking. The black dotted line indicates a distance of 1.7 | v U | , and the blue dotted line indicates a circle with the target coordinates as the center and a radius of 0.15 m.

3.3. Throttle Controller

The UAV’s vertical movement is controlled by throttle. Table 1 shows the relationship between throttle input and UAV output. Downward movement is designated as positive, and upward movement as negative. Equation (7) is used to determine the height difference D z between the UAV and mission coordinates. A proportional controller multiplies the effective range by D z and divides the result by 3.5 to calculate the necessary control input. The experiment results show that the UAV slows within 2.7 m of the target altitude but there are deviations of 1 m. Increasing the parameter value to 3.5 reduces the setting time to 2 s and the altitude deviation to 0.5 m.
To increase the vertical accuracy to 0.1 m, an integral controller is used. This integrates from 1 s previously to the current time at a sampling rate of 10 Hz, focusing on D z between UAV and mission coordinates. Therefore, the integral controller is modified to an inverse form with a negative sign and the integral constant K i is adjusted accordingly.
This study uses D z = 0.2   m for calculations if the integral of the height difference over 1 s is i 1 i D z t d t = 2 m · s . To maintain a value of t h r o t t l e = 1608 to allow UAV to stably approach the desired altitude, K i = 110 is calculated to ensure a height error D z of less than 0.1 m, and the steady-state time is decreased to less than 2 s. The throttle parameter PI controller is calculated as:
T h r o t t l e = 1500 + 100 · sgn D z + D z · 300 3.5 110 i 1 i D z t d t ,    if   | D z | > 0.1   m , 1500 ,                                                                                 else .                      
The control law is designed to meet specific performance criteria: horizontal tracking errors are restricted within 1.0 m to maintain geometric integrity, while the steady-state vertical error is kept below 0.1 m. Proportional and integral gains are optimized to minimize overshoot during altitude adjustments, ensuring formation stability and operational safety.

3.4. Leader–Follower Formation Control

Recall that to perform leader–follower formation control of the heterogeneous 3-UAV swarm, we have designed an integration framework, as depicted in Figure 3. Besides their respective autopilots, individual UAVs are also equipped with GPS positioning, Raspberry Pi 3B+ units, and Wi-Fi for inter-communication. The four outer-loop controllers designed in Section 3.1, Section 3.2 and Section 3.3 are for implementation on the Raspberry Pi B+ single-board computer (RPi) of each UAV that exchanges UAV status data with the autopilot and computes and sends control commands to the inner-loop control of the autopilot. The communications between RPi and the autopilot run the MAVLink protocol. The communication between the RPi of the leader UAV and a follower UAV is through Wi-Fi. For safety and regulatory considerations, the leader UAV in the 3-UAV swarm is manually piloted by an operator sending remote controls to the leader’s Jupiter autopilot, while the two followers operate autonomously to keep the formation.
Our leader–follower formation control design builds on four ingredients:
(1)
Manually piloting the leader UAV by an operator.
(2)
Periodic mission coordinate generation by the leader over its RPi computation for the two followers, respectively, of which the computation is based on the leader’s states and the formation requirements, and Algorithm 1 gives the details.
(3)
Periodic Wi-Fi communication by the leader to each follower the follower’s specific mission coordinates.
(4)
Tracking control via the outer-loop controller of each follower to track the specified mission trajectory.
We assume that the environment to perform formation control is not hostile, for example, no intentional jamming or interference, and the mission requirements are nominal to the three UAVs’ capability and performance range.
Since the leader and all followers are individually stable in trajectory tracking [38], the closed-loop swarm can be modeled as a cascade in which the outer-loop PI controllers regulate each follower’s relative position error with respect to its assigned wedge offset. Following the heterogeneous leader–follower stability framework of Wang, Ashrafiuon, and Nersesov [39], stability is ensured when the leader–follower graph is rooted at the leader, the leader trajectory is bounded and sufficiently smooth, and the follower control inputs remain within feasible actuation limits. In our implementation, the PI gains were empirically tuned to satisfy these conditions: inner-loop pre-stabilization, a sufficiently large Wi-Fi transmission range to keep the connectivity between a follower and the leader, an 8 Hz leader update causing only bounded reference mismatch, overshoot suppression, and the commanded PWM signals staying within allowable limits. Hence, the resulting closed-loop error dynamics achieve practical formation stability, with horizontal and vertical formation errors remaining.
Algorithm 1: Mission Coordinate Generation Logic—From Leader to Follower.
Input: Leader UAV trajectory P L t = [ l a t L , l o n L , a l t L ]
Output: Mission target for Follower P m = l a t m , l o n m , a l t m , m { F 1 , F 2 }
  • Trajectory State Machine (Navigation)
    Update: For each cycle, increment/decrement Latitude ( l a t L ) or Longitude ( l o n L ) and update Heading ( φ L ) and Altitude ( a l t L ).
  • Geometric Transformation (Formation)
       Rotation Matrix: R ( φ ) = cos φ sin φ sin φ cos φ
       Coordinate Mapping: For each follower U , calculate global target P t a r g e t :
                         P m = ( R ( φ ) · [ l o n U , l a t U ] T + [ l o n L , l a t L ] T , H L + a l t U )
  • Asynchronous Dispatch (Communication)
       Identification: Map incoming UDP packets to Follower U via IP address A d d r U .
       Transmission: Dispatch P m to Followers IP address A d d r U at frequency f .
       Robustness: Ensure latency-independent updates via non-blocking I/O.

4. Simulator for UAV Formation Control

4.1. Mission of UAV Formation

This study uses three UAVs to form and maintain a specified triangular formation from one point to another in a leader–follower structure. The leader assigns missions to two followers, and a triangular arrangement is used for observation, as shown in Figure 1.
The leader UAV has priority and commands the follower UAVs to avoid conflicts. Each UAV weighs 3–5 kg and has a 2 kg battery. Regulations require each UAV to have a dedicated operator, which complicates logistics. Due to the limitations of existing simulation software, a customized system was created using data from real-world UAVs and the controller that is developed in Section 3 to increase success rates and reduce costs of trial and error.

4.2. UAV Formation Control Simulator

To ensure the reproducibility of the formation mission, the simulator’s trajectory generation logic is formalized in Algorithm 2. This process pre-calculates ideal spatial coordinates and corresponding headings (yaw) at an updating frequency of 10 Hz, providing a deterministic reference for the heterogeneous fleet. Algorithm 3 describes the simulation of how one update of mission coordinates received by a follower from the leader is converted to the follower’s outer-loop control vector.
Algorithm 2: Simulator Trajectory and Heading Generation.
  • Initialize update frequency f   =   10   H z ;
  • Calculate total distance D and required steps N   =   ( D / V )   ×   f ;
  • For each step i from 0 to N , do
  • Interpolate current target position P i   =   ( x i ,   y i ,   z i ) along the path;
  • Calculate target heading ψ i   =   a t a n 2 ( y i     y i 1 ,   x i     x i 1 ) ;
  • Store { P i ,   ψ i } into mission queue Q ;
  • End For
Algorithm 3: Follower Control Law Simulation.
Input: Target for Follower P m , Follower UAV Position P U = l a t U , l o n U , a l t U , Follower UAV heading φ U , Frequency f
Output: Control Vectors U P W M = [ u r o l l , u p i t c h , u t h r o t t l e , u y a w ]
1. Error Estimation
        Compute the spatial displacement vector e between the follower and the target
        Vector: e = [ l a t m l a t U , l o n m l o n U , a l t m a l t U ] T
        Update altitude error buffer O with a sliding window of size N .
2. Body Frame Projection
        Horizontal Projection: Project GPS errors into the UAV’s local frame using φ U .                                  e p i t c h e r o l l = cos φ U sin φ U sin φ U cos φ U e l a t e l o n = D y D x in Figure 5b.
        Heading Error: Compute the relative bearing to P m .
        Target Bearing: φ m = tan 1 ( l o n m l o n U l a t m l a t U )
        Angular Difference: φ = φ m φ c + π m o d ( 2 π ) π
        Altitude Error: e a l t = a l t m a l t U
3. Command Mapping and Saturation
        Transform projected errors into PWM signals using bias B ( 1500   μ s ) :
        Pitch, Roll: u r o l l = s a t ( B ± K r o l l · e r o l l ) , u p i t c h = s a t ( B ± K p i t c h · e p i t c h )
        Yaw: u y a w = s a t ( B ± K φ · φ )
        Throttle: u t h r o t t l e = s a t ( B + K a l t · e a l t + K I , a l t · e a l t )
        Constraint: U P W M [ 1100 , 1900 ]   μ s via saturation function s a t ( · ) .
4. Asynchronous Control Loop
        Update: Retrieve P m via non-blocking UDP telemetry.
        Execution: If autonomous mode is active, override RC channels at frequency f .
To construct a model of the UAVs, the starting coordinates are positioned at the origin of a Cartesian coordinate system ( x U , y U , z U ) = ( 0 ,   0 ,   0 ) . The UAVs are then assigned to the designated coordinates. To map the UAV’s 3D coordinates, the latitude, longitude, and altitude are directly converted to x, y, and z axes. The leader UAV starts at x H ,   y H ,   z H = ( 121.5267545 × 10 5 ,   25.0131502 × 10 5 ,   10 ) , with mission coordinates x H 10 , y H + 10 , z H oriented north. For a triangular formation, the follower UAVs are positioned at different altitudes behind the leader, with respective mission coordinates of x H 5 ,   y H 5 ,   z H 2 and ( x H + 5 , y H 5 , z H 4 ) , as shown in Figure 6.
The simulation uses a point mass model for UAV motion. To convert the control parameters into physical values, the average values of the control parameters and acceleration are calculated. Multiple real experiments have been conducted to correct the flight data. Then, empirical formulas can be derived by assuming a linear relationship between the control parameter and the flight dynamics.
Take the pitch parameter as an example. Pitch controls forward and backward motions and is directly related to the acceleration that is provided by the motor. If acceleration is in balance with air resistance, the UAV maintains a steady speed. Table 2 shows acceleration, velocity, and pitch data for a set of extracted data. The average values are a a v g = 0.67   m / s 2 , v a v g = 1.86   m / s , and P i t c h a v g = 1412 . The expected acceleration and velocity limits are calculated by ( P i t c h m d d z ) × P a and ( P i t c h m d d z ) × P v , where m d is the median and d z is the dead zone in Table 1. Therefore, the coefficients for acceleration and velocity are calculated to be P a = 0.0098 and P v = 0.027 .
This method is used to obtain the control parameter coefficients for acceleration and velocity conversion. The same logic applies to roll, throttle, and yaw, with the results shown in Table 3. The complete flowchart of the simulator is shown in Figure 7. The distance between the UAV and the mission and the required velocity and acceleration are calculated. If the distance between the UAVs in the formations is too close, the heights of the followers are adjusted to avoid the leader. The values for control parameters and UAV position are then calculated, and the UAV model is established. If all tasks are completed, the UAVs hover, and the pilot lands them manually.
Under the unified ArduPilot framework, the proposed formation control laws demonstrate high modularity. By incorporating the specific dynamic parameters of each UAV (as detailed in Table 1), the control logic is systematically mapped across the roll, pitch, throttle, and yaw channels. This decoupled outer-loop procedure not only streamlines parameter calibration across heterogeneous platforms but also serves as a robust foundation for automated gain tuning in large-scale swarm deployments.

5. Experiment for UAV Formation Control

5.1. Experiment Scenario

The experiment uses a UAV swarm with a leader UAV that is equipped with an InnoFlight Jupiter flight controller, which commands two follower UAVs. The followers include a quadrotor UAV and a hexarotor UAV, both of which are equipped with Holybro Durandal flight controllers. After the experiment, the flight mission data that are received by the follower UAVs are imported into the custom-designed UAV formation simulator and compared with the experimental results to determine the accuracy of the simulated and the actual outcomes.

5.2. Experimental Architecture

As shown in Figure 8, each UAV is equipped with a Raspberry Pi 3B+ and a Wi-Fi router. The PID controller allows the UAVs to reach the mission coordinates autonomously and maintains closed-loop control so a single operator can manage a complex fleet of UAVs.
As described in Section 2.1 and depicted by Figure 3, the UAVs are equipped with motors, propellers, batteries, radios, and Raspberry Pi microcomputers for autonomous control. A Wi-Fi router allows communication between UAVs and three operators, and a ground station computer monitors the flight.
For reproducibility, the system employs Wi-Fi 802.11n and UDP for low-latency communication. Communication between drones operates at 8 Hz. The Raspberry Pi retrieves GPS, altitude, and yaw data via MAVLink, broadcasting it to followers for real-time synchronization. All telemetry is logged in JSON format for post-flight analysis.
The real-time execution logic of the leader UAV’s onboard controller is detailed in Algorithm 4. This main loop manages MAVLink data acquisition, coordinate transformation, and high-frequency UDP broadcasting, which are critical for maintaining the reported sub-meter-level formation precision.
Algorithm 4: Real-time Leader–Follower Controller Loop.
  • Establish MAVLink connection and initialize UDP broadcast socket;
  • While mission is active do
  • Fetch $\{Lat, Lon, Alt, \psi\}$ via MAVLink GLOBAL_POSITION_INT;
  • Map global GPS coordinates to local Cartesian coordinates $(x, y, z)$;
  • Construct data packet $M = [Timestamp, x, y, z, \psi]$;
  • Broadcast $M$ to followers via UDP over Wi-Fi 802.11n;
  • Log telemetry data to flight_log.json for post-analysis;
  • Wait for $100$ ms to maintain 10 Hz update rate;
  • End While
The experiment consists of four roles: UAV operators, a ground station, a leader UAV, and two follower UAVs. All devices are connected to the local wireless network, and the UAVs take off in sequence. The ground station uses SSH to communicate with the UAV swarm. During the mission, the leader UAV is controlled by a pilot and can fly freely in the air. The leader sends formation tasks and the followers receive them. When the operator confirms that automatic control has been activated, the followers switch to follow mode and autonomously perform formation control using the designed controller. All steps follow the process that is shown in Figure 8. The UAVs then take off in the field, as shown in Figure 9.

5.3. Experimental Results

Our experiments first assessed the step responses of the outer-loop PI controllers designed for individual UAVs in Section 3. With individual UAV stability and the leader tracking the planned flight trajectory, our experiments then evaluated the performance of formation control, specifically how the outer-loop PI controllers of the swarm regulate the position error of each follower UAV relative to an assigned wedge offset. The experimental results are as follows.

5.3.1. Step Response of Individual UAV Under Outer-Loop Control

Figure 10 shows a step response of the throttle control in Equation (11), where the vertical axis on the left is the throttle value, the one on the right is the altitude of the hexarotor UAV, and the horizontal axis is the time elapsed. The red curve is the altitude achieved by using the proposed throttle controller, and the blue curve presents the throttle control input over time. In this experiment, we also adopted the complete both outer- and inner-loop controllers of ArduPilot for benchmark performance, whose altitude control performance is indicated by the black curve. The mission for the UAV was to take-off and maintain an altitude of 10 m. Results demonstrate that although our PI controller design has a slightly slower ascent speed and a slightly larger overshoot than ArduPilot, it reaches steady state faster and has a smaller steady-state error (within ±10 cm). Although the control dead zone caused some discrete small jumps in control values during the first 40 s, it became constant and led to steady state afterwards.
Figure 11 shows a step response of yaw control in Equations (3) and (4), where the vertical axes are yaw command and azimuth values of the hexarotor UAV, respectively, and the horizontal axis is the time elapsed. The red curve is the azimuth angle achieved using the proposed yaw controller, and the dark gray curve is the computed yaw control input over time. The initial and steady-state azimuth angles of the UAV’s heading are 0 ° / 360 ° and 180°, respectively. The initial φ e = 180 ° , so in the initial stage of the UAV’s rapid counterclockwise rotation, the yaw control value was set to a low value of 1300. As the azimuth angle of the UAV heading asymptotically drops down near 180°, the yaw control value gradually increases and approaches 1480, the lower limit of the yaw control dead zone. Once the UAV’s heading dropped below 180°, according to Equation (3), φ e became positive but of a small value. Such a sign change of φ e in the P-controller (Equation (5)) led to a jump of the yaw control value from 1480 to 1520, which still stayed in the dead zone of control input, so that the heading angle was stabilized in a steady state of 180 ° ± 3 ° .

5.3.2. Leader–Follower Operation

An experiment was conducted to verify the correctness of the leader–follower operation. In this one leader and one follower case, the leader UAV was maneuvered by an operator via remote control, while the follower UAV was tasked to locate itself at 7.53 m to the leader’s southeast. The leader UAV calculated the target GPS position of the follower UAV based on its own GPS position and fuselage orientation and stably transmitted the target position information to the follower UAV at 8 Hz via the Wi-Fi/UDP protocol. Continuously receiving the instructions and comparing them with its own GPS, the follower UAV autonomously flew toward the target GPS position. To monitor the experimental process, both the leader and follower UAVs transmitted their own GPS position information to the ground control station via Wi-Fi for recording.
Figure 12 shows the horizontal flight trajectories of the leader and follower UAVs. As shown in Figure 12a (N–E plane), the follower UAV (blue solid line) precisely maintained the prescribed geometry relative to the leader UAV (red dot line) over a 265 s flight time. Correspondingly, the formation distance analysis in Figure 12b illustrates the system’s stability against a target distance of 7.53 m. Despite minor fluctuations that may be caused by the control response delay, the mean absolute error (MAE) is 1.611 m, and the root mean square error (RMSE) is 2.03 m. This control law exhibits good convergence and expected topology preservation under the test conditions.

5.3.3. Formation Control Performance

Then, we consider the case of one leader and two follower UAVs. The formation flight lasts for three minutes over the open field in Figure 9 [40]. Figure 13 shows the horizontal flight trajectories of the leader and two follower UAVs, to facilitate verification of the formation control performance. Instead of a timeline, the figure sequentially displays six distinct flight states of the UAV formation, labeled with numbers to indicate their order. Between points 2 and 3, and between points 4 and 5, the two follower UAVs rotated counterclockwise around the leader UAV at the center. As a result, the leader UAV remained nearly stationary, while the two follower UAVs moved to cross-diagonal positions. When UAVs reach point 6, they rotate back to the starting direction as point 1.
When planning a formation mission, the simulator is conducted beforehand to ensure that UAVs maintain sufficient distance to avoid collisions. Furthermore, the speed of the leader UAV should be suitably controlled so that the follower UAVs can keep pace.
In the formation mission, the hexarotor follower was required to be positioned 5 2 = 7.07   m to the southeast of the leader, while the quadrotor follower to the southwest. The experimental results in the figure show that the triangular formation of the three UAVs successfully maintained its formation throughout the mission. The average distances between the leader and the followers were 7.66 m and 7.57 m, respectively. Compared with the ideal distance of 7.07 m, the accuracy reaches 93%.
Figure 14 shows the evolution of the position errors of the two followers over time. These graphs detail the convergence speed, overshoot, and steady-state error of the controllers, especially during orientation changes. As can be seen from the N–S and E–W graphs, there is a nearly constant time delay σ between the actual GPS position, r a c t u a l t , and the target GPS position, r t a r g e t t . The time at which the correlation function between the actual and target GPS positions reaches its maximum value is σ . The spatial path fidelity error is then defined as the difference between the actual GPS position and the target GPS position after the delay σ , i.e., r a c t u a l t r t a r g e t t σ , as shown in the bottom plots of Figure 14.
Note that the GPS positions mentioned here are the local GPS at each UAV. GPS degradation may cause some problems, but this study does not explore this issue. However, since the UAVs are not far apart, the degree of GPS degradation is roughly the same. Therefore, with the relative degradation remaining constant, the formation performance is not noticeably affected.
Table 4 lists the mean average error (MAE), root mean square error (RMSE), and the 95% confidence interval for the spatial path fidelity error and compares them with the error without delay compensation. It can be seen that despite a certain time delay, the follower’s trajectory remains closely aligned with the target path. Furthermore, the MAE, RMSE, and 95% confidence intervals for hexarotor and quadrotor UAVs are almost identical, demonstrating that the proposed formation control algorithm has good versatility and stability in a small system of heterogeneous UAVs under the test conditions.
Figure 15 plots the spatial paths based on actual GPS positions of the two followers and compares them with the target paths. It can be seen that even with sharp turns and complex flight point transitions, the actual paths (colored solid lines) closely match the mission paths (dashed lines). Visual verification shows that the spatial MAE is as low as 0.5–0.6 m, as shown in Table 4. The time color bar on the right side of the figure indicates that the system maintained stable navigation accuracy throughout the formation flight mission. Combining path trajectory and error analysis, it can be verified that despite the time synchronization lag, the proposed formation algorithm can achieve sub-meter-level spatial path accuracy and stability using heterogeneous UAVs.
Furthermore, it is meaningful to validate the performance of the simulator in Section 4. The trajectories of the two follower UAVs in Figure 12 are redrawn in Figure 16 as solid lines, while those predicted by the simulator are drawn as dotted lines. The simulation results give values of 8.03 m and 7.87 m, respectively, which agree well with the measured results, with an MAE of approximately 60 cm. The results in the vertical direction were also checked. The agreement between measured and simulation results is within 20 cm.
The impact of Wi-Fi latency variation and packet loss is quantitatively evaluated by the UDP inter-packet arrival time in the present controlled test conditions (Figure 17), which shows a tight unimodal distribution centered at 0.125 s (8 Hz). This high update consistency confirms that network jitter remains within the control loop’s tolerance. Furthermore, the absence of secondary peaks (at 0.25 s or 0.375 s) indicates that consecutive packet loss was negligible. Figure 14 illustrates that the current formation architecture introduces a time delay of 3 to 5 s, which is mainly caused by the control response times of individual followers, as also evidenced by the step response times shown in Section 5.3.1. How such follower delays in responding to the leader’s mission coordination update may affect the proposed leader–follower formation control warrants further refinement in future research.

6. Conclusions and Discussion

This study presented a practical heterogeneous UAV formation control framework based on a small-scale leader–follower architecture that integrates GPS positioning, ad hoc Wi-Fi communication, MAVLink interoperability, and an outer-loop PI control layer. The proposed system demonstrated a proof-of-concept that heterogeneous aerial platforms—specifically a quadrotor and a hexarotor with different hardware and software stacks—can reliably maintain coordinated formation flight using a lightweight coordination mechanism.
The study mainly focused on practical contributions to small-scale systems integration applications, rather than advancements in control theory. Through actual flight experiments, a wedge-shaped three-UAV swarm was successfully implemented and validated by a limited set of experiments, confirming the feasibility of real-time formation control based on a star-topology wireless network. Beyond the control architecture itself, the study also introduced a Python-based pre-flight simulator that supports system verification and parameter tuning prior to field deployment.
By incorporating experimentally derived flight data and statistical analysis rather than relying on detailed aerodynamic models, the simulator achieved a 93% agreement with actual flight behavior. The work, therefore, contributes a deployable and cost-effective system integration approach that emphasizes interoperability and real-world validation under the test conditions. Unlike many formation control studies that assume homogeneous UAVs or focus primarily on theoretical analyses of control stability and/or optimality, this work demonstrated that reliable heterogeneous swarm coordination can be achieved with off-the-shelf hardware, lightweight control logic, and practical networking solutions. Table 5 gives a comparison of the results with those of related studies in the literature.
Despite these contributions, several limitations remain. The experimental validation involved a relatively small swarm of three UAVs and, therefore, did not fully evaluate scalability under larger swarm sizes or more complex network dynamics. Communication reliability was tested primarily within a controlled Wi-Fi environment, and performance under heavy interference, long-range operation, or dynamic network topologies requires further investigation. In our formation control design, we did not address the issues of control response delay, communication latency, packet loss, GPS degradation, and environmental disturbances. These issues will be the focus of our future research.
In addition, the outer-loop PI controller design prioritizes simplicity and deployability, leaving room for more advanced adaptive or learning-based control strategies and for theoretical analysis of control stability and/or optimality. Future research will focus on extending the architecture to larger UAV swarms and more dynamic communication environments. Integration with adaptive or learning-based control methods and resilient multi-hop FANET routing protocols will also be explored to improve scalability, robustness, and autonomy in real-world missions.

Author Contributions

Conceptualization, R.-B.W.; methodology, R.-B.W.; software, P.-T.L.; validation, S.-C.C. and R.-B.W.; formal analysis, P.-T.L.; investigation, R.-B.W.; resources, R.-B.W.; data curation, P.-T.L.; writing—original draft preparation, P.-T.L.; writing—review and editing, S.-C.C. and R.-B.W.; visualization, P.-T.L.; supervision, R.-B.W.; project administration, R.-B.W.; funding acquisition, R.-B.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded jointly by the Ministry of Education (MOE) in Taiwan under Grant NTU-111L894501 from The National Taiwan University Excellence Research Program and by the National Science and Technology Council under Grants MOST 110-2221-E-002-172 and NSTC 113-2218-E-002-049.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Acknowledgments

P.-T.L. thanks Jia-Hau Bai and Ping-Hsiang Wang for experimental collaboration and helpful discussion.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Zhou, Y.; Rao, B.; Wang, W. UAV swarm intelligence: Recent advances and future trends. IEEE Access 2020, 8, 183856–183878. [Google Scholar] [CrossRef]
  2. Tang, J.; Duan, H.; Lao, S. Swarm intelligence algorithms for multiple unmanned aerial vehicles collaboration: A comprehensive review. Artif. Intell. Rev. 2023, 6, 4295–4327. [Google Scholar] [CrossRef]
  3. Alqudsi, Y.; Makaraci, M. UAV swarms: Research, challenges, and future directions. J. Eng. Appl. Sci. 2025, 72, 12. [Google Scholar] [CrossRef]
  4. Zeng, Y.; Zhang, R.; Lim, T.J. Wireless communications with unmanned aerial vehicles: Opportunities and challenges. IEEE Commun. Mag. 2016, 54, 36–42. [Google Scholar] [CrossRef]
  5. Vasisht, D.; Kumar, J.; Rahul, H.; Katabi, D. Decimeter-level localization with a single WiFi access point. In Proceedings of the 13th USENIX Symposium on Networked Systems Design and Implementation (NSDI), Santa Clara, CA, USA, 16–18 March 2016; pp. 165–178. [Google Scholar]
  6. Oh, K.-K.; Park, M.-C.; Ahn, H.-S. A survey of multi-agent formation control. Automatica 2015, 53, 424–440. [Google Scholar] [CrossRef]
  7. Do, H.T.; Hua, H.T.; Nguyen, M.T.; Nguyen, C.V.; Nguyen, H.T.; Nguyen, H.T.; Nguyen, N.T. Formation control algorithms for multiple-UAVs: A comprehensive survey. EAI Endorsed Trans. Ind. Netw. Intell. Syst. 2021, 8, e3. [Google Scholar] [CrossRef]
  8. Beard, R.W.; Lawton, J.; Hadaegh, F.Y. A coordination architecture for spacecraft formation control. IEEE Trans. Control. Syst. Technol. 2001, 9, 777–790. [Google Scholar] [CrossRef]
  9. Ren, W.; Beard, R.W. Distributed Consensus in Multi-Vehicle Cooperative Control; Springer: Berlin/Heidelberg, Germany, 2008. [Google Scholar]
  10. Balch, T.; Arkin, R.C. Behavior-based formation control for multirobot teams. IEEE Trans. Robot. Autom. 1998, 14, 926–939. [Google Scholar] [CrossRef]
  11. Olfati-Saber, R. Flocking for multi-agent dynamic systems: Algorithms and theory. IEEE Trans. Autom. Control 2006, 51, 401–420. [Google Scholar] [CrossRef]
  12. Lewis, M.; Tan, K. High precision formation control of mobile robots using virtual structures. Auton. Robot. 1997, 4, 387–403. [Google Scholar] [CrossRef]
  13. Olfati-Saber, R.; Fax, J.; Murray, R. Consensus and cooperation in networked multi-agent systems. Proc. IEEE 2007, 95, 215–233. [Google Scholar] [CrossRef]
  14. Yuan, W.; Chen, Q.; Hou, Z.; Li, Y. Multi-UAVs formation flight control based on leader-follower pattern. In Proceedings of the 36th Chinese Control Conference (CCC), Dalian, China, 26–28 July 2017; IEEE: New York, NY, USA, 2017; pp. 1281–1286. [Google Scholar] [CrossRef]
  15. Ali, Z.A.; Israr, A.; Alkhammash, E.H.; Hadjouni, M. A leader-follower formation control of multi-UAVs via an adaptive hybrid controller. Complexity 2021, 2021, 9231636. [Google Scholar] [CrossRef]
  16. Ouyang, Q.; Wu, Z.; Cong, Y.; Wang, Z. Formation control of unmanned aerial vehicle swarms: A comprehensive review. Asian J. Control 2023, 25, 570–593. [Google Scholar] [CrossRef]
  17. Tognon, M.; Franchi, A. Omnidirectional aerial vehicles with unidirectional thrusters: Theory, optimal design, and control. IEEE Robot. Automat. Lett. 2018, 3, 2277–2282. [Google Scholar] [CrossRef]
  18. Svaty, Z.; Nouzovsky, L.; Micunek, T.; Frydryn, M. Evaluation of the drone-human collision consequences. Heliyon 2022, 8, e11677. [Google Scholar] [CrossRef]
  19. International Civil Aviation Organization (ICAO). ICAO Model UAS Regulations. Available online: https://www.icao.int/safety/UA/Pages/ICAO-Model-UAS-Regulations.aspx (accessed on 28 March 2026).
  20. Saska, M.; Kasl, Z.; Přeucil, L. Motion planning and control of formations of micro aerial vehicles. IFAC Proc. Vol. 2014, 47, 1228–1233. [Google Scholar] [CrossRef]
  21. Shi, G.; Hönig, W.; Shi, X.; Yue, Y.; Chung, S.-J. Neural-Swarm2: Planning and control of heterogeneous multirotor swarms using learned interactions. IEEE Trans. Robot. 2022, 38, 1063–1079. [Google Scholar] [CrossRef]
  22. Ardema, M.D. Newton-Euler Dynamics; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2004. [Google Scholar]
  23. Mahony, R.; Kumar, V.; Corke, P. Multirotor aerial vehicles: Modeling, estimation, and control of quadrotor. IEEE Robot. Automat. Mag. 2012, 19, 20–32. [Google Scholar] [CrossRef]
  24. Meier, L.; Honegger, D.; Pollefeys, M. PX4: A node-based multithreaded open source robotics framework for deeply embedded platforms. In Proceedings of the 2015 IEEE International Conference on Robotics and Automation (ICRA), Seattle, WA, USA, 26–30 May 2015; IEEE: New York, NY, USA, 2015; pp. 6235–6240. [Google Scholar] [CrossRef]
  25. Bouabdallah, S.; Noth, A.; Siegwart, R. PID vs. LQ control techniques applied to an indoor micro quadrotor. In Proceedings of the 2004 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS) (IEEE Cat. No.04CH37566), Sendai, Japan, 28 September–2 October 2004; IEEE: New York, NY, USA, 2004; Volume 3, pp. 2451–2456. [Google Scholar] [CrossRef]
  26. Lee, T.; Leok, M.; McClamroch, N.H. Geometric tracking control of a quadrotor UAV on SE(3). In Proceedings of the 49th IEEE Conference on Decision and Control (CDC), Atlanta, GA, USA, 15–17 December 2010; IEEE: New York, NY, USA, 2010; pp. 5420–5425. [Google Scholar]
  27. Borase, R.P.; Maghade, D.K.; Sondkar, S.Y.; Bendre, M.R. A review of PID control, tuning methods and applications. Int. J. Dyn. Control 2021, 9, 818–827. [Google Scholar] [CrossRef]
  28. Hellerstein, J.L.; Diao, Y.; Parekh, S.; Tilbury, D.M. PID controllers. In Feedback Control of Computing Systems; IEEE: New York, NY, USA, 2004; pp. 293–335. [Google Scholar] [CrossRef]
  29. Amadi, C.A. Design and Implementation of Model Predictive Control on Pixhawk Flight Controller. Master’s Thesis, Department of Mechanical and Mechatronic Engineering, Stellenbosch University, Stellenbosch, South Africa, December 2018. Available online: https://www.researchgate.net/publication/329774661 (accessed on 28 March 2026).
  30. Biedenharn, L.C.; Louck, J.D.; Carruthers, P.A. Angular Momentum in Quantum Physics: Theory and Application; Cambridge University Press: Cambridge, UK, 1984; Available online: https://www.dji.com/tw/products/phantom-3 (accessed on 28 March 2026).
  31. Sui, Z.; Pu, Z.; Yi, J.; Wu, S. Formation control with collision avoidance through deep reinforcement learning using model-guided demonstration. IEEE Trans. Neural Netw. Learn. Syst. 2021, 32, 2358–2370. [Google Scholar] [CrossRef]
  32. He, L.; Zhang, J.; Hou, Y.; Liang, X.; Bai, P. Time-varying formation control for UAV swarm with directed interaction topology and communication delay. J. Beijing Univ. Aeronaut. Astronaut. 2020, 46, 314–323. [Google Scholar] [CrossRef]
  33. Ji, M.; Li, T.; Liao, J.; Yang, X. Dynamic event-triggered formation control for UAVs under communication delay and outside disturbances. Trans. Inst. Meas. Control 2023, 45, 1561–1572. [Google Scholar] [CrossRef]
  34. He, S.; Wang, M.; Dai, S.-L.; Luo, F. Leader-follower formation control of USVs with prescribed performance and collision avoidance. IEEE Trans. Ind. Inform. 2019, 15, 572–581. [Google Scholar] [CrossRef]
  35. Mellinger, D.; Kumar, V. Minimum snap trajectory generation and control for quadrotors. In Proceedings of the 2011 IEEE International Conference on Robotics and Automation, Shanghai, China, 9–13 May 2011; IEEE: New York, NY, USA, 2011; pp. 2520–2525. [Google Scholar] [CrossRef]
  36. Xu, T.; Liu, J.; Zhang, Z.; Chen, G.; Cui, D.; Li, H. Distributed MPC for trajectory tracking and formation control of multi-UAVs with leader-follower structure. IEEE Access 2023, 11, 128762–128773. [Google Scholar] [CrossRef]
  37. ArduPilot Dev Team. MAVLink RC Input. In ArduPilot Developer Documentation; ArduPilot Team: New York, NY, USA, 2025; Available online: https://ardupilot.org/dev/docs/mavlink-rcinput.html (accessed on 27 January 2026).
  38. Liu, H.; Ma, T.; Lewis, F.L.; Wan, Y. Robust formation trajectory tracking control for multiple quadrotors with communication delays. IEEE Trans. Control Syst. Technol. 2020, 28, 2633–2640. [Google Scholar] [CrossRef]
  39. Wang, B.; Ashrafiuon, H.; Nersesov, S. Leader–follower formation stabilization and tracking control for heterogeneous planar underactuated vehicle networks. Syst. Control Lett. 2021, 156, 105008. [Google Scholar] [CrossRef]
  40. Lin, P.-T. 3-UAV Leader-Follower Formation Control Experiment. Video Clip. Available online: https://youtu.be/Lkw3RAzS-Io?si=Shk48PQLNZEiFS97 (accessed on 28 March 2026).
  41. Walter, V.; Staub, N.; Franchi, A.; Saska, M. UVDAR system for visual relative localization with application to leader–follower formations of multirotor UAVs. IEEE Robot. Automat. Lett. 2019, 4, 2637–2644. [Google Scholar] [CrossRef]
  42. Gu, Z.; Song, B.; Fan, Y.; Chen, X. Design and verification of UAV formation controller based on leader-follower method. In Proceedings of the 7th International Conference on Automation, Control and Robotics Engineering (CACRE), Xi’an, China, 14–16 July 2022; IEEE: New York, NY, USA, 2022. [Google Scholar] [CrossRef]
Figure 1. UAV formation mission. The blue and black arrows indicate the flight directions of the followers and the leader, respectively, and the red lines represent the Wi-Fi communication between them.
Figure 1. UAV formation mission. The blue and black arrows indicate the flight directions of the followers and the leader, respectively, and the red lines represent the Wi-Fi communication between them.
Drones 10 00286 g001
Figure 2. An inner and outer control loop for executing a flight mission.
Figure 2. An inner and outer control loop for executing a flight mission.
Drones 10 00286 g002
Figure 3. UAV swarm integration framework.
Figure 3. UAV swarm integration framework.
Drones 10 00286 g003
Figure 4. (a) UAV-centric coordinates [29] (b). UAV and mission coordinates [29].
Figure 4. (a) UAV-centric coordinates [29] (b). UAV and mission coordinates [29].
Drones 10 00286 g004
Figure 5. (a) UAV braking parameter design. (b) Diagram of UAV plane control logic.
Figure 5. (a) UAV braking parameter design. (b) Diagram of UAV plane control logic.
Drones 10 00286 g005
Figure 6. A triangular formation example for the UAV formation simulator.
Figure 6. A triangular formation example for the UAV formation simulator.
Drones 10 00286 g006
Figure 7. UAV formation simulator flowchart.
Figure 7. UAV formation simulator flowchart.
Drones 10 00286 g007
Figure 8. Experiment process.
Figure 8. Experiment process.
Drones 10 00286 g008
Figure 9. Field display video of UAV formation control [40].
Figure 9. Field display video of UAV formation control [40].
Drones 10 00286 g009
Figure 10. Step response of throttle control versus time.
Figure 10. Step response of throttle control versus time.
Drones 10 00286 g010
Figure 11. Step response of yaw control versus time.
Figure 11. Step response of yaw control versus time.
Drones 10 00286 g011
Figure 12. The horizontal flight trajectories of leader and follower UAVs. (a) Relative north–east coordinates, and (b) the distance analysis versus time.
Figure 12. The horizontal flight trajectories of leader and follower UAVs. (a) Relative north–east coordinates, and (b) the distance analysis versus time.
Drones 10 00286 g012
Figure 13. Formation control of one leader and two followers over time. The numbers represent their order of occurrence on the timeline, and the symbols (star, triangle, square) indicate the positions of the three UAVs at the time instants. The hexarotor and quadrotor followers are positioned 7.07   m southeast and southwest of the leader, respectively.
Figure 13. Formation control of one leader and two followers over time. The numbers represent their order of occurrence on the timeline, and the symbols (star, triangle, square) indicate the positions of the three UAVs at the time instants. The hexarotor and quadrotor followers are positioned 7.07   m southeast and southwest of the leader, respectively.
Drones 10 00286 g013
Figure 14. Evolution of positions and position errors over time for the two followers (left: hexaroter; right: quadrotor). From top to bottom shows the positions on north–south (N–S), east–west (E–W), and altitude axes, respectively. The dotted lines in N–S and E–W plots are the target GPS position, and the dash-dotted curves are the actual GPS position. They show a response time delay, which can be determined by locating the maximum of the correlation function between the two curves. After time offset, the spatial path fidelity errors are plotted at the bottom.
Figure 14. Evolution of positions and position errors over time for the two followers (left: hexaroter; right: quadrotor). From top to bottom shows the positions on north–south (N–S), east–west (E–W), and altitude axes, respectively. The dotted lines in N–S and E–W plots are the target GPS position, and the dash-dotted curves are the actual GPS position. They show a response time delay, which can be determined by locating the maximum of the correlation function between the two curves. After time offset, the spatial path fidelity errors are plotted at the bottom.
Drones 10 00286 g014
Figure 15. Spatial paths based on actual GPS positions of the two followers, and comparison with the target paths. (Left) Hexarotor and (Right) quadrotor.
Figure 15. Spatial paths based on actual GPS positions of the two followers, and comparison with the target paths. (Left) Hexarotor and (Right) quadrotor.
Drones 10 00286 g015
Figure 16. Experiment and simulation results.
Figure 16. Experiment and simulation results.
Drones 10 00286 g016
Figure 17. Histogram of UDP inter-packet arrival time in the controlled test scenario in Section 5.3.3.
Figure 17. Histogram of UDP inter-packet arrival time in the controlled test scenario in Section 5.3.3.
Drones 10 00286 g017
Table 1. Range of control parameters [37].
Table 1. Range of control parameters [37].
ParameterLowerHoldUpper
MedianDead Zone
Roll1100~1480
Roll Left
1500201520~1900
Roll Right
Pitch1100~1480
Forward
1500201520~1900
Backward
Throttle1100~1400
Downward
15001001600~1900
Upward
Yaw1100~1480
CCW *
1500201520~1900
CW *
* CCW: counterclockwise; CW: clockwise.
Table 2. Experimental data example.
Table 2. Experimental data example.
Acceleration   ( m / s 2 ) Velocity   ( m / s ) Pitch Input
0.6251041.8921971412
0.6490051.8848381412
0.6477491.8766251412
0.6649541.8726921412
0.7056881.8726921412
0.7507131.8583531412
0.8073211.8540061412
0.8516021.8459991412
0.8925991.8288911412
0.9197971.8386311412
Table 3. Control parameter coefficients.
Table 3. Control parameter coefficients.
ParameterParameter to AccelerationParameter to Velocity
Roll R a = 0.0098   m / s 2 R v = 0.027   m / s
Pitch P a = 0.0098   m / s 2 P v = 0.027   m / s
Throttle T a = 0.0037   m / s 2 T v = 0.0022   m / s
Yaw Y a = 0.033   r a d / s 2 Y v = 0.4   r a d / s
Table 4. Statistics of formation errors of two follower UAVs.
Table 4. Statistics of formation errors of two follower UAVs.
Statistics of Position Errors (Unit: m)HexarotorQuadrotor
Position error without time delay compensationMAE3.373.03
RMSE4.354.16
95%9.409.15
Spatial path fidelity errorMAE0.640.50
RMSE0.750.65
95%1.401.36
Table 5. Literature comparison.
Table 5. Literature comparison.
WorkSensorUAVsError
(cm)
Conv. Time (s) Speed
(m/s)
Update Rate (Hz)Area Size
[41]UVDAR2 Quad20–50N/ALow10–15Outdoor
[42]UWB3 QuadN/A5–10N/A20Simulation
ProposedGPS2 Hexa
1 Quad
50<51–210 40   m 2
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Lin, P.-T.; Wu, R.-B.; Chang, S.-C. Leader–Follower UAV Formation Control with Cost-Effective Coordination and Pre-Flight Simulation. Drones 2026, 10, 286. https://doi.org/10.3390/drones10040286

AMA Style

Lin P-T, Wu R-B, Chang S-C. Leader–Follower UAV Formation Control with Cost-Effective Coordination and Pre-Flight Simulation. Drones. 2026; 10(4):286. https://doi.org/10.3390/drones10040286

Chicago/Turabian Style

Lin, Ping-Tse, Ruey-Beei Wu, and Shi-Chung Chang. 2026. "Leader–Follower UAV Formation Control with Cost-Effective Coordination and Pre-Flight Simulation" Drones 10, no. 4: 286. https://doi.org/10.3390/drones10040286

APA Style

Lin, P.-T., Wu, R.-B., & Chang, S.-C. (2026). Leader–Follower UAV Formation Control with Cost-Effective Coordination and Pre-Flight Simulation. Drones, 10(4), 286. https://doi.org/10.3390/drones10040286

Article Metrics

Back to TopTop