Next Article in Journal
SkyPin: Benchmarking Target Geo-Localization from UAV Imagery on 2.5D Maps
Previous Article in Journal
Trajectory Planning Framework for Drones Under Sensor Occlusion in Unknown Indoor Environments
Previous Article in Special Issue
Non-Acoustic Detection and Localization of Large Underwater Targets for Unmanned Platforms: A Review of Wake-Based, Magnetic, and Gravity Anomaly Methods
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Trajectory Tracking Control of Autonomous Underwater Vehicles Using GP-Based Model Predictive Control

1
State Key Laboratory of Ocean Sensing, Ocean College, Zhejiang University, Zhoushan 316021, China
2
Kunming Branch of the 705 Research Institute, China State Shipbuilding Corporation Limited, Kunming 650032, China
3
School of Electrical and Information Engineering, Jiangsu University, Zhenjiang 212013, China
*
Authors to whom correspondence should be addressed.
Drones 2026, 10(7), 498; https://doi.org/10.3390/drones10070498
Submission received: 30 March 2026 / Revised: 11 May 2026 / Accepted: 26 May 2026 / Published: 30 June 2026
(This article belongs to the Special Issue Advances in Autonomous Underwater Drones: 2nd Edition)

Highlights

What are the main findings?
  • The proposed offline and online Gaussian process-based model predictive control (GP-MPC) algorithms achieve reductions of over 40% in the position and yaw tracking RMSE and ME of AUVs across diverse tasks and outperform conventional PID and nominal MPC controllers. This performance is fully verified through systematic simulations and real-time pool experiments.
  • The online GP-MPC uses real-time AUV data to refine its predictive model and achieve enhanced robustness against underwater disturbances and accelerated convergence under sharp trajectory changes and initial errors.
What are the implications of the main findings?
  • This low-data-demand data-driven GP-MPC framework resolves the critical challenges of inaccurate hydrodynamic modeling and insufficient disturbance compensation in traditional AUV control.
  • The proposed offline and online GP-MPC algorithms exhibit significant engineering application potential and support the reliable high-precision operation of AUVs in complex marine environments, such as marine resource exploration and offshore facility maintenance.

Abstract

In this paper, a Gaussian process-based model predictive control (GP-MPC) method is proposed, which aims to enhance the trajectory tracking performance of autonomous underwater vehicles (AUVs). This method can compensate for internal errors and external disturbances based on a limited amount of data. Firstly, numerical models of the AUV are presented. Then, the offline GP-MPC algorithm and online GP-MPC algorithm are presented and described. Meanwhile, the current disturbances and initial errors are also considered. The circular trajectory, L-shaped steering trajectory, and lemniscate trajectory are tracked to evaluate the trajectory tracking performances of different algorithms. Compared with proportional–integral–derivative (PID) and nominal MPC algorithms, the GP-MPC algorithms show reduced root mean square error (over 40%) and reduced maximum error (over 40%) in both position and yaw angle when performing different trajectory tracking tasks. Finally, real-time pool experiments are conducted to validate the implementation feasibility of the GP-corrected MPC framework on a physical AUV under surface three-degrees-of-freedom motion, while the online GP-MPC is evaluated through numerical simulations.

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.

2. Numerical Model

2.1. Modeling of AUVs

In order to describe the kinematic model of an AUV, the world coordinate frame (I) and the body coordinate frame of the AUV (B) are defined, as shown in Figure 1. The attitude and position vector of the AUVs in the world coordinate frame I can be expressed as η = η 1 T , η 2 T T R 6 , where η 1 = x , y , z T is the position vector, and η 2 = ϕ , θ , ψ T is the orientation vector. The velocity and angular velocity vector of the AUVs in the body coordinate frame V can be expressed as ν = ν 1 T , ν 2 T T R 6 , where ν 1 = u , v , w T is the velocity vector, and ν 2 = p , q , r T is the angular velocity vector.
In marine craft modeling, the North-East-Down (NED) frame is commonly adopted following the SNAME/Fossen convention. In this study, however, an ENU-type laboratory inertial frame is used because the optical motion capture system and the ROS2-based experimental interface provide position feedback in the laboratory coordinate convention. The AUV is treated as a rigid body with six degrees of freedom in an inertial frame. The model of the AUV can be described as follows [39]:
η ˙ = J η τ c + T τ = M ν ˙ + C ν ν + D ν ν + g η ,
where J η is the rotation transformation function from the body coordinate system B to the world inertial coordinate system I ; M R 6 × 6 is the inertia matrix; C ν R 6 × 6 is the Coriolis matrix; D ν R 6 × 6 is the damping matrix; g η R 6 is the restoring force (the gravity and buoyancy effects); τ c = X c , Y c , Z c , 0,0 , 0 T R 6 is the external current disturbance force; τ = F 1 F N T R N is the thrust vector generated by the underwater propellers; N is the number of propellers; T is the thrust allocation matrix, which depends on the position and orientation of each propeller.
In order to reduce the complexity of the model, the following assumptions are given:
(1)
The center of gravity of the AUV is chosen as the origin O b of the body coordinate system B . The projection of the AUV’s buoyancy center on XOY coincides with the origin. The gravity and buoyancy forces of the AUV are equal;
(2)
The mass distribution of the AUV is symmetric about the X O Z and Y O Z planes in the body coordinate frame;
(3)
The high-order damping is ignored;
(4)
The AUV is equipped with six propellers, and the forward and reverse OARS are utilized to counteract the anti-torsion torque. The propellers are positioned in the X O Y plane of the body coordinate, which are symmetric with respect to the X-axis and Y-axis. The specific distribution is shown in Figure 2.
In this paper, the external current disturbance is assumed to be a bounded irrotational ocean current in the world coordinate frame. The thrust vectors can be described as:
τ = F 1 , F 2 , F 3 , F 4 , F 5 , F 6 T      τ c = X c , Y c , Z c T ,
where τ R 6 is the thrust vector of the AUV propellers.
Based on the above assumptions, it can be assumed that the AUV has a restoring force to adjust the roll and pitch angles. Thus, the angle ϕ   , θ and angular velocity p , q are considered equal to zero. The system state vector can be defined as:
x = η T , v T T      η = x , y , z , ψ T      ν = u , v , w , r T ,
The simplified dynamics model of the AUV can be described as follows:
x ˙ = f 1 x + T A τ + T B τ c ,
f 1 ( x ) = u c o s ( ψ ) v s i n ( ψ ) v c o s ( ψ ) + u s i n ( ψ ) w r 1 m 11 ( m 22 v r + X u u + x u | u | | u | u ) 1 m 22 ( m 11 u r + Y v v + Y v | v | | v | v ) 1 m 33 ( Z w w + Z w | w | | w | w ) 1 m 44 ( ( m 11 m 22 ) u v + N r r + N r | r | | r | r ) ,
T A = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 s i n ( θ T ) m 11 s i n ( θ T ) m 11 s i n ( θ T ) m 11 s i n ( θ T ) m 11 0 0 c o s ( θ T ) m 22 c o s ( θ T ) m 22 c o s ( θ T ) m 22 c o s ( θ T ) m 22 0 0 0 0 0 0 1 m 33 1 m 33 d m 44 d m 44 d m 44 d m 44 0 0 ,
T B = 0 0 0 0 0 0 0 0 0 0 0 0 1 m 11 0 0 0 1 m 22 0 0 0 1 m 33 0 0 0 ,
where x R 8 and τ R 6 are the state and control variables of the system, respectively; m i i i = 1 4 are the mass terms, including the mass of the AUV body, and the added mass; X u , Y v , Z w , N r are the negative linear damping coefficients; X u u , Y v v , Z w w , N r r denote the negative quadratic damping coefficients, respectively; τ c is the external disturbance, which is modeled as a time-varying force acting on the AUV body; θ T is defined as the angle between the propeller and the Y-axis; and d is defined as the moment arm of a propeller to the origin of the body coordinate frame.

