Quadrotor Drone Trajectory Tracking Control Using Disturbance Observer and Sliding Mode Control

In recent years, the trajectory tracking problem for quadrotor drones has garnered significant attention due to their wide applications in civilian and military fields. As an autonomous aerial vehicle, the quadrotor drone offers advantages such as free hovering, vertical take-off and landing, low cost, and ease of operation. However, during flight, the quadrotor drone is susceptible to external disturbances like wind gusts, ground effects, and blade flapping, which complicate controller design and stability analysis. Therefore, achieving precise trajectory tracking in the presence of disturbances is a critical challenge for quadrotor drone flight control systems. In this paper, I propose a novel control strategy that integrates a disturbance observer with sliding mode control to ensure rapid and smooth tracking of desired trajectories. The approach addresses the underactuated nature of the quadrotor drone by decomposing the system into position and attitude subsystems, using unit quaternions for singularity-free attitude representation, and designing online estimators for disturbance forces and moments. Through theoretical analysis and simulations, I demonstrate the effectiveness and robustness of the proposed controller.

The quadrotor drone is a versatile platform consisting of a cross-shaped airframe with four independent rotors driven by brushless DC motors. These rotors generate lift and anti-torque, enabling stable flight. To model the dynamics, I consider an inertial frame $\{I\} = \{x_I, y_I, z_I\}$ and a body frame $\{B\} = \{x_B, y_B, z_B\}$. The position of the quadrotor drone in the inertial frame is denoted by $\mathbf{p}(t) \in \mathbb{R}^3$, and its linear velocity by $\mathbf{v}(t) \in \mathbb{R}^3$. The attitude is represented using unit quaternions to avoid singularities. A unit quaternion $\mathbf{Q} = [\eta, \boldsymbol{\epsilon}^T]^T \in \mathbb{R}^4$ consists of a scalar part $\eta$ and a vector part $\boldsymbol{\epsilon} = [\epsilon_1, \epsilon_2, \epsilon_3]^T$, satisfying $||\mathbf{Q}|| = 1$. The rotation matrix from the inertial frame to the body frame is given by:

$$ \mathbf{R}(\mathbf{Q}) = (\eta^2 – ||\boldsymbol{\epsilon}||^2) \mathbf{I}_3 + 2\boldsymbol{\epsilon}\boldsymbol{\epsilon}^T – 2\eta \mathbf{S}(\boldsymbol{\epsilon}) $$

where $\mathbf{I}_3$ is the $3 \times 3$ identity matrix, and $\mathbf{S}(\boldsymbol{\epsilon})$ is the skew-symmetric matrix associated with $\boldsymbol{\epsilon}$:

$$ \mathbf{S}(\boldsymbol{\epsilon}) = \begin{bmatrix} 0 & -\epsilon_3 & \epsilon_2 \\ \epsilon_3 & 0 & -\epsilon_1 \\ -\epsilon_2 & \epsilon_1 & 0 \end{bmatrix} $$

Using the Euler-Lagrangian formulation, the dynamic model of the quadrotor drone is derived as follows:

$$ m \dot{\mathbf{v}} = m g \mathbf{e}_3 – T \mathbf{R}(\mathbf{Q}) \mathbf{e}_3 – \mathbf{d}_1 $$
$$ \dot{\mathbf{p}} = \mathbf{v} $$
$$ \dot{\mathbf{Q}} = \frac{1}{2} \mathbf{T}(\mathbf{Q}) \boldsymbol{\omega} $$
$$ \mathbf{J} \dot{\boldsymbol{\omega}} = \boldsymbol{\tau} – \mathbf{S}(\boldsymbol{\omega}) \mathbf{J} \boldsymbol{\omega} + \mathbf{d}_2 $$

Here, $m$ is the mass, $g$ is gravitational acceleration, $\mathbf{e}_3 = [0, 0, 1]^T$, $T \in \mathbb{R}$ is the thrust input, $\boldsymbol{\tau} \in \mathbb{R}^3$ is the input torque, $\boldsymbol{\omega} \in \mathbb{R}^3$ is the angular velocity in the body frame, $\mathbf{J} \in \mathbb{R}^{3 \times 3}$ is the inertia matrix, and $\mathbf{d}_1 \in \mathbb{R}^3$ and $\mathbf{d}_2 \in \mathbb{R}^3$ represent disturbance forces and moments, respectively. The matrix $\mathbf{T}(\mathbf{Q})$ is defined as:

