Design and Simulation of a Fuzzy Controller for Quadrotor Drone Hovering

In recent years, the quadrotor drone has emerged as a versatile unmanned aerial vehicle capable of vertical take-off and landing. I have focused on addressing the challenge of achieving stable fixed-altitude hovering, which is critical for applications such as surveillance, aerial reconnaissance, and disaster monitoring. Traditional control methods like PID require complex mathematical modeling and lack adaptability, whereas fuzzy control leverages expert knowledge without needing precise models, offering higher flexibility and practicality. This article presents my design of a fuzzy controller for quadrotor drone hovering, comparing it with an alternative input-merged fuzzy controller through simulation experiments.

A quadrotor drone typically features a symmetric cross or X-shaped frame with four rotors. The front and rear rotors rotate counterclockwise, while the left and right rotors rotate clockwise, canceling out torque effects. The total lift force is the sum of individual rotor thrusts:

$$ F = \sum_{i=1}^{4} F_i $$

By uniformly adjusting all rotor speeds, the quadrotor drone ascends or descends. Attitude control involves pitch (forward-backward tilt), roll (side-to-side tilt), and yaw (horizontal rotation). For pitch control, the speeds of rotors 1 and 3 are varied; for roll control, rotors 2 and 4 are adjusted; and yaw is controlled by differential sums of rotor pairs. My goal is to enable the quadrotor drone to lift off vertically, reach a preset altitude, and maintain stable hover, thus requiring precise control over height, roll angle, and pitch angle.

I designed three independent fuzzy controllers for height, roll, and pitch, each with two inputs and one output. The overall closed-loop control structure is illustrated below. For roll control, inputs are the roll angle $\phi(t)$ and its derivative $\dot{\phi}(t)$, with output $u_2$. For pitch control, inputs are the pitch angle $\theta(t)$ and its derivative $\dot{\theta}(t)$, with output $u_3$. For height control, inputs are the errors between actual and desired height and vertical velocity: $e_1(t) = z_d – z(t)$ and $e_2(t) = \dot{z}_d – \dot{z}(t)$, with output $u_1$. Adjustment coefficients $a_i$ and $b_i$ (for $i=1,2,3$) scale inputs and outputs. Since zero roll and pitch angles represent equilibrium, no setpoints are needed for these attitudes.

The fuzzy rules were developed using trial-and-error and expert knowledge. I defined five linguistic values for inputs and outputs: BN (Big Negative), SN (Small Negative), Z (Zero), SP (Small Positive), and BP (Big Positive). Membership functions are Gaussian, expressed as:

$$ \mu_{A_i^l}(x_i) = \exp\left(-\frac{(x_i – \bar{x}_i^l)^2}{(\sigma_i^l)^2}\right) $$

where $\bar{x}_i^l$ and $\sigma_i^l$ are the center and width for the $l$-th rule of input $i$. The fuzzy rule table comprises 25 rules, as summarized below.

$\dot{\phi}$ or $\dot{\theta}$ or $\dot{z}$ error BN SN Z SP BP
BN BN BN BN Z Z
SN BN SN Z Z Z
Z BN Z Z Z BP
SP Z Z Z SP BP
BP Z Z BP BP BP

The fuzzy system employs singleton fuzzification and product inference. The output for each controller is derived using center-average defuzzification:

$$ u = f(X) = \frac{\sum_{l=1}^{M} y^l \prod_{i=1}^{n} \mu_{A_i^l}(x_i)}{\sum_{l=1}^{M} \prod_{i=1}^{n} \mu_{A_i^l}(x_i)} $$

where $y^l$ is the center value of the output membership function for rule $l$, $M=25$ is the number of rules, and $n=2$ is the number of inputs. This formulation allows the quadrotor drone to adjust control signals based on real-time state errors.

For simulation, I simplified the quadrotor drone dynamics to focus on hovering. The state vector includes height, vertical velocity, roll and pitch angles, and their derivatives:

$$ X = [z, \dot{z}, \phi, \theta, \dot{\phi}, \dot{\theta}]^T $$

The control input vector is $u = [u_1, u_2, u_3]^T$, representing thrust, roll torque, and pitch torque. The nonlinear dynamics are:

$$ \ddot{z} = \frac{u_1}{m} \cos \phi \cos \theta – g $$
$$ \ddot{\phi} = \frac{u_2}{I_x} $$
$$ \ddot{\theta} = \frac{u_3}{I_y} $$

