Grouping Formation and Obstacle Avoidance Control of UAV Swarm Based on Synchronous DMPC
Abstract
This paper focuses on the grouping formation control problem of unmanned aerial vehicle (UAV) swarms in obstacle environments. A grouping formation and obstacle avoidance control algorithm based on synchronous distributed model predictive control (DMPC) is proposed. First, the UAV swarm is divided into several groups horizontally and into a leader layer and a follower layer vertically. Second, tracking is regarded as the objective, and collision avoidance and obstacle avoidance are considered as constraints. By combining the velocity obstacle method with synchronous DMPC and providing corresponding terminal components, a leader layer control law is designed. The control law can enable the UAV swarm to track the target while avoiding collisions and dynamic obstacles. Then, considering the formation maintenance term, based on different priorities, member-level obstacle avoidance and group-level obstacle avoidance strategies are proposed, and the corresponding follower layer control laws are provided. Furthermore, the stability of the UAV swarm system under the control algorithm is demonstrated based on the Lyapunov theory. Finally, the effectiveness of the designed algorithm and its superiority in obstacle avoidance are verified through simulations.
1. Introduction
In recent years, the development of unmanned aerial vehicles (UAVs) has achieved fruitful results, and UAVs have found a wide range of applications in both military and civilian fields. Compared with a single UAV, UAV swarms yield better performances in reconnaissance [1], search [2], and enemy attacks [3]. The introduction and improvement of methods such as reinforcement learning, neural networks, disturbance observers, fractional-order calculus, and event-triggered communication [4–6] have also led to new developments in fault-tolerant control of UAV swarms, demonstrating its advantages and necessity. Therefore, UAV swarms have become a new research hotspot.
With the complexity of the environment and the diversity of the tasks, sometimes, considering a UAV swarm as a large group cannot fully meet the requirements of the task. This issue arises for the following reasons: (1) When the number and scale of UAVs in the swarm increase, it will cause the interaction topology between the UAVs to become more complex, the difficulty of collaboration will increase, and the control effect will not be ideal. (2) When the task requires a swarm to perform multitarget tracking, multiarea detection or coverage, and multiprey encirclement, a single group cannot complete the task well. (3) When a task requires a swarm to have different “functional units” (such as reconnaissance, strike, and communication), a single group cannot perform differentiated control on different “functional units.” In the three typical situations mentioned above, we need to divide the swarm into multiple groups and implement grouping formation control (GFC) to improve the efficiency of the entire swarm. Meanwhile, obstacle environments are common when UAV swarms perform tasks, and encountering obstacles is inevitable for swarms. When multiple groups in a swarm encounter obstacles, it may involve issues such as obstacle avoidance and collaboration within a single group and between multiple groups. However, research on these issues is not sufficient. The above two aspects are the main motivation to study the grouping formation control problem of UAV swarms in obstacle environments.
For single group control problem, the formation control technology is an important foundation. The classical methods of formation control include the leader–follower method [7], the virtual structure method [8], the behaviour-based method [9], and the artificial potential field (APF) method [10], which have laid the foundation for formation control research. Emerging methods such as a graph theory-based method [11, 12], consensus theory [13–15], swarm intelligence [16, 17], and distributed model predictive control (DMPC) [18, 19] have also found applications in formation control.
Model predictive control (MPC) can redefine the costs and constraints based on changes in the objectives and environment, and it can explicitly handle input and state constraints of the system. Its receding horizon optimization strategy can cope with environmental uncertainty [20]. DMPC can overcome the problem of computing and communication burden of centralized control, and if a noniterative synchronization strategy is adopted to calculate the control input [21], only one inter-UAV communication is required for each sampling period.
In the practical application of UAV swarm formation control, it is usually hoped that the swarm can achieve multiple functions simultaneously, such as trajectory tracking, formation maintenance, collision avoidance, and obstacle avoidance. Synchronous DMPC is often used to study swarm formation control problems with complex requirements due to its unique advantages. Yang and Ding implemented a swarm tracking reference trajectory and also ensured the collision avoidance and obstacle avoidance functions of the swarm, as well as the stability of the swarm system [21]. Without a reference trajectory, Guo et al. combined synchronous DMPC with the velocity obstacle (VO) method to handle collision avoidance and obstacle avoidance constraints, avoiding the design of complex terminal components in traditional DMPC theory and reducing the complexity of the controller [22]. For networked autonomous vehicles with a limited communication range, Lyu et al. combined CMPC and ADMM to propose an equivalent synchronous DMPC strategy [23]. Lyu et al. considered the avoidance of dynamic obstacles but only considered them as an additional constraint and did not provide stability proof under dynamic obstacle conditions. Bono et al. proposed a swarm-based DMPC scheme for coordination and control of multiple vehicle formations in uncertain environments [24]. To address the target capturing problem for MAS in obstacle environments, Fedele and Franzè proposed a strategy of alternating the use of two DMPC-based control actions [25]. It is worth noting that previous authors [21–25] considered collision and obstacle avoidance issues to some extent while completing tasks such as tracking, arrival, and encirclement. However, these studies mainly focused on the avoidance of static obstacles but do not fully consider the avoidance of dynamic obstacles. The avoidance of dynamic obstacles is worthy of further study.
For GFC problem, there are currently not many research results. Kushleyev et al. proposed a trajectory generation technique based on mixed integer quadratic programming (MIQP) and a grouping and region partitioning strategy to manage the complexity caused by the growth of the state space dimensions, and 16 UAVs were used to complete the tasks of swarm grouping, flying through windows, and swarm transformations into three-dimensional spiral and pyramid formations [26]. Chen et al. studied the formation control problem of fixed-wing UAV clusters and proposed a hierarchical grouping scheme. Collaborative path following control laws and distributed leader–follower control laws were designed for the leader and follower layers, respectively. Numerical simulation verification was conducted on 10 fixed-wing UAVs [27]. Tian et al. addressed the time-varying group formation tracking problem of a general linear multiagent system (GLMAS) with a switching interaction topology. Under the influence of external disturbances and the switching topology, two different distributed adaptive control protocols were constructed based on distributed observers, and the closed-loop stability of the GLMAS was demonstrated using the Lyapunov theory [28]. Wu et al. addressed the multigroup formation tracking control problem for a second-order multiagent system with multiple leaders via distributed impulsive control methods [29]. Haghighi and Cheah introduced adaptive interaction forces to cope with the interactions between groups, enabling a swarm to establish arbitrarily complex formations [30]. Zhao et al. studied multigroup tracking control for MAS, in which the control scheme combined event-triggered technology and impulsive theory [31].
In the existing research on GFC, the focus has been on the construction of grouping frameworks and the implementation of formation control. Less consideration has been given to GFC in obstacle environments, relying solely on simple prepath planning [26–28] and changing formation shape [32] strategies for obstacle avoidance. Therefore, GFC in obstacle environments is a problem worth studying.
Based on the above literature review, this study was mainly focused on the GFC problem of a UAV swarm in obstacle environments, and a grouping formation and obstacle avoidance control algorithm was proposed based on synchronous DMPC. The main contributions of this work are as follows: (1) For the first time, the GFC framework was combined with synchronous DMPC theory to solve the GFC problem in the obstacle environment. In contrast to previous work [26–28, 32], the collision and obstacle avoidance function of the swarm itself was considered. (2) A grouping and layering control framework was established that divided the UAV swarm into several groups horizontally and into a leader layer and a follower layer vertically. (3) A leader layer control law was designed that combined synchronous DMPC with a VO to obtain new terminal constraints and provide corresponding terminal components. In contrast to previous approaches [21–25], this control law can achieve avoidance of not only static obstacles but also dynamic obstacles. (4) Follower layer control laws were designed. In response to the GFC problem in obstacle environments, based on different priorities, member-level obstacle avoidance and group-level obstacle avoidance strategies were proposed, and the corresponding control laws were obtained. (5) Based on the Lyapunov theory, the designed algorithm can strictly ensure that the entire swarm tends to stabilize in obstacle environments.
The paper is organized as follows. Section 2 provides the problem description and establishes the model. Section 3 proposes obstacle avoidance strategies and designs control laws for the leader and follower layers. In Section 4, the effectiveness and superiority of the proposed algorithm are verified through simulation experiments. Section 5 presents the conclusions.
2. Problem Description and Model Establishment
2.1. Problem Description
In typical situations, such as large-scale, multiobjective situations requiring functional heterogeneity as mentioned in Introduction, we need to perform grouping formation control on the swarm. Furthermore, the research on group formation control in obstacle environments has a high value in practical applications. To address this issue, it is first necessary to establish a grouping and layering control framework, as shown in Figure 1.

