Advanced Attitude Control for Quadrotor Drones

The rapid evolution of unmanned aerial vehicles (UAVs) has cemented their role across military, commercial, and civilian domains. Among various configurations, the quadrotor drone stands out for its mechanical simplicity, vertical take-off and landing (VTOL) capability, and hovering agility. These attributes make it ideal for applications ranging from aerial photography and precision agriculture to infrastructure inspection and search-and-rescue operations. However, the very features that grant the quadrotor its maneuverability also introduce significant control challenges. The system is inherently underactuated, nonlinear, and strongly coupled, meaning control inputs affect multiple states simultaneously. Furthermore, it is highly susceptible to external disturbances like wind gusts and internal noise from sensors. Achieving precise and stable flight, therefore, hinges on the development of sophisticated control algorithms capable of handling this complex dynamic behavior.

Traditional linear control methods, such as the ubiquitous Proportional-Integral-Derivative (PID) controller, often fall short when applied directly to the quadrotor drone due to their inability to adapt to the system’s nonlinearities and changing operating conditions. While PID offers simplicity, it typically suffers from large overshoot, slow response to disturbances, and poor performance for aggressive maneuvers. Advanced nonlinear controls like sliding mode control, backstepping, and Linear Quadratic Regulator (LQR) have been explored with success, but they can be complex to design and may require precise system models. Intelligent control techniques, particularly fuzzy logic, offer robustness against model uncertainties. The fusion of fuzzy logic with PID—creating a fuzzy PID controller—has shown promise by enabling online tuning of the PID gains based on heuristic rules. Yet, the fixed universe of discourse in conventional fuzzy logic can limit its resolution and precision. This work addresses this limitation by integrating the concept of a variable universe into the fuzzy PID framework for the quadrotor drone, aiming to enhance stability, responsiveness, and disturbance rejection in attitude control.

Mathematical Modeling of the Quadrotor Drone

A rigorous mathematical model is the cornerstone for designing and simulating any control system. For a quadrotor drone, we begin by defining two essential coordinate frames:

  • Body Frame (B): Attached to the center of mass of the drone. The x-axis points forward, the y-axis to the left, and the z-axis upward.
  • Earth (Inertial) Frame (E): Considered a fixed inertial reference frame.

The attitude of the quadrotor drone is described by three Euler angles: roll ($\phi$), pitch ($\theta$), and yaw ($\psi$). The rotation matrix $\mathbf{R}$ that transforms a vector from the body frame (B) to the earth frame (E) is given by:

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

where $s_*$ and $c_*$ denote $\sin(*)$ and $\cos(*)$, respectively.

To derive the equations of motion, standard assumptions are made: the quadrotor drone is a rigid and symmetric body; its center of mass coincides with the geometric center; and aerodynamic forces like drag are proportional to the square of rotor speeds. The translational dynamics in the earth frame are:

$$
\begin{aligned}
m \ddot{x} &= F_x – K_1 \dot{x} \\
m \ddot{y} &= F_y – K_2 \dot{y} \\
m \ddot{z} &= F_z – mg – K_3 \dot{z}
\end{aligned}
$$

Here, $m$ is the mass, $g$ is gravitational acceleration, $K_i$ are drag coefficients, and $(F_x, F_y, F_z)$ are the components of the total thrust force in the earth frame. The rotational dynamics, derived from the Newton-Euler equations, are more complex due to gyroscopic effects and coupling:

$$
\begin{aligned}
I_x \dot{p} &= M_x + (I_y – I_z)qr \\
I_y \dot{q} &= M_y + (I_z – I_x)pr \\
I_z \dot{r} &= M_z + (I_x – I_y)pq
\end{aligned}
$$

where $(I_x, I_y, I_z)$ are the moments of inertia, $(p, q, r)$ are the angular velocities in the body frame, and $(M_x, M_y, M_z)$ are the control moments. The relationship between Euler angle rates and body angular rates is nonlinear:

$$
\begin{bmatrix} \dot{\phi} \\ \dot{\theta} \\ \dot{\psi} \end{bmatrix} = \begin{bmatrix}
1 & s_\phi t_\theta & c_\phi t_\theta \\
0 & c_\phi & -s_\phi \\
0 & s_\phi / c_\theta & c_\phi / c_\theta
\end{bmatrix} \begin{bmatrix} p \\ q \\ r \end{bmatrix}
$$

