## 4 Numerical Simulations and Analysis
### Obstacle Avoidance in Three-Dimensional Space  
Given the paramount importance of precise and secure navigation in underwater environments, particularly in mission-critical tasks such as pipeline inspection, underwater construction, and environmental monitoring, the demand for three-dimensional obstacle avoidance capabilities becomes increasingly apparent. To further enhance the obstacle avoidance capabilities of underactuated AUVs powered by fins and rudders, this section aims to extend the investigation into the effectiveness of the proposed method in the realm of three-dimensional space. Navigating obstacles in three dimensions presents distinctive challenges and offers substantial real-world applications. By expanding the scope of our research to encompass three-dimensional scenarios, valuable insights can be gained into the AUV's ability to navigate complex underwater environments while avoiding obstacles. Furthermore, conducting research on three-dimensional obstacle avoidance is crucial for enhancing the safety and operational efficiency of autonomous underwater systems. Numerous critical underwater missions require precise and reliable navigation in three-dimensional space, such as the inspection of pipelines, underwater construction endeavors, and rigorous environmental monitoring. By enabling AUVs to autonomously navigate and avoid obstacles in three dimensions, the proposed method has the potential  
Figure 9: Horizontal dynamic obstacle avoidance. to significantly improve the success and accuracy of such missions, while concurrently curtailing the risk of collisions or harm to delicate underwater structures. In this study, we delve into the realm of three-dimensional space to scrutinize the efficacy of obstacle avoidance using an underactuated AUV outfitted with both fins \(\delta_{s}\) and rudders \(\delta_{r}\), and the input becomes \(\mathbf{u}=\left[T_{prop},\delta_{r},\delta_{s}\right]^{\mathrm{T}}\). The target coordinates to be reached are set as \(goal=[49,40,40]^{\mathrm{T}}\). The AUV's initial speed is prescribed as \(1.5\) m/s, and the input is initialized as \(\mathbf{u}_{0}=[0,0,0]^{\mathrm{T}}\). The sampling period is set as \(T=0.2\) s, and a prediction step of \(p=10\) is employed to forecast the AUV's forthcoming trajectory. The coordinate and scale parameters of obstacles are shown in Table 4. The first ternary array represents the coordinate of the obstacles in the spatial coordinate system, while the second array represents the scale in the \(x\), \(y\), and \(z\) directions. In order to guarantee the effectiveness and safety of the AUV's motion, the input constraints are modified as follows:  
\[ \begin{array}{l}\mathbf{u}_{min}=\left[0,-\frac{35\pi}{180},-\frac{30\pi}{180} \right]^{\mathrm{T}}\\ \mathbf{u}_{max}=\left[4.4,\frac{35\pi}{180},\frac{30\pi}{180}\right]^{\mathrm{T}} \end{array}  \tag{62}\] \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Figure 8a** & **Figure 8b** & **Figure 8c** & **Figure 8d** \\  & **(Position), (Scale)** & **(Position), (Scale)** & **(Position), (Scale)** & **(Position), (Scale)** \\ \hline \multirow{2}{*}{Obs. 1} & \((14,9,5,13.5)\) & \((14,9,5,9)\) & \((8.5,5,5)\) & \((8.5,5,5)\) \\  & \((1.1,1,1)\) & \((0.5,1,1)\) & \((1,1,1)\) & \((1,1,1)\) \\ \hline \multirow{2}{*}{Obs. 2} & \((39,35,35)\) & \((39,31,35)\) & \((43,38,38)\) & \((43,38,36)\) \\  & \((1,2,2)\) & \((1,2,2)\) & \((1,2,2)\) & \((1,2,2)\) \\ \hline \multirow{2}{*}{Obs. 3} & \((25,22,22)\) & \((25,22,22)\) & \((32,26,32)\) & \((32,26,28)\) \\  & \((2,2,3)\) & \((2,2,3)\) & \((2,2,2)\) & \((2,2,2)\) \\ \hline \multirow{2}{*}{Obs. 4} & \(\big{\backslash}\) & \(\big{\backslash}\) & \((20,12.5,18)\) & \((20,15,17)\) \\  & \(\big{\backslash}\) & \(\big{\backslash}\) & \((2,2,2)\) & \((2,2,3)\) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Coordinate and scale parameters of obstacles in 3D space.