## 3 Four-Dimensional Dynamic Cooperative Path Planning Algorithm
### Dynamic Priority RRT* Algorithm
Therefore, when the number of UAVs is \(\delta\), the DPRRT\({}^{\star}\) algorithm (Algorithm 2) runs in time \(O(\delta n\log n)\). The proposed HAPF algorithm is improved from the APF algorithm. Assume that the worst iteration number of HAPF is \(n\), where \(n\rightarrow\infty\). In other words, after \(n\) steps expansion, HAPF reaches the target point. Then, HAPF can run in time \(O(n)\). **Corollary 1**. : \(4D\) _Dynamic Cooperative path planning algorithm runs in time \(O(\delta n\log n)\), where \(n\) is the number of samples and \(\delta\) is the number of UAVs._

## 4 Simulation Results and Discussion

In this section, we carried out a simulation on the 4D dynamic cooperative path planning algorithm of UAVs and compared the proposed algorithm's cooperative path planning layer and local anti-collision planning layer to relevant algorithms, respectively, thus proving the effectiveness, robustness, and high efficiency of the algorithm. ### Environments and Parameters

In the simulation of the proposed algorithm, we designed two types of simulated scenarios: the normal scenario (Scenario 1) and the complicated scenario (Scenario 2). For each UAV, we assume that they all have their own independent CPU computing units, which are able to achieve synchronous preplanning and local anti-collision planning. At the same time, each UAV has a completely reliable zero-delay communication unit, thus enabling the transmission and reception of path information. In addition, all UAVs in the two scenarios take off at the same time. 1. Normal Scenario (Scenario 1). In this scenario, we set up three UAVs with the same performance. All UAVs take off from different starting nodes at the same time and arrive at the same destination. Figure 2 shows the planning environment of the Normal Scenario, including radar, missiles, artifleies, no-fly towers, moving threats, and terrain threats based on elevation maps. Of these, moving threats are sudden unknown threats, and UAVs need to conduct dynamic cooperative path planning to avoid them during flight. See Table 1 for relevant parameters of general scenarios. \[r_{\text{min}}=\min\rho\big{(}\textbf{X}_{i},\textbf{X}_{j})j=1,\ldots K \tag{15}\]0 t = 0 s cooperative paths of UAVs, where (**a**) is the 3D view and (**b**) is the 2D view. 2. Complicated Scenario (Scenario 2). In this scenario, we set up five UAVs with the same performance. All UAVs take off from different starting nodes at the same time and arrive at the same goal. Figure 8 shows the planning environment of the Complicated Scenario, including radar, missiles, artifleries, no-fly towers, moving threats, and terrain threats based on elevation maps. Of these, sudden threats appear many times at different times, and their status is static or moving. In addition, a sudden threat group (simulating the possible local minimum traps in the local collision avoidance planning) is set in Scenario 2. See Table 2 for the relevant parameters of the Complicated Scenario. ### Scenario 1: Normal Scenario

In Scenario 1, the relevant parameters of the HAPF are set as follows: the attractive potential field coefficient is \(k_{att}\!=\!8\) and the repulsive potential field coefficient is \(k_{rep}\!=\!30\). The influence distance of obstacle threat is \(\rho_{o}=20\) m, the unit time step is \(t=0.01\) s, and the adjustment factor is \(n=0.7\). The maximum steering angle is \(\phi_{\max}=60^{\circ}\) and the maximum climbing/diving angle is \(\gamma_{\max}=35^{\circ}\). The generating node of the attractive potential field is the path node [157,296,50]. Figure 2 shows the 4D cooperative path (i.e., the generation path of the initial cooperative planning layer) when the UAV does not detect the moving threat. Figures 3-6 show the collision avoidance path of the UAV at different times after detecting the moving threat (i.e., the generation path of local collision avoidance planning layer). The 4D dynamic cooperative replanning path of the UAV is shown in Figure 7 (i.e., the generation path of the cooperative planning layer).