Use of a nonlinear controller with dynamic couplings in gains for simulation test of an underwater vehicle model

The article considers a method of examining the influence of dynamic couplings contained in the underwater vehicle model on the movement of this vehicle. The method uses the inertia matrix decomposition and a velocity transformation if the fully actuated vehicle is described in the earth-frame representation. Based on transformed equations of motion, a controller including dynamic couplings in the gain matrices is designed. In the proposed method, the control algorithm is used for the test vehicle dynamics model taking into account disturbances. The approach is useful for simulating the model of an underwater vehicle and improving it, thus avoiding unnecessary experiments or planning them better. The procedure is shown for a full model of an underwater vehicle, and its usefulness is verified by simulation.


Introduction
Building a mathematical model of a submersible vehicle is quite a challenge because different aspects of the vehicle itself as well as the environmental impact must be taken into account. Moreover, the equations are strongly nonlinear what leads to their very complicated form. Problems related to modeling have been repeatedly considered in the literature. [1][2][3] The presented approach is limited to underwater vehicles for which all input signals are accessible. In many references, such model is considered. Examples of such marine systems can be found. [4][5][6][7][8][9] Many control algorithms are expressed in the earthfixed representation, as in the literature. [2][3][4]6,8,[10][11][12]14,15 Various types of sliding mode control (SMC) algorithms were considered, among others, in the literature. 6,8,11,13,[15][16][17] However, different tracking strategies are successfully applied, for example, based on backstepping technique, 18 gain scheduling control theory, 19 bio-inspired neurodynamics approach, 20 so-called RISE algorithm 10 or control approach using an observer, 21 adaptive recurrent neurofuzzy control, 22 neural network control, 23 and an output feedback control, which use a vehicle model. 24 In the current literature, more other control algorithms can be found, for example, combination of fuzzy logic, genetic algorithm, and SMC, 25 model predictive control, 26 a method in which the port-Hamiltonian theory is applied, 5 combination of recurrent neural network and receding horizon Institute of Automatic Control and Robotics, Poznan University of Technology, Poznan, Poland optimization, 27 combination of SMC and backstepping, 14 and backstepping active disturbance rejection control. 28 The problems discussed in this article concern the model-based algorithm in the earth-fixed representation and six degrees-of-freedom (6DOF) fully actuated vehicles. Such algorithms have been developed in the past many times. The comparison study among several controllers from many years ago is well known. 4 One of the controllers was realized in the earth-fixed frame. If the dynamic parameters are known exactly, there is no need to compensate them by restoring generalized forces. In a real situation, however, this is impractical, which is a disadvantage of this algorithm. In the literature, 8 an algorithm was proposed in which continuous input signal chattering effect is alleviated. The controller was robust to model uncertainties. However, rather rarely used closed-loop fractional-order system was considered and only Hölder disturbances were taken into account. The control scheme presented by Fischer et al. 10 was applied to compensate for uncertain, nonautonomous disturbances for a class of coupled, fully actuated underwater vehicles. The approach led to semiglobal asymptotic tracking. An important advantage was the experimental validation of the method in controlled and open-water environments. The disadvantage was larger orientation errors in the open-water test. Due to the lack of simulation tests, it is impossible to relate the results obtained during the experiment to the simulation results. An effective adaptive second-order fast nonsingular terminal SMC strategy for the trajectory tracking of fully actuated autonomous underwater vehicles (AUVs) was given in the literature. 13 The dynamic uncertainties and time-varying external disturbances were taken into account. Simulations for two vehicles were performed. However, the approach seems to be complicated and dynamic couplings in the tested model were not significant. Another solution was the computed-torque controller together with fuzzy inverse desired trajectory compensation technique using a robust adaptive fuzzy observer to control underwater vehicle subject to uncertainties described in the literature. 12 Various simulation cases were considered to show the benefits of the proposed control strategy. However, the dynamic couplings in the vehicle model used were not very strong. A combination of the SMC method with backstepping and nonlinear PD controllers was considered in the literature. 14 The control scheme was verified in a real experiment in various scenarios but some constant disturbances were applied only. Moreover, the most important problem was to introduce an observer to improve the performance of the backstepping technique and the PD controller. A chattering-free SMC for the trajectory control of remotely operated vehicles was introduced by Soylu et al. 15 The advantage was a replacement of the conventional, discontinuous switching term by an adaptive term. Additionally, the neural networks were used to solve the issue of faulty thrusters and thruster saturation limits. The influence of the vehicle dynamics on its movement was not analyzed. The control algorithms are designed primarily from the point of view of their efficiency and performance, robustness to parameter changes and disturbances, but without examining the influence of dynamic couplings. The performance of the proposed controllers is compared with the performance of other algorithms designed to achieve the same goal.
Remark. The subject of this work is the analysis of vehicle motion using a controller that contains dynamic parameters of this vehicle with dynamic couplings. The results of simulation tests are then compared with the results of the controller, which does not contain dynamic parameters or couplings in the gain matrices. The problem considered here concerns therefore the analysis of the effects of dynamic couplings and the influence of dynamics on the motion of the vehicle when its model is known. In this work, models from the literature 2,3 were selected, because they are often used and are very well suited for the application of velocity transformation and to show the advantages of the proposed method of analyzing the dynamics of underwater vehicles.
In this article, a procedure is presented to study the motion changes of an underwater vehicle using a trajectory tracking controller, which contains the dynamic parameters in gain matrices. This means that at the same time, not only the control task is carried out but also obtains information about the effects of the dynamic parameters on the behavior of the vehicle in motion. The proposed method consists of two stages: (1) designing a controller that contains the system parameter set in the gain matrices and (2) dynamics analysis based on a comparison of the tracking control algorithm with a reduced controller that does not contain dynamics in these matrices. To find a suitable control algorithm, the velocity transformation method described by Loduha and Ravani 29 was used, which consists in decomposition of the inertia matrix. Then, for the transformed motion equations, a control scheme for tracking a desired trajectory was proposed. This scheme is expressed in terms of generalized velocity components (GVCs) and it contains in the gain matrices the vehicle dynamics including couplings between variables. Simulation results obtained with the GVC controller are compared with the results of the classical (CL) algorithm, in which the control gain matrices do not depend on dynamical parameter set. An important value of this method is to estimate, by means of a simulation, the effect of the dynamics and couplings contained in the vehicle model on the behavior of the system based on the response from the GVC and CL controllers to track the desired trajectory. An additional advantage of the GVC controller is that its response, due to the dynamic parameters contained in the gain matrices, is closely related to the vehicle dynamics.
Compared with the literature, 30 this work is characterized by the following differences: (1) the decomposition method used here is different, and consequently, the analysis provides complementary results to the method given in the literature 30 ; (2) the physical interpretation of variables is easier because we use the same units both in equations expressed in terms of the GVC and in CL-based equations, which is the difference from the cited work; and (3) based only on the test proposed in the literature, 30 we obtain indirect information about the behavior of the vehicle (the decomposition method used here leads to obtaining of the GVC set, which corresponds to the method described in the literature 29 but in the vehicle external frame).
The remainder of this article is organized in the following way. The equations of motion in terms of the GVC for an underwater vehicle are presented in the second section. The third section shows the control algorithm and scheme of the dynamics test. Numerical simulations illustrating effectiveness of the approach are given in the fourth section. The fifth section contains conclusions.