In this paper, the swarm is divided horizontally into several independent groups and vertically into a leader layer and a follower layer. In the context of this paper, leaders are mainly responsible for tracking global reference trajectories and avoiding static and dynamic obstacles. Due to the diversity of tasks (such as multitarget tracking), they are not required to maintain a specific formation shape. The follower is mainly responsible for tracking the reference trajectory of the group (or the real-time trajectory of the group leader), maintaining the expected formation within the group, and possessing a certain obstacle avoidance function. Due to the need to consider inter-UAV collision avoidance, and because the number of groups and the number of members within each group are not too large, leaders can communicate with each other in pairs, and followers of the same group can also communicate with each other.
2.2. Model Establishment
Nv UAVs in the swarm are divided into M groups, consisting of M group leaders and N followers, and they are placed in the sets ℕleader = {1, 2, ⋯, M} and ℕfollower = {M + 1, M + 2, ⋯, M + N}, respectively, satisfying the ℕv = ℕleader ∪ ℕfollower. The followers of the group i ∈ ℕleader are placed in set , satisfying the condition .
3. Control Algorithm Design
This paper mainly studies the problem of GFC in obstacle environments. Due to the different requirements for the leader and follower layers, control laws need to be designed separately. The control laws of the leader and follower layers have evolved from previous work [36], which is mainly based on the DMPC theory to study the tracking and obstacle avoidance problems of single group.
3.1. Obstacle Avoidance Strategy
When the swarm executes tasks, it is necessary to perform grouping formation control on the swarm in situations of “large-scale,” “multiobjective,” and “functional heterogeneity.” When a swarm encounters obstacles, two obstacle avoidance strategies can be proposed based on different priorities: member-level obstacle avoidance and group-level obstacle avoidance.
In the member-level obstacle avoidance strategy, all members in the swarm have an obstacle avoidance function. In each group, the leader tracks the global reference trajectory, while the follower tracks the group reference trajectory.
When maintaining the formation of a group is a higher priority, a group-level obstacle avoidance strategy needs to be adopted. In the group-level obstacle avoidance strategy, the leader of each group has the obstacle avoidance function, and when the leader avoids obstacles, the determination of the safety radius needs to consider all followers of the group which it belongs to. Followers of each group do not have the obstacle avoidance function and only track the real-time trajectory of the group leader.
When designing the control algorithm, the control laws of the follower layer may vary depending on the obstacle avoidance strategy, as detailed in Sections 3.3 and 3.4.
3.2. Leader Layer Control Law
When using a synchronous strategy to calculate control inputs, it is not possible to know the real control inputs and states of the other UAVs. The assumed control inputs and assumed states need to be introduced, and the variable declarations are shown in Table 1.
Variable | Symbol |
---|---|
Optimal control input/state |
|
Feasible control input/state |
|
Assumed control input/state |
|
3.2.1. Cost Function
3.2.2. Collision Avoidance and Obstacle Avoidance Constraints
In this way, both the collision avoidance term in equation (4) and equation (9) can be guaranteed.
The type of obstacle can be static or dynamic. Because obstacles do not have computing and communication functions and cannot provide assumed state information, the design of the obstacle avoidance constraint differs from the design of the collision avoidance constraints. In practice, can be obtained by equipping UAVs with detection sensors and corresponding estimation or prediction algorithms. The design of the control law is based on the availability of .
3.2.3. Terminal Constraints
In conventional synchronous DMPC, it is necessary to design terminal components (including the terminal controller, terminal set, and terminal cost function) to ensure the stability of the system [21]. However, to avoid dynamic obstacles, in this paper, the design pattern is changed, and the VO is combined with collision avoidance and obstacle avoidance constraints [22] to design terminal constraints instead of a terminal set to ensure the safety and stability of the system.
The terminal constraints (14) and (15) make a feasible control input for terminal moment, which means that the velocities of the UAV and obstacles remain constant.
Note 1. In the previous work [22], the acceleration was taken as the control input during modeling, and was the terminal feasible control input while remaining the velocity constant. The control input of this paper is the desired velocity, and according to the dynamic equation (3), is the terminal feasible control input.
Note 2. The obstacle avoidance constraint in terminal constraint (15), when considering t = 1Ts, 2Ts, ⋯, strictly speaking, can only avoid obstacles of static and uniform motion. In practical applications, since the optimization problem is solved iteratively based on the sampling period Ts. It can make t = 1Ts, so that dynamic obstacles that can be approximated as uniform motion within Ts can also be avoided. Due to the obstacle avoidance constraints when l < N, the safety of avoiding dynamic obstacles can be guaranteed. Furthermore, according to the terminal obstacle avoidance constraints, reducing Ts and increasing N and can improve the ability to avoid dynamic obstacles.
3.2.4. Terminal Controller and Terminal Cost Function
Based on the terminal constraints in Section 3.2.3, this section designs the terminal controller and the terminal cost function based on the principle of system stability, and it provides a new method for determining key parameters of the terminal components that are suitable for them.
To ensure the stability of the swarm system, the key parameters Ki(k) and Pi in the terminal components can be determined through optimization problem 1, defined as follows:
Pi is selected offline, and the selection principle is to try to make the eigenvalues of Λi(k) tend to zero or be less than zero when solving online. This can ensure that there is always a pair of Ki(k) and Pi at moment k, ensuring that the conditions and ηi(k) ≤ 0 hold.
3.2.5. Algorithm Implementation and Stability Proof
Taking into account the cost function, collision avoidance and obstacle avoidance constraints, and terminal components (terminal constraints, terminal controller, and terminal cost function) designed earlier, the optimization problem for each UAV in the swarm is defined as follows:
-
Algorithm 1: The steps for solving the optimization problem 2.
-
Offline initialization parameters: Select the sampling period Ts and the prediction horizon N. For UAV i, given the weight parameters αi and ρi, and the desired vector , determine Pi in the terminal cost function.
-
Online solving:
-
(i) k = 0
-
Provide initial optimal control input and initial optimal state , l = 0, 1, ⋯, N − 1.
-
(ii) k > 0
-
Step 1: sample the current state zi(k) and obtain the assumed position , j ∈ ℕleader\i, l = 0, 1, ⋯, N − 1.
-
Step 2: solve optimization problem 2 and use Δzi(k + N|k), vi(k + N|k), and ηi(k) during the solution process to simultaneously solve optimization problem 1, ultimately obtaining the optimal control input sequence , l = 0, 1, ⋯, N − 1, selecting , and also obtaining the corresponding of the optimal solution.
-
Step 3: calculate the assumed state using equations (3) and (6), and send to UAV j ∈ ℕleader\i.
-
Step 4: k = k + 1, return to Step 1.
According to Algorithm 1, Theorem 1 is given as follows.
Theorem 1. At moment k, the swarm leader UAVs synchronously solve their optimization problems, given by optimization problem 2, according to Algorithm 1. If there is a feasible solution to optimization problem 2 for each UAV at k = 0, then for all k ≥ 1, optimization problem 2 for each UAV is feasible. Furthermore, the system composed of swarm leader UAVs is asymptotically stable.
Proof.
- (i)
Recursive feasibility
At moment k, if the optimization problem 2 of UAV i is feasible, the optimal control input is represented as , l = 0, 1, ⋯, N − 1, and the optimal state is represented as , l = 0, 1, ⋯, N. Based on equations (5) and (6), the control input and state are constructed as and , respectively.
First, at moment k + 1, and corresponding in and satisfy constraints (22.a)–(22.g) at moment k + 1. Second, the terminal constraints designed based on the VO enable to satisfy constraints (22. a)–(22. g) at moment k + 1. Third, under the action of also satisfies the terminal constraints (22. h)–(22. i) at moment k + 1. Therefore, is a feasible solution for optimization problem 2 at moment k + 1. Furthermore, if there is a solution at moment k, then there must be a solution at moment k + 1. If there is a solution at the initial moment, then there will be a solution at every future moment.
- (ii)
Stability
The Lyapunov function is defined as the sum of the optimal costs of all leader UAVs:
Taking the feasible control input and state at moment k as and , respectively, it can be obtained that
Based on equations (23)–(25) and (20) in the terminal component, it can be obtained that
If , , and , then .
According to equation (21), there is always a pair of and Pi at moment k that can ensure that and hold. Thus, holds, meaning that the system composed of swarm leader UAVs is asymptotically stable.
3.3. Follower Layer Control Law Based on Member-Level Obstacle Avoidance Strategy
When the follower layer adopts the member-level obstacle avoidance strategy, all members of the swarm have the obstacle avoidance function, and the followers do not need to strictly maintain the formation during obstacle avoidance. In each group, the leader tracks the global reference trajectory, while followers track the group reference trajectory.
3.3.1. Cost Function
When the follower layer adopts the member-level obstacle avoidance strategy, the objectives of the follower layer are to track the group’s reference trajectory, avoid collisions, avoid obstacles, and maintain formation.
3.3.2. Constraints
The constraints that need to be designed in the following layer also include collision avoidance, obstacle avoidance constraints, and terminal components, but due to the consideration of the formation maintenance in the cost function, state compatibility constraints need to be added.
The terminal constraints (14), (15), (31), and (32) make a feasible control input at the terminal moment.
Finally, the terminal controller and terminal cost function are designed. The forms of the terminal controller and terminal cost function are the same as those given by equations (16) and (18), respectively, but due to changes in the cost function, the determination of the parameters Ki(k) and Pi also needs to be changed accordingly.
Similarly, the key parameters Ki(k) and Pi in the terminal components can be determined by solving optimization problem 3, expressed as follows:
3.3.3. Stability Proof
When the follower layer adopts the member-level obstacle avoidance strategy, for each follower, (i) the cost function should be (27). (ii) When l < N, the collision avoidance and obstacle avoidance constraints are (29), and the compatibility constraint is (30). (iii) When l = N, the terminal constraints for obstacle avoidance and avoidance are (14), and the terminal constraint for compatibility is (31). (iv) When l > N, the terminal constraints for obstacle avoidance and avoidance are (15), and the terminal constraint for compatibility is (32). Therefore, optimization problem 4 can be described as:
-
Algorithm 2: The steps for solving the optimization problem 4.
-
The process of this algorithm is completely consistent with that of Algorithm 1. On the basis of Algorithm 1, (1) add the weight parameter βi, convergence speed parameter γi, and desired vectors and in the offline stage. (2) Obtain the assumed position , and assumed state , in Step 1. (3) Simultaneously solve optimization problems 4 and 3 in Step 2. (4) Calculate in Step 3 and send and to UAV and , respectively.
Theorem 2. At moment k, the follower UAVs in group m of the swarm synchronously solve their optimization problems, given by optimization problem 4, according to Algorithm 2. If there is a feasible solution to optimization problem 4 for each UAV at k = 0, then for all k ≥ 1, optimization problem 4 for each UAV is feasible. Furthermore, the system composed of follower UAVs in group m is asymptotically stable.
Proof.
- (i)
Recursive feasibility
This proof is the same as the recursive feasibility proof of Theorem 1.
- (ii)
Stability
A new Lyapunov function is defined as the sum of the optimal costs for all follower UAVs in group m.
Taking the feasible control input and state at moment k as and , respectively, equations (24) and (25) and the following equation can be obtained:
By combining equations (37), (24), (25), (38), and (33), it can be obtained that
State compatibility constraint equation (30) is applied, and the first two terms of equation (39) can be changed to
Equation (40) is reintroduced to equation (39) to obtain
According to equation (34), there is always a pair of and Pi at moment k that can satisfy and . Thus, is satisfied, meaning that the system composed of follower UAVs in group m is asymptotically stable.
The system composed of swarm leader UAVs is asymptotically stable, and the system composed of follower UAVs in each group is also asymptotically stable. In the member-level obstacle avoidance strategy, the reference state of each group coincides with the reference state zmr of the group leader, so the entire swarm system is stable.
3.4. Follower Layer Control Law Based on Group-Level Obstacle Avoidance Strategy
When formation maintenance is a priority, the group-level obstacle avoidance strategy can be adopted. The leader of each group has the obstacle avoidance function, while the group followers do not have the obstacle avoidance function and only track the real-time trajectory of the group leader. When the leader avoids obstacles, the determination of the safety radius needs to consider all followers within the group.
3.4.1. Cost Function
When the follower layer adopts the group-level obstacle avoidance strategy, the objectives of the follower layer are to track the trajectory of the group leader, avoid collisions between UAVs, and maintain formation.
However, at moment k, follower i cannot obtain the state information zm(k + l) of leader m at both the current moment and the next N − 1 moments.
If the leader’s assumed state is adopted, the assumed states for the future of moments k and k + 1 are different at the same time, i.e., , which will result in the inability to guarantee a decreasing tracking error for each follower and the stability of the system being compromised. Therefore, using the leader’s assumed state in the tracking term of the cost function is not a good choice.
In the field of formation control based on synchronous DMPC theory [21, 22], it is a prerequisite for research that the reference trajectory is provided by a virtual leader (i.e., zr(k + l) can be obtained), and the problem of tracking the leader’s real-time trajectory has not been fully studied yet.
This paper provides a feasible approach. Since follower i requires the state zm(k + l), l = 0, ⋯, N − 1 of leader m, it is possible to have leader m fly for N moments first and then record {zm(k), ⋯, zm(k + N − 1)}. At this moment, follower i starts tracking and obtains the state zm(k + l) of leader m. This converts real-time trajectory tracking into tracking a known reference trajectory, but there is an N · Ts second tracking delay. When the formation maintenance is a higher priority and if N · Ts is small, such a tracking performance is acceptable.
3.4.2. Stability Proof
For the follower layer, the control law design using the group-level obstacle avoidance strategy and the control law design using the member-level obstacle avoidance strategy are similar. Except for the selection of tracked trajectories, the biggest difference is that in the group obstacle avoidance strategy, the followers within the group do not have obstacle avoidance function. When using the group-level obstacle avoidance strategy, the design of collision avoidance constraints, compatibility constraint, terminal constraints, terminal controller, and terminal cost function is almost identical to that when using the member-level obstacle avoidance strategy. The control law design of the group-level obstacle avoidance strategy only requires the obstacle avoidance part of the control law of the member-level obstacle avoidance strategy to be removed and the reference state and reference control input to be replaced with zm(k + l) and um(k + l), respectively.
Referring to optimization problem 4, i.e., equation (36), under the group-level obstacle avoidance strategy, the optimization problem of the followers in each group can be described as follows:
-
Algorithm 3: The steps for solving the optimization problem 5.
-
The process of this algorithm is completely consistent with that of Algorithm 2. On the basis of Algorithm 2, (1) the desired vector is replaced with the in the offline stage. (2) Optimization problem 5 and problem 3 are multi-objective solved in Step 2.
Theorem 3. At moment k, the follower UAVs in group m of the swarm synchronously solve their optimization problems, given by optimization problem 5, according to Algorithm 3. If there is a feasible solution to optimization problem 5 for each UAV at k = 0, then for all k ≥ 1, optimization problem 5 for each UAV is feasible. Furthermore, the system composed of follower UAVs in group m is asymptotically stable.
Proof. The proof is completely consistent with the proof of Theorem 2.
The system composed of swarm leader UAVs is asymptotically stable, and the system composed of follower UAVs in each group is also asymptotically stable. In the group-level obstacle avoidance strategy, the followers of each group track the real trajectory of the leader, so the entire swarm system is stable.
Note 3. The control algorithm proposed in this paper has two forms, corresponding to obstacle avoidance strategies. (1) Under the member-level obstacle avoidance strategy, the leader layer adopts Algorithm 1 and the follower layer adopts Algorithm 2; (2) under the group-level obstacle avoidance strategy, the leader layer adopts Algorithm 1 and the follower layer adopts Algorithm 3.
4. Simulations
This paper mainly focuses on the GFC problem of UAV swarms in obstacle environments and proposes a grouping formation and obstacle avoidance control algorithm based on synchronous DMPC. Two types of simulations were conducted: (1) a scenario of a single group avoiding obstacles was established to verify the superiority of the proposed algorithm in obstacle avoidance and (2) a scenario of multiple groups avoiding obstacles was established to verify the effectiveness of the proposed algorithm, and the member-level obstacle avoidance strategy was compared with the group-level obstacle avoidance strategy..
4.1. Scenario of Single Group Avoiding Obstacles
In the scenario of a single group avoiding obstacles, the swarm was considered as to be a large group, and the follower layer control law based on member-level obstacle avoidance was implemented. Compared to the leader layer control law, the follower layer control law considers the cost of the formation maintenance more. The swarm tracks the common reference trajectory.
indicates that UAV i and UAV j could communicate with each other, while indicates that UAV i and UAV j were neighbors to each other. The safety radius was set to R = 0.5 m.
Furthermore, dij = dir − djr, i, j ∈ ℕv. The common reference state trajectory was set as a fixed point zr = [100, 0, 3, 0, 0, 0]T, and the reference state trajectory of each UAV was . Pi = diag([100, 100, 100, 20, 20, 20]) was selected. Five cylindrical obstacles (including two dynamic ones) were present, which were defined as , , , , and . The threat radius was set to , s = 1, ⋯, 5.
Figures 2(a) and 2(b) show the movement trajectories of the swarm in a complex obstacle environment. The swarm departed from the starting point, passed through the obstacles, and finally reached the desired position and formed the desired formation.