2.2. Problem Description

The trajectory tracking control of the AUV needs an accurate dynamics model. There are two difficulties in establishing the dynamics model of an AUV:
  • The dynamics model is a complex MIMO system with multiple hydrodynamic coefficients, which require computational fluid dynamics (CFD) simulation or towed tank experiments to determine. However, CFD simulation often suffers from the problem of inaccurate coefficients, and towed tank experiments often require expensive experimental equipment.
  • External current disturbances are difficult to measure.
To solve the above-mentioned problems, a data-driven method is proposed to enhance modeling accuracy and compensate for external disturbances. The dynamics model of an AUV is decomposed into two parts: nominal dynamics and residual dynamics. The nominal dynamics are simplified dynamics derived from the AUV dynamics model. The residual dynamics capture the residual error between the nominal and the real dynamics. The model of the AUV can be written as:
x ˙ = f t x , τ = f k ( v ) f d _ n ( v , τ ) + 0 f d _ e ( v , τ ) + f d i s ( w t ) ,
where f k v denotes the standard kinematic equation; f d _ n ( v , τ ) denotes the nominal dynamics obtained by the simplified analysis of the AUV dynamics; f d _ e ( v , τ ) represents the residual error between the nominal dynamics and the real dynamics; and f d i s w t denotes the external disturbance factors, mainly the external current disturbance.
Neglecting the hydrodynamic part, the nominal dynamics model is expressed as:
f d _ n v , τ = 1 m ( F 1 s i n ( θ T ) + F 2 s i n ( θ T ) F 3 s i n ( θ T ) F 4 s i n ( θ T ) ) 1 m ( F 1 c o s ( θ T ) F 2 c o s ( θ T ) + F 3 c o s ( θ T ) F 4 c o s ( θ T ) ) 1 m ( F 5 + F 6 ) 1 I z ( F 1 d F 2 d F 3 d + F 4 d ) + v r u r 0 0 ,
where m is the mass of the AUV body, and I z is the moment of inertia of the AUV in the Z-axis.

2.3. Using Gaussian Process Regression to Correct the Nominal Model

Gaussian process regression (GPR) is a non-parametric regression model [40]. A Gaussian process is a set of random variables that have a joint Gaussian distribution for any finite subset.
The training dataset can be described as follows:
D t r a i n = X t r a i n = X t r a i n 1 , X t r a i n 2 , , X t r a i n M T , Y t r a i n = Y t r a i n 1 , Y t r a i n 2 , , Y t r a i n M T , X t r a i n i = ν i T , τ i T T R 10     Y t r a i n i = ν ˙ e r r o r i R 4      i 1 , M , ν ˙ e r r o r _ i = ν ˙ r _ i ν ˙ n _ i
where ν and τ are the control input and real speed state of the AUV; ν ˙ r is the real acceleration state; ν ˙ n is the nominal acceleration state predicted by the nominal dynamics model; ν ˙ e r r o r is the residual error between ν ˙ r and ν ˙ n ; and M is the data size.
GPR has multidimensional inputs and a one-dimensional output. Each dimension of the output is independent. For the d t h dimension output, the mean function is considered as zero. The squared exponential (SE) kernel function is selected as the covariance function [40]:
k d x , x = δ f e x p 1 2 x x T L x x ,
where δ f is the variance of the data; L R 10 × 10 is a positive diagonal matrix; and δ f ,   L are hyperparameters that need to be optimized by the training data.
The SE kernel is selected in this study because the residual dynamics to be learned are expected to vary smoothly with respect to the velocity and thrust inputs within the bounded operating range of the AUV. The residual term represents the difference between the nominal model and the actual/simulated response, rather than discontinuous switching dynamics. Therefore, a smooth covariance function is suitable for describing the correlation between nearby input samples. The SE kernel is also one of the most widely used covariance functions in Gaussian process regression and has been commonly adopted in GP-based dynamics learning and GP-MPC studies due to its smoothness assumption, universal approximation property, and computational simplicity.
In this work, the automatic relevance determination form of the SE kernel is used, in which different input dimensions have different length-scale hyperparameters. This allows the GP model to assign different relevance to velocity and thrust components when learning the residual dynamics. It should be noted that the present study does not claim that the SE kernel is globally optimal for all underwater conditions. For more complex real-sea environments with non-smooth, non-stationary, or depth-dependent hydrodynamic behavior, alternative kernels such as Matérn kernels or composite kernels may be more appropriate. A systematic comparison of different kernel functions will be investigated in future work.
Based on the definition of GPR, the prior distribution of the d t h dimension GPR output can be given as:
Y d = N 0 , K X t r a i n , X t r a i n d K X t r a i n , X t r a i n d i j = k d x t r a i n _ i , x t r a i n _ j ,
Y d R M K X t r a i n , X t r a i n d R M × M ,
where K X t r a i n , X t r a i n d is the covariance matrix obtained by the squared exponential kernel function.
For a set of input x t e s ,   t , the prior distribution based on GPR can be expressed as:
y t e s t , d Y d = N 0 0 , K x t e s t , x t e s t d K x t e s t , X t r a i n d K X t r a i n , x t e s t d K X t r a i n , X t r a i n d + I δ d 2 ,
K x t e s t , x t e s t d = k d x t e s t , x t e s t K X t r a i n , x t e s t d = k d X t r a i n , x t e s t K x t e s t , X t r a i n d = ( K X t r a i n , x t e s t d ) T ,
where δ d is the noise variance.
Therefore, the conditional distribution of the d t h dimension output can be expressed as:
y t e s t , d ~ N μ t e s t , Σ t e s t μ t e s t = K x t e s t , X t r a i n d K X t r a i n , X t r a i n d + I δ d 2 1 Y d Σ t e s t = K x t e s t , x t e s t d K x t e s t , X t r a i n d K X t r a i n , X t r a i n d 1 K X t r a i n , x t e s t d ,
For a new set of inputs X t e s t = ν t e s t T , τ t e s t T T , the fit equation based on GPR can be written as:
Y t e s t = f g p ν t e s t , τ t e s t Y t e s t = Y t e s t , 1 , Y t e s t , 2 , Y t e s t , 3 , Y t e s t , 4 ,
The mean of the conditional distribution is selected as the prediction. Thus, the fitting equation for the output in the d t h dimension ( d 1,4 ) can be specified:
Y t e s t , d = K x t e s t , X t r a i n d K X t r a i n , X t r a i n d + I δ d 2 1 Y d ,

2.4. Data Collection and Hyperparameter Training

