1. Introduction
Autonomous underwater vehicles (AUVs) play an important role in many marine engineering applications, such as aquaculture, marine environment exploration, and offshore platform maintenance [
1,
2,
3]. Trajectory tracking control is a key function for AUVs, which enables them to execute missions in intricate marine environments [
4]. However, the trajectory tracking performance of AUVs is generally constrained due to the nonlinear dynamics of AUVs and the uncertain environmental disturbances [
5].
Various approaches have been proposed to address the trajectory tracking control of AUVs [
6]. Traditional control methods include fuzzy PID control [
7,
8], backstepping control [
9,
10], and sliding-mode control [
11,
12]. Hasan et al. proposed an adaptive fuzzy PID controller to mitigate uncertainties caused by ocean currents [
8]. This method significantly enhances the anti-interference performance of AUVs compared with other PID controllers. However, the design of a fuzzy PID controller requires human knowledge and experience to formulate the fuzzy rules and membership functions. Coleman et al. solved under-actuation challenges by applying backstepping control to trajectory tracking in under-actuated gliding robotic fish [
10]. Taha et al. applied sliding-mode control to horizontal trajectory tracking tasks of AUVs [
12]. Sliding-mode control (SMC) can improve the robustness and response speed of trajectory tracking control. However, it causes chattering in the control input, which leads to increased energy consumption and diminished controller performance.
Nevertheless, the performance and stability of backstepping control heavily rely on accurate system parameter estimation. With the rapid development of artificial intelligence (AI) technology, neural network control [
13,
14] and reinforcement learning control [
15,
16] have been applied to AUV motion control in recent years. Zhang et al. proposed an adaptive trajectory tracking control scheme based on neural networks, which improved the robustness of the control system [
17]. Fang et al. applied fast-deployed deep reinforcement learning for the trajectory tracking control of AUVs [
16]. The simulation results showed good tracking performance for various trajectories. However, these methods still have practical limitations due to their heavy reliance on data and substantial computing resources.
Model predictive control (MPC) solves the optimal control problem recursively by using real-time state measurements as initial conditions. The optimization process considers system constraints on both state and control variables [
18,
19]. MPC design only needs to define a reasonable predictive model and cost function, which is relatively simple compared with other control methods. However, it is difficult to build the dynamics model of AUVs due to the complex hydrodynamic [
20]. In addition, MPC demands substantial computing resources and time. Traditional MPC relies on offline system identification methods to obtain predictive models, such as the least square [
21], Kalman filter [
22], and neural network [
17]. However, these methods cannot compensate for external disturbances in real time. In order to effectively compensate for external disturbances, adaptive compensation methods [
23] and robust control techniques [
24] are utilized in traditional MPC. However, adaptive compensation methods are severely affected by the uncertain parameters in real experiments. Robust control techniques impose constraints that limit the actual performance of the control system.
In recent years, data-driven MPC methods have emerged as promising control methods in robotics, which reduce numerical modeling complexity and enable real-time compensation for external disturbance [
25,
26,
27]. Applications in various robotic systems, including unmanned aerial vehicles [
28], autonomous vehicles [
29], unmanned ships [
30], and robotic arms [
31], have demonstrated the effectiveness of data-driven MPC in many control tasks. These methods leverage machine learning algorithms to learn robot dynamics from sensor data [
32,
33]. Chee et al. proposed KNODE-MPC for trajectory tracking tasks in quadrotors, which achieves a 30
improvement in tracking performance [
32]. Leonard et al. proposed a novel method to model quadrotors by learning the residual error with a neural network, which has better performance than conventional models, resulting in a 50% reduction in prediction errors [
34]. However, data-driven methods based on deep neural networks require extensive training data.
Gaussian process regression (GPR) is a non-parametric machine learning algorithm that can predict system models from a small amount of data [
35]. The GPR has been widely used in data-driven control algorithms. Lukas et al. applied GPR to learn the residual errors in the dynamics of a race car, reducing lap times by 10% [
36]. Torrente et al. applied GPR to account for aerodynamic effects. Experimental results show that this algorithm can guarantee the performance of trajectory tracking control under strong wind interference [
28]. In [
37], Janine et al. designed an MPCC controller based on the GPR-enhanced model, which achieves accurate motion control of the robot arm. Aditya et al. presented a control scheme based on L1 adaptive control and GPR, which improves performance and maintains robustness specifications [
38].
Existing MPC methods under model uncertainty can be broadly classified into robust MPC, adaptive MPC, disturbance-observer-based MPC, neural-network-enhanced MPC, and Gaussian process-enhanced MPC. Robust MPC improves safety by considering bounded uncertainty sets, but it is often conservative and may sacrifice tracking accuracy. Adaptive MPC and disturbance-observer-based MPC can compensate for slowly varying model mismatch or lumped disturbances, but their performance depends on the observer structure and disturbance assumptions. Neural-network-enhanced MPC has strong nonlinear fitting capability, but it usually requires a relatively large dataset and may introduce a heavy training burden. In contrast, Gaussian process regression is suitable for small-data residual learning and provides a probabilistic description of model uncertainty. Therefore, GP-MPC is attractive for AUV trajectory tracking, where hydrodynamic modeling is difficult and experimental data are usually limited.
Compared with existing learning-based MPC studies, the proposed method emphasizes a lightweight residual-learning structure for real-time AUV control. The offline GP-MPC compensates for model mismatch using pre-collected residual data, while the online GP-MPC further updates the residual model using recent closed-loop data. This design allows the controller to improve disturbance compensation without requiring a large neural network dataset or a fully identified hydrodynamic model.
In this paper, two Gaussian process-based model predictive control (GP-MPC) algorithms (offline and online) are proposed to address trajectory tracking tasks for autonomous underwater vehicles (AUVs). The main objectives include building a numerical AUV model that uses Gaussian process regression to correct modeling errors, incorporating external disturbances and initial errors into a predictive control framework, and validating the approach through both simulation and real-time experiments on various trajectories. Simulation and experimental results consistently validate the robust performance of the proposed GP-MPC, even in the presence of significant initial offsets and substantial external disturbances.
Essentially, the purpose of the proposed algorithms is to combine Gaussian process regression with a model predictive control framework in order to achieve robust and accurate motion control. By leveraging real-time motion data (in the online case), the predictive model is refined to deal with uncertain factors such as ocean currents. Compared with existing controllers, the GP-MPC shows a faster transient response and improved adaptability when encountering sudden changes in the reference trajectory or significant initial errors. This ability of GP-MPC to converge within just a few seconds further highlights its rapid adjustment capabilities. Firstly, the simulation dynamics model and the nominal AUV model are described. Secondly, a novel method that utilizes GPR to augment the nominal AUV model is presented. Subsequently, a simulation platform is developed to evaluate the tracking performance of different control algorithms. Finally, the effectiveness of the proposed GP-MPC controller is validated through real-time experiments on an open-frame AUV in a pool, which involve various trajectory tracking tasks. The main contributions of this work are summarized as follows:
- (1)
A GP-enhanced predictive model is developed for AUV trajectory tracking by learning the residual dynamics between a simplified nominal model and the actual/simulated vehicle response. The method is designed to operate with a small training dataset, which is important for real-time MPC implementation.
- (2)
Both offline and online GP-MPC schemes are formulated. The offline GP-MPC compensates for model mismatch using pre-collected data, while the online GP-MPC further updates the residual model using a sliding window of real-time data to improve disturbance compensation.
- (3)
The proposed controllers are systematically evaluated in numerical simulations under circular, L-shaped, and lemniscate trajectories, including different velocity profiles, current disturbances, and initial tracking errors.
- (4)
Real-time pool experiments are conducted on an open-frame AUV to validate the practical feasibility of the GP-corrected MPC framework in surface three-DOF trajectory tracking. The experimental validation is limited to the offline GP-MPC because of the current optical tracking and real-time computing constraints, which are now explicitly discussed as limitations.
4. Numerical Simulation Results
In this section, the trajectory tracking control performance of different algorithms is studied under different trajectories, velocities, and external disturbances. The circular trajectory, L-shaped steering trajectory, and lemniscate trajectory are tracked, respectively. Additionally, the trajectory tracking task with initial errors is also studied.
The three simulation trajectories are selected to evaluate different tracking characteristics of the proposed controller. The circular trajectory is used to test steady curved path tracking under continuous yaw motion and constant curvature. The L-shaped steering trajectory is used to examine the transient response of the controller under abrupt changes in yaw angle and velocity. The lemniscate trajectory introduces coupled multi-axis motion with continuously varying curvature and velocity and is therefore used to evaluate tracking performance under more complex reference motion. In addition, the disturbance cases and initial-error case are designed to further evaluate the robustness and convergence ability of different controllers under external current disturbances and nonzero initial tracking errors.
The root mean square error (RMSE) and the maximum error (ME) of position and yaw angle are used to evaluate the trajectory tracking performance of different algorithms. The specific expression can be described as follows:
where
and
are the position and yaw angle of the desired trajectory at the
time step, respectively;
and
are the position and yaw angle of the actual tracking trajectory at the
time step, respectively;
is the simulation running time; and
is the discrete time interval.
In all error tables, the position RMSE and ME are reported in meters (m), and the yaw angle RMSE and ME are reported in radians (rad). These standard units are used consistently for all simulation cases.
The AUV starts from the origin of the world coordinate system with a zero yaw angle. The running time is set as , and the discrete time interval is set as . The simulation results of different trajectory tracking tasks are given below.
4.1. No Current Disturbance and No Initial Error
4.1.1. Circular Trajectory
The radius of the circular trajectory is denoted as
. Define the vertical velocity as
, then the circular trajectory can be obtained as follows:
The AUV performs the circular trajectory tracking task with constant linear velocity and angular velocity. The trajectory tracking performance of the AUV with different control algorithms is evaluated. Three scenarios are considered:
Case 1: ;
Case 2: .
The tracking trajectories and tracking errors are shown in
Figure 5 and
Figure 6, respectively. The RMSE and ME are shown in
Table 2.
The AUV employing PID or nominal MPC algorithms can track the desired trajectories in case 1. However, as the AUV’s speed increases (case 2), the trajectories of PID or nominal MPC algorithms have obvious deviation from the desired trajectories. In contrast, the AUV utilizing the offline GP-MPC or online GP-MPC algorithms can still track the desired trajectories. Compared with PID and nominal MPC algorithms, the GP-MPC algorithms show reduced RMSE (over 90%) and ME (over 90%) in both position and yaw angle during different trajectory tracking tasks.
4.1.2. L-Shaped Steering Trajectory
The L-shaped trajectory is defined as follows: the yaw angle turns to
and the
changes from
to
at 5 s. The L-shaped trajectory can be described as follows:
This trajectory is analyzed to evaluate the tracking performance of different algorithms under abrupt changes. The tracking trajectories and tracking errors are shown in
Figure 7 and
Figure 8, respectively. The RMSE and ME are shown in
Table 3.
Compared with PID and nominal MPC algorithms, the GP-MPC algorithms show reduced RMSE and ME in both position and yaw angle.
In addition, the GP-MPC algorithm can adjust the control strategy promptly to ensure that the AUV effectively follows the desired trajectory. However, the other algorithms fail to compensate for sudden changes, resulting in a large deviation of the AUV. The errors of position and yaw angle of online GP-MPC converge to the range of and after 6.5 s. The errors of position and yaw angle of offline GP-MPC are reduced to the range of and after 8.5 s. Therefore, the online GP-MPC algorithm demonstrates stronger robustness, smaller tracking errors, and a faster response speed, making it more suitable for various trajectory tracking tasks.
4.1.3. Lemniscate Trajectory
The lemniscate trajectory is defined as follows: the orientation is unchanged as the AUV performs the trajectory tracking tasks. The expression of this trajectory can be expressed as follows:
The trajectory tracking performance of different algorithms is analyzed with time-varying velocity at each axis. The tracking trajectories and tracking errors are shown in
Figure 9 and
Figure 10, respectively. The RMSE and ME are shown in
Table 4.
It can be found that the PID and nominal MPC algorithms can track the desired trajectory when the trajectory speed of the AUV changes, but they exhibit significant tracking errors (the ME of the position and yaw angle are more than 0.04 m and 0.7 rad, respectively). The offline GP-MPC and the online GP-MPC adopt data-driven methods to compensate for the modeling error, which achieves better trajectory tracking performance (over 70% reduction on the RMSE of the position and yaw angle). Furthermore, the online GP-MPC shows smaller RMSE and ME values on the yaw angle compared with the offline GP-MPC.
4.2. With Current Disturbance but No Initial Error
4.2.1. Constant Disturbance
A constant disturbance of 40 N acts on the X-axis, Y-axis, and Z-axis of the world coordinate frame
. The disturbance forces can be expressed as follows:
The lemniscate trajectory is defined as follows:
A simulation of lemniscate trajectory tracking under constant disturbance is conducted. The simulation result and tracking errors are shown in
Figure 11 and
Figure 12, respectively. The RMSE and ME are shown in
Table 5.
The tracking performance of nominal MPC and offline GP-MPC degrades under the influence of external disturbances. Due to the integrator, the PID algorithm exhibits a certain interference compensation effect, which maintains nearly unaltered tracking performance. The tracking performance of offline GP-MPC is significantly degraded. Compared with the over 70% RMSE reduction achieved without external interference, the RMSE reduction is now only 20%. Relative to PID and nominal MPC, the position tracking error of offline GP-MPC is only slightly reduced, and the yaw angle error is increased. The online GP-MPC compensates for the external interference by collecting the real-time motion data of the AUV, which achieves excellent tracking performance (the RMSE of the position and yaw angle are 0.008 m and 0.011 rad, respectively). Consequently, the RMSE and ME of the position are reduced by more than 60%, and the RMSE and ME of the yaw angle are reduced by more than 90%. The simulation results demonstrate that the online GP-MPC has strong robustness against constant external interference.
4.2.2. Time-Varying Disturbance
Considering the time-varying disturbances in the X-axis, Y-axis, and Z-axis of the world coordinate system , to evaluate the disturbance rejection ability of different controllers under repeatable conditions, a bounded sinusoidal time-varying disturbance is adopted in this simulation case. Sinusoidal and bounded time-varying disturbances are commonly used as benchmark disturbances in underwater vehicle control studies because they provide reproducible disturbance conditions for controller comparison. It should be noted that this disturbance model is a simplified benchmark rather than a complete representation of real ocean current dynamics. The purpose of this case is to examine whether the online GP-MPC can update the residual model using recent closed-loop data and improve tracking performance under time-varying external forces.
The specific expression can be described as follows:
The simulation result and tracking errors are shown in
Figure 13 and
Figure 14, respectively. The RMSE and ME are shown in
Table 6.
The RMSE of the position and yaw angle increases to 0.037 m and 0.76 rad, which indicates that PID exhibits poor robustness to time-varying external disturbances. The nominal MPC also becomes less effective, leading to an increase in the RMSE of the position and yaw angle to 0.051 m and 0.426 rad, respectively. The offline GP-MPC shows better tracking performance compared with PID and nominal MPC. The RMSE of the position and yaw angle exhibits reductions of 46% and 77%. The online GP-MPC utilizes real-time data to enhance the predictive model and compensate for external interference. The RMSE of the position and yaw angle shows reductions of 68% and 95%, which shows strong robustness to external time-varying disturbances.
4.3. With Current Disturbance and Initial Error
The lemniscate trajectory is translated forward to the X-axis by 1.5 m and the Z-axis by 0.5 m. Thus, the trajectory can be expressed as:
The external time-varying disturbance in Equation (31) is added. The lemniscate trajectory tracking task in the presence of time-varying disturbance and initial errors is simulated. The simulation result and tracking errors are shown in
Figure 15 and
Figure 16, respectively. The RMSE and ME are shown in
Table 7.
The PID algorithm exhibits a slow response speed, which fails to track the reference trajectory by the end of the simulation. MPC-based algorithms show faster convergence, with position errors stabilizing after 5 s. The position error of nominal MPC converges to the range of 0.1 m after 4.5 s, but the yaw angle error fails to converge. The position error of the offline GP-MPC converges to the range of 0.03 m after 3 s, and the yaw angle error converges to the range of 0.2 rad after 5 s. The position error of the online GP-MPC converges to the range of 0.15 m after 1.5 s, and the yaw angle error converges to the range of 0.1 rad after 1.5 s. The simulation results show that the GP-MPC algorithms employed in this paper exhibit smaller tracking errors, stronger robustness, and faster response speeds. In the comparison of the two GP-MPC algorithms, the online GP-MPC algorithm demonstrates superior tracking performance.
4.4. Comparative Discussion of Offline and Online GP-MPC
To further clarify the advantage of the online residual update, a direct comparison between offline GP-MPC and online GP-MPC is summarized in
Table 8.
Under constant current disturbance, the online GP-MPC reduces the position RMSE from 0.017 m to 0.008 m and the yaw RMSE from 0.410 rad to 0.011 rad compared with the offline GP-MPC. Under time-varying disturbance, the online update reduces the position RMSE by 40.0% and the yaw RMSE by 80.0%. When both time-varying disturbance and initial error are considered, the improvement in position RMSE is relatively moderate, but the yaw RMSE is still reduced by 75.0%.
Figure 17 shows the normalized RMSE comparison between offline GP-MPC and online GP-MPC under disturbance and initial-error conditions. Each metric is normalized by the corresponding offline GP-MPC result. Under constant disturbance, the online GP-MPC reduces the position RMSE and yaw RMSE by 52.9% and 97.3%, respectively. Under time-varying disturbance, the corresponding reductions are 40.0% and 80.0%. When both time-varying disturbance and initial error are considered, the position RMSE improvement is relatively small, mainly because the initial position offset dominates the transient position error.
Nevertheless, the yaw RMSE is still reduced by 75.0%. These results demonstrate that the online residual update improves the robustness of GP-MPC, especially for yaw tracking under time-varying disturbances.
5. Real-Time Experimental Results
To validate the effectiveness and robustness of the proposed control solution, multiple experimental trials are conducted in an indoor pool. The AUV is controlled by a low-level control unit, which uses an STM32F407 microcontroller to acquire sensor data and control the thruster motors. A Jetson Xavier NX single-board computer handles high-level control modules and other functions such as vision and planning. The STM32F407 and Jetson Xavier NX communicate through a serial interface.
Table 9 details the main characteristics of the AUV used in the experiments.
The numerical simulations and physical experiments serve different but complementary purposes in this study. The simulations are designed to systematically evaluate the controller under different trajectories, velocities, external current disturbances, and initial errors, whereas the pool experiments are mainly used to validate the real-time implementation feasibility of the proposed GP-MPC framework on the physical AUV. During the trials, the Oqus 700+ optical motion capture cameras are used to provide position and velocity feedback for the AUV when it operates on the water surface. This system can provide position feedback within a 2 m × 2 m tracking range at a frequency of 100 Hz, and the real-time state information is transmitted to the motion control system through Qualisys Track Manager software integrated with a self-developed Robot Operating System 2 (ROS2) package. Since the Oqus 700+ optical motion capture system can only track markers above the water surface, the physical experiments are limited to closed-loop motion control in three degrees of freedom on the water surface. Therefore, the experimental trajectories are scaled and simplified compared with the simulation trajectories to ensure safe and reliable operation within the available sensing range. The real experiments do not aim to reproduce all simulation cases exactly, but to verify whether the proposed controller can be implemented and executed reliably on the physical platform. The same RMSE and ME metrics are used in both simulation and experimental evaluations. The experimental setup is illustrated in
Figure 18.
The optical cameras capture the trajectories of the marked spheres and send the data to a shore-based PC via Ethernet. The Qualisys Track Manager software 2023 processes this data to determine the state of the AUV and transmits it via the Transmission Control Protocol (TCP) to an Ubuntu 20 virtual machine on the PC. The ROS2 Foxy software within the virtual machine receives the AUV state information and executes the control algorithm. It then sends motor commands via power line communication to the Xavier, which drives the AUV and forms a closed-loop control system.
The six-DOF formulation in Equation (1) is used as the general modeling basis. Under the symmetry and hydrostatic assumptions stated in this section, roll and pitch are passively stabilized and are not included in the predictive control state. Therefore, the simulation controller is designed for a reduced four-DOF model . In the pool experiments, the optical motion capture system can only track markers above the water surface; therefore, the depth channel is kept fixed, and the real-time closed-loop validation is restricted to surface three-DOF motion . This limitation does not change the GP-MPC formulation, but it means that the experiments verify the real-time feasibility of the GP-corrected MPC framework rather than full underwater six-DOF control.
The primary objective of Gaussian process-based model predictive control is to accurately track the predefined trajectory in the presence of parametric uncertainties. To demonstrate the advantages of the proposed algorithm, a comparative analysis was conducted, which included evaluations of PID, nominal MPC, and GP-MPC.
5.1. Control Methods in Comparative Experiments
5.1.1. Cascade PID
In the comparative experiments, a cascade PID controller is used as the traditional control baseline. The PID parameters are tuned through repeated closed-loop trials to obtain the best performance for each experimental task.
5.1.2. Nominal MPC
The design steps for the MPC-based horizontal position control experiment are largely consistent with those that are employed in the previous simulations. During the modeling of the AUV, depth control is ignored, and the focus is placed solely on the three degrees of freedom in horizontal motion. The nominal model, which is used as the predictive model, applies the actual specifications of the AUV for mass, moments of inertia, thruster angles, and lever arms, without accounting for hydrodynamic coefficients.
After extensive experimentation and parameter tuning, the state penalty matrix is set as , the terminal state penalty matrix is set as , and the control input penalty matrix is set as . Both the prediction horizon and control horizon are set to 5, with a control frequency of 10 Hz. The thrust output of the underwater thrusters is constrained between −15 N and 15 N. Multiple tests are conducted to determine the velocity limits for each degree of freedom, resulting in a limit of −1 m/s to 1 m/s for X-axis motion, −0.5 m/s to 0.5 m/s for Y-axis motion, and to for yaw rate. The state constraints are therefore selected as and .
5.1.3. GP-MPC
The primary distinction between GP-MPC and nominal MPC lies in the use of GPR to refine the robot’s motion control model. In the practical experiments, the PID algorithm and the nominal MPC algorithm are first used to drive the AUV for various tasks. In order to fit the motion control model, it is necessary to obtain the AUV’s acceleration errors. Since the optical tracking system cannot provide real-time acceleration data, the velocity error can be obtained by using the following equation:
where
represents the actual AUV velocity measured at time step
;
denotes the AUV velocity predicted by the nominal model at time step
; and
is the time interval.
The offline GP-MPC algorithm requires the collection of AUV motion data to generate a training dataset , with input and output content largely consistent with the simulation. The primary difference lies in using the approximation of acceleration error obtained from Equation (32) as the output. Additionally, since the control task involves three degrees of freedom on the water surface, the input and output dimensions have been adjusted according to the actual scenario. This dataset is then used to fit the corrected hybrid motion control model.
To ensure that the data used for GPR training is comprehensively distributed across the input space, we developed an algorithm specifically designed to select optimal training data points from the complete set of motion state data.
Due to the varying upper and lower bounds of the motion state variables across different axes, normalization of the motion data is required to prevent significant discrepancies in scale. Since each state variable and control input has distinct bounds, this paper employs the widely used min–max normalization method, which can be described as follows:
where
and
represent the maximum and minimum boundaries of the data to be normalized.
is the value before normalization, and
is the value after normalization.
To select data points, it is essential to calculate the distance between them as the selection criterion. The Euclidean distance is used for this purpose, as described below:
where
and
represent data points in vector form, with the Euclidean distance defined as the magnitude of the vector obtained by subtracting one from the other.
After preprocessing the motion state data, a dataset selection algorithm is applied to filter out a well-distributed set of motion state data to form the training dataset. The specific selection method involves first iterating through all data points and calculating the Euclidean distance between each pair. A minimum distance threshold is then defined between data points. The data points are iterated through again, and if the Euclidean distance between the current data point and all points in the training set is greater than , it is added to the training dataset. Ultimately, all data points in the selected dataset must have Euclidean distances greater than . The size of the dataset can be adjusted by modifying the distance threshold .
Considering both model accuracy and computational complexity, the final dataset size selected for hyperparameter training is 100, while the dataset size for constructing the GPR fitting equation is 20. The constraints, penalty matrices, control frequency, prediction horizon, and control horizon used in the controller design are identical to those in the nominal MPC experiment.
5.2. Scenario 1: Circular Trajectory Tracking Experiment
In this scenario, the AUV is programmed to execute a low-speed circular motion, and the desired trajectory is defined as follows:
During data processing, the yaw angle is normalized to the standard
to
range via a modulo operation.
Figure 19 illustrates the tracking performance of the three controllers on a circular trajectory under conditions of parametric uncertainty.
As shown in
Figure 19 and
Figure 20, the MPC-based methods exhibit stable control performance overall, without significant sudden fluctuations and with relatively small deviations from the desired trajectory.
The performance comparison
Table 10 shows that nominal MPC reduces the root mean square error and maximum error for each axis by approximately 40% when compared with PID. GP-MPC, which uses a data-driven approach to compensate for model inaccuracies, further reduces the overall root mean square error and maximum error by over 60%, resulting in a trajectory that more closely follows the desired path. This demonstrates that the GP-MPC algorithm has a clear advantage in executing complex multi-degree-of-freedom tracking control tasks.
5.3. Scenario 2: Trajectory Tracking Experiment with Time-Varying Velocity
In order to analyze the tracking performance of different algorithms on a time-varying velocity trajectory, the AUV is programmed to follow a trajectory defined by a velocity function. The desired yaw angle of the AUV is set to remain constant, while the AUV tracks a relatively complex trajectory through its X-axis and Y-axis movements. The desired trajectory can be described as:
Figure 21 shows the tracking curves for the variable-speed trajectory, which are executed by different methods.
Figure 22 presents the tracking errors for each axis, which are determined by analyzing the motion data from different algorithms.
Figure 21 and
Figure 22 show that the MPC-based methods have better performance in reducing position tracking errors; however, they exhibit larger yaw angle tracking errors. This is because the penalty matrix assigns a higher penalty to position errors, which causes the controller to minimize these errors. The significant resistance encountered during Y-axis translation forces the AUV to adjust its yaw angle to maintain accurate position tracking.
According to
Table 11, nominal MPC reduces the position error by nearly 25 mm compared with the PID algorithm, although it increases the average yaw angle error by 0.03 rad, which accounts for 45% of the total position error in the PID algorithm. The actual trajectory is more closely aligned with the desired trajectory, particularly at the trajectory’s edges. It is clear that position error is generally more pronounced in trajectory tracking. When considered across all axes, the control performance provided by the proposed method is reasonable and near optimal.
Similarly, GP-MPC reduces the position error by nearly 75 mm, which represents 70% of the total position error of the PID algorithm, although it increases the average yaw angle error by 0.12 rad. The overall trajectory nearly coincides with the desired path. GP-MPC has better performance than both PID and nominal MPC in overall position tracking accuracy, which makes it the most effective algorithm for tracking errors across all axes.