Finite-Time Attitude Tracking Control for Quadrotor UAVs with Time-Varying Gyroscope Biases

In this paper, we address the critical challenge of attitude tracking control for quadrotor unmanned aerial vehicles (UAVs) in the presence of time-varying gyroscope biases. Quadrotor systems are widely utilized in various applications, including surveillance, payload delivery, and environmental monitoring, due to their agility and maneuverability. However, the performance of quadrotor attitude control is highly dependent on the accuracy of sensor measurements, particularly from gyroscopes, which are prone to drift biases caused by factors such as temperature fluctuations, mechanical vibrations, and prolonged operation. These biases introduce non-matching disturbances that are not directly compensable through conventional control techniques, posing significant challenges to stability and precision. Existing methods, such as sensor calibration and asymptotic observers, often fall short in providing rapid convergence and robustness under dynamic conditions. To overcome these limitations, we propose a novel finite-time control framework that integrates a super-twisting sliding mode observer for bias estimation and an integral terminal sliding mode controller for attitude tracking. This approach ensures that the quadrotor’s attitude converges to the desired trajectory within a finite time, even in the presence of unknown time-varying gyroscope biases and external disturbances. Through rigorous theoretical analysis and experimental validation, we demonstrate the effectiveness of our method in enhancing the reliability and performance of quadrotor systems.

The quadrotor dynamics are inherently nonlinear and coupled, making attitude control a complex task. The attitude of a quadrotor is typically represented using Euler angles, such as roll ($\phi$), pitch ($\theta$), and yaw ($\psi$), which define the orientation of the body-fixed frame relative to the inertial frame. The angular velocity, measured by gyroscopes, is crucial for feedback control but is often corrupted by biases. We model the quadrotor attitude system with gyroscope biases as follows:

$$ \begin{align*}
\dot{\phi} &= p_m + b_\phi, \\
\dot{p}_m &= \frac{J_y – J_z}{J_x} \dot{\theta} \dot{\psi} + \frac{J_r}{J_x} \dot{\theta} n_s + \frac{1}{J_x} \tau_\phi + \delta_\phi, \\
\dot{\theta} &= q_m + b_\theta, \\
\dot{q}_m &= \frac{J_z – J_x}{J_y} \dot{\psi} \dot{\phi} – \frac{J_r}{J_y} \dot{\phi} n_s + \frac{1}{J_y} \tau_\theta + \delta_\theta, \\
\dot{\psi} &= r_m + b_\psi, \\
\dot{r}_m &= \frac{J_x – J_y}{J_z} \dot{\theta} \dot{\phi} + \frac{1}{J_z} \tau_\psi + \delta_\psi,
\end{align*} $$

where $p_m$, $q_m$, and $r_m$ are the measured angular velocities, $b_\phi$, $b_\theta$, and $b_\psi$ are the time-varying gyroscope biases, $J_x$, $J_y$, and $J_z$ are the moments of inertia, $J_r$ is the rotor inertia, $n_s$ represents the net rotor speed, $\tau_\phi$, $\tau_\theta$, and $\tau_\psi$ are the control torques, and $\delta_\phi$, $\delta_\theta$, and $\delta_\psi$ denote the lumped disturbances combining external effects and bias derivatives. For the quadrotor system, we assume that the desired attitudes $\phi_d$, $\theta_d$, and $\psi_d$ are twice differentiable, and the biases and disturbances are bounded as per the following assumptions:

$$ |b_i(t)| \leq \bar{b}_i, \quad |\dot{b}_i(t)| \leq b^*_i, \quad |d_i(t)| \leq \bar{d}_i, \quad |\dot{d}_i(t)| \leq d^*_i, \quad \text{for } i = \phi, \theta, \psi, $$

where $\bar{b}_i$, $b^*_i$, $\bar{d}_i$, and $d^*_i$ are known positive constants. To facilitate the control design, we introduce nonsmooth functions defined as $\lfloor x \rceil^\alpha = \text{sgn}(x) |x|^\alpha$ for $\alpha > 0$ and $x \in \mathbb{R}$, and the fast terminal function $\langle x, \alpha \rangle$ that switches between linear and nonlinear terms based on the magnitude of $x$. These definitions are essential for achieving finite-time convergence in the observer and controller designs.

The core of our approach lies in the design of a finite-time gyroscope observer that estimates the unknown biases using only measurable attitude information. For the quadrotor, this observer is constructed based on the super-twisting sliding mode technique as follows:

