Human-Simulating Intelligent PID Control for Enhanced Quadrotor Drone Flight Stability

The development of advanced flight control systems is central to unlocking the full potential of quadrotor drones across diverse applications, from aerial photography to precision agriculture and infrastructure inspection. As the “brain” of the unmanned aerial vehicle (UAV), the flight controller processes real-time pose information and executes commands to achieve stable flight, a task complicated by the inherently nonlinear, underactuated, and strongly coupled dynamics of a quadrotor drone. Traditional linear control methods often fall short in managing these complex dynamics and external disturbances. This article addresses the critical challenge of quadrotor drone attitude control by proposing and validating a novel Human-Simulating Intelligent PID (HSI-PID) control strategy. This method synergizes the rule-based adaptability of human-simulating control with the structured robustness of the PID algorithm, leading to superior dynamic response, stability, and robustness compared to conventional approaches.

At its core, a quadrotor drone is a system with four independent rotors generating lift and torque. By strategically varying the rotational speed of each rotor, the vehicle achieves control over its six degrees of freedom: translational movement along the X, Y, and Z axes, and rotational movement in roll ($$ \phi $$), pitch ($$ \theta $$), and yaw ($$ \psi $$). This configuration, where four inputs control six outputs, defines it as an underactuated system. The most common structural layouts are the “+” configuration and the “X” configuration. For the purpose of modeling and control design discussed here, we focus on the “+” configuration, where the rotors are symmetrically aligned with the body’s X and Y axes.

Mathematical Modeling of the Quadrotor Drone Dynamics

Establishing a precise yet tractable mathematical model is the foundational step for effective controller design. To simplify the complex aerodynamics, we make the following standard assumptions: the quadrotor drone is a rigid body with symmetrical structure and uniform mass distribution; the origin of the body-fixed frame coincides with its center of mass; the thrust and drag torque produced by each rotor are proportional to the square of its rotational speed; and aerodynamic drag forces are initially neglected. Two coordinate systems are essential: the Earth-fixed inertial frame $$O_{E}-X_{E}Y_{E}Z_{E}$$ and the body-fixed frame $$O_{B}-X_{B}Y_{B}Z_{B}$$. The vehicle’s orientation is described by the rotation matrix $$ \mathbf{R} $$ that transforms vectors from the body frame to the inertial frame, defined by the ZYX Euler angle sequence (Yaw $$ \psi $$, Pitch $$ \theta $$, Roll $$ \phi $$):

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

where $$ s_{(\cdot)} $$ and $$ c_{(\cdot)} $$ denote $$ \sin(\cdot) $$ and $$ \cos(\cdot) $$, respectively.

Translational Dynamics: Applying Newton’s second law in the inertial frame, the translational motion is governed by:

$$
m \begin{bmatrix} \ddot{x} \\ \ddot{y} \\ \ddot{z} \end{bmatrix} = \mathbf{R} \begin{bmatrix} 0 \\ 0 \\ U_1 \end{bmatrix} – \begin{bmatrix} 0 \\ 0 \\ mg \end{bmatrix} – \mathbf{F}_d
$$

Here, $$ m $$ is the mass, $$ g $$ is gravitational acceleration, $$ U_1 $$ is the total thrust, and $$ \mathbf{F}_d $$ represents aerodynamic drag forces. The total thrust $$ U_1 $$ is the sum of individual rotor thrusts: $$ U_1 = b (\omega_1^2 + \omega_2^2 + \omega_3^2 + \omega_4^2) $$, where $$ b $$ is the thrust coefficient and $$ \omega_i $$ is the angular speed of the i-th rotor. Neglecting drag for the idealized model, the translational equations become:

$$
\begin{aligned}
\ddot{x} &= \frac{U_1}{m} (\sin\phi \sin\psi + \cos\psi \sin\theta \cos\phi) \\
\ddot{y} &= \frac{U_1}{m} (\cos\phi \sin\psi \sin\theta – \cos\psi \sin\phi) \\
\ddot{z} &= \frac{U_1}{m} (\cos\theta \cos\phi) – g
\end{aligned}
$$

