## 3 DCPSO with Cooperation
### Distributed Cooperative Particle Swarm Optimization with Cooperation
#### 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 \(N\) new cooperative groups are formed. Each cooperative group \(i\) consists of the sub-swarm \(i\) 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 \(i\), check whether the particles of sub-swarm \(i\) 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 \(N\) representatives, find \(j\), which is the one that has the largest path length as the reference particle; its path length is seen as the reference path length \(L_{\text{ref}}\). To satisfy the simultaneous arrival constraint of multi-UAV formation, if the reference particle \(j\) does not belong to sub-swarm \(i\), namely \(i\
eq j\), the particles in sub-swarm \(i\) 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 \(i\) is denoted as follows:  
\[f_{i}\prime=1/(1/f_{i}+J_{i,\text{collision}}+J_{i,\text{dtime}}), \tag{14}\]  
where \(J_{i,\text{collision}}\) and \(J_{i,\text{dtime}}\) are the added penalty values, which can be expressed as:  
\[J_{i,\text{collision}}= \begin{cases}10^{5},&\text{collision}\\ 0,&\text{collision}-\text{free}\end{cases} , \tag{15}\]  
\[J_{i,\text{dtime}}= \begin{cases}100*|L_{i}-L_{\text{ref}}|^{2}\end{cases} , \quad i\
eq j\\ 0\;\;,\quad i=j\end{cases}, \tag{16}\]  
where \(L_{i}\) is the path length of any particle in subpopulation \(i\). 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 \(i\) and UAV \(j\), namely \(\mathbf{r}_{i}(q)\) and \(\mathbf{r}_{j}(q)\). Their safety radiuses are represented as \(R_{i}\) and \(R_{j}\), respectively. For simplicity, each PH path is discretized as \(N_{\text{ph}}\) 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 \(q\) 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).