where $m$ is mass, $g$ is gravity, and $I_x$, $I_y$ are moments of inertia. These equations model the quadrotor drone behavior under the designed controllers.

I conducted simulations in MATLAB to evaluate performance. Initial conditions were set as $\phi = 0.9$ rad, $\theta = 0.5$ rad, $z = 0$ m, with a target height $z_d = 1$ m. The quadrotor drone successfully lifted off and achieved hover. Results for roll and pitch control show rapid convergence to zero, as seen in angle and angular velocity plots. Height control demonstrates smooth ascent to 1 m with minimal overshoot.

To highlight the efficacy of my design, I compared it with a linear merged-input fuzzy controller, which combines two inputs into one via $e = \alpha e_1 + \beta e_2$ (with $\alpha=1$, $\beta=5$), reducing rule complexity. However, simulations revealed that this merged approach requires longer settling times. For instance, the roll angle under my controller stabilized within seconds, whereas the merged controller took notably longer. Similarly, height control with merged inputs exhibited slower response.

Quantitative analysis used the root mean square (RMS) error between current and target states:

$$ \text{rms} = \sqrt{\frac{1}{N} \sum_{i=1}^{N} \| X_i – X_d \|^2 } $$

where $N$ is the number of time samples. The table below summarizes RMS values for roll, pitch, and height, averaged over the simulation period. Lower RMS indicates better performance.

Control Method Roll RMS Pitch RMS Height RMS Average RMS
Merged-Input Fuzzy Controller 0.387 0.212 0.432 0.34
Individual-Input Fuzzy Controller (My Design) 0.170 0.094 0.189 0.15

My design achieves lower RMS errors, confirming its superiority in maintaining quadrotor drone stability. The individual-input fuzzy controller enables quicker corrections when the quadrotor drone is disturbed, ensuring robust hover. This aligns with the goal of real-time adjustment for external factors like wind gusts.

In conclusion, I have developed a fuzzy controller that effectively enables a quadrotor drone to perform fixed-altitude hovering. By independently processing height and attitude errors, the controller outperforms a merged-input counterpart in convergence speed and stability. The quadrotor drone community can benefit from this adaptable approach, as fuzzy control avoids complex modeling and allows tuning based on expert experience. Future work will involve real-world testing on a physical quadrotor drone platform and exploration of deep learning techniques to further enhance autonomy. The versatility of the quadrotor drone in applications from agriculture to search-and-rescue underscores the importance of reliable hover control, and my design contributes a practical solution to this challenge.

Throughout this article, I have emphasized the role of fuzzy logic in quadrotor drone control. The quadrotor drone’s dynamics are inherently nonlinear, but fuzzy systems handle such complexities gracefully. By repeatedly testing and refining the controller, I ensured that the quadrotor drone can sustain hover even under initial imbalances. The simulation results validate that the quadrotor drone attains the desired state efficiently, paving the way for advanced autonomous operations. As quadrotor drone technology evolves, intelligent control methods like this will be crucial for expanding their capabilities in diverse environments.

To further illustrate the concepts, consider the following key formulas used in the quadrotor drone control system. The total thrust $T$ generated by the rotors relates to control input $u_1$ as $T = u_1$, while torques are proportional to $u_2$ and $u_3$. The hover condition requires balancing thrust against weight:

$$ u_1 = mg \quad \text{when} \quad \phi = \theta = 0 $$

During perturbations, the fuzzy controller computes adjustments to restore equilibrium. For example, if the quadrotor drone tilts due to wind, the roll controller outputs $u_2$ to counteract the disturbance, derived from the fuzzy inference process. This continuous adjustment keeps the quadrotor drone stationary at the target height.

In summary, the design process involved defining inputs, outputs, membership functions, and rules for each controller. I simulated the system using ODE solvers to integrate the dynamics equations. The quadrotor drone response was monitored for stability metrics. The success of this approach demonstrates that fuzzy control is a viable alternative to conventional methods for quadrotor drone applications. As I proceed to implement this on an actual quadrotor drone, factors like sensor noise and actuator delays will be incorporated to refine the controller. The quadrotor drone’s ability to hover precisely will enhance its utility in precision tasks, making this research a step forward in UAV autonomy.

Scroll to Top