Obstacle Avoidance Control for Drone Formation Based on Improved Potential Field and Sliding Mode Theory

The coordinated operation of drone swarms has become a pivotal research area, overcoming the limitations of single-agent systems in terms of task efficiency, robustness, and cost-effectiveness. A core challenge within swarm operations is maintaining a prescribed geometric configuration, known as **drone formation**. Among various control strategies, distributed control under a leader-follower framework offers significant advantages, including reduced communication burden and enhanced scalability, making it highly suitable for multi-agent systems. However, a critical practical problem arises when a **drone formation** encounters obstacles in its path. Existing methods often suffer from significant formation degradation during avoidance maneuvers and exhibit slow reformation speed afterwards, which can compromise mission efficiency and the benefits of operating as a cohesive unit.

Traditional artificial potential field (APF) methods provide a reactive, computationally efficient solution for local obstacle avoidance. Yet, when applied to multi-agent systems, they present inherent drawbacks such as a tendency to get trapped in local minima and a lack of inherent coordination forces to preserve the **drone formation** structure. This work addresses these shortcomings by proposing a novel, integrated control scheme. We develop a distributed sliding mode formation controller synergistically combined with an enhanced artificial potential field. The improved APF introduces formation coordination forces and auxiliary escape forces, enabling the **drone formation** to temporarily and smoothly deform to navigate obstacles before rapidly reconstituting the desired geometry. This approach minimizes formation loss and accelerates recovery, ensuring efficient progress toward the mission target.

1. Mathematical Modeling of the Drone Formation System

1.1 Communication Topology and Graph Theory

The communication network within a **drone formation** consisting of \(n\) follower agents and one leader agent can be effectively described using graph theory. We define a directed graph \(\mathcal{G} = (\Pi, \mathcal{E}, \mathcal{A}_L)\). Here, \(\Pi = \{\pi_1, \pi_2, …, \pi_n\}\) is the set of follower nodes. The edge set \(\mathcal{E} \subseteq \Pi \times \Pi\) represents communication links. The adjacency matrix \(\mathcal{A}_L = [a_{ij}] \in \mathbb{R}^{n \times n}\) encodes these links: \(a_{ij} = 1\) if agent \(i\) receives information from agent \(j\), otherwise \(a_{ij}=0\), with \(a_{ii}=0\). The in-degree of node \(i\) is \(d_i = \sum_{j=1}^n a_{ij}\), and the in-degree matrix is \(\mathbf{D} = \text{diag}\{d_i\}\). The graph Laplacian matrix is defined as \(\mathbf{L} = \mathbf{D} – \mathcal{A}_L\). To incorporate the leader (index \(n+1\)), we define an extended adjacency matrix. Let \(h_i=1\) if follower \(i\) receives information directly from the leader, and \(\mathbf{H} = \text{diag}\{h_i\}\). A key matrix for stability analysis is \(\mathbf{Q} = \mathbf{L} + \mathbf{H}\).

1.2 Agent Dynamics and Formation Tracking Error

For trajectory control purposes, the outer-loop dynamics of a quadrotor drone can be modeled as a double-integrator system. For agent \(i\), its motion is governed by:

$$
\dot{\mathbf{r}}_i = \mathbf{v}_i, \quad \dot{\mathbf{v}}_i = \mathbf{u}_i
$$

where \(\mathbf{r}_i = [x_i, y_i, z_i]^T \in \mathbb{R}^3\) and \(\mathbf{v}_i \in \mathbb{R}^3\) are its position and velocity vectors, respectively, and \(\mathbf{u}_i \in \mathbb{R}^3\) is the control input. This can be written in state-space form with state \(\mathbf{p}_i = [\mathbf{r}_i^T, \mathbf{v}_i^T]^T\):

$$
\dot{\mathbf{p}}_i = \mathbf{A} \mathbf{p}_i + \mathbf{B} \mathbf{u}_i, \quad \text{with} \quad \mathbf{A} = \begin{bmatrix} \mathbf{0} & \mathbf{I}_3 \\ \mathbf{0} & \mathbf{0} \end{bmatrix}, \quad \mathbf{B} = \begin{bmatrix} \mathbf{0} \\ \mathbf{I}_3 \end{bmatrix}
$$

The collective dynamics of the follower **drone formation** is:

