In recent years, the rapid advancement of China drone technology has enabled quadrotor unmanned aerial vehicles (UAVs) to be widely applied in various fields such as surveillance, agriculture, and search and rescue. The inherent characteristics of quadrotor UAVs—underactuation, strong coupling, and nonlinearity—pose significant challenges for single-vehicle control. However, multi-UAV systems, especially formations, can overcome the limitations of single drones and accomplish complex missions more efficiently. This paper presents a novel distributed formation control method for China drone swarms that integrates consensus algorithms with repulsion functions to achieve safe and efficient obstacle avoidance in cluttered environments.
We consider a team of \(n\) quadrotor UAVs under a virtual leader framework. The communication topology among followers is described by a weighted directed graph \(G = \{V, E\}\), where \(V = \{v_1, v_2, \dots, v_n\}\) represents the set of UAVs, and \(E \subseteq V \times V\) denotes the edges representing information flow. The adjacency matrix is \(\mathbf{A} = [a_{ij}] \in \mathbb{R}^{n \times n}\), with \(a_{ij} > 0\) if agent \(i\) receives information from agent \(j\), and \(a_{ii} = 0\). The Laplacian matrix \(\mathbf{L} = [l_{ij}]\) is defined as:
$$
l_{ij} = \begin{cases}
\sum_{k=1}^n a_{ik}, & i = j, \\
-a_{ij}, & i \neq j.
\end{cases}
$$
The dynamics of each UAV are modeled using Newton-Euler equations. For the \(i\)-th UAV, the position and attitude dynamics are:
$$
\begin{aligned}
\dot{\mathbf{P}}_i &= \mathbf{V}_i \\
m \dot{\mathbf{V}}_i &= \mathbf{U}_{\Gamma i} \mathbf{R}(\Theta_i) \mathbf{t}_3 – m g \mathbf{t}_3 + \mathbf{d}_{V i} \\
\dot{\Theta}_i &= \mathbf{\Pi}(\Theta_i) \mathbf{\Omega}_i \\
\mathbf{J}_i \dot{\mathbf{\Omega}}_i &= -\mathbf{\Omega}_i \times (\mathbf{J}_i \mathbf{\Omega}_i) + \mathbf{G}_{a i} + \mathbf{U}_{T i} + \mathbf{d}_{\Omega i}
\end{aligned}
$$
where \(\mathbf{P}_i = [x_i, y_i, z_i]^\mathrm{T}\) and \(\mathbf{V}_i = [v_{ix}, v_{iy}, v_{iz}]^\mathrm{T}\) are the position and velocity in the earth frame; \(\Theta_i = [\phi_i, \theta_i, \psi_i]^\mathrm{T}\) and \(\mathbf{\Omega}_i = [p_i, q_i, r_i]^\mathrm{T}\) are the attitude and angular rates in the body frame; \(\mathbf{R}(\Theta_i)\) and \(\mathbf{\Pi}(\Theta_i)\) are the rotation and transformation matrices; \(\mathbf{U}_{\Gamma i}\) is the total thrust; \(\mathbf{U}_{T i}\) is the torque vector; \(\mathbf{d}_{V i}\) and \(\mathbf{d}_{\Omega i}\) are external disturbances. The inertia matrix \(\mathbf{J}_i = \mathrm{diag}\{J_{ix}, J_{iy}, J_{iz}\}\), and \(\mathbf{G}_{a i}\) denotes the gyroscopic torque.
The thrust and torque are generated by four rotors:
$$
\begin{aligned}
\mathbf{U}_{\Gamma i} &= k_b \sum_{j=1}^4 \omega_j^2 \\
\mathbf{U}_{T i} &= \begin{bmatrix}
k_b l (\omega_2^2 – \omega_4^2) \\
k_b l (\omega_3^2 – \omega_1^2) \\
k_d (\omega_2^2 + \omega_4^2 – \omega_1^2 – \omega_3^2)
\end{bmatrix}
\end{aligned}
$$
where \(l\) is the arm length, \(k_b\) and \(k_d\) are aerodynamic coefficients, and \(\omega_j\) are the rotor speeds.
For formation control and obstacle avoidance, we adopt a simplified double-integrator model for the outer loop:
$$
\begin{aligned}
\dot{\mathbf{x}}_i(t) &= \mathbf{v}_i(t) \\
\dot{\mathbf{v}}_i(t) &= \mathbf{u}_i(t)
\end{aligned}
$$
where \(\mathbf{x}_i, \mathbf{v}_i, \mathbf{u}_i \in \mathbb{R}^3\) are position, velocity, and control input of the \(i\)-th UAV (with \(i = 0\) representing the virtual leader). The proposed distributed controller integrates a consensus term for formation keeping and a repulsion term for collision and obstacle avoidance:
$$
\begin{aligned}
\mathbf{u}_i &= \alpha \beta \big[(\mathbf{x}_0 – \mathbf{l}_i) – \mathbf{x}_i + \mathbf{v}_0 – \mathbf{v}_i\big] \\
&\quad + \sum_{j=1}^n a_{ij} \Big[\beta (\mathbf{x}_j – \mathbf{l}_j – \mathbf{x}_i + \mathbf{l}_i) + \beta (\mathbf{v}_j – \mathbf{v}_i)\Big] \\
&\quad + \beta_1 \nabla \sum_{j=1}^n U_{ij}(\|\mathbf{x}_{ij}\|) + \beta_1 \nabla \sum_{b=1}^M U_{i b}(\|\mathbf{x}_{i b}\|)
\end{aligned}
$$
Here, \(\mathbf{l}_i\) is the desired relative position to the leader. The parameter \(\alpha = 1\) if the UAV receives leader information, otherwise 0. The consensus gains \(\beta > 0\) and \(\beta_1 > 0\) are designed for stability. The repulsion functions for inter-UAV collision and obstacle avoidance are defined as follows.
To prevent collisions among UAVs, we define a prohibited zone of radius \(r_u\) and an avoidance zone of radius \(R_u > r_u\). The repulsion potential between UAVs \(i\) and \(j\) is:
$$
U_{ij}(x) = \begin{cases}
\frac{(R_u^2 – x^2)^2}{(R_u^2 – r_u^2)^2}, & r_u < x \le R_u, \\
0, & x > R_u, \\
\text{undefined}, & x \le r_u,
\end{cases}
$$
and its gradient is continuous:
$$
\nabla U_{ij}(x) = \frac{4(R_u^2 – x^2)(r_u^2 – x^2)}{(R_u^2 – r_u^2)^2} \cdot \frac{\mathbf{x}_i – \mathbf{x}_j}{\|\mathbf{x}_{ij}\|}.
$$
For obstacles, we propose a novel detection method based on the minimum distance from the UAV to any point on the obstacle surface. For an irregular obstacle \(b\), we define its nearest boundary point as \(\mathbf{x}_{ob}\). The repulsion potential is:
$$
U_{i b}(x) = \begin{cases}
\frac{(R_o^2 – x^2)^2}{(R_o^2 – r_o^2)^2}, & r_o < x \le R_o, \\
0, & x > R_o, \\
\text{undefined}, & x \le r_o,
\end{cases}
$$
where \(r_o\) and \(R_o\) are the widths of the prohibited and avoidance zones around the obstacle surface. The gradient is analogous to the inter-UAV case.
Now we design the trajectory tracking controller using adaptive integral backstepping. Define the position tracking error \(\mathbf{e}_{1i} = \mathbf{P}_i – \mathbf{P}_{di}\) and its integral \(\boldsymbol{\zeta}_{1i} = \int \mathbf{e}_{1i} dt\). Choose the Lyapunov function:
$$
Z_{1i} = \frac{1}{2} \mathbf{e}_{1i}^\mathrm{T} \mathbf{e}_{1i} + \frac{1}{2} \gamma_{1i} \boldsymbol{\zeta}_{1i}^\mathrm{T} \boldsymbol{\zeta}_{1i}.
$$
Its derivative yields the virtual control \(\boldsymbol{\mu}_{1i} = -k_{1i} \mathbf{e}_{1i} + \gamma_{1i} \boldsymbol{\zeta}_{1i} + \dot{\mathbf{P}}_{di}\). Introducing \(\mathbf{e}_{2i} = \mathbf{V}_i – \boldsymbol{\mu}_{1i}\), the augmented Lyapunov function is:
$$
Z_{2i} = Z_{1i} + \frac{1}{2} \mathbf{e}_{2i}^\mathrm{T} \mathbf{e}_{2i}.
$$
Differentiating and substituting the dynamics, we obtain the control input for the thrust vector:
$$
\boldsymbol{\eta}_i = m \left( – \mathbf{e}_{1i} + \ddot{\mathbf{P}}_{di} – k_{2i} \mathbf{e}_{2i} – \dot{\boldsymbol{\mu}}_{1i} + g \mathbf{t}_3 – \hat{\mathbf{d}}_{Vi} \right),
$$
where \(\boldsymbol{\eta}_i = \mathbf{U}_{\Gamma i} \mathbf{R}(\Theta_i) \mathbf{t}_3\). The total thrust and desired roll/pitch angles are then computed:
$$
\begin{aligned}
\mathbf{U}_{\Gamma i} &= m \sqrt{\eta_{ix}^2 + \eta_{iy}^2 + (\eta_{iz} + g)^2}, \\
\phi_{di} &= \arcsin\left( \frac{\eta_{ix} \sin\psi_{di} – \eta_{iy} \cos\psi_{di}}{m U_{\Gamma i}} \right), \\
\theta_{di} &= \arctan\left( \frac{\eta_{ix} \cos\psi_{di} + \eta_{iy} \sin\psi_{di}}{\eta_{iz} + g} \right).
\end{aligned}
$$
The adaptive law for disturbance estimation is \(\dot{\hat{\mathbf{d}}}_{Vi} = \lambda_{1i} \mathbf{e}_{2i}\), ensuring stability. Similarly, a backstepping controller is designed for attitude tracking, using a first-order filter to avoid “explosion of terms”. The attitude error is \(\mathbf{e}_{3i} = \Theta_i – \hat{\Theta}_{di}\), and the control torque is:
$$
\mathbf{U}_{T i} = \mathbf{J}_i^{-1} \left( -\mathbf{e}_{3i} – k_{4i} \mathbf{e}_{4i} – \dot{\boldsymbol{\mu}}_{2i} + \mathbf{\Omega}_i \times (\mathbf{J}_i \mathbf{\Omega}_i) – \mathbf{G}_{a i} – \hat{\mathbf{d}}_{\Omega i} \right),
$$
with \(\mathbf{e}_{4i} = \mathbf{\Omega}_i – \boldsymbol{\mu}_{2i}\) and \(\boldsymbol{\mu}_{2i} = -k_{3i} \mathbf{e}_{3i} + \gamma_{2i} \boldsymbol{\zeta}_{2i} + \dot{\hat{\Theta}}_{di}\). The overall closed-loop system is shown to be asymptotically stable via Lyapunov analysis.
To validate the proposed method, we performed extensive simulations in MATLAB/Simulink. The parameters of the quadrotor are listed in Table 1.
| Parameter | Symbol | Value |
|---|---|---|
| Mass | \(m\) | \(2.80 \times 10^{-2}\ \mathrm{kg}\) |
| Arm length | \(l\) | \(2.30 \times 10^{-2}\ \mathrm{m}\) |
| Roll inertia | \(J_{ix}\) | \(3.67 \times 10^{-5}\ \mathrm{kg\cdot m^2}\) |
| Pitch inertia | \(J_{iy}\) | \(3.67 \times 10^{-5}\ \mathrm{kg\cdot m^2}\) |
| Yaw inertia | \(J_{iz}\) | \(8.34 \times 10^{-5}\ \mathrm{kg\cdot m^2}\) |
| Motor inertia | \(J_{ri}\) | \(1.0 \times 10^{-6}\ \mathrm{kg\cdot m^2}\) |
| Lift coefficient | \(k_b\) | \(9.23 \times 10^{-8}\ \mathrm{N\cdot s^2}\) |
| Drag coefficient | \(k_d\) | \(3.03 \times 10^{-8}\ \mathrm{N\cdot m\cdot s^2}\) |
The communication topology among four follower UAVs and one virtual leader is shown in the figure below (inserted from the provided link).