Figure 3 shows the distances between UAVs and distance between UAVs and obstacles. The minimum distance between UAVs was at the starting point, so dij(k) ≥ 2R. The minimum distance between the UAVs and the obstacles was , so . The swarm met the requirements for collision and obstacle avoidance. It can be seen that the algorithm proposed in this paper is capable of tracking, collision avoidance, and avoiding static and dynamic obstacles.


Figure 4 shows the formation and tracking errors of the swarm. Table 2 shows the performance comparison. Based on Figure 2, Figure 4, and Table 2, the obstacle avoidance performances of the APF algorithm [10], the consensus theory algorithm [15], and the proposed DMPC-based algorithm in the complex and dense obstacle environment were compared. (1) The swarm formation error band was set to ef = 1 m × 21 = 21 m. The time for the APF algorithm to enter the error band was 7.4 s, the time for the consensus theory algorithm to enter the error band was 6.8 s, and the time for the proposed algorithm to enter the error band was 6.4 s. When t = 4.4 s, the formation error of the APF algorithm was 174.75 m larger than that of the proposed algorithm, and the formation error of the consensus theory algorithm was 109.17 m larger than that of the proposed algorithm. It can be seen that the speed of forming the desired formation of the proposed algorithm is faster. (2) The swarm tracking error band was set to et = 1 m × 7 = 7 m. The time for the APF algorithm to enter the error band was 7.2 s, the time for the consensus theory algorithm to enter the error band was 7.7 s, and the time for the proposed algorithm to enter the error band was 6.7 s. It can be seen that the obstacle avoidance path of the proposed algorithm was better and that the tracking speed of the proposed algorithm was faster.


