Trajectory Tracking Control of Quadrotor Drones Based on a State Observer and Advanced Sliding Mode Strategy

The precise trajectory tracking control of a quadrotor drone remains a significant challenge within the field of aerial robotics. This complexity arises from the system’s inherent nonlinear, underactuated, strongly coupled, and multivariable nature. Furthermore, in real-world applications, the quadrotor drone is perpetually subject to internal model uncertainties—such as unmodeled motor dynamics and parametric variations—and external disturbances like wind gusts. Traditional control methodologies often struggle to deliver consistent, high-performance tracking under such conditions due to their reliance on precise models or their limited robustness. This article presents a comprehensive control framework designed to address these challenges, culminating in a robust and finite-time convergent control law for a quadrotor drone.

A conceptual illustration of a quadrotor drone and its coordinate systems, foundational for dynamic modeling.

To lay the groundwork for controller design, an accurate dynamic model of the quadrotor drone must be established. We begin by defining two right-handed coordinate frames: the Earth-fixed inertial frame \(\mathcal{F}_E(O_E, X_E, Y_E, Z_E)\) and the body-fixed frame \(\mathcal{F}_B(O_B, X_B, Y_B, Z_B)\) attached to the center of mass of the quadrotor drone. The standard assumptions are made: the quadrotor is a rigid and symmetrical body, its mass and inertia are constant, and its center of geometry coincides with its center of gravity.

1. Comprehensive Dynamic Modeling

1.1 Rigid-Body Dynamics and Kinematics

Let the position and linear velocity vectors in \(\mathcal{F}_E\) be denoted by \(\boldsymbol{P} = [x, y, z]^T\) and \(\boldsymbol{v} = [\dot{x}, \dot{y}, \dot{z}]^T\), respectively. The attitude is represented by the Euler angle vector \(\boldsymbol{\Theta} = [\phi, \theta, \psi]^T\), where \(\phi\), \(\theta\), and \(\psi\) are the roll, pitch, and yaw angles. The angular velocity vector in \(\mathcal{F}_B\) is \(\boldsymbol{\omega} = [p, q, r]^T\). Applying the Newton-Euler formulation and incorporating linear aerodynamic drag effects, the six-degree-of-freedom equations of motion for the quadrotor drone are derived as follows:

$$
\begin{aligned}
\ddot{x} &= -\frac{f}{m}(\cos\psi\sin\theta\cos\phi + \sin\psi\sin\phi) – \frac{\rho_1 \dot{x}}{m} + d_1 \\
\ddot{y} &= -\frac{f}{m}(\sin\psi\sin\theta\cos\phi – \cos\psi\sin\phi) – \frac{\rho_2 \dot{y}}{m} + d_2 \\
\ddot{z} &= g – \frac{f}{m}\cos\phi\cos\theta – \frac{\rho_3 \dot{z}}{m} + d_3 \\
\dot{p} &= \frac{1}{I_x}[\tau_x + qr(I_y – I_z) – J_{RP} q \Omega – \rho_4 p] + d_4 \\
\dot{q} &= \frac{1}{I_y}[\tau_y + pr(I_z – I_x) + J_{RP} p \Omega – \rho_5 q] + d_5 \\
\dot{r} &= \frac{1}{I_z}[\tau_z + pq(I_x – I_y) – \rho_6 r] + d_6
\end{aligned}
$$

Where \(m\) is the mass, \(g\) is gravitational acceleration, \(f\) is the total thrust generated by the four rotors, \(\boldsymbol{\tau} = [\tau_x, \tau_y, \tau_z]^T\) is the torque vector, \(\boldsymbol{J} = \text{diag}(I_x, I_y, I_z)\) is the inertia matrix, \(J_{RP}\) is the combined rotational inertia of the motor rotor and propeller, \(\rho_i (i=1,…,6)\) are the drag coefficients, \(\Omega = \bar{\omega}_2 + \bar{\omega}_4 – \bar{\omega}_1 – \bar{\omega}_3\) is the overall propeller speed sum, and \(d_i\) represent bounded external disturbances and unmodeled dynamics affecting the quadrotor drone.

1.2 Control Allocation Model

