Anti-Windup and Multi-Mode PID Control for Yaw Movement in Quadrotor Drones

In the realm of unmanned aerial vehicles (UAVs), the quadrotor drone stands out due to its simple structure, vertical take-off and landing capability, and agility. However, controlling a quadrotor drone, especially its yaw movement, poses significant challenges. The yaw motion, generated by reactive torque, is inherently weaker than pitch and roll motions, which are produced by lift moments. This weakness makes the yaw axis more susceptible to actuator saturation, where the motors reach their physical speed limits. Actuator saturation can lead to integral windup in traditional PID controllers, causing large overshoots, oscillations, or even instability, particularly in the presence of external disturbances. To address this, I propose a Multi-Mode Proportional-Integral-Derivative (MMPID) anti-windup controller for yaw control in quadrotor drones. This controller incorporates a conditional desaturation strategy that enhances robustness and control accuracy. In this article, I will detail the dynamics of quadrotor drones, design the MMPID controller, analyze its stability, and present extensive simulation and experimental results to validate its effectiveness.

The quadrotor drone is a symmetrical rigid body with six degrees of freedom. To model its dynamics, I define two coordinate frames: the earth-fixed frame \( E = \{O_g, x_g, y_g, z_g\} \) and the body-fixed frame \( B = \{O_b, x_b, y_b, z_b\} \). The position of the quadrotor drone’s center of mass is given by \( \xi = [x, y, z]^T \), and its orientation is described by Euler angles \( \eta = [\phi, \theta, \psi]^T \), representing roll, pitch, and yaw, respectively. The angular velocity relative to frame \( B \) is \( \omega = [p, q, r]^T \). Using the Newton-Euler formulation, the rotational dynamics can be derived as:

$$ \frac{d\mathbf{H}}{dt} = \frac{\delta \mathbf{H}}{\delta t} + \omega \times \mathbf{H} = \mathbf{M} $$

where \( \mathbf{H} = \mathbf{J} \cdot \omega \) is the angular momentum, and \( \mathbf{J} = \text{diag}(I_x, I_y, I_z) \) is the inertia matrix. For a symmetric quadrotor drone, \( I_x = I_y \). The moment vector \( \mathbf{M} = [M_x, M_y, M_z]^T \) is generated by the rotors. For a typical quadrotor drone with rotor speeds \( \Omega_i \) (i = 1,2,3,4), where rotors 1 and 3 rotate counterclockwise and rotors 2 and 4 rotate clockwise, the moments are:

$$ M_x = \frac{\sqrt{2}}{2} \rho A C_T R^2 l (\Omega_2^2 + \Omega_3^2 – \Omega_1^2 – \Omega_4^2) $$
$$ M_y = \frac{\sqrt{2}}{2} \rho A C_T R^2 l (\Omega_3^2 + \Omega_4^2 – \Omega_2^2 – \Omega_1^2) $$
$$ M_z = \rho A C_D R^3 (\Omega_4^2 + \Omega_2^2 – \Omega_3^2 – \Omega_1^2) $$

Here, \( \rho \) is air density, \( l \) is the distance from the rotor to the center, \( R \) is the rotor radius, \( A = \pi R^2 \) is the rotor area, and \( C_T \) and \( C_D \) are the thrust and drag coefficients, respectively. The yaw moment \( M_z \) is relatively small compared to \( M_x \) and \( M_y \), leading to weaker yaw authority. Assuming small angles, the Euler angle rates relate to angular velocity as \( \dot{\eta} \approx \omega \). Thus, the yaw dynamics can be simplified to:

$$ \ddot{\psi} = \frac{M_z}{I_z} $$

where \( I_z \) is the moment of inertia about the z-axis. This forms the basis for yaw control design. In practice, the quadrotor drone’s motors have limited speeds, constraining \( M_z \) to a range \( [ -M_{\text{max}}, M_{\text{max}} ] \), where \( M_{\text{max}} \) is the maximum achievable yaw moment. This constraint leads to actuator saturation, which is the core issue addressed in this work.

The structure of a quadrotor drone, as shown above, highlights its symmetry and rotor arrangement. This configuration is crucial for understanding how yaw moments are generated and why saturation is common. To control the yaw of a quadrotor drone, I employ a dual-loop control structure. The outer loop uses a PD controller to regulate yaw angle \( \psi \), producing a desired yaw rate \( r_d \):

$$ r_d = k_{p\psi} e_\psi + k_{d\psi} \dot{e}_\psi $$

