# Nonlinear Trajectory Tracking Controller for Underwater Vehicles with Shifted Center of Mass Model
## 4 Numerical Simulations
### Algorithm Test with Weak Couplings
#### 4.2.2 Results for Algorithm without Couplings  
The control algorithm, which omitted couplings and was taken for comparison, was designated CL (short for classical algorithm). This control scheme is known from [22], but here the neurodynamic model is excluded, so it is closer to the concept of the same authors published in [42]. The purpose of the comparative tests is to point out differences in the performance of the control algorithm based on the inertia matrix model, which takes into account the shift of the center of mass. Since the proposed control scheme uses a combination of the backstepping technique and the adaptive integral SMC method, for comparison, a paper using the same control methods but with a diagonal inertia matrix model was selected. In this way, the effect of dynamic couplings on the controller's work and performance can be estimated. No other baseline was considered, which would have included a similar approach but with, for example, additional methods or components. _Linear trajectory_. In order to show the differences in the signals obtained from the QV and CL controllers, the same set of parameters was assumed as in (26). Figure 4 demonstrates analogous results to those in Figure 2. The goal here is to make signal changes visible when the control algorithm does not take into account weak dynamic couplings resulting from small center of mass shifts. From Figure 4a, it can be observed that the control algorithm is able to predict the correct signal. Figure 3: QV controller results, complex trajectory, and (27): (**a**) trajectories: \(p_{d}\)—desired, \(p\)—actual; (**b**) linear errors of position; (**c**) angular errors of position; (**d**) linear velocities; (**e**) angular velocities; (**f**) force and torque applied; (**g**) kinetic energy values; (**h**) errors of \(\Delta\zeta_{1},\Delta\zeta_{2},\Delta\zeta_{3}\). that not all linear positions are tracked accurately. The large tracking error \(z_{e}\) is due to the fact that there is no forcing signal acting on the variable \(z\). The high error values of the angular position \(\theta_{e}\) (shown in Figure 4b) can also be explained by the lack of forcing of the variable \(z\) because the error is due to the backward and forward pitches. The results in Figure 4c show that the torque \(\tau_{q}\) changes significantly as the vehicle moves. This proves that the controller is trying to reduce the variations caused by the dynamical couplings, but since they are constantly present, the values of this signal must also fluctuate. For linear trajectories and weak couplings, the settling time for linear position errors is about 50 s \((x_{e},y_{e})\), and for angular position errors, it is about 50 s \((\psi_{e})\). The errors of the other positions do not settle, which indicates that the control algorithm is not working properly. The aim of the next test was to obtain acceptable linear trajectory tracking. The set found was as follows:  
\[k_{x}=0.2,\ \ k_{\theta}=4.0,\ \ k_{\psi}=6.0,\ \ \lambda_{1}=0.3,\ \ \lambda_{2}=\lambda_{3}=0.5,\ \ \Gamma_{1}=1.0,\ \ \Gamma_{2}=\Gamma_{3}=0.5,\] \[\beta_{1}=5.0,\ \ \beta_{2}=\beta_{3}=10. \tag{28}\]  
The need to use larger gain values for the kinematic \(k_{\theta}=4.0,k_{\psi}=6.0\), and dynamic controller \(\lambda_{1},\lambda_{2},\lambda_{3},\Gamma_{1},\Gamma_{2},\Gamma_{3}\) is due to the fact that, when using similar values to the QV scheme, similar results will not be obtained. The reason for this is that the CL controller attempts to adapt its operation to the dynamic couplings in the system. It also means that assuming even 20 percent of the unknown knowledge of the model parameters is insufficient for the CL controller to work properly. Figure 5a shows that trajectory tracking is inaccurate and the duration of obtaining the end value increases. This is also confirmed in Figure 5b, and the reason for the inaccuracy is still the error value \(z_{e}\) (uncontrolled variable \(z\)). It may be observed that \(\theta_{e}\) has a larger end error than the QV controller (Figure 5c).