# Path Planning of Mobile Robots with an Improved Grey Wolf Optimizer and Dynamic Window Approach
## 6 Experiments Simulation and Analysis
### Dynamic Obstacle Avoidance Experiment  
To validate the dynamic obstacle avoidance capability of the PAGWO-IDWA algorithm, a red dynamic obstacle is introduced into the static map 1. The dynamic obstacle starts at (5, 4) and ends at (2, 2), while the mobile robot starts at (1, 1) and aims to reach (20, 20). Figure 10(a) shows the globally optimal path planned by PAGWO, which maintains the shortest distance from start to end and avoids static obstacles, providing a basis for subsequent local planning. In Figure 10(b), the robot starts from the initial position and moves along the global path toward the local goal point. Upon encountering the dynamic obstacle, it adjusts its direction to the right and accelerates to avoid it. After safely bypassing the obstacle, the robot decelerates and readjusts its angle to the left, resuming its movement toward the local goal point. Finally, as shown in Figure 10(c), the robot successfully reaches the endpoint, guided by the local goal points. To further validate the path planning capability of the PAGWO-IDWA algorithm in dynamic environments, this study introduces dynamic obstacles approaching from the side in simulation map 2. The dynamic obstacle's starting point is (6, 6) and the endpoint is (6, 1), while the mobile robot's starting point is (1, 1) and the endpoint is (30, 30). The dynamic obstacle avoidance process is shown in Figure 11. Figure 11(a) shows the optimal path found by the PAGWO algorithm in simulation map 2. In Figure 11(b), the mobile robot detects the  
Figure 11: Dynamic Obstacle Avoidance Experiment 1. (**a**) Global optimal path; (**b**) the robot is bypassing to the right; (**c**) the robot reaches the goal. Figure 10: Comparison experiment 2. (**a**) DWA; (**b**) PAGWO-IDWA. \begin{table}
\begin{tabular}{c c c} \hline \hline  & **GWO Path Length (m)** & **PAGWO-IDWA Path Length (m)** \\ \hline Comparison experiment 1 & Inf & 14.29 \\ Comparison experiment 2 & 34.52 & 27.25 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: PAGWO-IDWA and DWA comparison experiment. dynamic obstacle approaching from the side and stops to avoid the collision. In Figure 12c, after the dynamic obstacle leaves the robot's detection range and safety is confirmed, the robot continues toward the local target point. Finally, in Figure 12d, the robot returns to the global optimal path and successfully completes the path planning task. The experimental results show that in more complex map environments, when facing dynamic obstacles approaching from the side, the robot can safely stop during local planning, continue with the path planning task after the obstacle passes, and maintain stability of the path planning, which demonstrates the adaptive ability of PAGWO-IDWA. To further validate the generalization capability of PAGWO-IDWA, two dynamic obstacles are added to map 3. The first dynamic obstacle has start and end points at (7, 1) and (7, 5), respectively, while the second dynamic obstacle starts at (13, 9) and ends at (7, 4). The mobile robot starts at (1, 1) and ends at (30, 30). The experimental results are shown in Figure 13. In Figure 13a, the global optimal path planned by the PAGWO algorithm is presented, where the mobile robot safely avoids static obstacles and finds the shortest path. In Figure 13b, the robot approaches the first dynamic obstacle from the side and decelerates to avoid it. In Figure 13c, after confirming the obstacle has passed, the robot returns to the global path and continues forward. In Figure 13d, the robot encounters the second dynamic obstacle, and in Figure 13e, it adjusts its direction and safely avoids it. Finally, the trajectory in Figure 13f shows the robot successfully reaching the endpoint, avoiding two successive dynamic obstacles under the guidance of the PAGWO-IDWA algorithm, thus completing the complex dynamic path obstacle avoidance task. The experimental results demonstrate that PAGWO-IDWA efficiently avoids dynamic obstacles in complex environments, further validating the algorithm's generalization capability and practicality.