The virtual leader trajectory is set to \(\mathbf{P}_0(t) = [0.6t,\ \sin(0.1t),\ 2]^\mathrm{T}\ \mathrm{m}\). The initial positions of the four drones are: \([0,1,0]^\mathrm{T}\), \([1,1,0]^\mathrm{T}\), \([1,0,0]^\mathrm{T}\), \([0,0,0]^\mathrm{T}\) (all in meters). The desired offsets are \(\mathbf{l}_1 = [0,2,0]^\mathrm{T}\), \(\mathbf{l}_2 = [0,1,0]^\mathrm{T}\), \(\mathbf{l}_3 = [0,-1,0]^\mathrm{T}\), \(\mathbf{l}_4 = [0,-2,0]^\mathrm{T}\). At \(t=50\ \mathrm{s}\), the formation switches to a tighter pattern with offsets \([0,1.5]\), \([0,0.5]\), \([0,-0.5]\), \([0,-1.5]\).
Two simulation scenarios are considered: static obstacles and dynamic obstacles. In the static obstacle scenario, the environment contains several irregularly shaped obstacles. The UAVs must avoid collision with each other and with obstacles. The results are compared with the traditional artificial potential field (APF) method. Table 2 summarizes the obstacle avoidance performance.
| Method | Total avoidance time (s) | Max avoidance speed (m/s) | Max trajectory tracking error (m) |
|---|---|---|---|
| Proposed method | 22.3 | 1.78 | 0.72 |
| APF method | 27.8 | 3.49 | 2.43 |
The velocity profiles and tracking errors under both methods are plotted in the simulation. Our method shows smoother velocity changes and significantly lower tracking errors. During the formation switching at \(t = 50\ \mathrm{s}\), the drones quickly converge to the new pattern without oscillations.
In the dynamic obstacle scenario, three moving irregular obstacles are introduced. Their trajectories are: \(\mathbf{x}_{o1} = [17-0.5t,\ 1,\ 5]^\mathrm{T}\), \(\mathbf{x}_{o2} = [14.2,\ 0.4t+10,\ 3]^\mathrm{T}\), \(\mathbf{x}_{o3} = [31-0.3t,\ 2,\ 3]^\mathrm{T}\). Table 3 presents the performance comparison.
| Method | Total avoidance time (s) | Max avoidance speed (m/s) | Max trajectory tracking error (m) |
|---|---|---|---|
| Proposed method | 24.2 | 1.46 | 0.72 |
| APF method | 31.5 | 1.98 | 1.45 |
The proposed method again outperforms the APF method. The inter-UAV distances during the entire simulation remain above the safety threshold of 0.7 m, ensuring collision-free operation. The trajectories show that the China drone formation can smoothly adapt to the shape of irregular obstacles, avoiding the “over-repulsion” issue often seen in traditional APF methods.
The adaptive integral backstepping controller effectively compensates for external disturbances (set as \(\mathbf{d}_{Vi} = \mathbf{d}_{\Omega i} = [-0.3\sin(0.1t),\ 0.2\sin(0.1t),\ 0.2\sin(0.1t)]^\mathrm{T}\)). The disturbance estimation converges quickly.
In summary, our proposed distributed formation obstacle avoidance method for China drone swarms successfully integrates consensus and repulsion functions. The key contributions include:
- A novel obstacle detection algorithm based on the minimum distance to irregular obstacles, enabling more realistic avoidance paths.
- A smooth, bounded repulsion function that guarantees continuous gradient and avoids local minima.
- An adaptive integral backstepping controller that ensures robust trajectory tracking despite disturbances and modeling uncertainties.
- Comprehensive simulation results demonstrating superior performance over traditional APF methods in both static and dynamic environments.
The proposed scheme is highly suitable for real-world applications of China drone technology, including surveillance, logistics, and disaster response, where reliable formation flight and obstacle avoidance are critical.