$$ \mathbf{T}(\mathbf{Q}) = \begin{bmatrix} -\boldsymbol{\epsilon}^T \\ \eta \mathbf{I}_3 + \mathbf{S}(\boldsymbol{\epsilon}) \end{bmatrix} $$

To address the underactuated nature, I introduce a virtual control force $\mathbf{F} \in \mathbb{R}^3$ for the position subsystem. This allows extraction of the actual thrust $T$ and desired attitude $\mathbf{Q}_d$. The control structure is illustrated in the following diagram, which shows the decomposition into position and attitude loops with disturbance observers.

The position tracking error is defined as $\tilde{\mathbf{p}} = \mathbf{p} – \mathbf{p}_d$, and the velocity tracking error as $\tilde{\mathbf{v}} = \mathbf{v} – \dot{\mathbf{p}}_d$, where $\mathbf{p}_d(t)$ is the desired trajectory. A sliding surface $\mathbf{s} \in \mathbb{R}^3$ is designed:

$$ \mathbf{s} = \tilde{\mathbf{v}} + c \tilde{\mathbf{p}} $$

where $c > 0$ is a constant. To estimate the disturbance force $\mathbf{d}_1$, I design a disturbance observer:

$$ \hat{\mathbf{d}}_1 = \mathbf{z}_1 + l_1 m \mathbf{v} $$
$$ \dot{\mathbf{z}}_1 = -l_1 (\hat{\mathbf{d}}_1 – m g \mathbf{e}_3 + T \mathbf{R}(\mathbf{Q}) \mathbf{e}_3 + \mathbf{F} + m \dot{\mathbf{v}}_d) $$

with $l_1 > 0$. Assuming $\mathbf{d}_1$ is slowly time-varying, the estimation error $\tilde{\mathbf{d}}_1 = \mathbf{d}_1 – \hat{\mathbf{d}}_1$ converges exponentially to zero. The virtual control law for the position subsystem is:

$$ \mathbf{F} = m (c \tilde{\mathbf{v}} + g \mathbf{e}_3 + \dot{\mathbf{v}}_d) + k_1 \mathbf{s} – \hat{\mathbf{d}}_1 $$

where $k_1 > 0$. From $\mathbf{F}$, the actual thrust $T$ and desired quaternion $\mathbf{Q}_d$ are computed. The thrust is given by $T = ||\mathbf{F}||$, and the desired quaternion is derived from:

$$ \mathbf{Q}_d = \left[ \cos\left(\frac{\theta}{2}\right), \sin\left(\frac{\theta}{2}\right) \mathbf{a}^T \right]^T $$

where $\theta = \cos^{-1}(F_z / ||\mathbf{F}||)$ and $\mathbf{a} = \mathbf{S}(\mathbf{e}_3) \mathbf{F} / ||\mathbf{S}(\mathbf{e}_3) \mathbf{F}||$.

For the attitude subsystem, the attitude error quaternion $\tilde{\mathbf{Q}} = [\tilde{\eta}, \tilde{\boldsymbol{\epsilon}}^T]^T$ is defined based on $\mathbf{Q}$ and $\mathbf{Q}_d$. The angular velocity error is $\boldsymbol{\nu} = \boldsymbol{\omega} – \boldsymbol{\omega}_d$, where $\boldsymbol{\omega}_d$ is the desired angular velocity derived from $\mathbf{Q}_d$. A sliding surface $\boldsymbol{\sigma} \in \mathbb{R}^3$ is introduced:

$$ \boldsymbol{\sigma} = \boldsymbol{\nu} + k_q \tilde{\boldsymbol{\epsilon}} $$

with $k_q > 0$. A disturbance observer for $\mathbf{d}_2$ is designed as:

$$ \hat{\mathbf{d}}_2 = \mathbf{z}_2 + l_2 \mathbf{J} \boldsymbol{\omega} $$
$$ \dot{\mathbf{z}}_2 = -l_2 (\hat{\mathbf{d}}_2 – \boldsymbol{\tau} + \mathbf{S}(\boldsymbol{\omega}) \mathbf{J} \boldsymbol{\omega} – \mathbf{J} \mathbf{S}(\boldsymbol{\omega}) \mathbf{R}(\mathbf{Q}) \boldsymbol{\omega}_d + \mathbf{J} \mathbf{R}(\mathbf{Q}) \dot{\boldsymbol{\omega}}_d) $$

where $l_2 > 0$. The control torque $\boldsymbol{\tau}$ is then designed using sliding mode control:

$$ \boldsymbol{\tau} = \mathbf{S}(\boldsymbol{\omega}) \mathbf{J} \boldsymbol{\omega} – \mathbf{J} \mathbf{S}(\boldsymbol{\omega}) \mathbf{R}(\mathbf{Q}) \boldsymbol{\omega}_d + \mathbf{J} \mathbf{R}(\mathbf{Q}) \dot{\boldsymbol{\omega}}_d + \mathbf{J} \dot{\boldsymbol{\omega}}_d – k_\nu \boldsymbol{\nu} – k_\sigma \boldsymbol{\sigma} – \hat{\mathbf{d}}_2 $$

with gains $k_\nu > 0$ and $k_\sigma > 0$. The stability of the closed-loop system is analyzed using Lyapunov theory. Consider the Lyapunov function candidate:

$$ V = \frac{1}{2} \mathbf{s}^T \mathbf{s} + \frac{1}{2} \boldsymbol{\sigma}^T \boldsymbol{\sigma} + 2(1 – \tilde{\eta}) + \frac{1}{2l_1} \tilde{\mathbf{d}}_1^T \tilde{\mathbf{d}}_1 + \frac{1}{2l_2} \tilde{\mathbf{d}}_2^T \tilde{\mathbf{d}}_2 $$

Taking its derivative along the system trajectories and substituting the control laws yields:

$$ \dot{V} \leq -k_1 ||\mathbf{s}||^2 – k_\sigma ||\boldsymbol{\sigma}||^2 – k_q ||\tilde{\boldsymbol{\epsilon}}||^2 – \frac{l_1}{2} ||\tilde{\mathbf{d}}_1||^2 – \frac{l_2}{2} ||\tilde{\mathbf{d}}_2||^2 $$

Thus, by selecting appropriate gains, $\dot{V}$ is negative definite, ensuring asymptotic stability of the tracking errors and disturbance estimation errors. The quadrotor drone trajectory tracking system achieves convergence to the desired trajectory and attitude.

To validate the proposed controller, I conduct simulations with a quadrotor drone of mass $m = 3 \, \text{kg}$ and inertia matrix $\mathbf{J} = \text{diag}(0.04, 0.04, 0.04) \, \text{kg} \cdot \text{m}^2$. The desired trajectory is set as $\mathbf{p}_d(t) = [-5 \sin(0.1 t), 2.5 \sin(0.2 t), -0.5 t]^T \, \text{m}$. Disturbance forces and moments are modeled as slow time-varying signals: $\mathbf{d}_1 = [0.2 \sin(0.1 \pi t), 0.4 \cos(0.1 \pi t), 0.6 \sin(0.2 \pi t)]^T \, \text{N}$ and $\mathbf{d}_2 = [0.1 \sin(0.1 \pi t) + 0.1, 0.2 \cos(0.1 \pi t) + 0.1, 0.3 \sin(0.1 \pi t) + 0.2]^T \, \text{N} \cdot \text{m}$. Control gains are chosen as $c = 1$, $k_1 = 1.5$, $k_q = 2$, $k_\nu = 2$, $k_\sigma = 2$, $l_1 = 1.5$, and $l_2 = 10$. The simulation results demonstrate effective trajectory tracking and disturbance estimation. The quadrotor drone quickly converges to the desired path, and the disturbance observers accurately estimate the external perturbations, as summarized in the tables below.