where \( e_\psi = \psi_d – \psi \) is the yaw angle error, and \( k_{p\psi} \) and \( k_{d\psi} \) are positive gains. The inner loop controls the yaw rate \( r \) using the proposed MMPID controller. The inner-loop system is described by:

$$ \dot{x}_1 = x_2 $$
$$ \dot{x}_2 = u / I_z $$

where \( x_1 = e_r = r_d – r \) is the yaw rate error, and \( u = M_z \) is the yaw control input. The MMPID controller outputs a nominal control signal \( u_n \):

$$ u_n = k_{pr} e_r + k_{ir} \zeta $$

where \( k_{pr} \) and \( k_{ir} \) are positive proportional and integral gains, and \( \zeta \) is the integral state. Due to motor limits, the actual control input is saturated: \( u_s = \text{sat}(u_n) = \max(-u_{\text{lim}}, \min(u_n, u_{\text{lim}})) \), with \( u_{\text{lim}} = M_{\text{max}} \). The key innovation of MMPID is its multi-mode operation, defined by the following control law for the integral state \( \zeta \) and control input \( u \):

$$ \dot{\zeta} =
\begin{cases}
-\alpha (u_n – u_s \text{sgn}(u_n)) / k_{ir}, & \text{if } u_n \neq u_s \text{sgn}(u_n) \text{ and } |e_r| \leq \kappa \\
0, & \text{if } u_n \neq u_s \text{sgn}(u_n) \text{ and } |e_r| > \kappa \\
e_r, & \text{if } u_n = u_s \text{sgn}(u_n)
\end{cases} $$

and

$$ u =
\begin{cases}
u_s \text{sgn}(u_n), & \text{if } u_n \neq u_s \text{sgn}(u_n) \\
u_n, & \text{if } u_n = u_s \text{sgn}(u_n)
\end{cases} $$

Here, \( \alpha > 0 \) is an anti-windup coefficient that determines the desaturation strength, and \( \kappa > 0 \) is a threshold for conditional desaturation. The MMPID controller operates in three modes:

  1. Desaturation Mode: When the actuator is saturated (\( u_n \neq u_s \text{sgn}(u_n) \)) and the yaw rate error is within the threshold (\( |e_r| \leq \kappa \)), the controller actively reduces integral windup by feeding back the saturation error.
  2. Saturation Mode: When saturated but \( |e_r| > \kappa \), the integral action is halted, and the control input is set to the limit \( u_s \text{sgn}(u_n) \) to quickly reduce error, prioritizing performance over desaturation.
  3. Linear Mode: When not saturated (\( u_n = u_s \text{sgn}(u_n) \)), the controller acts as a standard PI controller.

This multi-mode approach allows the quadrotor drone to handle disturbances effectively; for instance, in high-error scenarios, it focuses on error reduction, while in low-error scenarios, it prevents windup. The conditional desaturation is key to maintaining robustness for quadrotor drone yaw control.

To ensure the stability of the yaw control system with MMPID, I employ Lyapunov theory. Consider the inner-loop subsystem \( S_r \) with state vector \( \mathbf{x} = [e_r, \zeta]^T \). The dynamics can be written as:

$$ \dot{\mathbf{x}} = \mathbf{B} u + \mathbf{B}_\zeta \dot{\zeta} $$

where \( \mathbf{B} = [-1/I_z, 0]^T \) and \( \mathbf{B}_\zeta = [0, 1]^T \). For each mode of the MMPID controller, I construct a Lyapunov function to prove global asymptotic stability.

Desaturation Mode: Let \( V_1 = (k_{pr} e_r + k_{ir} \zeta)^2 = u_n^2 \). Then,

$$ \dot{V}_1 = 2u_n \left[ -\frac{k_{pr} u_s \text{sgn}(u_n)}{I_z} – \alpha (|u_n| – u_s) \text{sgn}(u_n) \right] $$
$$ = -2|u_n| \left[ \frac{k_{pr} u_s}{I_z} + \alpha (|u_n| – u_s) \right] < 0 $$

since \( |u_n| > u_s \) during saturation and all terms are positive. Thus, \( S_r \) is globally asymptotically stable in this mode.

Saturation Mode: Let \( V_2 = u_n^2 \). Then,

$$ \dot{V}_2 = 2u_n \left[ -\frac{k_{pr} u_s \text{sgn}(u_n)}{I_z} \right] = -\frac{2|u_n| k_{pr} u_s}{I_z} < 0 $$

Hence, stability is guaranteed.

Linear Mode: In this case, \( u = u_n = k_{pr} e_r + k_{ir} \zeta \), and \( \dot{\zeta} = e_r \). The system becomes linear:

$$ \dot{\mathbf{x}} = \mathbf{A} \mathbf{x}, \quad \mathbf{A} = \begin{bmatrix} -k_{pr}/I_z & -k_{ir}/I_z \\ 1 & 0 \end{bmatrix} $$

Choosing a Lyapunov function \( V_3 = \mathbf{x}^T \mathbf{P} \mathbf{x} \) with positive definite \( \mathbf{P} \), I can find \( \mathbf{P} \) such that \( \dot{V}_3 = \mathbf{x}^T (\mathbf{A}^T \mathbf{P} + \mathbf{P} \mathbf{A}) \mathbf{x} < 0 \) for appropriate gains \( k_{pr} \) and \( k_{ir} \). Therefore, the inner-loop subsystem is globally asymptotically stable in all modes. For the outer-loop PD controller, with proper gains \( k_{p\psi} \) and \( k_{d\psi} \), the overall yaw control system for the quadrotor drone is stable.

To validate the MMPID controller, I conducted simulation experiments comparing it with a Variable-Structure PID (VSPID) controller from literature. The quadrotor drone parameters used are based on a real prototype, as summarized in Table 1.

Table 1: Parameters of the Quadrotor Drone Prototype
Parameter Value
Mass, \( m \) 1.3 kg
Arm length, \( l \) 0.32 m
Moment of inertia, \( I_x = I_y \) 8.1 × 10⁻³ N·m·s²
Moment of inertia, \( I_z \) 14.2 × 10⁻³ N·m·s²
Rotor radius, \( R \) 0.2 m
Thrust coefficient, \( C_T \) 0.01129
Drag coefficient, \( C_D \) 0.00248
Motor speed limits 146 rad/s to 250 rad/s
Yaw moment limit, \( u_{\text{lim}} \) 0.25 N·m

The control gains for both controllers were set as: \( k_{p\psi} = 0.5 \), \( k_{d\psi} = 0.01 \), \( k_{pr} = 1.6 \), \( k_{ir} = 0.2 \). For MMPID, \( \alpha = 0.07 \) and \( \kappa = 0.09 \) rad/s; for VSPID, \( \alpha = 0.07 \) as well. The desired yaw angle was \( \psi_d = 1.0 \) rad, with other angles set to zero. First, simulations without disturbances showed that both controllers achieved good yaw tracking, but MMPID had a shorter settling time (20 s vs. 22 s for VSPID). Then, I introduced white noise disturbance with amplitude 0.1 N·m to test robustness. The results, summarized in Table 2, demonstrate MMPID’s superiority.

Table 2: Simulation Performance Comparison for Quadrotor Drone Yaw Control
Controller Condition Settling Time (s) Overshoot (%) Steady-State Error (rad)
VSPID No disturbance 22 0 0
MMPID No disturbance 20 0 0
VSPID With disturbance 39 26.57 0.27
MMPID With disturbance 36 20.34 0.20

Under disturbance, VSPID exhibited longer settling time, larger overshoot, and significant steady-state error due to premature desaturation, while MMPID’s conditional strategy maintained better performance. This highlights how MMPID enhances the quadrotor drone’s ability to handle real-world uncertainties.

To further verify practical efficacy, I implemented the MMPID controller on a quadrotor drone prototype. The prototype, as described earlier, uses a DSP-based flight control platform with inertial sensors for state estimation. Experiments were conducted in three environments: indoors without disturbances, indoors with a fan-induced wind disturbance (4 m/s), and outdoors with varying natural winds (up to 5 m/s). In each case, the yaw control performance of MMPID was compared against a standard dual-loop PID controller without anti-windup. The results are detailed below.

Indoors Without Disturbances: Both controllers performed well, with minimal actuator saturation. The yaw angle error converged to within ±0.05 rad for both. This shows that in ideal conditions, basic PID suffices for quadrotor drone yaw control.

Indoors With Wind Disturbance: The PID controller suffered from severe integral windup, taking about 21 s to desaturate, with an overshoot of 0.4 rad and oscillations. In contrast, the MMPID controller entered saturation mode initially, then switched to desaturation mode when \( |e_r| \leq \kappa \), exiting saturation in about 10 s with no overshoot and steady-state error within ±0.08 rad. This demonstrates MMPID’s effective anti-windup capability for quadrotor drones under controlled disturbances.

Outdoors With Varying Winds: The PID controller remained saturated for long periods, failing to reach the desired yaw angle and showing poor robustness. The MMPID controller, however, handled the changing conditions adeptly, desaturating in about 5 s and achieving yaw error within ±0.13 rad. The conditional desaturation allowed the quadrotor drone to prioritize error reduction during high disturbances, then mitigate windup once errors diminished.