$$
\dot{\mathbf{P}} = (\mathbf{I}_n \otimes \mathbf{A}) \mathbf{P} + (\mathbf{I}_n \otimes \mathbf{B}) \mathbf{U}
$$

where \(\mathbf{P} = [\mathbf{p}_1^T, …, \mathbf{p}_n^T]^T\), \(\mathbf{U} = [\mathbf{u}_1^T, …, \mathbf{u}_n^T]^T\), and \(\otimes\) denotes the Kronecker product.

Under the leader-follower strategy, a desired formation is defined by fixed offsets relative to the leader’s position. Let \(\mathbf{p}^*_i = [\mathbf{r}^{*T}_i, \mathbf{0}^T]^T\) define the desired state offset for follower \(i\) from the leader. The tracking error for follower \(i\) is defined as \(\boldsymbol{\xi}_i = \mathbf{p}_i – \mathbf{p}^*_i\). The formation consensus error, which drives the control objective, is:

$$
\mathbf{e}_i = \sum_{j=1}^{n} a_{ij}(\boldsymbol{\xi}_i – \boldsymbol{\xi}_j) + h_i (\boldsymbol{\xi}_i – \mathbf{p}_{n+1})
$$

where \(\mathbf{p}_{n+1}\) is the leader’s state. The global error vector is \(\mathbf{E} = (\mathbf{Q} \otimes \mathbf{I}_6) \boldsymbol{\Xi} – (\mathbf{H} \otimes \mathbf{I}_6)(\mathbf{1}_n \otimes \mathbf{p}_{n+1})\), with \(\boldsymbol{\Xi} = [\boldsymbol{\xi}_1^T, …, \boldsymbol{\xi}_n^T]^T\). A stable sliding surface is designed as:

$$
\mathbf{s}_i = \mathbf{K} \mathbf{e}_i
$$

where \(\mathbf{K} = [k_1 \mathbf{I}_3, k_2 \mathbf{I}_3]\), with \(k_1, k_2 > 0\). The global sliding surface is \(\mathbf{S} = (\mathbf{Q} \otimes \mathbf{K}) \boldsymbol{\Xi} – (\mathbf{H} \otimes \mathbf{K})(\mathbf{1}_n \otimes \mathbf{p}_{n+1})\). When the system state converges to and remains on this manifold (\(\mathbf{S} = \mathbf{0}\)), the formation consensus error \(\mathbf{E}\) converges to zero, achieving the desired **drone formation** tracking.

2. Design of the Enhanced Artificial Potential Field

The traditional APF is modified to address local minima and integrate formation preservation during obstacle avoidance for the **drone formation**.

2.1 Repulsive Potential Field

Obstacles are modeled as spheres with center \(\mathbf{r}_o\) and radius \(R_o\). The repulsive potential \(U_o\) and force \(\mathbf{F}_o\) for agent \(i\) are:

$$
U_o(\mathbf{r}_i) =
\begin{cases}
\frac{1}{2} k_o \left( \frac{1}{d(\mathbf{r}_i, \mathbf{r}_o) – R_o} – \frac{1}{\rho_o} \right)^2, & \text{if } d(\mathbf{r}_i, \mathbf{r}_o) \le \rho_o \\
0, & \text{otherwise}
\end{cases}
$$
$$
\mathbf{F}_o(\mathbf{r}_i) = -\nabla U_o(\mathbf{r}_i) =
\begin{cases}
-k_o \left( \frac{1}{d(\mathbf{r}_i, \mathbf{r}_o) – R_o} – \frac{1}{\rho_o} \right) \frac{\nabla d(\mathbf{r}_i, \mathbf{r}_o)}{[d(\mathbf{r}_i, \mathbf{r}_o) – R_o]^2}, & \text{if } d \le \rho_o \\
\mathbf{0}, & \text{otherwise}
\end{cases}
$$

where \(k_o>0\) is a gain, \(\rho_o\) is the influence range, and \(d(\cdot)\) is the Euclidean distance. The total repulsive force from \(m\) obstacles is \(\mathbf{F}_{o,total}(\mathbf{r}_i) = \sum_{o=1}^{m} \mathbf{F}_o(\mathbf{r}_i)\).

2.2 Attractive Potential Field

To prevent the target from being unreachable when inside an obstacle’s influence region, a two-stage attractive field is designed:

$$
U_{att}(\mathbf{r}_i) =
\begin{cases}
\frac{1}{2} k_{att1} \, d(\mathbf{r}_i, \mathbf{r}_t)^2, & \text{if } d(\mathbf{r}_i, \mathbf{r}_t) \le d_{thr} \\
\frac{1}{2} k_{att2} \, d(\mathbf{r}_i, \mathbf{r}_t)^2, & \text{otherwise}
\end{cases}
$$
$$
\mathbf{F}_{att}(\mathbf{r}_i) = -\nabla U_{att}(\mathbf{r}_i) =
\begin{cases}
-k_{att1} \, (\mathbf{r}_i – \mathbf{r}_t), & \text{if } d \le d_{thr} \\
-k_{att2} \, (\mathbf{r}_i – \mathbf{r}_t), & \text{otherwise}
\end{cases}
$$

with \(k_{att1} > k_{att2} > 0\) and \(d_{thr}\) as a threshold distance to the target \(\mathbf{r}_t\). This ensures stronger attraction near the target.

2.3 Formation Coordination Potential Field

This novel field acts only on followers experiencing repulsive forces, using communication topology to minimize formation distortion. Define a flag \(flag_i = 1\) if \(\mathbf{F}_{o,total}(\mathbf{r}_i) \neq \mathbf{0}\), else \(0\). The coordination potential and force are:

$$
U_b(\mathbf{r}_i, \mathbf{r}_j) =
\begin{cases}
\frac{k_b}{\sum_{j \in \mathcal{N}_i} a_{ij}} \sum_{j \in \mathcal{N}_i} a_{ij} \left( d(\mathbf{r}_i, \mathbf{r}_j) + \frac{\|\mathbf{r}^*_i – \mathbf{r}^*_j\|^2}{d(\mathbf{r}_i, \mathbf{r}_j)} \right), & \text{if } flag_i = 1 \\
0, & \text{otherwise}
\end{cases}
$$
$$
\mathbf{F}_b(\mathbf{r}_i, \mathbf{r}_j) =
\begin{cases}
-\frac{k_b}{\sum_{j \in \mathcal{N}_i} a_{ij}} \sum_{j \in \mathcal{N}_i} a_{ij} \left( 1 – \frac{\|\mathbf{r}^*_i – \mathbf{r}^*_j\|^2}{d(\mathbf{r}_i, \mathbf{r}_j)^2} \right) \nabla d(\mathbf{r}_i, \mathbf{r}_j), & \text{if } flag_i = 1 \\
\mathbf{0}, & \text{otherwise}
\end{cases}
$$

where \(\mathcal{N}_i\) is the set of neighbors (including the leader if \(h_i=1\)) for agent \(i\), and \(k_b>0\). This force attracts an agent towards its correct formation position relative to its neighbors when avoiding obstacles, reducing overall **drone formation** distortion.

2.4 Auxiliary Escape Potential Field

To resolve local minima, a tangential auxiliary field is triggered when an agent’s movement over a recent time window falls below a threshold \(\delta\).

$$
U_h(\mathbf{r}_i) =
\begin{cases}
\frac{1}{2} k_h \, d(\mathbf{r}_i, \mathbf{r}_o)^2, & \text{if } \Delta d_i \le \delta \\
0, & \text{otherwise}
\end{cases}
$$
$$
\mathbf{F}_h(\mathbf{r}_i) = -\nabla U_h(\mathbf{r}_i) =
\begin{cases}
-k_h \, (\mathbf{r}_i – \mathbf{r}_o), & \text{if } \Delta d_i \le \delta \\
\mathbf{0}, & \text{otherwise}
\end{cases}
$$

where \(\Delta d_i = \sum_{k=0}^{m} \|\mathbf{r}_i(t-k) – \mathbf{r}_i(t-k-1)\|\) and \(k_h>0\). This force, perpendicular to the repulsive force gradient, provides an escape mechanism.

3. Integrated Formation Cooperative Obstacle Avoidance Control Protocol

3.1 Leader Trajectory Control

The leader’s control law guides the entire **drone formation**:

$$
\mathbf{u}_{n+1}(t) = \mathbf{F}_{att}(\mathbf{r}_{n+1}) + \sum_{o=1}^{m} \mathbf{F}_o(\mathbf{r}_{n+1}) + \mathbf{F}_h(\mathbf{r}_{n+1}) – k_L \dot{\mathbf{r}}_{n+1}
$$

