Design of Drone Formation Control Algorithm Based on Consensus Theory

With the rapid advancement of science and technology, the complexity of tasks performed by drones has increased significantly. A single drone is often inadequate to meet the diverse and dynamic mission requirements, making the use of multi-drone formations a prevailing trend for executing complex tasks. In this paper, we focus on the problem of cooperative flight in drone formations. Based on consensus theory, we design a distributed control protocol for formation maintenance, derive the cooperative control laws for drones, and validate the control strategy through simulations in the Matlab/Simulink environment. Using a realistic six-degree-of-freedom (6-DOF) model of drones, we conduct comprehensive simulations to verify the proposed algorithms and control strategies. The simulation results demonstrate that the designed control laws effectively ensure the maintenance of drone formation, highlighting the robustness and applicability of the approach in practical scenarios.

Drones, or unmanned aerial vehicles (UAVs), are pilotless aircraft controlled either autonomously by onboard computers or remotely via radio signals, designed to perform specific tasks. Compared to manned aircraft, drones offer numerous advantages, including high maneuverability, low cost, simplicity of operation, and enhanced efficiency. Consequently, drones have found widespread applications in various fields such as border patrol, disaster monitoring, battlefield reconnaissance, and targeted attacks. The concept of multi-drone formation refers to a group of autonomously controlled drones flying in a predefined three-dimensional formation, capable of dynamically adjusting the formation shape according to mission requirements. This adaptability improves the flexibility and effectiveness of drone formations in executing tasks. The coordinated control of drone formations has become a hotspot in recent research and represents a future direction for drone development. Despite the superior advantages of multi-drone formations over single drones, practical engineering applications face challenges such as communication delays between drones, safety concerns during formation flight, and the complexities involved in formation assembly, maintenance, transformation, and dissolution. Addressing these issues, this paper studies control algorithms for multi-drone formations using small drones as the research object, aiming to provide theoretical foundations for autonomous cooperative formation control and offer practical value in real-world applications.

In multi-drone formation systems, consensus theory is employed to describe the communication relationships among drones, enabling overall system modeling and the design of consensus protocols to achieve desired formation steady states. Consensus theory is an emerging intelligent algorithm known for its simple structure, low computational load, ease of optimization, and practical implementability. In recent years, it has been widely applied in multi-agent cooperative control, particularly in drone formation flight control. The definition of consensus involves all agents in a multi-agent system gradually converging to agreement on certain states over time. For a system with $n$ agents, where the state of the $i$-th agent is denoted by $x_i$, consensus is achieved when $||x_i – x_j|| \to 0$ as $t \to \infty$ for all $i \neq j$. A consensus protocol describes the process of information exchange among agents, detailing how each agent interacts with others.

Consensus theory is developed based on graph theory and matrix theory. Directed or undirected graphs can succinctly and effectively describe information interactions among multi-agents, facilitating overall modeling of formation systems. For a system containing $n$ agents, a graph $G = (V, E)$ is used to represent information interactions, where $V = \{v_1, \cdots, v_n\}$ is a finite non-empty set of nodes, each representing an agent, and $E = \{e_1, \cdots, e_m\} \subseteq V \times V$ is the set of edges between node pairs, describing communication between agents. Consider a multi-agent system with $n$ agents, each as a vertex in graph $G$, and information interactions as edges. For a first-order agent system, the mathematical model is given by:

$$ \dot{\xi}_i(t) = u_i(t) $$

The standard consensus algorithm for a first-order integral system is designed as:

$$ u_i(t) = -\sum_{j \in N_i} a_{ij} [\xi_i(t) – \xi_j(t)] $$

where $a_{ij}$ is the element at position $(i, j)$ in the adjacency matrix $A$ at time $t$. For first-order systems, the stability criterion is straightforward: under time-invariant conditions, the system can achieve stability if and only if the directed communication topology contains a spanning tree. In practical scenarios, first-order systems may not sufficiently describe actual system dynamics, as many agents’ state equations can be simplified to second-order integral systems. For example, a second-order system is represented as:

$$ \begin{align*} \dot{\xi}_i &= \zeta_i \\ \dot{\zeta}_i &= u_i \end{align*} $$

where $i$ denotes the number of agents in the integral system, $\xi_i$ and $\zeta_i$ are the state variables of the $i$-th agent, and $u_i$ is the control input. The basic consensus algorithm for second-order systems is:

$$ u_i(t) = -\sum_{j \in N_i} a_{ij} [\xi_i(t) – \xi_j(t) + \gamma(t) (\zeta_i(t) – \zeta_j(t))] $$

where $a_{ij}$ is the element at $(i, j)$ in the adjacency matrix $A$ at time $t$, and $\gamma(t)$ is a positive proportionality coefficient at any time $t$. In drone formation systems, $a_{ij}$ represents the communication relationship between drone $U_i$ and drone $U_j$; $a_{ij} = 1$ if information from $U_i$ is transmitted to $U_j$, otherwise $a_{ij} = 0$. For all initial conditions $\xi_i(0)$ and $\zeta_i(0)$, when $t \to \infty$, if $||\xi_i(t) – \xi_j(t)|| \to 0$ and $||\zeta_i(t) – \zeta_j(t)|| \to 0$, then the drone formation system achieves consensus. To summarize the key formulas, Table 1 provides an overview of the consensus protocols.