The control inputs for the quadrotor drone are the squared rotational speeds of the four propellers, \(\bar{\omega}_i^2\). For an “X”-configuration quadrotor drone, where the front is between two arms, the mapping from propeller speeds to total thrust \(f\) and body torques \(\boldsymbol{\tau}\) is given by:

$$
\begin{bmatrix} f \\ \tau_x \\ \tau_y \\ \tau_z \end{bmatrix} =
\begin{bmatrix}
c_T & c_T & c_T & c_T \\
-\frac{\sqrt{2}}{2}d c_T & -\frac{\sqrt{2}}{2}d c_T & \frac{\sqrt{2}}{2}d c_T & \frac{\sqrt{2}}{2}d c_T \\
\frac{\sqrt{2}}{2}d c_T & -\frac{\sqrt{2}}{2}d c_T & \frac{\sqrt{2}}{2}d c_T & -\frac{\sqrt{2}}{2}d c_T \\
c_M & -c_M & -c_M & c_M
\end{bmatrix}
\begin{bmatrix} \bar{\omega}_1^2 \\ \bar{\omega}_2^2 \\ \bar{\omega}_3^2 \\ \bar{\omega}_4^2 \end{bmatrix}
$$

Here, \(d\) is the arm length (distance from center to motor), \(c_T\) is the thrust coefficient, and \(c_M\) is the torque coefficient. This matrix is invertible for a well-defined quadrotor drone, allowing computation of required motor speeds from desired forces and torques.

1.3 Actuator Dynamics

The brushless DC motors driving the propellers have their own dynamics, which can significantly affect performance, especially during aggressive maneuvers. These dynamics are often modeled as a first-order system:

$$
\frac{\bar{\omega}_i(s)}{\bar{\omega}_{i}^{ss}(s)} = \frac{1}{T_m s + 1}
$$

where \(\bar{\omega}_{i}^{ss}\) is the commanded steady-state speed and \(T_m\) is the motor time constant. Incorporating this model increases the fidelity of the simulation and challenges the controller to account for actuation lag, making the validation for the quadrotor drone more realistic.

2. Cascade Controller Architecture

The proposed control structure for the quadrotor drone follows a well-established cascade paradigm, consisting of an outer loop for position control and an inner loop for attitude control. This structure effectively handles the underactuation of the system. The outer-loop position controller takes the desired trajectory \(\boldsymbol{P}_d = [x_d, y_d, z_d]^T\) as input and computes the desired total thrust \(f_d\) and desired roll and pitch angles \(\phi_d, \theta_d\). The inner-loop attitude controller takes \(\phi_d, \theta_d\), and the desired yaw angle \(\psi_d\) as inputs and computes the desired body torques \(\boldsymbol{\tau}_d = [\tau_{xd}, \tau_{yd}, \tau_{zd}]^T\). The core innovation lies in the design of each loop’s controller, which integrates an Extended State Observer (ESO) with a Global Fast Terminal Sliding Mode Control (GFTSMC) law.

3. Extended State Observer (ESO) Design

The ESO is a pivotal component for achieving robustness in the quadrotor drone control. It treats all internal couplings (e.g., \(qr(I_y-I_z)\)), unmodeled dynamics, and external disturbances (\(d_i\)) as a generalized “total disturbance” and estimates it in real-time. We illustrate the design for the roll channel (\(\phi\)); the process is identical for other channels.

From the dynamics, the roll acceleration can be expressed as:

$$
\ddot{\phi} = f_\phi(\cdot) + b_\phi u_\phi
$$

where \(f_\phi(\cdot) = \frac{1}{I_x}[qr(I_y – I_z) – J_{RP} q \Omega – \rho_4 p] + d_4\) is the total disturbance, \(b_\phi = 1/I_x\) is the control gain, and \(u_\phi = \tau_{xd}\) is the control input. We assume \(f_\phi(\cdot)\) is differentiable and its derivative \(h = \dot{f}_\phi(\cdot)\) is bounded. Defining the extended state vector \(\boldsymbol{x} = [x_1, x_2, x_3]^T = [\phi, \dot{\phi}, f_\phi(\cdot)]^T\), the system can be rewritten in state-space form:

$$
\begin{aligned}
\dot{\boldsymbol{x}} &= \boldsymbol{A}\boldsymbol{x} + \boldsymbol{B}u_\phi + \boldsymbol{E}h \\
y &= \boldsymbol{C}\boldsymbol{x}
\end{aligned}
$$

with
$$
\boldsymbol{A} = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{bmatrix}, \quad
\boldsymbol{B} = \begin{bmatrix} 0 \\ b_\phi \\ 0 \end{bmatrix}, \quad
\boldsymbol{E} = \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}, \quad
\boldsymbol{C} = \begin{bmatrix} 1 & 0 & 0 \end{bmatrix}.
$$

A linear third-order ESO for this system is constructed as:

$$
\begin{aligned}
\dot{\hat{x}}_1 &= \beta_1 (y – \hat{x}_1) + \hat{x}_2 \\
\dot{\hat{x}}_2 &= \beta_2 (y – \hat{x}_1) + \hat{x}_3 + b_\phi u_\phi \\
\dot{\hat{x}}_3 &= \beta_3 (y – \hat{x}_1)
\end{aligned}
$$

Here, \(\hat{x}_1\), \(\hat{x}_2\), and \(\hat{x}_3\) are the estimates of \(\phi\), \(\dot{\phi}\), and \(f_\phi(\cdot)\), respectively. The observer gains \(\beta_1, \beta_2, \beta_3\) are parameterized using the bandwidth method for simplicity and tuning ease: \([\beta_1, \beta_2, \beta_3] = [3\omega_o, 3\omega_o^2, \omega_o^3]\), where \(\omega_o > 0\) is the observer bandwidth. A sufficiently large \(\omega_o\) ensures the estimation errors converge to a small region around zero rapidly. This ESO provides the crucial estimates \(\hat{f}_\phi(\cdot)\), \(\hat{\phi}\), and \(\hat{\dot{\phi}}\) that will be used in the control law, effectively decoupling the channels and compensating for disturbances in the quadrotor drone.

4. Global Fast Terminal Sliding Mode Control (GFTSMC) Design

Terminal sliding mode control offers finite-time convergence, which is superior to the asymptotic convergence of linear methods. The “global fast” variant ensures fast convergence both far from and near the equilibrium. We integrate the ESO estimates into this framework.

4.1 Position Controller Design

The position dynamics from Eq. (1) can be expressed in a standard form:
$$
\ddot{\boldsymbol{P}} = \boldsymbol{u}_P + \boldsymbol{f}_P(\cdot)
$$
where \(\boldsymbol{u}_P = [u_x, u_y, u_z]^T\) is the virtual control input and \(\boldsymbol{f}_P(\cdot)=[f_x(\cdot), f_y(\cdot), f_z(\cdot)]^T\) is the aggregated disturbance vector for the position channels. These virtual controls relate to the actual physical inputs \((f, \phi_d, \theta_d)\) through the following transformation, assuming \(\psi_d\) is given:

$$
\begin{aligned}
u_x &= -\frac{f}{m}(\cos\psi_d\sin\theta_d\cos\phi_d + \sin\psi_d\sin\phi_d) \\
u_y &= -\frac{f}{m}(\sin\psi_d\sin\theta_d\cos\phi_d – \cos\psi_d\sin\phi_d) \\
u_z &= g – \frac{f}{m}\cos\theta_d\cos\phi_d
\end{aligned}
$$

We design the controller for the \(x\)-channel as a representative case. Define the tracking error \(e_x = x_d – x\). The global fast terminal sliding surface is chosen as:

$$
s_x = \dot{e}_x + \alpha_0 e_x + \beta_0 e_x^{q_0/p_0}
$$

