Design of a Flight Control System for Miniature Foldable Quadrotor Drones

In recent years, the rapid advancement of technology and increasing demand for unmanned aerial vehicle (UAV) applications have propelled quadrotor drones to the forefront of aerial robotics research. Quadrotor drones are prized for their agility, efficiency, and ease of control, finding widespread use in agriculture, surveying, rescue operations, and photography. However, designing a flight control system for these vehicles presents significant challenges, particularly for miniature foldable quadrotor drones. These micro UAVs, typically with a folded diameter under 55 mm and mass below 400 g, incorporate folding arm structures to enhance portability, allowing them to be carried easily or deployed from specific launchers. Despite their compact size, they must integrate various sensors and devices to maintain functionality, making the design of a robust flight control system both challenging and practical. The flight dynamics of such vehicles within the atmosphere exhibit complex nonlinear characteristics, complicating the establishment of precise mathematical models. Additionally, the folding mechanisms can introduce vibrations and susceptibility to gusts, demanding high-reliability attitude control systems to ensure safe and accurate flight operations. In this work, we present the design of a flight control system for a miniature foldable quadrotor drone, leveraging a proportional-integral-derivative (PID) controller enhanced with a backpropagation neural network (BPNN). This intelligent control system adaptively tunes PID parameters to cope with varying flight conditions and disturbances, eliminating the need for manual intervention. We detail the mathematical modeling, hardware design, control algorithm, simulation, and real-flight testing, demonstrating that our system offers strong adaptive capabilities and anti-interference performance, meeting safety requirements for stable flight.

The foundation of any effective flight control system lies in a accurate mathematical model that describes the quadrotor drone’s dynamics. We treat the miniature foldable quadrotor drone as a rigid body, decomposing its motion into angular movements about three axes and linear movements along three axes. To represent position and attitude, we define two coordinate systems: the body-fixed frame \(o_bx_by_bz_b\) and the Earth-fixed inertial frame \(o_ex_ey_ez_e\). The transformation between these frames is governed by a rotation matrix \(\mathbf{R}\), derived from Euler angles—roll (\(\phi\)), pitch (\(\theta\)), and yaw (\(\psi\)). The rotation matrix is expressed as:

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

where \(s\) denotes sine and \(c\) denotes cosine functions. This transformation is crucial for mapping forces and moments between frames.

For linear motion, applying Newton’s second law in the inertial frame yields the equations of motion. The quadrotor drone experiences thrust from four rotors (\(\sum_{i=1}^{4} F_{Ti}\)), gravity (\(F_G = mg\)), and aerodynamic drag proportional to velocity with coefficients \(K_x, K_y, K_z\). The linear acceleration components are:

$$
\ddot{x} = \frac{(s\theta c\phi c\psi + s\phi s\psi)\sum_{i=1}^{4} F_{Ti} – K_x \dot{x}}{m}
$$

$$
\ddot{y} = \frac{(s\theta c\phi s\psi – s\phi c\psi)\sum_{i=1}^{4} F_{Ti} – K_y \dot{y}}{m}
$$

$$
\ddot{z} = \frac{c\phi c\theta \sum_{i=1}^{4} F_{Ti} – K_z \dot{z}}{m} – g
$$

Here, \(m\) is the mass of the quadrotor drone, \(g\) is gravitational acceleration, and \(\dot{x}, \dot{y}, \dot{z}\) are velocities along the inertial axes. For angular motion, we use the Euler equations in the body frame. The quadrotor drone is subject to moments generated by rotor thrusts and aerodynamic effects. Let \(I_x, I_y, I_z\) be moments of inertia about the body axes, \(L\) the distance from each rotor to the center of mass, and \(c\) a conversion factor from force to moment. The angular accelerations are:

$$
\dot{p} = \frac{\sqrt{2} L (-F_{T1} – F_{T2} + F_{T3} + F_{T4})/2 – qr(I_z – I_y)}{I_x}
$$

$$
\dot{q} = \frac{\sqrt{2} L (F_{T1} – F_{T2} – F_{T3} + F_{T4})/2 – pr(I_z – I_x)}{I_y}
$$

$$
\dot{r} = \frac{c (F_{T1} – F_{T2} + F_{T3} – F_{T4}) – pq(I_y – I_x)}{I_z}
$$

where \(p, q, r\) are angular velocities about the body axes. These equations form the basis for simulating and controlling the miniature foldable quadrotor drone.

To implement control, we design a flight control system with hardware and software components. The hardware architecture emphasizes redundancy and compactness to suit the miniaturized quadrotor drone. Key modules include:

Module Components Function
Flight Control MPU6000 accelerometer/gyro, L3GD20 gyro, LSM303D accelerometer/magnetometer, MS5611 barometer Attitude estimation via sensor fusion; dual magnetometers and accelerometers for redundancy.
Navigation External GPS module, onboard barometer Position acquisition; external GPS minimizes electromagnetic interference on the main board.
Data Processing Dual processors: STM32F427 (main) and STM32F103 (backup) High-speed computation (168 MHz Cortex-M4); ensures reliability through redundancy.
Communication PPM/SBUS receiver interface, two TELEM ports, current sensor interface Connectivity with remote control, ground station, and other devices; supports future expansions.
Power Input Triple redundant inputs: current sensor (4.8–5.4 V), ESC port (4.5–18 V), USB (5 V) Flexible power options; enhances reliability for the foldable quadrotor drone.

