## 2 Problem Formulation  
The model of the considered marine is presented in Figure 1.  
The North-East-Down (NED) frame is used. The position and the orientation of the vehicle, in the NED frame, is described by the vector \(\eta=[x,y,y]^{T}\). The velocities in the body frame are given by \(\
u=[u,v,r]^{T}\) (the surge velocity, the sway velocity, and the yaw rate, respectively). The vector \(V=[V_{x},V_{y},0]^{T}\) represents the ocean current in the NED frame. In the body frame, we have the ocean current \(v_{c}=R^{T}(\psi)\)\(V\) (\(R(\psi)\) is the rotation between the body frame and the inertial frame). The model of motion of an autonomous surface vehicle (ASV) or an autonomous underwater vehicle (AUV) that moves horizontally is given in the form as in [56; 65]:  
\[\dot{\eta}=R(\psi)v_{r}+V, \tag{1}\] \[M\dot{v}_{r}+C(v_{r})v_{r}+Dv_{r}=Bf, \tag{2}\]  
where \(M\) is the inertia matrix including the added mass, \(v_{r}=[u_{r},v_{r},r]^{T}=\
u-v_{c}\) represents the vector of relative velocities in the body frame (\(v_{c}\) is velocity of the ocean current velocity vector). Hence, the Coriolis matrix is denoted as \(C(v_{r})\). Moreover, \(f=[T_{u},T_{r}]^{T}\), where \(T_{u}\) is the thruster force and \(T_{r}\) is the rudder angle (in general applied torque). The matrices \(R(\psi),M,C(v_{r}),D,B\) have the form:  
Figure 1: Underwater vehicle model sketch. \[R(\psi)=\left[ \begin{array}{ccc}\cos\psi&-\sin\psi&0\\ \sin\psi&\cos\psi&0\\ 0&0&1\end{array} \right],\quad\quad M=\left[ \begin{array}{ccc}m_{11}&0&0\\ 0&m_{22}&m_{23}\\ 0&m_{23}&m_{33}\end{array} \right],\] \[C(\upsilon)=\left[ \begin{array}{ccc}0&0&c_{13}\\ 0&0&c_{23}\\ -c_{13}&-c_{23}&0\end{array} \right],\quad\quad D=\left[ \begin{array}{ccc}d_{ 11}&0&0\\ 0&d_{22}&d_{23}\\ 0&d_{32}&d_{33}\end{array} \right],\quad\quad B=\left[ \begin{array}{ccc}b_{ 11}&0\\ 0&b_{22}\\ 0&b_{32}\end{array} \right] \tag{3}\]  
where it is assumed that: \(m_{11}=m-X_{\dot{u}},\ m_{22}=m-Y_{\dot{v}},\ m_{23}=m_{32}=mx_{g}-Y_{\dot{t}}, \ m_{33}=J_{z}-N_{\dot{r}},\ c_{13}=-m_{22}v_{r}-m_{23}r,\ c_{23}=m_{11}u_{r}.\) The linear damping coefficients matrix \(D\) contains the constant elements \(d_{11}\), \(d_{22}\), \(d_{23}\), \(d_{32}\), and \(d_{33}\) only, whereas \(B\) means the actuator configuration matrix. Referring to [56], the equations replacing Equations (1) and (2) were of the form:  
\[\dot{x}=u_{r}\cos\psi-v_{r}\sin\psi+V_{x}, \tag{4}\] \[\dot{y}=u_{r}\sin\psi+v_{r}\cos\psi+V_{y},\] (5) \[\dot{w}=r,\] (6) \[\dot{u}_{r}=F_{u_{r}}(v_{r})+\tau_{u},\] (7) \[\dot{v}_{r}=X(u_{r})r+Y(u_{r})v_{r},\] (8) \[\dot{r}=F_{r}(u_{r},v_{r},r)+\tau_{r}. \tag{9}\]  
The quantities were explained in the cited reference. Next, the change of coordinates vector was defined as \(Q=[z_{1},z_{2},\xi_{1},\xi_{2},\xi_{3},\xi_{4}]^{\mathrm{T}}\). The new equations of motion had the form: \(\dot{z}_{1}=z_{2}\), \(\dot{z}_{2}=F_{z_{2}}(z_{1},\xi_{3},\xi_{4})+\tau_{r}\), \(\dot{\xi}_{1}=\xi_{3}-V_{x}\), \(\dot{\xi}_{2}=\xi_{4}-V_{y}\), and also:  
\[\left[ \begin{array}{c}\dot{\xi}_{3}\\ \dot{\xi}_{4}\end{array} \right]=\left[ \begin{array}{c}F_{\xi_{3}}(z_{1}, \xi_{3},\xi_{4})\\ F_{\xi_{4}}(z_{1},\xi_{3},\xi_{4})\end{array} \right]+\left[ \begin{array}{cc }\cos z_{1}&-l\sin z_{1}\\ \sin z_{1}&l\cos z_{1}\end{array} \right]\left[ \begin{array}{c}\tau_{u}\\ \tau_{r}\end{array} \right], \tag{10}\]  
where:  
\[\left[ \begin{array}{c}F_{\xi_{3}}(\cdot)\\ F_{\xi_{4}}(\cdot)\end{array} \right]=\left[ \begin{array}{cc}\cos\psi&-\sin \psi\\ \sin\psi&\cos\psi\end{array} \right]\left[ \begin{array}{c}F_{u_{r}}(\cdot)-v_{r }r-lr^{2}\\ u_{r}r+X(\cdot)r+Y(\cdot)v_{r}+F_{r}(\cdot)l\end{array} \right], \tag{11}\]  
and \(F_{z_{2}}(z_{1},\xi_{3},\xi_{4})\) was obtained from \(F_{r}(u_{r},v_{r},r)\) by using \(u_{r}=\xi_{3}\cos z_{1}+\xi_{4}\sin z_{1}\), \(v_{r}=-\xi_{3}\sin z_{1}+\xi_{4}\cos z_{1}-z_{2}l\), and \(r=z_{2}\). The change of input to linearize the external dynamics was as follows:  
\[\left[ \begin{array}{c}\tau_{u}\\ \tau_{r}\end{array} \right]=\left[