Rotational Dynamics: The rotational motion is derived from Euler’s rotation equations. Assuming small attitude angles and neglecting gyroscopic effects and rotor inertia, the simplified rotational dynamics are:

$$
\begin{aligned}
\ddot{\phi} &= \frac{(I_{yy} – I_{zz}) \dot{\theta} \dot{\psi}}{I_{xx}} + \frac{l U_2}{I_{xx}} \\
\ddot{\theta} &= \frac{(I_{zz} – I_{xx}) \dot{\psi} \dot{\phi}}{I_{yy}} + \frac{l U_3}{I_{yy}} \\
\ddot{\psi} &= \frac{(I_{xx} – I_{yy}) \dot{\theta} \dot{\phi}}{I_{zz}} + \frac{U_4}{I_{zz}}
\end{aligned}
$$

where $$ I_{xx}, I_{yy}, I_{zz} $$ are the moments of inertia, $$ l $$ is the arm length from the center to a rotor, and $$ U_2, U_3, U_4 $$ are the control moments for roll, pitch, and yaw, respectively. These moments are generated by differential thrusts and counter-torques:

$$
\begin{bmatrix} U_2 \\ U_3 \\ U_4 \end{bmatrix} = \begin{bmatrix} l b (\omega_4^2 – \omega_2^2) \\ l b (\omega_3^2 – \omega_1^2) \\ d (-\omega_1^2 + \omega_2^2 – \omega_3^2 + \omega_4^2) \end{bmatrix}
$$

with $$ d $$ being the drag coefficient. Equations (3) and (5) constitute the nonlinear mathematical model for the quadrotor drone, which forms the basis for controller design.

Design of the Human-Simulating Intelligent PID Controller

The conventional PID controller, while robust for many linear systems, faces limitations when applied to the nonlinear quadrotor drone. Its fixed-gain structure necessitates a compromise between rapid response (high proportional gain) and overshoot suppression (low gains), often leading to oscillatory behavior and poor adaptability to changing dynamics or disturbances. The proposed HSI-PID controller overcomes this by embedding human-like decision-making logic to dynamically adjust the PID parameters online based on the real-time error pattern.

The controller structure takes the tracking error $$ e(t) $$ and the error change $$ \Delta e(t) = e(t) – e(t-1) $$ as its primary inputs. It continuously monitors these inputs and, according to a set of intelligent rules derived from human operational experience, outputs a control signal $$ u(t) $$ by adaptively tuning the proportional ($$ K_p $$), integral ($$ K_i $$), and derivative ($$ K_d $$) gains. This fusion creates a more responsive and intelligent autopilot for the quadrotor drone.

The core innovation lies in using specific characteristic quantities derived from $$ e(t) $$ and $$ \Delta e(t) $$ to discern the system’s dynamic state. Let $$ e_n, e_{n-1}, e_{n-2} $$ denote the error at the current, previous, and two-steps-prior sampling instants, with $$ \Delta e_n = e_n – e_{n-1} $$ and $$ \Delta e_{n-1} = e_{n-1} – e_{n-2} $$. Two key indicators are:

  1. $$ e_n \cdot \Delta e_n $$: Indicates whether the error magnitude is increasing ($$ > 0 $$) or decreasing ($$ < 0 $$).
  2. $$ \Delta e_n \cdot \Delta e_{n-1} $$: Indicates the presence of an extremum in the error trajectory. A sign change ($$ < 0 $$) signals that an extremum (peak or valley) has occurred.

By combining these indicators, the controller can accurately judge the trend of the dynamic error, such as identifying when the system is moving away from the setpoint after an overshoot.

The HSI-PID algorithm implements this logic through a feature model, a set of control modes, and a rule-based inference engine.