These experimental results underscore the practicality of MMPID for real-world quadrotor drone applications, where environmental disturbances are common.

The multi-mode PID controller offers several advantages for quadrotor drone yaw control. Firstly, its structure is simple and easy to tune, requiring only a few additional parameters (\( \alpha \) and \( \kappa \)) compared to standard PID. Secondly, the conditional desaturation strategy ensures that anti-windup actions do not compromise transient performance, which is crucial for agile quadrotor drone maneuvers. Thirdly, the stability proof via Lyapunov theory provides theoretical assurance, which is often lacking in ad-hoc anti-windup methods. To further illustrate the controller’s behavior, I analyze the effect of key parameters. The anti-windup coefficient \( \alpha \) influences desaturation speed: larger \( \alpha \) accelerates windup reduction but may cause aggressive control actions. The threshold \( \kappa \) balances between error reduction and desaturation; a smaller \( \kappa \) delays desaturation, favoring disturbance rejection, while a larger \( \kappa \) promotes earlier windup mitigation. For typical quadrotor drones, I recommend tuning \( \alpha \) based on desired desaturation time and \( \kappa \) based on expected disturbance magnitudes. For instance, in windy environments, a higher \( \kappa \) might be beneficial to maintain control authority.

Beyond yaw control, the MMPID framework can be extended to other axes of the quadrotor drone. Since pitch and roll moments are larger, saturation is less frequent, but it can still occur during aggressive maneuvers or heavy loading. Applying MMPID to all attitude angles could enhance overall flight performance. Moreover, the concept of conditional desaturation is general and could be adapted to other UAV types or robotic systems with actuator limits. Future work may involve integrating MMPID with higher-level controllers for trajectory tracking or swarm coordination in quadrotor drones. Additionally, adaptive tuning of \( \alpha \) and \( \kappa \) based on online disturbance estimation could further improve robustness. Another direction is to combine MMPID with model predictive control (MPC) to explicitly handle constraints, though this would increase computational load for quadrotor drone onboard systems.

In conclusion, actuator saturation in yaw control is a critical issue for quadrotor drones due to their weak yaw authority. The proposed Multi-Mode PID controller effectively addresses this by incorporating a conditional desaturation strategy. Through detailed dynamics modeling, stability analysis, and extensive simulations and experiments, I have demonstrated that MMPID outperforms existing anti-windup methods like VSPID in terms of settling time, overshoot, and steady-state error, especially under disturbances. The controller’s multi-mode operation allows the quadrotor drone to switch between error reduction and windup mitigation as needed, ensuring robust and accurate yaw control. This makes MMPID a valuable tool for enhancing the reliability and performance of quadrotor drones in real-world applications, from aerial photography to search-and-rescue missions. As quadrotor drones continue to evolve, advanced control strategies like MMPID will play a key role in unlocking their full potential.

To summarize the key equations and parameters for quick reference, I provide the following tables. Table 3 lists the MMPID control law in compact form, and Table 4 shows typical parameter values for a quadrotor drone based on my experiments.

Table 3: MMPID Control Law for Quadrotor Drone Yaw Control
Mode Condition Control Input \( u \) Integral Update \( \dot{\zeta} \)
Desaturation \( u_n \neq u_s \text{sgn}(u_n) \) and \( |e_r| \leq \kappa \) \( u_s \text{sgn}(u_n) \) \( -\alpha (u_n – u_s \text{sgn}(u_n)) / k_{ir} \)
Saturation \( u_n \neq u_s \text{sgn}(u_n) \) and \( |e_r| > \kappa \) \( u_s \text{sgn}(u_n) \) 0
Linear \( u_n = u_s \text{sgn}(u_n) \) \( u_n \) \( e_r \)
Table 4: Recommended Parameters for MMPID in Quadrotor Drones
Parameter Symbol Typical Range Notes
Outer-loop proportional gain \( k_{p\psi} \) 0.3–0.8 Adjust for desired yaw response
Outer-loop derivative gain \( k_{d\psi} \) 0.005–0.02 Dampen yaw oscillations
Inner-loop proportional gain \( k_{pr} \) 1.0–2.0 Affects yaw rate tracking
Inner-loop integral gain \( k_{ir} \) 0.1–0.5 Eliminate steady-state error
Anti-windup coefficient \( \alpha \) 0.05–0.1 Larger values speed up desaturation
Desaturation threshold \( \kappa \) 0.05–0.15 rad/s Balance error reduction vs. windup
Yaw moment limit \( u_{\text{lim}} \) 0.2–0.3 N·m Depends on motor specs

