Previous Article in Journal
Prediction of Multi-Axis Fatigue Life of Metallic Materials Using a Feature-Optimised Hybrid GRU-Attention-DNN Model
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Collaborative Obstacle Avoidance for UAV Swarms Based on Improved Artificial Potential Field Method

1
School of Mechanical and Electrical Engineering, North University of China, Taiyuan 030051, China
2
School of Aerospace Engineering, North University of China, Taiyuan 030051, China
*
Author to whom correspondence should be addressed.
Eng 2026, 7(1), 10; https://doi.org/10.3390/eng7010010 (registering DOI)
Submission received: 6 November 2025 / Revised: 23 December 2025 / Accepted: 27 December 2025 / Published: 29 December 2025

Abstract

This paper addresses the issues of target unreachability and local optima in traditional artificial potential field (APF) methods for UAV swarm path planning by proposing an improved collaborative obstacle avoidance algorithm. By introducing a virtual target position function to reconstruct the repulsive field model, the repulsive force exponentially decays as the UAV approaches the target, effectively resolving the problem where excessive obstacle repulsion prevents UAVs from reaching the goal. Additionally, we design a dynamic virtual target point generation mechanism based on mechanical state detection to automatically create temporary target points when UAVs are trapped in local optima, thereby breaking force equilibrium. For multi-UAV collaboration, intra-formation UAVs are treated as dynamic obstacles, and a 3D repulsive field model is established to avoid local optima in planar scenarios. Combined with a leader–follower control strategy, a hybrid potential field position controller is designed to enable rapid formation reconfiguration post-obstacle avoidance. Simulation results demonstrate that the proposed improved APF method ensures safe obstacle avoidance and formation maintenance for UAV swarms in complex environments, significantly enhancing path planning reliability and effectiveness.

1. Introduction

With the rapid development of unmanned aerial vehicle (UAV) technology, multi-UAV cooperative systems have demonstrated significant application potential in fields such as military reconnaissance, disaster rescue, and environmental monitoring. Compared to single-UAV systems, these swarms can substantially improve task execution efficiency and system robustness through cooperative operations, particularly in complex task scenarios like large-area coverage and multi-target tracking [1,2,3].
Among existing path planning methods, the artificial potential field (APF) approach has become common for multi-UAV cooperative obstacle avoidance in small-to-medium-scale swarm scenarios due to its good real-time performance, low computational cost, and ease of implementation [4,5,6]. However, the traditional APF exhibits notable shortcomings in practical applications: when obstacles exist near the target point, the repulsive force generated by them may far exceed the attractive force of the target, preventing UAVs from reaching their destination (the “unreachable target” problem) [7,8]. Additionally, during movement, attractive and repulsive forces may reach equilibrium, causing the UAV to become trapped in a local optimum, resulting in stagnation or oscillatory motion and severely impacting task efficiency and safety [9,10,11]. Furthermore, in multi-UAV formation scenarios, relative position control and collision avoidance among UAVs are core challenges for cooperative operations [12,13,14,15], and failure to properly handle these interactions may lead to formation collapse or collisions. Therefore, improving the traditional APF to address these flaws holds significant theoretical and engineering value in multi-UAV formation obstacle avoidance and formation maintenance.
To overcome the inherent limitations of the traditional APF, researchers worldwide have proposed various improvements. For the unreachable target problem, existing studies primarily employ potential field reconstruction or repulsive force function modification strategies. Zhang et al. proposed dynamically adjusting the repulsive force coefficient [16], which partially alleviates force imbalance near the target but reduces obstacle avoidance sensitivity. Mainstream approaches to escaping local optima include random perturbation and virtual target points. Pan et al. introduced random perturbations near equilibrium points to help UAVs break free from local optima [17], but this method can cause path oscillations and reduce motion stability. Notably, in multi-UAV cooperative control, most existing studies adopt leader–follower architectures or distributed control strategies based on consensus algorithms. While the hybrid control method proposed by Li et al. achieves basic formation maintenance [18], its obstacle avoidance performance in high-obstacle-density environments remains inadequate. A systematic analysis reveals that most existing improvements focus on optimizing single issues and lack comprehensive solutions, particularly in handling obstacle avoidance–formation maintenance coupling [19,20,21]. Additionally, decentralized communication is a key enabler of swarm operations, as it affects task allocation efficiency and power consumption [22], providing important insights for the practical deployment of swarm control algorithms.
Due to the performance limitations of the computers embedded on UAVs, especially micro-UAVs, there are strict requirements for planning and control algorithm complexity [23,24]. To meet the needs of real-time algorithm performance and UAV swarm collaborative operations, this paper proposes the following two improvements to the APF method:
(1) Introducing a virtual target position function to optimize potential field distribution near the target and resolve the unreachable target problem.
(2) Adding virtual target points to break force equilibrium and eliminate local optima traps. UAVs within the formation are simultaneously treated as obstacles, with repulsive potential fields designed to achieve intra-swarm collision avoidance, and controlled via a leader–follower strategy for post-avoidance formation reorganization.
Finally, simulation experiments validate the effectiveness of the improved algorithm, providing a reliable solution for multi-UAV cooperative obstacle avoidance path planning.

2. Improved APF with Introduction of the Virtual Target Position Function and Additional Virtual Target Points

2.1. Traditional APF Theory

