Design of a Fuzzy-Immune Series Intelligent Control System for Multi-Rotor UAV Flight

The rapid proliferation and application of multi-rotor unmanned aerial vehicles (UAVs) represent a significant technological advancement. These platforms, capable of vertical take-off and landing, hovering, and agile maneuvering, have unlocked vast potential across numerous sectors. In China, the UAV drone industry has seen explosive growth, finding critical applications in agricultural plant protection, express logistics, emergency rescue, infrastructure inspection, environmental monitoring, and aerial surveying. This expanding role demands increasingly higher performance standards, particularly in terms of flight stability, control accuracy, and adaptability to complex environments. The core challenge lies in the inherent non-linearity and strong coupling of the flight dynamics, primarily stemming from the distributed motor layout which creates complex three-axis thrust interactions. These characteristics become particularly pronounced during high-speed flight or under external disturbances, making precise and robust control a non-trivial engineering problem. Traditional linear control methods often struggle to provide satisfactory performance across the entire flight envelope. Consequently, research into intelligent control systems that can handle these non-linearities and couplings is paramount for advancing the capabilities of China UAV drone technology. This article presents the design of a novel flight control system employing a series-connected fuzzy-immune architecture, optimized via an improved genetic algorithm, to achieve high-precision intelligent control for multi-rotor UAVs.

1. System Architecture and Hardware Design

The effectiveness of any intelligent control system is fundamentally dependent on a reliable and accurate hardware foundation for data acquisition and processing. The hardware design for this China UAV drone control system is centered around a high-performance processing core and a suite of precision sensors, meticulously integrated to capture the complete flight state.

1.1 Processor and Core Sensor Module

At the heart of the system is the STM32F405RGT6 microcontroller, chosen for its robust computational capabilities essential for sophisticated navigation and control algorithms. Based on the ARM Cortex-M4 core, it features a hardware floating-point unit (FPU) and enhanced Digital Signal Processing (DSP) instructions, enabling the efficient execution of complex mathematical operations required for sensor fusion and real-time control law calculation. It is powered directly by the platform’s main lithium polymer battery. The allocation of its interfaces for sensor and communication peripheral integration is detailed in Table 1.

Table 1: Microcontroller Interface Configuration
Interface Type Connected Sensor/Module Primary Function
I²C Barometer (MS5803), Magnetometer (MAG3110) Altitude data, heading reference
UART XBee Pro 900, Radio Receiver, GPS (Ublox LEA-5H) Telemetry, manual control, position/velocity
SPI Secondary MCU (if used) High-speed inter-processor communication
ADC (12-bit with DMA) Gyroscope (ADXRS620), Accelerometer (ADXL335) Angular rate and linear acceleration measurement

The inertial measurement unit (IMU) combines a single-axis analog gyroscope (ADXRS620) and a three-axis accelerometer (ADXL335). The gyroscope measures angular rates (roll, pitch), while the accelerometer measures specific force. Since the ADXRS620 outputs an analog voltage, the STM32F405’s internal 12-bit Analog-to-Digital Converter (ADC) is utilized. A Direct Memory Access (DMA) controller is configured for high-frequency sampling (2000 Hz) to minimize CPU overhead. To ensure ADC accuracy and handle the sensor’s output voltage range, a voltage attenuation and conditioning circuit is implemented, and a precise voltage reference (VREF3033) is employed. A digital Butterworth low-pass filter is applied in software to reduce high-frequency noise from the gyroscope signal. The magnetometer (MAG3110) provides a heading reference by measuring the Earth’s magnetic field, which is fused with other sensor data to yield a stable yaw estimate. The Global Positioning System (GPS) receiver delivers absolute position (latitude, longitude), velocity, and altitude in the WGS84 coordinate system. The barometric pressure sensor (MS5803) provides a high-resolution, short-term accurate measurement of altitude, which is crucial for altitude hold operations. Wireless communication is facilitated by an XBee Pro 900 module for long-range telemetry and a dedicated radio control (RC) receiver for manual pilot override. All sensors are powered from the Electronic Speed Controller’s (ESC) Battery Elimination Circuit (BEC) output (5V), which is subsequently regulated down to a stable 3.3V using linear voltage regulators (ASM1117) and isolation chips (WRB0505ZP-6) for noise-sensitive components.