$$ \begin{align*}
\dot{\hat{\phi}} &= -k_\phi^1 \lfloor \hat{\phi} – \phi \rceil^{\frac{1}{2}} + p_m + \hat{b}_\phi, \\
\dot{\hat{b}}_\phi &= -k_\phi^2 \lfloor \hat{\phi} – \phi \rceil^0, \\
\dot{\hat{\theta}} &= -k_\theta^1 \lfloor \hat{\theta} – \theta \rceil^{\frac{1}{2}} + q_m + \hat{b}_\theta, \\
\dot{\hat{b}}_\theta &= -k_\theta^2 \lfloor \hat{\theta} – \theta \rceil^0, \\
\dot{\hat{\psi}} &= -k_\psi^1 \lfloor \hat{\psi} – \psi \rceil^{\frac{1}{2}} + r_m + \hat{b}_\psi, \\
\dot{\hat{b}}_\psi &= -k_\psi^2 \lfloor \hat{\psi} – \psi \rceil^0,
\end{align*} $$

where $k_\phi^1$, $k_\theta^1$, $k_\psi^1$, $k_\phi^2$, $k_\theta^2$, and $k_\psi^2$ are positive gains. This observer ensures that the estimated biases $\hat{b}_\phi$, $\hat{b}_\theta$, and $\hat{b}_\psi$ converge to their true values within a finite time $T_1$, as proven using Lyapunov stability theory. The finite-time convergence is critical for the quadrotor to quickly compensate for biases and maintain accurate attitude control.

Building on the bias estimates, we develop a finite-time attitude tracking controller for the quadrotor using integral terminal sliding mode control. The control laws for the roll, pitch, and yaw channels are given by:

$$ \begin{align*}
\tau_\phi &= J_x \left( \ddot{\phi}_d – \bar{f}_\phi + k_\phi^3 \langle e_\phi, \alpha_1 \rangle + k_\phi^4 \langle e^*_\phi, \alpha_2 \rangle + k_\phi^5 \lfloor \bar{s}_\phi \rceil^{\frac{1}{2}} + g_\phi \right), \\
\dot{g}_\phi &= k_\phi^6 \text{sgn}(\bar{s}_\phi), \\
\tau_\theta &= J_y \left( \ddot{\theta}_d – \bar{f}_\theta + k_\theta^3 \langle e_\theta, \alpha_1 \rangle + k_\theta^4 \langle e^*_\theta, \alpha_2 \rangle + k_\theta^5 \lfloor \bar{s}_\theta \rceil^{\frac{1}{2}} + g_\theta \right), \\
\dot{g}_\theta &= k_\theta^6 \text{sgn}(\bar{s}_\theta), \\
\tau_\psi &= J_z \left( \ddot{\psi}_d – \bar{f}_\psi + k_\psi^3 \langle e_\psi, \alpha_1 \rangle + k_\psi^4 \langle e^*_\psi, \alpha_2 \rangle + k_\psi^5 \lfloor \bar{s}_\psi \rceil^{\frac{1}{2}} + g_\psi \right), \\
\dot{g}_\psi &= k_\psi^6 \text{sgn}(\bar{s}_\psi),
\end{align*} $$

where $e_\phi = \phi_d – \phi$, $e_\theta = \theta_d – \theta$, and $e_\psi = \psi_d – \psi$ are the attitude tracking errors, and the auxiliary variables are defined as:

$$ \begin{align*}
e^*_\phi &= \dot{\phi}_d – p_m – \hat{b}_\phi, \\
e^*_\theta &= \dot{\theta}_d – q_m – \hat{b}_\theta, \\
e^*_\psi &= \dot{\psi}_d – r_m – \hat{b}_\psi, \\
\bar{s}_\phi &= e^*_\phi + \int_0^t \left( k_\phi^3 \langle e_\phi, \alpha_1 \rangle + k_\phi^4 \langle e^*_\phi, \alpha_2 \rangle \right) d\tau, \\
\bar{s}_\theta &= e^*_\theta + \int_0^t \left( k_\theta^3 \langle e_\theta, \alpha_1 \rangle + k_\theta^4 \langle e^*_\theta, \alpha_2 \rangle \right) d\tau, \\
\bar{s}_\psi &= e^*_\psi + \int_0^t \left( k_\psi^3 \langle e_\psi, \alpha_1 \rangle + k_\psi^4 \langle e^*_\psi, \alpha_2 \rangle \right) d\tau, \\
\bar{f}_\phi &= \frac{J_y – J_z}{J_x} (q_m + \hat{b}_\theta)(r_m + \hat{b}_\psi) + \frac{J_r}{J_x} (q_m + \hat{b}_\theta) n_s, \\
\bar{f}_\theta &= \frac{J_z – J_x}{J_y} (r_m + \hat{b}_\psi)(p_m + \hat{b}_\phi) – \frac{J_r}{J_y} (p_m + \hat{b}_\phi) n_s, \\
\bar{f}_\psi &= \frac{J_x – J_y}{J_z} (q_m + \hat{b}_\theta)(p_m + \hat{b}_\phi).
\end{align*} $$

