## 2 Preliminaries
### Dynamics of Underwater Vehicles  
A detailed dynamic model of the underwater vehicle can be found in [26].  
The underwater motion equation in the body frame is given by:  
\[M\dot{v}+C(\
u)v+D(\
u)\
u+g(\eta)=\tau \tag{9}\]  
The inertia matrix has two parts:  
\[M=M_{RB}+M_{A}, \tag{10}\]  
and  
\[M_{RB}=\left[\begin{array}{cc}mI_{3\times 3}&-mS(r_{g})\\ mS(r_{g})&I_{0}\end{array}\right], \tag{11}\]  
The skew symmetric matrix \(S(r_{g})\) is given by  
\[S(r_{g})=\left[\begin{array}{ccc}0&-r_{g_{3}}&r_{g_{2}}\\ r_{g_{3}}&0&-r_{g_{1}}\\ -r_{g_{2}}&r_{g_{1}}&0\end{array}\right]. \tag{12}\]  
In addition,  
\[M_{A}=\left[\begin{array}{cccccc}X_{\dot{u}}&X_{\dot{v}}&X_{\dot{w}}&X_{\dot {p}}&X_{\dot{q}}&X_{\dot{r}}\\ Y_{\dot{u}}&Y_{\dot{v}}&Y_{\dot{w}}&Y_{\dot{p}}&Y_{\dot{q}}&Y_{\dot{r}}\\ Z_{\dot{u}}&Z_{\dot{v}}&Z_{\dot{w}}&Z_{\dot{p}}&Z_{\dot{q}}&Z_{\dot{r}}\\ K_{\dot{u}}&K_{\dot{v}}&K_{\dot{w}}&K_{\dot{p}}&K_{\dot{q}}&K_{\dot{r}}\\ M_{\dot{u}}&M_{\dot{v}}&M_{\dot{w}}&M_{\dot{p}}&M_{\dot{q}}&M_{\dot{r}}\\ N_{\dot{u}}&N_{\dot{v}}&N_{\dot{w}}&N_{\dot{p}}&N_{\dot{q}}&N_{\dot{r}}\end{array} \right], \tag{13}\]  
where, the torques and the linear forces applied on the underwater model are \(x_{\cdot}=\frac{\partial x}{\partial(\cdot)}\). \(X_{\cdot}\)\(Y_{\cdot}\)\(Z_{\cdot}\)\(K_{\cdot}\)\(M_{\cdot}\)\(N_{\cdot}\) For example, the hydrodynamic force in x-direction due to acceleration \(\dot{u}\) is represented by \(X_{\dot{u}}\), so the inertia matrix can be used to determine the Coriolis matrix by constructing it in terms of sub-matrices:  
\[M=\left[\begin{array}{cc}M_{11}&M_{12}\\ M_{21}&M_{22}\end{array}\right]. \tag{14}\]  
The Coriolis and damping matrices are thus given respectively by:  
\[C(\
u)=\left[\begin{array}{ccc}0_{3\times 3}&-S(M_{11}\
u_{1}+M_{12}\
u_{2} )\\ -S(M_{11}\
u_{1}+M_{12}\
u_{2})&-S(M_{21}\
u_{1}+M_{22}\
u_{2})\end{array} \right], \tag{15}\]  
\[D(\
u)=\left[\begin{array}{cccccc}|\
u_{1}|&0&0&0&0&0\\ 0&|\
u_{2}|&0&0&0&0\\ 0&0&|\
u_{3}|&0&0&0\\ 0&0&0&|\
u_{4}|&0&0\\ 0&0&0&0&|\
u_{5}|&0\\ 0&0&0&0&0&|\
u_{6}|\end{array}\right]. \tag{16}\]  
The underwater equation of motion in the Earth frame is given by:  
\[M_{e}(\eta)\dot{\eta}+C_{e}(\eta,\
u)\dot{\eta}+D_{e}(\
u,\eta)\dot{\eta}+g_{ e}(\eta)=\tau_{e}, \tag{17}\]where  
\[M_{e}(\eta)= R^{-T}(\eta)M(\eta)R^{-1}(\eta)\in\ \mathbb{R}^{6\times 6}\] \[C_{e}(\eta,\
u)= R^{-T}(\eta)[C(\eta,\
u)-M(\eta)R^{-1}(\eta)\hat{R}(\eta)]R^{-1}(\eta)\] \[C_{e}(\eta,\
u)\in\mathbb{R}^{6\times 6}\] \[D_{e}(\
u,\eta)= R^{-T}(\eta)D(\
u)R^{-1}(\eta)\in\ \mathbb{R}^{6\times 6}\] \[g_{e}(\eta)= R^{-T}(\eta)g(\eta)\in\ \mathbb{B}^{6}\] \[\tau_{e}= R^{-T}(\eta)\tau\in\ R^{6},\]  
and the transformation matrix \(R(\eta)\) is as follows  
\[R(\eta)=\left[\begin{array}{cc}R_{1_{3\times 3}}(\eta)&0_{3\times 3}\\ 0_{3\times 3}&R_{2_{3\times 3}}(\eta)\end{array}\right], \tag{18}\]  
with  
\[R_{1}(\eta)=\begin{bmatrix}C_{\phi}C_{\theta}&C_{\phi}S_{\psi}-C_{\phi}S_{ \phi}S_{\theta}&-S_{\phi}S_{\phi}-C_{\phi}C_{\phi}S_{\theta}\\ C_{\theta}S_{\phi}&-C_{\phi}C_{\phi}-S_{\phi}S_{\theta}S_{\theta}&C_{\phi}S_{ \phi}-C_{\phi}S_{\psi}S_{\theta}\\ -S_{\theta}&-C_{\theta}S_{\phi}&-C_{\phi}S_{\theta}\end{bmatrix}\]  
and  
\[R_{2}(\eta)=\left[\begin{array}{cc}0&-S_{\phi}/C_{\theta}&C_{\phi}/C_{\theta }\\ 0&-C_{\phi}&S_{\phi}\\ 1&-S_{\phi}S_{\theta}/C_{\theta}&-C_{\phi}S_{\theta}/C_{\theta}\end{array} \right].\]  
A detailed description of the underwater dynamic can be found in [26].