Transformed equations using generalized velocity component
Modeling real underwater vehicles is difficult due to the system itself and the physical phenomena, including environmental disturbances, that occur. Therefore, the model is always only an approximation. Additionally, the equations of motion are highly nonlinear and many physical phenomena are only partially covered. There are various methods of modeling the dynamics of a system and analyzing its properties. Some of these methods may even lead to a deeper analysis of the behavior of the system. Problems concerning the modeling of marine vehicles have been considered in many works, among others in the literature. 1,[31][32][33][34] Since the aim of this article is to show usefulness of the equations of motion expressed in the GVC, the model should be general but also simplified enough to be suitable for the design of vehicle controller. In the proposed approach, the analysis of the dynamics and the influence of couplings are performed using the description in quasivelocities, which are obtained from the decomposition of the inertia matrix. The result of this transformation is the inclusion of dynamic parameters (mass, geometrical, etc.) into the controller gain matrix. Then, the information about the dynamic effects in the system is accessible. Moreover, the obtained equations are diagonalized, which enables the control of each quasi-variable separately. Therefore, the method proposed in this article enables the testing of vehicle dynamics together with the controller in terms of GVC. The equations of motion for marine vehicles which are considered, for example, in the literature, 2,3 are suitable for this purpose.
According to the literature, 2,3 the equations of a 6DOF underwater vehicle model in the earth-fixed representation ( Figure 1) has the form where h, _ h, and € h 2 R 6 are vectors describing position, velocity, and acceleration, respectively. The symbol M h ðhÞ ¼ J ÀT ðhÞMJ À1 ðhÞ 2 R 6Â6 means the inertia matrix, C h ðn; hÞ ¼ J ÀT ðhÞ½CðnÞ À MJ À1 ðhÞ _ J ðhÞJ À1 ðhÞ 2 R 6Â6 is the matrix of Coriolis and centrifugal effects, D h ðn; hÞ ¼ J ÀT ðhÞDðnÞJ À1 ðhÞ 2 R 6Â6 is the friction and hydrodynamic damping matrix, g h ðhÞ ¼ J ÀT ðhÞgðhÞ 2 R 6 is the vector of gravitational and buoyancy forces and torques,F h ¼ J ÀT ðhÞF 2 R 6 is the uncertainty vector including modeling uncertainty and unknown environmental disturbances, and t h ¼ J ÀT ðhÞt is the control force and torque vector. The position vector is h ¼ ½x; y; z; ; q; T , the vector 2 R 6Â6 is the transformation matrix describing the rotation and angular velocity transformation from the body frame to the inertial frame (usually the Earth) under the assumption that q 6 ¼ +90 . The symbols M 2 R 6Â6 , CðnÞ 2 R 6Â6 , DðnÞ 2 R 6Â6 , gðhÞ 2 R 6 ,F 2 R 6 , and t 2 R 6 represent the corresponding matrices and vectors expressed in the body-fixed frame.
Remark. In the method used to decompose the matrix M h (1), 30 it is necessary that the matrix be symmetric, positive definite, and that it contains only elements with constant values. From the literature, 2 the conclusion can be made that for a class of marine vehicle models, such approximation is allowable. When the vehicle moves, various external disturbances that occur which are are the difference between the actual and nominal value, whereas d h ðtÞ is a vector of the time-varying external disturbances. The actual values (with "*") are the sum of the nominal values and the uncertain values (with "~"). In the proposed method, elements of the vector are approximated by means of continuous and differentiable nonlinear functions. FunctionF h is defined in the literature as "lumped uncertainty." 13,16,27 The dynamic model of the underwater vehicle is inaccurate because it includes approximations of the hydrodynamic coefficients, modeling errors (also resulting from taking the inertia matrix with added mass as a symmetric matrix), and parameter perturbations. For underwater vehicles, sources of model inaccuracy are: (1) approximate values of its parameters, (2) neglected nonlinear phenomena, (3) omitted propulsion dynamics, and (4) partially known restoring forces (weight and buoyancy). Moreover, the causes of external disturbances are (1) environmental forces (ocean waves) and (2) hydrodynamic forces (added inertia, hydrodynamic damping). The elements contained in the functionF h follow from their prediction based on the designer's knowledge of the tested vehicle and expected disturbances for the operating conditions.
To obtain the transformed equations of motion, we introduce the vector x, which replaces the velocity vector _ h and calculates its time derivative where Z h is an upper triangular, invertible matrix with elements resulting from earlier decomposition of the matrix M h ðhÞ into three matrices The determined N h ðhÞ is a diagonal matrix. Assuming all disturbances vector using equation (3), the new equation of motion is derived in the following way. We take into consideration equation (5) and insert equation (4) into equation (1). Then, both sides of the resulting equation are multiplied by Z T h . After the components have been arranged, the new equation looks like this (using inversion of equation (4)) where the matrices and vectors are given as follows Equations (7) and (8) are expressed in quasi-velocities and relate to the motion of a 6DOF underwater vehicle. The diagonal matrix N h ðhÞ is the result of the matrix M h ðhÞ decomposition. The following relation follows from equations (2) and (8) The equations shown above are the basis for applying the proposed strategy of vehicle dynamics model evaluation.

