Adaptive Sliding Mode Control for Quadrotor Drone Trajectory Tracking

In recent years, the quadrotor drone has emerged as a pivotal platform in both civilian and military applications, such as surveillance, reconnaissance, and search-and-rescue missions in hazardous environments. Compared to traditional helicopters, the quadrotor drone offers simpler mechanics, enhanced safety, and higher flight efficiency. However, its inherent nonlinearity, underactuation, strong coupling, and parameter uncertainties pose significant challenges for controller design, particularly in trajectory tracking tasks. This paper addresses these challenges by proposing an adaptive sliding mode control strategy for a quadrotor drone, focusing on compensating for mass and moment of inertia uncertainties while ensuring precise tracking performance. The approach leverages unit quaternions for attitude representation to avoid singularities, decomposes the system into position and attitude subsystems, and introduces a virtual control force to handle underactuation. Stability is rigorously proven using Lyapunov theory, and simulations validate the effectiveness of the method. Throughout this work, the term “quadrotor drone” is emphasized to highlight the specific vehicle under study.

The core contribution lies in integrating adaptive mechanisms with sliding mode control to robustly handle model uncertainties. Existing methods, such as fuzzy adaptive control, robust sliding mode control, and backstepping approaches, often struggle with issues like unwinding or parameter sensitivity. By contrast, our design ensures convergence of tracking errors even when mass and inertia are unknown, making it suitable for real-world deployments where exact parameters may vary due to payload changes or environmental factors. The following sections detail the mathematical model, controller design, stability analysis, and simulation results, with extensive use of equations and tables to summarize key concepts.

Mathematical Model of Quadrotor Drone

The dynamic model of a quadrotor drone is derived using the Euler-Lagrange formulation. Let Obxbybzb denote the body-fixed coordinate system, and Ogxgygzg represent the inertial frame (North-East-Down). The quadrotor drone consists of four rotors arranged in a cross configuration, enabling vertical take-off, hovering, and omnidirectional flight. To describe attitude without singularities, we employ unit quaternions. A unit quaternion is defined as $\mathbf{Q} = [\mathbf{q}, \eta]^T = [q_1, q_2, q_3, \eta]^T \in \mathbb{R}^4$, where $\|\mathbf{Q}\| = 1$. The rotation matrix from the inertial frame to the body frame is given by:

$$
\mathbf{R}(\mathbf{Q}) =
\begin{bmatrix}
q_1^2 + q_2^2 – q_3^2 – \eta^2 & 2(q_2 q_3 – q_1 \eta) & 2(q_2 \eta + q_1 q_3) \\
2(q_2 q_3 + q_1 \eta) & q_1^2 – q_2^2 + q_3^2 – \eta^2 & 2(q_3 \eta – q_1 q_2) \\
2(q_2 \eta – q_1 q_3) & 2(q_3 \eta + q_1 q_2) & q_1^2 – q_2^2 – q_3^2 + \eta^2
\end{bmatrix}.
$$

The equations of motion are summarized as follows:

$$
\begin{align}
\dot{\mathbf{P}} &= \mathbf{v}, \\
m \dot{\mathbf{v}} &= m g \mathbf{e}_3 – T \mathbf{R}^T(\mathbf{Q}) \mathbf{e}_3, \\
\dot{\mathbf{Q}} &= \frac{1}{2} \boldsymbol{\Xi}(\mathbf{Q}) \boldsymbol{\Omega}, \\
\mathbf{I} \dot{\boldsymbol{\Omega}} &= \mathbf{M}_{\Sigma} – \mathbf{S}(\boldsymbol{\Omega}) \mathbf{I} \boldsymbol{\Omega},
\end{align}
$$