where $t_*$ denotes $\tan(*)$. The primary control inputs for a quadrotor drone are not the forces and moments directly, but the squared rotational speeds of its four rotors ($\omega_i$). The mapping from rotor speeds to net thrust $U_1$ and moments $(U_2, U_3, U_4)$ is:

$$
\begin{aligned}
U_1 &= K_t (\omega_1^2 + \omega_2^2 + \omega_3^2 + \omega_4^2) \\
U_2 &= K_t l (\omega_4^2 – \omega_2^2) \\
U_3 &= K_t l (\omega_1^2 – \omega_3^2) \\
U_4 &= K_d (-\omega_1^2 + \omega_2^2 – \omega_3^2 + \omega_4^2)
\end{aligned}
$$

where $K_t$ and $K_d$ are thrust and drag coefficients, and $l$ is the arm length from the center to a rotor. The full nonlinear model, assuming small drag, can be simplified to:

$$
\begin{aligned}
\ddot{x} &= (\cos\phi \sin\theta \cos\psi + \sin\phi \sin\psi)\frac{U_1}{m} \\
\ddot{y} &= (\cos\phi \sin\theta \sin\psi – \sin\phi \cos\psi)\frac{U_1}{m} \\
\ddot{z} &= -g + (\cos\phi \cos\theta)\frac{U_1}{m} \\
\ddot{\phi} &= \dot{\theta}\dot{\psi}\frac{I_y-I_z}{I_x} + \frac{U_2}{I_x} \\
\ddot{\theta} &= \dot{\phi}\dot{\psi}\frac{I_z-I_x}{I_y} + \frac{U_3}{I_y} \\
\ddot{\psi} &= \dot{\phi}\dot{\theta}\frac{I_x-I_y}{I_z} + \frac{U_4}{I_z}
\end{aligned}
$$

This model clearly exhibits the nonlinear and coupled nature of the quadrotor drone dynamics. For instance, the horizontal accelerations ($\ddot{x}, \ddot{y}$) depend on both the total thrust $U_1$ and the attitudes ($\phi, \theta, \psi$), demonstrating the underactuation.

Linearization via Small-Disturbance Theory

To facilitate controller design using linear control theory, the nonlinear model is linearized around a hover equilibrium point. The small-disturbance theory assumes all deviations from the trim condition (typically hover with $\phi=\theta=\psi=0$) are small. This allows us to neglect higher-order terms. The state-space model is separated into longitudinal and lateral-directional subsystems for analysis.

The longitudinal motion involves states like forward velocity $u$, vertical velocity $w$, pitch rate $q$, and pitch angle $\theta$, primarily controlled by $U_1$ (thrust) and $U_3$ (pitch moment). The lateral motion involves sideslip velocity $v$, roll rate $p$, yaw rate $r$, roll angle $\phi$, and yaw angle $\psi$, primarily controlled by $U_2$ (roll moment) and $U_4$ (yaw moment). After applying the small-angle approximations ($\sin(\alpha) \approx \alpha$, $\cos(\alpha) \approx 1$, products of small terms $\approx 0$) and using parameters from a typical quadrotor drone, we obtain transfer functions for each channel. The parameters used for this model are summarized below.

Parameter Symbol Value
Mass $m$ 1.21 kg
Arm Length $l$ 0.22 m
Thrust Coefficient $K_t$ $3.15 \times 10^{-5}$ N·s²
Drag Coefficient $K_d$ $7.5 \times 10^{-5}$ N·m·s²
Moment of Inertia (x-axis) $I_x$ $2.35 \times 10^{-3}$ kg·m²
Moment of Inertia (y-axis) $I_y$ $2.35 \times 10^{-3}$ kg·m²
Moment of Inertia (z-axis) $I_z$ $5.26 \times 10^{-3}$ kg·m²

Using the state-space form $\dot{\mathbf{x}} = \mathbf{A}\mathbf{x} + \mathbf{B}\mathbf{u}$ and the formula $\mathbf{G}(s) = (s\mathbf{I} – \mathbf{A})^{-1}\mathbf{B}$, the following decoupled transfer functions for attitude and approximate translational dynamics are derived for controller design and simulation.