2. Software System and Core Algorithm Design

The software system transforms raw sensor data into a coherent flight state estimate and computes precise control commands. It is structured into a navigation module and an intelligent flight control module.

2.1 Navigation and State Estimation

Accurate state estimation is the prerequisite for effective control. The navigation algorithm fuses data from multiple sensors. The altitude estimate $ \tilde{z} $ is obtained by fusing barometric altitude $ z_{baro} $ and GPS altitude $ z_{GPS} $ using a complementary filter or simple weighted average based on their noise characteristics:

$$ \tilde{z} = \frac{S_{GPS}^{-1} z_{baro} + S_{baro}^{-1} z_{GPS}}{S_{GPS}^{-1} + S_{baro}^{-1}} $$

where $ S_{baro}^{-1} $ and $ S_{GPS}^{-1} $ represent the inverse of the measurement noise covariance for the barometer and GPS, respectively.

Position and velocity are primarily derived from GPS. Given positions $ (X_1, Y_1, \tilde{z}_1) $ at time $ T_1 $ and $ (X_2, Y_2, \tilde{z}_2) $ at time $ T_2 $, the velocity components in the North-East-Down (NED) navigation frame are:

$$ \begin{cases} v_X = \dfrac{X_2 – X_1}{\Delta T} \\ v_Y = \dfrac{Y_2 – Y_1}{\Delta T} \\ v_Z = \dfrac{\tilde{z}_2 – \tilde{z}_1}{\Delta T} \end{cases}, \quad \Delta T = T_2 – T_1 $$

Attitude estimation is critical. The roll ($ \phi $) and pitch ($ \theta $) angles are initially estimated from the accelerometer readings $ (A_x, A_y, A_z) $ in the body frame when the UAV is near steady state:

$$ \phi_{acc} = \arctan2\left( A_y, \sqrt{A_x^2 + A_z^2} \right), \quad \theta_{acc} = \arctan2\left( -A_x, A_z \right) $$

These are then fused with the integrated gyroscope rates $ (\omega_x, \omega_y) $ via a complementary or Kalman filter to provide a dynamic, drift-free estimate. The yaw angle ($ \psi $) is obtained by fusing the magnetometer heading with the integrated gyroscope’s yaw rate. The final fused attitude quaternion or Euler angles $ (\tilde{\phi}, \tilde{\theta}, \tilde{\psi}) $ form the basis for flight control. This multi-sensor fusion approach is key to achieving the reliable navigation required for advanced China UAV drone operations.

2.2 Series Fuzzy-Immune PID Flight Controller Design

To address the non-linear and coupled dynamics, a novel Series Fuzzy-Immune PID controller is proposed. This architecture combines the adaptability of fuzzy logic with the dynamic response regulation of an immune feedback mechanism.

Control Inputs: The controller processes three primary error vectors:
Position error: $ \mathbf{e}_p = [\Delta X, \Delta Y, \Delta \tilde{z}]^T = [X’-X, Y’-Y, \tilde{z}’-\tilde{z}]^T $.
Velocity error: $ \mathbf{e}_v = [\Delta v_X, \Delta v_Y, \Delta v_Z]^T = [v_X’-v_X, v_Y’-v_Y, v_Z’-v_Z]^T $.
Attitude error: $ \mathbf{e}_a = [\Delta \tilde{\phi}, \Delta \tilde{\theta}]^T = [\tilde{\phi}’-\tilde{\phi}, \tilde{\theta}’-\tilde{\theta}]^T $.
Here, primed variables denote desired (target) states.

Immune Feedback Controller Core: Inspired by biological immune response principles, the control output for, say, the X-axis position channel, is formulated as:

$$ s_{px} = G_x \left[ 1 – \eta h(\Delta X, \Delta \dot{X}) \right] (\Delta X) – \frac{1}{g} \left( \frac{I_{ix}}{r_x} \int \Delta X \, dt + \frac{I_{dx} \dot{r}_x}{r_x} \Delta X + \frac{k_p f_x}{n} \Delta \dot{X} \right) $$