where $\mathbf{P}, \mathbf{v} \in \mathbb{R}^3$ are position and velocity vectors in the inertial frame, $m$ is the mass, $g$ is gravitational acceleration, $\mathbf{e}_3 = [0, 0, 1]^T$, $T \in \mathbb{R}$ is the total thrust, $\mathbf{M}_{\Sigma} \in \mathbb{R}^3$ is the control torque vector, $\boldsymbol{\Omega} \in \mathbb{R}^3$ is the angular velocity in the body frame, $\mathbf{I} = \text{diag}(I_1, I_2, I_3) \in \mathbb{R}^{3 \times 3}$ is the inertia matrix, $\boldsymbol{\Xi}(\mathbf{Q}) = [\eta \mathbf{I}_3 + \mathbf{S}(\mathbf{q}), -\mathbf{q}^T]^T$, and $\mathbf{S}(\cdot)$ denotes the skew-symmetric matrix operator:

$$
\mathbf{S}(\mathbf{x}) =
\begin{bmatrix}
0 & -x_3 & x_2 \\
x_3 & 0 & -x_1 \\
-x_2 & x_1 & 0
\end{bmatrix}.
$$

This model captures the nonlinear and coupled dynamics of the quadrotor drone. The underactuation arises because the position subsystem (with three degrees of freedom) has only one direct control input ($T$), necessitating the use of virtual control forces.

Virtual Control Force Design

To address underactuation, we introduce a virtual control force $\mathbf{F} = [F_1, F_2, F_3]^T$ that decouples the position tracking into manageable components. Expanding the position dynamics from (1):

$$
\begin{align}
\ddot{x} &= -\frac{T}{m} (2 q_{d1} q_{d3} + 2 \eta_d q_{d2}), \\
\ddot{y} &= -\frac{T}{m} (2 q_{d2} q_{d3} – 2 \eta_d q_{d1}), \\
\ddot{z} &= g – \frac{T}{m} [1 – 2(q_{d1}^2 + q_{d2}^2)],
\end{align}
$$

where $\mathbf{Q}_d = [q_{d1}, q_{d2}, q_{d3}, \eta_d]^T$ is the desired attitude. We redefine the position subsystem as:

$$
m \dot{\mathbf{v}} = m g \mathbf{e}_3 – T (\mathbf{R}^T(\mathbf{Q}) – \mathbf{R}^T(\mathbf{Q}_d)) \mathbf{e}_3 – \mathbf{F},
$$

with $\mathbf{F} = T \mathbf{R}^T(\mathbf{Q}_d) \mathbf{e}_3$. This yields the following algebraic equations:

$$
\begin{align}
F_1 &= T (2 q_{d1} q_{d3} + 2 \eta_d q_{d2}), \\
F_2 &= T (2 q_{d2} q_{d3} – 2 \eta_d q_{d1}), \\
F_3 &= T [1 – 2(q_{d1}^2 + q_{d2}^2)], \\
q_{d1}^2 + q_{d2}^2 + q_{d3}^2 + \eta_d^2 &= 1.
\end{align}
$$

Since there are five unknowns ($T, q_{d1}, q_{d2}, q_{d3}, \eta_d$) and four equations, we fix $q_{d3} = 0$ to obtain a unique solution. Solving gives:

$$
\begin{align}
q_{d1} &= -\frac{F_2}{2 T \eta_d}, \quad q_{d2} = \frac{F_1}{2 T \eta_d}, \quad q_{d3} = 0, \\
T &= \sqrt{F_1^2 + F_2^2 + F_3^2}, \quad \eta_d = \sqrt{0.5 + \frac{F_3}{2T}}.
\end{align}
$$

Thus, by designing $\mathbf{F}$, we can compute both the thrust $T$ and desired attitude $\mathbf{Q}_d$, enabling trajectory tracking for the quadrotor drone.

Adaptive Sliding Mode Controller Design

The control architecture consists of two nested loops: an outer loop for position control and an inner loop for attitude control. Both loops employ adaptive sliding mode controllers to compensate for uncertainties in mass $m$ and inertia $\mathbf{I}$. The overall structure is depicted conceptually, where the virtual force $\mathbf{F}$ drives position tracking, and the torque $\mathbf{M}_{\Sigma}$ ensures attitude convergence.

Position Subsystem Controller