The performance of GPR-based equation fitting is significantly influenced by the quality of the training dataset. Thus, the data points need a reasonable distribution to reflect the residual errors.
The maximum forward and reverse speeds of each axis of the AUV and the maximum forward and reverse thrusts of the propeller are formulated as follows:
ν m i n ν ν m a x                          τ m i n τ τ m a x ,
The Latin hypercube sampling (LHS) method [41] is employed to select the training data points, which ensures an even distribution in each input dimension. The number of training data points is M . For the output of the d t h dimension GPR, the hyperparameters are θ h y p e r = { L , δ f , δ d } . Based on the Bayes rule [40], the posterior distribution can be expressed as:
p ( θ h y p e r Y d , X t r a i n ) = p ( Y d X t r a i n , θ h y p e r ) p ( θ h y p e r ) p ( Y d X t r a i n ) ,
The optimal hyperparameter θ * based on the maximum likelihood estimation (MLE) and the log marginal likelihood can be written as [40]:
θ * = a r g m a x θ l o g p ( Y d X t r a i n , θ h y p e r ) = a r g m a x θ 1 2 Y d T K X t r a i n , X t r a i n d 1 Y d 1 2 l o g | K X t r a i n , X t r a i n d | ,

2.5. MPC for the Trajectory Tracking Control of AUVs

The desired 3D trajectory is a time-varying function of four position and four velocity degrees of freedom ( η d , ν d R 4 ). The function can be expressed as follows:
x d = f x ( t ) y d = f y ( t ) z d = f z ( t ) ψ d = f ψ ( t ) u d = f u ( t ) v d = f v ( t ) w d = f w ( t ) r d = f r ( t ) ,
where η d = x d , y d , z d , ψ d T is the position state, and ν d = u d , v d , w d , r d T is the velocity state.
The desired path is expressed in the body coordinate system B , and the desired velocity is obtained by differentiation.
The dynamics model is established by using the fitting equation of GPR:
x ˙ = f c o r ( x , τ ) = f k ( v ) f d _ n ( v , τ ) + 0 f g p ( v , τ ) ,
The differential equation is discretized by the fourth-order Runge–Kutta method [42]:
x k + 1 = f R k 4 x k , τ k , d t ,
where d t is the discrete time increment, x k and τ k are the current state and input of the AUV, and x k + 1 is the state at the next time step.
The prediction step and control step are N . The desired state and the time steps are obtained from Equation (18), given the current time t , the discrete time interval d t , and the prediction step N . The predicted state x k k 1 , N in the N time steps is obtained from Equation (20), given the current state x 0 and the control input τ k k 0 , N 1 in the N time intervals. The quadratic cost function is defined as follows:
J x 0 , τ = x e N Q e n d x e N + k = 0 N 1 x e k Q x e k + τ k R τ k { x e 0 , x e N } = { x 0 x d 0 , , x N x d N } ,
where Q , R , and Q e n d denote the positive diagonal matrices of state penalty, control penalty, and terminal state penalty, respectively; τ = τ 0 , τ 1 , , τ N 1 is the set of control inputs.
The essence of the MPC controller is to solve an optimal control problem (OCP) and obtain the optimal control output at the present time. The OCP is formulated as follows:
m i n τ x e N Q e n d x e N + k = 0 N 1 x e k Q x e k + τ k R τ k ,
s . t . x k + 1 = f R K 4 x k , τ k , d t x e 0 , x e N = x 0 x d 0 , , x N x d N τ m i n τ k τ m a x x m i n x k x m a x k 0 , N 1
where t is the current time, x 0 is the initial state, { x m i n , x m a x } is the state constraints, and { τ m i n , τ m a x } is the control input constraints.
The optimization solution τ * is calculated for each control step, and τ 0 is applied as the control input. At the next time step t + d t , the state is collected as the new initial state x 0 , and the optimization problem is solved to obtain the new optimal control input τ 0 . The real-time trajectory tracking control of the AUV is achieved by repeating this process.

3. Simulation Setup and Controller Parameters

3.1. Simulation Platform Settings

The simulation parameters are detailed in Table 1 and are derived from the parameter identification results of the BlueRov2 as presented in [43]. A simulation platform based on Python 3.10 is established to validate the performance of different control algorithms. This platform is used to evaluate the trajectory tracking control performance of AUVs under unknown current disturbances. Various trajectory tracking tasks are executed at different speeds and with external disturbances. The performance differences between the proposed GP-MPC algorithm and the traditional cascade PID and MPC algorithms are compared.
The thrust from each of the AUV thrusters serves as the direct control input. The underlying controller determines the required thrust. These limits are common parameters of propellers available in the market. The operational area of the AUV is set as 20  m × 20  m × 15  m , and the four-degrees-of-freedom velocity limits of the AUV are set as:
ν m i n = { u m i n , v m i n , w m i n , r m i n } = { 2.5  m / s , 1.5  m / s , 1  m / s , π 2  rad / s } ν m a x = { u m a x , v m a x , w m a x , r m a x } = { 2.5  m / s , 1.5  m / s , 1  m / s , π 2  rad / s } ,

3.2. Cascade PID Simulation Settings

In order to demonstrate the superiority of the proposed control algorithm, the traditional cascade PID control algorithm is also implemented in the simulation. The position loop and the speed loop of each axis are configured separately.
The input of the position loop is the error between the desired position and the actual position, and the output is the desired velocity. The input of the velocity loop is the error between the desired velocity and the current velocity, and the output is the thrust control command. In order to enhance the tracking performance of PID, its parameters are optimized for different trajectories. The flowchart of the cascade PID is shown in Figure 3.
In Figure 3, η d represents the desired position in real time, while η refers to the position feedback from the robot. ν denotes the velocity state feedback of the robot. τ is the output of the actuator, which is responsible for executing the control command.

3.3. MPC Setting

3.3.1. Nominal MPC Design

Due to the difficulties in constructing the predictive model, simplified dynamics models are commonly utilized to build the conventional MPC controller. The constraints of the MPC controller are the same, which are described in Equation (23). The prediction step N is set to 5. To enhance the trajectory tracking performance of the AUV, the control penalty matrix is set to be as small as possible. The state penalty matrix is defined as Q = d i a g 10,10,10,1 , 0.1,0.1,0.1,0.1 , and the control penalty matrix is defined as R = d i a g 1 e 3 , 1 e 3 , 1 e 3 , 1 e 3 , 1 e 3 , 1 e 3 , 1 e 3 , 1 e 3 .
The CasADi tool [44] and Interior Point Optimizer (IPOPT) solver [45] are used to build the MPC controller. In this study, the computing device is equipped with an AMD 5800H and 16G of memory.

3.3.2. Offline GP-MPC