where $ G_x $ controls the response speed, $ \eta $ regulates stability, $ h(\cdot) $ is a non-linear function representing the strength of the immune feedback (modeled by a fuzzy system), $ \Delta \dot{X} $ is the rate of change of position error, $ I_{ix}, I_{dx} $ are inertial terms, $ r_x, \dot{r}_x, f_x $ are elements of coordinate transformation matrices between body and navigation frames, $ k_p $ is a proportional gain, and $ n $ symbolizes the antigen level. Similar equations govern the Y, Z, velocity, and attitude channels. The immune mechanism inherently provides a form of adaptive gain scheduling.

Fuzzy Logic System for $ h(\cdot) $: The non-linear function $ h $ is implemented using a fuzzy inference system. The inputs are the error (e) and error change rate (ec) for each control channel. Each input is fuzzified with two membership functions: Negative (N) and Positive (P). The output $ h $ uses three membership functions: Negative (N), Zero (Z), and Positive (P). Four simple, effective rules are defined based on the immune feedback principle, as shown in Table 2.

Table 2: Fuzzy Rule Base for Immune Feedback Function \( h \)
Rule # IF Error (e) is… AND Error Change (ec) is… THEN Output \( h \) is…
1 P P N
2 P N Z
3 N P Z
4 N N P

In the series architecture, the fuzzy system dynamically shapes the immune controller’s response. The output of this combined Fuzzy-Immune module acts as an intelligent, adaptive compensator that works in series with a baseline PID structure, significantly enhancing the system’s ability to handle the non-linear thrust coupling endemic to multi-rotor China UAV drones.

2.3 Parameter Optimization via Improved Genetic Algorithm

The performance of the Series Fuzzy-Immune PID controller is highly dependent on key parameters, notably the proportional, integral, and derivative gains ($ k_p, k_i, k_d $) within the navigation frame PID structure. Manually tuning these for optimal performance across all flight regimes is impractical. An Improved Genetic Algorithm (IGA) is employed for global, automated optimization.

Chromosome Encoding: A chromosome is encoded as a vector $ \mathbf{C} = [k_p, k_i, k_d] $, representing a potential solution.

Fitness Function: The fitness of a chromosome is evaluated using a time-integrated cost function based on tracking performance and response quality:

$$ F(\mathbf{C}) = \int_0^T \left[ \lambda_1 (|\mathbf{e}_p|) + \lambda_2 (|\mathbf{e}_v|) + \lambda_3 (|\mathbf{e}_a|) + \lambda_4 t_r \right] dt $$

where $ \lambda_1, \lambda_2, \lambda_3, \lambda_4 $ are weighting coefficients, and $ t_r $ is a term penalizing slow rise time. A lower fitness score indicates better performance.

Improved Genetic Operations: The algorithm introduces adaptive selection pressure to balance exploration and exploitation:

$$ P(\text{selection}) = \zeta_{max} – \frac{\zeta_{max} – \zeta_{min}}{\text{MaxGen}} \cdot \text{Gen} \cdot (p_c \cdot p_m) $$

where $ \zeta_{max/min} $ are max/min selection pressures, Gen is the current generation, MaxGen is the maximum generations, and $ p_c, p_m $ are crossover and mutation probabilities.

The velocity and position update for particle $ i $ in dimension $ j $ (blending GA with PSO concepts) is:

$$ \begin{aligned} U_{ij}(\text{Gen}+1) &= U_{ij}(\text{Gen}) + \varphi_1 \gamma_1 (P_{best,ij} – \beta_{ij}(\text{Gen})) + \varphi_2 \gamma_2 (G_{best,j} – \beta_{ij}(\text{Gen})) \\ \beta_{ij}(\text{Gen}+1) &= \beta_{ij}(\text{Gen}) + U_{ij}(\text{Gen}+1) \end{aligned} $$

where $ U $ is velocity, $ \beta $ is position (parameter value), $ P_{best} $ is the particle’s historical best, $ G_{best} $ is the swarm’s global best, $ \varphi_1, \varphi_2 $ are learning factors, and $ \gamma_1, \gamma_2 $ are random numbers in [0,1]. This hybrid update rule enhances convergence. The key parameters for the IGA optimization process are summarized in Table 3.