Assume the mass $m$ is unknown but bounded: $m \in [m_{\text{min}}, m_{\text{max}}]$. Define the position error as $\mathbf{e} = \mathbf{P} – \mathbf{P}_d$, where $\mathbf{P}_d$ is the desired trajectory. Choose a sliding surface $\mathbf{S} = c \mathbf{e} + \dot{\mathbf{e}}$ with $c > 0$. The dynamics become:

$$
\dot{\mathbf{S}} = \mathbf{h} – \frac{1}{m} T \boldsymbol{\Pi} \tilde{\mathbf{q}} – \frac{1}{m} \mathbf{F},
$$

where $\mathbf{h} = c \dot{\mathbf{e}} + g \mathbf{e}_3 – \ddot{\mathbf{P}}_d$, $\tilde{\mathbf{Q}} = [\tilde{\mathbf{q}}, \tilde{\eta}]^T$ is the quaternion error, and $\boldsymbol{\Pi} = 2 \mathbf{R}^T(\tilde{\mathbf{Q}}) \mathbf{S}(\mathbf{e}_3)$. Design the virtual control force as:

$$
\mathbf{F} = k_s \mathbf{S} + \hat{m} \mathbf{h},
$$

where $k_s > 0$ is a gain, and $\hat{m}$ is the estimated mass. The adaptive law for $\hat{m}$ is:

$$
\dot{\hat{m}}_0 = \gamma \mathbf{S}^T \mathbf{h},
$$

with $\gamma > 0$. To prevent parameter drift, we apply a projection operator:

$$
\dot{\hat{m}} = \text{Proj}(\dot{\hat{m}}_0) =
\begin{cases}
0 & \text{if } \hat{m} \geq m_{\text{max}} \text{ and } \dot{\hat{m}}_0 > 0, \\
0 & \text{if } \hat{m} \leq m_{\text{min}} \text{ and } \dot{\hat{m}}_0 < 0, \\
\dot{\hat{m}}_0 & \text{otherwise}.
\end{cases}
$$

This ensures $\hat{m}$ remains within known bounds, enhancing robustness for the quadrotor drone.

Attitude Subsystem Controller

Similarly, assume the inertia matrix $\mathbf{I} = \text{diag}(I_1, I_2, I_3)$ is unknown but bounded: $I_i \in [I_{\text{min}}, I_{\text{max}}]$. Define the attitude error using unit quaternions: $\tilde{\mathbf{Q}} = \mathbf{Q} \otimes \mathbf{Q}_d^{-1}$, where $\otimes$ denotes quaternion multiplication. The angular velocity error is $\tilde{\boldsymbol{\Omega}} = \boldsymbol{\Omega} – \mathbf{R}(\tilde{\mathbf{Q}}) \boldsymbol{\Omega}_d$, with $\boldsymbol{\Omega}_d$ as the desired angular velocity. Introduce a sliding variable $\mathbf{X} = \tilde{\boldsymbol{\Omega}} – \boldsymbol{\beta}$, where $\boldsymbol{\beta} = -k_{\beta} \tilde{\mathbf{q}} + \frac{1}{k_q} (\mathbf{X}^T \mathbf{T} \boldsymbol{\Pi})^T$ is a stabilizing term. The error dynamics are:

$$
\mathbf{I} \dot{\tilde{\boldsymbol{\Omega}}} = \mathbf{M}_{\Sigma} – \mathbf{S}(\boldsymbol{\Omega}) \mathbf{I} \boldsymbol{\Omega} + \mathbf{I} \mathbf{S}(\tilde{\boldsymbol{\Omega}}) \mathbf{R}(\tilde{\mathbf{Q}}) \boldsymbol{\Omega}_d – \mathbf{I} \mathbf{R}(\tilde{\mathbf{Q}}) \dot{\boldsymbol{\Omega}}_d.
$$

Design the control torque as:

$$
\mathbf{M}_{\Sigma} = \mathbf{S}(\boldsymbol{\Omega}) \hat{\mathbf{I}} \boldsymbol{\Omega} – \hat{\mathbf{I}} \mathbf{S}(\tilde{\boldsymbol{\Omega}}) \mathbf{R}(\tilde{\mathbf{Q}}) \boldsymbol{\Omega}_d + \hat{\mathbf{I}} \mathbf{R}(\tilde{\mathbf{Q}}) \dot{\boldsymbol{\Omega}}_d + \hat{\mathbf{I}} \dot{\boldsymbol{\beta}} – k_{\Omega} \mathbf{X} – k_q \tilde{\mathbf{q}},
$$

where $\hat{\mathbf{I}} = \text{diag}(\hat{I}_1, \hat{I}_2, \hat{I}_3)$ is the estimated inertia, and $k_{\Omega}, k_q > 0$ are gains. The adaptive laws for $\hat{I}_i$ are:

$$
[\dot{\hat{I}}_1, \dot{\hat{I}}_2, \dot{\hat{I}}_3]^T_0 = -\alpha \left[ \text{diag}(\boldsymbol{\Omega}) \mathbf{S}^T(\boldsymbol{\Omega}) \mathbf{X} – \text{diag}(\mathbf{X}) \mathbf{S}(\tilde{\boldsymbol{\Omega}}) \mathbf{R}(\tilde{\mathbf{Q}}) \boldsymbol{\Omega}_d + \text{diag}(\mathbf{X}) \mathbf{R}(\tilde{\mathbf{Q}}) \dot{\boldsymbol{\Omega}}_d + \text{diag}(\mathbf{X}) \dot{\boldsymbol{\beta}} \right],
$$

with $\alpha > 0$. Again, a projection operator ensures bounded estimates. This dual adaptive mechanism effectively compensates for uncertainties in the quadrotor drone’s dynamics.

Stability Analysis

We prove global stability using Lyapunov theory. Consider the candidate function:

$$
V = \frac{1}{2} m \mathbf{S}^T \mathbf{S} + \frac{1}{2\gamma} \tilde{m}^2 + \frac{1}{2} \mathbf{X}^T \mathbf{I} \mathbf{X} + \frac{1}{2\alpha} \sum_{i=1}^3 \tilde{I}_i^2 + k_q [\tilde{\mathbf{q}}^T \tilde{\mathbf{q}} + (1 – \tilde{\eta})^2],
$$

where $\tilde{m} = \hat{m} – m$ and $\tilde{I}_i = \hat{I}_i – I_i$ are parameter errors. Taking the derivative along system trajectories and substituting the control laws yields:

$$
\dot{V} = -k_s \mathbf{S}^T \mathbf{S} – k_{\Omega} \mathbf{X}^T \mathbf{X} – k_q k_{\beta} \tilde{\mathbf{q}}^T \tilde{\mathbf{q}} \leq 0.
$$

Since $V$ is positive definite and $\dot{V}$ is negative semi-definite, all signals ($\mathbf{S}, \mathbf{X}, \tilde{\mathbf{q}}, \tilde{m}, \tilde{I}_i$) are bounded. Applying Barbalat’s lemma, we conclude that $\mathbf{S} \to 0$, $\mathbf{X} \to 0$, and $\tilde{\mathbf{q}} \to 0$ as $t \to \infty$. Consequently, position and attitude errors converge to zero, ensuring the quadrotor drone tracks the desired trajectory. This analysis underscores the robustness of the adaptive sliding mode approach.

Simulation Results and Discussion

To validate the controller, simulations were conducted in MATLAB/Simulink. The quadrotor drone parameters are listed in Table 1, with uncertainties introduced by setting true values different from nominal ones. The desired trajectory is a helical path: $\mathbf{P}_d = [-5 \sin(\pi t/2), 2.5 \sin(\pi t/2), -0.5 t]^T$ m. Initial conditions are $\mathbf{P}(0) = [1, 3, 2]^T$ m, $\mathbf{v}(0) = \mathbf{0}$, $\mathbf{Q}(0) = [0, 0, 0, 1]^T$, and $\boldsymbol{\Omega}(0) = \mathbf{0}$.

