Robust Position Control of an Over-actuated Underwater Vehicle under Model Uncertainties and Ocean Current Effects Using Dynamic Sliding Mode Surface and Optimal Allocation Control

Underwater vehicles (UVs) are subjected to various environmental disturbances due to ocean currents, propulsion systems, and un-modeled disturbances. In practice, it is very challenging to design a control system to maintain UVs stayed at the desired static position permanently under these conditions. Therefore, in this study, a nonlinear dynamics and robust positioning control of the over-actuated autonomous underwater vehicle (AUV) under the effects of ocean current and model uncertainties are presented. First, a motion equation of the over-actuated AUV under the effects of ocean current disturbances is established, and a trajectory generation of the over-actuated AUV heading angle is constructed based on the line of sight (LOS) algorithm. Second, a dynamic positioning (DP) control system based on motion control and an allocation control is proposed. For this, motion control of the over-actuated AUV based on the dynamic sliding mode control (DSMC) theory is adopted to improve the system robustness under the effects of the ocean current and model uncertainties. In addition, the stability of the system is proved based on Lyapunov criteria. Then, using the generalized forces generated from the motion control module, two different methods for optimal allocation control module: the least square (LS) method and quadratic programming (QP) method are developed to distribute a proper thrust to each thruster of the over-actuated AUV. Simulation studies are conducted to examine the effectiveness and robustness of the proposed DP controller. The results show that the proposed DP controller using the QP algorithm provides higher stability with smaller steady-state error and stronger robustness.


Introduction
The ocean covers approximately 70% of the Earth's surface and provides us many natural and mineral resources. Moreover, resources on land are being steadily depleted, and thus, exploring the resources in the ocean such as oil, gas, and minerals under the seabed has been increasingly focused in recent years. However, it is difficult to explore and investigate very wide underwater environments in usual ways using manned systems and human divers. As a result, the UVs, especially unmanned systems that can carry out difficult missions without risking human lives, become popular at the moment.
The UV is one of the intelligent motion platforms, which can navigate autonomously and safely in the real marine environment and complete many challenging tasks, especially for the navy and marine industries [15,16]. However, they are a high and coupled nonlinear system, which preserves model-uncertainties, time-varying dynamic model and are strongly affected by external disturbances such as the ocean current, wave, un-predicted underwater currents, and so on [17,18]. To handle the uncertainties and disturbances and improve the tracking performances of the UVs, many control techniques have been developed for UVs over the past few years. Among them are linear controllers [19,20], fuzzy logic control [21,22], SMC controllers [23,24], predictive control algorithms [25,26], and neural network control strategies [27], and so on.
In general, to perform a wider range of missions in the sea, the UVs are usually equipped with multiple thrusters. While it provides redundant thrusters for the UVs, this designed configuration makes the UVs face another challenging problem is that the solution to the thrust allocation problem is not unique. Therefore, the DP controller must resolve the thruster redundancy of the UV. The DP technologies play an important role in ocean research and various applications of mobile ocean robots. Moreover, the significant development of ocean robotics has extended the range of applications of DP control, which is mostly applied to unmanned underwater vehicles (UUVs) and unmanned surface vehicles (USVs). The DP control systems are used to control the linear position and heading angle of the marine vehicles against environmental disturbances using their thrusters. In recent decades, various DP control techniques have been proposed. These techniques include PID controller [28], adaptive control [29], SMC control [30], fuzzy control [31], neural network control [32], and so on. Although the above controllers are convenient to be implemented into the physical UVs due to their simple structure, they show less capacity to solve the thruster saturation problem in the DP control design. However, the thruster saturation phenomenon always occurs in practice because of the physical limitations of the propulsion system.
Evidently, the marine vehicles in the sea are affected by various forces and moments such as the waves, ocean currents, propulsion systems, and uncertainties model. Practically, due to the effects of the complex environmental disturbances, it is almost impossible to keep a UV stayed permanently at the desired static position and the desired heading angle. Motivated by the above challenging issues, this paper investigates a trajectory generation and position control for a hovering AUV with four horizontal and three vertical thrusters taking the effects of the model uncertainties and the ocean current into consideration. The DP controller, which consists of motion control and an allocation control strategy, is used to control the thrust of the seven thrusters to obtain an optimal adjustment of the linear position and the heading angle of the UV. First, the motion control in the DP system is designed using a DSMC law to suppress the external disturbances imposing on the AUV. Then, in order to handle the allocation control problem in the DP system, Sensors 2021, 21, 747 3 of 24 two candidate allocation controllers: the LS and QP method, are designed and compared. Finally, a numerical simulation is carried out to observe and analyze the effects of the ocean current on the motion of the AUV. In addition, to eliminate the ocean current effects on the AUV, the second simulation is implemented with the DP controllers using both suggested optimal allocation control strategies for evaluating the algorithm. The simulation results demonstrate that the QP method of the optimal allocation control module is the best solution in terms of offering a faster transient response and lower steady-state error.
This paper is constructed as follows: Section 2 formulates the kinematic and kinetic models of the AUV with the ocean current disturbances. Section 3 presents the trajectory generation of the heading angle of the AUV using the LOS guidance. Then, Section 4 describes the DP control system of the AUV, which consists of two cascade control modules: the motion control law and the allocation control module. In this section, the motion control is designed using a robust DSMC to eliminate the ocean current effects and the model uncertainties. In addition, two optimal algorithms for the allocation control module, i.e., the LM method and the QP method, are also proposed. Next, Section 5 provides some numerical simulation results and discussions using the established AUV model and the designed DP control system. Finally, Section 6 presents the conclusions of this paper.