Underwater vehicle dynamics model test scheme
The proposed method consists of two stages: (1) designing of a controller which contains the system parameters set in the gain matrices and (2) dynamics analysis based on a comparison between the selected control algorithm and a reduced controller that does not contain dynamics in these matrices. The second stage, which enables the dynamics study, is realized according to the proposed procedure shown in Figure 2.
In block Desired trajectory generator, the desired position and velocity trajectories are generated. Block Disturbances generator is used to generate functions describing all disturbances. In block Underwater vehicle model, the vehicle model is included and the signals in the form of forces and torques are converted into its current positions and velocities. In block Trajectory tracking controller and transformation subsystem, the set positions of the trajectory to be tracked and the set velocities are compared with the current positions and velocities. It also includes the controller and the variable transformation subsystem. The obtained signals are sent to Dynamics analysis subsystem used for their analysis and generation of results.

Controller
In this subsection, the control algorithm and the proposed dynamics analysis scheme are presented.
. This vector representing total thrust forces and torques is produced by a combination of the individual thrusters. 13,35 Because each thruster has a saturation limit, the values of the forces and torques are limited.
Comment. The problem of the boundedness of the lumped uncertainty vector was considered, for example, in the literature. 13 It was shown that taking into consideration equations (1) to (3), the bound can be described by Using the reasoning presented in the literature, 13 and in particular, the first four assumptions, and making use of the matrix Z h (6), we conclude bothF x and its time derivative vectors are bounded if the thrust forces are less than the thruster saturation limits. Such assumption concerning thrust force limit is made often, for example, in the literature. 17,28 Assumption 2. The following inequality is assumed The assumptions were made, for example, in the literature 15,16 and it was applied for underwater vehicle control.
Proposition. We assume the dynamics model (7) and expressions (8) and (4) together with the following control scheme where  x ;h T ; w T x T . Remark. The gain matrices k D , k P , G , and L can be taken as diagonal. After transformation, matrices k D and G are symmetric. The adaptive termf x is obtained by integrating the formula (23).
Proof. The systems (7), (8), and assuming the control algorithm (19) are described as follows Next, we define the proposed Lyapunov function candidate Determining the time derivative of the function L (25) and making use of equations (4) and (7) to (14), we get Applying equation (9), we calculate Next, we use equation (24) and insert equations (10) and (27) into equation (26). Taking into account the property s T ½ _ M h ðhÞ À 2C h ðn; hÞs ¼ 0 2 and equation (23), we obtain the following expression But, it is also Recalling that M h ðhÞ ¼ M T h ðhÞ > 0 2 and comparing equation (29) with equation (30), we conclude that As a result, the term in the second line of equation (28) is zero. Moreover, using equation (23), we have the relationships G ¼ G T and G G À1 ¼ I, where I is the identity matrix. Recalling equation (21), we get Note that, if Assumptions 1 and 2 hold, then it can be written as follows From the literature, 15 it arises that equation (32) does not guarantee that _ L ! 0 as t ! 1. Consequently, the system trajectories may not converge to the desired state in the finite time. One can solve this problem with the help of Barbalata's lemma, cf., in the literature. 36 The function L is lower bounded (L ! 0), whereas _ L is negative semidefinite (under Assumptions 1 and 2), it means that if _ L 0, then we get that L has a limit, for example, a non-negative constant e. Recalling Assumption 1 and equations (19) to (23), it can be seen that _ s x , _ w x , and F x are also limited. Therefore, s x is limited. On this basis, we conclude that the system trajectories converge locally to a bounded neighborhood assumed as e ¼F T x G À1 w x of the systems (7) and (8) together with the control algorithm (19). Hence, in turn, it follows that _ h;h ! 0 as t ! 1. Remark. For slowly moving vehicles, the vectorF x has small values. Additionally, after applying the adaptive term, values of the vector w x decrease. That is why the assumptions and conclusions seem to be reasonable.
Dynamics analysis scheme. The model analysis using the proposed controller is given in several steps.
Step 1. The GVC controller (19) is transformed to obtain the input signals. The signal from the proposed controller (19) is transformed into t h using (14). We select the matrices k D ¼ N k Ã D and G ¼ N G Ã , which means that the dynamics is present in these control gains. The matrix N is determined from decomposition of the matrix M. The set of matrices k D , k P , L, and G must guarantee acceptable error convergence. The matrices k Ã D and G Ã are selected as diagonal and serve rather for tuning because the vehicle dynamics is included into N. Inversion of equation (14) gives the input signal t h including K D ¼ Z ÀT h k D Z À1 h , which contains the vehicle dynamics. The estimation term h sðtÞdt is also dependent on dynamics. The matrix Z h gives an additional gain and it is related to dynamical couplings between the velocities.
Step 2. We compare the results obtained using equation (19) with the performance from the algorithm (called CL), which does not contain the dynamical couplings in the same form (for the same control gains, but without the matrix N and Z h ), namely The symbols mean: Step 3. Based on results using the GVC and CL controllers, the following time responses are analyzed: (1) the position errorsh, (2) the velocity errors _ h, (3) the control signals (the forces and torques) t h , and the lumped dynamics estimation errors w. As a result, we analyze the influence of dynamics on control process and identify variables, which are the most sensitive to changes of control gains.
Step 4. In the vector x, the dynamic parameters (i.e. masses and inertia) and the geometry of the system are present. The kinetic energy using the vector x is Each variable x i takes into account the energy of the velocities, which are coupled with the i'th variable. Moreover, the part of the kinetic energy for each variable can be determined, that is, Step 5. We determine the effect of dynamical coupling on velocities and input signals. Analyzing the time history of quasi-velocities x i , it is possible to determine speed effect of other velocities at the i'th velocity, that is, using the formula The quantity x i contains couplings coming from other velocities. Moreover, we are able to determine effects of couplings for the inputs using equation (14) p The dynamical couplings are present in the second term. We define the measures of couplings as follows Step 6. Analysis of the effects of vehicle dynamics and dynamic couplings on the basis of simulation results using GVC and CL controllers.