This integrates attraction, repulsion, escape forces, and a damping term \(-k_L \dot{\mathbf{r}}_{n+1}\) for input boundedness.

3.2 Distributed Sliding Mode Formation Cooperative Controller

The key innovation is integrating obstacle avoidance directly into the formation control law, avoiding a disruptive switch to a pure avoidance mode. When a follower detects obstacles, its desired formation offset is temporarily modified by the net avoidance force \(\mathbf{F}_{net}(\mathbf{r}_i) = \mathbf{F}_{o,total}(\mathbf{r}_i) + \mathbf{F}_b(\mathbf{r}_i, \mathbf{r}_j)\):

$$
\tilde{\mathbf{r}}^*_i = \mathbf{r}^*_i + \mathbf{F}_{net}(\mathbf{r}_i)
$$

This creates a dynamically deformed reference for the **drone formation** controller to track, enabling smooth obstacle negotiation. The modified desired state is \(\tilde{\mathbf{p}}^*_i = [\tilde{\mathbf{r}}^{*T}_i, \mathbf{0}^T]^T\).

The distributed control law for followers is derived using sliding mode control theory and has two components: an equivalent control \(\mathbf{U}_{eq}\) and a switching control \(\mathbf{U}_{sw}\).

$$
\mathbf{U} = \mathbf{U}_{eq} + \mathbf{U}_{sw}
$$

The equivalent control is designed based on the modified desired trajectory \(\tilde{\mathbf{P}}^*\):

$$
\mathbf{U}_{eq}(t) = – (\mathbf{Q} \otimes \mathbf{K} \mathbf{B})^{-1} \left\{ [\mathbf{Q} \otimes \mathbf{K} \mathbf{A}] \mathbf{P} – (\mathbf{Q} \otimes \mathbf{K}) \dot{\tilde{\mathbf{P}}}^* – \mathbf{H} \mathbf{1}_n \otimes (\mathbf{K} \mathbf{A} \mathbf{p}_{n+1} + \mathbf{K} \mathbf{B} \sigma) \right\}
$$

where \(\sigma\) is a lower bound on the leader’s control input. To reduce chattering, the switching control uses a hyperbolic tangent function instead of a sign function:

$$
\mathbf{U}_{sw} = – (\mathbf{Q} \otimes \mathbf{K} \mathbf{B})^{-1} \left[ \lambda_1 \tanh(\mathbf{S}) + \lambda_2 \mathbf{S} \right]
$$

with gains \(\lambda_1, \lambda_2 > 0\). The final integrated distributed sliding mode cooperative obstacle avoidance control protocol is:

$$
\mathbf{U} = – (\mathbf{Q} \otimes \mathbf{K} \mathbf{B})^{-1} \left[ (\mathbf{Q} \otimes \mathbf{K} \mathbf{A}) \mathbf{P} – (\mathbf{Q} \otimes \mathbf{K}) \dot{\tilde{\mathbf{P}}}^* – \mathbf{H} \mathbf{1}_n \otimes (\mathbf{K} \mathbf{A} \mathbf{p}_{n+1} + \mathbf{K} \mathbf{B} \sigma) + \lambda_1 \tanh(\mathbf{S}) + \lambda_2 \mathbf{S} \right]
$$

The stability of the closed-loop system can be proven using Lyapunov theory by selecting a candidate function \(V = \frac{1}{2} \mathbf{S}^T \mathbf{S}\) and showing its time derivative is negative definite under the proposed control law, ensuring the sliding surface \(\mathbf{S} = \mathbf{0}\) is reached and maintained.

4. System Parameters and Simulation Configuration

To validate the proposed controller’s effectiveness for a **drone formation**, a simulation was conducted with one leader and four followers. The communication topology and key parameters are summarized below.