Channel Transfer Function
Pitch Angle ($\theta$) to $U_3$ $G_1(s) = \dfrac{57s + 4390}{s^3 + 103s^2 + 871s + 4433}$
Roll Angle ($\phi$) to $U_2$ $G_2(s) = \dfrac{63s + 4560}{s^3 + 108s^2 + 1020s + 2933}$
Yaw Angle ($\psi$) to $U_4$ $G_3(s) = \dfrac{103}{s^2 + 413s}$
X-Position to Pitch Angle $G_4(s) = \dfrac{-190s + 567}{s(58s + 4400)}$
Y-Position to Roll Angle $G_5(s) = \dfrac{-276s + 743}{s(61s + 4463)}$
Altitude ($Z$) to $U_1$ $G_6(s) = \dfrac{1.8}{s(s+5)}$

Control Strategy: From PID to Variable Universe Fuzzy PID

Controlling a quadrotor drone requires a hierarchical strategy. An inner loop rapidly stabilizes the attitude (roll, pitch, yaw), while an outer loop manages the position (x, y, z) by providing reference attitudes to the inner loop. This work focuses on optimizing the inner-loop attitude controller. Common control strategies include:

  • PID Control: Simple but fixed gains struggle with nonlinearity and coupling.
  • Linear Quadratic Regulator (LQR): Optimal but requires an accurate linear model.
  • Sliding Mode Control (SMC): Robust but can suffer from chattering.
  • Backstepping Control: Systematic design for nonlinear systems but can become complex.
  • Fuzzy Logic Control (FLC): Model-free and robust, but design relies heavily on expert knowledge.

A hybrid approach, such as Fuzzy PID, combines the adaptability of fuzzy logic with the structure of PID. The fuzzy inference system tunes the PID parameters ($K_p, K_i, K_d$) in real-time based on the error ($e$) and change in error ($ec$). However, conventional fuzzy PID uses a fixed universe of discourse for its input and output variables. This limits the controller’s precision because the same set of coarse linguistic rules is applied regardless of whether the error is large or very small.

The Variable Universe Fuzzy PID controller introduces a powerful enhancement. The core idea is to dynamically contract or expand the universe of discourse of the fuzzy sets based on the current error, while keeping the linguistic rule base unchanged. When the error is large, the universe expands to allow a coarse, fast response. As the error diminishes, the universe contracts, effectively increasing the rule resolution in that region and enabling finer control for higher precision. This is equivalent to having an infinite number of rules with a finite rule base.

The structure of the Variable Universe Fuzzy PID controller for the quadrotor drone is as follows. The error ($e$) and change in error ($ec$) are first normalized and then scaled by input scaling factors $\alpha(e)$ and $\alpha(ec)$, which are functions of the error itself. These scaled inputs enter a standard fuzzy inference mechanism with a fixed rule base. The output of the fuzzy system (adjustments $\Delta K_p, \Delta K_i, \Delta K_d$) is then scaled by output scaling factors $\beta_p, \beta_i, \beta_d$ before being added to the base PID parameters.

$$ K_p = K_{p0} + \Delta K_p, \quad K_i = K_{i0} + \Delta K_i, \quad K_d = K_{d0} + \Delta K_d $$

The choice of the contraction/expansion factors $\alpha$ and $\beta$ is critical. They must satisfy properties like zero-avoidance, monotonicity, and symmetry. A common and effective choice for the quadrotor drone application is:

$$
\begin{aligned}
\alpha(e) &= 1 – \lambda e^{-k e^2}, \quad \alpha(ec) = 1 – \lambda e^{-k ec^2} \\
\text{where } \lambda &= 0.7, \quad k = 0.5
\end{aligned}
$$

$$
\beta_p(e) = 1.6|e|, \quad \beta_i(e) = \frac{1}{|e| + 0.7}, \quad \beta_d(e) = 1.6|e|
$$

These functions ensure that the input universe contracts ($\alpha$ approaches 0) as the error gets very small, increasing sensitivity. The output factor $\beta_p$ and $\beta_d$ shrink the output universe for small errors to prevent actuator chatter, while $\beta_i$ expands it to help eliminate steady-state error.

