Next Article in Journal
Composite Learning-Based Inverse Optimal Fault-Tolerant Control for Hierarchy-Structured Unmanned Helicopters
Previous Article in Journal
Deep Learning-Based Acoustic Recognition of UAVs in Complex Environments
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Multi-UAV Formation Obstacle Avoidance Method Combined with Improved Simulated Annealing and an Adaptive Artificial Potential Field

1
School of Aeronautics and Astronautics, University of Electronic Science and Technology of China, Chengdu 611731, China
2
SDU-ANU Joint Science College, Shandong University, Weihai 264209, China
3
Yangtze Delta Region Institute (Huzhou), University of Electronic Science and Technology of China, Huzhou 313001, China
4
Aircraft Swarm Intelligent Sensing and Cooperative Control Key Laboratory of Sichuan Province, University of Electronic Science and Technology of China, Chengdu 611731, China
5
National Key Laboratory of Adaptive Optics, Chengdu 611731, China
*
Author to whom correspondence should be addressed.
Drones 2025, 9(6), 390; https://doi.org/10.3390/drones9060390
Submission received: 15 April 2025 / Revised: 15 May 2025 / Accepted: 21 May 2025 / Published: 22 May 2025

Abstract

:
The traditional artificial potential field (APF) method exhibits limitations in its force distribution: excessive attraction when UAVs are far from the target may cause collisions with obstacles, while insufficient attraction near the goal often results in failure to reach the target. Furthermore, the APF is highly susceptible to local minima, compromising the motion reliability in complex environments. To address these challenges, this paper presents a novel hybrid obstacle avoidance algorithm—deflected simulated annealing–adaptive artificial potential field (DSA-AAPF)—which combines an improved simulated annealing mechanism with an enhanced APF model. The proposed approach integrates a leader–follower distributed formation strategy with the APF framework, where the resultant force formulation is redefined to smooth the UAV trajectories. An adaptive attractive gain function is introduced to dynamically adjust the UAV velocity based on the environmental context, and a fast-converging controller ensures accurate and efficient convergence to the target. Moreover, a directional deflection mechanism is embedded within the simulated annealing process, enabling UAVs to escape the local minima caused by semi-enclosed obstacles through continuous rotational motion. The simulation results, covering the formation reconfiguration, complex obstacle avoidance, and entrapment escape, demonstrate the feasibility, robustness, and superiority of the proposed DSA-AAPF algorithm.

1. Introduction

With the ongoing convergence of control, communication, and computing technologies, the cooperative control of multi-agent systems has garnered significant attention from researchers worldwide. Compared with single-agent systems, multi-agent systems offer a wide range of advantages, including the ability to handle more complex tasks, higher efficiency, improved fault tolerance, and inherent parallelism. Consequently, leveraging consensus theory in multi-agent cooperation to investigate formation reconfiguration, path planning, and obstacle avoidance has emerged as a vibrant and promising research domain.
Path-planning algorithms primarily address the challenge of enabling agents to navigate through environments containing obstacles by determining the shortest or most efficient path while avoiding collisions. Classic path-planning approaches include the A* algorithm [1], Dijkstra’s algorithm [2], rapidly exploring random trees [3], ant colony optimization [4], particle swarm optimization [5], neural-network-based methods [6], deep reinforcement learning [7], and the artificial potential field method [8], among others. Each of these approaches presents unique strengths and limitations. For instance, the A* algorithm utilizes a heuristic function to reduce inefficient searches but may still incur substantial computational overheads. ACO, known for its powerful global search capability [9,10], often suffers from slow convergence and high complexity. Dijkstra’s method exhaustively explores all paths, resulting in inefficiency. Neural-network- and DRL-based methods offer superior adaptability in complex environments but require massive datasets—often in the order of millions—to effectively learn optimal behaviors. Meanwhile, RRT generates paths by incrementally extending the nodes toward the target, but the resulting trajectories may lack smoothness and consistency.
The APF algorithm is widely adopted in robot path planning due to its simplicity, computational efficiency, and ease of implementation. However, its effectiveness is compromised by several well-known issues. First, when the target is far away, the attractive force becomes excessively strong, potentially leading agents to overshoot into obstacles. Second, in cluttered environments, agents can easily become trapped in local minima where the net force is zero. These issues make the goal unreachable in certain configurations. To overcome these drawbacks, a number of researchers have proposed improvements to the APF method. Song [11] combined velocity obstacle algorithms with APF to create a hybrid field comprising repulsion and centrifugal components, enabling agents to bypass obstacles by modulating their velocity and direction. Chen [12] redefined the attractive and repulsive force models and analyzed the motion characteristics to mitigate the local minima and goal-inaccessibility issues. Fedele [13] introduced a novel spiral potential field that effectively eliminates zero resultant force zones during obstacle avoidance. Azzabi [14] proposed an alternative repulsive field function that introduces a virtual escape force in the form of rotational dynamics to help agents exit local traps smoothly. Di [15] and Lee [16] adopted virtual targets to provide directional guidance when agents fall into local minima. Xu [17] proposed the use of safety distances to prune unnecessary paths, thus reducing the path length and computation time. Wang [18] added a tangential force between agents and obstacles to resolve oscillatory behaviors. However, such solutions still struggle with semi-enclosed obstacles. To this end, Yu [19] introduced a transverse auxiliary field to break the equilibrium at the local minima, while Hao [20] proposed a collision risk assessment mechanism to further enhance the robustness of APF-based obstacle avoidance. Zhang [21] contributed enhancements including velocity repulsion fields and dynamic sub-goal generation to improve the safety, robustness, and escape capability from semi-enclosed regions. Zhang [22] set up a virtual barrier to seal the semi-enclosed obstacle by making the intelligent body return to the original path after falling into a local minima and escaping the semi-enclosed obstacle through a tangent algorithm.
Simulated annealing (SA), a probabilistic optimization method inspired by the annealing process in metallurgy [23], and its stochastic nature can generate some random paths to escape from the local minima when the intelligences fall into the local minima in the APF algorithm. Zhang [24] applied SA-APF to path planning for soccer robots. Zhao [25] introduced random sub-goals to guide agents away from traps. Luan [26] used virtual targets to escape from U-shaped obstacle configurations. Yuan [27] applied SA-APF in marine environments to enable surface vessel formations to avoid obstacles. However, the existing SA-based improvements often suffer from limitations such as unsmooth paths, failure to escape complex semi-enclosed regions, or inability to find valid exits due to the high stochasticity inherent in SA. In a multi-UAV distributed formation, the unsmooth or even cluttered paths generated by the leader escaping the local minima using the simulated annealing algorithm can cause the follower to follow, generating cluttered movements, so the simulated annealing algorithm must be improved to generate shorter and smoother paths to support the escape from the local minima in multi-UAV formations.
Most existing studies on the APF are limited to single-agent scenarios. For multi-agent formations, common coordination strategies include the leader–follower approach [28], behavior-based methods [29], and virtual structure frameworks [30]. Among them, the leader–follower model is widely adopted due to its task-oriented structure, where a designated leader defines the target trajectory and the followers dynamically adjust their positions based on the leader’s state. Many scholars have applied the leader–follower model to distributed formation control models. Pereira [31] proposed a distributed model predictive control algorithm under the leader–follower formation for spacecraft formation flight scenarios. Wang [32] introduced a distributed saturation control strategy to realize the leader–follower’s multi-quadrotor formation. This method offers high adaptability and can be optimized for a variety of formation and path-following tasks.
To address the aforementioned limitations, this paper proposes a novel algorithm—deflected simulated annealing–adaptive artificial potential field (DSA-AAPF)—that combines an improved simulated annealing mechanism with an enhanced APF framework. The key contributions of this work are as follows:
(1) Under the distributed leader–follower formation control framework, we redefine the potential field formulation by drawing inspiration from momentum-based gradient descent methods. The resultant force applied to each UAV retains a portion of the previous moment’s force, thereby avoiding overshooting and reducing oscillations near obstacles. This results in smoother and safer UAV trajectories.
(2) A novel adaptive attractive gain function is introduced to dynamically regulate the UAVs’ velocities across different regions of the environment. Combined with a fast-converging control law, this mechanism improves the target convergence and prevents collisions near the goal.
(3) To handle semi-enclosed obstacles and local minima, we propose a directional deflection mechanism in the simulated annealing module. By continuously applying force vectors along a consistent rotational direction, UAVs can escape complex environments via arc-like paths.
(4) The effectiveness and practicality of the proposed algorithm are validated through comprehensive simulations in MATLAB (R2022b), demonstrating its advantages in terms of formation maintenance, dynamic reconfiguration, and robust obstacle avoidance.
Selected studies that have improved the APF algorithm in recent years [19,20,21,22] are compared with the main innovations of this paper’s algorithm, DSA-AAPF, as shown in Table 1.
In this paper, Section 2 presents the dynamical modeling of the leader–follower formation adopted in our multi-UAV system. Section 3 introduces the fundamental principles of the traditional artificial potential field (APF) method, followed by detailed explanations of the proposed adaptive artificial potential field (AAPF) and its integration with the deflected simulated annealing (DSA) algorithm. Section 4 conducts simulation experiments and analyses in four scenarios: oscillation test, formation reconfiguration, obstacle avoidance in complex environments, and escape from semi-enclosed obstacles. The results demonstrate the feasibility and effectiveness of the proposed DSA-AAPF method. Finally, Section 5 summarizes the conclusions and discusses potential directions for future work.