Simulation results
The goal of the simulations is to verify the proposed approach. The method is suitable both for testing models of known vehicles and those that are just being designed. It means that at the design stage, various models can be examined. The results obtained can then be used to change the design of the vehicle. Moreover, the same decomposition method is applied for the matrices M h and M.
Simulations were performed with MATLAB/simulink using ODE5 integration method and fixed step size D ¼ 0:01 s.

Main test-vehicle 1
Here, the used vehicle model and its parameters are based on the data from references. 37 The parameters of the vehicle model can be compared with the parameters of real underwater vehicles, for example, Cyclops 38 or a heavier BA-1 vehicle. 39 Due to design limitations, the control inputs were bounded t h i 2000 (forces i ¼ X ; Y ; Z (N) and applied torques i ¼ K; M; N (Nm)). For the vehicle with dynamic and geometric parameters adopted for simulation, four or six thrusters can be used, which will ensure appropriate values of forces and torques in the initial phase of motion. Based on the data of commercial thrusters for underwater vehicles, it can be assumed that it is possible.
The disturbance vector, in which all unknown dynamics and other the external disturbances are present, is given by the applied force and torque vector F h ¼ ½80 Á k 1 þ e À2:5 þ 50; 24 Á k 1 þ 0:3e À2:5 þ 15; 20 Á k 2 þ 60; 0:4 Á k 2 þ 1:2; where k 1 ¼ 0:7 Á cosð0:3 Á tÞ þ 0:3 Á sinð0:5 Á tÞ, k 2 ¼ 0:2Á e À1 Á sinðtÞ þ 0:5 Á cosðÀ0:3 Á tÞ, and k 3 ¼ 0:8 Á sinð0:2 Á tÞ þcosð0:6 Á tÞ. The selected GVC controller's gain matrices should guarantee the tracking error and the lumped uncertainty error time response (and convergence) avoiding great overshoot. Their values ought to be as small as possible but they must ensure acceptable errors convergence (k Ã D ; G Ã ought to be selected first). After some trials, the gains were chosen as follows For the CL controller, k D ¼ k Ã D and G ¼ G Ã because the vehicle dynamics is not included in gains of this algorithm. For the GVC algorithm, the matrix N is used additionally (according to step 1 in dynamic analysis scheme). It is determined from decomposition of the matrix M and its values are as follows: N ¼ diag f300.0,500.0,500.0, 40:0; 175:5; 141:1g. The elements of this matrix result from the dynamic and geometrical parameters of the vehicle. The matrix M was defined in explanation after equations (1) and (2). Besides, the constant values c X ¼ À140, c Y ¼ 30, c Z ¼ À50, c K ¼ 20, c M ¼ 20, and c N ¼ À10 iñ f x were applied. The constants were also assumed in the algorithm (equation (33)). The first goal is to show effectiveness of the GVC controller. But the second is to compare results obtained from GVC and CL control scheme to determine effects arising from the presence of couplings in vehicle's model.
Remark. The proposed method does not consist of searching for the best gains of the CL control algorithm because it can be done by adopting a different method of selecting gains. The essence of the problem is to find a set of gains for the GVC controller that guarantees acceptable error convergence results because the dynamic parameters of the vehicle are present in the gains. Then, for the CL controller, the matrices of gains without dynamic parameters are adopted, which makes the obtained results different. Based on these differences, the effect of dynamics on vehicle motion is evaluated.
Step 3. The tracking errors both for position and velocity obtained using the GVC control algorithm are shown in Figure 3. The analogous errors for the CL controller are depicted in x, _ y, _ z, _ q, and _ have great values and overshoot is clearly noticeable. We conclude from this that the influence of couplings on the behavior of the vehicle and the errors is significant. This effect can be explained both by large disturbances (F h X ,F h Z ,F h M ) and the use of dynamics in control gains.
The applied forces and torques in the earth-fixed frame Figure 5(a) and (b) and Figure 6(a) and (b). In the initial phase of movement, the time history of forces t h X , t h Y , t h X , t h Z and torques t h M , t h N are quite different for both controllers. For the CL algorithm, fluctuations are clearly observable. These changes which are related to the position and velocity errors and also to the quantity w h are given in Figure 5       Step 4. Evaluation of the kinetic energy related to each GVC variable x i according to the proposed analysis is as follows. We calculate this energy for the vehicle from equation (34) and next for each component. For the tested case, we have the mean value K E ¼ 82:05 J. If we assume that value as 1, then we obtain dK E1 ¼ 0:70, dK E2 ¼ 0:03, dK E3 ¼ 0:27, dK E4 ¼ 0:00, dK E5 ¼ 0:00, and dK E6 ¼ 0:00. Thus, we see that the quantities x 1 and x 3 cause the greatest reduction in kinetic energy. It results from the desired tracking trajectory. Only a little of energy is reduced by x 2 (sway).
Step 5. The GVC controller (37) is used to determine the effect of the dynamical couplings. As it is observable from Figure 7(a), the velocity _ x is most deformed (Dx 1 ), whereas velocity _ z (Dx 3 ) is less deformed. This is related to the direction of motion of the vehicle. The greatest angular deformation is for velocity _ (Dx 4 ), as it is depicted in Figure 7(b). As shown in Figure 7(c) and (d), only t h Z (Dp 3 ), t h M (Dp 5 ), and t h N (Dp 6 ) change essentially. It also results first of all from the dynamic model (note that t hM has the greatest values- Figure 5(b)). Therefore, we conclude that both the desired trajectory and disturbance model are important for realization of the control task.
Step 6. Finally, the results of the simulation are discussed. The assumed tracking trajectory and the considered model effect of dynamics in the control gains were evaluated on the basis of conducted tests. Comparing the control algorithms GVC and CL, we have found that for the first one, the error convergence is fast. From the time history of errors, it is shown that y, z, q, and (and their time derivatives) are sensitive for dynamic changes if the vehicle moves. It turned out that if even q d ¼ 0, thenq and _ q tend to zero slowly with overshoot. Forces in all directions and torques about y and z axes are also sensitive for these changes (it concerns also lumped dynamics estimation errors). The above observation is due to the fact the control gains contain the parameters of the vehicle. Analysis of the dynamics (including the dynamical couplings) has shown that deformation of velocities is related to _ x, _ z, and _ q. It was possible thanks to Dx i time history. Observing Dp i , it turned out that the applied torque t h M (related to _ q) had great values. This phenomenon results from the presence of couplings in the object model (in this direction, the desired trajectory was zero). The kinetic energy is reduced mainly by x 1 and x 3 , and less by x 2 . performed.
In both examples, the same as previously, that is, equation (40) gain set was used.
As the working conditions of the controller were changed, the position and velocity errors were also different, as shown in Figure 9. This figure shows that the errors are close to zero after about 15 s, that is, in a slightly longer time than for the first desired trajectory. This is the result of changing the trajectory. Nevertheless, the controller performs the task correctly. Comparing Figure 5