Algorithm | tf (s) (ef = 21 m) | tt (s) (et = 7 m) |
---|---|---|
APF | 7.4 | 7.2 |
Consensus | 6.8 | 7.7 |
DMPC | 6.4 | 6.7 |
Figure 5 shows η∗ and cost function curves. Every curve in Figure 5(a) is negative at all times, and . Furthermore, can be obtained. On the other hand, in Figure 5(b), monotonically decreases and tends to 0. Therefore, the swarm system is asymptotically stable.


In summary, among the algorithms that consider collision avoidance, obstacle avoidance, and tracking, the proposed algorithm has some advantages in swarm obstacle avoidance. (1) From the horizontal comparison, the algorithm in this paper performed better than the typical APF algorithm [10] and consensus theory algorithm [15] in avoiding obstacles, forming formation faster and tracking performance better. (2) From the vertical comparison, literatures [21–25] were all formation controllers designed based on DMPC, but they could only avoid static obstacles, while the algorithm in this paper can avoid static and dynamic obstacles at the same time and can ensure the stability of swarm, with more comprehensive obstacle avoidance ability.
4.2. Scenario of Multiple Groups Avoiding Obstacles
In this section, a scenario of multiple groups avoiding obstacles is examined to verify the effectiveness of the proposed algorithm. The results are compared with those of the member-level obstacle avoidance strategy with the group-level obstacle avoidance strategy.
A swarm system composed of three leaders and eight followers was simulated.
Communication topology ε3 is related to collision avoidance constraints. Since there are only 11 UAVs in the swarm in the simulation scenario setting, it is reasonable to allow all UAVs to communicate with each other. Neighbor topology ε4 is used to calculate the formation maintenance term in the cost function. Leaders were neighbors to each other, and members within the group were neighbors to each other (including group leader).
Three cylindrical obstacles (including one dynamic obstacle) were present, which were defined as , , and.
The threat radius was set to , s = 1, 2, 3.
Figures 6(a) and 6(b) show the top view of the trajectory of the entire swarm under two obstacle avoidance strategies. The swarm was divided into three groups, each playing different roles. The swarm departed from the starting point, then crossed obstacles, and finally caught up with UAV of the friendly side and formed an escort formation. Under the member-level obstacle avoidance strategy, the swarm can temporarily change the formation within the group to avoid obstacles, making the overall formation freer. Under the group-level obstacle avoidance strategy, the priority of the swarm was to maintain the formation within the group. Obstacle avoidance was completed by the group leader, and the formation within the group was well maintained.


