In recent years, the rapid advancement of unmanned aerial vehicle (UAV) technology has propelled multi-drone formation control into a focal point of research. As a researcher in this field, I have explored various approaches to achieve efficient and robust drone formation. Among these, formation control based on distance constraints offers significant advantages, as it requires minimal global information and reduces computational load, making it suitable for environments with limited GPS access, such as indoor navigation or search-and-rescue missions. This article presents a comprehensive study on a distance-based second-order consensus formation control method for quadrotor UAVs, detailing the kinematic modeling, control algorithm design, simulation results, and experimental validation. Throughout this work, the term ‘drone formation’ is emphasized to highlight the core objective of coordinating multiple UAVs into cohesive patterns.
The fundamental challenge in drone formation control lies in maintaining or reconfiguring formations according to task requirements or environmental changes. Traditional methods include leader-follower, virtual structure, behavior-based, and consensus-based approaches, each with distinct control structures—centralized, decentralized, or distributed. Based on perceptual capabilities, formation control can be categorized into position-based, displacement-based, and distance-based control. Distance-based control is particularly practical because drones only need to sense relative positions in their local coordinate systems, specified by inter-agent distances. This reduces reliance on global positioning systems and enhances scalability. In this context, I propose a distance-based second-order consensus algorithm for quadrotor drone formation, which extends beyond first-order models to better reflect real-world dynamics. The algorithm ensures that drones maintain desired inter-agent distances while achieving velocity consensus, ultimately forming stable formations.
To begin, I establish the kinematic model of a quadrotor UAV, which serves as the basis for control design. Quadrotors are underactuated systems with four inputs (motor thrusts) and six outputs (positions and attitudes). I consider an ‘X’-type frame for its improved maneuverability compared to the ‘+’ type. Two coordinate systems are defined: the Earth-fixed frame \(O_e X_e Y_e Z_e\) and the body-fixed frame \(O_b X_b Y_b Z_b\). The rotation matrix \(R_{b2g} \in \mathbb{R}^{3 \times 3}\) transforms vectors from the body frame to the Earth frame, given by:
$$R_{b2g} = \begin{bmatrix}
\cos \theta \cos \psi & \sin \phi \sin \theta \cos \psi – \cos \phi \sin \psi & \cos \phi \sin \theta \cos \psi + \sin \phi \sin \psi \\
\cos \theta \sin \psi & \sin \phi \sin \theta \sin \psi + \cos \phi \cos \psi & \cos \phi \sin \theta \sin \psi – \sin \phi \cos \psi \\
-\sin \theta & \sin \phi \cos \theta & \cos \phi \cos \theta
\end{bmatrix}$$
where \(\phi\), \(\theta\), and \(\psi\) represent roll, pitch, and yaw angles, respectively. The thrust generated by each propeller is proportional to the square of its rotational speed:
$$T_i = K_p \cdot \omega_i^2, \quad i = 1,2,3,4$$
Here, \(T_i\) is the thrust force, \(K_p\) is the proportionality constant between PWM signals and motor speed, and \(\omega_i\) is the angular velocity. The motor speed depends on the KV rating and voltage: \(N = KV \cdot U\) and \(\omega_i = \frac{2\pi N}{60}\). For formation control, I focus on motion in the \(X_e\)-\(Y_e\) plane while maintaining a constant altitude. Assuming the total vertical thrust balances gravity (\(T_{Z_b} = mg\)), the forces in the body frame are \(T_{X_b} = 0\), \(T_{Y_b} = 0\), and \(T_{Z_b} = T_1 + T_2 + T_3 + T_4\). Transforming to the Earth frame and accounting for air resistance, the equations of motion are:
$$\begin{aligned}
m\ddot{p}_x &= (\cos \phi \sin \theta \cos \psi + \sin \phi \sin \psi) T_{Z_b} – K_1 \dot{p}_x \\
m\ddot{p}_y &= (\cos \phi \sin \theta \sin \psi – \sin \phi \cos \psi) T_{Z_b} – K_2 \dot{p}_y \\
m\ddot{p}_z &= (\cos \phi \cos \theta) T_{Z_b} – K_3 \dot{p}_z – mg
\end{aligned}$$
where \(p_x, p_y, p_z\) are positions in the Earth frame, \(K_1, K_2, K_3\) are drag coefficients, and \(g\) is gravitational acceleration. For drone formation at a fixed height, I set \(\ddot{p}_z = 0\) and control \(p_x\) and \(p_y\) via the formation algorithm, ignoring attitude dynamics for simplicity, as position and velocity consensus are primary concerns in formation control.