The flight control software is built around a BPNN-enhanced PID controller. Traditional PID control, while simple and reliable, struggles with parameter tuning and nonlinearities inherent in quadrotor drone dynamics. Our approach integrates a BPNN to dynamically adjust PID gains (\(k_p, k_i, k_d\)) based on real-time error, enabling adaptive control without manual recalibration. The BPNN has a three-layer structure: input layer (with three nodes for error signals), hidden layer (with multiple nodes), and output layer (three nodes for \(k_p, k_i, k_d\)). Activation functions are hyperbolic tangent for the hidden layer and non-negative Sigmoid for the output layer. The incremental PID control law is:

$$
u(k) = u(k-1) + k_p(e(k) – e(k-1)) + k_i e(k) + k_d(e(k) – 2e(k-1) + e(k-2))
$$

where \(u(k)\) is the control output and \(e(k)\) is the error at step \(k\). The BPNN is trained using backpropagation to minimize the performance index \(E(k) = (r_{out}(k) – y_{out}(k))^2 / 2\), where \(r_{out}(k)\) is the network output and \(y_{out}(k)\) is the desired output. Weight updates follow gradient descent with momentum:

$$
\Delta w_{jh}(k) = -\eta_1 \frac{\partial E(k)}{\partial w_{jh}} + \alpha_1 \Delta w_{jh}(k-1)
$$

$$
\Delta w_{ij}(k) = -\eta_2 \frac{\partial E(k)}{\partial w_{ij}} + \alpha_2 \Delta w_{ij}(k-1)
$$

Here, \(\eta_1, \eta_2\) are learning rates, \(\alpha_1, \alpha_2\) are momentum factors, and \(w_{jh}, w_{ij}\) are weights for output and hidden layers, respectively. This adaptive mechanism allows the quadrotor drone to maintain stability under disturbances, such as gusts or folding mechanism vibrations.

To validate our design, we develop a simulation model in MATLAB/Simulink, structured into modules for initialization, dynamics, control, and external disturbances. The dynamics module implements the equations of motion, while the control module employs three BPNN-PID controllers for roll, pitch, and yaw. External disturbances are modeled as sinusoidal perturbations to mimic real-world airflow variations. Simulation results demonstrate the effectiveness of our controller for the miniature foldable quadrotor drone. Key performance metrics are summarized below:

Metric Roll Control Pitch Control Yaw Control
Steady-state Error < 0.2° < 0.2° < 0.5°
Response Time ~0.5 s ~0.5 s ~1.0 s
Overshoot < 5% < 5% < 10%

The adaptive PID parameters evolve during simulation, as shown by the following representative trends for pitch control:

$$
k_p(t) = 2.5 + 0.3 \sin(0.5t) \quad \text{(adapted based on error)}
$$

$$
k_i(t) = 0.8 + 0.1 e^{-0.2t} \quad \text{(integrator gain adjustment)}
$$

$$
k_d(t) = 1.2 + 0.2 \cos(0.3t) \quad \text{(derivative term modulation)}
$$

These variations highlight the BPNN’s ability to tune gains in response to dynamic conditions, ensuring robust performance for the quadrotor drone. The control outputs stabilize quickly after initial transients, with attitude errors converging near zero despite applied disturbances.

Following simulation, we conduct real-flight tests on a prototype miniature foldable quadrotor drone. The testing protocol involves five steps: code compilation and flashing, pre-flight checks, sensor calibration, takeoff and hover maneuvers, and post-flight data analysis. We use PX4 firmware and QGroundControl for implementation. Flight logs are recorded to assess attitude tracking. Results indicate that the quadrotor drone achieves stable hover with minimal deviation. Attitude tracking curves for roll, pitch, and yaw are derived from logged data, showing that after takeoff effects diminish, the BPNN-PID controller maintains errors within acceptable bounds. For instance, during aggressive maneuvers, pitch error peaks at 3° but rapidly reduces to 0.2°, while yaw error stays within 2°. The control system demonstrates rapid response to command changes, with no instability observed. This performance confirms that our design effectively counters airflow disturbances and mechanical vibrations inherent in foldable quadrotor drones.

In conclusion, we have designed and implemented a flight control system for a miniature foldable quadrotor drone, integrating a BPNN-adaptive PID controller to enhance stability and adaptability. The mathematical model captures essential dynamics, while the hardware design emphasizes redundancy and miniaturization. Simulation and flight tests validate that the system offers strong anti-interference capabilities, automatically adjusting to environmental changes without manual intervention. This work contributes to the advancement of micro UAV technology, providing a reliable solution for applications requiring compact and resilient quadrotor drones. Future efforts may focus on optimizing neural network architecture or incorporating additional sensors for improved navigation in complex environments.

Scroll to Top