The dynamics of a quadrotor drone can be further elaborated by considering the full rotational equations. Including the cross-coupling terms, the attitude dynamics are:

$$ \begin{bmatrix} \ddot{\phi} \\ \ddot{\theta} \\ \ddot{\psi} \end{bmatrix} = \begin{bmatrix} [M_x – qr(I_z – I_y)] / I_x \\ [M_y – pr(I_z – I_x)] / I_y \\ [M_z – pq(I_y – I_x)] / I_z \end{bmatrix} $$

For a symmetric quadrotor drone with \( I_x = I_y \), this simplifies to:

$$ \ddot{\phi} = \frac{M_x}{I_x}, \quad \ddot{\theta} = \frac{M_y}{I_y}, \quad \ddot{\psi} = \frac{M_z}{I_z} $$

under small-angle assumptions. However, in aggressive maneuvers, coupling effects may become significant, and advanced controllers like MMPID could be extended to handle them. The yaw control input \( u = M_z \) is derived from rotor speeds. Given the motor speed limits \( \Omega_{\min} \leq \Omega_i \leq \Omega_{\max} \), the constraints on \( u \) are nonlinear. In practice, I linearize around hover conditions, where \( \Omega_i \approx \Omega_0 \), and the yaw moment is approximately proportional to the difference in rotor speed squares. For control design, I treat \( u \) as a bounded input, which suffices for anti-windup purposes.

The MMPID controller’s performance can be quantified using various metrics. For a quadrotor drone, key metrics include settling time, overshoot, integral absolute error (IAE), and control effort. In my experiments, I calculated IAE for yaw angle error as:

$$ \text{IAE} = \int_0^T |e_\psi(t)| dt $$

where \( T \) is the experiment duration. For the indoor disturbed case, MMPID achieved an IAE of 1.2 rad·s, while PID had 2.5 rad·s, indicating better error minimization. Additionally, the control effort, measured as the total variation of \( u \), was lower for MMPID due to reduced chattering from windup. This efficiency is important for quadrotor drone battery life and motor wear.

In implementation on the quadrotor drone prototype, the MMPID algorithm runs at 200 Hz on the DSP. The integral state \( \zeta \) is updated using the discrete-time version of the control law:

$$ \zeta_{k+1} = \zeta_k + T_s \dot{\zeta}_k $$

where \( T_s = 0.005 \) s is the sampling time. To prevent numerical issues, I clamp \( \zeta \) within reasonable bounds, though the anti-windup mechanism naturally limits windup. The threshold \( \kappa \) is set based on the typical yaw rate error during disturbances; for instance, in windy conditions, yaw rate errors can reach 0.2 rad/s, so \( \kappa = 0.09 \) rad/s ensures desaturation occurs when errors moderate. This tuning was done empirically, but automated methods like relay feedback could be used.

The robustness of MMPID to model uncertainties is another asset for quadrotor drones. In real flights, parameters like \( I_z \) may vary due to payload changes. I tested sensitivity by varying \( I_z \) by ±20% in simulations. The MMPID controller maintained stability and performance, with yaw error increases of less than 10%, whereas PID showed larger degradations. This robustness stems from the adaptive nature of the conditional desaturation, which does not rely heavily on precise model knowledge.

Comparisons with other anti-windup methods highlight MMPID’s advantages. For example, the conditional integration method stops integral action during saturation, but it may slow down desaturation. The feedback-based method uses a correction signal, but tuning the feedback gain is tricky. MMPID combines both approaches with a mode switch, offering a balanced solution. In quadrotor drone applications, where quick response and stability are paramount, this balance is crucial.

Looking ahead, the MMPID controller could be integrated into a full flight control system for autonomous quadrotor drones. For instance, in a cascaded control architecture, MMPID could serve as the inner-loop attitude controller, while outer loops handle position and trajectory tracking. This would enhance overall flight performance in challenging environments. Moreover, with the rise of AI in robotics, MMPID could be combined with machine learning for parameter auto-tuning, making quadrotor drones more adaptable.

In summary, the Multi-Mode PID controller represents a significant step forward in addressing actuator saturation for quadrotor drone yaw control. Its design, grounded in theoretical stability analysis and validated through rigorous experiments, demonstrates practical utility. As quadrotor drones become increasingly ubiquitous, reliable control strategies like MMPID will be essential for safe and efficient operation. I hope this work inspires further research into anti-windup techniques and their application to advanced UAV systems.

Scroll to Top