## 4 Simulations and Discussion
### Straight-Line Trajectory Simulation  
The following straight-line trajectory was used in the simulation:  
\[\left\{ \begin{array}{ll}x_{d}=0.8t+1\\ y_{d}=0.5t+1\end{array} \right. \tag{43}\]  
Case 1 was without environment disturbances. Case 2 had constant environmental disturbances, where the following disturbances were chosen:  
\[\textbf{d}^{{}^{\prime}}_{1}=\left[d^{{}^{\prime}}_{11},d^{{}^{\prime}}_{12},d ^{{}^{\prime}}_{13}\right]=[5,2,3] \tag{44}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameter** & **Definition** & **Value** & **Unit** \\ \hline \(m\) & Mass of USV & 30.48 & kg \\ \(I_{z}\) & Moment of inertia & 3.45 & kg\(\cdot\)m\({}^{2}\) \\ \(X_{u}\) & Linear hydrodynamic damping coefficient & \(-8.8065\) & kg/s \\ \(Y_{v}\) & Linear hydrodynamic damping coefficient & \(-65.5457\) & kg/s \\ \(N_{r}\) & Linear hydrodynamic damping coefficient & \(-6.7352\) & kg/s \\ \(X_{ii}\) & Additional mass coefficient & \(-0.93\) & kg \\ \(Y_{v}\) & Additional mass coefficient & \(-35.5\) & kg \\ \(N_{r}\) & Additional mass coefficient & \(-35.5\) & kg\(\cdot\)m\({}^{2}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Hydrodynamic parameters of the REMUS AUV. Case 3 had time-varying environmental disturbances, where the following form of the disturbances was used:  
\[\textbf{d}^{{}^{\prime}}_{2}=\left[d^{\prime}{}_{21},d^{\prime}{}_{22},d^{\prime }{}_{23}\right]=\left[ \begin{array}{l}0.3\cos(0.1\pi t-\pi/3)\\ 0.4\cos(0.2\pi t-\pi/4)\\ 0.6\cos(0.3\pi t-\pi/6)\end{array} \right] \tag{45}\]  
The initial position of the USV was \(\eta=[0,0,0]\), the initial velocity was \(\textbf{V}=[0,0,0]\), the initial value of \(e_{u}\) was 0.5, and \(a_{x}=a_{y}=2\), \(a_{x}=a_{y}=0.5\). For the disturbance observer, the parameters \(\boldsymbol{\kappa}=\text{diag}[ \begin{array}{ccc}0.5&1&5\end{array} ]\times 0.005\) and \(\textbf{Q}=\left[ \begin{array}{ccc}0.0097&0.0103&0.0148\end{array} \right]\) were chosen. The parameters used to design the NTSM controller based on Equations (37) and (42) are listed in Table 2.  
Figure 2a shows the straight-line trajectory curve of the underactuated USV without any disturbances, with steady disturbances \(\textbf{d}^{{}^{\prime}}_{1}\), and with time-varying disturbances \(\textbf{d}^{{}^{\prime}}_{2}\). The solid line is the reference trajectory curve, and the three dotted lines are the actual trajectory curves of the USV under different conditions. From the figure, it can be seen that with the control strategy proposed in this paper, the USV is able to overcome the influence of external environmental disturbances and track a straight trajectory in three different cases. Figure 2b represents the curves of the USV in the \(AXY\) plane, the surge (\(X-\)axis direction), and the sway (\(Y-\)axis direction) positions over time. It can better reflect the change of the trajectory over time. It can be seen from the figure that the USV tracks the reference trajectory in a very short period of time and maintains stable tracking at all times. Since the USV is underactuated and has no thrusters in the sway direction, it can be seen from the figure that it takes more time to track the reference curve in the \(Y-\)axis direction than in the \(X-\)axis direction. Figure 3 shows the observed curves and the observed error curves of the nonlinear perturbation observer for two different environmental perturbations \(\textbf{d}^{{}^{\prime}}_{1}\) and \(\textbf{d}^{{}^{\prime}}_{2}\). It can clearly be seen in Figure 3a,b that the disturbance observer is able to quickly approximate the external unknown environmental disturbances. Figure 3c,d show the errors between the actual disturbances and the observed values, showing that the designed disturbance observer for both the constant disturbances and the time-varying external environmental disturbances is able to estimate the actual disturbance values quickly and accurately.