Table 1: Control Parameters for the Quadrotor Drone
Parameter Symbol Value Unit
Mass $m$ 3 kg
Inertia (x-axis) $J_{xx}$ 0.04 kg·m²
Inertia (y-axis) $J_{yy}$ 0.04 kg·m²
Inertia (z-axis) $J_{zz}$ 0.04 kg·m²
Gravity $g$ 9.8 m/s²
Position gain $c$ 1
Sliding gain 1 $k_1$ 1.5
Attitude gain $k_q$ 2
Angular velocity gain $k_\nu$ 2
Sliding gain 2 $k_\sigma$ 2
Observer gain 1 $l_1$ 1.5
Observer gain 2 $l_2$ 10
Table 2: Performance Metrics of the Quadrotor Drone Controller
Metric Value Description
Trajectory Tracking Error < 0.1 m RMS position error after convergence
Attitude Tracking Error < 0.05 rad RMS quaternion error after convergence
Disturbance Estimation Error < 0.01 N RMS force estimation error
Disturbance Estimation Error < 0.005 N·m RMS torque estimation error
Settling Time ~5 s Time to reach steady-state tracking
Control Input Saturation None Thrust and torque within limits

The simulation plots illustrate the quadrotor drone’s trajectory tracking performance, where the actual path closely follows the desired 3D curve. The attitude tracking shows rapid convergence of the unit quaternions to their desired values. Additionally, the disturbance observers provide accurate estimates of both force and moment disturbances, compensating for external effects in real-time. These results highlight the robustness of the proposed method in handling uncertainties and perturbations common in quadrotor drone operations.

In this paper, I have presented a comprehensive control strategy for quadrotor drone trajectory tracking under external disturbances. The key contributions include the use of unit quaternions for singularity-free attitude representation, the design of disturbance observers for online estimation of forces and moments, and the integration of sliding mode control for robust tracking. The virtual control force approach effectively handles the underactuated position subsystem, while Lyapunov-based stability analysis guarantees asymptotic convergence. Simulations confirm that the quadrotor drone achieves high-precision tracking even in the presence of time-varying disturbances. Future work may focus on extending this framework to multi-agent quadrotor drone systems or incorporating adaptive mechanisms for time-varying parameters. Overall, this research advances the field of autonomous aerial vehicles by enhancing the reliability and performance of quadrotor drone control in practical environments.

The quadrotor drone platform continues to evolve, with applications ranging from surveillance to delivery services. My approach demonstrates that advanced control techniques, such as disturbance observers and sliding mode control, can significantly improve the operational capabilities of quadrotor drones. By ensuring stable and accurate trajectory tracking, these methods enable more complex missions and greater autonomy. As technology progresses, the integration of machine learning and sensor fusion could further enhance the robustness of quadrotor drone systems, making them indispensable tools in modern robotics.

To summarize, the mathematical formulation for the quadrotor drone dynamics is encapsulated in the following equations, which serve as the foundation for controller design:

$$ \text{Position Dynamics: } m \ddot{\mathbf{p}} = m g \mathbf{e}_3 – T \mathbf{R}(\mathbf{Q}) \mathbf{e}_3 – \mathbf{d}_1 $$
$$ \text{Attitude Dynamics: } \mathbf{J} \dot{\boldsymbol{\omega}} = \boldsymbol{\tau} – \mathbf{S}(\boldsymbol{\omega}) \mathbf{J} \boldsymbol{\omega} + \mathbf{d}_2 $$
$$ \text{Kinematics: } \dot{\mathbf{Q}} = \frac{1}{2} \mathbf{T}(\mathbf{Q}) \boldsymbol{\omega} $$

The control laws and disturbance observers are designed to mitigate the effects of $\mathbf{d}_1$ and $\mathbf{d}_2$, ensuring that the quadrotor drone tracks desired trajectories with minimal error. This framework is versatile and can be adapted to various quadrotor drone configurations and mission profiles.

In conclusion, the quadrotor drone trajectory tracking problem is effectively addressed through a synergistic combination of modern control theories. The proposed methodology not only provides theoretical guarantees but also practical viability, as evidenced by simulation studies. I believe that this work contributes to the ongoing efforts to make quadrotor drones more reliable and capable in real-world scenarios, paving the way for future innovations in aerial robotics.

Scroll to Top