Table 3: Improved Genetic Algorithm Configuration Parameters
Parameter Symbol / Name Value
Population Size 50
Maximum Generations MaxGen 200
Chromosome Dimension c 3 (for \( k_p, k_i, k_d \))
Learning Factors \( \varphi_1, \varphi_2 \) 0.28, 0.36
Crossover Probability \( p_c \) 0.85
Mutation Probability \( p_m \) 0.05
Selection Pressure Range \( \zeta_{min}, \zeta_{max} \) 0.4, 0.9

This optimization cycle runs offline or during a dedicated calibration flight, yielding an optimal set of $ (k_p, k_i, k_d) $ that minimizes the fitness function, thereby tailoring the controller to the specific dynamics of the China UAV drone platform.

3. Experimental Validation and System Performance

The designed system was implemented and tested on a commercial-grade electric quadcopter platform, representative of common China UAV drone configurations. The hardware modules were integrated, and the software algorithms were deployed on the STM32F405 microcontroller.

3.1 Test Methodology

Flight tests were conducted to evaluate key performance metrics: attitude stabilization, yaw control, and altitude hold. The UAV was tasked with taking off in attitude-stabilized mode, executing a series of pre-defined attitude maneuvers, and finally transitioning to altitude-hold mode. Flight data (sensor readings, controller outputs, commanded states) were telemetered to a ground station via the XBee link for post-analysis. The performance of the proposed Series Fuzzy-Immune IGA (SFI-IGA) system was compared against two established methods from recent literature: a Fuzzy PID strategy for a hybrid gasoline-electric hexacopter (Method A) and a Non-certainty Equivalent Adaptive Fault-Tolerant control method (Method B).

3.2 Attitude Control Response

The pitch angle response under challenging wind disturbance conditions is shown in the comparative plot. The desired pitch angle was a varying reference signal. The SFI-IGA system demonstrated superior tracking performance. Its response curve closely followed the desired trajectory with minimal deviation and oscillation. The maximum error range was confined to approximately ±12 degrees, significantly lower and smoother than the oscillations observed in Method A and Method B. This demonstrates the enhanced disturbance rejection and non-linear compensation provided by the fuzzy-immune series structure, which is critical for stable video capture or precise maneuvering in China UAV drone applications.

3.3 Yaw Control Response

The yaw angle control performance was tested with a step-and-hold command. The SFI-IGA system achieved a fast, well-damped response to the new heading setpoint, settling with minimal overshoot and steady-state error. The yaw angle remained stable within a tight band around the command. In contrast, both comparative methods exhibited either slower settling times, larger overshoot, or persistent low-frequency oscillations. The accurate yaw control is essential for tasks like infrastructure inspection, where maintaining a consistent camera heading is crucial.

3.4 Altitude Hold Stability

In altitude-hold mode, the UAV was commanded to maintain a fixed height above ground. The SFI-IGA system maintained the most stable altitude, with deviations typically within a ±1.5 meter band under calm conditions, effectively rejecting disturbances like ground effect and mild turbulence. Both Method A and Method B showed larger and more frequent altitude deviations. This superior altitude keeping stems from the optimized PID gains from the IGA and the adaptive compensation of the fuzzy-immune controller, ensuring the China UAV drone can perform reliable terrain following or stationary observation missions.

4. Conclusion and Future Outlook

This article has detailed the comprehensive design of an intelligent flight control system for multi-rotor UAVs, employing a novel Series Fuzzy-Immune PID architecture optimized via an Improved Genetic Algorithm. The hardware design establishes a reliable sensing and computation foundation, while the software design addresses the core control challenge through multi-sensor fusion navigation and a biologically-inspired, adaptive control law. Experimental validation on a quadcopter platform confirms the system’s effectiveness, demonstrating significantly improved performance in attitude tracking, yaw control, and altitude hold compared to contemporary alternative methods. The system’s ability to handle non-linearities and coupling through intelligent adaptation makes it a promising solution for advancing the robustness and capability of next-generation China UAV drone platforms. Future work may focus on implementing the IGA for real-time online parameter adaptation, extending the controller to manage full position tracking and complex trajectory following, and further testing in more severe operational environments to fully validate its robustness for industrial-grade China UAV drone applications.

Scroll to Top