2. Leader–Follower Formation Dynamics

2.1. Modeling of the Leader–Follower System

Consider a multi-UAV system comprising n UAVs, where the dynamics of each UAV i are modeled as follows:
X ˙ i ( t ) = u i ( t ) , i = 1 , , n
where X i ( t ) = x i ( t ) y i ( t ) , u i ( t ) = u x i ( t ) u y i ( t ) , represent the position vector and control input (velocity) of UAV i at time t , respectively.
A triangular formation structure is adopted, comprising one leader and four followers, as illustrated in Figure 1.
UAV 1 acts as the leader and is directed toward a predefined fixed target point ( x g 1 , y g 1 ) , thereby determining the trajectory of the entire formation. The remaining UAVs are designated as followers, whose actual positions are denoted by solid blue circles, while the dashed blue circles represent their desired positions within the formation. These desired positions dynamically change with respect to the leader’s location.
The relative displacement vector between follower i and its corresponding virtual target is defined as:
D i = d i x d i y = x 1 ( t ) x g i ( t ) y 1 ( t ) y g i ( t )
where D i is a predefined constant vector representing the intended offset between the leader and follower i within the formation.

2.2. Graph-Theoretic Representation and Communication Topology

The communication among the UAVs is represented using graph theory. The multi-UAV network is modeled as an undirected graph G = ( N , E ) , where N = e 1 , e 2 , , e n denotes the set of nodes (UAVs); E = e i , e j e i , e j N , i j denotes the set of undirected edges, each indicating a bidirectional communication link between a pair of UAVs, and ( e i , e j ) denotes the communication of UAVs i and j ( i , j = 1 , 2 , , n ).
An adjacency matrix A ( G ) = [ a i j ] n × n is associated with graph G , where:
a i j = 1 , ( i , j ) E 0 , ( i , j ) E
Each node’s degree is defined as the number of its direct neighbors. The degree matrix D ( G ) = d i a g ( λ 1 , λ 2 , , λ n ) is a diagonal matrix with entries λ i = j = 1 n a i j , and the Laplacian matrix of the graph is then defined as L = D ( G ) A ( G ) .

3. Improved Artificial Potential Field Method

3.1. Fundamentals and Analysis of the Traditional Artificial Potential Field

The artificial potential field (APF) method was first introduced by Khatib, incorporating the concept of potential fields from physics into path planning. The core idea is to model the UAV as a point mass moving within a virtual force field, where the field comprises an attractive potential generated by the target and a repulsive potential induced by the surrounding obstacles. The resultant force acts as the driving input for the UAV’s motion.
The potential field function in the APF method is defined as the sum of the attractive and repulsive potential fields, as expressed in Equation (4):
U ( X ( t ) ) = U a t t ( X ( t ) ) + U r e p ( X ( t ) )
where X ( t ) = ( x i ( t ) , y i ( t ) ) T denotes the position vector of the mobile robot, U a t t ( X i ( t ) ) is the attractive potential field and U r e p ( X i ( t ) ) is the repulsive potential field, which are shown in Equations (5) and (6):
U a t t ( X ( t ) ) = 1 2 k a t t ρ ( X ( t ) , X g ) 2
U r e p ( X ( t ) ) = 1 2 k r e p 1 ρ ( X ( t ) , X o b s ) 1 ρ 0 2 , ρ ( X ( t ) , X o b s ) < ρ 0 0 , ρ ( X ( t ) , X o b s ) ρ 0
where k a t t > 0 and k r e p > 0 denote the attractive and repulsive gain coefficients, respectively; X g represents the goal position, and X o b s denotes the nearest point on the obstacle surface to the UAV. For circular obstacles, this point corresponds to the intersection of the line connecting the UAV and the obstacle center with the obstacle boundary. The terms ρ ( X ( t ) , X g ) and ρ ( X ( t ) , X o b s ) , respectively, denote the Euclidean distances of the UAV from the target point and the obstacle, and ρ 0 defines the maximum influence radius of the obstacle. Beyond this radius, the repulsive force exerted by the obstacle on the UAV is zero.
The artificial force applied to the UAV is defined as the negative gradient of the total potential field, consisting of both attractive and repulsive components. The resultant force experienced by UAV i is expressed as:
F ( X i ( t ) ) = [ U ( X i ( t ) ) ] = F a t t ( X i ( t ) ) + F r e p ( X i ( t ) )
where the attractive force F a t t ( X i ( t ) ) is:
F a t t ( X ( t ) ) = k a t t ( X ( t ) X g )
and the repulsive F r e p ( X i ( t ) ) is:
F r e p ( X i ( t ) ) = k r e p 1 ρ ( X i ( t ) , X o b s ) 1 ρ 0 1 ρ ( X i ( t ) , X o b s ) 2 ρ ( X i ( t ) , X o b s ) X i ( t ) , ρ ( X i ( t ) , X o b s ) < ρ 0 0 , ρ ( X i ( t ) , X o b s ) ρ 0
When multiple obstacles are present in the environment, the total repulsive force acting on a UAV is the superposition of the repulsive forces exerted by each obstacle. Accordingly, the resultant force acting on UAV i is expressed as:
F ( X i ( t ) ) = F a t t ( X i ( t ) ) + j = 1 m F r e p j ( X i ( t ) )
where m denotes the number of obstacles affecting the UAV.
An illustration of the force components under the APF framework is shown in Figure 2.
Despite its simplicity and computational efficiency, the traditional APF method suffers from several significant drawbacks.
(1) The attractive force in the conventional APF is linearly proportional to the distance between the UAV and the target. As a result, when the UAV is far from the target, it may move too rapidly, potentially leading to excessive acceleration toward obstacles. This sudden proximity to obstacles can induce large repulsive forces, causing oscillations or even collisions. Conversely, when the UAV is close to the target, the attraction becomes too weak, and the UAV may fail to reach the goal.
(2) To better mimic physical realism, recent implementations often constrain the UAVs to moving a fixed step length in the direction of the resultant force. However, such an approach neglects the magnitude of the resultant force, leading to slow convergence and reduced efficiency. Moreover, the final positioning accuracy becomes dependent on the fixed step size, limiting the precision–speed tradeoff.
(3) The traditional APF framework is unable to handle local minima effectively. As illustrated in Figure 3, three typical scenarios may trap the UAV. In cases 1 and 2, the attractive and repulsive forces are nearly equal in magnitude but opposite in direction, resulting in oscillatory behavior or stagnation. In case 3, the UAV is confined within a U-shaped obstacle configuration, where the repulsive field completely blocks the path toward the goal, leaving the UAV unable to escape.
To overcome these limitations, this study proposes an improved APF framework within the context of a distributed leader–follower formation. The potential field function is redefined, and a momentum-inspired smoothing technique is introduced into the force computation to mitigate oscillations and ensure smooth trajectories. An adaptive attractive gain function is also designed to regulate the UAV’s velocity across different phases of its motion. Furthermore, to enable rapid reformation and precise convergence after obstacle avoidance, a fast-converging consensus controller is incorporated into the formation framework. Finally, a modified simulated annealing mechanism is developed to allow the UAVs to escape the local minima, particularly within semi-enclosed environments.

3.2. Adaptive Artificial Potential Field

3.2.1. Redefinition of the Potential Field Function

To improve upon the limitations of the classical APF, the potential field function is redefined in Equations (11) and (12) while retaining the basic structure as the sum of the attractive and repulsive components:
U a t t ( X i ( t ) ) = 1 2 k a t t ρ ( X i ( t ) , X g i ( t ) ) 2 + 1 2 k a t t j = 1 n a i j ( X i ( t ) X j ( t ) ( D i D j ) ) 2
U r e p ( X i ( t ) ) = 1 2 k r e p 1 ρ ( X i ( t ) , X o b s ) 1 ρ 0 2 ρ ( X i ( t ) , X g i ( t ) ) b , ρ ( X i ( t ) , X o b s ) < ρ 0 0 , ρ ( X i ( t ) , X o b s ) ρ 0
where X g i ( t ) = ( x g i ( t ) , y g i ( t ) ) denotes the virtual target point of UAV i . For the leader UAV (UAV 1), the target X g 1 = ( x g 1 , y g 1 ) is fixed and predefined. The vector D i = d i x d i y = x 1 ( t ) x g i ( t ) y 1 ( t ) y g i ( t ) , i 1 represents the constant relative displacement between the leader and the follower in the desired formation. For the leader itself, D 1 = d 1 x d 1 y = 0 0 . The term ρ ( ) denotes the distance function between two points, and b = 0.9 is a small positive constant to ensure the target is always at the minimum of the potential field.
The corresponding attractive and repulsive force functions are defined as:
F a t t ( X i ( t ) ) = k a t t ( X i ( t ) X g i ( t ) ) k a t t j N i a i j ( X i ( t ) X j ( t ) ( D i D j ) )
F r e p ( X i ( t ) ) = F r e p 1 ( X i ( t ) ) + F r e p 2 ( X i ( t ) ) , ρ ( X i ( t ) , X o b s ) < ρ 0 0 , ρ ( X i ( t ) , X o b s ) ρ 0
Specifically, the repulsive terms F r e p 1 ( X i ( t ) ) and F r e p 2 ( X i ( t ) ) are expressed as:
F r e p 1 ( X i ( t ) ) = k r e p 1 ρ ( X i ( t ) , X o b s ) 1 ρ 0 1 ρ ( X i ( t ) , X o b s ) 2 ρ ( X i ( t ) , X o b s ) X i ( t ) ρ ( X i ( t ) , X g i ( t ) ) b
F r e p 2 ( X i ( t ) ) = b 2 k r e p 1 ρ ( X i ( t ) , X o b s ) 1 ρ 0 2 ρ ( X i ( t ) , X g i ( t ) ) X i ( t ) ρ ( X i ( t ) , X g i ( t ) ) b 1
The resultant force in the AAPF retains the same form as the original APF expression shown in Equation (10).