The core of my approach is a distance-based second-order consensus algorithm for drone formation. Consider a multi-agent system with \(n\) drones, each modeled as a double-integrator:
$$\begin{aligned}
\dot{x}_i &= v_{x_i}, \quad \dot{y}_i = v_{y_i} \\
\dot{v}_{x_i} &= u_{x_i}, \quad \dot{v}_{y_i} = u_{y_i}, \quad i = 1,2,\dots,n
\end{aligned}$$
where \(x_i, y_i\) are positions, \(v_{x_i}, v_{y_i}\) are velocities, and \(u_{x_i}, u_{y_i}\) are control inputs. The standard second-order consensus protocol is:
$$\begin{aligned}
u_{x_i} &= -\sum_{j=1}^n a_{ij} \left[ (x_i – x_j) + \gamma (v_{x_i} – v_{x_j}) \right] \\
u_{y_i} &= -\sum_{j=1}^n a_{ij} \left[ (y_i – y_j) + \gamma (v_{y_i} – v_{y_j}) \right]
\end{aligned}$$
with \(a_{ij}\) as the adjacency matrix entry of the communication graph \(G_n\), and \(\gamma > 0\) a gain constant. For drone formation, I incorporate desired positions and velocities to achieve a specific pattern. Let \(x_i^d, y_i^d\) and \(v_{x_i}^d, v_{y_i}^d\) be the desired states for drone \(i\), satisfying a reference model \(\dot{x}^d = v_{x}^d\), \(\dot{y}^d = v_{y}^d\), \(\dot{v}_{x}^d = f(t, x^d, v_{x}^d)\), \(\dot{v}_{y}^d = f(t, y^d, v_{y}^d)\). The proposed control law is:
$$\begin{aligned}
u_{x_i} &= w_{x_i} – k \sum_{j=1}^n a_{ij} \left[ (x_i – x_i^d) – (x_j – x_j^d) + \gamma \left( (v_{x_i} – v_{x_i}^d) – (v_{x_j} – v_{x_j}^d) \right) \right] \\
u_{y_i} &= w_{y_i} – k \sum_{j=1}^n a_{ij} \left[ (y_i – y_i^d) – (y_j – y_j^d) + \gamma \left( (v_{y_i} – v_{y_i}^d) – (v_{y_j} – v_{y_j}^d) \right) \right]
\end{aligned}$$
where:
$$\begin{aligned}
w_{x_i} &= \dot{v}_{x_i}^d – \alpha \left[ \beta (x_i – x_i^d) + \gamma (v_{x_i} – v_{x_i}^d) \right] \\
w_{y_i} &= \dot{v}_{y_i}^d – \alpha \left[ \beta (y_i – y_i^d) + \gamma (v_{y_i} – v_{y_i}^d) \right]
\end{aligned}$$
and \(\alpha, \beta, \gamma, k > 0\) are control parameters. This algorithm ensures that each drone tracks its desired trajectory while maintaining consensus with neighbors. The key innovation is the distance constraint: for a desired drone formation, the inter-agent distances \(d_{ij} = \sqrt{(x_i – x_j)^2 + (y_i – y_j)^2}\) should converge to specified values \(d_{ij}^*\). By setting \(x_i^d, y_i^d\) appropriately, the formation achieves these distances. For instance, in a diamond formation, drones are positioned at vertices with specific pairwise distances. The communication topology is fixed and represented by a graph; for \(n=4\) drones, I use an all-to-all connected graph with adjacency matrix:
$$A = \begin{bmatrix}
0 & 1 & 1 & 1 \\
1 & 0 & 1 & 1 \\
1 & 1 & 0 & 1 \\
1 & 1 & 1 & 0
\end{bmatrix}$$
This symmetric structure facilitates information exchange and enhances formation stability. The control system architecture integrates the consensus controller with the quadrotor dynamics, as shown in the following table summarizing the components:
| Component | Description | Role in Drone Formation |
|---|---|---|
| Kinematic Model | Quadrotor equations of motion | Provides dynamic basis for control |
| Consensus Controller | Distance-based second-order algorithm | Computes control inputs for formation |
| Communication Graph | Fixed topology with adjacency matrix | Enables inter-drone information flow |
| Distance Constraint | Desired inter-agent distances \(d_{ij}^*\) | Defines target formation geometry |
To validate the proposed drone formation control method, I conducted numerical simulations in MATLAB/Simulink and hardware-in-the-loop (HITL) experiments using the Rflysim platform. The simulation parameters are listed below, chosen to reflect realistic quadrotor characteristics:
| Parameter | Value | Description |
|---|---|---|
| Mass \(m\) | 2 kg | Quadrotor weight |
| Gravity \(g\) | 9.80 m/s² | Acceleration due to gravity |
| Thrust coefficient \(K_p\) | 7.82 × 10⁻⁶ | PWM to thrust proportionality |
| Drag coefficients \(K_1, K_2, K_3\) | 2.5 each | Air resistance factors |
| Control gains \(\alpha, \beta, \gamma, k\) | 0.1, 2, 10, 0.01 | Consensus algorithm parameters |
| Initial positions \((x_0, y_0, z_0)\) | Varies per drone | Starting coordinates |
| Hover altitude | 10 m | Fixed height for formation |
In the simulation, four drones start from different initial positions, take off to a 10 m altitude, hover, and then form a diamond formation in the \(X\)-\(Y\) plane. The desired positions for the diamond are \(x^d = [5, 3, 3, 1]\) m and \(y^d = [0, 1, -1, 0]\) m, corresponding to inter-drone distances of \(\sqrt{5}\) m and \(\sqrt{8}\) m. After maintaining this drone formation, a reconfiguration to a line formation is commanded at \(t = 40\) s, with desired positions \(x^d = [7, 5, 3, 1]\) m and \(y^d = [0, 0, 0, 0]\) m. The results demonstrate that positions and velocities converge to consensus, with distances matching the desired values. Specifically, the position errors \(e_{x_i} = x_i – x_i^d\) and \(e_{y_i} = y_i – y_i^d\) approach zero, and velocities align to zero for static formations. The following equations summarize the convergence metrics:
$$\lim_{t \to \infty} \| x_i(t) – x_j(t) – (x_i^d – x_j^d) \| = 0, \quad \lim_{t \to \infty} \| v_{x_i}(t) – v_{x_j}(t) \| = 0$$
and similarly for \(y\)-components. The distance constraint is evaluated as \(d_{ij} = \sqrt{(x_i – x_j)^2 + (y_i – y_j)^2}\), which converges to \(d_{ij}^*\) within tolerance. For the diamond formation, the theoretical distances are computed from desired positions; for example, between drones 1 and 2: \(d_{12}^* = \sqrt{(5-3)^2 + (0-1)^2} = \sqrt{5}\) m. Simulation data shows actual distances stabilizing at these values, confirming formation accuracy.
The hardware-in-the-loop experiments on Rflysim involved configuring Pixhawk flight controllers in HITL mode, connecting them to a simulation environment, and monitoring via QGroundControl. The real-time 3D visualization in UE4 depicted the drone formation process: initialization, diamond formation, line reformation, and landing. The experimental results aligned with simulations, proving the feasibility of the algorithm in real-world scenarios. Key performance indicators, such as settling time and overshoot, are tabulated below for both formations:
| Formation Type | Settling Time (s) | Max Position Error (m) | Velocity Consensus Error (m/s) |
|---|---|---|---|
| Diamond | ~20 | 0.05 | 0.02 |
| Line | ~20 | 0.04 | 0.01 |
These results underscore the effectiveness of the distance-based consensus approach in achieving precise drone formation. The algorithm’s independence from quadrotor-specific dynamics allows generalization to other platforms like unmanned ground vehicles or surface vessels, provided they follow double-integrator models. In practice, the drone formation controller can be extended to handle obstacles or dynamic environments by incorporating adaptive distance constraints, though this is beyond the current scope.
In conclusion, the distance-based second-order consensus formation control method offers a robust solution for multi-drone coordination. By leveraging relative distance measurements and local communication, it reduces global information dependency and enhances scalability. The kinematic modeling, control design, and extensive validation through simulations and HITL experiments confirm its efficacy. Future work could explore time-varying formations, fault tolerance in communication, and integration with obstacle avoidance algorithms. As drone formation technology evolves, such distributed control strategies will be crucial for applications ranging from aerial light shows to military surveillance, paving the way for autonomous swarm operations.
To further illustrate the mathematical foundations, consider the Lyapunov stability analysis for the consensus algorithm. Define the error states \(\tilde{x}_i = x_i – x_i^d\) and \(\tilde{v}_{x_i} = v_{x_i} – v_{x_i}^d\), and similarly for \(y\)-components. The closed-loop dynamics can be written in vector form: \(\dot{\tilde{\mathbf{x}}} = \tilde{\mathbf{v}}\), \(\dot{\tilde{\mathbf{v}}} = -k L \tilde{\mathbf{x}} – k \gamma L \tilde{\mathbf{v}} – \alpha \beta \tilde{\mathbf{x}} – \alpha \gamma \tilde{\mathbf{v}}\), where \(L\) is the Laplacian matrix of the communication graph. For a connected graph, \(L\) is positive semi-definite, and by choosing gains \(\alpha, \beta, \gamma, k > 0\), the system is exponentially stable, ensuring consensus. This theoretical guarantee underpins the practical success in drone formation scenarios.
Additionally, the scalability of the method is evident from the decentralized nature: each drone computes its control input using only neighbor information, making the drone formation system resilient to individual failures. For large-scale drone formation, the communication topology can be designed as a spanning tree or mesh to balance efficiency and robustness. The distance constraints can be encoded in a rigidity theory framework, where the formation is uniquely determined by inter-drone distances, up to translation and rotation. This aligns with the concept of distance-based control, providing a solid geometric foundation.
In summary, this article has presented a thorough investigation into drone formation control via distance-based second-order consensus. From model derivation to experimental validation, the work demonstrates a viable path toward reliable multi-UAV systems. As research progresses, I anticipate further refinements that will enable complex drone formation maneuvers in diverse environments, ultimately contributing to the advancement of autonomous aerial networks.
