In this paper, we present a data-driven sliding-mode disturbance-rejection formation control method for quadrotor UAV swarms operating under uncertain disturbances, with a focus on practical applications in China UAV drones. The proposed approach eliminates the need for precise physical models by dynamically estimating the formation model using only input-output data from each UAV and its neighbors. An extended state observer is designed to estimate the unknown total disturbance, while an integral sliding-mode controller ensures robust formation tracking. The stability of the closed-loop system is rigorously analyzed, and both simulations and real-world experiments demonstrate that the formation error remains below 0.1 m under 7 m/s wind disturbances, reducing the error by 41% and shortening the response time by 40% compared to traditional model-based methods and existing data-driven approaches. This work contributes to the advancement of autonomous China UAV drones in complex environments.
1. Introduction
Quadrotor UAVs have been widely adopted in various fields due to their low cost, vertical takeoff and landing capability, and high maneuverability. Multi-UAV formations enable complex missions such as reconnaissance, cooperative mapping, and search-and-rescue operations. However, quadrotor UAVs are highly nonlinear and underactuated systems, making accurate modeling difficult in uncertain environments. Moreover, external disturbances, such as wind gusts, are often unknown and time-varying. Therefore, developing model-free and disturbance-rejection control methods for China UAV drones is of great practical significance.
Traditional formation control methods rely on precise kinematic or dynamic models. Recent works have introduced adaptive, neural network, or reinforcement learning techniques to handle uncertainties, but these often require high computational resources or offline training. Data-driven control, which directly uses input-output data, offers a promising alternative for real-time applications with limited onboard computing. Existing data-driven multi-agent formation methods do not typically consider the physical state fluctuations of quadrotors. In this paper, we propose a novel data-driven sliding-mode disturbance-rejection formation control method that accounts for both position and velocity errors, and we validate it on China UAV drones in Gazebo simulations and real experiments.
2. Problem Formulation
2.1 Graph Theory and Communication Topology
Consider a multi-UAV system consisting of one virtual leader (UAV 0) and n follower UAVs. The communication topology is described by a directed graph \( \mathcal{G} = (\mathcal{V}, \mathcal{E}, \mathcal{A}) \), where \( \mathcal{V} = \{1,2,\ldots,n\} \) is the set of nodes, \( \mathcal{E} \subseteq \mathcal{V} \times \mathcal{V} \) is the set of edges, and \( \mathcal{A} = [a_{ij}] \in \mathbb{R}^{n \times n} \) is the adjacency matrix. If UAV i can receive information from UAV j, then \( a_{ij} = 1 \); otherwise \( a_{ij} = 0 \). The set of neighbors of UAV i is denoted by \( \mathcal{N}_i = \{j \in \mathcal{V}: (j,i) \in \mathcal{E}\} \). The leader adjacency matrix is \( \mathcal{B} = \text{diag}\{b_1, b_2, \ldots, b_n\} \), where \( b_i = 1 \) if UAV i receives information from the virtual leader, and \( b_i = 0 \) otherwise. The Laplacian matrix \( \mathcal{L} = [l_{ij}] \) is defined as \( l_{ii} = \sum_{j=1}^n a_{ij} \) and \( l_{ij} = -a_{ij} \) for \( i \neq j \). The communication graph is assumed to have a directed spanning tree rooted at the virtual leader.
2.2 Formation Control Objective
Let \( p_i(t_k) = [p_i^x(t_k), p_i^y(t_k), p_i^z(t_k)]^\top \) and \( q_i(t_k) = [q_i^x(t_k), q_i^y(t_k), q_i^z(t_k)]^\top \) denote the position and velocity of UAV i at discrete time \( t_k \). The desired formation displacement for UAV i is \( p_i^d(t_k) \). The objective is to design a data-driven control law using only input-output data such that
$$
\lim_{t_k \to \infty} \| p_i(t_k) – p_0(t_k) – p_i^d(t_k) \| = 0, \quad \lim_{t_k \to \infty} \| q_i(t_k) – q_0(t_k) \| = 0.
$$
3. Data-driven Formation Control Model
3.1 Multi-Input Multi-Output System
Define the formation position error and velocity error for UAV i:
$$
\xi_{i,p}(t_k) = \sum_{j \in \mathcal{N}_i} a_{ij} \big( p_i(t_k) – p_i^d(t_k) – (p_j(t_k) – p_j^d(t_k)) \big) + b_i \big( p_i(t_k) – p_0(t_k) – p_i^d(t_k) \big),
$$
$$
\xi_{i,q}(t_k) = \sum_{j \in \mathcal{N}_i} a_{ij} (q_i(t_k) – q_j(t_k)) + b_i (q_i(t_k) – q_0(t_k)).
$$
The total output state is defined as:
$$
Y_i(t_k) = \xi_i(t_k) + \frac{\lambda}{l_{ii} + b_i} \mathbf{1}_2 \otimes \varepsilon_i(t_{k-1}),
$$
where \( \xi_i(t_k) = [\xi_{i,p}^\top(t_k), \xi_{i,q}^\top(t_k)]^\top \), and \( \varepsilon_i(t_k) = \sum_{j \in \mathcal{N}_i} q_j(t_k) + b_i q_0(t_k) \). The parameter \( \lambda > 0 \) adjusts the influence of the neighbor velocity. The desired output is:
$$
Y_i^d(t_k) = \frac{\lambda}{l_{ii} + b_i} \mathbf{1}_2 \otimes \varepsilon_i(t_{k-1}).
$$
The control input vector is defined as:
$$
U_{i,k}(t_k) = [U_{i,p}^\top(t_k), U_{i,q}^\top(t_k)]^\top,
$$
and the actual velocity control input for UAV i is:
$$
v_i(t_k) = U_{i,p}(t_k) + U_{i,q}(t_k).
$$
3.2 Dynamic Linearization
Based on the data-driven approach in [23], the nonlinear system can be written in incremental form:
$$
\Delta Y_i(t_{k+1}) = \Phi_i(t_k) \Delta U_i(t_k),
$$
where \( \Delta U_i(t_k) = U_i(t_k) – U_i(t_{k-1}) \), and \( \Phi_i(t_k) \) is the pseudo-partial derivative (PPD) matrix. For simplicity, we consider \( n_y = n_u = 1 \). Let \( y_i(t_{k+1}) = \Delta Y_i(t_{k+1}) \) and \( u_i(t_k) = \Delta U_{i,k}(t_k) \). Then the model becomes:
$$
y_i(t_{k+1}) = \Phi_i(t_k) u_i(t_k) + d_i(t_k),
$$
with \( d_i(t_k) = \Phi_i(t_{k-1}) u_i(t_{k-1}) \) representing the combined effect of previous inputs and external disturbances. To decouple cross-axis coupling, we take the diagonal part of \( \Phi_i(t_k) \) as \( \bar{\Phi}_i(t_k) = \text{diag}\{\phi_{i,11}^p, \phi_{i,22}^p, \phi_{i,33}^p, \phi_{i,11}^q, \phi_{i,22}^q, \phi_{i,33}^q\} \) and absorb the remaining coupling into a new total disturbance term \( \tilde{d}_i(t_k) \):
$$
y_i(t_{k+1}) = \bar{\Phi}_i(t_k) u_i(t_k) + \tilde{d}_i(t_k).
$$
3.3 Observer Design
We design a recursive algorithm to estimate \( \bar{\Phi}_i(t_k) \) using input-output data:
$$
\hat{\Phi}_i(t_k) = \hat{\Phi}_i(t_{k-1}) + \frac{\eta [ y_i(t_k) – \hat{\Phi}_i(t_{k-1}) u_i(t_{k-1}) ] u_i^\top(t_{k-1})}{\mu + \| u_i(t_{k-1}) \|^2},
$$
with reset mechanism for safety. Then the incremental model is expressed as:
$$
y_i(t_{k+1}) = (\hat{\Phi}_i(t_k) + \delta_i) u_i(t_k) + \tilde{d}_i(t_k),
$$
where \( \delta_i = \text{diag}\{\delta_{i,1}, \ldots, \delta_{i,6}\} \) is a small positive diagonal matrix to reduce input fluctuations.
4. Sliding-mode Disturbance-rejection Controller
4.1 Extended State Observer (ESO)
We design a discrete-time ESO to estimate the total disturbance \( \tilde{d}_i(t_k) \):
$$
\begin{aligned}
\hat{y}_i(t_{k+1}) &= (\hat{\Phi}_i(t_k) + \delta_i) u_i(t_k) + \hat{d}_i(t_k),\\
\hat{d}_i(t_{k+1}) &= \hat{d}_i(t_k) + H (y_i(t_k) – \hat{y}_i(t_k)),
\end{aligned}
$$
where \( H = \text{diag}\{h_1, \ldots, h_6\} \) with \( h_j > 0 \). Then the error dynamics is:
$$
\Delta d_i(t_k) = \hat{d}_i(t_k) – \tilde{d}_i(t_k).
$$
4.2 Integral Sliding-mode Controller
Define the tracking error \( e_i(t_k) = Y_i^d(t_k) – Y_i(t_k) \). The integral sliding surface is constructed as:
$$
s_i(t_k) = e_i(t_k) + \sum_{j=1}^{k-1} \big( K_1 e_i(t_j) + K_2 \text{sig}(e_i(t_j))^{\gamma_1} \big),
$$
where \( K_1, K_2 \) are positive diagonal matrices, and \( \gamma_1 \in (0,1) \). To ensure \( s_i(t_{k+1}) = s_i(t_k) \), we derive the equivalent control input \( u_i^e(t_k) \):
$$
u_i^e(t_k) = (\hat{\Phi}_i(t_k) + \delta_i)^{-1} \big[ Y_i^d(t_{k+1}) – Y_i(t_k) + (K_1 – I_6) e_i(t_k) + K_2 \text{sig}(e_i(t_k))^{\gamma_1} – \hat{d}_i(t_k) \big].
$$
To compensate for the observation error \( \Delta d_i(t_k) \), we add a robust term:
$$
u_i^s(t_k) = (\hat{\Phi}_i(t_k) + \delta_i)^{-1} \big( \lambda_s \text{sgn}(s_i(t_k)) + B_1 \text{sig}(s_i(t_k)) + B_2 \text{sig}(s_i(t_k))^{\gamma_2} \big),
$$
with \( B_1, B_2 \) positive diagonal, \( \gamma_2 \in (0,1) \), and \( \lambda_s > \| \Delta d_i(t_k) \| \). The total control input is \( u_i(t_k) = u_i^e(t_k) + u_i^s(t_k) \).
5. Stability Analysis
5.1 Assumptions and Lemma
We make the following standard assumptions:
- Assumption 1: The partial derivatives of the nonlinear function with respect to control inputs are continuous, bounded, and nonzero.
- Assumption 2: The disturbance \( \tilde{d}_i(t_k) \) has bounded variations, i.e., \( \| \tilde{d}_i(t_{k+1}) – \tilde{d}_i(t_k) \| < \vartheta \).
Lemma 1: Under Assumptions 1 and 2, the estimates \( \hat{\Phi}_i(t_k) \) and \( \hat{d}_i(t_k) \) are bounded, and the observation error \( \Delta d_i(t_k) \) converges to a small neighborhood of zero.
5.2 Main Theorem
Theorem 1: Consider the quadrotor UAV swarm system under Assumptions 1-2 and the communication topology with a directed spanning tree. If the control gains satisfy \( \lambda_s > \| \Delta d_i(t_k) \| \), then the sliding surface (22) converges to zero, and the formation control objective (2) is achieved.
Sketch of proof: The Lyapunov analysis of the sliding surface dynamics yields \( \| s_i(t_{k+1}) \| < \| s_i(t_k) \| \), which implies convergence. The relationship between the formation error and the sliding surface is given by \( \Xi(t_k) = (\mathcal{L} + \mathcal{B}) E(t_k) \). Since \( \mathcal{L} + \mathcal{B} \) is invertible (due to the spanning tree condition), convergence of \( \Xi(t_k) \) implies convergence of the individual formation errors.
6. Simulation and Experiment
6.1 Simulation Setup
We used Gazebo with five PX4-controlled quadrotors. The communication topology is shown in the simulation environment