where \(\alpha_0, \beta_0 > 0\), and \(p_0 > q_0 > 0\) are positive odd integers. The fractional power term \(e_x^{q_0/p_0}\) guarantees finite-time convergence. The derivative of the sliding surface is:
$$
\dot{s}_x = \ddot{e}_x + \alpha_0 \dot{e}_x + \beta_0 \frac{q_0}{p_0} e_x^{(q_0/p_0)-1} \dot{e}_x.
$$
Substituting \(\ddot{e}_x = \ddot{x}_d – \ddot{x} = \ddot{x}_d – (u_x + f_x(\cdot))\) and choosing the control law to satisfy \(\dot{s}_x = -\varphi s_x – \gamma s_x^{q/p}\) (which ensures finite-time reachability of \(s_x=0\)), we derive the ESO-based GFTSM control law:

$$
u_x = \ddot{x}_d – \hat{f}_x(\cdot) + \alpha_0 \hat{\dot{e}}_x + \beta_0 \frac{q_0}{p_0} \hat{e}_x^{(q_0/p_0)-1} \hat{\dot{e}}_x + \varphi \hat{s}_x + \gamma \hat{s}_x^{\,q/p}
$$

Here, \(\hat{f}_x(\cdot)\) is the ESO estimate of \(f_x(\cdot)\), \(\hat{e}_x = x_d – \hat{x}\), \(\hat{\dot{e}}_x = \dot{x}_d – \hat{\dot{x}}\), and \(\hat{s}_x\) is the sliding surface computed using the estimates. Parameters \(\varphi, \gamma > 0\), and \(p > q > 0\) are positive odd integers. The terms \(-\varphi \hat{s}_x\) and \(-\gamma \hat{s}_x^{\,q/p}\) enforce convergence. Note the absence of a discontinuous signum function, which mitigates chattering—a common issue in standard SMC for a quadrotor drone. The control laws for \(u_y\) and \(u_z\) are derived identically.

Finally, the desired thrust \(f_d\) and attitude angles \((\phi_d, \theta_d)\) are recovered by inverting the virtual control transformation in Eq. (3):

$$
\begin{aligned}
f_d &= m \sqrt{u_x^2 + u_y^2 + (u_z – g)^2} \\
\phi_d &= \arcsin\left( \frac{u_y \cos\psi_d – u_x \sin\psi_d}{\sqrt{u_x^2 + u_y^2 + (u_z – g)^2}} \right) \\
\theta_d &= \arctan\left( \frac{u_x \cos\psi_d + u_y \sin\psi_d}{u_z – g} \right)
\end{aligned}
$$

4.2 Attitude Controller Design

The attitude control loop receives \(\phi_d, \theta_d, \psi_d\) from the position controller. The design follows the same ESO-GFTSMC principle. For the roll channel, with error \(e_\phi = \phi_d – \phi\), sliding surface \(s_\phi = \dot{e}_\phi + \alpha_0 e_\phi + \beta_0 e_\phi^{\,q_0/p_0}\), and considering \(\ddot{\phi} = f_\phi(\cdot) + b_\phi \tau_{xd}\), the control law is:

$$
\tau_{xd} = \frac{1}{b_\phi} \left[ \ddot{\phi}_d – \hat{f}_\phi(\cdot) + \alpha_0 \hat{\dot{e}}_\phi + \beta_0 \frac{q_0}{p_0} \hat{e}_\phi^{\,(q_0/p_0)-1} \hat{\dot{e}}_\phi + \varphi \hat{s}_\phi + \gamma \hat{s}_\phi^{\,q/p} \right]
$$

The control laws for pitch (\(\tau_{yd}\)) and yaw (\(\tau_{zd}\)) are formulated analogously. These three torque commands, along with the thrust command \(f_d\), are then fed into the control allocation matrix from Section 1.2 to compute the required motor speeds for the quadrotor drone.

5. Stability Analysis

The stability of the closed-loop system for the quadrotor drone is proven using Lyapunov theory. We focus on the roll attitude loop; other channels follow suit.

Theorem 1 (ESO Convergence): For the system in Eq. (2) and the ESO in Eq. (4), there exists a sufficiently large observer bandwidth \(\omega_o\) such that the estimation errors \(\tilde{x}_i = x_i – \hat{x}_i\) converge to a small neighborhood of zero exponentially fast.