Coordinate System
The modeling of the AUV involves the study of the kinematic and kinetic models. First, we provide the coordinate system of the AUV and definitions of its motion parameters to obtain the six-DOF nonlinear dynamics model of the AUV. The model description of the AUV is based on two reference coordinate systems, as shown in Figure 1.
This paper is constructed as follows: Section 2 formulates t models of the AUV with the ocean current disturbances. Section generation of the heading angle of the AUV using the LOS guid scribes the DP control system of the AUV, which consists of two c the motion control law and the allocation control module. In this trol is designed using a robust DSMC to eliminate the ocean curr uncertainties. In addition, two optimal algorithms for the alloca the LM method and the QP method, are also proposed. Next, numerical simulation results and discussions using the establish designed DP control system. Finally, Section 6 presents the concl

Coordinate System
The modeling of the AUV involves the study of the kinem First, we provide the coordinate system of the AUV and definiti eters to obtain the six-DOF nonlinear dynamics model of the AUV of the AUV is based on two reference coordinate systems, as sho

•
The body-fixed (BF) frame is attached to the center of gravit • The Earth-fixed (EF) frame system which can be taken as l case of the AUV moving at slow speed:  The Earth-fixed (EF) frame system which can be taken as linked to the Earth in the case of the AUV moving at slow speed: The AUV model that used in this paper is the hovering over-actuated type AUV with four horizontal thrusters and three vertical thrusters. The six-DOF equation of the motion is used whose state vectors are represented as [33]: T : denotes the linear positions and Euler angles vector of the AUV in the EF frame E − X E Y E Z E , describing the linear position η 1 = [x, y, z] T and the angular position η 2 = [φ, θ, ψ] T , where x, y, z are the linear position of the AUV while, φ, θ, and ψ are three Euler angles: roll, pitch and yaw, respectively.
T : represents the velocities vector in the BF frame B-XYZ, describing the linear velocity ν 1 = [u, v, w] T and the angular velocity v 2 = [p, q, r] T .

Kinematic Equations
Because we use two different coordinate systems in the AUV model, a coordinate transformation matrix is used to change the representation of the motion of the AUV from the BF frame to the EF frame or vice versa is needed. Thus, the kinematic equations for an AUV are given as: . .

Kinetic Equations
Generally, the motion of the AUV is presented as the six-DOF nonlinear equation. In this section, the nonlinear dynamic equation of the AUV, which expressed in the BF frame, can be formulated in matrix form [34] as: where, M: Inertial matrix; C(v): Coriolis and centripetal matrix; D(v): Damping matrix; G(η): Matrix of restoring force and moments; τ: Thruster forces and moments; τ d : External disturbance forces and moments.

Inertial Matrix
The inertial matrix is described as the sum of an inertial matrix of the AUV itself M RB and a hydrodynamic additional inertial matrix M A due to the inertial of the surrounding fluid.
where m denotes the mass of the AUV; x G , y G , and z G denote the mass center of the AUV, and I ij is the inertia tensor for each axis of subscripts.

Coriolis and Centripetal Matrix
The Coriolis and centripetal matrix are defined as the sum of a rigid-body Coriolis and centripetal matrix of the AUV C RB (v) and an added-mass Coriolis and centripetal matrix C A (v).
−I yz q − I xz p + I zz r I yz r + I xy p − I yy q I yz q + I xz p − I zz r 0 −I xz r − I xy q + I xx p −I yz r − I xy p + I yy q I xz r + I xy q − I xx p 0

Damping Matrix
The damping matrix of the AUV in the fluid D(v) ∈ R 6×6 , which consists of the force and the moment of the first and second-order of the velocities, can be represented as: The values of the damping matrix components are given from field tests.

Restoring Forces and Moments
By assuming that the center of the buoyancy of the AUV expressed in the BF frame is [x b , 0, z b ] T , the restoring forces and moments G(η) ∈ R 6×1 can be defined as: where W and B are the force of gravity and the force of buoyancy, respectively. Furthermore, all the hydrodynamic coefficients used in the above equations are given in Table 1.