1. Feature Model ($$ \Phi $$): This model categorizes the system’s state based on error boundaries and the characteristic indicators.
$$
\begin{aligned}
\Phi_1&: e(t) \geq M \quad \text{(Large Error Zone)} \\
\Phi_2&: \epsilon < e(t) < M \quad \text{(Medium Error Zone)} \\
\Phi_3&: e(t) \leq \epsilon \quad \text{(Small Error Zone)} \\
\Phi_4&: e(t) \cdot \Delta e(t) > 0 \\
\Phi_5&: e(t) \cdot \Delta e(t) < 0 \\
\Phi_6&: \Delta e(t) \cdot \Delta e(t-1) > 0 \\
\Phi_7&: \Delta e(t) \cdot \Delta e(t-1) < 0
\end{aligned}
$$
Here, $$ M $$ is a pre-defined large error threshold, and $$ \epsilon $$ is a very small positive number defining the acceptable error tolerance.

2. Control Modes ($$ \Psi $$): These are the specific control actions or PID adjustment strategies.
$$
\begin{aligned}
\Psi_1&: u(t) = u(t-1) + k_1 \{ K_p \Delta e(t) + K_i e(t) + K_d [\Delta e(t) – \Delta e(t-1)] \} \\
\Psi_2&: u(t) = u(t-1) + k_1 K_p e_m(t) \\
\Psi_3&: u(t) = u(t-1) \quad \text{(Hold)} \\
\Psi_4&: u(t) = u(t-1) + K_p \Delta e(t) + K_i e(t) + K_d [\Delta e(t) – \Delta e(t-1)] \\
\Psi_5&: u(t) = u(t-1) + k_2 K_p e_m(t) \\
\Psi_6&: u(t) = K_p \Delta e(t) + K_i e(t) + K_d [\Delta e(t) – \Delta e(t-1)]
\end{aligned}
$$
where $$ e_m(t) $$ is the latest extreme error value, $$ k_1 > 1 $$ is an amplification coefficient used to accelerate response when error is large and increasing, and $$ 0 < k_2 < 1 $$ is a suppression coefficient used to cautiously reduce error when it is decreasing from a peak.

3. Inference Rule Set ($$ \Omega $$): This is the knowledge base that maps the feature state to the optimal control mode, emulating a human operator’s decision-making process.
$$
\begin{aligned}
\Omega_1&: \text{IF } \Phi_1 \text{ AND } \Phi_4 \text{ THEN } \Psi_1 \quad \text{(Large & increasing error: Aggressive correction)} \\
\Omega_2&: \text{IF } \Phi_1 \text{ AND } \Phi_5 \text{ AND } \Phi_7 \text{ THEN } \Psi_2 \quad \text{(Large error just past a peak: Amplified correction)} \\
\Omega_3&: \text{IF } \Phi_1 \text{ AND } \Phi_5 \text{ AND } \Phi_6 \text{ THEN } \Psi_3 \quad \text{(Large error decreasing without peak: Hold)} \\
\Omega_4&: \text{IF } \Phi_2 \text{ AND } \Phi_4 \text{ THEN } \Psi_4 \quad \text{(Medium & increasing error: Standard PID)} \\
\Omega_5&: \text{IF } \Phi_2 \text{ AND } \Phi_5 \text{ AND } \Phi_7 \text{ THEN } \Psi_5 \quad \text{(Medium error just past a peak: Suppressed correction)} \\
\Omega_6&: \text{IF } \Phi_2 \text{ AND } \Phi_5 \text{ AND } \Phi_6 \text{ THEN } \Psi_3 \quad \text{(Medium error decreasing: Hold)} \\
\Omega_7&: \text{IF } \Phi_3 \text{ THEN } \Psi_6 \quad \text{(Small error: Standard PID from scratch)}
\end{aligned}
$$

This rule-based, multi-mode strategy allows the HSI-PID controller for the quadrotor drone to respond aggressively when far from the target, act cautiously to prevent overshoot when approaching it, and maintain precise control when within the tolerance band—effectively resolving the classic “speed versus overshoot” trade-off of conventional PID.

Simulation Analysis and Performance Evaluation