The training dataset of the offline GP-MPC is constructed based on the simulation results. The training data points are selected by the Latin hypercube sampling method. The simulation model and the nominal model are used to obtain the residual errors. In total, 100 sets of data are selected to train the hyperparameters of GPR.
To balance prediction accuracy and computational efficiency, 100 data samples are used to train the GPR hyperparameters, while 20 representative samples are selected from the collected raw motion data as a compact support set for constructing the GP fitting equation inside the MPC prediction model. These 20 samples are not arbitrary data points but are selected to cover the bounded operating range of the AUV as evenly as possible. This compact formulation reduces the computational burden of repeated GP evaluations during MPC optimization. Therefore, the use of 20 samples is an accuracy–complexity trade-off for real-time implementation rather than a claim of unrestricted generalization.
For clarity, the term offline GP-MPC in this study refers to the controller in which the GP residual model is constructed before closed-loop execution and remains fixed during operation. The pre-collected data are used to learn the residual dynamics between the nominal model and the reference simulation/experimental response. After the GP residual fitting function is obtained, it is directly embedded into the MPC prediction model. During closed-loop control, no new samples are added to the GP dataset, and the residual fitting function is not updated online. Therefore, the offline GP-MPC mainly compensates for repeatable model mismatch within the operating range covered by the pre-collected data. The prediction horizon, cost function, and constraints are kept the same as those of the nominal MPC so that the performance improvement can be attributed to the GP-based residual compensation.

3.3.3. Online GP-MPC

In order to compensate for the external interference, the training dataset of the online GP-MPC is divided into two parts: the offline dataset and the online dataset.
The offline dataset contains fifteen groups of offline collected data, while the online dataset consists of five groups of data that need to be collected. During the operation of the AUV, the control input and motion state are sampled in each control interval. When the online dataset consists of fewer than five groups, all of the online data are retained. If the online dataset consists of five groups, the earliest online data are discarded and the latest data are updated to the online dataset. The online dataset is updated at each control interval, and the error equation is refitted with the updated online dataset.
In contrast to the offline GP-MPC, the online GP-MPC updates the residual model during closed-loop operation. The offline data provide an initial residual model before the controller starts, while the online data reflect the most recent motion response of the AUV. At each control interval, the measured state and the applied control input are used to calculate the latest residual between the nominal acceleration and the actual acceleration. This new residual sample is then added to the online dataset. When the online dataset reaches the prescribed maximum size, the oldest online sample is removed to keep the computational complexity bounded. In this way, the online GP-MPC can adapt the residual compensation term to time-varying disturbances and recent model mismatch.
Figure 4 shows the flowchart of the nominal MPC, offline GP-MPC, and online GP-MPC. In Figure 4, x d = [ η d , v d ] T represents the desired state, while x = [ η , v ] T indicates the feedback state provided by the robot. The variable τ is the actuator’s output, which is responsible for executing the control command. The three schemes are shown as nested structures, where the nominal MPC is the basic controller, the offline GP-MPC augments it with an offline-trained GP residual model, and the online GP-MPC further extends it with an online residual-learning mechanism.
In the conventional MPC framework (inner dashed blue box), the desired state x d is used as the reference input of the rolling optimization module. Based on the nominal model, the controller predicts the future state evolution over the prediction horizon and solves an optimization problem at each control interval. The optimizer then generates the control action, and the first control input τ is applied to the AUV. Under the influence of the applied thrust and external current disturbances, the AUV produces the actual state response x , which is fed back to the controller for the next optimization step. In this way, the nominal MPC achieves closed-loop trajectory tracking through repeated prediction, optimization, and feedback.
The offline GP-MPC scheme (cyan dashed box) enhances the conventional MPC by introducing a GP-based residual model. Before closed-loop operation, offline motion data are collected and used to train the GP model. This GP model learns the residual dynamics between the nominal model and the actual AUV response and is embedded into the prediction block to correct the nominal model. Therefore, compared with the nominal MPC, the offline GP-MPC can better compensate for repeatable modeling errors and improve prediction accuracy. However, during operation, the GP model remains fixed and is not updated with new data.
The online GP-MPC scheme (outer red dashed box) further improves the offline GP-MPC by adding an online learning mechanism. During closed-loop control, the measured state x and the applied input τ are continuously used to update the online dataset. The latest motion information is then employed to update the GP residual model, so that the prediction model can adapt to newly observed disturbances and time-varying uncertainties. As a result, the online GP-MPC preserves the model correction capability of the offline GP-MPC while additionally improving robustness and adaptability under changing operating conditions.

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:
R M S E = 1 M k = 1 M | e k | 2              M E = m a x | e k | ,
e k p o s = η d k p o s η t k p o s e k y a w = η d k y a w η t k y a w k 1 , N M = T / d t ,
where η d k p o s and η d k y a w are the position and yaw angle of the desired trajectory at the k time step, respectively; η t k p o s and η t k y a w are the position and yaw angle of the actual tracking trajectory at the k time step, respectively; T is the simulation running time; and d t 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 I with a zero yaw angle. The running time is set as T = 10   s , and the discrete time interval is set as d t   =   0.05   s . 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 r . Define the vertical velocity as v z , then the circular trajectory can be obtained as follows:
f x t = r s i n π 5 t f u t = π 5 r f y t = r r c o s π 5 t f v t = 0 f z t = v z t f ω t = v z f ψ t = π 5 t f r t = π 5 ,
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: r = 2  m , v z = 0.25  m / s ;
Case 2: r = 3 m , v z = 0.75  m / s .
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 90 and the v z changes from 0.25  m / s to 0.75  m / s at 5 s. The L-shaped trajectory can be described as follows:
f x t = 1.5 t        t < 5 7.5      t 5 f u t = 1.5 f y t =    0                                t < 5 1.5 t 7.5        t 5 f v t = 0 f z t =    0.25 t                                t < 5 0.75 t 2.5        t 5 f ω t =    0.25                    t < 5 0.75                    t 5 f ψ t = 0          t < 5 π 2        t 5 f r t = 0 ,
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 1 × 10 3  m and 0.02  r a d after 6.5 s. The errors of position and yaw angle of offline GP-MPC are reduced to the range of 5 × 10 3  m and 0.1  r a d 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:
f x t = 1.5 c o s π 5 t 1.5 f u t = 3 π 10 s i n π 5 t f y t = c o s π 5 t s i n π 5 t f v t = π 5 c o s 2 π 5 t s i n 2 π 5 t f z t = 0.5 s i n π 5 t f ω t = π 10 c o s π 5 t f ψ t = 0 f r t = 0 ,
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 I . The disturbance forces can be expressed as follows:
f x _ d i s t r u b t = 40         f y _ d i s t r u b t = 40         f z _ d i s t r u b t = 40 ,
The lemniscate trajectory is defined as follows:
f x t = 1.5 c o s π 5 t 1.5 f u t = 3 π 10 s i n π 5 t f y t = c o s π 5 t s i n π 5 t f v t = π 5 c o s 2 π 5 t s i n 2 π 5 t f z t = 0.5 t f ω t = 0.5 f ψ t = 0 f r t = 0 ,
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 I , 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:
f x _ d i s t r u b t = 75 s i n t f y _ d i s t r u b t = 75 c o s t f z _ d i s t r u b t = 50 s i n t ,
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:
f x t = 1.5 c o s π 5 t f u t = 3 π 10 s i n π 5 t f y t = c o s π 5 t s i n π 5 t f v t = π 5 c o s 2 π 5 t s i n 2 π 5 t f z t = 0.5 t + 0.5 f ω t = 0.5 f ψ t = 0 f r t = 0 ,
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 ( x , y , z , ψ ) . 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 ( x , y , ψ ) . 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 Q = d i a g { 10,10,10,0.01,0.01,0.01 } , the terminal state penalty matrix is set as Q e n d = d i a g { 30,30,30,0.03,0.03,0.03 } , and the control input penalty matrix is set as R = d i a g { 0.001,0.001,0.001,0.001 } . 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 π  r a d / s to π  r a d / s for yaw rate. The state constraints are therefore selected as x m i n = 1 , 1 , 100 π , 1 , 0.5 , π and x m a x = 1,1 , 100 π , 1,0.5 , π .

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:
a e k = v k + 1 v ^ k + 1 d t ,
where v k + 1 represents the actual AUV velocity measured at time step k + 1 ; v ^ k + 1 denotes the AUV velocity predicted by the nominal model at time step k + 1 ; and d t is the time interval.
The offline GP-MPC algorithm requires the collection of AUV motion data to generate a training dataset D a l l , 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:
x s c a l e = x x m i n x m a x x m i n ,
where x m a x and x m i n represent the maximum and minimum boundaries of the data to be normalized. x is the value before normalization, and x s c a l e 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:
d = x 1 x 2 ,
where x 1 and x 2 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 d m i n 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 d m i n , it is added to the training dataset. Ultimately, all data points in the selected dataset must have Euclidean distances greater than d m i n . The size of the dataset can be adjusted by modifying the distance threshold d m i n .
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:
f x t = 0.7 0.5 c o s π 4 t f y t = 0.1 0.5 s i n π 4 t f ψ t = π 4 t π ,
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:
f x t = 0.7 0.6 s i n t × π / 6 f y t = 0.4 s i n t × π / 4 f ψ t = 0 ,
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.