Thruster Configuration Matrix
In this paper, an over-actuated AUV is used to define the thruster configuration matrix, as shown in Figure 2. It can be seen that the AUV uses four horizontal thrusters to control the surge, sway, and yaw motions of the AUV, while its three vertical thrusters are applied for heaving, pitching, and rolling motion. Moreover, we assume (x i , y i , z i ) i=1...7 is the center of the i-th thruster, and the angle between the longitudinal axis and the direction of the thruster force is α = 30 0 . trix, as shown in Figure 2. It can be seen that the AUV uses four horizontal thr control the surge, sway, and yaw motions of the AUV, while its three vertical are applied for heaving, pitching, and rolling motion. Moreover, we assume ( , i x is the center of the i-th thruster, and the angle between the longitudinal axis an rection of the thruster force is Since four horizontal thrusters are located at the bow and the stern part, the in the horizontal plane caused by these thrusters 1,2,3,4 i T = can be calculated as:  3  3  3   3  3  3  3  3  3  3   3 cos cos sin sin ( sin cos ) 0 0 0 Similar to the horizontal plane, the moment induced by three vertical 5 ,6 ,7 i T = can also be computed as:  Since four horizontal thrusters are located at the bow and the stern part, the moment in the horizontal plane caused by these thrusters T i=1,2,3,4 can be calculated as: Similar to the horizontal plane, the moment induced by three vertical thrusters T i=5,6,7 can also be computed as: As a result, the generalized forces and moments created by all thrusters can be expressed by: Alternatively, the thruster allocation can be conducted in the matrix form as: where cα is cos(α), sα is sin(α); U v , F and L are the vectors of the generalized forces and moments generated by the seven thrusters, the vector of the seven thruster forces, and the thruster configuration matrix, respectively.

Dynamic Model of the Over-actuated AUV Including Ocean Current Effects
The dynamic model of the AUV in Equation (5) is obtained without considering the ocean current effects. The influence of the ocean current on the motions of the AUV is significant; thus, it is necessary to analyze the response of the AUV to environmental disturbances. To observe the influence of the ocean currents on the AUV, some simplifications are first, made as:

•
As the AUV is a submerged object, the wave-induced currents are quite negligible; • The ocean current is slowly varying or constant, and its speed is bounded in the specified range; • The equations of the motions can be expressed in terms of the relative velocity between the AUV and the ocean currents.
Since the ocean current is a complex and irregular form, it is difficult to model and to consider its effects on the AUV. Based on the Gauss-Markov process [35], the ocean current velocity is modeled as: . where, in which W c ∈ R 3×1 is Gaussian white noise, and a ∈ R 3×3 > 0 is a suitable constant matrix, and ξ(t) ∈ R 3x1 is the variable vector of the ocean current model that has three components such as ocean current speed in the fluid frame V c (t), the angle of attack α(t), and the sideslip angle β(t). Now, the ocean current speed is bounded in the form as: Assuming that the fluid is irrotational, the six components of the ocean current speed vector in the EF frame is expressed as: where the linear components of the ocean current in the three axes of the EF frame can be defined as: Using the rotation transformation expressed in Equation (3), the ocean current speed in the BF frame is defined as: where, u B c , υ B c and w B c represent the ocean current speeds in the surge and sway, and heave motions of the AUV, respectively.
Consequently, the motion of the AUV can be described in term of the relative speed as: In this paper, the slowly varying ocean current is considered hence . v r ≈ 0. As a result, the dynamic equation motions of the AUV under the influence of the ocean current in the BF frame are:

Design the Heading Angle of the over-Actuated AUV Using Line of Sight Guidance
Due to the simple structure, light in computation, and easy implementation of the LOS algorithm, the LOS is currently applied more in autonomous navigation of marine vehicles [36,37]. Moreover, the working principle of the LOS method is to mimic the behavior of a helmsman, which drives the AUV towards a target point. Based on this, the AUV at any initial positions outside the desired route will converge and stay on the path. For these reasons, a modified LOS method is used in this paper to design the guidance system of the AUV. The desired heading angle of the AUV, which is used to define the yaw angle of the AUV, is not only related to the real-time position of the AUV but also the target waypoints. These waypoints have two components, x k and y k , given by the operator. The AUV supposes a tracking target on the tracking path and then follows along the connecting line between the AUV position and the virtual tracking target. Once the AUV arrives at the desired path, the heading deviation is slowly decreased, and the desired path can be precisely tracked.
According to Figure 3, the modified LOS position (X los (t), Y los (t)) and the desired yaw angle ψ d (t) of the AUV can be calculated as: where, ρ is the safety radius that is set to the center of each waypoint, (X k , Y k ) is the present waypoint, L pp is the length of the AUV; n is the positive value that combines with L pp to estimate the safety radius; (X r , Y r ) and (X d , Y d ) are two adjacent waypoints, in which one is the present waypoint or the actual position of the AUV that is estimated by global positioning system (GPS), and the other one is the desired waypoint. ψ(t) is the actual heading angle of the AUV measured by inertial measurement units (IMU) or compass sensor. (x los (t), y los (t)) is the virtual tracking waypoint. The vector connecting between this virtual tracking waypoint and the actual position of the AUV is the "line of sight". The angle between the "line of sight" and the north direction of the EF frame is the desired heading angle ψ d (t) for the heading control of the AUV is obtained by Equation (39).
one is the present waypoint or the actual position of the AUV that is estimat positioning system (GPS), and the other one is the desired waypoint. virtual tracking waypoint and the actual position of the AUV is the "line of sigh between the "line of sight" and the north direction of the EF frame is the desi angle for the heading control of the AUV is obtained by Equation (39).

Design of Dynamic Position Control for the Over-Actuated AUV
In this section, a DP control system has been used to the individual thrus environmental disturbance, for maintaining the position and the heading AUV. As can be observed in Figure 4, the entire proposed DP control is divid related parts, which are the motion control module and the allocation contro particular, the role of a motion control system that is designed by using a DSM generate the generalized control forces and moments. Meanwhile, the alloca

Design of Dynamic Position Control for the Over-Actuated AUV
In this section, a DP control system has been used to the individual thruster again the environmental disturbance, for maintaining the position and the heading angle of the AUV. As can be observed in Figure 4, the entire proposed DP control is divided into two related parts, which are the motion control module and the allocation control module. In particular, the role of a motion control system that is designed by using a DSMC law is to generate the generalized control forces and moments. Meanwhile, the allocation control module decides how to distribute these generalized forces and moments to each individual thruster and how to optimize the energy consumption. Both mentioned parts of the suggested DP control are presented in the following sections.

ER REVIEW 11 of 25
module decides how to distribute these generalized forces and moments to each individual thruster and how to optimize the energy consumption. Both mentioned parts of the suggested DP control are presented in the following sections.

Design of Motion Control for the over-Actuated AUV Using Dynamic Sliding Mode Controller
To overcome the effects of the ocean currents on the motions of the AUV, the robust DSMC is designed and presented in this section.
From Equation (36), the dynamics model of the AUV can be rewritten as: Let η, then the dynamics model of the AUV can be described as: .
Let x d = η d represents the desired variables of the AUV in Equation (41), and x d − x 2 are the tracking error and its first derivative, respectively. Using Equation (41), the second derivative of the tracking error, .. e, is expressed as: .. e = ..
In this work, the proportional-integral-derivative (PID) sliding surface function is proposed as: where K P , K I , K D > 0 correspond to the proportional, integral, and derivative gains, respectively. The derivative of the sliding surface, . s(t), is now obtained from Equation (43), as follows: .
Let σ(t) be a new dynamic sliding surface given by: where λ is a positive constant value. Obviously, if the value of σ = 0, then the system in Equation (45) Taking the first-order time derivative Equation (46) and combining the result with Equation (44) yields: .
Theorem 1. Let us assume that ∃ϑ, γ, K s ∈ R + are constant values and always satisfy the below expression: The dynamic sliding surface, σ(t), asymptotically converges to zero if the comprehensive control law, . u, is chosen as: . ..
where β is a positive value. (48) and (50), the derivative of the dynamic sliding surface, . σ(t), can be re-arranged as:

Proof of Theorem 1. From Equations
Consider the following Lyapunov function candidate: Differentiating Equation (52) and combining the result with Equation (51), one obtains: Using the condition in Equation (49), we have: As a result, the dynamic sliding surface, σ(t), asymptotically converges to zero according to the Lyapunov criterion. This proof is completed.
Hence, the proposed DSMC is designed as shown in Equation (50) with K s selected by Equation (49). By replacing the sign function with a saturating function expressed in Equation (55), the chattering problem in Equation (50) will be eliminated: Finally, the control law in Equation (50) now becomes: ..
where φ > 0 is the boundary layer thickness.

Design of Motion Control for the Over-actuated AUV Using Dynamic Sliding Mode Controller
In this section, general methods of modeling and solving the allocation control problems are presented. Once the generalized forces and moments are defined by using the motion control, the allocation control module distributes suitable thruster forces to all thrusters of the AUV. Two optimal allocation control methods are designed and examined so as to achieve the DP maneuvering: one approach is the LS method without considering the thruster constraint, the other approach is the QP that considered the allocation control as a constrained optimization problem. The advantages and disadvantages of both methods will be analyzed below.

Unconstrained Thrust Allocation Using Lagrange Multipliers
In this study, the AUV is installed with seven thrusters, and the thruster dynamics are ignored; therefore, the relationship between the vector of the thruster forces F and the vector of the generalized forces and moments U v can be expressed in the linear form as: As mentioned in Section 2.4, the thruster configuration L is not a square matrix, which implies that the solution of Equation (57) is not unique. A common solution of offsetting for thruster redundancy of the AUV is to use the LS method. Now, we can generate a least-squares cost function in the form as where W is a positive definite weighting matrix. The cost function in Equation (58) is considered as an energy consumption minimization problem.
To solve Equation (58), we choose the Lagrangian function as where λ denotes the Lagrange multiplier. By differentiating Equation (59) with respect to F, the Karush-Kuhn-Tucker (KKT) can be obtained: Using Equation (57), we have: Assuming that LW −1 L T is not singular, the optimal solution for the Lagrange multiplication is defined as: From Equation (60) and Equation (62), the vector F can be generated as follows:

Constrained Thruster Allocation Using Quadratic Programming
In the previous discussions, we considered the optimal allocation control problem without the thruster saturation constraints. In practice, this assumption that is applied to the allocation control problem cannot provide sufficiently accurate approximations. For this, various methods to perform the thrust allocation with a constrained nonlinear model have been proposed [38,39]. In this section, the allocation control is achieved by using a QP strategy, which relates the minimization of a quadratic cost function subject to both equality and inequality constraints.
The QP is one of the most popular powerful approaches to thrust allocation. In the framework of the optimization, the thrust allocation problem can be modeled as: subject to: where s is a slack variable and W and Q are the positive weighting parameter matrices of the thruster F and the slack variable s, respectively. Note that to obtain the feasible solution of the vector U v , the slack variables should be close to zero by selecting the weight parameter Q much larger value than the weight parameter W in most cases.
By setting the new variables z = (F T , s T ) T ∈ R k+n , and Equations (64) and (65) can be re-arranged as follows: Subject to All matrices K, A 1 , C 1 , A 2 , C 2 in Equations (66) and (67) can be obtained, respectively, as follows: As W and Q are the positive matrices, Equations (66) and (67) describe the convex QP, which indicates that the global solution of the optimal allocation control problem can be confirmed. With the advancement of computer technologies, the problem formulation can be solved using a QP solver or mathematical optimization software.

Simulation Results and Discussion
Because the dynamic model of an AUV in the presence of model uncertainties and ocean current disturbances is complex and unstable, it is challenging to simulate the behaviors of the AUV under the input of a new controller. In this section, the numerical simulations based on MATLAB/Simulink environments are performed to demonstrate the performance of the suggested controller, as shown in Figure 5. The crucial parameters of the simulated AUV system are shown in Tables 1 and 2, respectively. simulations based on MATLAB/Simulink environments are performed to demonstrate the performance of the suggested controller, as shown in Figure 5. The crucial parameters of the simulated AUV system are shown in Tables 1 and 2, respectively.
The following two simulations have been performed as:

Initial Values and Desired Trajectory
Initial position of the AUV m/degree The following two simulations have been performed as: • Simulation 1: The effects of the ocean currents on the AUV motions; • Simulation 2: The position stabilization control of the AUV in six-DOFs in the presence of the ocean currents and the model uncertainties.

Simulate the Effects of Ocean Currents on the over-Actuated AUV
Because the ocean currents have significant effects on the tracking performance of AUV, it is necessary to consider it when modeling and designing new controllers for AUV. Unfortunately, the real ocean current model is very complex and therefore, it is difficult to model the exact real ocean current in a simulation environment. In this paper, we assume that the ocean current is irrational and varies very slowly with respect to time, as discussed in Section 2.5. Particularly, using the first Gauss-Markov process, the ocean current can be modeled in 3D Cartesian space with an average speed (V c ), and two orientation angles, i.e., the angle of attack (β c ), and the sideslip angle (α c ) in the EF frame as shown in Figure 6b.

Simulate the Effects of Ocean Currents on the over-Actuated AUV
Because the ocean currents have significant effects on the tracking performanc AUV, it is necessary to consider it when modeling and designing new controllers for A Unfortunately, the real ocean current model is very complex and therefore, it is diffi to model the exact real ocean current in a simulation environment. In this paper, we sume that the ocean current is irrational and varies very slowly with respect to time discussed in Section 2.5. Particularly, using the first Gauss-Markov process, the oc current can be modeled in 3D Cartesian space with an average speed ( c V ), and two entation angles, i.e., the angle of attack ( c β ), and the sideslip angle ( c α ) in the EF fr as shown in Figure 6b. Based on the selected parameters of the ocean current, a numerical simulation is ried out to understand the influence of the ocean currents on the dynamic behavior the AUV. The dynamic responses of the AUV to the ocean current effects while doing turning motion are observed in this simulation. To achieve a pure turning motion of AUV, we set the different thrust forces on the four horizontal thrusters as 1 Figure 6 shows the ocean current form with its three parameters in the EF frame can be seen in Figure 6b, the ocean current flows in the direction between South and W directions with the following parameters:   Based on the selected parameters of the ocean current, a numerical simulation is carried out to understand the influence of the ocean currents on the dynamic behaviors of the AUV. The dynamic responses of the AUV to the ocean current effects while doing the turning motion are observed in this simulation. To achieve a pure turning motion of the AUV, we set the different thrust forces on the four horizontal thrusters as T 1 = 10 N, T 2 = 11 N, T 3 = −10 N, and T 4 = −11 N, respectively, while all three vertical thrusters T 5 , T 6 , T 7 are equal to 0 N. The duration and the sampling time of this simulation are 30 s and 0.01 s, respectively. Figure 6 shows the ocean current form with its three parameters in the EF frame. As can be seen in Figure 6b, the ocean current flows in the direction between South and West directions with the following parameters: V c = 0.3 m/s, α c = 0 degree, and β c = 225 degrees from t = 0 s to t = 5 s. Then, the ocean current unexpectedly changes its direction to the South direction with the changing parameters, i.e., V c = 0.2 m/s, α c = 0 degree, and β c = 180 degrees from t > 5 s to t = 10 s. Finally, the ocean current suddenly varies its direction to the East direction, and the parameters are the following: V c = 0.1 m/s, α c = 0 degree, and β c = 90 degrees from t > 10 s to the end of the simulation time t = 30 s. In addition, the ocean current vector in the EF frame during the simulation is shown in Figure 6a. Under these ocean current configurations, the 2D trajectory behavior of the AUV during the turning motion can be observed in Figure 7. Meanwhile, the significant effect of the ocean currents on the turning motion of the AUV can be observed in the 3D trajectory shown in Figure 8. and 90 c β = degrees from t>10 s to the end of the simulation time t = 30 s. In addition, the ocean current vector in the EF frame during the simulation is shown in Figure 6a. Under these ocean current configurations, the 2D trajectory behavior of the AUV during the turning motion can be observed in Figure 7. Meanwhile, the significant effect of the ocean currents on the turning motion of the AUV can be observed in the 3D trajectory shown in Figure 8. and 90 c β = degrees from t>10 s to the end of the simulation time t = 30 s. In addition, the ocean current vector in the EF frame during the simulation is shown in Figure 6a. Under these ocean current configurations, the 2D trajectory behavior of the AUV during the turning motion can be observed in Figure 7. Meanwhile, the significant effect of the ocean currents on the turning motion of the AUV can be observed in the 3D trajectory shown in Figure 8. Furthermore, the effects of the ocean currents on the position, orientation, and velocities of the AUV can be obviously observed in Figures 9 and 10, respectively. From Figures  9 and 10, it can be seen that all states of the AUV are seriously affected by the variants of Furthermore, the effects of the ocean currents on the position, orientation, and velocities of the AUV can be obviously observed in Figures 9 and 10, respectively. From Figures 9 and 10, it can be seen that all states of the AUV are seriously affected by the variants of ocean currents during the turning motion. Especially, the roll and pitch motions of the AUV appeared to be significantly oscillatory. In general, the perturbation can be observed at t = 5 s and t = 10 s in Figure 10 when the ocean current suddenly changes its directions and the average speeds after every five seconds time (from t = 0 s to t = 10 s). Furthermore, the effects of the ocean currents on the position, orientation, and ve ities of the AUV can be obviously observed in Figures 9 and 10, respectively. From Figu 9 and 10, it can be seen that all states of the AUV are seriously affected by the variant ocean currents during the turning motion. Especially, the roll and pitch motions of AUV appeared to be significantly oscillatory. In general, the perturbation can be obser at t = 5 s and t = 10 s in Figure 10 when the ocean current suddenly changes its directi and the average speeds after every five seconds time (from t = 0 s to t = 10 s).

Dynamic Position of the over-Actuated AUV in Six-DOF
The influences of the ocean currents on the motion of the AUV have been observed and analyzed through the numerical simulation in Section 5.1. In order to perform the position stabilization control of the AUV under the ocean current effects and the model uncertainties, a new control method, which includes two modules: the motion control and the optimal allocation control, is designed. The effectiveness of the suggested control will be demonstrated via the simulation results in this section.
In this simulation, we assume that the model parameters are disturbed from their actual values by 30%. Meanwhile, the irrotational ocean current model effects on the AUV are generated by the first-order Gauss-Markov processes, and the variation of its parameters c V , c α , and c β are defined as the same as in Section 5.1.

Dynamic Position of the over-Actuated AUV in Six-DOF
The influences of the ocean currents on the motion of the AUV have been observed and analyzed through the numerical simulation in Section 5.1. In order to perform the position stabilization control of the AUV under the ocean current effects and the model uncertainties, a new control method, which includes two modules: the motion control and the optimal allocation control, is designed. The effectiveness of the suggested control will be demonstrated via the simulation results in this section.
In this simulation, we assume that the model parameters are disturbed from their actual values by 30%. Meanwhile, the irrotational ocean current model effects on the AUV are generated by the first-order Gauss-Markov processes, and the variation of its parameters V c , α c , and β c are defined as the same as in Section 5.1.
To prove the ability to provide optimal control efforts of the suggested allocation control strategies, a numerical simulation is performed to compare the performance between "unconstrained thrust allocation" and "constrained thrust allocation" cases in this section. The setting conditions for the simulation of both methods can be explained as below: Unconstrained Thrust Allocation: In this case, the unconstrained thrust allocation is applied using the standard damped inverse, i.e., the LS method. To do so, a high virtual constraint on the individual thruster force u i is applied to guarantee that the saturation limit on each thruster will never occur. Thus, these constraints are bounded to u max,i = 1000N and u min,i = −1000N in this simulation.
Constrained Thrust Allocation: The constrained thrust allocation is considered using the QP method. In this case, the generalized forces are subject to the saturation constraints according to the physical limitation of the individual thruster. For this, the saturation constraints are set to u max,i = 100N and u min,i = −100N for the seven thrusters of the AUV.
For simulation purposes, the AUV is requested to stay at the desired point  Figure 6. It can be seen that, at the first stage (0 ≤ t ≤ 5 [s]), the setting direction of the ocean current is between the South and West directions. Meanwhile, at the second stage (5 < t ≤ 10 [s]), the ocean current u c flows towards the x-direction, and at the third stage (10 < t ≤ 30 [s]), the ocean current v c flows towards the y-direction. Figure 11 displays the trajectories of the AUV in a 3D plane for two different simulation scenarios: one using the DSMC and the LS method (DSMC + LS), and the other applying the DSMC and the QP method (DSMC + QP). As shown in Figure 11, the trajectory tracking results of the AUV are superimposed with the ocean currents vector. It can also be seen that the AUV starts from the initial condition, then is required to reach and stay at a certain position (x, y, z, φ, θ) = (3,2,10,0,0) with the changing yaw angle ψ during the simulation. Figure 12 shows the variation of the linear position and Euler angles of the AUV in the presence of the ocean currents under both controllers, whereas the behaviors of the velocities of the AUV in both cases are shown in Figure 13. The differences between both controllers can be clearly observed in Figures 12 and 13. Simulation results indicate that both controllers for the position stabilization can force the AUV to reach the target position with the desired heading angle. In addition, the velocities of the AUV can be convergent to zero under the controllers. However, the behavior of the DSMC + QP controller is obviously more stable than that of the DSMC + LS controller in the presence of the model uncertainties and the ocean currents with shorter convergence time, smaller overshoot, and achieve significantly higher accuracy. Furthermore, the position error in the roll and pitch motions of the AUV has some fluctuations in both controllers, but the fluctuation of the DSMC + QP method is much smaller. These results proved that the DSMC + QP method designed in this paper provide higher robustness and effectiveness, which verifies that the proposed DSMC + QP strategy may be available for the position stabilization control of the AUV despite the existence of the uncertainties model and the ocean currents.
In the case of implementing the DP under the effects of the ocean currents, the AUV rotates its heading angle against the environmental disturbance by changing the yaw angle set-point, which is acquired from the ocean current estimation and thrust usage of the DP system. In Figure 12b, the yaw angle is operated by the DSMC to follow the desired yaw angle generated by the LOS method. In this case, the target heading angles are 45, 0, and −90 degrees. As shown in Figure 12b, the AUV can reach the target heading angle in the vicinity and stabilizes quickly, thus, achieves successfully heading angle control. gent to zero under the controllers. However, the behavior of the DSMC + QP controller is obviously more stable than that of the DSMC + LS controller in the presence of the model uncertainties and the ocean currents with shorter convergence time, smaller overshoot, and achieve significantly higher accuracy. Furthermore, the position error in the roll and pitch motions of the AUV has some fluctuations in both controllers, but the fluctuation of the DSMC + QP method is much smaller. These results proved that the DSMC + QP method designed in this paper provide higher robustness and effectiveness, which verifies that the proposed DSMC + QP strategy may be available for the position stabilization control of the AUV despite the existence of the uncertainties model and the ocean currents.   In the case of implementing the DP under the effects of the ocean currents, the AUV rotates its heading angle against the environmental disturbance by changing the yaw angle set-point, which is acquired from the ocean current estimation and thrust usage of the DP system. In Figure 12b, the yaw angle is operated by the DSMC to follow the desired yaw angle generated by the LOS method. In this case, the target heading angles are 45, 0, and −90 degrees. As shown in Figure 12b, the AUV can reach the target heading angle in the vicinity and stabilizes quickly, thus, achieves successfully heading angle control.
In order to keep the target position while maintaining the desired heading angle, the generalized forces and moments obtained through the DSMC module for two optimal LS and QP methods are shown in Figure 14, whereas the response curves of the seven thrust forces obtained through the AC module for both cases are shown in Figure 15. The differences in the generalized forces and moments and the individual thruster forces of all the thrusters between the LS and the QP algorithms are clearly observed based on Figures 14  and 15.
We observe that the generalized forces and thrust forces for both cases are raised seriously at the time of 5 s and 10 s to compensate for the ocean current disturbance. Especially, the torques in the yaw motion of the AUV are enhanced in order to counteract the excessive ocean currents. Compared with the QP algorithm, the LS algorithm yields In order to keep the target position while maintaining the desired heading angle, the generalized forces and moments obtained through the DSMC module for two optimal LS and QP methods are shown in Figure 14, whereas the response curves of the seven thrust forces obtained through the AC module for both cases are shown in Figure 15. The differences in the generalized forces and moments and the individual thruster forces of all the thrusters between the LS and the QP algorithms are clearly observed based on Figures 14 and 15.
We observe that the generalized forces and thrust forces for both cases are raised seriously at the time of 5 s and 10 s to compensate for the ocean current disturbance. Especially, the torques in the yaw motion of the AUV are enhanced in order to counteract the excessive ocean currents. Compared with the QP algorithm, the LS algorithm yields greater thrust forces to all thrusters; this is because the LS method cannot generate the optimal solutions with unlimited thrust capabilities. It can also be seen from Figure 15 that the thrust generated in each thruster using the QP is controlled within the saturation constraints ± 100 N of the predefined thrust according to the real technical specifications of each thruster. Overall, it can be concluded that the QP control allocation algorithm proposed in this paper is more efficient in optimizing the energy consumed than the LS control allocation.

Conclusions
In this paper, the three-dimensional DP control problem of an over-actuated AUV with seven thrusters under the ocean current disturbances and the uncertainties model is addressed. During the DP control action, the AUV is requested to keep the linear position and the yaw angle with respect to a fixed reference point. This paper proposes a DP control system with two integrated modules, namely the motion control law and the control allocation. First, to improve the system robustness, a robust DSMC is developed for the motion control of the AUV under the assumption that the bounds of the external disturbance are known. Next, to handle the unconstrained and constrained allocation control problem, two strategies are designed and compared for the DP control system of the overactuated AUV, i.e., the LS and QP methods. The stability of the proposed controller is then proved using the Lyapunov theorem. Finally, the simulation results are conducted to illustrate how the motion control law and allocation control modules interact to obtain the desired trajectory tracking performance while minimizing the power consumption of the seven thrusters on the over-actuated AUV. The simulation results show that the QP algorithm can significantly improve the performance of the DP control system, and it is able

Conclusions
In this paper, the three-dimensional DP control problem of an over-actuated AUV with seven thrusters under the ocean current disturbances and the uncertainties model is addressed. During the DP control action, the AUV is requested to keep the linear position and the yaw angle with respect to a fixed reference point. This paper proposes a DP control system with two integrated modules, namely the motion control law and the control allocation. First, to improve the system robustness, a robust DSMC is developed for the motion control of the AUV under the assumption that the bounds of the external disturbance are known. Next, to handle the unconstrained and constrained allocation control problem, two strategies are designed and compared for the DP control system of the overactuated AUV, i.e., the LS and QP methods. The stability of the proposed controller is then proved using the Lyapunov theorem. Finally, the simulation results are conducted to illustrate how the motion control law and allocation control modules interact to obtain the desired trajectory tracking performance while minimizing the power consumption of the seven thrusters on the over-actuated AUV. The simulation results show that the QP algorithm can significantly improve the performance of the DP control system, and it is able to solve the DP problem rapidly and precisely with the thrust force constraints.

Conclusions
In this paper, the three-dimensional DP control problem of an over-actuated AUV with seven thrusters under the ocean current disturbances and the uncertainties model is addressed. During the DP control action, the AUV is requested to keep the linear position and the yaw angle with respect to a fixed reference point. This paper proposes a DP control system with two integrated modules, namely the motion control law and the control allocation. First, to improve the system robustness, a robust DSMC is developed for the motion control of the AUV under the assumption that the bounds of the external disturbance are known. Next, to handle the unconstrained and constrained allocation control problem, two strategies are designed and compared for the DP control system of the over-actuated AUV, i.e., the LS and QP methods. The stability of the proposed controller is then proved using the Lyapunov theorem. Finally, the simulation results are conducted to illustrate how the motion control law and allocation control modules interact to obtain the desired trajectory tracking performance while minimizing the power consumption of the seven thrusters on the over-actuated AUV. The simulation results show that the QP algorithm can significantly improve the performance of the DP control system, and it is able to solve the DP problem rapidly and precisely with the thrust force constraints.