To validate the effectiveness of the proposed HSI-PID controller for a quadrotor drone, simulation studies were conducted focusing on the critical vertical (altitude) control channel. The plant model for the Z-axis dynamics is represented by the transfer function:

$$
G(s) = \frac{1.63}{s^2 + 5s}
$$

A conventional PID controller was first tuned for a balanced performance, yielding gains $$ K_p = 60, K_i = 0.3, K_d = 3 $$. The HSI-PID controller was initialized with the same base PID gains for a fair comparison, and its intelligent parameters were set as: error threshold $$ M = 0.1 $$, tolerance $$ \epsilon = 0.001 $$, amplification coefficient $$ k_1 = 2 $$, and suppression coefficient $$ k_2 = 0.6 $$.

The step response under each controller is analyzed below, with key performance metrics summarized in the following table:

Controller Rise Time (s) Overshoot (%) Number of Oscillations Settling Time (s)
Conventional PID 0.64 8.7 3 ~1.60
HSI-PID (Proposed) 0.95 5.0 1 ~1.10

The results clearly demonstrate the superiority of the HSI-PID strategy for the quadrotor drone. While the conventional PID has a faster initial rise, it exhibits significant overshoot and sustains multiple oscillations before settling. In contrast, the HSI-PID controller shows a slightly slower but more deliberate rise, culminating in a substantially reduced overshoot (5.0% vs. 8.7%), only one minor oscillation, and a faster overall settling time (1.10s vs. 1.60s). This indicates a smoother, more stable, and ultimately quicker attainment of the target altitude.

Robustness Verification: A critical test for any quadrotor drone controller is its performance under model uncertainty or external disturbances. To simulate this, the plant dynamics were altered to represent a changed flight condition (e.g., different payload or aerodynamic effect):

$$
G'(s) = \frac{2.3}{2s^2 + 5s}
$$

The same controllers, with identical parameters, were tested against this perturbed model. The conventional PID controller’s performance degraded markedly: overshoot increased to 18%, oscillations became more pronounced (5 cycles), and settling time extended to approximately 2.54 seconds. The HSI-PID controller, however, demonstrated remarkable robustness. Its rise time remained consistent at 0.95s, overshoot increased only moderately to 11%, it exhibited only 2 oscillations, and it settled around 1.57 seconds. The performance comparison under perturbation is summarized below:

Controller Rise Time (s) Overshoot (%) Number of Oscillations Settling Time (s) Degradation
Conventional PID (Perturbed) 0.70 18.0 5 ~2.54 Severe
HSI-PID (Perturbed) 0.95 11.0 2 ~1.57 Moderate

The intelligent, rule-based adaptation of the HSI-PID controller allows the quadrotor drone flight system to maintain significantly better stability and faster recovery when faced with unmodeled dynamics, showcasing its enhanced robustness—a vital characteristic for real-world UAV operations where conditions are never perfectly ideal.

Conclusion

This work successfully developed and validated a Human-Simulating Intelligent PID control strategy tailored for the attitude control of a quadrotor drone. By integrating the logical, state-aware decision-making of human-simulating control with the proven framework of PID regulation, the proposed method effectively addresses the limitations of conventional linear PID control in managing nonlinear, underactuated systems. The HSI-PID controller dynamically adjusts its control strategy and parameters in real-time based on the error and its rate of change, allowing for aggressive correction when needed and cautious fine-tuning to prevent instability.

Simulation results on the altitude control channel of a quadrotor drone model conclusively show that the HSI-PID controller delivers superior performance: it significantly reduces overshoot, minimizes oscillatory behavior, and shortens the settling time compared to a well-tuned conventional PID. Furthermore, under simulated model perturbations, the HSI-PID controller demonstrates far greater robustness, maintaining stable and acceptable performance where the conventional controller degrades substantially. This intelligent control approach provides a powerful and practical solution for achieving high-precision, stable, and adaptive flight control in quadrotor drones, paving the way for more reliable autonomous operations in complex and dynamic environments.

Scroll to Top