3.2.2. Resultant Force Optimizes Momentum Smoothing

To address the issue of oscillations caused by abrupt repulsion near obstacles, a momentum-inspired smoothing mechanism is incorporated into the resultant force computation. Drawing on the momentum-based gradient descent, the current effective force is defined as a weighted combination of the current and previous timestep forces:
F ( X i ( t ) ) = α F ( X i ( t Δ t ) ) + ( 1 α ) F ( X i ( t ) )
where F ( X i ( t ) ) is the raw resultant force at time t , computed from Equations (10), (13), and (14); F ( X i ( t Δ t ) ) is the effective force from the previous timestep; and α [ 0 , 1 ] is a tunable coefficient controlling the momentum contribution.
Figure 4 illustrates the effect of the force smoothing, as defined in Equation (17). In Figure 4a, which depicts the case without smoothing, the blue dashed circle, solid blue circle, and red dashed circle represent the positions of the UAV at three successive timesteps. At the intermediate timestep, the UAV approaches the obstacle too closely due to the strong attractive force. This results in a large repulsive reaction force from the obstacle, which sharply redirects the UAV and causes a sudden deviation from its intended path—leading to the position indicated by the red dashed circle.
In contrast, Figure 4b demonstrates the scenario with force smoothing applied. Although the UAV reaches a similar position near the obstacle, the momentum-based adjustment prevents it from being forcefully repelled. As a result, the UAV maintains a smooth trajectory and navigates around the obstacle without abrupt direction changes.

3.2.3. Adaptive Attractive Gain Design

To address the limitations of the traditional artificial potential field—namely, that UAVs tend to move too quickly when far from the target due to excessive attractive forces (leading to potential collisions) and too slowly when approaching the target due to insufficient attraction (resulting in failure to reach the goal)—an adaptive attractive gain function k a t t ( ) is proposed. The gain is defined in a piecewise manner to regulate the UAV’s motion across different phases of the trajectory, as shown in Equation (18):
k a t t i = h i k a t t 0 , F r e q ( X i ( t ) ) = 0   a n d   ρ ( X t ( t ) , X g i ( t ) ) < ρ g τ i k a t t 0 ρ ( X t ( t ) , X g i ( t ) ) + δ , F r e q ( X t ( t ) ) = 0   a n d   ρ ( X t ( t ) , X g i ( t ) ) ρ g k a t t 0 , F r e q ( X i ( t ) ) 0
where k a t t 0 > 0 is a constant baseline gain; δ = 1.0 × 10 8 is a small positive constant introduced to prevent division by zero and to stabilize the numerical computation; and h i 1 , τ i 1 and ρ g > 0 are tunable constants that can be selected according to the performance requirements.
The three operational cases are illustrated in Figure 5.
In Figure 5a, when the UAV is not influenced by any obstacle and is within the specified proximity threshold ρ g from the goal, the attractive gain is set to a moderate value h i k a t t 0 . This setting ensures that the UAV does not overshoot the target due to high speed while maintaining sufficient pull to prevent stagnation near the goal. In Figure 5b, if the UAV is outside the goal proximity but still free from repulsive influence, the attractive gain is scaled inversely with respect to the distance to the goal using the adaptive attractive gain term τ i k a t t 0 ρ ( X t ( t ) , X g i ( t ) ) + δ . A larger value of τ amplifies the gain in this mid-range zone, accelerating the UAV’s movement toward the goal after obstacle avoidance, thereby shortening the convergence time. In Figure 5c, when the UAV is within the repulsive influence of an obstacle, the attractive gain is held at k a t t 0 , promoting cautious and stable movement around the obstacle.

3.2.4. Control Law

The controller employed in this study is based on a consensus control framework proposed by Huang [33], which supports different convergence performance requirements. The framework includes multiple control functions with fast convergence guarantees and proven stability. In this work, a set of nine control functions is selected from the original framework and applied to the AAPF-based formation structure. The simulation results in Section 4 demonstrate that this controller, when integrated with the proposed formation control algorithm, enables rapid reconfiguration and accurate convergence after obstacle avoidance.
The control input for UAV i is defined as follows:
u i ( t ) = γ i s ( F ( X i ( t ) ) ) ϕ ( F ( X i ( t ) ) ) , i = 1 , 2 , , n
where γ i is a gain coefficient; s ( ) is a direction function determining the control orientation and stability; and ϕ ( ) is a shaping function designed to meet performance criteria such as the convergence speed and robustness.
The vector F ( X i ( t ) ) = ( F x ( X i ( t ) ) , F y ( X i ( t ) ) ) T denotes the smoothed resultant force at time t .

3.3. Escape from Semi-Enclosed Obstacles Using DSA-AAPF

This subsection introduces an enhanced approach for escaping local minima by combining the deflected simulated annealing (DSA) algorithm with the adaptive artificial potential field (AAPF) framework. The discussion focuses primarily on scenarios involving semi-enclosed obstacles.
Simulated annealing (SA) is a Monte-Carlo-based probabilistic optimization algorithm used for approximating global optima. The algorithm consists of two nested loops: an outer loop in which the system temperature gradually decreases and an inner loop that probabilistically accepts new candidate solutions based on the metropolis criterion. The probability that a particle reaches equilibrium at a given temperature T is exp ( Δ E / ( k T ) ) , where E is the internal energy at temperature T , Δ E represents the change in energy between states, and k is the Boltzmann constant. The metropolis acceptance rule is formally defined as:
p = exp E ( X n ) E ( X 0 ) T , E ( X n ) > E ( X 0 ) 1 , E ( X n ) E ( X 0 )
where X n is a candidate position at the next iteration; X 0 is the current position of the UAV; E ( X n ) and E ( X 0 ) represent the internal energy (i.e., the potential field value) at these respective positions; and T denotes the current system temperature.
The temperature is updated iteratively according to a linear decay model as follows:
T ( t ) = β T ( t Δ t )
where β ( 0 , 1 ) is a decay constant slightly less than one.
When applied to the AAPF-based path-planning framework, the variables in Equation (20) correspond to the following:
(1) X 0 = X i ( t ) : the UAV’s current position;
(2) X n = X i ( t + Δ t ) : a randomly sampled candidate position nearby;
(3) E ( X 0 ) = U ( X i ( t ) ) : the potential energy at the current position;
(4) E ( X n ) = U ( X i ( t + Δ t ) ) : the potential energy at the candidate position.
The key improvement proposed in this study lies in the method used to generate the candidate points X i ( t + Δ t ) , particularly in the context of escaping from semi-enclosed obstacles.
As illustrated in Figure 6, the red solid line represents the trajectory previously traversed by the UAV, while the blue filled circle indicates the UAV’s current position. When the UAV becomes trapped in a local minimum within a semi-enclosed obstacle, a constant-magnitude force F e is applied. This force is rotated by a random angle within a predefined range in a consistent direction over multiple iterations, generating an arc-like trajectory that enables the UAV to escape the enclosure.
To realize this escape mechanism, three key issues must be addressed.
(1) Directional Ambiguity
Within a semi-enclosed obstacle, there are typically two feasible escape directions. Choosing the correct direction significantly reduces the travel distance to the goal. As shown in Figure 7, following the direction indicated by the green path yields a faster and more direct route to the goal compared to the orange path. Therefore, determining the optimal escape direction is critical.
(2) Parameter Design for Force and Rotation
The magnitude of the escape force F e and the rotational angle θ must be carefully selected. If the force is too weak or the rotation too large, the UAV may fail to exit the enclosure or collide with the obstacle boundary.
(3) Escape Condition Determination
A reliable method must be defined to determine when the UAV has successfully exited the semi-enclosed obstacle.
To address these challenges, the following strategy is proposed.
It is first noted that in real scenarios, it is rare for the attractive and repulsive forces to exactly cancel each other out in magnitude and direction. Instead, local minima usually occur when these forces are nearly equal and opposite, resulting in a net force that is too small to drive motion. When such a situation arises within a semi-enclosed obstacle, it is observed that eliminating the attraction component often leaves a repulsive force pointing outward—i.e., in a direction favorable for escape.
Additionally, since the goal is usually located outside the obstacle, the attractive force tends to bias the UAV toward that side. As a result, when the UAV enters the enclosure and becomes trapped, the repulsive force vector typically lies on the same side as the extension of the attractive force’s opposite direction. This relationship is illustrated in Figure 8, where the optimal escape direction lies on the opposite side of the attractive force vector.
In the proposed algorithm, the escape direction is determined by identifying which side of the extended line opposite the attractive force the repulsive force lies on, as illustrated in Figure 9. In this figure, the blue arrow represents the vector difference F a t t ( X i ( t ) ) F r e p ( X i ( t ) ) . The angle θ a denotes the angle between the attractive force direction and the positive x-axis, while θ b represents the angle between the vector F a t t ( X i ( t ) ) F r e p ( X i ( t ) ) and the positive x-axis.
If θ a > θ b , the UAV should rotate in the clockwise direction.
If θ a < θ b , the UAV should rotate counterclockwise.
Next, let t s denote the time at which the UAV enters a local minimum. The repulsive force experienced at this moment, F r e p ( X i ( t s ) ) , is defined as the initial value of the escape force F e , denoted as F e ( X i ( t s ) ) . The angle between F r e p ( X i ( t s ) ) and F a t t ( X i ( t s ) ) is denoted as θ c , where 0 < θ c < π . The value of angle θ is picked randomly in section ( 0 , θ c π c ] , where c > π θ c is a predefined constant.
The rotation matrix is defined as:
R ( θ ) = cos θ sin θ sin θ cos θ , θ a > θ b cos θ sin θ sin θ cos θ , θ a < θ b
The escape force F e ( X i ( t s + Δ t ) ) at time t s + Δ t is then updated as:
F e ( X i ( t s + Δ t ) ) = R ( θ ) F e ( X i ( t s ) )
As a result, this force F e ( X i ( t s ) ) is applied iteratively, rotating by θ at each step, maintained at a constant magnitude, until the UAV successfully escapes the semi-enclosed obstacle
Let t e denote the final iteration time of the simulated annealing loop. As illustrated in Figure 10, r e ( t e ) represents the displacement vector from the local minimum position to the UAV’s position at time t e . The angle θ d denotes the angle between r e ( t e ) and the initial escape force F r e p ( X i ( t s ) ) , which is equivalent to F e ( X i ( t s ) ) . In the algorithm, a threshold angle θ 0 is defined as a constant in [ π 3 , 2 π 3 ] . If θ d θ 0 , the UAV is considered to have successfully escaped from the semi-enclosed obstacle.
The complete procedure of the improved simulated annealing algorithm is summarized in Figure 11. The flowchart of the whole DSA-AAPF algorithm is shown in Figure 12.