Table 1: Summary of Consensus Protocols for Drone Formation
System Order State Equations Consensus Protocol Stability Condition
First-order $\dot{\xi}_i(t) = u_i(t)$ $u_i(t) = -\sum_{j \in N_i} a_{ij} [\xi_i(t) – \xi_j(t)]$ Directed topology with spanning tree
Second-order $\dot{\xi}_i = \zeta_i$, $\dot{\zeta}_i = u_i$ $u_i(t) = -\sum_{j \in N_i} a_{ij} [\xi_i(t) – \xi_j(t) + \gamma(t) (\zeta_i(t) – \zeta_j(t))]$ Convergence of states to zero

The flight of drone formation requires each drone to form a specific formation according to given mission requirements, maintaining particular distances between drones to create a cohesive moving entity. During task execution, the ability to maintain formation is paramount. Drone formation flight is accomplished based on individual drone information and inter-drone information exchange. Before presenting the control laws for single drones and formations, a complete drone model must be established. Using a 6-DOF model for drones in formation closely aligns with practical scenarios. The drone formation maintenance control system consists of two parts: the formation maintenance controller system and the drone attitude control system. The structure of the drone formation control system is illustrated in Figure 1, where formation commands and trajectory instructions are processed by the formation maintenance controller to generate attitude commands, which are then tracked by the attitude controller to adjust control surfaces and throttle.

The attitude control system for drones takes desired attitude angles as input and adjusts deviations in longitudinal, lateral, and speed channels to achieve attitude control. PID control is widely used in engineering due to its simplicity, robustness, and strong anti-interference capabilities. Therefore, we employ PID controllers to design control laws for the drone attitude system. For fixed-wing drones, the short-period motion pitch rate can be approximated as a second-order system. To preserve the fast dynamics of the inner loop, proportional-integral (PI) control is used. The yaw angle loop controls the drone’s heading, crucial for formation maintenance, and uses proportional-integral-derivative (PID) control. The speed loop in the inner cycle adjusts engine thrust via throttle control, employing PID control for precise speed regulation. The parameters for these PID controllers can be tuned based on drone dynamics, as summarized in Table 2.

Table 2: PID Controller Parameters for Drone Attitude Control
Control Loop Control Type Typical Gains (Proportional, Integral, Derivative) Remarks
Pitch Rate PI $K_p = 1.2$, $K_i = 0.5$ Ensures short-period stability
Yaw Angle PID $K_p = 0.8$, $K_i = 0.3$, $K_d = 0.1$ Critical for heading accuracy in drone formation
Speed PID $K_p = 0.5$, $K_i = 0.2$, $K_d = 0.05$ Maintains consistent velocity across formation

In multi-drone formation, maintaining a reasonable formation expands mission scope, reduces execution time, and improves efficiency. Drone formation shapes are not static; they require dynamic adjustments based on mission needs and drone conditions. Formation shapes primarily include fixed formations and free formations. Fixed formations involve fixed distances and geometric constraints between drones, such as parallel, column, diamond, and wedge formations, with more complex shapes derivable from these basics. Free formations have no fixed constraints, allowing drones to fly without collisions. Formation maintenance is the core of formation control, as formation transformation, assembly, and dissolution all rely on it. Once the multi-drone formation is determined, the positional relationships between drones are established. Accurately describing these relationships is essential for formation control. Based on a given formation reference point, the matrix describing the distance of drones from the reference point is:

$$ F = \begin{bmatrix} F_1 \\ F_2 \\ \vdots \\ F_n \end{bmatrix} = \begin{bmatrix} \|L_{F1d}\| \\ \|L_{F2d}\| \\ \vdots \\ \|L_{Fnd}\| \end{bmatrix} \begin{bmatrix} \theta_{1d} \\ \theta_{2d} \\ \vdots \\ \theta_{nd} \end{bmatrix} \begin{bmatrix} \psi_{1d} \\ \psi_{2d} \\ \vdots \\ \psi_{nd} \end{bmatrix} $$

where $i$ denotes the $i$-th drone, $L_{Fid} = (x_{Fid}, y_{Fid}, z_{Fid})^T$ is the distance that drone $U_i$ should maintain from the formation reference point $F$, $\theta_{id}$ is the vertical angle to maintain, and $\psi_{id}$ is the planar angle. Using consensus algorithms to design drone control laws requires selecting appropriate cooperative variables. Controlling these variables is central to consensus theory, offering significant advantages in practical applications, such as ease of adding or removing drones from the formation by modifying corresponding cooperative variables. Formation maintenance demands consensus in drone position, velocity, and attitude. We choose position and velocity as cooperative variables for control, but since drone positions cannot overlap directly, the position cooperative variable is defined as $P_i^C = (x_i^C, y_i^C, z_i^C)^T$. This variable is computed by each drone and converges to the same value at steady state. The detailed explanation is as follows: according to the matrix, the predefined coordinates relative to the reference point are:

$$ \begin{align*} x_{iF} &= x_F – \|L_{Fid}\| \cos \theta_{id} \cos \psi_{id} \\ y_{iF} &= y_F – \|L_{Fid}\| \cos \theta_{id} \sin \psi_{id} \\ z_{iF} &= z_F – \|L_{Fid}\| \sin \theta_{id} \end{align*} $$

where $L_i$ is the current coordinate of the drone, and $L_{Fid}$ is the formation constraint. At steady state, each drone achieves the given distance from the reference point, and combining this with its own coordinates yields the position consensus variable for control system design. Using second-order consensus algorithms, the control law for drones is designed as:

$$ \begin{align*} \dot{V}_{gxi} &= -\sum_{j \in N_i} a_{ij} [x_i^C – x_j^C – \gamma \dot{x}_{ij}] \\ \dot{V}_{gyi} &= -\sum_{j \in N_i} a_{ij} [y_i^C – y_j^C – \gamma \dot{y}_{ij}] \\ \dot{V}_{gzi} &= -\sum_{j \in N_i} a_{ij} [z_i^C – z_j^C – \gamma \dot{z}_{ij}] \end{align*} $$

In the initial formation stage, drone states are not consensus, so the cooperative variables differ among drones. The above equations provide velocity commands in the ground coordinate system, controlling velocities along three axes to achieve formation stability and consensus in cooperative variables. Since acceleration along three axes cannot be directly used as control input—actual inputs are angle commands—we convert velocity commands to angle instructions using relationships between pitch, yaw angles, and velocity. This conversion yields the input commands for the control system, enabling precise formation control in drone formation scenarios.

To verify the algorithm’s effectiveness, we present a simulation example with three drones in a V-formation. In Matlab/Simulink, we build models for three drones and the overall formation system. The formation model consists of three drone models and a formation controller model. Each drone model includes modules for attitude control laws, aerodynamic force calculation, and output. The three drones are homogeneous with identical parameters. The formation controller module includes inputs for each drone and a guidance module built with S-functions, transmitting computed attitude angle commands to the three drones. The simulation parameters are summarized in Table 3.

Table 3: Simulation Parameters for Drone Formation
Parameter Value Description
Number of Drones 3 Homogeneous fixed-wing drones
Formation Shape V-formation Also known as wedge formation
Initial Positions $(0,0,500)$ m, $(10,0,500)$ m, $(-10,0,500)$ m Small offsets to test convergence
Desired Formation Distances: $L_{Fid} = (5,5,0)$ m Relative to reference point
Communication Topology Undirected ring Each drone communicates with two neighbors
Consensus Gain $\gamma$ 0.5 Constant for simplicity
Simulation Time 150 seconds Sufficient for steady-state analysis

The simulation results demonstrate the performance of the drone formation control system. Under the action of the consensus formation control protocol, drones can adjust their positions and altitudes by controlling attitude angles and speeds, reducing formation position errors and achieving steady state. The three-dimensional trajectory plot shows drones converging to and maintaining the V-formation, while height and velocity response curves indicate smooth convergence without oscillations. These results validate the control laws’ ability to ensure formation maintenance in drone formation. For instance, the height responses stabilize around the desired altitude of 500 meters, and velocities synchronize to a common value, reflecting consensus in cooperative variables. The effectiveness is further highlighted by the rapid convergence within 50 seconds, showcasing the robustness of the consensus-based approach for drone formation control.

In summary, this paper investigates the drone formation control problem using consensus theory. We design control laws for formation maintenance based on second-order consensus protocols and validate them through simulations with a realistic 6-DOF drone model. The results confirm that the proposed control laws enable drones to achieve and maintain desired formations, emphasizing the practical potential of consensus theory in multi-drone systems. However, due to experimental limitations, the algorithms were verified only in simulation environments without real drone platforms. Future work should incorporate real-world errors and uncertainties, such as wind disturbances, sensor noise, and communication delays, into the simulation models to enhance the generalizability of the formation flight system. Additionally, exploring adaptive consensus protocols for dynamic environments could further improve the resilience and flexibility of drone formation operations. The continuous advancement in drone formation technologies promises to unlock new capabilities in autonomous systems, making them indispensable for complex missions in diverse fields.

The application of consensus theory in drone formation control offers a scalable and efficient framework for coordinating multiple drones. By leveraging distributed protocols, we reduce reliance on central controllers, enhancing system robustness and fault tolerance. Future research directions include extending the approach to heterogeneous drone formations, integrating obstacle avoidance mechanisms, and testing in real-time hardware-in-the-loop simulations. As drone formations become more prevalent, addressing challenges like energy management, swarm intelligence, and human-drone interaction will be crucial. This work contributes to the growing body of knowledge on cooperative control, paving the way for innovative solutions in autonomous drone networks. Ultimately, the success of drone formation systems hinges on interdisciplinary efforts combining control theory, robotics, and communication engineering, driving progress toward smarter and more adaptive aerial systems.

Scroll to Top