# Numerical Test of Several Controllers for Underactuated Underwater Vehicles
## 3 Short Description of Selected Algorithms
### Selected Trajectory Tracking Methods
If the disturbances are not taken into account, then the control action can be given, for the dynamic Equations (7)-(9), as follows:  
\[\mathbf{F}_{T}=-\mathbf{B}^{-1}\bigg{(}\mathbf{F}(m,d_{11},d_{22},d_{33},u,v,r, \mathbf{R},\tilde{\mathbf{p}}_{d},\delta_{x},J)+\mathbf{R}^{T}(k_{1}\mathbf{z }_{1}+k_{2}\mathbf{z}_{2})\bigg{)}, \tag{10}\]  
where:  
\[\mathbf{F}_{T}=[T\cos\psi,\ T\sin\psi]^{T},\ \ \mathbf{z}_{1}= \mathbf{p}-\mathbf{p}_{d}+\mathbf{R}\delta,\ \ \ \mathbf{z}_{2}=\dot{\mathbf{z}}_{1}=\mathbf{R}\mathbf{v}-\dot{\mathbf{p}}_{d}+ \mathbf{R}\mathbf{S}\delta r, \tag{11}\] \[\mathbf{B}=b_{T}\left[ \begin{array}{cc}m^{-1}&0\\ 0&m^{-1}-J^{-1}\delta_{x}a\end{array} \right],\ \mathbf{R}=\left[ \begin{array}{cc} \cos\psi&-\sin\psi\\ \sin\psi&\cos\psi\end{array} \right],\ \mathbf{S}=\left[ \begin{array}{cc}0&-1\\ 1&0\end{array} \right],\ \delta=\left[ \begin{array}{cc}\delta_{x}\\ 0\end{array} \right], \tag{12}\]  
and \(\mathbf{v}=[u\ \ \ v]^{T}\) is the linear velocity vector, \(\mathbf{e}_{1}=[1\ \ 0]^{T}\) whereas \(\mathbf{e}_{2}=[0\ \ 1]^{T}\) are the unit vectors. Additionally, the assumption that \(a\delta_{x}\
eq m^{-1}J\) is made. The control gains are \(k_{1},k_{2}\). It can be noted that the gains are very important for the quality of control although the change \(\delta_{x}\) allows correction of the input signals. Concluding, the method seems simple and selection of control gains almost obvious. The strategy was applied to a hovercraft both in simulation and in experiment. Comment. The controller has been used originally for an underactuated hovercraft which is equipped with the rudder. In this work, the algorithm serves as a tester for obtaining information about the dynamics of the vehicle and to show that under the assumed conditions the trajectory tracking task can be realized correctly. The angle changes are not taken into consideration if the vehicle moves. The information from the test includes the applied forces in both directions, the body velocities, and the errors convergence. The vector function \(\mathbf{F}\) contains elements of the dynamic model of the vehicle. As it can be seen from (10) and (11), not only the position \(\mathbf{z}_{1}\) and velocity errors \(\mathbf{z}_{2}\) depend on the gains but also on other terms. For this reason the end values of the errors may be not equal to zero. In spite of that the error convergence should be guaranteed. Controller 2 (SMC and backstepping) was proposed in [11]. The strategy in which the time-varying disturbances were present was applied to an underactuated underwater vehicle. In the proposed preliminary tests the disturbances are not taken into consideration. According to the original approach, the time derivatives of control signals are given as follows:  
\[\dot{t}_{u}=-c_{1}(\hat{F}_{1}+\tau_{u})-(\hat{F}_{1}+\dot{x}_{e}+m_{1}u_{e}) -k_{s1}\text{sgn}(S_{1})-w_{s1}S_{1}, \tag{13}\] \[\dot{\tau}_{r}=-c_{2}(\hat{F}_{3}+\tau_{r})-(\hat{F}_{3}+m_{3}r_{e }+m_{3}Q_{2})-k_{s2}\text{sgn}(S_{2})-w_{s2}S_{2}, \tag{14}\]  
where:  
\[\hat{F}_{1}=u_{e}+c_{1}S_{1},\ \ \hat{F}_{2}=\alpha_{ve},\ \ \hat{F}_{3}=r_{e}+c_{2}S_{2}, \tag{15}\] \[S_{1}=c_{1}u_{e}+m_{1}^{-1}(\hat{F}_{1}+\tau_{u}+x_{e}),\] (16) \[S_{2}=c_{2}r_{e}+m_{3}^{-1}(\hat{F}_{3}+\tau_{r})+Q_{2}. \tag{17}\]  
The adaptive laws \(\hat{F}_{1}\), \(\hat{F}_{2}\), \(\hat{F}_{3}\) are the time derivative of approximate value of the terms \(\hat{F}_{1}\), \(\hat{F}_{2}\), \(\hat{F}_{3}\) whereas \(S_{1}\), \(S_{2}\) mean the sliding manifolds. The uncertain terms which are approximated are expressed by: \(F_{1}=m_{2}vr-d_{11}u-m_{1}\dot{u}_{d}\), \(F_{2}=-m_{1}ur-d_{22}v\), \(F_{3}=(m_{1}-m_{2})uv-d_{33}r-m_{3}\dot{r}_{d}\).