4. Algorithm Simulations and Performance Evaluation

To validate the effectiveness of the proposed algorithm, a series of simulation experiments are conducted focusing on four core capabilities: (1) oscillatory testing of the resultant force optimization effects; (2) reformation of the multi-UAV formation after obstacle evasion; (3) obstacle avoidance when the environment is complicated; and (4) escaping from semi-enclosed obstacle environments. The controller functions employed are selected from nine function pairs proposed by Huang [33], as listed in Table 2. The performance metrics are evaluated based on the convergence speed and accuracy of each UAV along the x and y axes, ultimately identifying the most suitable controller configuration for the subsequent experiments.
The subsequent simulations are designed to assess the effectiveness of the formation navigation in environments with multiple complex obstacles, focusing on the avoidance performance and convergence efficiency. Finally, the capability of the formation to escape from semi-enclosed traps is tested to verify the robustness of the deflected simulated annealing–adaptive artificial potential field (DSA-AAPF) algorithm.
A formation composed of five UAVs is used for the evaluation, in which UAV 1 serves as the leader and the remaining four act as followers. The communication topology is modeled as an undirected graph, as shown in Figure 13, where the adjacency matrix satisfies a 12 = a 14 = a 15 = a 23 = a 34 = a 45 = 1 , with all the other elements set to zero. The controller gain parameters are configured as follows: γ 1 = 1 , γ 2 = 3 , γ 3 = 5 , γ 4 = 3 , γ 5 = 3 , and the formation spacing vectors are defined as: D 2 = 1 1 , D 3 = 1 1 , D 4 = 2 2 , D 5 = 2 2 .

4.1. Oscillation Test

In order to obtain the scaling parameter α in the resultant force optimization in Equation (17), we set the obstacles and target points very close to each other and three points co-linear with the starting point of the UAV to create an environment where the UAV would oscillate back and forth for the oscillation test. The magnitude of the scaling parameter α is adjusted to observe the degree of suppression of the oscillations by the Equation (17) resultant force optimizes momentum smoothing in 0.015 s . The distance of the UAV from the starting point is defined as ρ G .
Only one UAV is used in the test, with the starting point X 1 ( 0 ) = ( 0 , 0 ) T , the target point X g 1 = ( 5 , 5 ) T , and a circular obstacle centered at ( 10 , 10 ) T . The attractive gain is set as k a t t 0 = 18 , and the repulsive gain as k r e p = 4 .
It is found experimentally that the best suppression of the oscillations is achieved when the scaling parameter is α = 0.6 . The simulated path diagram with the variation of ρ G when α = 0 is shown in Figure 14.
From Figure 14, the UAV is displaced by a large distance due to the excessive gravitational force and then is too close to the obstacle to generate a large resistance and reverse the displacement by a large distance, with the variance of ρ G reaching 741.5648, generating a very pronounced oscillation and even causing the path point to pass through the obstacle.
The simulated path diagram with the variation of ρ G when the resultant force optimization is used and α = 0.6 is shown in Figure 15.
From Figure 15, the oscillation phenomenon of the UAV in Figure 14 is very significantly suppressed, with a variance of only 0.1353. Under the same conditions, after the UAV is optimized with a resultant force of α = 0.6 , no very large oscillation occurs and the equilibrium is restored within 0.01 s .
To summarize, for our subsequent experiments, we selected α = 0.6 .

4.2. Formation Reconfiguration Test

To assess the system’s ability to maintain the formation structure during obstacle avoidance and reformation, the deviation between the UAV’s position and its target is quantified as e i ( t ) = e x i ( t ) e y i ( t ) = X i ( t ) X g i ( t ) . A circular obstacle is placed on the UAV’s trajectory to observe the response behavior. The attractive gain parameters are configured as h 1 = 13 , h 2 = h 3 = h 4 = h 5 = 1.7 , and the adaptive gain factors τ 1 = 27 , τ 2 = τ 3 = τ 4 = τ 5 = 4 . The obstacle’s influence radius is set as ρ g = 0.2 . The initial positions are specified as X 1 ( 0 ) = ( 1 , 11 ) T , X 2 ( 0 ) = ( 1 , 16 ) T , X 3 ( 0 ) = ( 1 , 4 ) T , X 4 ( 0 ) = ( 1 , 21 ) T , and X 5 ( 0 ) = ( 1 , 1 ) T . The leader’s destination is defined as X g 1 = ( 50 , 11 ) T , with a circular obstacle centered at ( 25 , 11 ) T . It is defined that when e x i ( t ) < 0.1   and   e y i ( t ) < 0.1 ,   i = 2 , 3 , 4 , 5 , to maintain the formation state, the error between the positions of all the followers and the formation target in the x and y directions must not exceed 0.1. Define time t r e c as the time it takes for a UAV formation to start avoiding obstacles from maintaining the formation state, leaving the formation state, bypassing the obstacles, and then resuming maintaining the formation state.
Given the structural similarity among the three configurations in each group (due to the identical potential functions), only one simulation formation trajectory per group is visualized.
For Group 1, the attractive gain is set as k a t t 0 = 13 , and the repulsive gain as k r e p = 5 . The corresponding trajectory of the formation reconfiguration and obstacle avoidance is depicted in Figure 16, while the convergence dynamics in the x and y directions are illustrated in Figure 17.
From the results shown in Figure 16, the UAV formation maintains a compact structure during the initial phase of motion. Upon encountering the obstacle, the formation disperses to perform obstacle avoidance and subsequently reassembles into the predefined configuration before converging to the target destination.
As indicated in Figure 17, t r e c under the three controllers is 0.124 s , 0.113 s , and 0.132 s , respectively, and the final distance to the target point converges to a very small value. The total completion times for the three configurations are approximately 0.283 s , 0.268 s , and 0.2905 s , respectively.
In the simulations for Group 2, the parameters are adjusted to k a t t 0 = 38 and k r e p = 10 . The obstacle avoidance and reformation trajectory is presented in Figure 18, while the convergence dynamics in the x and y directions are illustrated in Figure 19.
The simulation reveals a stable reformation process similar to that of Group 1; however, the higher attractive gain caused a marginal increase in the oscillatory motion during avoidance. Despite this, the UAVs successfully completed the formation restoration with comparable convergence accuracy. t r e c under the three controllers is 0.324 s , 0.286 s , and 0.337 s . The time required to complete the task for the three cases is approximately 0.885 s , 0.864 s , and 0.887 s , respectively.
For Group 3, the gains are configured as k a t t 0 = 3 and k r e p = 3 . The obstacle avoidance behavior is illustrated in Figure 20, while the convergence dynamics in the x and y directions are illustrated in Figure 21.
From Figure 21, t r e c under the three controllers is 0.064 s , 0.052 s , and 0.075 s . Subsequently, the positional deviations from the target point converge to negligible values. The total completion times for the three scenarios are 0.1355 s , 0.125 s , and 0.1935 s , respectively.
As summarized in Table 3, while the configurations in Group 3 exhibit slightly inferior accuracy in the y direction compared to Groups 1 and 2, it demonstrates superior convergence accuracy in the x direction. Moreover, Group 3 consistently achieves faster reformation times and shorter total completion durations. Notably, the second configuration in Group 3 achieves the shortest overall completion time (0.125 s ) while maintaining a high level of accuracy. When compared with conventional methods, this approach demonstrates significant improvements in both speed and precision. Consequently, this configuration—defined by s ( z ) = 5 ( z + 0.1 z 0.1 ) and ϕ ( z ) = 2 z 0.5 + 2 z 1.5 —is selected for the subsequent simulations.
In order to evaluate the superiority of DSA-AAPF more intuitively, we next test the traditional APF algorithms in the same experimental environment as in the previous section for comparison. We categorize the traditional APF algorithms into the following two types depending on the UAV movement method.
(1) Movement with the resultant force as the control input (APF-F)
Instead of using the control rate, adaptive gain and control rate of the DSA-AAPF algorithm, only the resultant force is computed as a control input to move.
(2) Movement with a fixed step size in the direction of the resultant force (APF-S)
The difference from APF-F is that it does not move through the control input. Instead, it calculates the direction of the resultant force and then moves a fixed step in this direction, with a fixed step size of 0.1.
The gain of the control function used in the DSA-AAPF algorithm selected in the previous test is k a t t 0 = 3 and k r e p = 3 . Since the gravitational force acting on APF-F is too small at this gain and it is almost impossible to move in the second half, we increase the gravitational gain by four times and use k a t t = 12 and k r e p = 3 . The simulated formation path diagram of APF-F and APF-S is shown in Figure 22. The convergence dynamics in the x and y directions are illustrated in Figure 23.
From Figure 22, for the APF-S algorithm, when the UAV moves near the obstacles, an oscillation phenomenon occurs, resulting in an unbalanced path. This is because the resistance near the obstacles is relatively large and varies greatly with the position. Moving in a fixed step size causes the resultant force direction to oscillate back and forth at a large angle, thereby causing the oscillation of the UAV. For the APF-S algorithm, the UAV also experiences an oscillation phenomenon when approaching the target point. This is because when approaching the target point, the gravitational force exerted by the navigator on the target point is too small, while in the distributed control, part of the gravitational force exerted by the follower on the navigator causes the direction of the resultant force acting on the navigator to not always point toward the target point, resulting in an oscillation change. These oscillation phenomena prove that the APF-S algorithm is not applicable to the formation control of multiple UAVs.
From Figure 23, APF-F is unable to enter the formation holding state before encountering obstacles due to its too slow convergence speed. Moreover, when approaching the target point, the convergence speed drops rapidly because the gravitational force becomes smaller and smaller. Under the APF-S algorithm, t r e c = 0.153   s . The total time taken by the two methods is 1.0865 s and 0.2745 s , respectively, and eventually, they fail to converge to smaller values in the x direction, which are −0.79707 and −0.3919, respectively.
From Table 4, DSA-AAPF far exceeds the traditional APF-F and APF-S algorithms in both the convergence speed and accuracy, and it can be well applied in multi-UAV formations.