Parameter Category Symbol Value / Description
Communication Topology (Adjacency) \(\mathcal{A}_L\) $$
\begin{bmatrix}
0 & 0 & 0 & 0 & 1 \\
0 & 0 & 0 & 0 & 1 \\
1 & 0 & 0 & 0 & 0 \\
1 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0
\end{bmatrix}
$$
Leader Index 5
\(\mathbf{H}\) \(\text{diag}\{1, 1, 0, 0\}\)
This structure contains a directed spanning tree with the leader as the root.
Initial Conditions & Desired Formation Leader Start \((40, -40, 0)\) m
Follower Start (1-4) \((43,-34,0), (36,-36,0), (37,-44,0), (44,-46,0)\) m
Desired Offset \(\mathbf{r}^*_i\) (1-4) \((-8,0,8), (8,0,8), (-16,0,16), (16,0,16)\) m
This defines a “V” shaped **drone formation** in 3D space.
Controller Gains \(\mathbf{K}\) \([1, 4]\) (i.e., \(k_1=1, k_2=4\))
\(\lambda_1, \lambda_2\) \(0.5, 0.35\)
\(\sigma\) \(-2\)
\(k_L\) (Leader Damping) \(100\)
Enhanced APF Parameters
\(k_{att1}, k_{att2}, d_{thr}\) \(1, 2.5, 40\) m
\(k_o\) (Leader), \(k_o\) (Follower) \(30, 15\)
\(\rho_o\) \(1.5 R_o\)
\(k_b, k_h, \delta\) \(2, 10, 0.05\)
Table 2: Obstacle Configuration in the Simulation Environment
Obstacle # Center Coordinates (x, y, z) [m] Radius \(R_o\) [m]
1 (50, 17, 30) 6
2 (23, 25, 36) 6
3 (40, 35, 20) 6
4 (44, 50, 27) 8
5 (24, 70, 34) 8
6 (48, 80, 39) 8

5. Analysis of Simulation Results and Performance

The mission involved flying to two target points: \(T_1 = (40, 0, 20)\) km and \(T_2 = (40, 100, 20)\) km, passing through the obstacle field. The proposed integrated controller was compared against a typical switching controller that disables formation control during avoidance (dismiss-reform strategy).

Formation Convergence and Keeping: In the initial phase, followers rapidly converged from their random initial positions to the desired “V” formation within approximately 4 seconds while climbing towards \(T_1\), demonstrating the effectiveness of the baseline distributed sliding mode formation controller.

Cooperative Obstacle Avoidance: During the second phase (flight from \(T_1\) to \(T_2\)), the **drone formation** successfully navigated all six obstacles. The key behavior observed was the temporary and smooth deformation of the formation geometry. Followers influenced by obstacle repulsion and neighbor coordination forces (\(\mathbf{F}_{net}\)) dynamically adjusted their relative positions, allowing the group to squeeze past or flow around obstacles without breaking apart. The leader’s trajectory, influenced by its own stronger repulsion field, guided the overall swarm movement.

Quantitative Performance Metric – Formation Loss: To quantify performance, a formation loss coefficient \(C\) is defined:
$$
C = \frac{1}{n+1} \sum_{i=1}^{n+1} \| \mathbf{r}_i – \bar{\mathbf{r}} \|, \quad \text{where} \quad \bar{\mathbf{r}} = \frac{1}{n+1}\sum_{i=1}^{n+1} \mathbf{r}_i
$$
This measures the spatial dispersion of the swarm. A lower value indicates a tighter, more well-defined formation.

Table 3: Comparative Performance Analysis
Performance Aspect Proposed Cooperative Controller Dismiss-Reform Switching Controller
Formation Loss (C) during avoidance Small, smooth fluctuations. Rapid return to baseline after passing each obstacle. Large, abrupt increases. Slow decay back to baseline, indicating sluggish reformation.
Obstacle Negotiation Formation deforms as a cohesive unit. Continuous coordination is maintained. Formation effectively dissolves; agents avoid independently before attempting to regroup.
Reformation Speed Fast. The controller inherently drives agents back to the modified reference \(\tilde{\mathbf{p}}^*_i\), which smoothly reverts to \(\mathbf{p}^*_i\) after obstacles. Slow. Agents must re-converge to the fixed \(\mathbf{p}^*_i\) using only the formation controller after avoidance is complete.
Overall Efficiency Higher. Minimized deviation from the planned swarm path and faster recovery of operational formation geometry. Lower. Erratic agent paths and prolonged periods without an effective formation.

The results clearly demonstrate that the proposed integrated control framework successfully addresses the core challenges. The improved potential field resolves local minima and provides coordinated avoidance forces. The distributed sliding mode controller seamlessly incorporates these forces into the formation tracking logic. Consequently, the **drone formation** exhibits minimal degradation when confronting obstacles and achieves rapid reformation, preserving the operational advantages of flying in a coordinated formation throughout the mission. This approach is thus highly suitable for applications requiring persistent **drone formation** integrity in complex, cluttered environments.

Scroll to Top