Design and Implementation of an X-type Quadrotor Drone

The development of unmanned aerial vehicles (UAVs), particularly multi-rotor systems, has seen exponential growth across diverse sectors such as aerial photography, precision agriculture, infrastructure inspection, and surveillance. Among these, the quadrotor drone stands out due to its mechanical simplicity, ability to hover, and vertical take-off and landing (VTOL) capabilities. This article presents a comprehensive design and research study of an X-type quadrotor drone, detailing the complete workflow from conceptual modeling and algorithm development to hardware integration and system validation. The X-configuration, where the arms are oriented at 45 degrees relative to a forward-facing reference, offers distinct advantages over the traditional “+” configuration, including better camera mounting visibility and more symmetrical control authority on all axes, making it a representative and preferred choice for many applications. The core of any functional quadrotor drone is its flight control system, which governs stability, navigation, and mission execution. This system integrates sophisticated software algorithms with a robust hardware architecture comprising sensors, microcontrollers, and actuators.

1. Mathematical Modeling and Dynamics

Accurate modeling is the cornerstone of effective control system design. A quadrotor drone is a complex, under-actuated, and highly coupled nonlinear system. To facilitate analysis and controller synthesis, it is commonly treated as a rigid body with six degrees of freedom (6-DOF): three for translational motion (surge, sway, heave) and three for rotational motion (roll, pitch, yaw). The following assumptions are typically made to simplify the initial model: the structure is symmetrical and rigid, the propellers are rigid, and the thrust and drag forces are proportional to the square of the propeller’s rotational speed.

1.1 Reference Frames and Euler Angles

Two primary coordinate frames are defined: the earth-fixed inertial frame {E} and the body-fixed frame {B} attached to the center of mass of the quadrotor drone. The attitude of the vehicle is described by the orientation of {B} relative to {E}, commonly represented by Z-Y-X Euler angles: yaw (ψ), pitch (θ), and roll (φ). The rotation matrix \( \mathbf{R} \), which transforms a vector from {B} to {E}, is given by:

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

where \( c_x = \cos(x) \) and \( s_x = \sin(x) \).

1.2 Kinetics and Dynamics

The translational dynamics in the inertial frame are derived from Newton’s second law. The total thrust \( T \) acts along the negative z-axis of the body frame. The translational equations are:

$$
\begin{aligned}
m \ddot{x} &= T(\cos\phi \sin\theta \cos\psi + \sin\phi \sin\psi) – K_{ft_x} \dot{x} \\
m \ddot{y} &= T(\cos\phi \sin\theta \sin\psi – \sin\phi \cos\psi) – K_{ft_y} \dot{y} \\
m \ddot{z} &= T(\cos\phi \cos\theta) – mg – K_{ft_z} \dot{z}
\end{aligned}
$$

where \( m \) is the mass, \( g \) is gravitational acceleration, \( (x, y, z) \) are coordinates in {E}, and \( K_{ft} \) terms represent linear drag coefficients.

The rotational dynamics are derived from the Euler equation for rigid body rotation. Let \( \boldsymbol{\omega} = [p, q, r]^T \) be the angular velocity vector in the body frame. The dynamics are:

$$
\mathbf{J} \dot{\boldsymbol{\omega}} + \boldsymbol{\omega} \times (\mathbf{J} \boldsymbol{\omega}) = \boldsymbol{\tau} – \mathbf{K}_{fr} \boldsymbol{\omega}
$$

Here, \( \mathbf{J} \) is the inertia tensor (often approximated as diagonal \( \text{diag}(J_{xx}, J_{yy}, J_{zz}) \) for a symmetric quadrotor drone), \( \boldsymbol{\tau} = [\tau_\phi, \tau_\theta, \tau_\psi]^T \) is the control torque vector, and \( \mathbf{K}_{fr} \) is a matrix of rotational drag coefficients.

1.3 Actuator Model and Control Allocation

The control inputs for a quadrotor drone are the squared angular speeds of the four rotors, \( \Omega_i^2 \) (i=1,2,3,4). For an X-configuration, motors 1 (front-right) and 3 (rear-left) typically spin clockwise (CW), while motors 2 (front-left) and 4 (rear-right) spin counter-clockwise (CCW). The total thrust \( T \) and the torques \( \boldsymbol{\tau} \) are related to the rotor speeds by:

