# Obstacle Avoidance in a Three-Dimensional Dynamic Environment Based on Fuzzy Dynamic Windows
## 4 Simulation Results
### Dynamic Obstacle Avoidance  
In space activities, multiple agents are sometimes required to complete tasks at the same time. For one agent, the other agents are regarded as dynamic obstacles. Each agent is equipped with sensors that can perceive the external environment around it. Therefore, for abnormal situations, if an agent is chasing the agent ahead, it can be perceived by the agent ahead. In this section, the agent can detect the location of other agents by sensors and calculate the distance between them [19; 33; 42]. When using DF_DWA, although the speed does not change much, it is not constant. Therefore, the safety distance between obstacles must be strictly ensured. In this paper, the current maximum window speed is used to calculate the braking distance (i.e., \(R_{\text{braking}}\)). (1) Two agents  
To further test the obstacle avoidance ability of the algorithm in a dynamic environment, we set up a scenario in which two agents move to each other and are obstacles to each other. As shown in Figure 12(a), the starting point of Agent 1 is (0,0,3). The goal point of Agent 1 is (8,0,5). The starting point of Agent 2 is (8,0,3). The goal point of Agent 2 is (0,0.7,5). It is observed from the test result that this situation is safe in that Agent 1 moves upward and Agent 2 moves downward when the separation of the two agents is short. The black dotted line is the predicted trajectory of Agent 2 to Agent 1. It can be seen from Figure 12(b) that the parameter \(\varepsilon_{spad}\) is set as a predominant weight when the two agents are far apart initially. As the two agents approach each other, the weight of the \(\varepsilon_{obstalac}\) gradually increases. When the agents reach the obstacle avoidance \begin{table}
\begin{tabular}{c c c} \hline \hline
**Method** & **Iteration Time** & **Minimum Distance (mm)** \\ \hline DWA & 179 & 0.28 \\ F\_DWA & 2230 & 0.35 \\ DF\_DWA & 289 & 0.4 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: The iteration time and minimum distance. Figure 13: (**a**) planning trajectory and (**b**) the changes in the weight of reward value during iterations in two dynamic obstacle avoidance scenarios. range, the weight of the \(\epsilon_{obstalac}\) exceeds 0.9. After escaping the threat posed by one another, the first task of each agent is to reach its goal. Therefore, \(\epsilon_{goal}\) gradually increases. When the goal is about to be reached, the weight of the agent speed should be decreased to prevent the agent from passing over the goal while traveling at an extremely high speed. (2) Four agents  
In the previous section, when two agents move towards each other, each agent has sufficient space for movement. However, when multiple agents fly close to each other, the space to avoid obstacles will be shrunk. To verify the obstacle avoidance ability of the agent in this situation, two scenarios are set up in this section: one is that four agents fly to four locations within the same plane that are close to each other (FFLSP), and the other is that four agents cross each other and fly to the designated locations (FFCL). In the FFLSP scenario, four agents fly to different positions at the same height to complete tasks similarly to formation or assembly. The starting point of Agent 1 is (0,2,0). The goal point of Agent 1 is (5,4,5). The starting point of Agent 2 is (0,0,0). The goal point of Agent 2 is (5,6,5). The starting point of Agent 3 is (4,2,0). The goal point of Agent 3 is (3,4,5). The starting point of Agent 4 is (4,0,0). The goal point of Agent 4 is (3,6,5). As shown in Figure 13(a), the agents safely reach their goal positions. Meanwhile, Figure 13(c) shows the minimum distance between agents, that is, the smallest value in the set of distances between each agent and other agents at the same moment during the flight. It can be seen that the minimum distance of Agent 1 and Agent 2 is similar before the 95 th iteration. This result shows that Agent 1 and Agent 2 are the main obstacles to each other.