In recent years, the autonomous flight and environmental perception capabilities of Unmanned Aerial Vehicles (UAVs) have significantly improved, expanding their applications across military, industrial, rescue, and inspection domains. Multi-drone systems, particularly drone formations, offer advantages such as wide perception ranges, large operational radii, and enhanced risk resistance, greatly increasing mission efficiency. Consequently, drone formation control has garnered widespread attention, with trajectory planning in various scenarios being a key research focus. This article addresses the challenges of obstacle avoidance and fault tolerance in drone formation flight, proposing a dynamic formation switching and reconfiguration method. We develop an improved Dynamic Window Approach (DWA) with adaptive evaluation function weights to enhance obstacle avoidance in dynamic environments. Additionally, we introduce a formation reconfiguration strategy for fault-tolerant flight when a drone in the formation fails. Simulation results demonstrate the effectiveness of our approach in achieving dynamic obstacle avoidance and formation reconfiguration under single-drone faults or power deficiencies, with lower inter-drone distance errors compared to traditional methods.

The core problem in drone formation flight involves managing static and dynamic obstacles while maintaining formation integrity. During missions, drone formations may need to switch formations to adapt to different task requirements, such as transforming from a triangular to a linear formation in dense forest environments for easier passage, and then reverting to a triangular formation in open areas for broader coverage. Moreover, when a drone in the formation fails due to faults or power issues, the remaining drones must reconfigure into a new formation to continue the mission effectively. This necessitates robust algorithms for formation obstacle avoidance, formation switching, and fault-tolerant reconfiguration. In this work, we focus on a leader-follower drone formation strategy, where one drone is designated as the leader and the others as followers. The formation shape is defined by relative distances and angles between the leader and followers. We consider both static and dynamic obstacles, treating other drones in the formation as dynamic threats to avoid collisions. The goal is to plan smooth trajectories that satisfy kinematic constraints while achieving formation objectives.
To mathematically describe the drone formation problem, we model each drone as a rigid body moving in a two-dimensional plane, with kinematics given by:
$$q = [x(t), y(t), \theta(t)]^T$$
where \(x(t)\) and \(y(t)\) are the coordinates at time \(t\), and \(\theta(t)\) is the heading angle. Assuming small displacements per sampling period, the position and heading increments are:
$$
\begin{align*}
\Delta x &= v(t) \Delta t \cos(\theta(t)) \\
\Delta y &= v(t) \Delta t \sin(\theta(t)) \\
\Delta \theta &= \omega(t) \Delta t
\end{align*}
$$
Thus, the pose at time \(t+1\) is:
$$
\begin{align*}
x(t+1) &= x(t) + v(t) \Delta t \cos(\theta(t)) \\
y(t+1) &= y(t) + v(t) \Delta t \sin(\theta(t)) \\
\theta(t+1) &= \theta(t) + \omega(t) \Delta t
\end{align*}
$$
In a drone formation with \(N\) drones, let \(S_i\) be the distance between the \(i\)-th follower and the leader:
$$S_i = \sqrt{(x_l – x_{fi})^2 + (y_l – y_{fi})^2}$$
where \((x_l, y_l)\) is the leader’s position and \((x_{fi}, y_{fi})\) is the \(i\)-th follower’s position. The desired distance is \(S^*_i\), and the formation objective is:
$$\lim_{t \to \infty} (S_i(t) – S^*_i) = 0 \quad \text{for} \quad i \in \{1, 2, \dots, N_F\}$$
where \(N_F = N-1\) is the number of followers. The formation shape parameters are defined using a formation information matrix \(F_d\):
$$F_d = \begin{bmatrix}
1 & 2 & \cdots & N \\
1 & 1 & \cdots & 1 \\
0 & S^*_1 & \cdots & S^*_{N_F} \\
0 & \theta^*_1 & \cdots & \theta^*_{N_F}
\end{bmatrix}_{4 \times N}$$
Each column \(F_{sj} = [f_{1j}, f_{2j}, f_{3j}, f_{4j}]^T\) represents the formation information for drone \(j\), where \(f_{1j}\) is the drone index, \(f_{2j}\) is the leader index being tracked, \(f_{3j}\) is the desired distance to the leader (0 for the leader), and \(f_{4j}\) is the desired heading angle relative to the leader (0 for the leader). This matrix allows flexible representation of various drone formation shapes, such as triangular or cross formations.
For obstacle avoidance, we consider two types of collision zones: inter-drone zones with radius \(R_t\) around each drone, and obstacle zones with radius \(R_{ko}\) around each obstacle. The avoidance constraints are:
$$
\begin{align*}
S_{np}(t) &= \sqrt{(x_n(t) – x_p(t))^2 + (y_n(t) – y_p(t))^2} > 2R_t, \quad \forall n \neq p \\
S_{no}(t) &= \sqrt{(x_n(t) – x_o(t))^2 + (y_n(t) – y_o(t))^2} > R_t + R_{ko}, \quad \forall n, o
\end{align*}
$$
where \(S_{np}\) is the distance between drones \(n\) and \(p\), \(S_{no}\) is the distance between drone \(n\) and obstacle \(o\), and \(Q\) is the number of obstacles. These constraints ensure safe drone formation navigation in cluttered environments.
Our overall method for drone formation obstacle avoidance and reconfiguration involves three main components: an improved DWA for leader trajectory planning with adaptive weights, a formation switching mechanism based on speed adjustment, and a fault-tolerant formation reconfiguration strategy. The workflow begins with formation takeoff, where followers track the leader’s trajectory to form the initial drone formation. During flight, the formation may switch shapes based on task demands by changing the relative positions of followers. When obstacles are encountered, the drones perform real-time avoidance using the adaptive DWA, then recover the formation. If a drone fails, the remaining drones reconfigure into a new formation, treating the faulty drone as an obstacle. This integrated approach ensures robust drone formation performance in dynamic scenarios.
For leader trajectory planning, we enhance the traditional Dynamic Window Approach by adapting the weights of the evaluation function based on the current environment. The DWA considers kinematic constraints and environmental limits to generate feasible trajectories. The velocity constraints are defined as:
$$
\begin{align*}
V_s &= \{(v, \omega) \mid v \in [v_{\text{min}}, v_{\text{max}}], \omega \in [\omega_{\text{min}}, \omega_{\text{max}}]\} \\
V_d &= \{(v, \omega) \mid v \in [v_c – \dot{v}_{\text{min}} \Delta t, v_c + \dot{v}_{\text{max}} \Delta t], \omega \in [\omega_c – \dot{\omega}_{\text{min}} \Delta t, \omega_c + \dot{\omega}_{\text{max}} \Delta t]\} \\
V_a &= \{(v, \omega) \mid v \leq 2 \cdot \text{dist}(v, \omega) \cdot \dot{v}_{\text{min}}, \omega \leq 2 \cdot \text{dist}(v, \omega) \cdot \dot{\omega}_{\text{min}}\}
\end{align*}
$$
where \(V_s\) is the velocity range set, \(V_d\) is the set achievable under acceleration limits, \(V_a\) is the safety constraint set to prevent high speeds near obstacles, and \(\text{dist}(v, \omega)\) is the minimum distance to obstacles along the trajectory. The admissible velocity set is:
$$V_r = V_s \cap V_d \cap V_a$$
To select the optimal velocity from \(V_r\), an evaluation function \(G(v, \omega)\) is used:
$$G(v, \omega) = \alpha \cdot f_h(v, \omega) + \beta \cdot f_d(v, \omega) + \gamma \cdot f_v(v, \omega)$$
where \(f_h(v, \omega) = 180^\circ – \delta\) is the heading angle evaluation (\(\delta\) is the angle between the trajectory and the target direction), \(f_d(v, \omega) = \min(d_o, d_{\text{max}})\) is the obstacle distance evaluation (\(d_o\) is the distance to the nearest obstacle, \(d_{\text{max}}\) is a threshold), and \(f_v(v, \omega) = v_g\) is the velocity evaluation (\(v_g\) is the linear velocity). The weights \(\alpha\), \(\beta\), and \(\gamma\) are adaptively adjusted using a fuzzy controller based on the distance to the target \(d_g\) and the distance to the obstacle \(d_o\). This allows the drone formation to prioritize obstacle avoidance when close to obstacles and target heading when far from obstacles. The fuzzy rules are summarized in Table 1.
| Rule | \(d_g\) | \(d_o\) | \(\alpha\) | \(\beta\) | \(\gamma\) |
|---|---|---|---|---|---|
| 1 | PS (Near) | PB (Far) | PB (Large) | PM (Medium) | PS (Small) |
| 2 | PS | PM (Medium) | PB | PM | PS |
| 3 | PS | PB | PB | PS | PS |
| 4 | PM (Medium) | PB | PS | PB | PS |
| 5 | PM | PM | PM | PM | PS |
| 6 | PM | PB | PM | PS | PB (Large) |
| 7 | PS | PB | PS | PB | PS |
| 8 | PS | PM | PM | PM | PM |
| 9 | PB (Far) | PB | PB | PS | PB |
The weights are normalized to [0,1] for balance. This adaptive DWA enables the leader to plan smooth, obstacle-free trajectories, which followers track to maintain the drone formation.
For formation switching, we adjust the speeds of drones based on inter-drone distances to achieve desired shapes rapidly. When the distance between the leader and a follower \(S_i\) exceeds a safe tracking distance \(S_{\text{safe}}\), the leader’s maximum speed is reduced:
$$
v = \begin{cases}
v_{l,\text{max}}, & S_i < S_{\text{safe}} \\
v_{l,\text{max}} – \dot{v} \cdot \Delta t, & S_i \geq S_{\text{safe}}
\end{cases}
$$
Similarly, for distances between followers \(S_f\), the follower speeds are adjusted:
$$
v = \begin{cases}
v_{f,\text{max}}, & S_f < S_{\text{safe-ff}} \\
v_{f,\text{max}} – \dot{v} \cdot \Delta t, & S_f \geq S_{\text{safe-ff}}
\end{cases}
$$
where \(S_{\text{safe-ff}}\) is the safe distance between followers. This speed modulation ensures that drones can quickly converge to new formation positions without losing track, facilitating efficient drone formation transformations. The formation switching algorithm iteratively updates drone positions using the improved DWA, with followers targeting the leader’s trajectory and adjusting speeds as needed.
In cases of drone faults, we implement a fault-tolerant formation reconfiguration strategy. If a follower fails, it exits the formation and moves to a safe location, treated as a moving obstacle by other drones. The remaining drones reconfigure into a new formation by updating the formation matrix \(F_d\) to reflect the reduced number of drones. For example, if a 5-drone cross formation loses one follower, it may reconfigure into a 4-drone cross formation with adjusted parameters. The new formation matrix for \(N-m\) drones after \(m\) failures is:
$$F_d = \begin{bmatrix}
1 & 2 & \cdots & N-m \\
1 & 1 & \cdots & 1 \\
0 & S^*_1 & \cdots & S^*_{N_F} \\
0 & \theta^*_1 & \cdots & \theta^*_{N_F}
\end{bmatrix}_{4 \times (N-m)}$$
where \(N_F = N-m-1\). If the leader fails, followers continue flying in formation to a safe landing spot, avoiding the faulty leader as an obstacle. This reconfiguration maintains mission continuity and enhances the robustness of drone formation operations.
We conducted three simulation experiments to validate our method. The initial parameters are listed in Table 2.
| Parameter | Value | Parameter | Value |
|---|---|---|---|
| \(v_{\text{max}}\) | 20 m/s | \(\alpha\) | 0.05 |
| \(\dot{v}_{\text{max}}\) | 0.4 m/s² | \(\beta\) | 0.2 |
| \(\omega_{\text{max}}\) | 20 deg/s | \(\gamma\) | 0.1 |
| \(\dot{\omega}_{\text{max}}\) | 0.4 deg/s² | \(R_t\) | 1 m |
In Experiment 1, we compared traditional DWA with our method for formation switching. A drone formation of five drones started from initial positions and formed a triangular formation, then switched to a cross formation. The formation matrices were:
Triangular formation:
$$F_d = \begin{bmatrix}
1 & 2 & 3 & 4 & 5 \\
1 & 1 & 1 & 1 & 1 \\
0 & 3.94 & 6.88 & 3.94 & 6.88 \\
0 & 5\pi/4 & 7\pi/4 & 5\pi/4 & 7\pi/4
\end{bmatrix}$$
Cross formation:
$$F_d = \begin{bmatrix}
1 & 2 & 3 & 4 & 5 \\
1 & 1 & 1 & 1 & 1 \\
0 & 3.69 & 6.63 & 4.25 & 4.25 \\
0 & 0 & 0 & 7\pi/4 & 5\pi/4
\end{bmatrix}$$
With traditional DWA, the drones failed to maintain desired distances due to fixed speeds, resulting in incomplete formation switching. Our method, through speed adjustment, successfully achieved both formations with lower distance errors. The distances between followers and the leader over time showed convergence to desired values, confirming effective drone formation control.
Experiment 2 involved obstacle avoidance and formation recovery. Static and dynamic obstacles were introduced into the environment. The drone formation, initially in a cross shape, encountered obstacles and performed avoidance maneuvers. Traditional DWA struggled with recovery due to constant weights, while our adaptive DWA enabled smooth avoidance and rapid formation recovery. The inter-drone distances during avoidance are summarized in Table 3.
| Time (s) | Follower 1 Distance (m) | Follower 2 Distance (m) | Follower 3 Distance (m) | Follower 4 Distance (m) | Formation State |
|---|---|---|---|---|---|
| 0 | 3.69 | 6.63 | 4.25 | 4.25 | Cross Formation |
| 20 | 4.50 | 7.10 | 5.00 | 4.80 | Avoidance |
| 30 | 3.70 | 6.65 | 4.26 | 4.24 | Recovered |
The results indicate that our method maintained formation integrity with minimal deviations, showcasing its robustness for drone formation navigation in obstacle-rich environments.
Experiment 3 tested fault-tolerant formation reconfiguration. In single-drone fault scenarios, a follower failed, and the remaining four drones reconfigured into a new cross formation. The formation matrix was updated to:
$$F_d = \begin{bmatrix}
1 & 2 & 3 & 4 \\
1 & 1 & 1 & 1 \\
0 & 10.61 & 12.72 & 12.72 \\
0 & 0 & 5\pi/4 & 7\pi/4
\end{bmatrix}$$
For two-drone faults, three drones reformed into a triangular formation:
$$F_d = \begin{bmatrix}
1 & 2 & 3 \\
1 & 1 & 1 \\
0 & 9 & 9 \\
0 & 5\pi/4 & 7\pi/4
\end{bmatrix}$$
In both cases, the drone formation successfully reconfigured without collisions, with the faulty drones treated as obstacles. This demonstrates the efficacy of our reconfiguration strategy for ensuring continuous drone formation operations under faults.
In conclusion, we have presented a comprehensive method for drone formation obstacle avoidance and reconfiguration. Our improved DWA with adaptive evaluation function weights enhances dynamic obstacle avoidance capabilities. The formation switching mechanism, based on speed adjustment, enables rapid transformations between formation shapes. The fault-tolerant reconfiguration strategy allows drone formations to adapt to failures, maintaining mission effectiveness. Simulation results validate the method’s performance in various scenarios, showing lower distance errors and robust formation control compared to traditional approaches. Future work will involve extending the method to three-dimensional environments and conducting real-flight experiments to further assess its practicality for complex drone formation missions.
