# Numerical Test of Several Controllers for Underactuated Underwater Vehicles
## 4 Comparative Simulation Test
### Performance of Controllers for Linear and Sine Trajectory
The selection of gains for TSMC (linear trajectory) was easier. It was decided to assume the following parameters:  
\((K)\)\(l_{x}=6.0,l_{y}=3.9,k_{x}=3.6,k_{y}=2.6,w_{1}=8,w_{2}=12,\beta_{1}=0.25,\beta_{2}=2.5,q_{1}=1,p_{1}=20\), \(q_{2}=5,p_{2}=7\), \((R)\)\(l_{x}=2.3,l_{y}=2.3,k_{x}=0.22,k_{y}=0.22,w_{1}=5,w_{2}=5,\beta_{1}=0.5,\beta_{2}=0.5,q_{1}= 1,p_{1}=2\), \(q_{2}=5,p_{2}=7\). For Kambara, as it results from Figure 8a,c, the control algorithm works quickly (in about 4 s the steady-state is achieved but it is not zero, namely \(-0.1\) m). The position error values are small (which is evident from Figure 8c), the force and the torque (given in Figure 8e) reach their final value in a short time. For ROPOS, reaching the steady state requires longer time as it can be seen in Figure 9a,c. Values of the position errors are close to zero after about 25 s. However, this may be due to the fact that this vehicle is much heavier than Kambara. The force and the torque values (Figure 9e) are acceptable so that the controller works well. TSMC (sine trajectory). For Kambara, the assumed set of parameters was \(l_{x}=5.7\), \(l_{y}=3.0\), \(k_{x}=3.4\), \(k_{y}=2.5\) (and the others were as for the linear trajectory). Similarly, for ROPOS the set of parameters was \(k_{x}=0.2\), \(k_{y}=0.2\) (and the others were as for the linear trajectory). Figure 8b,d show that tracking the sine trajectory for Kambara is possible but inaccurate due to the obtained end position error values. As can be seen from Figure 8f, in the initial phase of movement the force and the torque increase significantly but then decrease. However, their values are acceptable. Better effects of control can be obtained for ROPOS. The desired trajectory is tracked correctly (Figure 9b) and the steady state of the position errors is obtained after about 20 s what is presented in Figure 9d. The applied force and torque have acceptable values as illustrated Figure 9f. The difficulty of selecting parameters for FTSMC (linear trajectory) was similar to that of TSMC. Finally, it was assumed the set of parameters as follows:  
Figure 2:6 Figure 2:7 Figure 2:8 Figure 2:9  
For tests of TSMC and FTSMC, the values \(\bar{a}_{u}(0)=0.0001\) and \(\bar{e}_{v}(0)=0\) were applied. As can be seen in Figure 10a,c, for Kambara, the position error values are not close to zero but to a certain value (about 0.2 m). Therefore, trajectory tracking may be considered not accurate enough. The force and the torque shown in Figure 10e have acceptable values. For ROPOS, the controller works correctly as seen from Figure 11a,c and the steady state is achieved. The signals, representing the applied force and the torque, given in Figure 11e indicate that the controller has performed the task correctly. FTSMC (sine trajectory). Similarly to the linear trajectory, the same values of gains for vehicles Kambara and ROPOS were used here. As shown in Figure 10b,d, for Kambara, the trajectory is not tracked accurately despite the fact that the position error values tend to some end value but not close to zero (about 0.1 m). The force and torque given in Figure 10f are similar as for TSMC but without oscillation effect if the vehicle starts. For ROPOS, as it results from Figure 11b,d, the tracking task is realized correctly but after a slightly longer period of time than for TSMC (after about 30 s the steady state is achieved). The applied force and the torque, shown in Figure 11f have acceptable values.