4.3. Obstacle Avoidance in Complex Environments

To evaluate the performance of the proposed algorithm in environments populated with multiple obstacles, a set of complex scenarios is designed. The attractive gain k a t t i , the initial positions of the five UAVs, the target point for the leader, the obstacle radius, and the influence radius are all kept consistent with the previous experiments. The specific configuration is set as k a t t 0 = 3 and k r e p = 3 .
The formation trajectory in this complex obstacle environment is illustrated in Figure 24, where each dot represents a discrete position of the UAV at a given timestep. The density of these path points serves as an indicator of the UAV’s velocity—denser points signify slower movement. The adaptive attractive gain function k a t t i defined in Equation (18) effectively modulates the UAV’s velocity throughout the trajectory. The UAVs accelerates when outside obstacle influence zones, decelerates upon entering obstacle-affected regions, and then accelerates again after bypassing the obstacles. Finally, as the UAVs approach the convergence radius ρ g around the target point, they decelerate to ensure precise arrival.
The evolution of errors in both the x and y directions is presented in Figure 25.
As shown in Figure 25, the formation completes the entire avoidance and convergence process in just 0.131 s . The final deviation from the target is 0.00251 in the x direction and −0.00768 in the y direction, respectively. These results demonstrate that the proposed algorithm enables the multi-UAV formation to navigate efficiently and accurately, even under complex multi-obstacle conditions.
To demonstrate the improvement of the fast convergence control rate, adaptive gravitational gain and resultant force optimizing the momentum smoothing proposed in this paper on the traditional APF-F, under the conditions of the obstacle avoidance experiment in the complex environment in this subsection, we conducted the ablation experiment in Appendix A.

4.4. Test of Escaping Semi-Enclosed Obstacles

This subsection evaluates the formation’s ability to escape from semi-enclosed obstacle regions—a common cause of local minima in traditional potential field methods. The attractive gain parameters are set as follows: h 1 = 40 , h 2 = h 3 = h 4 = h 5 = 4 , τ 2 = τ 3 = τ 4 = τ 5 = 4 , ρ g = 0.2 , k a t t 0 = 3 and k r e p = 3 .
The initial positions of the five UAVs are defined as X 1 ( 0 ) = ( 1 , 2 ) T , X 2 ( 0 ) = ( 0 , 7 ) T , X 3 ( 0 ) = ( 0 , 5 ) T X 4 ( 0 ) = ( 0 , 7 ) T , and X 5 ( 0 ) = ( 0 , 5 ) T , with the leader’s target point set as X g 1 = ( 13 , 12 ) T . The circular obstacle is defined with a radius of 0.5 and an influence range ρ 0 = 3 .
The simulated annealing parameters are defined as follows: initial temperature T 0 = 10 , attenuation coefficient β = 0.99 , rotation constant c = 1.28 and escape angle threshold θ 0 = 4 9 π .
In the first test, the obstacle is modeled as a left-open semi-enclosed structure. The escape trajectory of the UAV formation is illustrated in Figure 26.
As shown in Figure 26, the green trajectory denotes the path of the leader (UAV 1) as it successfully escapes the semi-enclosed obstacle using the improved deflected simulated annealing mechanism. The escape path is short and efficient, with the total process completed in 0.355 s .
The left-open semi-enclosed obstacle escape test is conducted using the traditional algorithms APF-F and APF-S, and SA-APF-F and SA-APF-S, with the addition of the traditional SA algorithm on their basis. The simulated path map is shown in Figure 27.
From Figure 27, APF-F and APF-S are completely incapable of escaping from the local minima. SA-APF-F and SA-APF-S are also almost unable to escape when facing local minima situations such as semi-enclosed obstacles. They randomly collide within the obstacles along very chaotic paths and disrupt the entire formation. It is indicated that none of these methods are applicable to the escape of multiple UAV formations from semi-enclosed obstacles.
To test the stability of the algorithm, we conducted a sensitivity analysis with a 10% change in the main control parameters, including h i and τ i in Equation (18) and rotation constant c , to observe the change in the escape success rate. The results are shown in Table 5 as follows.
From Table 5, making small-scale changes to the main parameters has almost no impact on the success rate.
In the second test, the obstacle is configured as a bottom-open semi-enclosed structure. The initial positions of the UAVs remain unchanged. The final escape angle threshold is maintained at θ 0 = 2 5 π and all the other parameters are identical to those used in the previous test. The initial positions of the five UAVs are defined as X 1 ( 0 ) = ( 1 , 1 ) T , X 2 ( 0 ) = ( 1 , 3 ) T , X 3 ( 0 ) = ( 1 , 2 ) T , X 4 ( 0 ) = ( 1 , 2 ) T , and X 5 ( 0 ) = ( 1 , 0 ) T . A comparative experiment is conducted between DSA-AAPF and SA-APF-F and SA-APF-S.
The escape trajectory for this configuration is depicted in Figure 28.
From Figure 28, obviously, in the DSA-AAPF algorithm, the navigator successfully avoids the semi-closed obstacles that are open at the bottom and completes this process with a short and efficient path. The total execution time is 0.466 s . The SA-APF-F and SA-APF-S algorithms still can hardly escape from the semi-enclosed obstacles with open bottoms, and the paths they attempt to escape via are very chaotic.
In the third experiment, the obstacle is expanded to leave only a small gap to verify the escape ability of DSA-AAPF in more complex situations, and comparative experiments are conducted simultaneously with SA-APF-F and SA-APF-S. The rotation constant c = 1.165 . The simulation path diagrams in the three cases are shown in Figure 29.
From Figure 29, the DSA-AAPF algorithm still allows the navigator to escape nearly fully enclosed obstacles via a shorter path, and the other two algorithms still cannot.
After a large number of experiments, we can draw the conclusions in Table 6. DSA-AAPF has an extremely high success rate when encountering the above three obstacles, while APF-F and APF-S have no ability to escape the local minima. SA-APF-F and SA-APF-S have an extremely low probability of escape only when encountering local minima caused by relatively simple obstacles. They are ineffective when encountering complex obstacles, and the paths for attempting to escape the obstacles are very chaotic, making them not suitable for multi-UAV formations. To sum up, it is sufficient to prove that DSA-AAPF has higher superiority and robustness compared with several other traditional algorithms.

5. Conclusions

