In recent years, the advancement of military capabilities has necessitated more sophisticated collaborative systems to execute complex operational tasks. Traditional strike weapons often fall short in dynamic environments, leading to the rise of multi-platform cooperative formations as a critical mode of operation. Among these, drone formation control has emerged as a pivotal research direction in multi-system协同 command and control. The ability to coordinate multiple drones in a formation enhances mission efficiency, resilience, and adaptability, making it essential for modern warfare and civilian applications alike. However, achieving precise formation control with minimal information exchange remains a significant challenge, particularly when only a few drones have access to the desired formation parameters. This article explores an affine transformation-based approach to drone formation control, which allows a small subset of informed drones to dictate the geometry and scale of the entire formation, thereby improving feasibility and scalability. We delve into the theoretical foundations, hardware implementation, control algorithms, and experimental validation of this method, emphasizing its practicality for miniature UAVs like the Crazyflie 2.0.
The core idea behind affine transformation-based formation control is to leverage mathematical constructs from rigidity theory to enable flexible and scalable drone formations. In a typical drone formation scenario, each drone must adjust its position relative to others to maintain a specific shape. Traditional methods often rely on global positioning systems or consistent local coordinate alignments, which can be limiting in real-world applications. Our approach addresses these limitations by using affine transformations—which include scaling, rotation, translation, and shearing—to define the formation. By controlling just three drones equipped with different sensors, we can manipulate the entire formation’s shape and orientation, reducing the need for extensive communication and computation. This method is particularly suited for heterogeneous drone swarms where agents have varying sensing capabilities, such as distance, angle, or bearing measurements.
To understand the theoretical underpinnings, we must first consider the graph representation of drone interactions. A formation of drones can be modeled as an undirected graph $\mathcal{G} = (\mathcal{V}, \mathcal{E})$, where $\mathcal{V} = \{1, 2, \dots, n\}$ represents the drones and $\mathcal{E} \subseteq \mathcal{V} \times \mathcal{V}$ denotes the edges indicating communication or sensing links between drones. For each drone $i$, its neighbor set is $\mathcal{N}_i = \{ j \mid (i, j) \in \mathcal{E} \}$. The physical configuration of the formation in Euclidean space is given by $\mathbf{q} = [\mathbf{q}_1^T, \dots, \mathbf{q}_n^T]^T \in \mathbb{R}^{dn}$, where $\mathbf{q}_i \in \mathbb{R}^d$ is the position of drone $i$ in $d$-dimensional space (typically $d=2$ for planar formations). A structure $(\mathcal{G}, \mathbf{q})$ is said to be generic if the coordinates in $\mathbf{q}$ are algebraically independent over the rationals.
Rigidity of a structure is crucial for maintaining formation shape under small perturbations. In our context, we use the concept of universal rigidity, which ensures that the formation can be uniquely determined up to affine transformations. This is characterized by the stress matrix $\Omega \in \mathbb{R}^{n \times n}$, defined for a structure $(\mathcal{G}, \mathbf{q})$ with edge stresses $\omega_{ij} \in \mathbb{R}$ for each edge $(i, j) \in \mathcal{E}$. The stress matrix entries are given by:
$$ \Omega_{ij} =
\begin{cases}
-\omega_{ij}, & \text{if } i \neq j \text{ and } (i, j) \in \mathcal{E}, \\
\sum_{k \in \mathcal{N}_i} \omega_{ik}, & \text{if } i = j, \\
0, & \text{otherwise}.
\end{cases} $$
A stress vector $\omega = (\dots, \omega_{ij}, \dots)^T$ is called an equilibrium stress if it satisfies:
$$ \sum_{j \in \mathcal{N}_i} \omega_{ij} (\mathbf{q}_j – \mathbf{q}_i) = 0, \quad \forall i \in \{1, \dots, n\}, $$
which can be compactly written as $(\Omega \otimes I_d) \mathbf{q} = 0$, where $\otimes$ denotes the Kronecker product. For a generic configuration $\mathbf{q}$, the structure $(\mathcal{G}, \mathbf{q})$ is universally rigid if the stress matrix $\Omega$ is positive semidefinite and has rank $n – d – 1$. This property ensures that the formation can be maintained under affine transformations, allowing for flexibility in scaling and rotation.
Affine transformations of a configuration $\mathbf{q}$ are defined as the set:
$$ \mathcal{A}(\mathbf{q}) = \{ \mathbf{p} = [\mathbf{p}_1^T, \dots, \mathbf{p}_n^T]^T \mid \mathbf{p}_i = M \mathbf{q}_i + \mathbf{b}, \, M \in \mathbb{R}^{d \times d}, \, \mathbf{b} \in \mathbb{R}^d \}, $$
or equivalently, $\mathcal{A}(\mathbf{q}) = \{ \mathbf{p} = (I_n \otimes M) \mathbf{q} + \mathbf{1}_n \otimes \mathbf{b} \}$. Here, $M$ represents linear transformations such as rotation and scaling, and $\mathbf{b}$ represents translation. A key insight is that the equilibrium stress condition remains invariant under affine transformations, as shown by:
$$ \sum_{j \in \mathcal{N}_i} \omega_{ij} (M \mathbf{q}_i – M \mathbf{q}_j) = M \sum_{j \in \mathcal{N}_i} \omega_{ij} (\mathbf{q}_i – \mathbf{q}_j) = 0. $$
This invariance allows us to design control laws that stabilize the formation up to an affine transformation, enabling seamless formation maneuvers like scaling and rotation with minimal input from informed drones.
To apply this theory in practice, we built a hardware platform using Crazyflie 2.0 miniature drones. These drones are ideal for indoor formation experiments due to their small size (92 mm motor-to-motor diagonal) and lightweight design (27 g with battery). The Crazyflie 2.0 is equipped with an STM32F405RG microcontroller for sensor processing and flight control, and an NRF51822 microcontroller for communication. It features an MPU9250 sensor (3-axis gyroscope, accelerometer, and magnetometer) and an LPS25H barometer for stability. The drone operates on a 170 mAh battery, providing about 7 minutes of flight time. For precise localization, we used a MOTION ANALYSIS motion capture system with multiple cameras that track reflective markers on the drones at millimeter accuracy. The system includes Cortex software for data processing, running on a computer with a 4-core 3.2 GHz CPU, 8 GB RAM, and Windows 7 (64-bit). A ground station equipped with a Crazyradio PA (a 2.4 GHz USB radio adapter) communicates with the drones via the Robot Operating System (ROS) Kinetic framework, enabling real-time control and data exchange. The ground station also receives position data from the motion capture system via TCP/IP protocol. The overall hardware architecture is summarized in the table below:
| Component | Specification | Role |
|---|---|---|
| Crazyflie 2.0 Drone | Size: 92 mm, Weight: 27 g, Sensors: MPU9250, LPS25H | Flight agent with onboard processing |
| Motion Capture System | Millimeter accuracy, Multiple cameras | Real-time position tracking |
| Ground Station | Crazyradio PA, ROS Kinetic, TCP/IP | Control and communication hub |
| Battery | 170 mAh, 7 min flight time | Power source |

