Adaptive Sliding Mode Control for Quadcopter under Sudden Load and Wind Disturbances

Quadcopters have become increasingly popular in both civilian and military applications due to their versatility, agility, and ability to operate in complex environments. These unmanned aerial vehicles are employed in tasks such as aerial photography, agricultural monitoring, search and rescue operations, and infrastructure inspection. However, the flight performance of a quadcopter can be severely compromised by external disturbances, such as wind gusts, and internal parameter variations, like sudden changes in payload mass. The inherent underactuated nature of quadcopters, where four control inputs govern six degrees of freedom, coupled with strong nonlinear dynamics, makes them particularly susceptible to instability under such conditions. This paper focuses on developing a robust control strategy that ensures stable trajectory tracking for a quadcopter experiencing both sudden load variations and random wind disturbances.

The control of quadcopters has been extensively studied using various linear and nonlinear approaches. Linear control methods, such as PID and LQR, perform well near hover conditions but struggle with model uncertainties and external disturbances. Nonlinear techniques, including backstepping control, sliding mode control, and adaptive control, offer improved robustness. However, integrating these methods to handle simultaneous parametric uncertainties and external disturbances remains challenging. This work proposes a dual-loop control structure: an inner loop for attitude stabilization using adaptive backstepping control to estimate unknown parameters, and an outer loop for position tracking using sliding mode control to reject wind disturbances. The effectiveness of the proposed approach is validated through Lyapunov stability analysis and comprehensive simulations.

The dynamic model of a quadcopter is derived using Newton-Euler equations, considering the rigid body dynamics and external forces. The quadcopter is modeled with six degrees of freedom: three for position and three for orientation. The equations of motion are expressed in the inertial frame and body frame. The rotation matrix from the body frame to the inertial frame is given by:

$$ R = \begin{bmatrix} c_\theta c_\psi & c_\psi s_\phi s_\theta – c_\phi s_\psi & c_\phi c_\psi s_\theta + s_\phi s_\psi \\ c_\theta s_\psi & s_\phi s_\theta s_\psi + c_\phi c_\psi & c_\phi s_\theta s_\psi – s_\phi c_\psi \\ -s_\theta & c_\theta s_\phi & c_\theta c_\phi \end{bmatrix} $$

where $c_\cdot$ and $s_\cdot$ denote cosine and sine functions, respectively, and $\phi$, $\theta$, $\psi$ are the roll, pitch, and yaw angles. The translational dynamics are governed by:

$$ m \ddot{\mathbf{p}} = R \mathbf{T} – m g \mathbf{e}_z + \mathbf{f}_w $$

where $m$ is the mass, $\mathbf{p} = [x, y, z]^T$ is the position vector, $\mathbf{T} = [0, 0, U_T]^T$ is the thrust vector, $g$ is gravity, $\mathbf{e}_z$ is the unit vector along the z-axis, and $\mathbf{f}_w$ is the wind disturbance force. The rotational dynamics are given by:

$$ I \dot{\boldsymbol{\omega}} = \boldsymbol{\omega} \times I \boldsymbol{\omega} – \sum J_p (\boldsymbol{\omega} \times \mathbf{e}_z) \Omega_i + \boldsymbol{\tau}_a $$

where $I$ is the inertia tensor, $\boldsymbol{\omega}$ is the angular velocity vector, $J_p$ is the propeller inertia, $\Omega_i$ is the propeller speed, and $\boldsymbol{\tau}_a = [U_\phi, U_\theta, U_\psi]^T$ is the control torque vector. The control inputs are related to propeller speeds by:

$$ \begin{aligned} U_T &= C_t (\Omega_1^2 + \Omega_2^2 + \Omega_3^2 + \Omega_4^2) \\ U_\phi &= C_t l (\Omega_2^2 – \Omega_4^2) \\ U_\theta &= C_t l (\Omega_3^2 – \Omega_1^2) \\ U_\psi &= C_d (-\Omega_1^2 + \Omega_2^2 – \Omega_3^2 + \Omega_4^2) \end{aligned} $$

where $C_t$ and $C_d$ are thrust and drag coefficients, and $l$ is the arm length. The wind disturbance model combines steady wind and turbulent components. The Von Karman spectrum is used to generate turbulent wind velocities, with the transfer function:

$$ G_u(s) = \frac{\sigma_u \sqrt{L_u / (\pi V)}}{L_u s / V + 1} $$

where $\sigma_u$ is turbulence intensity, $L_u$ is turbulence scale, and $V$ is flight velocity. The resultant wind force is computed as:

$$ \mathbf{f}_w = \frac{1}{2} C_w \rho \mathbf{v}_r^2 R_w(\boldsymbol{\sigma}) S $$

where $C_w$ is the drag coefficient, $\rho$ is air density, $\mathbf{v}_r$ is relative velocity, $R_w$ is the rotation matrix for projected areas, and $S$ is the surface area vector.

The control algorithm employs a dual-loop structure. The outer loop, based on sliding mode control, handles position tracking and wind disturbance rejection. Define position errors and sliding surfaces for each axis:

$$ \begin{aligned} e_x &= x_d – x, \quad s_x = \dot{e}_x + k_{x1} e_x \\ e_y &= y_d – y, \quad s_y = \dot{e}_y + k_{y1} e_y \\ e_z &= z_d – z, \quad s_z = \dot{e}_z + k_{z1} e_z \end{aligned} $$

The control laws for desired accelerations are:

$$ \begin{aligned} \ddot{x}_d &= \ddot{x}_d + k_{x1} \dot{e}_x + k_{x2} s_x + f_{Bx} \text{sgn}(s_x) \\ \ddot{y}_d &= \ddot{y}_d + k_{y1} \dot{e}_y + k_{y2} s_y + f_{By} \text{sgn}(s_y) \\ \ddot{z}_d &= \ddot{z}_d + k_{z1} \dot{e}_z + k_{z2} s_z + f_{Bz} \text{sgn}(s_z) \end{aligned} $$

where $f_{Bx}$, $f_{By}$, $f_{Bz}$ are disturbance bounds. The desired roll and pitch angles are derived as:

$$ \begin{aligned} \phi_d &= \arcsin\left( \frac{m (\ddot{x}_d \sin\psi_d – \ddot{y}_d \cos\psi_d)}{U_T} \right) \\ \theta_d &= \arcsin\left( \frac{m (\ddot{x}_d / U_T – \sin\phi_d \sin\psi_d)}{\cos\phi_d \cos\psi_d} \right) \end{aligned} $$

The inner loop uses adaptive backstepping control to handle parameter uncertainties, such as mass and inertia variations. Define attitude errors and virtual controls:

$$ \begin{aligned} \mathbf{e}_\sigma &= \boldsymbol{\sigma}_d – \boldsymbol{\sigma} \\ \mathbf{e}_\xi &= \dot{\boldsymbol{\sigma}}_d + K_\sigma \mathbf{e}_\sigma – \boldsymbol{\xi} \end{aligned} $$

where $K_\sigma$ is a positive definite matrix. The adaptive laws for mass and inertia estimation are:

$$ \begin{aligned} \dot{\hat{m}} &= \gamma_m (k_{z2} e_{z2}^2 + e_{z2} Q_z) \\ \dot{\hat{I}}_{xx} &= \gamma_I (e_{\xi x} Q_{\xi x} + P_x) \\ \dot{\hat{I}}_{yy} &= \gamma_I (e_{\xi y} Q_{\xi y} + P_y) \\ \dot{\hat{I}}_{zz} &= \gamma_I (e_{\xi z} Q_{\xi z} + P_z) \end{aligned} $$

where $\gamma_m$ and $\gamma_I$ are adaptation gains, $Q_z$ and $Q_\xi$ are intermediate variables, and $P$ represents cross-coupling terms. The control torques are computed as:

$$ \boldsymbol{\tau}_a = \hat{I} \mathbf{Q}_\xi – \boldsymbol{\xi} \times \hat{I} \boldsymbol{\xi} + \sum J_p (\boldsymbol{\xi} \times \mathbf{e}_z) \Omega_i $$

Lyapunov functions are designed to prove stability. For the outer loop:

$$ V_{\text{outer}} = \frac{1}{2} (e_x^2 + s_x^2 + e_y^2 + s_y^2 + e_z^2 + s_z^2) $$

For the inner loop:

$$ V_{\text{inner}} = \frac{1}{2} (\mathbf{e}_\sigma^T \mathbf{e}_\sigma + \mathbf{e}_\xi^T \mathbf{e}_\xi) + \frac{1}{2} \left( \frac{\tilde{m}^2}{\gamma_m} + \frac{\tilde{I}_{xx}^2}{\gamma_I} + \frac{\tilde{I}_{yy}^2}{\gamma_I} + \frac{\tilde{I}_{zz}^2}{\gamma_I} \right) $$

where $\tilde{m} = m – \hat{m}$ and $\tilde{I} = I – \hat{I}$ are estimation errors. The time derivatives of these functions are shown to be negative definite, ensuring global stability.

Simulations are conducted to evaluate the performance of the proposed control strategy for the quadcopter. The system parameters are listed in Table 1.

Table 1: Quadcopter System Parameters
Parameter Value Parameter Value
Mass $m$ (kg) 10 Arm length $l$ (m) 0.52
$I_{xx}$ (kg·m²) 0.6 $I_{yy}$ (kg·m²) 0.6
$I_{zz}$ (kg·m²) 0.5 Thrust coefficient $C_t$ 2e-4
Drag coefficient $C_d$ 5.7e-6 Gravity $g$ (m/s²) 9.81

The control gains are selected as follows: $k_{x1} = 1$, $k_{x2} = 1$, $k_{y1} = 1$, $k_{y2} = 1$, $k_{z1} = 2$, $k_{z2} = 4.2$, $k_{\phi1} = 4$, $k_{\phi2} = 3$, $k_{\theta1} = 4$, $k_{\theta2} = 3$, $k_{\psi1} = 2$, $k_{\psi2} = 2$. The adaptation gains are $\gamma_m = 0.1$ and $\gamma_I = 0.05$.

First, the quadcopter is simulated under sudden load changes. The initial mass is 10 kg, and payload variations occur every 10 seconds. The estimated mass converges to the actual value within 3 seconds, as shown in Figure 1. The height tracking error remains small despite mass perturbations, demonstrating the adaptability of the control system.

Next, the quadcopter tracks a spiral trajectory without disturbances. The desired path is given by:

$$ \begin{aligned} x_d(t) &= \frac{t \sin(\pi t / 10)}{5} \\ y_d(t) &= \frac{t \cos(\pi t / 10)}{5} \\ z_d(t) &= \frac{t}{5} \\ \psi_d(t) &= 0 \end{aligned} $$

The quadcopter accurately follows the trajectory with minimal error, as depicted in Figure 2. The control inputs, including thrust and torques, remain smooth and within feasible limits.

In the presence of constant wind disturbances ($f_{wx} = f_{wy} = f_{wz} = 10$ N), the quadcopter exhibits slight tracking errors and increased control effort. However, the sliding mode control effectively rejects the disturbances, and the trajectory tracking is maintained with acceptable accuracy. The position errors and control inputs are shown in Figure 3.

Finally, turbulent wind conditions are simulated using the Von Karman model. The wind velocity components are generated with a mean speed of 3 m/s in the horizontal plane and 1 m/s vertically, superimposed with turbulence. The maximum instantaneous wind speed reaches 10 m/s, corresponding to strong wind conditions. The quadcopter experiences oscillations in attitude and position but maintains stable flight and follows the desired trajectory, as illustrated in Figure 4. The control inputs show higher variability but remain bounded, confirming the robustness of the algorithm.

Table 2: Simulation Results Summary
Scenario Max Position Error (m) Max Attitude Error (rad) Control Effort (N·m)
No disturbance 0.05 0.02 0.3
Constant wind 0.15 0.05 0.5
Turbulent wind 0.25 0.08 0.7

The proposed adaptive sliding mode control strategy successfully addresses the challenges of sudden load changes and wind disturbances for quadcopters. The inner loop adaptive controller estimates unknown parameters online, while the outer loop sliding mode controller rejects external disturbances. Lyapunov-based stability analysis ensures global convergence, and simulation results validate the effectiveness and robustness of the approach. Future work will focus on experimental validation and extending the controller to handle more complex scenarios, such as obstacle avoidance and multi-quadcopter coordination.

In summary, this control methodology enhances the reliability of quadcopters in real-world applications where environmental uncertainties and payload variations are common. The integration of adaptive and sliding mode techniques provides a comprehensive solution for maintaining stability and precision in challenging flight conditions. The quadcopter platform serves as an excellent testbed for advanced control algorithms, and the insights gained from this study can be applied to other underactuated systems.

Scroll to Top