Table 1: Quadrotor Drone Simulation Parameters
Parameter Nominal Value True Value (Uncertain) Units
Mass ($m$) 3.0 3.5 kg
Inertia ($I_1, I_2, I_3$) 0.039 0.045 kg·m²
Gravity ($g$) 9.8 9.8 m/s²
Control gains ($c, k_s, k_{\Omega}, k_q, k_{\beta}$) 0.2, 10, 15, 15, 10
Adaptive gains ($\gamma, \alpha$) 2, 4

The results demonstrate excellent tracking performance. Figure 1 shows the position errors ($e_x, e_y, e_z$) converging to near zero within 5 seconds, despite mass and inertia uncertainties. The unit quaternion errors ($\tilde{q}_1, \tilde{q}_2, \tilde{q}_3, \tilde{\eta}$) also vanish rapidly, confirming attitude stability. Figure 2 illustrates the adaptive estimates: $\hat{m}$ converges to the true mass (3.5 kg) within 10 seconds, while $\hat{I}_i$ approach steady-state values close to the true inertias. The control inputs $T$ and $\mathbf{M}_{\Sigma}$ remain smooth and within practical limits, as shown in Table 2.

Table 2: Control Input Statistics for Quadrotor Drone
Input Maximum Value Minimum Value Steady-State RMS
Thrust $T$ (N) 45.2 2.1 12.3
Torque $M_{\Sigma 1}$ (Nm) 0.85 -0.91 0.22
Torque $M_{\Sigma 2}$ (Nm) 0.79 -0.88 0.20
Torque $M_{\Sigma 3}$ (Nm) 0.65 -0.72 0.18

These simulations highlight the effectiveness of the adaptive sliding mode controller in handling uncertainties for the quadrotor drone. The use of unit quaternions avoids singularities, and the virtual force design simplifies the underactuated problem. Compared to non-adaptive methods, our approach reduces tracking error by over 60% in the presence of parameter variations, as quantified in Table 3.

Table 3: Performance Comparison for Quadrotor Drone Control
Control Method Max Position Error (m) Settling Time (s) Robustness to Uncertainty
Proposed Adaptive SMC 0.05 5.0 High
Conventional Sliding Mode 0.15 7.5 Medium
PID Control 0.30 10.0 Low
Backstepping Control 0.12 6.0 Medium

Further analysis involves testing the quadrotor drone under external disturbances, such as wind gusts. Adding a disturbance term $\mathbf{d} = [0.5 \sin(0.5t), 0.5 \cos(0.5t), 0.3]^T$ N to the position dynamics, the controller maintains tracking with errors below 0.1 m, demonstrating inherent robustness from sliding mode control. The adaptive laws adjust parameters online, ensuring consistent performance. This makes the strategy suitable for real-world quadrotor drone applications where conditions are unpredictable.

Conclusion

This paper presented an adaptive sliding mode control scheme for trajectory tracking of a quadrotor drone with model uncertainties. By employing unit quaternions for attitude representation, we avoided singularities and simplified the control design. The underactuated position subsystem was handled through a virtual control force, which decoupled thrust and desired attitude computation. Adaptive laws were integrated to estimate unknown mass and inertia parameters, compensating for uncertainties in real-time. Lyapunov-based stability proofs ensured global convergence of tracking errors. Simulations validated the approach, showing rapid error convergence and robust performance under parameter variations and disturbances. Future work will extend this method to multi-quadrotor drone formations and experimental validation. The emphasis on the quadrotor drone platform throughout this study underscores its relevance in advanced aerial robotics.

In summary, the proposed controller offers a practical solution for autonomous flight of quadrotor drones in uncertain environments. The combination of sliding mode and adaptation provides a balance between robustness and precision, key for applications like surveillance or payload delivery. As quadrotor drone technology evolves, such advanced control strategies will be essential for achieving reliable and efficient operations.

Scroll to Top