6. Conclusions

In this paper, Gaussian process-based model predictive control (GP-MPC) algorithms are proposed for AUV trajectory tracking control. A Python-based simulation platform is developed to evaluate the proposed controllers under circular, L-shaped, and lemniscate trajectories, including current disturbances and initial errors. Real-time pool experiments are also conducted on an open-frame AUV to validate the feasibility of the offline GP-MPC in surface three-DOF trajectory tracking. The main conclusions are summarized as follows:
(1)
Compared with cascade PID and nominal MPC, the proposed GP-MPC algorithms achieve better tracking accuracy by learning the residual dynamics between the nominal model and the actual/simulated AUV response. In different trajectory tracking tasks, the RMSE and ME are reduced by more than 40%.
(2)
The online GP-MPC improves disturbance compensation by updating the residual model with recent closed-loop data. Compared with offline GP-MPC, the online GP-MPC reduces the yaw RMSE by 97.3%, 80.0%, and 75.0% under constant disturbance, time-varying disturbance, and time-varying disturbance with initial error, respectively. This demonstrates the advantage of online residual updating under time-varying residual dynamics.
(3)
Under abrupt trajectory changes and initial tracking errors, GP-MPC shows faster convergence and better transient response than PID and nominal MPC. The online GP-MPC further improves adaptability by incorporating recent motion data through a sliding-window update.
(4)
The real-time pool experiments demonstrate that the offline GP-MPC can improve the trajectory tracking accuracy of the physical AUV under the current surface three-DOF experimental setup.
The present study still has several limitations. The physical experiments are limited to surface three-DOF motion due to the lack of reliable underwater feedback, so they validate the real-time feasibility of the GP-corrected MPC framework rather than full underwater six-DOF control. The online GP-MPC is currently validated through numerical simulations, and its closed-loop physical validation remains to be explored in future work. Future studies will focus on underwater localization, sparse/local online GP implementation, and benchmark validation under more realistic marine disturbances.

Author Contributions

Conceptualization, D.Z. and P.Q.; methodology, Z.S.; software, Y.W.; validation, X.T.; investigation, Y.J.; resources, D.Z. and P.Q.; data curation, H.L.; writing—original draft preparation, Y.W.; writing—review and editing, Y.W., Y.J. and B.W.; visualization, Z.S.; supervision, Z.S., X.T., D.Z. and P.Q. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Key R&D Program of China (Grant No. 2023YFB4204103), the National Natural Science Foundation of China (Grant No. 52371292), the Key Research and Development Program of Zhejiang Province (Grant No. 2023C03121), the Key Research and Development Program of Hainan Province (Grant No. ZDYF2024GXJS028), the Bureau of Science and Technology of Zhoushan (Grant No. 2023C81008), and the Natural Science Foundation of Jiangsu Province (Grant No. BK20230546). The APC was funded by the National Natural Science Foundation of China (Grant No. 52371292).

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding authors.

Conflicts of Interest

Authors Yuankui Wang and Hao Li were employed by the company China State Shipbuilding Corporation Limited. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Correction Statement

This article has been republished with a minor correction to the Funding statement. This change does not affect the scientific content of the article.

Abbreviations

The following abbreviations are used in this manuscript:
6-DOFSix Degrees of Freedom
AUVAutonomous Underwater Vehicle
CFDComputational Fluid Dynamics
GP-MPCGaussian Process-based Model Predictive Control
GPRGaussian Process Regression
IMUInertial Measurement Unit
LHSLatin Hypercube Sampling
MCUMicrocontroller Unit
MEMaximum Error
MLEMaximum Likelihood Estimation
MPCModel Predictive Control
OCPOptimal Control Problem
PIDProportional–Integral–Derivative
RMSERoot Mean Square Error
ROS2Robot Operating System 2
TCPTransmission Control Protocol