The artificial potential field method drives the target toward its goal under the combined action of the repulsive force of obstacles and the attractive force of the goal point on the target [25]. The gravitational potential field and repulsive potential field are as follows:
U a t X = 1 2 K X X g 2 ,
U r e X = 1 2 η 1 λ 1 λ 0 2 ,             λ X , X o b λ 0 0 ,                                                         λ X , X o b > λ 0 .
Here, U a t X is the gravitational potential field, U r e X is the repulsive potential field, X is the UAV’s coordinates, X g is the target point, K is the gravitational potential field gain and K > 0 , X o b is the obstacle position, λ X , X o b is the distance between the drone and the obstacle, and λ 0 is the obstacle influence boundary distance.
The force acting on the object is equal to the negative gradient of the potential field at the object’s location:
F a t X = K X X g ,
F r e X = η 1 λ 1 λ 0 1 λ 2 ,                 λ X , X o b λ 0 0 ,                                                                   λ X , X o b > λ 0 .
Here, F a t X is the gravity and F r e X is the repulsion. Thus, the resultant force acting on the object is as follows:
F X = F a t X + F r e X .
Under the influence of this resultant force, the UAV will move in the target’s direction. However, when obstacles are present near the final target, the attractive force acting on it becomes significantly weaker than the repulsive force generated by the nearby obstacles, preventing the UAV from reaching the intended destination (as shown in Figure 1). Additionally, during movement, a scenario may arise where the resultant force becomes zero, causing the UAV to either stop or oscillate around a certain point, further hindering its ability to reach the desired position [26].

2.2. Target Position Function

When excessive obstacles exist near the target point, the UAV may fail to reach its destination due to the strong repulsive forces they generate, causing it to oscillate around the target area—a phenomenon known as the “unreachable goal problem.” To ensure successful arrival at the intended target, a target position function X X g m is incorporated into the repulsive force function. This modification adjusts the magnitude of the resultant force acting on the UAV near the target, thereby achieving the desired navigation effect. The improved repulsive force function is defined as follows:
U r e X = 1 2 η 1 λ 1 λ 0 2 X X g m ,                 λ λ 0 0   ,                                                                                       λ > λ 0 ,
F r e X = F r e 1 + F r e 2                                                     λ λ 0 0                                                                                     λ > λ 0 ,
where:
F r e 1 = η 1 λ 1 λ 0 1 λ 2 X X g m ,
F r e 2 = 1 2 η 1 λ 1 λ 0 2 X X g m 1 .
Here, the repulsive force F r e 1 acts outwards from the obstacle to the UAV, while F r e 2 acts from the UAV to the target. The above derivation demonstrates that the repulsive force’s magnitude can be adjusted by controlling the parameter m . When 0 < m < 1 , there is:
F r e 1 = η 1 λ 1 λ 0 X X g λ 2 ,
F r e 2 = 1 2 η 1 λ 1 λ 0 2 1 X X g .
When F r e 2 . approaches infinity ( F r e 2 → ∞), the force is directed from the robot to the target. Under condition m = 1   ,
F r e 1 = η 1 λ 1 λ 0 X X g λ 2 ,
F r e 2 = 1 2 η 1 λ 1 λ 0 2 .
When F r e 1 approaches infinitesimal ( F r e 1 0 ) and F r e 2 remains a fixed value, the direction of the force still points toward the target.
Under condition m > 1 , lim F r e 2 0 ,   lim F r e 2 0 can be obtained, which means that both forces become zero when reaching the target point. Therefore, repulsion gradually diminishes, and the attractive force becomes dominant, enabling the UAV to reach its target point. Key parameters regulate the UAV’s motion state through resultant force modulation, with the following specific impacts:
(1) Impact of m. A larger m enhances the target direction’s weight in the repulsive force, promoting faster target convergence but potentially reducing responsiveness to obstacles. A smaller m prioritizes obstacle avoidance by strengthening obstacle-directed repulsion, but may hinder target reachability. Our selected m value ensures a balance between these two objectives.
(2) Impact of φ . When φ is small (obstacles are near the target direction), the virtual target position function modulates the repulsive force to tilt the UAV’s motion toward the target, avoiding excessive repulsion that blocks the target path. When φ is large (obstacles are perpendicular to the target direction), the repulsive force prioritizes lateral obstacle avoidance, guiding the UAV to safely avoid obstacles before reorienting to the target.
(3) Impact of the repulsive force limit. This constraint prevents abrupt or unstable UAV motion caused by overly strong repulsive forces, ensuring that the generated trajectory is compatible with the UAV’s dynamic performance and flight stability.
Through these improvements, we employed a grid-based method employed to simulate a UAV environment with multiple obstacles near the target, yielding the trajectory illustrated in the following figures.
Comparing Figure 2 and Figure 3 reveals that when numerous obstacles exist near the target point, the traditional artificial potential field (APF) method fails to reach the destination due to excessive UAV repulsion, and its planned path may even collide with obstacles, risking accidents. In contrast, the improved APF method, by incorporating a target position function, modifies the potential field around obstacles near the target, enabling the UAV to successfully arrive at the designated goal. Comparative diagrams of potential fields before and after improvement are shown in Figure 4 and Figure 5.
Comparing the potential field diagrams, the improved APF can be seen to analyze obstacles across the entire flight environment in its total potential field, thereby enhancing operational safety. Notably, near the target point, the total potential field reaches a local minimum, enabling the UAV to arrive at its destination more effectively.

2.3. Virtual Target Point

