Advanced Fuzzy PID Controller Design for Robust Drone Formation Flight

In recent years, the concept of drone formation flight has garnered significant attention in the field of autonomous systems, inspired by biomimetic studies of flocking birds and schooling fish. The primary aim is to enhance operational efficiency, reduce energy consumption, and overcome limitations associated with single-drone operations. Drone formation flight refers to the coordinated movement of two or more unmanned aerial vehicles (UAVs) arranged in a specific geometric pattern, maintaining this formation during flight or adapting it dynamically based on external conditions and mission requirements. As a researcher deeply immersed in control systems for aerial robotics, I have explored various methodologies to address the challenges of formation keeping and transformation. In this article, I present a comprehensive design of a fuzzy PID controller for three-dimensional drone formation flight, focusing on robust performance during maneuvers and seamless transitions between formation patterns. The approach integrates geometric relationships into the dynamical model, employs linear mixers for error synthesis, and leverages fuzzy logic for adaptive parameter tuning, ultimately demonstrating superior performance compared to traditional controllers through extensive simulations.

The motivation for this work stems from the growing need for reliable and flexible drone formation control in applications such as surveillance, search-and-rescue, and cooperative payload transport. Existing methods, including Lyapunov-based adaptive control, feedback linearization, and conventional PID designs, have shown promise but often lack the robustness to handle uncertainties like aerodynamic disturbances or the agility to execute complex formation changes. My investigation reveals that incorporating fuzzy logic into PID control can mitigate these issues by dynamically adjusting parameters based on real-time error feedback. This article details the mathematical modeling, controller architecture, and simulation outcomes, emphasizing the efficacy of the proposed method in maintaining and transforming formations, such as from a left-diamond to a right-diamond pattern. Throughout this discussion, the term “drone formation” will be frequently referenced to underscore the core focus, and visual aids like tables and equations will be used to clarify key concepts.

To lay the groundwork, let’s begin with the mathematical modeling of drone formation flight. Consider a leader-follower configuration, where the leader drone (denoted as L) and the follower drone (denoted as W) operate under identical autopilot dynamics. The autopilot model for each drone comprises first-order speed hold, first-order heading hold, and second-order altitude hold subsystems, described by the following equations:

$$ \dot{V}_i = -\frac{1}{\tau_V} V_i + \frac{1}{\tau_V} V_{ic} $$

$$ \dot{\psi}_i = -\frac{1}{\tau_{\psi}} \psi_i + \frac{1}{\tau_{\psi}} \psi_{ic} $$

$$ \ddot{h}_i = -\left( \frac{1}{\tau_{ha}} + \frac{1}{\tau_{hb}} \right) \dot{h}_i – \frac{1}{\tau_{ha}\tau_{hb}} h_i + \frac{1}{\tau_{ha}\tau_{hb}} h_{ic} $$

where \( i = L, W \) represents the leader and follower, respectively. \( V_i \) is the velocity, \( \psi_i \) is the heading angle, \( h_i \) is the altitude, and the terms with subscript \( c \) denote command inputs. The time constants \( \tau_V \), \( \tau_{\psi} \), \( \tau_{ha} \), and \( \tau_{hb} \) characterize the response dynamics of each channel. For drone formation flight, the relative geometry between drones is crucial. Assuming a three-dimensional space, let the relative positions in the longitudinal (x), lateral (y), and vertical (z) directions be defined as \( x = x_W – x_L \), \( y = y_W – y_L \), and \( z = h_W – h_L \), where \( (x_L, y_L, h_L) \) and \( (x_W, y_W, h_W) \) are the positions of the leader and follower. Based on the geometric relationships during formation flight, the kinematic equations can be linearized around nominal values. For instance, in a planar formation with small angles, the derivatives of relative positions yield:

$$ \dot{x} = V_L – V_W + \dot{\psi}_W y_0 $$

Substituting the heading dynamics and simplifying, we get:

$$ \dot{x} = -\frac{y_0}{\tau_{\psi}} \psi_W – V_W + V_L + \frac{y_0}{\tau_{\psi}} \psi_{Wc} $$

Similarly, for the lateral direction:

$$ \dot{y} = V_0 (\psi_L – \psi_W) – \dot{\psi}_W x_0 $$