Proof Sketch: Defining the estimation error dynamics and choosing a Lyapunov function \(V_o = \frac{1}{2}\tilde{\boldsymbol{x}}^T \boldsymbol{P} \tilde{\boldsymbol{x}}\) with a suitable positive definite matrix \(\boldsymbol{P}\), it can be shown that \(\dot{V}_o \leq -\lambda_{\min}(\boldsymbol{Q}) \|\tilde{\boldsymbol{x}}\|^2\) for some \(\boldsymbol{Q}>0\) when \(\omega_o\) is large enough, proving exponential convergence.

Theorem 2 (Closed-Loop System Stability): The quadrotor drone system under the proposed ESO-based GFTSMC law is uniformly ultimately bounded. Furthermore, with perfect disturbance estimation (\(\hat{f}_\phi = f_\phi\)), the tracking error converges to zero in finite time.

Proof: Consider the Lyapunov function candidate for the controller: \(V_s = \frac{1}{2} s_\phi^2\). Its derivative is:

$$
\dot{V}_s = s_\phi \dot{s}_\phi = s_\phi \left( \ddot{e}_\phi + \alpha_0 \dot{e}_\phi + \beta_0 \frac{q_0}{p_0} e_\phi^{(q_0/p_0)-1} \dot{e}_\phi \right)
$$

Substituting the dynamics \(\ddot{\phi} = f_\phi + b_\phi \tau_{xd}\) and the control law \(\tau_{xd}\) yields:

$$
\begin{aligned}
\dot{V}_s &= s_\phi \left[ (\hat{f}_\phi – f_\phi) + \alpha_0 (\dot{e}_\phi – \hat{\dot{e}}_\phi) + \beta_0 \frac{q_0}{p_0} (e_\phi^{(q_0/p_0)-1}\dot{e}_\phi – \hat{e}_\phi^{(q_0/p_0)-1}\hat{\dot{e}}_\phi) – \varphi \hat{s}_\phi – \gamma \hat{s}_\phi^{\,q/p} \right] \\
&= s_\phi \left[ \tilde{f}_\phi + \alpha_0 \tilde{\dot{e}}_\phi + \beta_0 \tilde{\xi}_\phi – \varphi (s_\phi – \tilde{s}_\phi) – \gamma (s_\phi – \tilde{s}_\phi)^{\,q/p} \right]
\end{aligned}
$$

where \(\tilde{(\cdot)}\) denotes the error between the true value and the ESO estimate. From Theorem 1, these estimation errors are bounded, i.e., \(|\tilde{f}_\phi|, |\tilde{\dot{e}}_\phi|, |\tilde{\xi}_\phi|, |\tilde{s}_\phi| \leq \delta\), where \(\delta\) is a small positive constant related to \(\omega_o\). Using Young’s inequality and the properties of the fractional power terms, it can be shown that there exist positive constants \(k_1, k_2, k_3\) such that:

$$
\dot{V}_s \leq -k_1 V_s – k_2 V_s^{(p+q)/(2p)} + k_3 \delta
$$

This inequality satisfies the conditions for finite-time stability of perturbed systems. When \(\delta=0\) (perfect estimation), \(\dot{V}_s \leq -k_1 V_s – k_2 V_s^{(p+q)/(2p)}\), guaranteeing that \(s_\phi=0\) is reached in finite time, and consequently, \(e_\phi\) and \(\dot{e}_\phi\) converge to zero in finite time. When \(\delta > 0\), the system states converge to a small region around the origin defined by \(\delta\), proving uniform ultimate boundedness. The size of this region can be minimized by increasing the observer bandwidth \(\omega_o\) and the controller gain \(\varphi\).

6. Simulation Results and Performance Analysis

To validate the proposed control strategy for the quadrotor drone, numerical simulations were conducted in MATLAB/Simulink under realistic conditions, including motor dynamics and external disturbances. The model parameters used are listed in the table below.

Table 1: Quadrotor Drone Model Parameters
Parameter Symbol Value Unit
Mass \(m\) 1.4 kg
Gravity \(g\) 9.8 m/s²
Arm Length \(d\) 0.225 m
Inertia (X) \(I_x\) 0.0211 kg·m²
Inertia (Y) \(I_y\) 0.0219 kg·m²
Inertia (Z) \(I_z\) 0.0366 kg·m²
Motor Time Constant \(T_m\) 0.02 s
Thrust Coefficient \(c_T\) 1.105e-5 N/(rad/s)²
Torque Coefficient \(c_M\) 1.779e-7 Nm/(rad/s)²