When a UAV in a potential field environment is subjected to balanced forces—where the target’s attraction and obstacles’ repulsion cancel each other out—it may enter a state of equilibrium, halting or oscillating near the balance point. To detect such scenarios, the UAV’s potential field magnitude at different time steps is evaluated against the condition U t + 1 U t < U min .
To resolve this local minima problem, a virtual target point is introduced, disrupting the force equilibrium, redirecting the UAV’s movement toward the virtual goal, and ultimately guiding it out of the trapped state.
Figure 6 demonstrates the changes in resultant force after introducing a virtual target point in diverse obstacle environments. As illustrated, the original equilibrium state is disrupted, and the UAV begins moving along the new resultant force direction. The gravitational force expression for the new target point is given by:
F v i r = 1 2 ϕ D n D v i r 2 .
The total resultant force acting on the UAV is:
F t o t a l = F r e j + F a t t + F v i r .
Here, F r e j is the total repulsive force generated by obstacles, F a t t is the attraction of the original target point to the UAV, ϕ is the gain coefficient, whose value is directly influenced by the UAV’s potential field environment, and F v i r is the attraction of the introduced virtual target point to the UAV, which decays to zero when the UAV reaches the designated virtual target point. Comparative trajectory diagrams before and after introducing virtual target points to avoid local optima are shown in Figure 7 and Figure 8.

2.4. Stability and Convergence Analysis of the Improved APF Algorithm

To theoretically verify the improved APF algorithm’s reliability, we employed Lyapunov stability theory to analyze the potential field system stability and the convergence of the UAV to the target point.

2.4.1. Definition of Lyapunov Candidate Function

Let the position vector of the UAV be x = [ x , y , z ] T , the target position vector be x g = [ x g , y g , z g ] T , and the total potential energy of the UAV in the improved potential field be the Lyapunov candidate function V ( x ) :
V ( x ) = U a ( x ) + U r ( x ) + U r v ( x ) .
Here, U a x = 1 2 k a x x g 2 is the attractive potential energy, k a > 0 is the attractive gain coefficient, and denotes the Euclidean norm. U r x is the improved repulsive potential energy integrated with the virtual target position function, which satisfies U r x 0 for all positions, and U r x g = 0 when the UAV reaches the target point, and U r v x is the potential energy generated by the dynamic virtual target point. When the UAV escapes the local optimum and moves toward its original target, U r v x . decays exponentially to 0, ensuring no interference with the final convergence.

2.4.2. Key Properties of the Lyapunov Function

Positive definiteness: For any UAV position x , U a ( x ) 0 , U r ( x ) 0 , and U r v ( x ) 0 , so V ( x ) 0 . When and only when x = x g , U a ( x ) = 0 , U r ( x ) = 0 , and U r v ( x ) = 0 ; thus, V ( x ) = 0 . The candidate function satisfies positive definiteness.
Time derivative analysis: In the potential field system, the UAV follows the principle that its acceleration is proportional to the negative gradient of the potential energy, i.e., x . . = γ V ( x ) , where γ > 0 is the proportional coefficient related to the UAV’s mass and dynamic characteristics. The velocity of the UAV is x . , and the time derivative of V ( x ) is:
V ˙ ( x ) = V ( x ) T x . .
Substituting x . = γ V ( x ) d t into the above equation, and considering the dynamic characteristics of the UAV, the time derivative can be simplified as:
V ˙ ( x ) = γ V ( x ) 2 0 .
Equality V ˙ ( x ) = 0 holds if and only if V ( x ) = 0 , which corresponds to two cases: the UAV is at the target point x = x g , or the UAV is trapped in a local optimum (resultant force is zero).

2.4.3. Stability and Convergence Conclusion

According to LaSalle’s invariance principle, for a closed-loop system, if the Lyapunov candidate function V x is positive definite and its time derivative V ˙ ( x ) 0 , the system will converge to the invariant set where V ˙ ( x ) = 0 . For the improved APF algorithm, when x = x g , V ( x ) = 0 and V ( x ) = 0 , which is the global minimum point of the potential field.
When the UAV is trapped in a local optimum, a temporary target will be created via the dynamic virtual target point generation mechanism, modifying the potential field distribution and making V ( x ) 0 , thus breaking the invariant set corresponding to the local optimum.
Therefore, the only invariant set of the system is the target point x g . As t , the UAV’s position x ( t ) will converge to x g , indicating that the improved APF algorithm is globally asymptotically stable.

3. Application Design of Improved APF in UAV Formation

3.1. Repulsive Force Between Adjacent UAVs

To extend our improved APF to multi-UAV cooperative scenarios, intra-formation UAVs must be treated as dynamic obstacles to avoid inter-UAV collisions. Thus, we first designed a 3D repulsive field model and then integrated it with a leader–follower strategy to realize formation maintenance and obstacle avoidance. In the potential field environment, when UAV i and UAV j are within a certain critical distance, they mutually treat each other as obstacles, generating reciprocal repulsive forces. The repulsive potential field is defined as follows:
U f o l l o w e r   i , j r e = sin ( l ) ,                 l < l s a f e 0 ,                             l l s a f e .
By taking the derivative of the potential field function, the repulsive force between UAV i and UAV j can be derived as follows:
F f o l l o w e r   i , j r e = U f o l l o w e r   i , j r e = cos ( l ) ,                   l < l s a f e 0 ,                                 l l s a f e .
The repulsive force acting on the i-th follower UAV is the vector sum of the repulsive forces generated by all other follower UAVs:
F f o l l o w e r     i r e = j = 2 ,   j i n F f o l l o w e r   j r e     ,             l < l s a f e 0   ,                                                         l l s a f e .
In the above equations, l is the distance between UAV i and UAV j, and l s a f e is the minimum safe distance for two following UAVs to avoid collision. In the potential field environment, the total potential field function acting on a follower UAV should be the sum of the potential fields generated by environmental obstacles and mutual UAV interactions. When the swarm needs to change formation during mission execution, the repulsive forces between follower UAVs may cause them to fall into local minima, resulting in inter-UAV distances smaller than the safety threshold and potential collisions. By modifying the direction of the repulsive forces to escape the 2D plane where the local inter-UAV minima occur, overall formation safety can be improved. In the potential field function, the repulsive force and its direction acting on a follower UAV are the same as vector n f i j . By altering the repulsive force direction vector, the UAV’s flight trajectory transitions from two-dimensional (2D) to three-dimensional (3D). In a 3D environment, the position and velocity information of UAV i can be represented as x i , y i , z i T and x ˙ i , y ˙ i , z ˙ i T , respectively. The modified n f i j is expressed as:
n f i j = f i j f i j ,
f i j = ( x i x j ) + κ s i g ( z i z j ) ( y i y j ) + κ s i g ( x i x j ) ( z i z j ) + κ s i g ( y i y j ) ,
where κ is the gain coefficient of the repulsive force. At this point, the resultant force acting on the UAV i is:
F f o l l o w e r   i r e = U f o l l o w e r   i , j r e n f i j .