Main test-vehicle 2 (ODIN)
The second tested vehicle was ODIN. Its parameters were assumed from the literature. 35 Due to design limitations, the control inputs were bounded t h i 250 (forces i ¼ X ; Y ; Z (N) and applied torques i ¼ K; M; N (Nm)).
Steps 1 and 2. The used desired trajectory was defined by equation (38) with initial points h 0 ¼ ½2; 2; 0; 0; 0:3; 0 T while the disturbance vector was 0:3 ÁF h (F h defined in equation (39)). After some trials, the following gain set was selected Step 3. The position and velocity tracking errors for the GVC control algorithm are shown in Figure 11 while for the CL controller in Figure 12. From Figure 11(a) to (d), it can be observed that all errors are close to zero after about 30 s. Such a result proves the correct action of the controller. On the contrary, the results obtained for the CL controller (Figures 12(a) to (d)) show that it is inefficient and does not work properly. As can be seen from Figure 13(a) to (d), the applied forces and torques for both controllers (GVC and CL) have acceptable values and a time history of movement duration.
Step 5. The GVC controller (37) is used to determine the dynamical couplings. As can be observed in Figure 13(a) and (b), linear velocity couplings are more than 10 times less than for vehicle 1, but angular velocity couplings have comparable values. The velocities _ x (Dx 1 ) and _ (Dx 4 ) are more deformed than others. From Figure 13(c) and (d), it can be seen that there is no coupling effect for the applied forces, while for the applied torques, this effect is much smaller than for vehicle 1. Step 6. For the used tracking trajectory and the ODIN model, effects of dynamics in the control gains were evaluated. The GVC controller, which contained the dynamic parameters of the vehicle in gains, performed the task of tracking the desired trajectory correctly. On the contrary, the CL controller that did not contain the dynamic parameters in the gain matrices failed to perform the same task. The GVC controller gains were selected according to the ODIN vehicle dynamics, but their values proved insufficient to provide acceptable results for the CL controller. The analysis of the dynamics together with the dynamical couplings has shown that deformation of velocities is related to _ x, _ y, _ q, and _ . Moreover, the applied torques t h K and t h N are significantly deformed, and therefore, the corresponding gain values in the CL controller are too small. The _ x and _ velocity deformations are also indicated by Dx 1 and Dx 4 results obtained from the GVC controller. Great values of Dp 5 indicate that the applied torque t h M is the most deformed due to dynamic couplings.