References

  1. Xu, X.; Guo, L.; Qing, P.; Wang, Z.; Yang, Y.; Ma, L.; Luo, J. Adaptive fixed-time fractional-order terminal sliding mode controller for autonomous underwater vehicle under external disturbances. Drones 2026, 10, 198. [Google Scholar]
  2. Li, T.; Tao, J.; Hu, Y.; Chen, S.; Wei, Y.; Zhang, B. Safety-critical trajectory tracking control with safety-enhanced reinforcement learning for autonomous underwater vehicle. Drones 2025, 9, 65. [Google Scholar] [CrossRef] [Scilit]
  3. Liang, Z.; Fan, S.; Feng, J.; Yuan, P.; Xu, J.; Wang, X.; Wang, D. An enhanced adaptive ensemble Kalman filter for autonomous underwater vehicle integrated navigation. Drones 2024, 8, 711. [Google Scholar] [CrossRef] [Scilit]
  4. Sun, Z.; Wang, B.; Li, Z.Y.; Zhao, Y.; Huang, T.; Li, X.; Zhao, Y.; Qian, P.; Zhang, D. Enhanced trajectory tracking for AUVs: Adaptive super-twisting sliding mode control with disturbance observer. Control Eng. Pract. 2025, 164, 106426. [Google Scholar] [CrossRef] [Scilit]
  5. Alvarez, A.; Caiti, A.; Onken, R. Evolutionary path planning for autonomous underwater vehicles in a variable ocean. IEEE J. Ocean. Eng. 2004, 29, 418–429. [Google Scholar] [CrossRef] [Scilit]
  6. Li, D.; Du, L. Auv trajectory tracking models and control strategies: A review. J. Mar. Sci. Eng. 2021, 9, 1020. [Google Scholar] [CrossRef] [Scilit]
  7. Yu, C.; Xiang, X.; Zhang, Q.; Xu, G. Adaptive fuzzy trajectory tracking control of an under-actuated autonomous underwater vehicle subject to actuator saturation. Int. J. Fuzzy Syst. 2018, 20, 269–279. [Google Scholar]
  8. Hasan, M.W.; Abbas, N.H. Disturbance Rejection for Underwater robotic vehicle based on adaptive fuzzy with nonlinear PID controller. ISA Trans. 2022, 130, 360–376. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  9. Karkoub, M.; Wu, H.-M.; Hwang, C.-L. Nonlinear trajectory-tracking control of an autonomous underwater vehicle. Ocean Eng. 2017, 145, 188–198. [Google Scholar] [CrossRef] [Scilit]
  10. Coleman, D.; Castaño, M.; Tan, X. Backstepping control of gliding robotic fish for pitch and 3D trajectory tracking. Control Eng. Pract. 2022, 129, 105350. [Google Scholar] [CrossRef] [Scilit]
  11. Borlaug, I.L.G.; Pettersen, K.Y.; Gravdahl, J.T. Comparison of two second-order sliding mode control algorithms for an articulated intervention AUV: Theory and experimental results. Ocean Eng. 2021, 222, 108480. [Google Scholar] [CrossRef] [Scilit]
  12. Elmokadem, T.; Zribi, M.; Youcef-Toumi, K. Trajectory tracking sliding mode control of underactuated AUVs. Nonlinear Dyn. 2016, 84, 1079–1091. [Google Scholar]
  13. Li, J.; Du, J.; Chen, C.P. Command-filtered robust adaptive nn control with the prescribed performance for the 3-d trajectory tracking of underactuated auvs. IEEE Trans. Neural Netw. Learn. Syst. 2021, 33, 6545–6557. [Google Scholar] [CrossRef] [Scilit]
  14. Guo, X.; Yan, W.; Cui, R. Neural network-based nonlinear sliding-mode control for an AUV without velocity measurements. Int. J. Control 2019, 92, 677–692. [Google Scholar]
  15. Liu, T.; Hu, Y.; Xu, H. Deep reinforcement learning for vectored thruster autonomous underwater vehicle control. Complexity 2021, 2021, 1–25. [Google Scholar] [CrossRef] [Scilit]
  16. Fang, Y.; Huang, Z.; Pu, J.; Zhang, J. AUV position tracking and trajectory control based on fast-deployed deep reinforcement learning method. Ocean Eng. 2022, 245, 110452. [Google Scholar] [CrossRef] [Scilit]
  17. Zhang, J.; Xiang, X.; Zhang, Q.; Li, W. Neural network-based adaptive trajectory tracking control of underactuated AUVs with unknown asymmetrical actuator saturation and unknown dynamics. Ocean Eng. 2020, 218, 108193. [Google Scholar] [CrossRef] [Scilit]
  18. Rawlings, J.B.; Mayne, D.Q.; Diehl, M. Model Predictive Control: Theory, Computation, and Design; Nob Hill Publishing: Madison, WI, USA, 2017; Volume 2. [Google Scholar]
  19. Rossiter, J.A. Model-Based Predictive Control: A Practical Approach; CRC Press: Boca Raton, FL, USA, 2017. [Google Scholar]
  20. Karras, G.C.; Marantos, P.; Bechlioulis, C.P.; Kyriakopoulos, K.J. Unsupervised online system identification for underwater robotic vehicles. IEEE J. Ocean Eng. 2019, 44, 642–663. [Google Scholar] [CrossRef] [Scilit]
  21. Rout, R.; Subudhi, B. Narmax self-tuning controller for line-of-sight-based waypoint tracking for an autonomous underwater vehicle. IEEE Trans. Control Syst. Technol. 2016, 25, 1529–1536. [Google Scholar]
  22. Kim, S.; Deshpande, V.M.; Bhattacharya, R. Robust kalman filtering with probabilistic uncertainty in system parameters. IEEE Control Syst. Lett. 2020, 5, 295–300. [Google Scholar] [CrossRef] [Scilit]
  23. Dai, Y.; Yu, S.; Yan, Y. An adaptive ekf-fmpc for the trajectory tracking of uvms. IEEE J. Ocean Eng. 2019, 45, 699–713. [Google Scholar] [CrossRef] [Scilit]
  24. Heshmati-Alamdari, S.; Karras, G.C.; Marantos, P.; Kyriakopoulos, K.J. A robust predictive control approach for underwater robotic vehicles. IEEE Trans. Control Syst. Technol. 2019, 28, 2352–2363. [Google Scholar] [CrossRef] [Scilit]
  25. Gros, S.; Zanon, M. Learning for MPC with stability & safety guarantees. Automatica 2022, 146, 110598. [Google Scholar] [CrossRef] [Scilit]
  26. Liu, T.; Zhao, J.; Huang, J. A Gaussian-Process-Based Model Predictive Control Approach for Trajectory Tracking and Obstacle Avoidance in Autonomous Underwater Vehicles. J. Mar. Sci. Eng. 2024, 12, 676. [Google Scholar] [CrossRef] [Scilit]
  27. Hewing, L.; Wabersich, K.P.; Menner, M.; Zeilinger, M.N. Learning-based model predictive control: Toward safe learning in control. Annu. Rev. Control Robot. Auton. Syst. 2020, 3, 269–296. [Google Scholar] [CrossRef] [Scilit]
  28. Torrente, G.; Kaufmann, E.; Foehn, P.; Scaramuzza, D. Data-driven mpc for quadrotors. IEEE Robot. Autom. Lett. 2021, 6, 3769–3776. [Google Scholar] [CrossRef] [Scilit]
  29. Rosolia, U.; Borrelli, F. Learning how to autonomously race a car: A predictive control approach. IEEE Trans. Control Syst. Technol. 2019, 28, 2713–2719. [Google Scholar] [CrossRef] [Scilit]
  30. Xu, P.; Qin, H.; Ma, J.; Deng, Z.; Xue, Y. Data-driven model predictive control for ships with gaussian process. Ocean Eng. 2023, 268, 113420. [Google Scholar]
  31. Arcari, E.; Minniti, M.V.; Scampicchio, A.; Carron, A.; Farshidian, F.; Hutter, M.; Zeilinger, M.N. Bayesian multi-task learning mpc for robotic mobile manipulation. IEEE Robot. Autom. Lett. 2023, 8, 3222–3229. [Google Scholar] [CrossRef] [Scilit]
  32. Chee, K.Y.; Jiahao, T.Z.; Hsieh, M.A. Knode-mpc: A knowledge-based data-driven predictive control framework for aerial robots. IEEE Robot. Autom. Lett. 2022, 7, 2819–2826. [Google Scholar]
  33. Salzmann, T.; Kaufmann, E.; Arrizabalaga, J.; Pavone, M.; Scaramuzza, D.; Ryll, M. Real-time neural MPC: Deep learning model predictive control for quadrotors and agile robotic platforms. IEEE Robot. Autom. Lett. 2023, 8, 2397–2404. [Google Scholar] [CrossRef] [Scilit]
  34. Bauersfeld, L.; Kaufmann, E.; Foehn, P.; Sun, S.; Scaramuzza, D. Neurobem: Hybrid aerodynamic quadrotor model. arXiv 2021, arXiv:2106.08015. [Google Scholar]
  35. Deisenroth, M.P.; Fox, D.; Rasmussen, C.E. Gaussian processes for data-efficient learning in robotics and control. IEEE Trans. Pattern Anal. Mach. Intell. 2013, 37, 408–423. [Google Scholar] [CrossRef] [Scilit]
  36. Kabzan, J.; Hewing, L.; Liniger, A.; Zeilinger, M.N. Learning-based model predictive control for autonomous racing. IEEE Robot. Autom. Lett. 2019, 4, 3363–3370. [Google Scholar] [CrossRef] [Scilit]
  37. Matschek, J.; Bethge, J.; Findeisen, R. Safe machine-learning-supported model predictive force and motion control in robotics. IEEE Trans. Control Syst. Technol. 2023, 31, 2380–2392. [Google Scholar]
  38. Gahlawat, A.; Zhao, P.; Patterson, A.; Hovakimyan, N.; Theodorou, E.A. L1-GP: L1 adaptive control with Bayesian learning. In Learning for Dynamics and Control; PMLR: New York, NY, USA, 2020; pp. 826–837. [Google Scholar]
  39. Fossen, T.I. Handbook of Marine Craft Hydrodynamics and Motion Control; John Wiley & Sons: Hoboken, NJ, USA, 2011. [Google Scholar]
  40. Scampicchio, A.; Arcari, E.; Lahr, A.; Zeilinger, M.N. Gaussian processes for dynamics learning in model predictive control. Annu. Rev. Control 2025, 60, 101034. [Google Scholar] [CrossRef] [Scilit]
  41. Shields, M.D.; Zhang, J. The generalization of latin hypercube sampling. Reliab. Eng. Syst. Saf. 2016, 148, 96–108. [Google Scholar] [CrossRef] [Scilit]
  42. Butcher, J.C. Numerical Methods for Ordinary Differential Equations, 3rd ed.; John Wiley & Sons: Chichester, UK, 2016. [Google Scholar]
  43. Nielsen, M.C.; Eidsvik, O.A.; Blanke, M.; Schjølberg, I. Con-strained multi-body dynamics for modular underwater robots—Theory and experiments. Ocean Eng. 2018, 149, 358–372. [Google Scholar]
  44. Andersson, J.A.E.; Gillis, J.; Horn, G.; Rawlings, J.B.; Diehl, M. CasADi—A software framework for nonlinear optimization and optimal control. Math. Program. Comput. 2019, 11, 1–36. [Google Scholar]
  45. Biegler, L.T.; Zavala, V.M. Large-scale nonlinear programming using ipopt: An integrating framework for enterprise-wide dynamic optimization. Comput. Chem. Eng. 2009, 33, 575–582. [Google Scholar]
