1. Introduction
The ocean is the origin of the development of human civilization, and its rich resources of fish and minerals are strong backing for the sustainable development of human beings [
1]. Since the beginning of the 21st century, it has become an inevitable trend for all countries to explore and exploit marine resources [
2,
3]. Although human beings have been able to travel in space, they know very little about the ocean [
4]. The main reason is the lack of effective tools for deep-sea scientific research and the exploitation and utilization of marine resources [
5,
6].
Unmanned underwater vehicles (UUVs) are a kind of underwater vehicle [
7]. By carrying a variety of high-precision sensors and different task modules, they can carry out important tasks such as hydrology surveys, energy exploration, and marine science research [
8,
9]. UUVs also play an important role in the military and are usually used for underwater vigilance, reconnaissance, surveillance, tracking, and so on [
10]. UUVs can be divided into two categories based on the different contact modes between the UUV and surface support systems: remote-operated vehicles (ROVs) have cables, and autonomous underwater vehicles (AUVs) do not have cables [
11,
12]. With their energy, AUVs can control themselves and make decisions independently without manual control; this has many advantages, such as a large range of activities, no fear of cable entanglement, and wide application space [
13]. AUVs are suitable for seabed search, identification, and salvage operations [
14]. AUV motion control includes stabilization, path tracking, and trajectory tracking. Trajectory tracking is to use a guidance controller and dynamics controller to make the AUV track from the initial state to the endpoint under the constraint of time [
15]. Some traditional control methods, such as sliding mode control (SMC), model predictive control (MPC), neural network control (NNC), and proportional differential control (PD), have been applied in the field of underwater trajectory tracking control [
16,
17].
PID control is a control system based on the proportion, integral, and differential of the error generated by comparing the real-time data collected with regard to the controlled object to the given value [
18,
19]. It has the advantages of a simple principle, strong robustness, and wide practical applications [
20]. It is a mature technology and is the most widely used control system [
21,
22]. As proposed by Hammad and Elshenawy [
23], a nonlinear fuzzy PID controller can be applied for the trajectory tracking control of AUVs using fuzzy logic rules to adjust the parameters of the PID controller in real-time to reduce the overshoot of the system and to improve the system response time; however, the complex fuzzy logic rules need to be set for the actual problem at hand.
The advantage of SMC is that it can overcome the uncertainty of the system and has strong robustness to disturbances and unmodeled dynamics, especially for the control of nonlinear systems [
24,
25]. Elmokadem et al. applied the traditional SMC method to 3D trajectory tracking control of an AUV. Because the symbol function is introduced into the corresponding degree of freedom of the sliding mode surface, traditional SMC causes chattering problems, which has a great impact on the performance of the controller [
26]. At the same time, London and Patre focus on solving this problem and propose an adaptive fuzzy sliding mode controller that improves the chattering problem of SMC by proposing a new Lyapunov energy function and deriving fuzzy logic rules [
27]. Non-singular terminal sliding mode control (NTSMC) solves the singularity problem of the existing terminal sliding mode and realizes global nonsingular control of the system. In addition, it inherits the finite time convergence characteristics of the terminal sliding mode and has high steady-state accuracy [
28]. However, in practical applications, the control accuracy is also reduced due to the modeling error of the controlled object or external disturbances.
Classic MPC solves for the currently available optimal control sequence within a limited predictive horizon at each pre-set sampling time [
29]. Model predictive control not only pursues control but also pursues optimal control, which is the biggest difference between MPC and traditional control methods [
30]. MPC is committed to the optimal control problem with a longer period, or even infinite period, which is decomposed into several optimization control problems with a shorter period or a limited period, and it still pursues the optimal solution to a certain extent [
31]. The most classical optimal controller is the quadratic programming (QP) controller [
32]. In [
33], Yan et al. proposed a double-closed-loop model predictive controller in which the outer MPC loop generates the expected velocity command for the system, and the inner MPC loop outputs the system control command. However, the QP method is used to solve the optimal value of the cost function of MPC, and its disadvantage is that the global optimal solution cannot usually be obtained, which leads to a large trajectory tracking error. To solve this problem, a novel genetic–ant colony optimization algorithm was proposed by [
34] to replace the QP link in MPC to obtain a higher-quality global optimal solution; it was successfully applied to the dynamic trajectory tracking control of an AUV with dynamic SMC. Although the fusion of the ant colony algorithm can accelerate the convergence speed of the optimization algorithm, the sampling time of MPC is limited after all. Particle swarm optimization (PSO) has the advantages of simple design and fast convergence speed, which is more suitable for the fusion of MPC. The authors of [
35] proposed an MPC based on quantum behavior PSO optimization, but it is still difficult to balance the local search ability and global search ability of PSO.
In this paper, an APSO-based MPC and NTSMC cascade control method is proposed and applied for the trajectory tracking control of an AUV. In the design of the controller, the actual constraints of the system are fully considered. When the APSO algorithm is applied to the MPC controller to solve the optimal speed instruction, it can overcome the problem of the standard MPC being unable to obtain the global optimal solution when applying the QP method to solve the problem with constraints. The NTSMC velocity controller allows the AUV to follow the expected optimal velocity commands. The adaptive RBF-NN compensator is designed to compensate for the modeling error of the AUV and the disturbance of external sea conditions to enhance the control accuracy and robustness of the system. The controller recalculates the best input at the next moment based on the system error within each sampling time of the system. The asymptotic stability of the controller is proven using a Lyapunov function with terminal constraints. Finally, a simulation model of AUV trajectory tracking control is built using MATLAB/Simulink. The simulation process includes setting two different expected trajectory cases, each of which includes settings without disturbance, with random disturbance, and with wave and/or current disturbance to verify the effectiveness and robustness of the proposed controller.
The main contents of this paper are as follows:
Section 2 gives the kinematics and dynamics models of the fully actuated AUV, as well as the layout and rationality verification of the thrusters.
Section 3 introduces the description of the trajectory tracking control problem and the design of the controller and analyzes the stability of the proposed controller.
Section 4 gives the simulation results with different external disturbances.
Section 5 provides some conclusive comments.
2. Modeling of the AUV System
AUV system modeling includes physical model design, kinematics modeling, dynamics modeling, and thrust distribution setting. The physical model design determines the basic physical parameters of the AUV and the layout of thrusters. The kinematics model of the AUV describes the relationship between its position, attitude, and velocity. The dynamic model describes the relationship between the acceleration and the force of the AUV in the process of motion.
2.1. Frames of Reference
Figure 1 shows the fully actuated AUV design based on SOLIDWORKS proposed in this paper.
Remark 1. Generally, under the action of the restoring force and the moment of the AUV, the rolling motion of the AUV is considered to be self-stable, so the roll angle φ and roll angular velocity p of the rolling degrees of freedom are both 0. Similarly, pitch angular θ is bounded and satisfies [31]. Remark 2. The approximate solution method for the main inertial and viscous hydrodynamic coefficients of the fully actuated AUV proposed in this paper is based on the CFD simulation method in [34] and includes the simulation of uniform translational motion, uniform rotational motion, accelerated translational motion, and accelerated rotational motion. Assumptions
- 1.
The AUV is treated as a rigid body with constant mass, and its gravity is assumed to be approximately equal to its buoyancy.
- 2.
The streamlined structure of the AUV is approximately symmetrical in the horizontal and vertical planes, and its hydrodynamic coefficient does not change with changes in the environment.
- 3.
The origin of the horizontal and vertical thrusters is coplanar with the center of gravity of the AUV, resulting in no corresponding moment disturbance.
The position and attitude information
of the AUV is defined in the inertial coordinate system
E [
36] corresponding to the information of five freedoms of motion: surge, sway, heave, pitch, and yaw.
The velocity information of the AUV is defined in the body coordinate system G corresponding to the information of the above five freedoms of motion. Here, E and G are both right-handed Cartesian coordinates.
Remark 3. The origin definition of coincides with the center of gravity of the AUV proposed in this paper. The buoyancy force of the AUV is defined as B, and the center of buoyancy coordinate is .
2.2. Kinematics and Dynamics
The kinematic model of the fully actuated AUV can be defined:
where
is defined as the transition matrix between the coordinates of
E and
G:
The general dynamics model of the underwater vehicle proposed by Fossen [
33] is also applicable to the fully actuated AUV proposed in this paper and can be expressed in the following form:
where
is defined as the inertia matrix, with
m the mass of the AUV and
,
, and
the inertia tensors of AUV. The values in this paper can be obtained from the SOLIDWORKS structural model of the designed AUV. Here,
,
,
,
, and
are the main inertial hydrodynamic coefficient caused by the AUV performing accelerated motion underwater [
37], where
. Because of the Earth’s rotation, an AUV naturally experiences Coriolis and centripetal effects when moving underwater.
Here, and are the Coriolis and centripetal force matrices caused by the above rigid body inertial mass matrix and the additional mass matrix, respectively.
Specifically,
where
is defined as the viscous damping matrix.
, , , , , , , , , and are estimable linear and nonlinear viscous hydrodynamic coefficients, respectively.
Here,
is the restoring force matrix generated by the static force of the AUV in the underwater environment.
is the the vector of external unknown ocean disturbance force and moment for each degree of freedom.
is the vector of the thruster input force and moment for each degree of freedom.
2.3. Thruster Layout and Rationality Verification
The thruster arrangement of the fully actuated AUV proposed in this paper is shown in
Figure 2, where
is the main thruster arranged in the surge direction,
and
are the two thrusters arranged in the sway direction, and
and
are the two thrusters arranged in the heave direction. The values
,
, and
are the moment arms in the corresponding direction.
In order to complete the motion control task,
should be assigned to the appropriate thrusters. Based on the thruster arrangement in
Figure 2, the thrust distribution matrix equation can be easily obtained in the following form:
To reasonably choose the type of thruster, this paper used computational fluid dynamics (CFD) software ANSYS-FLUENT to simulate surge, sway, and heave motions of the AUV at different velocities to solve for the maximum drag value. The mesh part of the AUV in the CFD software FLUENT is shown in
Figure 3.
Figure 4 shows the relevant process and data of the CFD simulation. It can be seen from the figure that when the velocity is about 3 knots, the maximum drag in the surge, sway, and heave directions is about 46 N, 180 N, and 180 N, respectively.
The design velocity of the fully actuated AUV proposed in this paper is 2 knots. Based on the CFD simulation data, the velocity values of the AUV’s surge, sway, and heave freedom and the corresponding drag values are respectively fitted. The fitting results are shown in
Figure 5. Based on the fitting results, an S100-CR-IC electric thruster is selected for the AUV.
As can be can clearly seen from
Figure 6, the maximum forward thrust of a single thruster is 13.5
, which is about 135 N. The maximum reverse thrust is about 9
, or about 90 N. Based on the above data, the arrangement of thrusters in this paper is reasonable.
4. Simulation Results
In this part, MATLAB/Simulink are used to verify the effectiveness of the proposed cascade controller (MPC-APSO-NTSMC) in AUV 3D trajectory tracking control. The simulation results are compared with the simulation results of the position and velocity double-closed-loop proportional differential (PD) controller (PD-PD) and the traditional MPC and linear SMC cascade controller (MPC-PSO-SMC).
The simulation and verification process is divided into two trajectory tracking cases: spiral trajectory tracking and complex curve tracking. The Simulink simulation model is shown in
Figure 8. The basic physics and main hydrodynamic coefficients of the AUV are shown in
Table 1. The simulation parameters are shown in
Table 2.
The random disturbance in the simulation is defined as follows:
Here, rand(1) represents a random number between 0 and 1. The wave and current disturbance in the simulation is defined as follows:
Case 1: We set the initial position of the fully actuated AUV in the underwater simulation environment to be
, and the function of the spiral trajectory with time is defined as follows:
It can be seen from
Figure 9 and
Figure 10 that all three controllers can provide better trajectory tracking performance for the AUV. However, since the AUV is a system with large inertia, the PD-PD controller (green curve) cannot track in time when the expected trajectory curvature of the AUV is large, resulting in relatively large tracking errors. In addition, the controller designed in this paper (red curve) has better final tracking performance than the MPC-PSO-SMC controller (blue curve) in terms of initial tracking speed and error control.
Figure 11 shows the thrust output of each thruster of the AUV during trajectory tracking. The figure shows that although the thrust output of the PD-PD controller (green curve) is not the maximum at the initial moment, the overall output fluctuates greatly, which is related to the difficulty of setting controller parameters. The controller proposed in this paper (red curve), under the action of the MPC-APSO kinematic controller and the NTSMC dynamics controller, has a relatively stable overall thrust output that is the best among the three.
Figure 12 shows the effect of the NTSMC velocity controller tracking the optimal expected velocity command (blue curve) based on the RBF-NN compensator designed in this paper. Obviously, the MPC-APSO method proposed in this paper can obtain the globally optimal expected velocity, and the proposed velocity controller has a good tracking effect (red curve).
Table 3 shows the mean absolute error (MAE) data obtained by simulation when the AUV tracks the spiral trajectory proposed in Case 1 without disturbance. We can clearly draw from the data in the table that the MPC-APSO-NTSMC controller designed in this paper can make the trajectory tracking task of the AUV have the minimum position MAE. MAE data of pitch, roll, heave, pitch, and yaw positions were 0.1165 m, 0.2013 m, 0.1727 m, 0.0815
, and 0.0721
, respectively.
Figure 13 shows 3D AUV tracking of a spiral trajectory with the influence of random disturbance. Obviously, compared with Case 1 without external disturbance, the tracking performance of the three control methods has declined, and the corresponding fluctuations are generated under the influence of random disturbance, which is reflected in the large changes to the trajectory curvature. However, compared with PD-PD (green curve) and MPC-PSO-SMC (blue curve), the proposed controller (red curve) still has the best tracking performance.
Figure 14 shows the trajectory tracking performance comparison of the three controllers for each degree of freedom. The PD-PD controller (green curve) has the largest error fluctuation. The proposed controller (red curve) under the action of the RBF-NN compensator not only improves the influence of model errors on the controller performance but also effectively compensates for external disturbance to minimize tracking error fluctuation and improve the robustness of the controller.
Figure 15 shows the comparison of simulation results of thruster thrust output in the case of random interference. Although the thrust output of the controller proposed in this paper has a small-amplitude oscillation with random interference, compared with the other two methods, the overall thrust output is relatively stable under the action of the MPC-APSO kinematic controller with the NTSMC dynamic controller. It is the best of the three.
Figure 16 shows the tracking of the velocity controller designed in this paper. The simulation results show that the velocity tracking performance of each degree of freedom of the AUV decreases slightly with random disturbance, but the overall tracking effect is good. At the same time, it can be proved that compared with the standard PSO, the APSO algorithm can obtain a global optimal value superior to the standard PSO in each sampling period of the MPC, and the proposed NTSMC velocity controller based on the RBF-NN compensator can effectively suppress the influence of external disturbances.
Table 4 shows the MAE data obtained by simulation when the AUV tracks the spiral trajectory proposed in Case 1 with random disturbances. We can also clearly draw from the data in the table that the MPC-APSO-NTSMC controller designed in this paper can make the trajectory tracking task of the AUV have the minimum position MAE. MAE data of surge, sway, heave, pitch, and yaw positions are 0.1678 m, 0.1913 m, 0.1427 m, 0.0775
, and 0.0903
, respectively.
In order to more fully consider the actual situation of underwater trajectory tracking of a fully actuated AUV, the wave and current interference is added in the simulation process, and the trajectory tracking control performance of PD-PD, MPC-PSO-NTSMC, and the proposed controller are again verified by simulation. The simulation results are shown in
Figure 17,
Figure 18,
Figure 19 and
Figure 20.
The results show that the proposed controller still has the best trajectory tracking performance and robustness, and all types of trajectory errors are the smallest among the three. The thrust output response speed is fast, the thrust output is smooth, and the speed tracking is correspondingly fast with the condition of wave and ocean current interference at the same time, which, again, proves the effectiveness and robustness of the controller (red curve).
Table 5 shows the MAE data obtained by simulation when the AUV tracks the spiral trajectory proposed in Case 1 with wave and current disturbance. We can clearly draw from the data in the table that the MPC-APSO-NTSMC controller designed in this paper can make the trajectory tracking task of the AUV have the minimum position MAE. MAE data of surge, roll, heave, pitch, and yaw are 0.1981 m, 0.1699 m, 0.1827 m, 0.0915
, and 0.0928
, respectively.
Case 2: We set the initial position of the fully actuated AUV in the underwater simulation environment to be
, and the function of the complex curve trajectory with time is defined as follows:
Figure 21 and
Figure 22 show the tracking performance of the AUV when tracking complex curves. It can be easily observed that the tracking errors of the three control methods under each degree of freedom increase significantly when tracking the trajectory of complex curves with multiple curvations, especially the position with large curvature changes, compared with tracking the spiral trajectory. However, the position tracking errors of the three control methods are all bounded. The overall tracking error result (red curve) of the proposed controller is better than that of the other two controllers.
Figure 23 shows the output of each thruster when the AUV tracks a complex curve. The PD-PD controller (green curve) has a large change rate of thruster output at the initial stage. Although the change rate of the MPC-PSO-SMC (blue curve) controller’s thruster output during the initial tracking process is better than that of the PD-PD controller, the output value is large. The proposed controller (red curve) has a minimum charge rate of thruster output during the entire tracking process, and it is relatively stable.
Figure 24 shows the effect of the NTSMC velocity controller based on the RBF-NN compensator designed in this paper to track the expected velocity command (blue curve). Obviously, the MPC-APSO method proposed in Case 2 can also obtain the globally optimal expected velocity, and the proposed velocity controller has a great tracking effect (red curve).
Table 6 shows the MAE data obtained by simulation when the AUV tracks the complex curve trajectory proposed in Case 2 without disturbance. We can also clearly draw from the data in the table that the MPC-APSO-NTSMC controller designed in this paper can make the trajectory tracking task of the AUV have the minimum position MAE. MAE data of surge, roll, heave, pitch, and yaw are 0.1778 m, 0.1845 m, 0.1025 m, 0.1134
, and 0.1219
, respectively.
Figure 25,
Figure 26,
Figure 27 and
Figure 28 show the trajectory tracking performance of the AUV when tracking complex curves with random disturbance. Similar to tracking the spiral track, with the effect of the random disturbance, the controller proposed in this paper (red curve) can overcome the influence of tracking fluctuation caused by multi-curvature changes and random disturbance regardless of the overall tracking effect, the output stability of thrusters, and the velocity tracking effect of NTSMC based on the NN compensator. The effectiveness and robustness of the controller are the best of the three.
Table 7 shows the MAE data obtained by simulation when the AUV tracks the complex curve trajectory proposed in Case 2 with random disturbance. We can also clearly draw from the data in the table that the MPC-APSO-NTSMC controller designed in this paper can make the trajectory tracking task of the AUV have the minimum position MAE. MAE data of surge, roll, heave, pitch, and yaw are 0.1812 m, 0.1909 m, 0.1215 m, 0.1167
, and 0.1439
, respectively.
Figure 29,
Figure 30,
Figure 31 and
Figure 32 show the trajectory tracking performance of the AUV when tracking complex curves with wave and current disturbance. Similar to spiral tracking, with the effect of the wave and current disturbance, the controller proposed in this paper (red curve) can overcome the influence of tracking fluctuation caused by multi-curvature changes and wave and current disturbance regardless of the overall tracking effect, the output stability of thrusters, and the velocity tracking effect of NTSMC based on the NN compensator. The effectiveness and robustness of the controller are still the best of the three.
Table 8 shows the MAE data obtained by simulation when the AUV tracks the complex curve trajectory proposed in Case 2 with wave and current disturbance. We can also clearly draw from the data in the table that the MPC-APSO-NTSMC controller designed in this paper can make the trajectory tracking task of AUV have the minimum position MAE. MAE data of surge, roll, heave, pitch, and yaw are 0.1843 m, 0.1712 m, 0.1901 m, 0.1004
, and 0.1115
, respectively.
5. Conclusions
Aiming at the problem of underwater 3D dynamic trajectory tracking control of fully actuated AUVs, a novel cascade controller using MPC and NTSMC is proposed in this paper. Firstly, the five-degree-of-freedom kinematics and dynamics model of the fully actuated AUV is established in the corresponding coordinate system. Secondly, a novel PSO method with adaptive inertia weight is proposed to replace the QP method for solving the optimal control sequence in standard MPC. Combined with the state and control input constraints of the AUV, MPC-APSO obtains the optimal velocity control sequence, generates the expected velocity command, and transmits it to the NTSMC velocity controller. The introduction of adaptive inertia weight can balance and improve the local search and global search capabilities of the optimization algorithm, which overcomes the problem of the traditional MPC control being unable to find the global optimal solution when using QP to solve for the optimal solution. After that, considering the modeling error of the dynamic model of AUV and the unknown disturbance of the underwater environment when the AUV performs underwater trajectory tracking control, this paper improves the response speed and control accuracy of NTSMC by designing an RBF-NN compensator. Moreover, stability analysis based on the Lyapunov method proves the stability of the two controllers. Finally, two different expected 3D trajectories are designed using MATLAB/Simulink to verify the dynamic trajectory tracking performance of the AUV with different external disturbances, and the robustness and effectiveness of the designed controller are verified.
In future research, we will focus on practical problems of AUVs in trajectory tracking control, such as the rationality of the expected trajectory, the integration of the constraints with the underwater environment and AUV dynamic constraints, controller input saturation, multi-AUV cooperative formation control, etc.