Discussion of results
In the simulations, the procedure of testing the effects of vehicle dynamics on trajectory tracking was verified. Two models of underwater vehicles with clearly different dynamics and couplings were used for the test. As shown in the literature, dynamic couplings for vehicle 1 37 are significant while for vehicle ODIN 35 are very weak. The advantage of the GVC controller is that its gain matrices contain the vehicle's dynamic parameters together with the dynamic couplings. As a result, the set of these gains is consistent with the vehicle dynamics and the position and velocity errors are adjusted according to the vehicle dynamics. This allows to obtain sometimes better results than for a classical controller, where even if the gains are selected correctly, they are not directly related to the vehicle dynamics. It turned out that another important advantage of the GVC controller is that it can detect the effect of vehicle dynamics and dynamic couplings when the vehicle is in motion.  Figures 5 and 6. More detailed information about the deformation of velocities and applied forces, and torques was obtained from Figure 7. Because in the case of vehicle 1, the dynamic couplings were significant and the k Ã D and G Ã gain values were high (40), the CL controller provided the tracking of the desired trajectory despite much worse results than for the GVC controller. The GVC controller has fulfilled its task using the same gain values even when changing the desired trajectory and disturbances function, as shown in Figures 8 to 10. It is noticed that the same set of gains used for different desired trajectories and disturbance modeling functions made it possible to obtain acceptable position and velocity tracking results. This can be explained by the fact that the gains contain the dynamic and geometrical parameters of the vehicle. Moreover, it was observed that the choice of the desired trajectory had a greater impact on the results than the change of the disturbance function for the same vehicle.
Vehicle 2-ODIN. The effect of vehicle dynamics and dynamic couplings for this vehicle is observed by comparing Figures 11 and 12. However, it turned out that omitting the vehicle's dynamic parameters in the CL controller caused it not to work properly and the results were unacceptable. On the contrary, when using the GVC controller, the task of trajectory tracking was done correctly. This phenomenon can be explained by the fact that the gain matrices k Ã D and G Ã (43) did not have sufficient values for the CL controller to work properly. In addition, for the ODIN vehicle, the dynamic couplings were weak, which could make it even more difficult to control the vehicle. For this vehicle, the inclusion of dynamics in the controller's gain matrices proved to be more important than the inclusion of minor couplings. However, the earlier use of the GVC controller has detected this situation. The applied forces and torques had acceptable values for both controllers, as shown in Figure 13. Information about the deformation of velocities, applied forces, and torques can be obtained from Figure 14. From this figure, it follows that for ODIN vehicle, dynamic couplings are particularly small for linear velocities, while there are noticeable coupling effects for angular velocities.

