Quadrotor unmanned aerial vehicles (UAVs) have gained significant attention due to their versatility in applications such as aerial photography, emergency response, infrastructure inspection, and package delivery. These systems are characterized by their underactuated nature and strong coupling between degrees of freedom, which pose challenges for control design. Traditional Proportional-Integral-Derivative (PID) control methods often exhibit limitations, including prolonged response times and suboptimal dynamic performance. To address these issues, this paper proposes a fuzzy PID control strategy that integrates the advantages of fuzzy logic and PID control. This hybrid approach enhances system stability, dynamic response, and disturbance rejection, making the quadrotor more robust and reliable in various operational scenarios. Through detailed modeling and Simulink simulations, the effectiveness of the proposed control method is demonstrated, achieving desired performance metrics in both position and attitude control.
The motion of a quadrotor is governed by the manipulation of four rotors’ rotational speeds. Each rotor generates thrust and torque, enabling the vehicle to perform vertical, horizontal, and rotational movements. In a typical cross-configuration, the quadrotor’s rotors are arranged such that opposing pairs rotate in opposite directions to cancel out reactive torques. For instance, increasing the speed of rotors 2 and 4 while decreasing that of rotors 1 and 3 induces a rolling motion around the x-axis. Similarly, adjustments in rotor speeds can produce pitching and yawing motions. The fundamental principle relies on the balance of forces and moments, where the net thrust and torques determine the quadrotor’s translational and rotational dynamics.
To describe the orientation of the quadrotor, Euler angles are commonly used, representing rotations around the body-fixed axes. The rotation matrices for roll ($\Phi$), pitch ($\theta$), and yaw ($\Psi$) angles are defined as follows:
$$ R_x(\Phi) = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos(\Phi) & -\sin(\Phi) \\ 0 & \sin(\Phi) & \cos(\Phi) \end{bmatrix} $$
$$ R_y(\theta) = \begin{bmatrix} \cos(\theta) & 0 & \sin(\theta) \\ 0 & 1 & 0 \\ -\sin(\theta) & 0 & \cos(\theta) \end{bmatrix} $$
$$ R_z(\Psi) = \begin{bmatrix} \cos(\Psi) & -\sin(\Psi) & 0 \\ \sin(\Psi) & \cos(\Psi) & 0 \\ 0 & 0 & 1 \end{bmatrix} $$
The transformation from the body frame to the inertial frame is achieved by the composite rotation matrix:
$$ R_b^E = \begin{bmatrix} \cos(\theta)\cos(\Psi) & \cos(\Psi)\sin(\Phi)\sin(\theta) – \cos(\Phi)\sin(\Psi) & \sin(\Psi)\sin(\theta) + \cos(\Psi)\cos(\theta)\sin(\Phi) \\ \cos(\theta)\sin(\Psi) & \cos(\Psi)\cos(\theta) + \sin(\Phi)\sin(\Psi)\sin(\theta) & \cos(\theta)\sin(\Phi)\sin(\Psi) – \cos(\Psi)\sin(\theta) \\ -\sin(\theta) & \cos(\Phi)\sin(\theta) & \cos(\Phi)\cos(\theta) \end{bmatrix} $$
This matrix is crucial for converting forces and moments from the body frame to the global coordinate system, facilitating the derivation of the equations of motion.
The dynamic model of the quadrotor is developed under several simplifying assumptions: the vehicle is a rigid body with symmetric structure and constant mass, the center of gravity coincides with the geometric center, and effects such as aerodynamic damping and gyroscopic moments are neglected. The thrust and torque generated by each rotor are proportional to the square of its rotational speed, expressed as:
$$ F_i = C_T \omega_i^2 $$
$$ T_i = C_m \omega_i^2 $$
where $C_T$ and $C_m$ are the thrust and torque coefficients, respectively, and $\omega_i$ denotes the angular velocity of the $i$-th rotor. Aerodynamic drag forces along the x, y, and z axes are modeled as linear functions of velocity:
$$ f_x = k_1 \dot{x}, \quad f_y = k_2 \dot{y}, \quad f_z = k_3 \dot{z} $$
with $k_1$, $k_2$, and $k_3$ being the drag coefficients. The translational dynamics in the inertial frame are derived using Newton’s second law:
$$ \ddot{x} = \frac{U_1}{m} \left( \sin(\Psi)\sin(\theta) + \cos(\Psi)\cos(\theta)\sin(\Phi) \right) – \frac{k_1}{m} \dot{x} $$
$$ \ddot{y} = \frac{U_1}{m} \left( \cos(\theta)\sin(\Phi)\sin(\Psi) – \cos(\Psi)\sin(\theta) \right) – \frac{k_2}{m} \dot{y} $$
$$ \ddot{z} = \frac{U_1}{m} \cos(\Phi)\cos(\theta) – g – \frac{k_3}{m} \dot{z} $$
Here, $U_1$ represents the total thrust from all rotors, and $g$ is the gravitational acceleration. The rotational dynamics, considering the moments of inertia and aerodynamic damping, are given by:
$$ \ddot{\Phi} = \frac{U_2 – l k_4 \dot{\Phi} + (I_{yy} – I_{zz}) \dot{\theta} \dot{\Psi}}{I_{xx}} $$
$$ \ddot{\theta} = \frac{U_3 – l k_5 \dot{\theta} + (I_{zz} – I_{xx}) \dot{\Phi} \dot{\Psi}}{I_{yy}} $$
$$ \ddot{\Psi} = \frac{U_4 – l k_6 \dot{\Psi} + (I_{xx} – I_{yy}) \dot{\Phi} \dot{\theta}}{I_{zz}} $$
where $U_2$, $U_3$, and $U_4$ are the control inputs for roll, pitch, and yaw moments, respectively, $l$ is the distance from the center to each rotor, and $I_{xx}$, $I_{yy}$, $I_{zz}$ are the moments of inertia. The parameters used in the simulation are summarized in the table below:
| Parameter | Symbol | Value | Unit |
|---|---|---|---|
| Mass | $m$ | 2 | kg |
| Arm Length | $l$ | 0.2 | m |
| x-axis Drag Coefficient | $k_1$ | 0.01 | N·s²/m |
| y-axis Drag Coefficient | $k_2$ | 0.01 | N·s²/m |
| z-axis Drag Coefficient | $k_3$ | 0.01 | N·s²/m |
| x-axis Rotational Drag | $k_4$ | 0.012 | N·m·s/rad |
| y-axis Rotational Drag | $k_5$ | 0.012 | N·m·s/rad |
| z-axis Rotational Drag | $k_6$ | 0.012 | N·m·s/rad |
| x-axis Moment of Inertia | $I_{xx}$ | 1.25 | kg·m² |
| y-axis Moment of Inertia | $I_{yy}$ | 1.25 | kg·m² |
| z-axis Moment of Inertia | $I_{zz}$ | 1.25 | kg·m² |
| Gravitational Acceleration | $g$ | 9.81 | m/s² |