3.2. Algorithm Flow

To begin, each UAV in the formation is initialized with random positions in the global coordinate system. UAV 1 is designated as the leader, and under the guidance of the attractive potential energy in the artificial potential field method, the remaining UAVs move to their predefined positions in the formation based on the structure designed in the previous section. Once the formation is established, the five quadrotor UAVs continue moving forward in a coordinated manner.
The algorithm flow is described as follows:
(1)
Set the relative positions of all members in the formation.
(2)
Calculate each UAV’s vector in the potential field environment.
(3)
Initialize data storage to record the UAV coordinates during flight.
(4)
Initialize a distance array between adjacent UAVs to store the distances between each UAV and its two nearest neighbors.
(5)
Iteratively compute the straight-line distances between UAVs in the formation.
(6)
Calculate the repulsive potential gradient between a single UAV and its neighbors, storing the results in the repulsive potential gradient array.
(7)
Determine whether the target position is reached by computing the difference between the UAV’s current position and its ideal position. If not, adjust the step size of the leader.
(8)
Compute the next movement of each UAV based on the resultant force acting on it.
(9)
Repeat steps (2)–(8) until the formation reaches the target position.
We primarily applied the artificial potential field method to achieve the following:
(1)
Formation shaping (initial UAV arrangement),
(2)
Formation maintenance (ensuring structure stability during movement),
(3)
Collision avoidance between robots during formation assembly.
The algorithm flowchart for APF multi-robot formation control is illustrated in Figure 9.
In the algorithm for calculating the distance between two robots, let the distance between them be d. If the leader UAV’s current coordinates are ( x 1 , y 1 ) and a follower UAV’s coordinates are ( x 2 , y 2 ), their Euclidean distance is derived from the distance formula between two points, as shown in the following equation:
d = ( x 1 x 2 ) 2 + ( y 1 y 2 ) 2 .
Obstacle avoidance is achieved through the repulsive potential energy in the artificial potential field, while ensuring collision avoidance among all UAVs. The formula for designing the gradient of the repulsive potential energy is shown in the equation below:
d v = 4 × e t a × d 2 ( x 1 x 2 ) 2 ( y 1 y 2 ) 2 d 2 × ( ( x 1 x 2 ) 2 + ( y 1 y 2 ) 2 ) 5 2 .
From Equation (24), it can be concluded that the magnitude of the repulsive force between two UAVs is determined by their distance, and e t a is the repulsive gain coefficient during motion. Figure 10 illustrates the obstacle avoidance control structure of the swarm flight system, designed based on combining leader–follower formation information and the artificial potential field method for obstacle avoidance.
When formation information is input into the UAV swarm, the leader receives the signal command. Through a consensus synchronization algorithm, and according to the established information topology structure, the command is transmitted from each parent node to subsequent child nodes, ultimately forming the desired formation. During navigation, each UAV tracks its own position and combines obstacle avoidance algorithms to plan an appropriate flight path, reaching the final target position.

3.3. Controller Design

The formation consists of a leader and followers. To calculate the leader’s next coordinates, the controller shown below was designed:
z ( x ) k + 1 = k x × z ( x ) k z ( y ) k + 1 = k y × z ( y ) k .
Here, z ( x ) k and z ( y ) k represent the coordinate positions of the leader UAV at the k-th iteration, while z ( x ) k + 1 and z ( y ) k + 1 denote the positions of the leader at the (k + 1)-th iteration. k x and k y are the iterative parameters of the leader’s coordinates during the flight process.
The movement of each follower in the next step is determined by the combined force generated by the gravitational potential energy from the target point and the repulsive potential energy exerted by other UAVs. The next coordinate position of a follower can be calculated with the following controller:
z ( x ) k + 1 = z ( x ) k d e i k × d _ v i k k d × ( z ( x ) i z ( x ) k ) z ( y ) k + 1 = z ( y ) k d e i k × d _ v i k k d × ( z ( y ) i z ( y ) k ) .

3.4. Convergence Analysis of the Leader–Follower Control Strategy

To ensure formation maintenance in the UAV swarm, we analyzed the convergence of the follower UAVs to their desired relative positions based on the leader–follower control framework.

3.4.1. Relative Position Error Model