Conclusions
A method for simulating the effect of dynamics and dynamical couplings in the gain matrices of a trajectory tracking control algorithm with a disturbance model is presented in this work. The approach is applicable for fully actuated underwater vehicles what means that all input signals are available. It is composed of three tasks: transformation of equations of motion, design of controller in the vehicle external frame, and its use for investigation of the vehicle dynamics. The procedure for the dynamics analysis is given in detail. Simulations conducted on two underwater vehicle models show possible use of the GVC controller (together with CL algorithm) for the dynamics and couplings evaluation. The method is primarily useful for testing the dynamics of the vehicle. The purpose of the test is to provide an insight into the dynamics, the couplings, and consequences arising from the assumption of the vehicle model and the disturbance vector. If the results of the signals are very divergent for the GVC and the CL controller, this means that taking into account the dynamics of the vehicle together with the couplings in the controller's gains is important for its proper operation. In addition to showing the simulation results obtained for the basic test, the results of tests using a different desired trajectory than in the main test and for a different function describing the disturbances are also presented. In summary, based on the presented control algorithm, it is possible to estimate the effects of the coupling influence on the vehicle motion avoiding an experiment on a real object or at the stage of planning such an experiment. Sometimes, based on simulations, it can be decided whether an experiment is needed (if the results are unacceptable). When such a case occurs, it is necessary to change the model parameters. The obtained results can be next used for experiment planning. In the future, other vehicle models, disturbance models, and trajectories are planned for the dynamics study.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by Poznan University of Technology under grant no. 09/93/DSPB/0611.