## 2 Materials and Methods
### The Nonlinear Mathematical Model of the AUV's Dynamics
 \tag{8}\]  
The following simplifications were considered in the AUV simulation model:  
* The mass deviation moments corresponding to the respective axes of the movable coordinate system were omitted due to their insignificance to the simulation. * The \(C(v)\) matrix was omitted from the mathematical model due to its negligible numerical influence under the assumed operating conditions. The propulsion system imposes strict dynamic limits, with the maximum thrust along the surge axis constrained to 25 N and the maximum yaw moment limited to 2 Nm. As a result, the AUV operates at relatively low forward velocities, up to approximately 2 m/s. This limited yaw moment further restricts the vehicle's ability to perform aggressive turning maneuvers. These constraints ensure that the inertial effects represented by the \(C(v)\) matrix, such as the Coriolis and centripetal forces, remain minimal and do not significantly affect the simulated vehicle dynamics [60]. * Hydrodynamic damping components greater than 2 nd-order are omitted (the vehicle is operating at a low speed, the motion is not connected, and it has three planes of symmetry). Two reference frames are used to analyze the motion of the AUV. The first is a body-fixed moving reference frame, whose origin corresponds to the vehicle's center of gravity. The second is an inertial reference frame, which is fixed to the Earth. The position of the AUV in space is defined relative to the inertial reference frame, whereas the linear and angular velocities are described with respect to the body-fixed moving reference frame. The transformation of the vehicle's linear velocities from the body-fixed frame to the rate of change in its position coordinates in the inertial frame can be performed using the transformation matrix, as expressed in  
\[\dot{\eta}_{1}=J_{1}(\eta_{2}) \tag{9}\]  
where  
\(J_{1}(\eta_{2})\)--a transformation matrix dependent on the Euler angles, defined as  
\[J_{1}(\eta_{2})= \begin{bmatrix}\cos\psi\cos\phi&-\sin\psi\cos\phi+\cos\psi\sin \theta\sin\phi&\sin\psi\sin\phi+\cos\psi\sin\theta\cos\phi\\ \sin\psi\cos\theta&\cos\psi\cos\phi+\sin\psi\sin\theta\sin\phi&-\cos\psi\sin \phi+\sin\psi\sin\theta\cos\phi\\ -\sin\theta&\cos\theta\sin\phi&\cos\theta\cos\phi\end{bmatrix}  \tag{10}\]  
The inverse transformation is defined as  
\[v_{1}=J_{1}^{-1}(\eta_{2})\dot{\eta}_{1} \tag{11}\]  
It should be noted that the model does not account for external forces such as ocean currents or inaccuracies in the position estimation. The model utilizes PID controllers to regulate key motion parameters, including the longitudinal speed (\(u\)), depth (\(z\)), trim angle (\(\theta\)), and course angle (\(\psi\)). The PID controllers compute the required forces and moments \(\tau\) based on the difference between the setpoint value \(p_{s}\) and the current state of the vehicle. PID controllers were employed in this context to ensure uniformity across all tested planning methods and to decouple the evaluation of these methods from the complexities of motor-level control. This approach was intended to ensure that both classical and DRL-based planning strategies could be evaluated fairly, without being biased by the characteristics of the low-level controller. The modeled torpedo-like AUV can execute maneuvers to avoid obstacles by adjusting its depth, course, or forward speed. Since horizontal-plane maneuvers are most commonly used, this paper assumes that AUV control will be performed through course and speed adjustments. Employing a 6-DOF model of the AUV allows for an accurate representation of vehicle behavior in an underwater environment. In reinforcement learning, the agent learns from interactions with its environment; hence, using a realistic motion model ensures that the agent's experiences closely resemble those in the real world.