Let x L ( t ) = [ x L ( t ) , y L ( t ) , z L ( t ) ] be the position vector of the leader UAV, which is assumed to be bounded and uniformly continuous, ensuring the leader’s trajectory is stable and feasible. For the i-th follower UAV, define the desired relative position vector with respect to the leader as d i * = [ d i x * , d i y * , d i z * ] T , while the actual position vector of the follower is x i ( t ) = [ x i ( t ) , y i ( t ) , z i ( t ) ] T . The relative position error is defined as:
e i ( t ) = x i ( t ) ( x L ( t ) + d i * .
The motion equation of the i-th follower is derived from the hybrid potential field position controller:
x . i ( t ) = V i ( x i ) + x . L ( t ) ,
where V i ( x i ) is the total potential energy of the i-th follower, including the attractive force of the target, the repulsion from environmental obstacles, and the 3D repulsion of other UAVs. Substituting the error definition into the motion equation, the error dynamics are obtained:
e . i ( t ) = V i ( x L ( t ) + d i * + e i ( t ) ) ,

3.4.2. Convergence Proof Based on Lyapunov Theory

Define the error Lyapunov function for the i-th follower:
V i e ( e i ) = 1 2 e i 2 ,
and find the time derivative of V i e ( e i ) :
V ˙ i e ( e i ) = e i T e . i = e i T V i ( x L + d i * + e i ) .
Based on the design of the 3D repulsive field and attractive potential field, the following can be determined:
When e i = 0 (the follower is at the desired position), V i ( x L + d i * ) = 0 , so V ˙ i e ( e i ) = 0 .
When e i 0 , the potential energy ( V i ( x i ) is strictly convex near the desired position, which ensures ( e i T V i ( x L + d i * + e i ) > 0 , thus V ˙ i e ( e i ) < 0 .
According to Lyapunov stability theory, since V i e ( e i ) is positive definite and V ˙ i e ( e i ) < 0 for e i 0 , the error e i ( t ) will converge to 0 as t ., meaning the i-th follower asymptotically converges to its desired formation position.

3.4.3. Robustness and Convergence Rate

To further illustrate the control strategy’s performance, we analyzed the convergence rate. Due to the boundedness of the potential field gradient (the repulsive force and attractive force are limited by the gain coefficients and safety distance constraints), there exists a positive constant λ such that:
V ˙ i e ( e i ) λ e i 2 = 2 λ V i e ( e i ) .
Solving this differential inequality gives:
V i e ( e i ( t ) ) V i e ( e i ( 0 ) ) e 2 λ t ,
which indicates that the formation error converges exponentially to 0 and the convergence rate is determined by λ (related to the potential field gain coefficients and UAV dynamic parameters). This exponential convergence characteristic ensures rapid formation reconfiguration after obstacle avoidance, verifying the robustness of leader–follower control.

4. Simulation and Result Analysis

4.1. UAV Swarm Formation

By setting the relative positions of each UAV within the formation, a fixed multi-UAV formation can be achieved. The structural design of these relative positions is illustrated in Figure 11.
Taking UAV 1 (leader) as the reference, the other robots are positioned as follows:
UAV 2: Positioned at (−1, −1) relative to UAV 1.
UAV 3: Positioned at (1, −1) relative to UAV 1 and at (2, 0) relative to UAV 2.
UAV 4: Positioned at (−1, −1) relative to UAV 2 and at (−4, 0) relative to UAV 5.
UAV 5: Positioned at (1, −1) relative to UAV 3 and at (4, 0) relative to UAV 4.
This complete description ensures precise spatial relationships between adjacent UAVs.
A map was constructed in MATLAB 2020b with randomly distributed obstacles, and the swarm consisted of five quadrotor UAVs initially arranged in a predefined formation. During flight, the UAV swarm prioritizes obstacle avoidance before reorganizing the formation. The relative positional data between UAVs are updated every 0.02 s, and the simulation parameters are shown in Table 1.
Under these conditions, two simulations were conducted:
(1)
Obstacle avoidance through densely aligned obstacles.
(2)
Obstacle avoidance with the target located behind obstacles.

4.2. Simulation Result Analysis

4.2.1. Obstacle Avoidance Through Densely Aligned Obstacles

As shown in Figure 12, when the swarm passes through parallel obstacles, the safe distance required to maintain the normal formation exceeds the gap between the two obstacles due to their narrow spacing. Therefore, to ensure the safety of each UAV within the swarm, the fixed formation is temporarily disrupted during passage. After safely passing the obstacles, the swarm achieves inter-UAV communication based on the predefined information topology to reconfirm the UAV’s relative positions and then reassembles into the predetermined formation to reach the designated target.
As shown in Figure 13 and Figure 14, the distances between UAVs within the swarm remain relatively stable during the initial operation. However, after 7 s, the distances suddenly increase significantly. This indicates that the swarm has entered a region with parallel obstacles with gaps between them smaller than the safe distance required to maintain the fixed formation. Consequently, the swarm temporarily breaks formation to navigate around the obstacles, leading to the observed increase in inter-UAV distances at this time point. After obstacle avoidance is completed, the distances between UAVs stabilize again within a relatively consistent range until the swarm reaches the target.

4.2.2. Obstacle Avoidance with the Target Located Behind Obstacles

On the basis of verifying obstacle avoidance in dense static scenarios (Simulation 1), this section further tests the algorithm’s performance in more challenging conditions—with the target blocked by obstacles (shown in Figure 15)—to verify whether the improved APF can solve the local optima problem of A*-CSA-APF proposed in Reference [10].
The proposed method and traditional APF control were simulated in identical environments. As illustrated in Figure 16, when the UAV swarm encounters an obstacle located before the target point, the unmodified APF falls into a local minimum, causing the swarm to stagnate and fail to reach its destination. In contrast, when using the improved APF algorithm proposed in this paper, UAVs approaching obstacles directly ahead of the target are subjected to repulsive forces adjusted by a virtual target point, breaking the force equilibrium. This enables the swarm to escape the current equilibrium state, ultimately achieving successful navigation to the target point.
As shown in Figure 17 and Figure 18, the entire swarm maintains a flight speed of approximately 6 m/s throughout the mission, generating safe trajectories with reasonable velocity. After 14 s, the speed decreases as the leader UAV approaches the target, slowing down to maintain formation integrity and enhance overall swarm robustness. In the figure, the black and red lines represent the system-defined safe distance between adjacent UAVs and the critical collision distance, respectively, and the distances between the quadrotor UAVs visibly remain consistently above the safety threshold throughout the flight. Moreover, the inter-UAV distances at both the beginning and end of the mission are identical, demonstrating that the swarm maintains its original formation after task completion, indicating strong robustness.
In order to objectively evaluate the performance difference between the proposed and traditional APF methods, quantitative indicators based on the statistical results of 30 independent repeated simulations are shown in Table 2 below. The data show that the proposed method achieves a breakthrough in target accessibility while also taking into account the safety of obstacle avoidance and path efficiency, which are both significantly better than in the traditional method.
As we show through simulations, the proposed improved APF method effectively resolves the target unreachability and local optima problems of traditional APF, ensuring collision avoidance safety and formation maintenance, though its trajectory generation prioritizes real-time force adjustment and target convergence over path continuity. Specifically, in dense obstacle environments, the continuous modulation of resultant forces (driven by the virtual target position function and 3D repulsive field) may lead to slight fluctuations in the generated path. These non-smooth trajectory segments could pose challenges for practical UAV flight, as physical UAVs are constrained by dynamic performance limits (e.g., maximum angular velocity and acceleration constraints) and cannot strictly follow trajectories with abrupt changes. This limitation does not affect the core functional validity of the algorithm (target reachability and obstacle avoidance) but restricts its direct applicability to scenarios requiring high trajectory smoothness. Future work will address this issue through path post-processing techniques to enhance the algorithm’s practical value.

5. Conclusions

To address the defects of the traditional APF in UAV swarm path planning and optimize multi-UAV cooperative performance, we proposed an improved collaborative obstacle avoidance algorithm. The key conclusions are as follows:
(1) The improved APF, with its introduced virtual target position function, reconstructs the repulsive field model. This makes the repulsive force decay exponentially as UAVs approach the target, effectively solving the traditional APF’s “target unreachable” problem caused by excessive obstacle repulsion.
(2) The dynamic virtual target point generation mechanism based on mechanical state detection can automatically create temporary targets when UAVs fall into local optima, breaking the force equilibrium and eliminating the traditional APF’s stagnation and oscillation issues; meanwhile, the designed 3D repulsive field model and integrated leader–follower control strategy realize safe obstacle avoidance and rapid formation reconfiguration. Simulation results confirm that the algorithm is strongly reliable and robust, which is suitable for UAV swarm cooperative control.
(4) Future work will focus on optimizing the smoothness of the generated path. Although the proposed algorithm ensures target reachability and collision avoidance, the trajectory may exhibit slight fluctuations in dense obstacle environments, which could be incompatible with the dynamic constraints of practical UAV flight. Subsequent research will introduce path-smoothing techniques via post-processing of algorithm-generated trajectories, aiming to enhance path smoothness while retaining the core advantages of obstacle avoidance and formation maintenance, further improving the proposed method’s practical applicability.

Author Contributions

Conceptualization, Y.H. and L.G.; methodology, C.Z.; software, P.C.; validation, Y.H., L.G. and M.Y.; formal analysis, C.Z.; investigation, M.Y.; resources, P.C.; data curation, C.Z.; writing—original draft preparation, Y.H.; writing—review and editing, L.G.; visualization, M.Y.; supervision, P.C.; project administration, C.Z.; funding acquisition, P.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Shanxi Provincial Key Research and Development Project, grant number 202202020101001, and the National Natural Science Foundation of China, grant number 51909245.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors upon request.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Zhang, H.J.; Xia, Q.Y.; Ma, X.; Ren, C.; Lu, Y. A Review of Unmanned Aerial Vehicles Deployment Optimization in 6G Low-altitude Communication Scenarios. Acta Aeronaut. Astronaut. Sin. 2025, 46, 531296. [Google Scholar]
  2. Deng, R.; Gong, X. Predictive Path Planning Strategy for Multi-UAV Systems against Covert Attacks. In Proceedings of the 2024 39th Youth Academic Annual Conference of Chinese Association of Automation (YAC), Dalian, China, 7–9 June 2024; pp. 2297–2301. [Google Scholar]
  3. Gong, B.; Li, Y.; Zhang, L.; Ai, J. Adaptive Factor Fuzzy Controller for Keeping Multi-UAV Formation While Avoiding Dynamic Obstacles. Drones 2024, 8, 344. [Google Scholar] [CrossRef]
  4. Zhang, P.; He, Y.; Wang, Z.; Li, S.; Liang, Q. Research on Multi-UAV Obstacle Avoidance with Optimal Consensus Control and Improved APF. Drones 2024, 8, 248. [Google Scholar] [CrossRef]
  5. Wei, J.W.; Fan, Q.M.; Peng, Y.H.; Yang, H.X. Study on Local Path Planning Based on APF Method. Fire Control Command Control 2024, 49, 177–184. [Google Scholar]
  6. Kownacki, C. Artificial Potential Field Based Trajectory Tracking for Quadcopter UAV Moving Targets. Sensors 2024, 24, 1343. [Google Scholar] [CrossRef] [PubMed]
  7. Xi, W.Q.; Lin, J.Z.; Shao, Z.Y. Path planning of mobile robot based on improved PRM and APF. Meas. Control 2025, 58, 979–995. [Google Scholar] [CrossRef]
  8. Zhang, Y.; Chen, J.; Chen, M.; Chen, C.; Zhang, Z.; Deng, X. Integrated the Artificial Potential Field with the Leader-Follower Approach for Unmanned Aerial Vehicles Cooperative Obstacle Avoidance. Mathematics 2024, 12, 954. [Google Scholar] [CrossRef]
  9. Pan, Z.; Zhang, C.; Xia, Y.; Xiong, H.; Shao, X. An Improved Artificial Potential Field Method for Path Planning and Formation Control of the Multi-UAV Systems. IEEE Trans. Circuits Syst. II Express Briefs 2022, 69, 1129–1133. [Google Scholar] [CrossRef]
  10. Gao, J.; Xu, X.; Pu, Q.; Petrovic, P.B.; Rodić, A.; Wang, Z. A Hybrid Path Planning Method Based on Improved A* and CSA-APF Algorithms. IEEE Access 2024, 12, 39139–39151. [Google Scholar] [CrossRef]
  11. Chen, P.; Shen, P.; Zhang, P.; Li, Y.; Ma, T.; Han, Y. Path Planning of Underwater Terrain-Aided Navigation Based on Improved Artificial Potential Field Method. Mar. Technol. Soc. J. 2019, 53, 65–74. [Google Scholar] [CrossRef]
  12. Liu, M.W.; Gao, B.B.; Wang, P.F.; Liu, Y.N.; Li, Y.M.; Li, P.Q. Research on UAV Formation Obstacle Avoidance Flight Based on Neural Network Adaptive PID Control. Unmanned Syst. Technol. 2022, 5, 22–32. [Google Scholar]
  13. Sheng, H.; Zhang, J.; Yan, Z.; Yin, B.; Liu, S.; Bai, T.; Wang, D. New multi-UAV formation keeping method based on improved artificial potential field. Chin. J. Aeronaut. 2023, 36, 249–270. [Google Scholar] [CrossRef]
  14. LV, Z.H.; Liang, X.L.; Rwn, B.X. A Real-Time Barrier Avoidance Algorithm for UAV Based on Fuzzy Neural Networks. J. Air Force Eng. Univ. (Nat. Sci. Ed.) 2021, 22, 82–89. [Google Scholar]
  15. Han, J.; Yang, F.; Yang, J.; Kang, X. 3D UAV Path Planning via Potential Filed-Imitation Reinforcement Learning. In Proceedings of the 43rd Chinese Control Conference, Kunming, China, 28–31 July 2024; pp. 4742–4748. [Google Scholar]
  16. Zhang, Y.; Wang, Q.; Shen, Y.; Dai, N.; He, B. Multi-AUV Cooperative Control and Autonomous Obstacle Avoidance Study. Ocean Eng. 2024, 304, 117634. [Google Scholar] [CrossRef]
  17. Pan, Z.; Li, D.; Yang, K.; Deng, H. Multi-Robot Obstacle Avoidance Based on the Improved Artificial Potential Field and PID Adaptive Tracking Control Algorithm. Robotica 2019, 37, 1883–1903. [Google Scholar] [CrossRef]
  18. Li, J.; Li, X.; Lu, J.; Cao, B.; Sun, J. A Novel Robust Hybrid Control Strategy for a Quadrotor Trajectory Tracking Aided with Bioinspired Neural Dynamics. Appl. Sci. 2024, 14, 9592. [Google Scholar] [CrossRef]
  19. Mei, Y.L.; Cui, L.K.; Hu, X.Y.; Hu, G.; Wang, H. Obstacle Avoidance and Formation Control of Multiple Unmanned Vehicles in Complex Environments based on Artificial Potential Field Method. Chin. J. Eng. 2025, 47, 364–373. [Google Scholar]
  20. Tang, Y.Y.; Zheng, E.H.; Qiu, X. 3D UAV Trajectory Planning Based on Optimized Bidirectional A* and Artificial Potential Field Method. J. Air Force Eng. Univ. 2024, 25, 69–75. [Google Scholar]
  21. Hwang, J.; Lee, J.; Park, C. Collision avoidance control for formation flying of multiple spacecraft using artificial potential field. Adv. Space Res. 2022, 69, 2197–2209. [Google Scholar] [CrossRef]
  22. Yasser, M.; Shalash, O.; Ismail, O. Optimized Decentralized Swarm Communication Algorithms for Efficient Task Allocation and Power Consumption in Swarm Robotics. Robotics 2024, 13, 66. [Google Scholar] [CrossRef]
  23. Seisa, A.S.; Lindqvist, B.; Satpute, S.G.; Nikolakopoulos, G. An edge architecture for enabling autonomous aerial navigation with embedded collision avoidance through remote nonlinear model predictive control. J. Parallel Distrib. Comput. 2024, 188, 104849. [Google Scholar] [CrossRef]
  24. Liu, H.F.; Fu, Y.J.; Zhang, W.P.; Zhang, H. Algorithm and Semi-physical System Simulation for Command Intent Recognition of UAV in Low-resource Environment. J. Syst. Simul. 2024, 36, 2894–2905. [Google Scholar]
  25. Wang, Q.L.; Wu, F.G.; Zheng, C.C.; Li, H. UAV Path Planning Based on Optimized Artificial Potential Field Method. Syst. Eng. Electron. 2023, 45, 1461–1468. [Google Scholar]
  26. Huang, Z.; Xie, Y.Y.; Zhang, X.; Wang, H.; Liu, W. Unmanned Aerial Vehicle Path Planning Method Based on Motion Prediction and Enhanced APF. Electron. Meas. Technol. 2023, 46, 103–111. [Google Scholar]
Figure 1. Schematic diagram of the resultant force experienced by a UAV in the environment.
Figure 1. Schematic diagram of the resultant force experienced by a UAV in the environment.
Eng 07 00010 g001
Figure 6. Comparison of the resultant force direction before and after adding virtual targets.
Figure 6. Comparison of the resultant force direction before and after adding virtual targets.
Eng 07 00010 g006
Figure 7. Improved APF solution route that escapes local optima.
Figure 7. Improved APF solution route that escapes local optima.
Eng 07 00010 g007
Figure 8. Traditional APF local optimal problem solution route.
Figure 8. Traditional APF local optimal problem solution route.
Eng 07 00010 g008
Figure 2. Trajectory comparison for solving the APF target unreachability problem.
Figure 2. Trajectory comparison for solving the APF target unreachability problem.
Eng 07 00010 g002
Figure 3. Traditional APF target unreachability problem.
Figure 3. Traditional APF target unreachability problem.
Eng 07 00010 g003
Figure 4. Projection of potential field on the x-y plane after improving the APF.
Figure 4. Projection of potential field on the x-y plane after improving the APF.
Eng 07 00010 g004
Figure 5. Potential field on the x-y plane with the traditional APF.
Figure 5. Potential field on the x-y plane with the traditional APF.
Eng 07 00010 g005
Figure 9. Flowchart of the APF-based formation control algorithm.
Figure 9. Flowchart of the APF-based formation control algorithm.
Eng 07 00010 g009
Figure 10. Obstacle avoidance control structure of the UAV formation flight system.
Figure 10. Obstacle avoidance control structure of the UAV formation flight system.
Eng 07 00010 g010
Figure 11. Relative positions of UAVs in the triangular formation.
Figure 11. Relative positions of UAVs in the triangular formation.
Eng 07 00010 g011
Figure 12. Cluster path when the distance between obstacles is small.
Figure 12. Cluster path when the distance between obstacles is small.
Eng 07 00010 g012
Figure 13. Changes in UAV speed during flight.
Figure 13. Changes in UAV speed during flight.
Eng 07 00010 g013
Figure 14. Distance variation between UAVs during flight.
Figure 14. Distance variation between UAVs during flight.
Eng 07 00010 g014
Figure 15. Map construction with the target point located behind the obstacle.
Figure 15. Map construction with the target point located behind the obstacle.
Eng 07 00010 g015
Figure 16. Path planning results: (a) APF and (b) improved APF*.
Figure 16. Path planning results: (a) APF and (b) improved APF*.
Eng 07 00010 g016
Figure 17. Changes in UAV speed during flight.
Figure 17. Changes in UAV speed during flight.
Eng 07 00010 g017
Figure 18. Distance variation between UAVs during flight.
Figure 18. Distance variation between UAVs during flight.
Eng 07 00010 g018
Table 1. Simulation parameters.
Table 1. Simulation parameters.
Parameter CategoryParameter DescriptionSymbolValue
Potential Field GainsGravitational potential field gainK100.0
Repulsive gain (environmental obstacles) η 50.0
Repulsive gain (intra-formation UAVs)-10.0
Virtual target point gain ϕ 10.0
Safety ThresholdsMinimum safe distance (UAV–obstacle)-0.5 m
Minimum safe distance (intra-formation UAVs)-1.0 m
Simulation BasicsIteration step size-0.01 s
Data sampling interval-0.01 s
Algorithm ControlsVirtual target position function parameter λ 0 5.0 m
Local optima detection threshold F t o t a l <0.1 N
Table 2. Quantitative comparison table of performances.
Table 2. Quantitative comparison table of performances.
Performance IndexProposed MethodComparison Method
Target attainment rate100%0
Mean value of minimum safe distance from obstacles0.6 m0.3 m
Mean value of minimum safe distance in formation1.2 m0.2 m
Effective path length (relative value)1.0 (benchmark)1.076 (not trapped in local optimal segment)
Average task completion time15.2 s-
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

Han, Y.; Guo, L.; Zhao, C.; Yuan, M.; Chen, P. Collaborative Obstacle Avoidance for UAV Swarms Based on Improved Artificial Potential Field Method. Eng 2026, 7, 10. https://doi.org/10.3390/eng7010010

AMA Style

Han Y, Guo L, Zhao C, Yuan M, Chen P. Collaborative Obstacle Avoidance for UAV Swarms Based on Improved Artificial Potential Field Method. Eng. 2026; 7(1):10. https://doi.org/10.3390/eng7010010

Chicago/Turabian Style

Han, Yue, Luji Guo, Chenbo Zhao, Meini Yuan, and Pengyun Chen. 2026. "Collaborative Obstacle Avoidance for UAV Swarms Based on Improved Artificial Potential Field Method" Eng 7, no. 1: 10. https://doi.org/10.3390/eng7010010

APA Style

Han, Y., Guo, L., Zhao, C., Yuan, M., & Chen, P. (2026). Collaborative Obstacle Avoidance for UAV Swarms Based on Improved Artificial Potential Field Method. Eng, 7(1), 10. https://doi.org/10.3390/eng7010010

Article Metrics

Back to TopTop