Here, $0 < \alpha_1 < 1$ and $\alpha_2 = \frac{2\alpha_1}{1 + \alpha_1}$ are parameters that ensure finite-time convergence, and $k_\phi^3$ to $k_\psi^6$ are positive control gains. The sliding surfaces $\bar{s}_\phi$, $\bar{s}_\theta$, and $\bar{s}_\psi$ incorporate the bias estimates to reject the non-matching disturbances effectively. We prove that under this controller, the quadrotor’s attitude tracking errors converge to zero in finite time $T_2$, guaranteeing robust performance even with time-varying biases and external disturbances.

To validate our method, we conducted experiments on a quadrotor test platform equipped with a MATLAB-based upper computer and an anonymous flight controller. The hardware includes brushless motors, propellers, and an STM32F407 chip, with a sampling time of 2 ms. We compared our finite-time control (FTC) approach with a proportional-integral-derivative (PID) controller and an integral terminal sliding mode control (ITSMC) method under identical conditions. The control parameters were tuned to ensure fair comparison, with FTC gains set as $k_\phi^1 = 10$, $k_\theta^1 = 10$, $k_\psi^1 = 10$, $k_\phi^2 = 50$, $k_\theta^2 = 50$, $k_\psi^2 = 50$, $k_\phi^3 = 70$, $k_\theta^3 = 70$, $k_\psi^3 = 70$, $k_\phi^4 = 8$, $k_\theta^4 = 8$, $k_\psi^4 = 8$, $k_\phi^5 = 2$, $k_\theta^5 = 2$, $k_\psi^5 = 2$, $k_\phi^6 = 5$, $k_\theta^6 = 5$, $k_\psi^6 = 5$, $\alpha_1 = 2/3$, and $\alpha_2 = 4/5$. The PID gains were $k_\phi^p = 96$, $k_\theta^p = 22.5$, $k_\psi^p = 0.5$, $k_\phi^i = 96$, $k_\theta^i = 22.5$, $k_\psi^i = 0.5$, $k_\phi^d = 50$, $k_\theta^d = 0.5$, $k_\psi^d = 0$, and ITSMC gains were $k_\phi^1 = 60$, $k_\theta^1 = 60$, $k_\psi^1 = 60$, $k_\phi^2 = 9$, $k_\theta^2 = 9$, $k_\psi^2 = 9$, $k_\phi^3 = 1$, $k_\theta^3 = 1$, $k_\psi^3 = 1$, $k_\phi^4 = 1.5$, $k_\theta^4 = 1.5$, $k_\psi^4 = 1.5$.

The experimental results demonstrate that our FTC method achieves superior performance in attitude tracking for the quadrotor. The gyroscope observer converges within 2.5 seconds, providing accurate bias estimates, as shown in the following table summarizing the steady-state errors and bias estimation ranges:

Performance Comparison of Controllers for Quadrotor Attitude Tracking
Attitude Angle Controller Max Error (deg) Mean Absolute Error (deg) Standard Deviation (deg)
Roll FTC 0.17 0.0221 0.0699
ITSMC 0.93 0.4787 0.1376
PID 1.14 0.8680 0.1075
Pitch FTC 0.13 0.0229 0.0402
ITSMC 0.54 0.6565 0.0440
PID 1.10 1.0052 0.0444
Yaw FTC 0.64 0.0339 0.0748
ITSMC 0.86 0.6479 0.1052
PID 1.57 1.7047 0.0904

The estimated gyroscope biases for the quadrotor vary within ranges of 1.73–2.15 rad/s for roll, 1.65–2.19 rad/s for pitch, and 1.56–2.23 rad/s for yaw, confirming the observer’s ability to track time-varying biases. The step responses for roll, pitch, and yaw angles under FTC show rapid convergence with minimal overshoot compared to ITSMC and PID, highlighting the advantage of finite-time convergence in enhancing quadrotor stability and responsiveness.

In conclusion, our proposed finite-time control framework effectively addresses the problem of attitude tracking for quadrotor UAVs with time-varying gyroscope biases. By combining a super-twisting sliding mode observer and an integral terminal sliding mode controller, we achieve finite-time convergence of both bias estimates and attitude tracking errors. The theoretical analysis, supported by experimental results, validates the robustness and efficiency of our method in practical quadrotor applications. Future work will focus on extending this approach to handle more complex scenarios, such as fault tolerance and multi-quadrotor coordination, further advancing the capabilities of autonomous UAV systems.

Scroll to Top