The controller parameters for the proposed ESO-GFTSMC are tuned as follows:

Table 2: ESO-GFTSMC Controller Parameters
Component Parameter Value
ESO Bandwidth \(\omega_o\) 15 rad/s
\(\beta_1, \beta_2, \beta_3\) 45, 675, 3375
GFTSMC \(\alpha_0\) 2
\(\beta_0\) 1
\(p_0, q_0\) 9, 5
\(\varphi\) 100
\(\gamma\) 2
\(p, q\) 3, 1

Scenario: The quadrotor drone is commanded to track a helical trajectory while subjected to time-varying external disturbances:
$$
\boldsymbol{P}_d(t) = \begin{bmatrix} 0.5\cos(t/2) \\ 0.5\sin(t/2) \\ 2 + t/10 \end{bmatrix}, \quad \psi_d(t) = 0.
$$
The disturbances are modeled as: \(d_1=0.5\sin(\pi t/5), d_2=0.5\cos(\pi t/5), d_3=0.3\sin(\pi t/4+1), d_4=0.3\cos(\pi t/3), d_5=0.3\sin(\pi t/3), d_6=0.2\).

Comparisons: The proposed method (ESO-GFTSMC) is compared against two benchmarks: a well-tuned cascade PID controller and a cascade standard Sliding Mode Controller (SMC) with a linear sliding surface and a saturation function replacing the signum function to reduce chattering.

Results: The tracking performance is quantitatively evaluated using the Integral of Squared Error (ISE), defined as \( \text{ISE} = \int_{t_0}^{t_f} e^2(\tau) d\tau \), for the final 20 seconds of stable flight.

Table 3: Performance Comparison (ISE over 20 seconds)
Control Method ISE (x) ISE (y) ISE (z) Max |Attitude Cmd| (rad) Chattering
Cascade PID 4.82 5.11 18.37 ~0.05 Low
Cascade SMC 2.15 2.03 22.45 ~0.15 Moderate (smoothed)
Proposed ESO-GFTSMC 0.89 0.92 15.21 ~0.08 Very Low

The simulation results clearly demonstrate the superiority of the proposed approach for the quadrotor drone. The ESO-GFTSMC achieves the lowest ISE in the horizontal (x,y) plane, indicating superior tracking accuracy and disturbance rejection. While the SMC shows good horizontal performance, it exhibits larger high-frequency content (chattering) in the attitude commands (\(\phi_d, \theta_d\)) and suffers in the altitude (z) channel due to its sensitivity to the matched disturbance appearing in that channel. The PID controller, though stable, shows the largest tracking errors as it lacks a dedicated mechanism to handle nonlinearities and disturbances. The proposed controller effectively estimates and compensates for the “total disturbance” via the ESO, resulting in smooth control signals and robust, finite-time-convergent tracking for the quadrotor drone, even when facing significant unmodeled motor dynamics and external forces.

7. Conclusion

This article has presented a robust trajectory tracking control solution for a quadrotor drone by integrating an Extended State Observer (ESO) with a Global Fast Terminal Sliding Mode Control (GFTSMC) strategy in a cascade architecture. The ESO actively estimates and compensates for the aggregated effect of model uncertainties, internal couplings, and external disturbances in real-time, significantly enhancing the system’s robustness. The GFTSMC law ensures that the tracking errors converge to zero in finite time without employing discontinuous control signals, thereby eliminating chattering. Lyapunov-based stability analysis proves the uniform ultimate boundedness of the closed-loop system. Comprehensive numerical simulations confirm that the proposed ESO-GFTSMC controller outperforms conventional cascade PID and SMC in terms of tracking precision, disturbance rejection, and control smoothness for the quadrotor drone, making it a promising candidate for high-performance applications in dynamic and uncertain environments. Future work will focus on experimental validation and extending the framework to address actuator saturation and fault-tolerant control scenarios for the quadrotor drone.

Scroll to Top