This paper proposes an enhanced deflected simulated annealing–adaptive artificial potential field (DSA-AAPF) algorithm to address the limitations inherent in traditional artificial potential field (APF) methods. The improved framework redefines the potential field functions and integrates the APF with a leader–follower distributed control strategy for multi-UAV formation tasks. To mitigate the oscillations caused by excessive velocity when the UAVs are far from the target and approach obstacles abruptly, a modified force computation model is introduced. This change retains a fraction of the previous timestep’s resultant force, thereby ensuring smoother UAV trajectories. To address the challenge of an inadequate attractive force near the target—leading to failure in terms of convergence—a novel adaptive attractive gain function is designed. This allows the UAVs to dynamically adjust their movement speed based on the proximity to obstacles and the goal, and it is supported by a controller with fast convergence characteristics, ensuring that the formation reaches the target both accurately and efficiently. Furthermore, to overcome the local minima problem typically caused by semi-enclosed obstacles, the simulated annealing algorithm is refined. The proposed method enables UAVs to escape these traps by applying a continuous deflection force that guides the UAV along an arc-like path. Comprehensive simulation experiments—including an oscillation test, formation reconfiguration, obstacle avoidance in cluttered environments, and escape from semi-enclosed obstacles—demonstrated the efficacy and robustness of the DSA-AAPF algorithm.
Three promising directions are identified for future research.
(1) Extension to 3D dynamic environments
The current study focuses solely on two-dimensional environments with static circular obstacles. A natural progression would involve extending the algorithm to operate in three-dimensional spaces, accounting for dynamic and irregularly shaped obstacles to enhance the real-world applicability. This extension requires integrating 3D kinematic models, such as Dubins paths or spline-based trajectories, to handle the UAV pitch and yaw dynamics, while incorporating velocity obstacles or reinforcement learning for dynamic collision avoidance. Additionally, signed distance fields (SDFs) or voxel grids could efficiently represent complex geometries, although the computational overhead remains a key challenge for real-time processing.
(2) Path optimization in semi-enclosed regions
While the improved deflected simulated annealing method effectively enables UAVs to escape from semi-enclosed obstacles, further investigation is warranted to identify the optimal escape trajectories that minimize the energy consumption and execution time. A hybrid optimization approach, combining gradient-based methods like sequential quadratic programming with metaheuristics, could refine the escape paths for efficiency. Additionally, formulating a multi-objective optimization problem that balances the energy expenditure (e.g., drag-induced losses) against the time delays would enhance the practicality, while topological tools such as homology analysis could help identify structurally optimal escape routes in cluttered environments.
(3) Real UAV swarm limitations
In this paper, Equation (1) simplifies the dynamic model of the UAV. It is necessary to further extend the algorithm to the three-dimensional space to use the six-degree-of-freedom dynamic model of the UAV, accounting for realistic aerodynamics and control surfaces. Furthermore, in real UAV swarms, the communication delays, packet losses, and limited energy budgets critically impact the formation control and collision avoidance. Future work should embed robust communication protocols, such as delay-tolerant networking (DTN) or consensus algorithms under intermittent connectivity, while integrating energy-aware path planning to extend the operational endurance under battery constraints. These considerations are essential for deploying the algorithm in real-world scenarios where imperfect communication and finite energy resources dominate the system performance.

Author Contributions

Conceptualization, B.M.; Methodology, B.M.; Software, B.M.; Validation, B.M.; Formal analysis, B.M.; Investigation, B.M.; Resources, L.F.; Data curation, B.M.; Writing—original draft, B.M.; Writing—review & editing, Y.J. and L.F.; Visualization, B.M.; Supervision, L.F.; Project administration, B.M.; Funding acquisition, B.M. and L.F. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Sichuan Provincial Science and Technology Program Project—Research and Development and Demonstration Application of Key Technologies for Sensing Low Altitude Risk Sources and Risk Prevention and Control at Airports (2023YFG0377) and Dongfang Electric (Chengdu) Innovation Research Co.—Leaf Drone Inspection and Image Recognition Development Service Project (H04W241696).

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

In the environment in Section 4.3, we conduct four sets of tests to successively add the improvements in this paper on the basis of the traditional APF-F:
(1)
The traditional APF-F algorithm
(2)
Add the fast convergence control rate in this paper on the basis of APF-F (APF-F-R)
(3)
Add the adaptive attractive gain in this paper on the basis of APF-F-R (APF-F-RA)
(4)
Add the resultant force momentum smoothing in this paper on the basis of APF-F-RA, that is, the algorithm in this paper that does not trigger DSA (DSA-AAPF)
The test of the traditional APF-F algorithm is conducted first, as shown in Figure A1. The gain of the control function used in the other algorithms except for APF-F is k a t t 0 = 3 and k r e p = 3 . Since the gravitational force acting on APF-F is too small at this gain and it is almost impossible to move in the second half, we increase the gravitational gain by four times and use k a t t = 12 and k r e p = 3 .The density of these path points serves as an indicator of the UAV’s velocity—denser points signify slower movement.
Figure A1. APF-F formation trajectory in a complex obstacle environment.
Figure A1. APF-F formation trajectory in a complex obstacle environment.
Drones 09 00390 g0a1
The time t e n d spent on the entire process of the APF-F algorithm is 1.091 s , with an error of ( e x i ( t e n d ) , e y i ( t e n d ) ) T = ( 0.7922 , 0.1032 ) T .
The test of the APF-F-R algorithm is shown in Figure A2.
Figure A2. APF-F-R formation trajectory in a complex obstacle environment.
Figure A2. APF-F-R formation trajectory in a complex obstacle environment.
Drones 09 00390 g0a2
The time t e n d spent on the entire process of the APF-F-R algorithm is 0.7495 s , with an error of ( e x i ( t e n d ) , e y i ( t e n d ) ) T = ( 0.7901 , 0.1181 ) T .
The test of the APF-F-RA algorithm is shown in Figure A3.
Figure A3. APF-F-RA formation trajectory in a complex obstacle environment.
Figure A3. APF-F-RA formation trajectory in a complex obstacle environment.
Drones 09 00390 g0a3
The time t e n d spent on the entire process of the APF-F-RA algorithm is 0.128 s , with an error of ( e x i ( t e n d ) , e y i ( t e n d ) ) T = ( 0.00249 , 0.00772 ) T .
The test of the DSA-AAPF algorithm is shown in Figure A4.
Figure A4. DSA-AAPF formation trajectory in a complex obstacle environment.
Figure A4. DSA-AAPF formation trajectory in a complex obstacle environment.
Drones 09 00390 g0a4
The time t e n d spent on the entire process of the DSA-AAPF algorithm is 0.131 s , with an error of ( e x i ( t e n d ) , e y i ( t e n d ) ) T = ( 0.00251 , 0.00768 ) T . It can be seen from the comparison with Figure A4 that the path has become more smooth.
To sum up, the comparison in Table A1 can be obtained.
Table A1. The comparison between APF-F, APF-F-R, APF-F-RA and DSA-AAPF.
Table A1. The comparison between APF-F, APF-F-R, APF-F-RA and DSA-AAPF.
Algorithm t e n d ( e x i ( t e n d ) , e y i ( t e n d ) ) T
APF-F1.091 s ( 0.7922 , 0.1032 ) T
APF-F-R0.7495 s ( 0.7901 , 0.1181 ) T
APF-F-RA0.128 s ( 0.00249 , 0.00772 ) T
DSA-AAPF0.131 s ( 0.00251 , 0.00768 ) T