In Figures 7–10, the curves under the member-level obstacle avoidance strategy are represented by solid lines (-), while the curves under the group-level obstacle avoidance strategy are represented by dashed lines (-- or -.).




From Figures 7 and 8, it can be seen that under the two obstacle avoidance strategies, dij_min = 1.28 m and . Therefore, dij(k) ≥ 2R and . Under the two obstacle avoidance strategies, the swarm meets the requirements of collision avoidance and obstacle avoidance.
Figures 9 and 10 show the formation and tracking error curves, respectively. Under the two obstacle avoidance strategies, the formation error of the entire swarm and the tracking error of the entire swarm converged to zero. Based on Figures 6–10, the grouping formation control algorithm under the two obstacle avoidance strategies proposed in this paper could complete the escort task in the obstacle environment.
Furthermore, the advantages and disadvantages of the two obstacle avoidance strategies were compared based on Figures 6, 9, and 10.
In terms of the formation maintenance performance, the results were as follows: (1) According to the formation error of the leader layer , the formation maintenance performance of the member-level obstacle avoidance strategy was better. Because the determination of the group leader’s safety radius in group-level obstacle avoidance strategy needs to consider the distribution of all group members, the leader’s maneuver underwent a greater change in terms of the formation shape when avoiding obstacles. (2) According to the formation error of the follower layer , the formation maintenance performance of the group-level obstacle avoidance strategy was better. The followers of each group took formation maintenance as the priority, and obstacle avoidance was completed by the group leader without changing the formation within the group. Thus, the formation maintenance performance was better. (3) According to the formation error of the entire swarm , the formation maintenance performance of the member-level obstacle avoidance strategy was better.
In terms of the tracking performance, the results were as follows: (1) According to the tracking error of the leader layer , the error curves under the two strategies were similar. (2) Regarding the tracking errors of the follower layer, when of member-level obstacle avoidance strategy (taking as the group reference trajectory) and of group-level obstacle avoidance strategy (taking pm(k) as the group reference trajectory) were compared, the tracking performance of the group-level obstacle avoidance strategy was better. But in the group-level obstacle avoidance strategy, the tracking delay was indeed a problem. (3) When the tracking errors of the follower layer were both unified as , the tracking performance under the member-level obstacle avoidance strategy was better. (4) According to the tracking error of the entire swarm , the tracking performance of the member-level obstacle avoidance strategy was better.
In general, the formation maintenance performance of the group-level obstacle avoidance strategy was better, and the tracking performance of the member-level obstacle avoidance strategy was better. The group-level obstacle avoidance strategy had a better tracking performance under the evaluation standard of the second type of tracking error of the follower layer, but there was a tracking delay problem.
Figure 11 shows the cost function curves under two obstacle avoidance strategies. The cost function curve of the leader layer (due to order of magnitude, this curve is not drawn in Figure 11(b), but this curve almost coincided under two strategies) decreased and tended to zero. Therefore, the two systems composed of leaders were asymptotically stable under two obstacle avoidance strategies.