$$
\begin{bmatrix} T \\ \tau_\phi \\ \tau_\theta \\ \tau_\psi \end{bmatrix} =
\begin{bmatrix}
k_F & k_F & k_F & k_F \\
-\frac{l}{\sqrt{2}} k_F & -\frac{l}{\sqrt{2}} k_F & \frac{l}{\sqrt{2}} k_F & \frac{l}{\sqrt{2}} k_F \\
\frac{l}{\sqrt{2}} k_F & -\frac{l}{\sqrt{2}} k_F & -\frac{l}{\sqrt{2}} k_F & \frac{l}{\sqrt{2}} k_F \\
k_M & -k_M & k_M & -k_M
\end{bmatrix}
\begin{bmatrix} \Omega_1^2 \\ \Omega_2^2 \\ \Omega_3^2 \\ \Omega_4^2 \end{bmatrix}
$$

where \( k_F \) is the thrust coefficient, \( k_M \) is the drag (moment) coefficient, and \( l \) is the effective arm length from the center of mass to a motor. The \( \frac{1}{\sqrt{2}} \) factor arises from the 45-degree orientation of the arms in the X-configuration. The control allocation matrix above maps the desired collective force and moments to individual motor commands, a critical step in the flight controller.

2. Software Architecture and Control Algorithm Design

The software component is responsible for state estimation, control law computation, and generating actuator signals. A well-designed software stack is paramount for stable and responsive flight of the quadrotor drone.

2.1 Simulation Model Development

Prior to physical implementation, the dynamic model is built and simulated in a software environment like MATLAB/Simulink. A 3D CAD model of the drone structure, including the frame, motors, and propellers, is created using tools like SolidWorks or Autodesk Fusion 360. This model is used to accurately estimate mass properties, such as the inertia tensor \( \mathbf{J} \). These parameters are then exported to the simulation environment. In Simulink, the 6-DOF rigid body dynamics are implemented using the derived equations. The simulation platform allows for testing control algorithms, tuning parameters, and validating system behavior under various conditions without any risk to hardware.

2.2 State Estimation and Sensor Fusion

Accurate and real-time knowledge of the vehicle’s attitude (roll, pitch, yaw) is fundamental. This is achieved by fusing data from an Inertial Measurement Unit (IMU), typically containing a 3-axis gyroscope and a 3-axis accelerometer. The gyroscope provides high-frequency angular rate data but suffers from drift (bias accumulation over time). The accelerometer provides low-frequency but absolute orientation information relative to gravity, but is sensitive to translational accelerations (vibration, movement).

A widely adopted solution is the Complementary Filter. A more robust and modern approach uses a Kalman Filter or its simplified version, the Madgwick or Mahony filter, to fuse gyroscope, accelerometer, and often magnetometer (for yaw reference) data. The core of these algorithms often employs quaternions for attitude representation to avoid gimbal lock. A quaternion is a four-dimensional vector \( \mathbf{q} = [q_0, q_1, q_2, q_3]^T \), where \( q_0 \) is the scalar part and \( [q_1, q_2, q_3] \) is the vector part. The differential equation for quaternion update based on gyro rates is:

$$
\dot{\mathbf{q}} = \frac{1}{2} \mathbf{q} \otimes \begin{bmatrix} 0 \\ p \\ q \\ r \end{bmatrix}
$$

where \( \otimes \) denotes the quaternion product. The filter algorithm corrects this gyro-based prediction using measurements from the accelerometer and magnetometer, resulting in a stable and drift-free estimate of the attitude quaternion, which can be converted to Euler angles for control purposes.

2.3 Control Law Design: From PID to Fuzzy-PID

The primary control objective is to stabilize the attitude (inner loop) and then control the position/velocity (outer loop). The Proportional-Integral-Derivative (PID) controller is ubiquitous due to its simplicity and effectiveness for linear or mildly nonlinear systems. The standard PID control law for, e.g., the roll angle \( \phi \) is:

$$
u_{\phi}(t) = K_{P}^{\phi} e_{\phi}(t) + K_{I}^{\phi} \int_0^t e_{\phi}(\tau) d\tau + K_{D}^{\phi} \frac{de_{\phi}(t)}{dt}
$$

where \( e_{\phi}(t) = \phi_{desired}(t) – \phi_{estimated}(t) \), and \( u_{\phi} \) is the desired roll torque. A cascaded (nested) PID structure is common, where an outer loop generates desired angles/rates for a faster inner loop.