which leads to:

$$ \dot{y} = \left( \frac{x_0}{\tau_{\psi}} – V_0 \right) \psi_W + V_0 \psi_L – \frac{x_0}{\tau_{\psi}} \psi_{Wc} $$

For the vertical direction, let \( z = h_W – h_L \) and define \( \xi = \dot{z} \). Then, the acceleration is:

$$ \dot{\xi} = \ddot{z} = \ddot{h}_W – \ddot{h}_L = -\left( \frac{1}{\tau_{ha}} + \frac{1}{\tau_{hb}} \right) \xi – \frac{1}{\tau_{ha}\tau_{hb}} z + \frac{1}{\tau_{ha}\tau_{hb}} h_{Wc} – \frac{1}{\tau_{ha}\tau_{hb}} h_{Lc} $$

These equations form the basis for designing the formation controller, capturing the interplay between individual drone dynamics and formation geometry. The goal is to ensure that the follower maintains desired offsets \( (x_c, y_c, z_c) \) relative to the leader, even during maneuvers. This requires a control system that can handle coupled errors across velocity, heading, and altitude channels. In my approach, I introduce linear mixers to synthesize error signals, enhancing precision by combining relative position deviations with state differences. For the velocity channel, the error \( e_x \) is:

$$ e_x = k_v (V_L – V_W) + k_x (x_c – x) $$

For the heading channel, the error \( e_y \) is:

$$ e_y = k_{\psi} (\psi_L – \psi_W) + k_y (y_c – y) $$

And for the altitude channel, the error \( e_z \) is simply:

$$ e_z = k_z (z_c – z) $$

Here, \( k_v \), \( k_x \), \( k_{\psi} \), \( k_y \), and \( k_z \) are weighting gains that balance the contribution of state errors and position offsets. These mixed errors are then fed into a fuzzy PID controller, which generates command inputs for the follower drone: \( V_{Wc} \), \( \psi_{Wc} \), and \( h_{Wc} \). The PID control law for each channel takes the form:

$$ V_{Wc}(t) = k_{px} e_x + k_{ix} \int_0^t e_x \, dt + k_{dx} \dot{e}_x $$

$$ \psi_{Wc}(t) = k_{py} e_y + k_{iy} \int_0^t e_y \, dt + k_{dy} \dot{e}_y $$

$$ h_{Wc}(t) = k_{pz} e_z + k_{iz} \int_0^t e_z \, dt + k_{dz} \dot{e}_z $$

The parameters \( k_p \), \( k_i \), and \( k_d \) are not fixed; instead, they are adjusted online by a fuzzy inference system based on the error and its derivative. This adaptive tuning is key to handling nonlinearities and uncertainties in drone formation flight, such as wind gusts or modeling inaccuracies. The fuzzy system uses linguistic rules to map inputs (error and error rate) to output adjustments for the PID gains. For example, in the x-channel, the inputs are \( e_x \) and \( \dot{e}_x \), with membership functions defined over their respective universes of discourse. I employ Gaussian membership functions for smooth transitions, as shown in the following table summarizing the fuzzy sets:

Variable Universe of Discourse Fuzzy Sets
\( e_x \) [-30, 30] NB, NM, NS, Z, PS, PM, PB
\( \dot{e}_x \) [-6, 6] NB, NM, NS, Z, PS, PM, PB
\( k_{px} \) [-6, 6] NB, NM, NS, Z, PS, PM, PB
\( k_{ix} \) [-3, 3] NB, NM, NS, Z, PS, PM, PB
\( k_{dx} \) [-3, 3] NB, NM, NS, Z, PS, PM, PB

Here, NB stands for Negative Big, NM for Negative Medium, NS for Negative Small, Z for Zero, PS for Positive Small, PM for Positive Medium, and PB for Positive Big. The fuzzy rules are designed based on heuristic knowledge of PID tuning. For instance, if the error is large and positive, the proportional gain should be increased to reduce the error quickly. Similarly, if the error rate is negative, the derivative gain might be adjusted to dampen oscillations. The rule bases for \( k_{px} \), \( k_{ix} \), and \( k_{dx} \) are presented in tables below, illustrating the decision logic for the x-channel. These rules are applied similarly to the y and z channels, with appropriate scaling.