Under the member-level obstacle avoidance strategy, the cost function curves – of the three groups in the follower layer decreased and tended to 0. Under the group-level obstacle avoidance strategy, after a delay of Nf · Ts = 0.6 s, the cost function curves – of the three groups in the follower layer also decreased and tended to 0 (the group-level obstacle avoidance strategy took the group leader trajectory pm(k) as the reference trajectory, so the order of magnitude of was relatively small). Therefore, the three systems composed of followers were asymptotically stable under two obstacle avoidance strategies. Furthermore, under two strategies, the entire swarm was asymptotically stable.
In summary, the grouping formation control algorithm under the two obstacle avoidance strategies proposed in this paper enabled the swarm to complete escort tasks in an obstacle environment and ensured the stability of the swarm system. The formation maintenance performance of the group-level obstacle avoidance strategy was better, and the tracking performance of the member-level obstacle avoidance strategy is better. The group-level obstacle avoidance strategy has better tracking performance under the evaluation standard of the second type of tracking error of the follower layer, but there is a tracking delay problem. Both obstacle avoidance strategies have their advantages and disadvantages, and different obstacle avoidance strategies can be chosen based on different needs.
5. Conclusions
In this paper, the GFC problem of UAV swarms in obstacle environments was studied. First, a grouping and layering control framework was established: the swarm was divided horizontally into several independent groups and vertically into a leader layer and a follower layer. Second, two obstacle avoidance strategies were proposed based on different priorities: member-level obstacle avoidance and group-level obstacle avoidance. Third, with the aim of avoiding dynamic obstacles, the synchronous DMPC and VO were combined to obtain the leader layer control law. On the basis of the leader layer control law, further considering the formation maintenance term, two control laws for the follower layer were given according to different obstacle avoidance strategies. The stability of the swarm under this control algorithm (including leader layer control law and follower layer control laws) was theoretically proved. Finally, through simulation, it can be concluded that (1) the designed single-layer control law can simultaneously avoid static and dynamic obstacles and had advantages in obstacle avoidance performance, formation speed, and tracking performance and (2) the designed grouping formation control algorithm could complete tasks in obstacle environments under both obstacle avoidance strategies. The formation maintenance performance of group-level obstacle avoidance strategy was better, while the tracking performance of member-level obstacle avoidance strategy was better. Both obstacle avoidance strategies had their own advantages and disadvantages, and different obstacle avoidance strategies can be selected according to different needs.
The algorithm proposed in this paper has good theoretical and practical value for solving problems such as large-scale formation, multitarget tracking and strike, formation escort, target encirclement, and saturation attack in obstacle environments.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
This work is supported by the National Natural Science Foundation of China (61903374).We thank LetPub (http://www.letpub.com/) for its linguistic assistance during the preparation of this manuscript.
Open Research
Data Availability
The data used to support the findings of this study are included within the article.