# Numerical Test of Several Controllers for Underactuated Underwater Vehicles
## 4 Comparative Simulation Test
### Performance of Controllers for Linear and Sine Trajectory
However, the applied control gains were different, namely:  
Figure 2:1  
As shown in Figure 1(b),\(d\), the trajectory tracking task is realized for Kambara although some non-zero errors on the \(y\) axis are visible. The applied forces change during the motion of the vehicle (Figure 1(f)) but they have acceptable even very high values. For ROPOS, a satisfactory trajectory tracking result can be obtained as it is visible in Figure 2(b),\(d\). The position errors are bigger than for Kambara and they are greater after the vehicle starts. However, the applied forces change when the vehicle is moving as can be seen in Figure 2(f). It turned out that for SMC/backstepping (linear trajectory), the selection of control coefficients is very difficult due to the sensitivity of the parameters. After many unsuccessful attempts, it was decided to choose the following set of control gains:  
Figure 2:2 Figure 2:3  
From Figure 3(a),\(c\), it is noticeable that the algorithm is effective for Kambara although with significant position errors. The steady state is obtained after about 28 s. The force and the torque are not very great as is presented in Figure 3(e). For ROPOS, much worse results were obtained for position errors, as shown in Figure 4(a),\(c\). The applied force and torque values are still acceptable (Figure 4(e)) despite the fact that in the first phase of movement they have maximal limit values. However, it is difficult to deduce whether for the assumed operating conditions the controller is effective. SMC/backstepping (sine trajectory). It was noticed that similar problems arise as in the selection of gains for the linear trajectory. Finally, the following control gains set was assumed:  
Figure 2:4 Figure 2:5  
As can be seen from Figure 3(b),\(d\), tracking the sine trajectory for Kambara vehicle is inefficient despite the convergence of position errors because the errors are not close to zero. Maximum applied force and torque have acceptable values as shown in Figure 3(f). Comparing the obtained results for ROPOS, from Figure 5b,d, it is noticeable that the tracking task is also not realized correctly due to significant position error values. The force and torque change all the time during movement as it is observed in Figure 5f. For SMC (linear trajectory), it was impossible to obtain satisfactory results of the tracking trajectory. The controller's work is highly sensitive to parameter changes and depends on the integration method. After a long search for the right set of parameters, the following set of parameters was chosen:  
\((K)\)\(l_{x}=2.0,l_{y}=2.0,k_{x}=2.6,k_{y}=2.6,\lambda_{1}=2,\lambda_{2}=4,\lambda_{3}=6,k_{1}= 1.4,k_{2}=0.5,w_{1}=4,w_{2}=20\), \((R)\)\(l_{x}=3,l_{y}=3,k_{x}=1,k_{y}=1,\lambda_{1}=6,\lambda_{2}=12,\lambda_{3}=8,k_{1}= 0.05,k_{2}=0.05,w_{1}=0.9,w_{2}=0.9\). As shown in Figure 6a,c for Kambara, the control task is not realized because of great position errors and velocities oscillations. Moreover, because of the force and the torque changes (Figure 6e), the vehicle would be destroyed. For ROPOS, the tracking task is also not realized as it arises from Figure 7a,c,e. SMC (sine trajectory). Additionally in this case, problems such as for linear trajectory were encountered. After many attempts, the selected parameters set was as follows:  
\((K)\)\(l_{x}=2.0,l_{y}=2.0,k_{x}=2.4,k_{y}=2.4,\lambda_{1}=2,\lambda_{2}=4,\lambda_{3}=6,k_{1}= 1.4,k_{2}=0.5,w_{1}=4,w_{2}=20\), \((R)\)\(l_{x}=1.0,l_{y}=1.0,k_{x}=0.8,k_{y}=0.8,\lambda_{1}=7,\lambda_{2}=10,\lambda_{3}=8,k_{1}= 0.05,k_{2}=0.05\), \(w_{1}=0.9,w_{2}=0.9\). Figure 6a,d illustrate that for Kambara, realization of the tracking control task is ineffective. Figure 6f shows values of the force and the torque. The simulation results indicate that changing these values will destroy the vehicle and the task will not be completed anyway. The results obtained for ROPOS were also bad and unacceptable. The position error values were great (Figure 7b,d) and changes of the force and the torque may also damage the vehicle as it arises from Figure 7f.