The fuzzy rule base for adjusting the PID parameters is typically designed from expert experience. A sample rule table for $\Delta K_p$ is shown below. Similar tables govern $\Delta K_i$ and $\Delta K_d$.

Fuzzy Rule Base for $\Delta K_p$ Adjustment (NB: Negative Big, NS: Negative Small, ZO: Zero, PS: Positive Small, PB: Positive Big)
$e$ \ $ec$ NB NS ZO PS PB
NB PB PB PS PS ZO
NS PB PS PS ZO NS
ZO PS PS ZO NS NS
PS PS ZO NS NS NB
PB ZO NS NS NB NB

Simulation Results and Comparative Analysis

The performance of the proposed Variable Universe Fuzzy PID (VFPID) controller for the quadrotor drone is evaluated in simulation using the linearized pitch channel model $G_1(s)$. It is compared against a conventional Fuzzy PID (FPID) controller and a standard fixed-gain PID controller. All controllers are tuned to have comparable base performance for a fair comparison. Key metrics are rise time, overshoot, settling time, and disturbance rejection.

Step Response: The response to a unit step command in pitch angle clearly demonstrates the advantages of the variable universe approach. The VFPID controller for the quadrotor drone exhibits the fastest rise time, effectively zero overshoot, and a quick settling time. The FPID controller shows a small overshoot (approx. 2%), while the standard PID controller has a significant overshoot (approx. 13%) and slower settling. This shows VFPID’s superior dynamic performance and stability.

Disturbance Rejection: The robustness of the quadrotor drone controller is tested by injecting disturbances. First, a small step disturbance is added at 3 seconds. The VFPID controller shows minimal deviation and the fastest recovery, indicating strong robustness. The FPID controller shows a larger oscillation, and the PID controller exhibits the poorest rejection capability with a sustained oscillation.

Noise Immunity: When subjected to random high-frequency noise (simulating sensor noise), the VFPID-controlled quadrotor drone maintains the steadiest output with the smallest amplitude variations. The FPID shows more susceptibility, and the standard PID output is noticeably noisier. This highlights the filtering-like property and enhanced robustness of the variable universe mechanism.

The following table summarizes the quantitative comparison of the three controllers for the quadrotor drone attitude loop.

Performance Metric Standard PID Fuzzy PID (FPID) Variable Universe FPID (VFPID)
Rise Time (s) 0.15 0.12 0.10
Overshoot (%) 13.0 2.0 ~0.0
Settling Time (s, 2%) 0.80 0.50 0.35
Disturbance Peak Deviation High Medium Low
Steady-state Error Zero Zero Zero
Robustness to Noise Poor Good Excellent

Conclusion and Future Work

This study has presented a comprehensive approach to enhancing the flight stability of a quadrotor drone through advanced control design. Beginning with a detailed nonlinear dynamic model and its subsequent linearization, the challenges of controlling this underactuated and coupled system were established. To address the limitations of single-method controllers, a novel Variable Universe Fuzzy PID controller was proposed and designed. This controller synergizes the adaptive rule-based tuning of fuzzy logic with the structural benefits of PID control, while the variable universe mechanism dynamically adjusts the controller’s resolution for optimal performance across all operating regimes.

Simulation results on the pitch attitude channel of the quadrotor drone confirm the superior efficacy of the proposed method. Compared to both standard PID and conventional Fuzzy PID, the Variable Universe Fuzzy PID controller delivers faster response, negligible overshoot, excellent settling characteristics, and significantly improved robustness against external disturbances and internal measurement noise. This makes it a highly suitable candidate for the demanding attitude stabilization requirements of practical quadrotor drone applications where wind gusts and sensor imperfections are ever-present.

Future work will focus on implementing and testing this controller on a physical quadrotor drone platform to validate the simulation results in real-world conditions. Furthermore, the framework can be extended by integrating adaptive or self-learning mechanisms to optimize the contraction/expansion factors ($\alpha, \beta$) and the fuzzy rule base online, potentially leading to an even more intelligent and autonomous flight control system for the next generation of quadrotor drones.

Scroll to Top