## 4 Numerical Simulations and Analysis
### Avoidance of Static Obstacles on the Horizontal Plane
Throughout the simulation process, the parameters of the obstacles are intelligently configured based on insights gained from prior obstacle avoidance simulations. Notably, in Figure 7b, Obs. 2 is astutely positioned at the convergence point of the trajectories from Figure 7a. This deliberate arrangement is designed to challenge the AUV's obstacle avoidance prowess by creating an environment where it encounters multiple obstacles simultaneously. In Figure 7, the red ellipses represent the obstacles that need to be avoided, while the black curves represent the reference trajectory in the absence of obstacles. The magenta dash-dotted curves and blue dashed curves elegantly signify the AUV's avoidance of one obstacle and two obstacles, respectively. Meanwhile, the green dotted curves and the cyan dashed curve represent the AUV's impressive ability to avoid three obstacles, each with distinct values of \(dir\). These findings are a testament to the AUV's exceptional obstacle avoidance performance, with each subgraph showcasing its agility and precision in various challenging scenarios. Figure 8 illustrates the translational velocities \(u\) and \(v\), the rotational velocity \(r\), the Euler angle \(\psi\), and the input \(\boldsymbol{u}=\left[T,\delta\right]^{\text{T}}\) associated with each obstacle avoidance result. The key insights conveyed by the various curves, represented by distinct line types and colors in this figure, align with the interpretations presented in Figure 7.  
From the obstacle avoidance results of the two and three obstacles presented in Figure 7b,c, and the corresponding input data displayed in Figure 8, a clear pattern emerges. During the AUV obstacle avoidance task, the effective strategy revolves around setting the rudder angle to its maximum value as the AUV approaches an obstacle. This proactivemeasure ensures a safe distance is maintained from the obstacle during avoidance. Once the obstacle avoidance task is successfully accomplished, the AUV smoothly transitions back towards the reference trajectory in the absence of obstacles. Subsequently, it becomes apparent that different obstacle avoidance results can be achieved by adjusting the observation minimum distance \(dir\), as illustrated in Figure 7d. When \(dir\) is set to 3 m, the obstacle avoidance trajectory passes through Obs. 5 from the front. An in-depth analysis of this trajectory reveals a key behavior--the AUV endeavors to realign itself with the reference curve once it escapes the influence range of the first obstacle. This realignment is most notable between the second and third obstacles, where the AUV's path closely aligns with the black reference trajectory. However, due to the short distance between the first and second obstacles, the AUV chooses to maintain a safe  
Figure 8: The translational velocity \(\mathbf{u}\), \(\mathbf{v}\), rotational velocity \(\mathbf{r}\), Euler angle \(\mathbf{\psi}\), and input \(\mathbf{u}=[T,\delta]^{\text{T}}\) of each static obstacle avoidance result. Figure 7: Horizontal static obstacle avoidance. distance rather than immediately approach the reference trajectory to satisfy the obstacle avoidance requirements. On the other hand, when \(dir\) is adjusted to 3.5 m, while the AUV remains focused on the first obstacle, this extends over a more prolonged duration, allowing it to approach the reference trajectory with a lower yaw angle after successfully circumventing the obstacle. This observation is distinctly supported by Figure 8d, where the minimum value of \(\psi\) is 0.1556 rad between 10 and 20 s. As the AUV shifts its focus towards the second obstacle, the controller efficiently adjusts the AUV's trajectory based on its current state, enabling it to pass below Obs. 5 with precision. These findings serve as a testament to the versatility and adaptability of the proposed method. By strategically adjusting the observation minimum distance \(dir\), the AUV can navigate complex environments with agility and ensure the safe avoidance of obstacles while maintaining trajectory accuracy.