Figure 1. The world coordinate frame (I) and the body coordinate frame (B).
Figure 1. The world coordinate frame (I) and the body coordinate frame (B).
Drones 10 00498 g001
Figure 2. Position of the AUV propellers.
Figure 2. Position of the AUV propellers.
Drones 10 00498 g002
Figure 3. Flowchart of the cascade PID.
Figure 3. Flowchart of the cascade PID.
Drones 10 00498 g003
Figure 4. Flowchart of the nominal MPC, offline GP-MPC, and online GP-MPC.
Figure 4. Flowchart of the nominal MPC, offline GP-MPC, and online GP-MPC.
Drones 10 00498 g004
Figure 5. Simulation results of circular trajectory tracking task. (a) Case 1: r = 2  m , v z = 0.25  m / s ; (b) Case 2: r = 3  m , v z = 0.75  m / s .
Figure 5. Simulation results of circular trajectory tracking task. (a) Case 1: r = 2  m , v z = 0.25  m / s ; (b) Case 2: r = 3  m , v z = 0.75  m / s .
Drones 10 00498 g005
Figure 6. Tracking errors of the circular trajectory tracking task. (a) Case 1: r = 2  m , v z = 0.25  m / s ; (b) Case 2: r = 3  m , v z = 0.75  m / s .
Figure 6. Tracking errors of the circular trajectory tracking task. (a) Case 1: r = 2  m , v z = 0.25  m / s ; (b) Case 2: r = 3  m , v z = 0.75  m / s .
Drones 10 00498 g006
Figure 7. Simulation results of the L-shaped steering trajectory.
Figure 7. Simulation results of the L-shaped steering trajectory.
Drones 10 00498 g007
Figure 8. Tracking errors of the L-shaped steering trajectory tracking task.
Figure 8. Tracking errors of the L-shaped steering trajectory tracking task.
Drones 10 00498 g008
Figure 9. Simulation results of the lemniscate trajectory.
Figure 9. Simulation results of the lemniscate trajectory.
Drones 10 00498 g009
Figure 10. Tracking error of the lemniscate trajectory tracking task.
Figure 10. Tracking error of the lemniscate trajectory tracking task.
Drones 10 00498 g010
Figure 11. Simulation results of the lemniscate trajectory with constant disturbance.
Figure 11. Simulation results of the lemniscate trajectory with constant disturbance.
Drones 10 00498 g011
Figure 12. Tracking errors of the lemniscate trajectory tracking task with constant disturbance.
Figure 12. Tracking errors of the lemniscate trajectory tracking task with constant disturbance.
Drones 10 00498 g012
Figure 13. Simulation results of the lemniscate trajectory with time-varying disturbance.
Figure 13. Simulation results of the lemniscate trajectory with time-varying disturbance.
Drones 10 00498 g013
Figure 14. Tracking errors of the lemniscate trajectory tracking task with time-varying disturbance.
Figure 14. Tracking errors of the lemniscate trajectory tracking task with time-varying disturbance.
Drones 10 00498 g014
Figure 15. Simulation results of the lemniscate trajectory with time-varying disturbance and initial error.
Figure 15. Simulation results of the lemniscate trajectory with time-varying disturbance and initial error.
Drones 10 00498 g015
Figure 16. Tracking errors of the lemniscate trajectory tracking task with time-varying disturbance and initial error.
Figure 16. Tracking errors of the lemniscate trajectory tracking task with time-varying disturbance and initial error.
Drones 10 00498 g016
Figure 17. Performance comparison between offline GP-MPC and online GP-MPC under challenging conditions.
Figure 17. Performance comparison between offline GP-MPC and online GP-MPC under challenging conditions.
Drones 10 00498 g017
Figure 18. AUV employed for experimental validation.
Figure 18. AUV employed for experimental validation.
Drones 10 00498 g018
Figure 19. Circular trajectory tracking performance of various methods.
Figure 19. Circular trajectory tracking performance of various methods.
Drones 10 00498 g019
Figure 20. Yaw angle tracking curves of various methods.
Figure 20. Yaw angle tracking curves of various methods.
Drones 10 00498 g020
Figure 21. Comparison of trajectory tracking with time-varying velocity.
Figure 21. Comparison of trajectory tracking with time-varying velocity.
Drones 10 00498 g021
Figure 22. Tracking error curves in individual dimensions: X, Y, and yaw.
Figure 22. Tracking error curves in individual dimensions: X, Y, and yaw.
Drones 10 00498 g022
Table 1. Modeling parameters of the AUV.
Table 1. Modeling parameters of the AUV.
ParameterValueParameterValue
m   k g 7.3 I z   k g m 0.15
m 11   k g 9.9 m 33   k g 20.6
m 22   k g 25.8 m 44   k g · m 0.43
X u u   k g / m 34.96 Z w w   k g / m 74.23
Y v v   k g / m 103.25 N r r   k g m 0.43
X u   k g / s 0 Z w   k g / s 0.19
Y v   k g / s 0.26 N r   k g m / s 4.64
θ T   r a d π / 4 d   c m 15
Table 2. RMSE and ME of the circular trajectory tracking task.
Table 2. RMSE and ME of the circular trajectory tracking task.
Simulation CaseErrorPIDNominal MPCOffline GP-MPCOnline GP-MPC
Case 1PositionRMSE0.0300.0620.004↓87%0.004↓87%
ME0.1030.0650.037↓43%0.037↓43%
Yaw angleRMSE1.5151.5050.026↓98%0.005↓99%
ME1.6111.6140.054↓97%0.046↓99%
Case 2PositionRMSE1.8271.7570.022↓98%0.017↓99%
ME2.7072.2060.101↓95%0.101↓95%
Yaw angleRMSE2.0762.0340.108↓95%0.025↓99%
ME3.0952.4080.167↓93%0.123↓95%
Table 3. RMSE and ME of the L-shaped steering trajectory tracking task.
Table 3. RMSE and ME of the L-shaped steering trajectory tracking task.
ErrorPIDNominal MPCOffline GP-MPCOnline GP-MPC
PositionRMSE0.4550.4280.126↓71%0.058↓87%
ME0.8360.9750.312↓63%0.221↓74%
Yaw angleRMSE1.0861.0020.407↓60%0.257↓75%
ME1.6901.4591.309↓11%1.300↓11%
Table 4. RMSE and ME of the lemniscate trajectory tracking task.
Table 4. RMSE and ME of the lemniscate trajectory tracking task.
ErrorPIDNominal MPCOffline GP-MPCOnline GP-MPC
PositionRMSE0.0250.0240.007↓71%0.007↓71%
ME0.0690.0460.027↓41%0.029↓37%
Yaw angleRMSE0.5430.4170.069↓83%0.011↓97%
ME0.8260.7120.155↓78%0.033↓95%
Table 5. RMSE and ME of the lemniscate trajectory tracking task with constant disturbance.
Table 5. RMSE and ME of the lemniscate trajectory tracking task with constant disturbance.
ErrorPIDNominal MPCOffline GP-MPCOnline GP-MPC
PositionRMSE0.0210.0380.017↓20%0.008↓62%
ME0.0750.0670.043↓36%0.025↓63%
Yaw angleRMSE0.5620.4160.410↓2%0.011↓97%
ME0.8750.7111.052↑47%0.062↓91%
Table 6. RMSE and ME of the lemniscate trajectory tracking task with time-varying disturbance.
Table 6. RMSE and ME of the lemniscate trajectory tracking task with time-varying disturbance.
ErrorPIDNominal MPCOffline GP-MPCOnline GP-MPC
PositionRMSE0.0370.0510.020↓46%0.012↓68%
ME0.1150.0890.028↓69%0.034↓62%
Yaw angleRMSE0.7600.4260.100↓77%0.020↓95%
ME1.2670.7830.245↓69%0.068↓91%
Table 7. RMSE and ME of the lemniscate trajectory tracking task with time-varying disturbance and initial error.
Table 7. RMSE and ME of the lemniscate trajectory tracking task with time-varying disturbance and initial error.
ErrorPIDNominal MPCOffline GP-MPCOnline GP-MPC
PositionRMSE0.7230.5520.313↓44%0.289↓48%
ME1.5811.5811.5810%1.5810%
Yaw angleRMSE1.3411.2940.541↓59%0.135↓90%
ME2.5562.8311.362↓47%0.532↓80%
Table 8. Performance improvement of online GP-MPC over offline GP-MPC under challenging conditions.
Table 8. Performance improvement of online GP-MPC over offline GP-MPC under challenging conditions.
CaseMetricOffline GP-MPCOnline GP-MPCImprovement of Online
Update
Constant disturbancePosition RMSE0.017 m0.008 m52.9%
Yaw RMSE0.410 rad0.011 rad97.3%
Time-varying disturbancePosition RMSE0.020 m0.012 m40.0%
Yaw RMSE0.100 rad0.020 rad80.0%
Time-varying
disturbance
+ initial error
Position RMSE0.313 m0.289 m7.7%
Yaw RMSE0.541 rad0.135 rad75.0%
Table 9. Main characteristics of the AUV.
Table 9. Main characteristics of the AUV.
CharacteristicValue
Mass12.5 kg
Residual Buoyancy10 N
Dimensions50 × 40 × 25 cm
Power24 V–500 W
Thrusters6 × Rovmaker 2216
Inertial Measurement Unit (IMU)BMI088
Depth SensorMS5837-30BA
Attitude SensorWT9053
Onboard Microcontroller Unit (MCU)STM32F407VET6
High-Level ControllerJetson Xavier NX
Table 10. Performance of low-speed circular trajectory tracking using different methods.
Table 10. Performance of low-speed circular trajectory tracking using different methods.
ErrorPIDNominal MPCOffline GP-MPC
XRMSE0.0470.0280.017
ME0.0790.0480.032
YRMSE0.0900.0640.022
ME0.1430.0980.042
YawRMSE0.1820.1340.052
ME0.2730.0420.090
Table 11. Performance of complex trajectory tracking using different methods.
Table 11. Performance of complex trajectory tracking using different methods.
ErrorPIDNominal MPCOffline GP-MPC
XRMSE0.0450.0210.013
ME0.0730.0380.042
YRMSE0.0850.0520.019
ME0.1360.0870.042
YawRMSE0.0170.0480.134
ME0.0480.1250.309
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wang, Y.; Sun, Z.; Tian, X.; Jia, Y.; Li, H.; Wang, B.; Zhang, D.; Qian, P. Trajectory Tracking Control of Autonomous Underwater Vehicles Using GP-Based Model Predictive Control. Drones 2026, 10, 498. https://doi.org/10.3390/drones10070498

AMA Style

Wang Y, Sun Z, Tian X, Jia Y, Li H, Wang B, Zhang D, Qian P. Trajectory Tracking Control of Autonomous Underwater Vehicles Using GP-Based Model Predictive Control. Drones. 2026; 10(7):498. https://doi.org/10.3390/drones10070498

Chicago/Turabian Style

Wang, Yuankui, Zhiwei Sun, Xiange Tian, Yuhang Jia, Hao Li, Bohan Wang, Dahai Zhang, and Peng Qian. 2026. "Trajectory Tracking Control of Autonomous Underwater Vehicles Using GP-Based Model Predictive Control" Drones 10, no. 7: 498. https://doi.org/10.3390/drones10070498

APA Style

Wang, Y., Sun, Z., Tian, X., Jia, Y., Li, H., Wang, B., Zhang, D., & Qian, P. (2026). Trajectory Tracking Control of Autonomous Underwater Vehicles Using GP-Based Model Predictive Control. Drones, 10(7), 498. https://doi.org/10.3390/drones10070498

Article Metrics

Back to TopTop