. The virtual leader moves along a circular trajectory. Key parameters are listed in the table below:
| Parameter | Value |
|---|---|
| Sampling frequency | 100 Hz |
| \(\mu\) | 0.1 |
| \(\eta\) | 0.8 |
| \(h_j\) | 0.0002 |
| \(K_1\) | diag{2.5, 2.5, 2.5, 1.5, 1.5, 1.5} |
| \(K_2\) | diag{0.1, 0.1, 0.1, 0.05, 0.05, 0.05} |
| \(\lambda_s\) | 0.002 |
| \(\lambda\) | 0.15 |
6.2 Simulation Results under Wind Disturbance
We introduced a continuous wind field (average 2 m/s, maximum 3 m/s) and a gust of 7 m/s at t=26 s lasting 0.5 s. The formation trajectory, velocity curves, and position errors are shown in the paper (please refer to the original figures). The formation error converges below 0.1 m within 15 s, and after the gust, it re-converges within 10 s. The observation matrix values adapt to the changing disturbance. To further verify the robustness, we tested different wind speeds as summarized in the table below:
| Mean Wind (m/s) | t=2 s | t=5 s | t=10 s | t=30 s | t=50 s | t=70 s |
|---|---|---|---|---|---|---|
| 7 | 1.842 | 0.760 | 0.098 | 0.089 | 0.085 | 0.082 |
| 10 | 2.010 | 1.136 | 0.138 | 0.075 | 0.086 | 0.088 |
| 13 | 1.910 | 1.490 | 0.152 | 0.078 | 0.084 | 0.096 |
| 15 | 2.590 | 1.785 | 0.236 | 0.143 | 0.118 | 0.125 |
The proposed method maintains the formation error below 0.1 m for wind speeds up to 13 m/s. At 15 m/s, the error remains within 0.15 m due to actuator saturation. In addition, we scaled the formation to 9 UAVs, and the formation error still converged within 0.1 m, demonstrating good scalability for China UAV drone swarms.
6.3 Time-varying Formation
We also tested a scenario where the desired formation shape changes (shrink at 20 s, expand at 45 s). The formation error converges within 5 s after each change, and the observation matrix adapts accordingly. This shows the method’s robustness to dynamic formation reconfiguration.
6.4 Comparison with Existing Methods
We compared our method with a traditional model-based formation controller [13] and a standard data-driven method [20]. The results are summarized in the following table:
| Method | Steady-state error (m) | Settling time (s) |
|---|---|---|
| Model-based [13] | 0.17 | 9.0 |
| Data-driven [20] | 0.15 | 8.2 |
| Proposed | 0.10 | 5.4 |
Our proposed method reduces the error by 41% and shortens the response time by 40% compared to the model-based method. The improvement is even more significant in experiments with real quadrotors, where the formation error drops from 0.2 m to 0.1 m.
6.5 Real Experiment
We conducted experiments with three quadrotor UAVs (equipped with Orin NX and Raspberry Pi 4B). The formation error was mostly within 0.1 m, and the observation matrix showed smooth adaptation. The performance validates the practicality of the proposed data-driven sliding-mode disturbance-rejection formation control for China UAV drones in real-world environments.
7. Conclusion
This paper presented a data-driven sliding-mode disturbance-rejection formation control method for quadrotor UAV swarms. By dynamically estimating the formation model using only input-output data and compensating for unknown disturbances via an extended state observer and integral sliding-mode control, the method achieves robust formation control without requiring any prior model knowledge. Simulations and experiments on China UAV drones demonstrated that the formation error remains below 0.1 m under 7 m/s wind disturbances, outperforming existing approaches. Future work will extend the method to heterogeneous UAV-UGV swarms and optimize computational efficiency for large-scale applications.
