As addressed above, cooperative path-planning for multi-UAV formation rendezvous is mostly a complicated multi-objective optimization problem with many coupled constraints. The solutions of the problem are a collection of UAV paths and each UAV path is part of the solution set. The relationship between these two is similar to that between population and subpopulation in the co-evolutionary theory [
32]. Inspired by the co-evolutionary theory, cooperative co-evolutionary genetic algorithms (CCGA) have been applied in path-planning for multiple robots or UAVs [
33,
34]. However, the conventional CCGA has low search efficiency and may easily trap local optimum. The existing cooperative particle swarm optimization (CPSO) [
35,
36] can easily jump out of local optimum, but they lack effective cooperation between subpopulations and cannot be directly used for path-planning for multiple UAVs. To take full advantage of CPSO, a distributed cooperative particle swarm optimization (DCPSO) algorithm with cooperation is proposed.
3.1. Standard Particle Swarm Optimization (PSO)
Particle swarm optimization (PSO) is a population-based heuristic method. It was first proposed by Elberhart and Kennedy in 1995, who were inspired by the social behavior of bird flocks. The PSO algorithm is widely used in optimal scheduling [
37,
38], path-planning [
11,
23], big data digging [
39], and so on. PSO owns several evolutionary characteristics similar to genetic algorithms (GA), such as initialization with a population of random solutions and updating based on previous generations. However, PSO has fewer setting parameters, simpler implementation, and a faster convergence rate compared with GA.
A swarm of particles are randomly initialized in the PSO algorithm. Each particle has three properties, which are position, velocity, and fitness. Assuming a swarm of n particles in a
D-dimensional optimization problem, the velocity and position of particle
i are denoted as
and
, respectively. The fitness of particle
can be solved by the fitness function. The best solution of particle
found so far is represented as
, generally known as the personal best location and the best position found by all particles so far is denoted as
, known as the global best location. In each iteration, each particle’s velocity and position are updated using the following equation:
where
,
,
,
is the maximum generation number,
is the inertia weigh,
and
are acceleration coefficients which are typically set to
, and
and
are randomly generated within
, which are used to keep the diversity of the swarm. From Equation (8) we can see that the velocity updating term consists of three parts:
, which is the inherited velocity from previous generation, reflecting the particle’s memory property;
, which is the cognitive learning velocity from its history, attracting the particle to its historical best position; and
, which is the social learning velocity from the swarm history, attracting the particle to the historical best position of the swarm. Generally, for fear of a blind search, the velocity and position of each particle are limited to
and
.
3.2. Distributed Cooperative Particle Swarm Optimization with Cooperation
The PH path is adopted as the parameterized path of a UAV in this paper. According to the theory of the PH curve, a path is determined by the lengths of direction vectors, namely and , under certain poses at initial and final locations. So, the path-planning for UAV formation rendezvous means getting each UAV a pair of so that the corresponding PH path can meet those constraints (including safety requirements, kinematic constraints, cooperation requirements, and others) and the total cost of all paths reaches the minimum or second minimum.
Here, the possible solutions of
UAVs are regarded as
sub-swarms or subpopulations. A distributed cooperative particle swarm optimization (DCPSO) with cooperation mechanism is proposed to optimize the
PH paths cooperatively. The particles in each sub-swarm update their positions and velocities and finish their fitness computations independently, which is the same procession as the standard PSO. In order to achieve cooperation within UAVs, each sub-swarm communicates with the others to transmit their representative individuals, then
cooperative groups are formed. Then, in each new-forming group, fitness of particles in the current subpopulation is modified and the personal and group best locations are also modified. Therefore, particles in each sub-swarm will move to the optimal or suboptimal solutions with cooperation between UAVs. The flow chart of the DCPSO with cooperation is given in
Figure 2. It can be seen that information interaction between UAVs only happens in forming cooperative groups and fitness modification, which means the proposed algorithm has a distributed structure. To improve searching efficiency, an elite keeping strategy is adopted.
3.2.1. Algorithm Initialization
As addressed, each particle in sub-swarm denotes an alternative PH path of UAV , which is represented as . The particle’s velocity is represented as , , and , where is the sub-swarm’s size. According to the prescribed search space and velocity range , all particles’ positions and velocities can be assigned randomly. The particles’ initial fitness is calculated and cooperatively modified in a way that will be introduced in subsequent sections. The personal best locations and group best locations are also initialized.
3.2.2. Update of Velocities and Positions
According to the standard PSO algorithm, the velocity and position of particle can be updated with Equation (8) and Equation (9), respectively. What is more, the value of inertia weight plays an important role in creating a balance between global exploration and local exploitation. A large value for facilitates global exploration, which is useful in the initial stages of an optimization. However, a small value allows for better local searching, which is particularly useful in the later stages, as the swarm moves toward the neighborhood of the optimum.
In [
40], a value for
dynamically decreasing from 0.9 to 0.4 is recommended for better performance. Hence, a dynamically changed
is adopted in this paper, which is updated by the following equation:
where
,
, and
is the maximum number of iterations.
3.2.3. Fitness Function
In order to generate a flyable and safe PH path for UAV
with a short length and appropriate smoothness, the fitness function for UAV
is designed as:
where
is a user-defined weight parameter.
is the cost of fuel consumption, which is approximately proportional to the path length of UAV
. Here, let
, where path length
can be calculated by Equation (4).
is the cost of path smoothness, which can be described by the elastic energy of the PH path. Hence, let
, where the elastic energy
is calculated by Equation (7).
,
,
, and
are the penalty functions for avoiding the obstacles, no-fly zones, collisions with terrain, and meeting the maximum curvature and torsion constraints, respectively.
For simplicity, the PH path is discretized as
points. If all the discretized points do not collided with the obstacles or pass through the no-fly zones,
or
; otherwise, a large positive number (like
) is assigned to
or
. Similarly, if all the discretized points can avoid collision with the terrain,
; otherwise, a large positive number (like
) is assigned. If the curvature and torsion at all discretized points satisfy the maximum curvature and torsion constraints, the PH path is considered flyable and
; otherwise a large positive number is assigned, which can be formulized as:
where
and
are the maximum curvature and torsion, respectively.
In a 3-D environment, the terrain is simulated by following function:
where
are custom constants.
3.2.4. Cooperative Fitness Modification
For achieving the simultaneous arrival and collision avoidance between UAVs, a cooperation mechanism among all the sub-swarms is proposed as follows. After obtaining all the particles’ fitness, each sub-swarm has to offer a representative particle based on their fitness, then new cooperative groups are formed. Each cooperative group consists of the sub-swarm and all the representative particles. Generally, selecting the representative particle for a sub-swarm is very important; the current best particle or the historical best one is usually selected. In this paper, the group best location of each sub-swarm is selected as its representative particle.
Then, the particles in each cooperative group are required to modify their fitness according to all the representative particles. Namely, for cooperative group
, check whether the particles of sub-swarm
will collide with the representatives from other sub-swarms; if collision happens, a penalty term is added to the particle’s fitness. Meanwhile, among the
representatives, find
, which is the one that has the largest path length as the reference particle; its path length is seen as the reference path length
. To satisfy the simultaneous arrival constraint of multi-UAV formation, if the reference particle
does not belong to sub-swarm
, namely
, the particles in sub-swarm
are required to modify their fitness by adding a penalty term. The penalty term is directly proportional to the absolute difference between the path length of a current particle and the reference one. Thus, the larger length difference will obtain the larger penalty value. Therefore, the modified fitness function of particle
is denoted as follows:
where
and
are the added penalty values, which can be expressed as:
where
is the path length of any particle in subpopulation
.
Determining the collision between two UAVs by using the rotational properties of PH path is described in detail as follows. If there is no collision between two PH paths, the minimum separation distance between these two paths should be greater than the sum of the two UAVs’ safety radiuses at any moment.
Consider two PH paths of UAV
and UAV
, namely
and
. Their safety radiuses are represented as
and
, respectively. For simplicity, each PH path is discretized as
equidistant points. Because all UAVs fly at a same constant speed and arrive at the rendezvous point simultaneously, the distance between the two UAVs at any moment approximately equals the distance between the two equidistant points with the same number. Hence, the minimum separation distance between the two paths approximately equals the minimum distance between any two equidistant points with the same number. As shown in
Figure 3, the safety balls are centered on the equidistant points along each path. If the safety balls overlap at any equidistant points with the same number on each path, a collision could happen. According to the rotational properties of PH path, the path length can be calculated by the polynomial Equation (4). Hence, the corresponding path parameter
at any equidistant point along a PH path can be solved by the Newton–Raphson iterative method. The coordinates of each equidistant point are obtained by Equation (3). Supposing the coordinates of any equidistant points
of
and
are represented as
and
, and
. Therefore, the constraint of collision avoidance between any two UAVs can be written as:
where
is the minimum separation distance.
3.2.5. Cooperative Path-Planning with DCPSO
In conclusion, the formation rendezvous problem of multi-UAV based on DCPSO can be solved by the following steps:
Step 1. Initialize all sub-swarms:
(1) For the UAVs, the size of each sub-swarm is , is the maximum iteration number, and the current iteration is set to ;
(2) The velocities and positions of all the particles are initialized within the bounded search space and , respectively;
(3) Each particle’s fitness is calculated using Equation (11); the best particle in each sub-swarm is selected as its representative. Each particle’s fitness is modified cooperatively using Equation (14). Then, the initial personal and global best solutions are easy to obtain.
Step 2. The particles’ velocities and positions in each sub-swarm are updated using Equation (8) and Equation (9), which are limited within the prescribed search space and velocity range. Then, each particle’s fitness is calculated using Equation (11). To improve the searching efficiency of the DCPSO algorithm, an elite keeping method is used. In each sub-swarm, the best particle of the previous generation is used to replace the worst one in the current generation.
Step 3. The group best location of each sub-swarm is selected as the representative and cooperative groups are formed. Then, each particle’s fitness is modified in each cooperation group using Equation (14).
Step 4. For each sub-swarm i, compare every particle with the personal best location ; if the particle is better, let , .
Step 5. For each sub-swarm i, compare every particle with the group best location ; if the particle is better, let , .
Step 6. If , end the iteration and output the best solutions of each sub-swarm; otherwise, let and go back to Step 2.
3.2.6. Time Complexity Analysis and Remarks
The time complexity analysis on the proposed DCPSO algorithm with cooperation is given as follows:
(1) The time complexity of initialization of all sub-swarms is ;
(2) The time complexity of updating all particles’ velocities and positions is ;
(3) The time complexity of calculating fitness of particles is , where is the number of threats, including obstacles and no-fly zones;
(4) The time complexity of fitness modification for all particles is , where is the number of equidistant points of the discretized PH path;
(5) The time complexity of updating the personal best locations and group best locations is .
Hence, the total time complexity is:
Remark 1. According to the time complexity analysis, the fitness calculations and modifications of particles occupy the most computing time. This is because the safety detection is conducted in fitness calculation and modification, with the collision detection between UAVs in particular taking up a large portion of time. For collision checking between UAVs, coordinates of each equidistant point have to be solved by the Newton–Raphson iterative method, which is a complicated and time-consuming process.
Remark 2. It can be seen in Figure 2 that the algorithm proposed in this paper has a distributed structure. Therefore, it can be implemented in parallel on multiple computers for reducing the computing time. Remark 3. The length of paths produced will be closed to equal, but may not be exactly the same. The differences can be diminished by slightly increasing the parametersof the resulting paths which have the smaller lengths.
Remark 4. In view of the limited flexibility of a single PH path, only a few no-fly zones and obstacles are considered here. For complicated environments, a path of several PH curves connected one by one is more suitable.