References

  1. Hart, P.E.; Nilsson, N.J.; Raphael, B. A formal basis for the heuristic determination of minimum cost paths. IEEE Trans. Syst. Sci. Cybern. 1968, 4, 100–107. [Google Scholar] [CrossRef]
  2. Zhang, H.; Cheng, Z. The method based on dijkstra of three-dimensional path planning. In Proceedings of the 2020 Chinese Automation Congress (CAC), Shanghai, China, 6–8 November 2020; pp. 1698–1701. [Google Scholar] [CrossRef]
  3. Kabutan, R.; Nishida, T. Motion planning by T-RRT with potential function for vertical articulated robots. Electr. Eng. Jpn. 2018, 204, 34–43. [Google Scholar] [CrossRef]
  4. Dorigo, M.; Di Caro, G.; Gambardella, L.M. Ant algorithms for discrete optimization. Artif. Life 1999, 5, 137–172. [Google Scholar] [CrossRef] [PubMed]
  5. Nayeem, G.M.; Fan, M.; Akhter, Y. A time-varying adaptive inertia weight based modified PSO algorithm for UAV path planning. In Proceedings of the 2021 2nd International Conference on Robotics, Electrical and Signal Processing Techniques (ICREST), Dhaka, Bangladesh, 5–7 January 2021; pp. 573–576. [Google Scholar] [CrossRef]
  6. Li, W.; Sun, J.; Chen, W. Real-time obstacle avoidance algorithm for robots based on BP neural network. Chin. J. Sci. Instrum. 2019, 40, 204–211. [Google Scholar] [CrossRef]
  7. Gao, W.; Han, M.; Wang, Z.; Deng, L.; Wang, H.; Ren, J. Research on Method of Collision Avoidance Planning for UUV Based on Deep Reinforcement Learning. J. Mar. Sci. Eng. 2023, 11, 2245. [Google Scholar] [CrossRef]
  8. Khatib, O. Real-time obstacle avoidance for manipulators and mobile robots. In Proceedings of the 1985 IEEE International Conference on Robotics and Automation, St. Louis, MO, USA, 25–28 March 1985; pp. 500–505. [Google Scholar] [CrossRef]
  9. Liu, G.; Wang, X.; Liu, B.; Wei, C.; Li, J. Path planning for multi-rotors UAVs formation based on ant colony algorithm. In Proceedings of the 2019 International Conference on Intelligent Computing, Automation and Systems (ICICAS), Chongqing, China, 6–8 December 2019; pp. 520–525. [Google Scholar] [CrossRef]
  10. Wu, T.; Xu, J.; Liu, J. Cross-country path planning based on improved ant colony algorithm. Jisuanji Yingyong/J. Comput. Appl. 2013, 33, 1157–1160. [Google Scholar] [CrossRef]
  11. Song, A.L.; Su, B.Y.; Dong, C.Z.; Shen, D.W.; Xiang, E.Z.; Mao, F.P. A two-level dynamic obstacle avoidance algorithm for unmanned surface vehicles. Ocean Eng. 2018, 170, 351–360. [Google Scholar] [CrossRef]
  12. Chen, L.; Liu, C.; Shi, H.; Gao, B. New robot planning algorithm based on improved artificial potential field. In Proceedings of the 2013 Third International Conference on Instrumentation, Measurement, Computer, Communication and Control, Shenyang, China, 21–23 September 2013; pp. 228–232. [Google Scholar] [CrossRef]
  13. Fedele, G.; D’alfonso, L.; Chiaravalloti, F.; D’aquila, G. Obstacles avoidance based on switching potential functions. J. Intell. Robot. Syst. 2018, 90, 387–405. [Google Scholar] [CrossRef]
  14. Azzabi, A.; Nouri, K. An advanced potential field method proposed for mobile robot path planning. Trans. Inst. Meas. Control 2019, 41, 3132–3144. [Google Scholar] [CrossRef]
  15. Di, W.; Caihong, L.; Na, G.; Yong, S.; Tengteng, G.; Guoming, L. Local path planning of mobile robot based on artificial potential field. In Proceedings of the 2020 39th Chinese Control Conference (CCC), Shenyang, China, 27–29 July 2020; pp. 3677–3682. [Google Scholar] [CrossRef]
  16. Lee, D.; Jeong, J.; Kim, Y.H.; Park, J.B. An improved artificial potential field method with a new point of attractive force for a mobile robot. In Proceedings of the 2017 2nd International Conference on Robotics and Automation Engineering (ICRAE), Shanghai, China, 29–31 December 2017; pp. 63–67. [Google Scholar] [CrossRef]
  17. Xu, X.; Wang, M.; Mao, Y. Path planning of mobile robot based on improved artificial potential field method. J. Comput. Appl. 2020, 40, 3508–3512. [Google Scholar] [CrossRef]
  18. Wang, D.; Wang, P.; Zhang, X.; Guo, X.; Shu, Y.; Tian, X. An obstacle avoidance strategy for the wave glider based on the improved artificial potential field and collision prediction model. Ocean Eng. 2020, 206, 107356. [Google Scholar] [CrossRef]
  19. Yu, H.; Ning, L. Coordinated obstacle avoidance of multi-AUV based on improved artificial potential field method and consistency protocol. J. Mar. Sci. Eng. 2023, 11, 1157. [Google Scholar] [CrossRef]
  20. Hao, G.; Lv, Q.; Huang, Z.; Zhao, H.; Chen, W. Uav path planning based on improved artificial potential field method. Aerospace 2023, 10, 562. [Google Scholar] [CrossRef]
  21. Zhang, Y.; Liu, K.; Gao, F.; Zhao, F. Research on path planning and path tracking control of autonomous vehicles based on improved APF and SMC. Sensors 2023, 23, 7918. [Google Scholar] [CrossRef]
  22. Zhang, W.; Xu, G.; Song, Y.; Wang, Y. An obstacle avoidance strategy for complex obstacles based on artificial potential field method. J. Field Robot. 2023, 40, 1231–1244. [Google Scholar] [CrossRef]
  23. Bertsimas, D.; Tsitsiklis, J. Simulated annealing. Stat. Sci. 1993, 8, 10–15. [Google Scholar] [CrossRef]
  24. Zhang, P.-Y.; Lü, T.-S.; Song, L.-B. Soccer robot path planning based on the artificial potential field approach with simulated annealing. Robotica 2004, 22, 563–566. [Google Scholar] [CrossRef]
  25. Zhao, B.-W.; Jia, F.; Cao, Y.; Sun, Y.; Liu, Y.-H. Path planning of artificial potential field method based on simulated annealing algorithm. Comput. Eng. Sci. 2022, 44, 746–752. [Google Scholar] [CrossRef]
  26. Luan, T.; Tan, Z.; You, B.; Sun, M.; Yao, H. Path planning of unmanned surface vehicle based on artificial potential field approach considering virtual target points. Trans. Inst. Meas. Control 2024, 46, 1190–1202. [Google Scholar] [CrossRef]
  27. Yuan, P.; Zhang, Z.; Li, Y.; Cui, J. Leader-follower control and APF for Multi-USV coordination and obstacle avoidance. Ocean Eng. 2024, 313, 119487. [Google Scholar] [CrossRef]
  28. Wang, J.; Gu, W.; Dou, L. Leader-Follower Formation Control for Multiple UAVs with Trajectory Tracking Design. Acta Aeronaut. Et Astronaut. Sin. 2020, 41, 723758. [Google Scholar] [CrossRef]
  29. Lee, G.; Chwa, D. Decentralized behavior-based formation control of multiple robots considering obstacle avoidance. Intell. Serv. Robot. 2018, 11, 127–138. [Google Scholar] [CrossRef]
  30. Pan, W.-W.; Jiang, D.-P.; Pang, Y.-J.; Li, Y.-M.; Zhang, Q. A multi-AUV formation algorithm combining artificial potential field and virtual structure. Acta Armamentarii 2017, 38, 326–334. [Google Scholar] [CrossRef]
  31. Pereira, P.; Guerreiro, B.J.; Lourenço, P. Distributed model predictive control method for spacecraft formation flying in a leader–follower formation. IEEE Trans. Aerosp. Electron. Syst. 2022, 59, 3213–3223. [Google Scholar] [CrossRef]
  32. Wang, Z.; Zou, Y.; Liu, Y.; Meng, Z. Distributed control algorithm for leader–follower formation tracking of multiple quadrotors: Theory and experiment. IEEE/ASME Trans. Mechatron. 2020, 26, 1095–1105. [Google Scholar] [CrossRef]
  33. Huang, N.; Liu, D.; Sun, Z.; Duan, Z.; Lu, Q.; Chen, Z. Distributed consensus seeking with different convergence performance requirements: A unified control framework. IEEE Trans. Cybern. 2022, 53, 5483–5496. [Google Scholar] [CrossRef]