Fuzzy Rule Base for Proportional Gain \( k_{px} \)
\( e_x \backslash \dot{e}_x \) NB NM NS Z PS PM PB
NB PB PB PM PM PS Z Z
NM PB PB PM PS PS Z NS
NS PM PM PM PS Z NS NS
Z PM PM PS Z NS NM NM
PS PS PS Z NS NS NM NM
PM PS Z NS NM NM NB NB
PB Z Z NM NM NM NB NB
Fuzzy Rule Base for Integral Gain \( k_{ix} \)
\( e_x \backslash \dot{e}_x \) NB NM NS Z PS PM PB
NB NB NB NM NM NS Z Z
NM NB NB NM NS NS Z Z
NS NB NM NS NS Z PS PS
Z NM NM NS Z PS PM PM
PS NM NS Z PS PS PM PB
PM Z Z PS PS PM PB PB
PB Z Z PS PM PM PB PB
Fuzzy Rule Base for Derivative Gain \( k_{dx} \)
\( e_x \backslash \dot{e}_x \) NB NM NS Z PS PM PB
NB PS NS NB NB NB NM PS
NM PS NS NB NM NM NS Z
NS Z NS NM NM NS NS Z
Z Z NS NS NS NS NS Z
PS Z Z Z Z Z Z Z
PM PB NS PS PS PS PS PB
PB PB PM PM PM PS PS PB

The defuzzification process converts fuzzy outputs to crisp values using the weighted average method, ensuring smooth control actions. This fuzzy PID architecture is applied to all three channels—velocity, heading, and altitude—enabling coordinated control for drone formation flight. The overall system block diagram illustrates the integration: reference formation offsets are compared with actual relative positions, errors are mixed with state differences, and the fuzzy PID controller computes commands for the follower drone. This design not only maintains formation during leader maneuvers but also facilitates dynamic transformation between formations by updating the desired offsets \( (x_c, y_c, z_c) \).

To validate the controller, I conducted simulations in a MATLAB/Simulink environment, focusing on two scenarios: formation keeping and formation transformation. The initial conditions for both drones are set at a common altitude of 914 m, heading angle of 0°, and velocity of 137 m/s. The nominal formation is a left-diamond pattern with desired offsets \( x_0 = 91 \) m, \( y_0 = 30 \) m, and \( z_0 = 0 \) m. The time constants for the autopilot are chosen as \( \tau_V = 2 \) s, \( \tau_{\psi} = 1.5 \) s, \( \tau_{ha} = 3 \) s, and \( \tau_{hb} = 4 \) s, reflecting typical response characteristics. For the linear mixers, the gains are tuned empirically: \( k_v = 0.8 \), \( k_x = 0.5 \), \( k_{\psi} = 1.2 \), \( k_y = 0.6 \), and \( k_z = 0.7 \). The fuzzy membership functions and rules are implemented as described earlier.

In the formation-keeping scenario, the leader executes a maneuver starting at time t=5 s: velocity increases by 9 m/s, heading turns by 20°, and altitude climbs by 300 m. The follower’s response is monitored over 60 seconds. The results show that the follower tracks the leader’s changes within approximately 7 seconds, with negligible steady-state error. The relative distances in x, y, and z directions initially deviate from the desired offsets but converge back within 10 seconds. Compared to a conventional PID controller—where gains are fixed—the fuzzy PID exhibits smaller overshoot and faster settling time. For instance, the x-distance overshoot is reduced by 40%, and the settling time is shortened by 30%. This improvement is attributed to the adaptive tuning of PID parameters, which effectively compensates for coupling effects and disturbances inherent in drone formation flight.

The formation transformation scenario involves switching from a left-diamond to a right-diamond pattern. The right-diamond offsets are \( x_c = 91 \) m, \( y_c = -30 \) m, and \( z_c = 0 \) m. The transition is initiated by updating the reference offsets at t=10 s. The simulation reveals that the follower adjusts its position smoothly, modifying its velocity and heading to achieve the new lateral offset while maintaining longitudinal and vertical alignment. The y-distance transitions from +30 m to -30 m over 15 seconds, with minimal oscillation. The real-time trajectories of both drones depict a seamless reconfiguration, highlighting the controller’s capability to handle geometric changes in drone formation. This transformation is essential for mission adaptability, such as switching from a search pattern to an attack formation.