The control system for the quadrotor employs a dual-loop structure, with an inner loop for attitude control and an outer loop for position control. The position controller computes desired accelerations based on the error between the desired and actual positions, using PD control laws. For the z-axis, the control law includes gravity compensation:
$$ u_z = -k_{p3} z_e – k_{d3} \dot{z}_e + g + \frac{k_3}{m} \dot{z}_d + \ddot{z}_d $$
where $z_e = z – z_d$ is the position error. Substituting into the dynamics yields a second-order system:
$$ \ddot{z}_e + \left( k_{d3} + \frac{k_3}{m} \right) \dot{z}_e + k_{p3} z_e = 0 $$
Stability is ensured by the Routh-Hurwitz criterion, requiring $k_{d3} + \frac{k_3}{m} > 0$ and $k_{p3} > 0$. Similarly, control laws for the x and y axes are:
$$ u_x = -k_{p1} x_e – k_{d1} \dot{x}_e $$
$$ u_y = -k_{p2} y_e – k_{d2} \dot{y}_e $$
with $x_e = x – x_d$ and $y_e = y – y_d$. The desired roll and pitch angles are derived from the inverse transformation:
$$ \theta_d = \arctan\left( \frac{u_x \sin(\Psi) \cos(\Phi) – u_y \cos(\Psi) \cos(\Phi)}{u_z} \right) $$
$$ \Phi_d = \arctan\left( \frac{u_x \cos(\Psi) + u_y \sin(\Psi)}{u_z} \right) $$
and the total thrust is computed as:
$$ U_1 = \frac{m u_z}{\cos(\Phi) \cos(\theta)} $$
The attitude controller uses PD control to regulate the Euler angles. For roll angle:
$$ \frac{U_2}{I_{xx}} = -k_{p4} \Phi_e – k_{d4} \dot{\Phi}_e + \frac{l k_4}{I_{xx}} \dot{\Phi}_d + \ddot{\Phi}_d $$
leading to the error dynamics:
$$ \ddot{\Phi}_e + \left( k_{d4} + \frac{l k_4}{I_{xx}} \right) \dot{\Phi}_e + k_{p4} \Phi_e = 0 $$
Stability requires $k_{d4} + \frac{l k_4}{I_{xx}} > 0$ and $k_{p4} > 0$. analogous control laws are applied for pitch and yaw angles. A third-order differentiator is used to obtain the desired angles and their derivatives:
$$ \dot{x}_1 = x_2, \quad \dot{x}_2 = x_3, \quad \dot{x}_3 = -2^{3/5} \times 4 \times \left( x_1 – v(t) + (\zeta x_2)^{9/7} – 4 (\zeta^2 x_3)^{3/5} \right) $$
where $v(t)$ is the input angle, and $\zeta$ is a constant. The outputs $y_1 = x_2$ and $y_2 = x_3$ represent the angular velocity and acceleration, respectively.
Fuzzy PID control enhances the traditional PID controller by incorporating fuzzy logic to adaptively adjust the PID gains based on the error and its derivative. The inputs are the error $e$ and the change in error $\Delta e$, which are fuzzified using membership functions. The fuzzy sets are defined as {NB, NM, NS, ZO, PS, PM, PB}, representing negative big to positive big. Triangular membership functions are used to map the inputs to the fuzzy domain. The fuzzy inference engine applies rules derived from expert knowledge to determine adjustments to the PID gains. The output gains $\Delta k_p$, $\Delta k_i$, and $\Delta k_d$ are computed through defuzzification and added to the baseline PID parameters. The fuzzy rules for $\Delta k_p$ are shown in the following table:
| $\Delta k_p$ | NB | NM | NS | ZO | PS | PM | PB |
|---|---|---|---|---|---|---|---|
| NB | PB | PB | PM | PM | PS | ZO | ZO |
| NM | PB | PB | PM | PS | PS | ZO | NS |
| NS | PM | PM | PM | PS | ZO | NS | NS |
| ZO | PM | PM | PS | ZO | NS | NM | NM |
| PS | PS | PS | ZO | NS | NS | NM | NM |
| PM | PS | ZO | NS | NM | NM | NM | NB |
| PB | ZO | ZO | NM | NM | NM | NB | NB |
Similar tables are used for $\Delta k_i$ and $\Delta k_d$. The fuzzy PID controller continuously tunes the parameters, improving response speed and disturbance rejection.
Simulation results demonstrate the performance of the proposed control strategy. The quadrotor is tasked with tracking a desired trajectory from an initial position of [2, 3, 0] meters to a target of [0, 5, 10] meters. The attitude controller aims to stabilize the roll and pitch angles near zero while maintaining a yaw angle of $45^\circ$. The sampling period is set to 0.001 seconds. The position control outputs $u_x$, $u_y$, and $u_z$ are shown to converge, ensuring that the quadrotor reaches the target. Comparative plots between PID and fuzzy PID control indicate that both methods achieve similar settling times for position tracking. However, fuzzy PID significantly reduces overshoot in roll and pitch angles, with pitch angle overshoot decreasing from over $20^\circ$ to approximately $10^\circ$. The inner loop attitude control converges faster than the outer loop position control, maintaining system stability. The fuzzy PID controller’s adaptive tuning enhances robustness against disturbances, confirming its superiority over conventional PID for quadrotor applications.
In conclusion, the integration of fuzzy logic with PID control provides a effective solution for quadrotor UAV stabilization and trajectory tracking. The dynamic model, developed under reasonable assumptions, captures the essential physics of the system. The dual-loop control structure ensures rapid inner-loop response, while the fuzzy PID controller adapts to varying conditions, minimizing overshoot and improving dynamic performance. Simulation results validate the approach, showing that fuzzy PID control achieves desired performance with enhanced stability and disturbance rejection. Future work could explore real-time implementation and additional robustness tests in unpredictable environments.