Figure 1. Leader–follower formation.
Figure 1. Leader–follower formation.
Drones 09 00390 g001
Figure 2. Illustration of the force composition in the artificial potential field (APF) method.
Figure 2. Illustration of the force composition in the artificial potential field (APF) method.
Drones 09 00390 g002
Figure 3. Three cases in which local minima occur. (a) case 1. (b) case 2. (c) case 3.
Figure 3. Three cases in which local minima occur. (a) case 1. (b) case 2. (c) case 3.
Drones 09 00390 g003
Figure 4. Illustration of the force smoothing effect. (a) Before force smoothing. (b) After force smoothing.
Figure 4. Illustration of the force smoothing effect. (a) Before force smoothing. (b) After force smoothing.
Drones 09 00390 g004
Figure 5. Adaptive attractive gain under different conditions. (a) Moderate attraction gain within the goal proximity range. (b) Inversely scaled attraction gain when outside the goal proximity. (c) Constant attraction gain within obstacle-influenced zones.
Figure 5. Adaptive attractive gain under different conditions. (a) Moderate attraction gain within the goal proximity range. (b) Inversely scaled attraction gain when outside the goal proximity. (c) Constant attraction gain within obstacle-influenced zones.
Drones 09 00390 g005
Figure 6. Schematic diagram of escaping a semi-enclosed obstacle.
Figure 6. Schematic diagram of escaping a semi-enclosed obstacle.
Drones 09 00390 g006
Figure 7. Comparison of the escape routes from a semi-enclosed obstacle.
Figure 7. Comparison of the escape routes from a semi-enclosed obstacle.
Drones 09 00390 g007
Figure 8. Illustration of the escape direction determination.
Figure 8. Illustration of the escape direction determination.
Drones 09 00390 g008
Figure 9. Determination of the escape direction based on the vector angles.
Figure 9. Determination of the escape direction based on the vector angles.
Drones 09 00390 g009
Figure 10. Geometric definition of the escape from a semi-enclosed obstacle.
Figure 10. Geometric definition of the escape from a semi-enclosed obstacle.
Drones 09 00390 g010
Figure 11. Flowchart of the improved DSA-based escape algorithm.
Figure 11. Flowchart of the improved DSA-based escape algorithm.
Drones 09 00390 g011
Figure 12. Flowchart of the DSA-APF algorithm.
Figure 12. Flowchart of the DSA-APF algorithm.
Drones 09 00390 g012
Figure 13. Communication topology of the five-UAV formation.
Figure 13. Communication topology of the five-UAV formation.
Drones 09 00390 g013
Figure 14. Oscillation test at α = 0 without using the resultant force optimization. (a) Simulated path diagram. (b) Variation of ρ G .
Figure 14. Oscillation test at α = 0 without using the resultant force optimization. (a) Simulated path diagram. (b) Variation of ρ G .
Drones 09 00390 g014
Figure 15. Oscillation test at α = 0.6 using the resultant force optimization. (a) Simulated path diagram. (b) Variation of ρ G .
Figure 15. Oscillation test at α = 0.6 using the resultant force optimization. (a) Simulated path diagram. (b) Variation of ρ G .
Drones 09 00390 g015
Figure 16. Simulated formation trajectory for Group 1.
Figure 16. Simulated formation trajectory for Group 1.
Drones 09 00390 g016
Figure 17. Evolution of e x i ( t ) and e y i ( t ) for Group 1.
Figure 17. Evolution of e x i ( t ) and e y i ( t ) for Group 1.
Drones 09 00390 g017aDrones 09 00390 g017b
Figure 18. Simulated formation trajectory for Group 2.
Figure 18. Simulated formation trajectory for Group 2.
Drones 09 00390 g018
Figure 19. Evolution of e x i ( t ) and e y i ( t ) for Group 2.
Figure 19. Evolution of e x i ( t ) and e y i ( t ) for Group 2.
Drones 09 00390 g019
Figure 20. Simulated formation trajectory for Group 3.
Figure 20. Simulated formation trajectory for Group 3.
Drones 09 00390 g020
Figure 21. Evolution of e x i ( t ) and e y i ( t ) for Group 3.
Figure 21. Evolution of e x i ( t ) and e y i ( t ) for Group 3.
Drones 09 00390 g021
Figure 22. Simulated formation trajectory for APF-F and APF-S.
Figure 22. Simulated formation trajectory for APF-F and APF-S.
Drones 09 00390 g022
Figure 23. Evolution of e x i ( t ) and e y i ( t ) for APF-F and APF-S.
Figure 23. Evolution of e x i ( t ) and e y i ( t ) for APF-F and APF-S.
Drones 09 00390 g023
Figure 24. Formation trajectory in a complex obstacle environment.
Figure 24. Formation trajectory in a complex obstacle environment.
Drones 09 00390 g024
Figure 25. Evolution of v x i ( t ) and v y i ( t ) during formation-based obstacle avoidance in a complex environment.
Figure 25. Evolution of v x i ( t ) and v y i ( t ) during formation-based obstacle avoidance in a complex environment.
Drones 09 00390 g025
Figure 26. Trajectory for escaping a left-open semi-enclosed obstacle.
Figure 26. Trajectory for escaping a left-open semi-enclosed obstacle.
Drones 09 00390 g026
Figure 27. DSA-AAPF, SA-APF-F and SA-APF-S trajectory for escaping a left-open semi-enclosed obstacle.
Figure 27. DSA-AAPF, SA-APF-F and SA-APF-S trajectory for escaping a left-open semi-enclosed obstacle.
Drones 09 00390 g027
Figure 28. DSA-AAPF, SA-APF-F and SA-APF-S trajectory for escaping a bottom-open semi-enclosed obstacle.
Figure 28. DSA-AAPF, SA-APF-F and SA-APF-S trajectory for escaping a bottom-open semi-enclosed obstacle.
Drones 09 00390 g028
Figure 29. DSA-AAPF, SA-APF-F and SA-APF-S trajectory for escaping a nearly fully enclosed obstacle.
Figure 29. DSA-AAPF, SA-APF-F and SA-APF-S trajectory for escaping a nearly fully enclosed obstacle.
Drones 09 00390 g029
Table 1. Comparison of the main innovations of the improved APF algorithm with DSA-AAPF.
Table 1. Comparison of the main innovations of the improved APF algorithm with DSA-AAPF.
ResearchApplication ScenariosObstacles That Cause Local MinimaMethods to Escape from Local MinimaImprovement of the Force Calculation Formula and Movement
DSA-AAPFFormationSemi-enclosed obstacle and nearly fully enclosed obstacleDirectional deflection mechanism of improved simulated annealingRedefine the potential field, resultant force optimizes momentum smoothing, adaptive attractive gain, fast-converging control law
[19]FormationA single simple obstacleTransverse auxiliary fieldRedefine the potential field, probabilistic threat environment
[20]SingleA single simple obstacleVirtual sub-targetRedefine the potential field,
adaptive step size
[21]SingleA single simple obstacleVirtual sub-targetRedefine the potential field,
path optimization algorithm
[22]SingleSemi-enclosed obstacle and nearly fully enclosed obstacleReturn to the previous path and then close the obstaclesRedefine the potential field
Table 2. Control function combinations used for the performance evaluation.
Table 2. Control function combinations used for the performance evaluation.
Group s ( z ) ϕ ( z )
(1) s i g n ( z ) z
5 z + 0.1 z 0.1 z
z z + 0.1 z
(2) s i g n ( z ) 2 z 0.5
5 z + 0.1 z 0.1 2 z 0.5
z z + 0.1 2 z 0.5
(3) s i g n ( z ) 2 z 0.5 + 2 z 1.5
5 z + 0.1 z 0.1 2 z 0.5 + 2 z 1.5
z z + 0.1 2 z 0.5 + 2 z 1.5
Note: In this table and the subsequent analysis, the variable z is used as a shorthand notation for the force vector F ( X t ( t ) ) .
Table 3. Performance comparison of the three group configurations.
Table 3. Performance comparison of the three group configurations.
GroupFunction t r e c t e n d ( e x i ( t e n d ) , e y i ( t e n d ) ) T
(1) s ( z ) = s i g n ( z ) , ϕ ( z ) = z 0.124 s 0.283 s ( 0.00937 , 0.00144 ) T
s ( z ) = 5 ( z + 0.1 z 0.1 ) , ϕ ( z ) = z 0.113 s 0.268 s ( 0.00898 , 0.00156 ) T
s ( z ) = z ( z + 0.1 ) , ϕ ( z ) = z 0.132 s 0.2905 s ( 0.00841 , 0.00238 ) T
(2) s ( z ) = s i g n ( z ) , ϕ ( z ) = 2 z 0.5 0.324 s 0.8855 s ( 0.00936 , 0.00013 ) T
s ( z ) = 5 ( z + 0.1 z 0.1 ) , ϕ ( z ) = 2 z 0.5 0.286 s 0.864 s ( 0.00931 , 0.00017 ) T
s ( z ) = z ( z + 0.1 ) , ϕ ( z ) = 2 z 0.5 0.337 s 0.887 s ( 0.01002 , 0.00001 ) T
(3) s ( z ) = s i g n ( z ) , ϕ ( z ) = 2 z 0.5 + 2 z 1.5 0.064 s 0.1355 s ( 0.00085 , 0.01001 ) T
s ( z ) = 5 ( z + 0.1 z 0.1 ) , ϕ ( z ) = 2 z 0.5 + 2 z 1.5 0.052 s 0.125 s ( 0.00264 , 0.00773 ) T
s ( z ) = z ( z + 0.1 ) , ϕ ( z ) = 2 z 0.5 + 2 z 1.5 0.075 s 0.1935 s ( 0.00604 , 0.00644 ) T
Table 4. The comparison between DSA-AAPF, APF-F and APF-S.
Table 4. The comparison between DSA-AAPF, APF-F and APF-S.
Algorithm t r e c t e n d ( e x i ( t e n d ) , e y i ( t e n d ) ) T
DSA-AAPF0.052 s 0.125 s ( 0.00264 , 0.00773 ) T
APF-FFailure1.0865 s ( 0.79707 , 0.04632 ) T
APF-S0.153 s 0.2745 s ( 0.3919 , 0.03058 ) T
Table 5. The variation of the success rate with the change in the main parameters.
Table 5. The variation of the success rate with the change in the main parameters.
Parameter−5%−3%03%5%
h i 96%96%96%96%95%
τ i 96%96%96%96%96%
c 95%96%96%94%90%
Table 6. The success rate comparison of DSA-AAPF, APF-F, APF-S, SA-APF-F and SA-APF-S when escaping from the local minima caused by various obstacles.
Table 6. The success rate comparison of DSA-AAPF, APF-F, APF-S, SA-APF-F and SA-APF-S when escaping from the local minima caused by various obstacles.
AlgorithmLeft-Open Semi-Enclosed ObstacleBottom-Open Semi-Enclosed ObstacleNearly Fully Enclosed Obstacle
DSA-AAPF96%98%92%
APF-FFailureFailureFailure
APF-SFailureFailureFailure
SA-APF-FExtremely low probabilityExtremely low probabilityFailure
SA-APF-SExtremely low probabilityExtremely low probabilityFailure
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ma, B.; Ji, Y.; Fang, L. A Multi-UAV Formation Obstacle Avoidance Method Combined with Improved Simulated Annealing and an Adaptive Artificial Potential Field. Drones 2025, 9, 390. https://doi.org/10.3390/drones9060390

AMA Style

Ma B, Ji Y, Fang L. A Multi-UAV Formation Obstacle Avoidance Method Combined with Improved Simulated Annealing and an Adaptive Artificial Potential Field. Drones. 2025; 9(6):390. https://doi.org/10.3390/drones9060390

Chicago/Turabian Style

Ma, Bo, Yi Ji, and Liyong Fang. 2025. "A Multi-UAV Formation Obstacle Avoidance Method Combined with Improved Simulated Annealing and an Adaptive Artificial Potential Field" Drones 9, no. 6: 390. https://doi.org/10.3390/drones9060390

APA Style

Ma, B., Ji, Y., & Fang, L. (2025). A Multi-UAV Formation Obstacle Avoidance Method Combined with Improved Simulated Annealing and an Adaptive Artificial Potential Field. Drones, 9(6), 390. https://doi.org/10.3390/drones9060390

Article Metrics

Back to TopTop