However, a quadrotor drone exhibits significant nonlinearities, parameter uncertainties (e.g., changing battery mass), and external disturbances (e.g., wind). A Fuzzy-PID controller enhances robustness by adapting the PID gains \( (K_P, K_I, K_D) \) online based on the error \( e \) and its derivative \( \dot{e} \). The fuzzy inference system uses linguistic rules like:

IF \( e \) is Positive Large AND \( \dot{e} \) is Negative Small THEN \( \Delta K_P \) is Positive Medium.

These rules are defined in a rule base table. The process involves fuzzification of inputs, rule evaluation, aggregation, and defuzzification to produce crisp adjustments to the PID gains. This endows the controller with adaptive characteristics.

The comparative analysis of a standard cascaded PID and a Fuzzy-PID controller for the simulated quadrotor drone is summarized below:

Performance Metric Roll/Pitch Axis Yaw Axis
Cascaded PID Fuzzy-PID Cascaded PID Fuzzy-PID
Rise Time (s) 0.10 0.02 1.00 0.80
Overshoot (%) 0.28 0.05 1.00 0.20
Settling Time (s) 0.70 0.07 2.90 2.00
Peak Time (s) 0.87 0.095 4.00 2.80
Steady-State Error ~0 ~0 ~0 ~0
Disturbance Rejection Moderate High Moderate High

The table clearly demonstrates the superior performance of the Fuzzy-PID controller, particularly in response speed and reduction of overshoot, which translates to a more stable and agile quadrotor drone.

3. Hardware System Implementation

The physical realization of the quadrotor drone requires careful selection and integration of components to meet performance, weight, and reliability constraints.

3.1 Flight Controller (FC) and Processing Unit

The flight controller is the brain. It runs the state estimation and control algorithms. A 32-bit ARM Cortex-M series microcontroller, such as the STM32F4 or STM32F7, is the industry standard. It offers sufficient computational power (FPU for floating-point math), numerous timers for PWM generation, and communication peripherals (UART, SPI, I2C). The firmware, often based on open-source projects like ArduPilot or PX4, is customized to implement our specific Fuzzy-PID controller and sensor fusion algorithm.

3.2 Sensor Suite

The primary attitude sensor is a MEMS-based IMU. The MPU6050, integrating a 3-axis gyroscope and a 3-axis accelerometer, is a common choice. For robust yaw estimation and full 9-DOF orientation, a magnetometer (e.g., HMC5883L) is often added, forming a package like the MPU9250. To minimize errors from sensor misalignment and PCB vibration, the IMU is placed near the center of mass, mounted on vibration-damping foam, and software low-pass filters are carefully tuned to attenuate high-frequency mechanical noise without introducing lag.

3.3 Propulsion System

This consists of brushless DC motors (BLDC), Electronic Speed Controllers (ESCs), and propellers. BLDC motors are preferred for their high power-to-weight ratio, efficiency, and longevity. ESCs convert the PWM signal from the FC into three-phase AC to drive the motors at the required speed. Propellers are specified by diameter and pitch (e.g., 1045 for 10-inch diameter, 4.5-inch pitch). For an X-configuration quadrotor drone, two clockwise (CW) and two counter-clockwise (CCW) propellers are used to cancel out reactive torques.

3.4 Power System

A high-discharge Lithium-Polymer (LiPo) battery is the standard power source due to its exceptional energy density and ability to deliver high current. A 3S (11.1V) or 4S (14.8V) battery is typical. The power distribution board (PDB) routes main battery power to the ESCs. Voltage regulators are critical for providing clean, stable power to sensitive electronics. For instance, a switching regulator steps down the battery voltage to 5V for the flight controller and peripherals, and a low-dropout linear regulator (LDO) like the AMS1117-3.3 further provides a very clean 3.3V supply for the microcontroller core and sensors.

3.5 Communication and Telemetry

A radio control (RC) receiver communicates pilot commands (e.g., from a Futaba or FrSky transmitter) to the flight controller using protocols like PWM, PPM, or more robust digital protocols (SBUS, CRSF). Additionally, a bi-directional telemetry radio module (e.g., SiK, ESP32-based) is employed for ground station communication, enabling real-time monitoring of flight data, parameter tuning, and mission planning.

3.6 Structural Framework

The airframe must be lightweight yet rigid to minimize flex-induced vibrations. Carbon fiber is the material of choice for high-performance frames due to its superb strength-to-weight ratio. The X-frame design centralizes the electronics and balances the motor arms. The integration of all hardware components is summarized below:

Subsystem Component Example Key Specification / Purpose
Processing STM32F405 Microcontroller 168 MHz, FPU, 1 MB Flash, Multiple Timers
Sensing MPU6050 IMU ±2000°/s gyro, ±16g accelerometer, I2C interface
Propulsion BLDC Motor (e.g., 2300KV) Thrust ~800g per motor on 4S with 5″ prop
Propulsion 30A BLHeli_S ESC PWM input, active braking, DSHOT protocol support
Power 1500mAh 4S LiPo Battery 14.8V, 100C discharge, Energy: ~22.2 Wh
Power Management 5V/3A BEC, AMS1117-3.3 LDO Step-down to 5V, clean 3.3V for digital logic
Communication FrSky R-XSR Receiver SBUS/CPPM, 16 channels, telemetry capable
Structure Carbon Fiber X Frame (250mm) 3K carbon weave, integrated PDB, weight ~80g

4. System Integration, Testing, and Validation

Following the individual design of software and hardware, the system is integrated and rigorously tested.

4.1 Hardware-in-the-Loop (HIL) Simulation

Before actual flight, HIL testing is conducted. The flight controller hardware is connected to a simulation PC. The software simulation model runs in real-time, sending simulated sensor data (IMU, etc.) to the actual FC via a communication interface. The FC runs its full firmware stack and generates motor commands, which are fed back into the simulation. This validates the entire control loop with real hardware timing and software, catching integration errors early.

4.2 Vibration Analysis and Mitigation

Excessive vibration is a primary cause of instability. It corrupts accelerometer readings and can even cause the gyroscope to saturate. After assembly, the quadrotor drone is powered and analyzed using an onboard data logger or telemetry. Frequency domain analysis of raw accelerometer data reveals resonant peaks. Mitigation strategies include: balancing propellers and motors, using soft vibration-damping mounts for the flight controller, and applying appropriate software notch filters in the control loop to suppress specific resonant frequencies identified from the analysis.

4.3 Flight Testing and Controller Tuning

Initial flights are conducted in a safe, open area with tethers or a safety net. The controller gains (both for baseline PID and the Fuzzy-PID’s scaling factors) are tuned systematically. A common method is to start with the attitude (angle) controllers, tuning one axis at a time (pitch, then roll, then yaw). The Ziegler-Nichols method or its modifications provide a starting point. The performance metrics from simulation (rise time, overshoot) are used as targets. The adaptive nature of the Fuzzy-PID controller typically reduces the number of tuning iterations required to achieve stable hover and responsive maneuvering.

5. Conclusion and Future Research Directions

This work presented a holistic approach to designing, modeling, and implementing an X-configuration quadrotor drone. The journey encompassed the derivation of nonlinear dynamic models, the development of robust sensor fusion and adaptive Fuzzy-PID control algorithms in simulation, and the practical integration of a hardware system comprising advanced microcontrollers, MEMS sensors, and efficient propulsion components. The comparative analysis validated the superiority of the intelligent Fuzzy-PID controller over classical methods in terms of response agility and disturbance rejection.

However, several challenges persist and open avenues for future work. The assumptions in the model (rigidity, linear aerodynamics) diverge from reality, especially under aggressive maneuvers or with flexible frames. Advanced control techniques like Sliding Mode Control (SMC) or Model Predictive Control (MPC) could be explored for higher robustness and handling of explicit constraints. The future of quadrotor drone technology is geared towards greater autonomy and collaboration. Key research directions include:

  • Enhanced Individual Autonomy: Integration of more exteroceptive sensors like LiDAR and cameras for real-time obstacle avoidance, simultaneous localization and mapping (SLAM), and fully autonomous navigation in GPS-denied environments.
  • Swarm Intelligence: Developing communication and coordination algorithms for fleets of quadrotor drones to perform complex tasks cooperatively, such as distributed sensing, formation flight, and collaborative manipulation.
  • Adaptive Morphology and Fault Tolerance: Designing drones that can adapt their physical configuration or control strategies in real-time to compensate for actuator failure or to optimize for different flight regimes (e.g., high-speed vs. hovering).
  • Energy Efficiency and Propulsion: Research into novel propulsion systems (e.g., hybrid electric), advanced aerodynamic designs, and AI-powered energy-aware trajectory planning to significantly extend flight endurance.

The X-type quadrotor drone, as a platform, remains at the forefront of aerial robotics research. Its versatility and the continuous evolution of its underlying technologies promise to unlock transformative applications across industrial, commercial, and scientific domains.

Scroll to Top