To quantify performance, I computed key metrics like integral absolute error (IAE) and maximum overshoot for both scenarios. The results are summarized in the table below, comparing fuzzy PID with conventional PID. The data underscores the superiority of the fuzzy approach in managing drone formation dynamics.

Performance Comparison: Fuzzy PID vs. Conventional PID for Drone Formation Flight
Scenario Metric Fuzzy PID Conventional PID
Formation Keeping IAE (x-distance) 12.5 m·s 18.7 m·s
Max Overshoot (y-distance) 8% 15%
Settling Time (z-distance) 9 s 13 s
Formation Transformation IAE (y-distance) 25.3 m·s 35.6 m·s
Transition Time 15 s 22 s
Energy Consumption Low High

The robustness of the fuzzy PID controller is further tested under uncertainties, such as varying wind gusts modeled as additive disturbances to velocity and heading channels. With disturbances up to 20% of nominal values, the drone formation maintains stability, and offsets recover within 12 seconds. This resilience stems from the fuzzy system’s ability to modulate gains in response to error fluctuations, effectively damping oscillations. In contrast, conventional PID shows significant degradation, with offset errors persisting longer. These findings affirm that the proposed controller is well-suited for real-world drone formation applications where environmental factors are unpredictable.

From a theoretical perspective, the stability of the closed-loop system can be analyzed using Lyapunov methods. Although the fuzzy PID introduces nonlinearities, the bounded nature of gain adjustments ensures that the system remains input-to-state stable under mild conditions. For linearized dynamics around equilibrium, the error equations can be expressed in state-space form:

$$ \dot{\mathbf{e}} = \mathbf{A} \mathbf{e} + \mathbf{B} \mathbf{u} $$

where \( \mathbf{e} = [e_x, e_y, e_z]^T \) and \( \mathbf{u} \) is the control input from the fuzzy PID. The matrix \( \mathbf{A} \) depends on the autopilot time constants and formation geometry. With the fuzzy gains varying within known bounds, one can construct a Lyapunov function \( V = \mathbf{e}^T \mathbf{P} \mathbf{e} \) and show that \( \dot{V} < 0 \) for all trajectories, ensuring asymptotic stability. This theoretical grounding supports the empirical results, indicating that the drone formation will converge to desired offsets over time.

In practice, implementing this controller requires onboard processing capabilities for fuzzy inference. Modern drones equipped with microcontrollers or FPGAs can handle these computations in real-time. The computational load is moderate, as the fuzzy system involves a limited number of rules (e.g., 49 rules per channel) and simple membership evaluations. For larger drone formations with multiple followers, the controller can be extended using decentralized or hierarchical architectures. Each follower independently adjusts based on its relative position to the leader, reducing communication overhead. This scalability is crucial for applications like drone swarms, where hundreds of drones may operate in coordinated patterns.

Looking ahead, there are several directions for enhancing this drone formation control scheme. Integrating machine learning techniques could automate the design of fuzzy rules, optimizing them for specific mission profiles. Additionally, incorporating predictive control elements might improve performance during aggressive maneuvers. From an application standpoint, testing in outdoor environments with actual drones would validate simulation findings and address practical issues like sensor noise and communication delays. The ultimate goal is to achieve fully autonomous drone formations that can adapt to complex scenarios, from urban surveillance to agricultural monitoring.

In conclusion, the fuzzy PID controller presented here offers a robust and flexible solution for drone formation flight. By combining geometric modeling, linear error mixing, and adaptive fuzzy tuning, it achieves precise formation keeping and smooth transformation between patterns. Simulations demonstrate its advantages over traditional methods, including reduced overshoot, faster response, and resilience to disturbances. As drone technology evolves, such intelligent control strategies will be pivotal in unlocking the potential of coordinated aerial systems. The journey toward advanced drone formation capabilities is ongoing, and this work contributes a step forward in that endeavor, promising safer and more efficient operations in diverse fields.

Scroll to Top