Based on the affine formation control framework, we designed a distributed control algorithm that requires only three drones to be informed of the desired formation parameters. These informed drones use mixed control variables—distance and angle measurements—to guide the entire formation. Let $\mathbf{q}_i$ denote the position of drone $i$, and let $\mathbf{u}_i$ be its control input. The control law is as follows:
$$ \begin{cases}
\mathbf{u}_1 = -k_1 (\mathbf{q}_1 – \mathbf{q}_2) \frac{\| \mathbf{q}_1 – \mathbf{q}_2 \|^2 – d_{21}^{*2}}{\| \mathbf{q}_1 – \mathbf{q}_2 \|^2}, \\
\mathbf{u}_2 = -k_2 (\theta_2 – \theta_2^*) \begin{bmatrix} \cos \beta_2 \\ \sin \beta_2 \end{bmatrix} + k_b (\mathbf{b}_{21} – \mathbf{b}_{21}^*), \\
\mathbf{u}_3 = -k_3 (\mathbf{q}_3 – \mathbf{q}_2) \frac{\| \mathbf{q}_3 – \mathbf{q}_2 \|^2 – d_{23}^{*2}}{\| \mathbf{q}_3 – \mathbf{q}_2 \|^2}, \\
\mathbf{u}_i = -k_4 \sum_{j \in \mathcal{N}_i} \omega_{ij} (\mathbf{q}_i – \mathbf{q}_j), \quad \text{for } i = 4, \dots, n,
\end{cases} $$
where $k_1, k_2, k_3, k_4 > 0$ are control gains, $d_{21}^*$ and $d_{23}^*$ are desired distances between drones 2 and 1, and 2 and 3, respectively, $\theta_2$ and $\theta_2^*$ are the actual and desired angles at drone 2 formed by vectors to drones 1 and 3, $\mathbf{b}_{21}$ and $\mathbf{b}_{21}^*$ are the actual and desired bearing vectors from drone 2 to drone 1, and $\omega_{ij}$ are stress coefficients satisfying the equilibrium condition. The terms $\beta_2$ and other geometric parameters are derived from the formation configuration. This control law ensures that drones 1 and 3 maintain desired distances from drone 2, while drone 2 controls the angle and bearing, effectively dictating the formation’s orientation and scale. The remaining drones (4 to $n$) use a consensus-based update driven by the stress matrix, which propagates the formation shape without requiring global information.
The stress coefficients $\omega_{ij}$ are critical for ensuring universal rigidity. They can be computed offline for a given graph $\mathcal{G}$ and desired formation shape. For example, consider a four-drone formation in a square configuration. The stress matrix for such a formation, with drones at positions $\mathbf{q}_1, \mathbf{q}_2, \mathbf{q}_3, \mathbf{q}_4$ forming a square, might have non-zero weights on the edges of the square and its diagonals to guarantee rigidity. The table below illustrates a possible stress assignment for a square formation:
| Edge (i, j) | Stress Coefficient $\omega_{ij}$ |
|---|---|
| (1,2) | 1.0 |
| (2,3) | 1.0 |
| (3,4) | 1.0 |
| (4,1) | 1.0 |
| (1,3) | -0.5 |
| (2,4) | -0.5 |
This assignment ensures that the stress matrix $\Omega$ is positive semidefinite with rank $n – d – 1 = 4 – 2 – 1 = 1$, satisfying universal rigidity for $d=2$. In practice, these coefficients are embedded in the control law for drones 4 to $n$, enabling them to adjust their positions based on local relative measurements.
We conducted real-world experiments to validate the affine formation control algorithm. Using four Crazyflie 2.0 drones, we first established a nominal square formation. The drones were initialized at random positions, and the control law was applied to achieve the desired shape. The motion capture system provided position feedback at 100 Hz, allowing precise control. The formation successfully converged to a square with side length 0.5 meters, as shown in the figure above. Subsequently, we tested formation transformations by modifying the desired parameters for the informed drones. For instance, by changing $d_{21}^*$ and $d_{23}^*$, we scaled the formation to a larger square; by adjusting $\theta_2^*$ and $\mathbf{b}_{21}^*$, we rotated the formation. The drones smoothly transitioned through stretching, rotation, and shearing maneuvers, demonstrating the flexibility of the affine approach. The entire process was completed within the drones’ battery life, with no collisions or instability.
The effectiveness of the drone formation control was quantified by measuring convergence time and position errors. Let $\mathbf{e}_i(t) = \mathbf{q}_i(t) – \mathbf{q}_i^*$ be the position error for drone $i$, where $\mathbf{q}_i^*$ is the desired position in the affine-transformed formation. The mean squared error (MSE) over time is defined as:
$$ \text{MSE}(t) = \frac{1}{n} \sum_{i=1}^n \| \mathbf{e}_i(t) \|^2. $$
In our experiments, the MSE dropped below 0.001 m² within 10 seconds, indicating rapid convergence. The control gains were tuned empirically: $k_1 = k_3 = 2.0$, $k_2 = 1.5$, $k_b = 0.8$, and $k_4 = 1.0$. The stress coefficients $\omega_{ij}$ were set as in the table above. The drones maintained the formation even under minor disturbances, such as air currents from propellers, showcasing the robustness of the stress-matrix-based approach.
One key advantage of this method is its scalability to larger drone formations. For $n$ drones, the control law complexity grows linearly with the number of edges in the graph, as each drone only needs information from its neighbors. Moreover, by selecting different informed drones, we can achieve various formation shapes without re-engineering the entire system. This is particularly useful in applications like surveillance or search-and-rescue, where formation patterns may need to adapt dynamically to environmental constraints. The affine transformation framework also accommodates heterogeneous sensors; for example, drones with distance sensors can collaborate with those having angle sensors, enhancing the system’s versatility.
However, challenges remain in real-world implementation. Communication delays, sensor noise, and actuator limitations can degrade performance. To address this, we incorporated low-pass filtering in the control loop and used the motion capture system for ground truth validation. Future work could integrate onboard vision-based sensors to reduce dependence on external localization, making the drone formation fully autonomous. Additionally, extending the algorithm to three-dimensional formations would broaden its applicability. The affine transformation theory naturally generalizes to 3D, but requires more informed drones (specifically, four drones to control a 3D affine space). The control law would involve similar principles, with stress matrices defined for 3D configurations.
In conclusion, affine transformation-based drone formation control offers a powerful paradigm for coordinating miniature UAVs with minimal information sharing. By leveraging universal rigidity and stress matrices, we can achieve flexible and scalable formations using only a few informed drones. Our hardware platform and experimental results validate the practicality of this approach for indoor environments. The control algorithm’s ability to handle mixed variables—distances and angles—makes it suitable for heterogeneous drone swarms. As drone technology advances, such methods will play a crucial role in enabling complex multi-agent systems for both military and civilian missions. Future research will focus on reducing external information requirements, implementing larger-scale formations, and enhancing autonomy through onboard sensing and decision-making. The continuous evolution of drone formation capabilities promises to unlock new frontiers in collaborative robotics.
To further illustrate the mathematical framework, consider the dynamics of each drone as a first-order integrator: $\dot{\mathbf{q}}_i = \mathbf{u}_i$, where $\mathbf{u}_i$ is the control input. For the informed drones (1, 2, 3), the control law drives them to satisfy distance, angle, and bearing constraints. For the follower drones (4 to $n$), the control input is derived from the stress matrix, ensuring that the overall formation converges to an affine transformation of the desired shape. The closed-loop system can be analyzed using Lyapunov stability theory. Define a Lyapunov function candidate based on formation error and stress energy. For instance, let $V = \frac{1}{2} \sum_{i=1}^n \| \mathbf{e}_i \|^2 + \frac{1}{2} \sum_{(i,j) \in \mathcal{E}} \omega_{ij} \| \mathbf{q}_i – \mathbf{q}_j \|^2$. Using the equilibrium stress condition, it can be shown that $\dot{V} \leq 0$, guaranteeing convergence to the desired affine formation.
The stress matrix also enables formation scaling without re-computing desired positions. Suppose we want to scale the formation by a factor $\alpha > 0$. This corresponds to an affine transformation with $M = \alpha I_d$ and $\mathbf{b} = \mathbf{0}$. Since the stress coefficients are invariant, the follower drones automatically adjust their positions based on the scaled relative measurements from the informed drones. This property is particularly useful in scenarios where the formation must expand or contract to navigate through obstacles or cover varying areas. The control law for followers, $\mathbf{u}_i = -k_4 \sum_{j \in \mathcal{N}_i} \omega_{ij} (\mathbf{q}_i – \mathbf{q}_j)$, essentially implements a weighted consensus protocol that preserves the affine shape.
In terms of hardware limitations, the Crazyflie 2.0 drones have constrained processing power, so complex computations like stress matrix updates are offloaded to the ground station. However, with advancements in embedded systems, future drones could perform these computations onboard, enabling fully decentralized control. The motion capture system, while accurate, is limited to indoor environments. For outdoor applications, alternative localization methods like GPS or ultra-wideband (UWB) could be integrated, though with potential trade-offs in precision. The key is to maintain the affine formation control’s robustness to measurement noise, which can be addressed through filtering and adaptive gain tuning.
Overall, this work demonstrates that affine transformation-based control is a viable and efficient method for drone formation flying. By combining theoretical rigor with practical implementation, we have shown how small-scale UAVs can achieve complex coordinated behaviors with minimal infrastructure. As research progresses, we anticipate broader adoption of such techniques in swarm robotics, leading to more intelligent and adaptive drone formations for diverse applications.
