# Numerical Test of Several Controllers for Underactuated Underwater Vehicles
## 3 Short Description of Selected Algorithms
### Selected Trajectory Tracking Methods
Although the meaning of the parameters \(l_{x}\), \(l_{y}\), and the gains \(k_{x}\), \(k_{y}\) has been clarified in [17], their choice is neither easy nor evident. It is because they are present in (22), in the term \(\Gamma\) (24), and also in the sliding surfaces \(S_{1}\), \(S_{2}\) (26). The parameters \(\lambda_{1}\), \(\lambda_{2}\), \(\lambda_{3}\) affect not only \(S_{1}\), \(S_{2}\) but also \(e_{u}\) (20) and \(e_{v}\)\(\dot{e}_{v}\) (21). Hence, their selection may prove to be difficult. Despite the difficulties noted here, the controller was successfully validated in simulation for various trajectories but for one model of an underwater vehicle only. The algorithm is robust if the bounded disturbances occur, therefore, it should be more useful in the absence of such disturbances as in the test proposed in this work. Controller 4 (TSMC) was introduced in [18]. This control scheme can be applied for the lateral motion of underactuated underwater vehicles. It belongs to the class called terminal sliding mode controllers (TSMC). The surge and yaw control laws are given in the following form:  
\[\tau_{u} =-d_{u}u-m_{2}vr+m_{1}\Big{(}\dot{u}_{d}-\beta_{1}\frac{q_{1}}{p_{ 1}}e_{u}(\tilde{e}_{u})^{\frac{q_{1}}{p_{1}}-1}-W_{1}\text{sgn}(S_{1})\Big{)}, \tag{27}\] \[\tau_{r} =-d_{r}r-(m_{1}-m_{2})uv\] \[+\frac{m_{3}}{(-\frac{m_{1}}{m_{2}}u+u_{d})}\Big{(}m_{2}^{-1}(-d_ {r}\dot{v}+m_{1}\dot{u}r)+\Gamma-\beta_{2}\frac{q_{2}}{p_{2}}e_{v}(e_{v})^{ \frac{q_{2}}{p_{2}}-1}-W_{2}\text{sgn}(S_{2})\Big{)}. \tag{28}\]  
The quantity \(\Gamma\) is defined in (24), the expressions \(\text{Y}_{1}\), \(\text{Y}_{2}\) in (25), and the desired velocities \(u_{d}\), \(v_{d}\) in (22). The sliding surfaces are described as follows:  
\[S_{1}=e_{u}+\beta_{1}(\tilde{e}_{u})^{q_{1}/p_{1}},\ \ S_{2}=\dot{e}_{v}+\beta_{2 }(e_{v})^{q_{2}/p_{2}}. \tag{29}\]  
Moreover, the used quantities mean: \(x_{e}=x-x_{d}\), \(y_{e}=y-y_{d}\) are the position errors, \(e_{u}=u-u_{d}\), \(e_{v}=v-v_{d}\) are the velocity errors, and \(\tilde{e}_{u}\) is the velocity error integral. In [18] the authors proposed to replace \(\text{sgn}(S)\) by a saturation function \(\text{sat}(S)\) to avoid chattering. The symbols \(\beta_{1}\), \(\beta_{2}\) mean some positive constants whereas \(q_{1}/p_{1}\), \(q_{2}/p_{2}\) are positive odd integers. The design parameters are: \(l_{x}\), \(l_{y}\), \(k_{x}\), \(k_{y}\), \(\beta_{1}\), \(\beta_{2}\), \(q_{1}/p_{1}\), \(q_{2}/p_{2}\), \(W_{1}\), \(W_{2}\). Comment. The controller may seem similar to SMC, but this similarity is apparent because of the completely different concept of the sliding surfaces. Some difficulties may concern the choice of parameters \(l_{x}\), \(l_{y}\), \(k_{x}\), \(k_{y}\). Despite this, the selection of gains \(\beta_{1}\), \(\beta_{2}\), \(W_{1}\), and \(W_{2}\) seems more obvious. It can also be expected that the correct setting of parameters \(q_{1}/p_{1}\) and \(q_{2}/p_{2}\) improves the quality of the tracking control. The algorithm was verified via simulation on a model of an underwater vehicle using linear and circular desired trajectories. In [18], the performance of the control method was tested. The problem of robustness to bounded disturbances defined by various functions was considered too. Based on satisfactory numerical results delivered in the original paper, it was decided to test this control algorithm. Controller 5 (FTSMC) was presented also in [18]. It is designed for underactuated underwater vehicles to perform the same task as the previous control algorithm. It is called the fast terminal sliding mode controller (FTSMC) and can be considered as an extension of the TSMC scheme.