MEKAWIRE
ExpertarXiv

Gaussian Process-Augmented Model Predictive Contouring Control for 6-DoF Trajectory Tracking with a Holonomic AUV

David Dörner, Giancarlo Troni, Ignacio Torroba, Ivan Stenius
From the abstract

Small, holonomic Autonomous Underwater Vehicles (AUVs) enable close-range inspection of underwater structures from arbitrary viewpoints, requiring accurate position and attitude tracking under state and input constraints. Model Predictive Contouring Control (MPCC) naturally handles these requirements, but relies on an accurate dynamics model, which is difficult to obtain underwater.

From the abstract. Our summary is in progress.

Full paper

Gaussian Process-Augmented Model Predictive Contouring Control for 6-DoF Trajectory Tracking with a Holonomic AUV

David Dörner, Giancarlo Troni, Ignacio Torroba, Ivan Stenius

Published under CC BY 4.0. Reproduced with attribution; original at arXiv:2611.14373 (PDF).

Abstract

Small, holonomic Autonomous Underwater Vehicles (AUVs) enable close-range inspection of underwater structures from arbitrary viewpoints, requiring accurate position and attitude tracking under state and input constraints. Model Predictive Contouring Control (MPCC) naturally handles these requirements, but relies on an accurate dynamics model, which is difficult to obtain underwater. In this paper, we present a nonlinear MPCC in all six Degrees of Freedom (DoF) for a holonomic AUV and alleviate the inaccuracies in the dynamics by augmenting the nominal model employed with residual dynamics learned via Gaussian Process (GP) regression. The learned residual is embedded in the optimal control problem through a zero-order robust optimization scheme, which keeps the controller real-time capable at 25 Hz. A simulation ablation shows that residual selection is essential when designing the controller, and simulation and in-water experiments with the Multimodality, Observing, Low-cost, Agile (MOLA) AUV validate the resulting controllers against a nominal MPCC and a field-proven Proportional-Integral-Derivative (PID) controller.

I INTRODUCTION

Close-range inspection of underwater structures such as wrecks, pipelines or mines requires precise maneuvering and the ability to observe a target from multiple viewpoints. Torpedo-shaped Autonomous Underwater Vehicles (AUVs), such as the Kongsberg Hugin and the Monterey Bay Aquarium Research Institute (MBARI) LRAUV, are well suited to surveying large areas, but their limited maneuverability makes these inspection tasks challenging for them. Remotely Operated Vehicles (ROVs) are commonly used for such tasks, but they require a support vessel and crew for operation. Small, holonomic AUVs, such as the Multimodality, Observing, Low-cost, Agile (MOLA) AUV of MBARI, offer an autonomous alternative: they can control position and attitude independently, allowing them to maintain a desired viewing direction while moving around a target. Exploiting this capability, however, requires a controller capable of following complex position and attitude references while respecting state and input constraints for safe operation near underwater structures.

Model Predictive Control (MPC) [24] naturally incorporates these requirements by solving a constrained optimal control problem over a receding horizon. However, its performance relies on an accurate model of the system dynamics, which is a challenge in itself for AUVs: the hydrodynamic parameters are hard to identify and change with environmental and mission-specific conditions, such as different payloads. Recent works therefore apply learning-based methods to improve the model used in the MPC [1, 2], but they either restrict the dynamics to four Degrees of Freedom (DoF) or remain validated in simulation only.

Fig. 1: Composite of the MOLA AUV during an experiment in the tank, overlaid with the error approximation of the MPCC over the prescribed trajectory (red): the position error \bm{e}(\theta_{k}) between the vehicle position \bm{p}_{k} and the path point \bm{p}(\theta_{k}) is split into the approximated lag error \bm{e}^{l}(\theta_{k}) along the tangent \bm{t}(\theta_{k}) and the approximated contouring error \bm{e}^{c}(\theta_{k}) in the normal plane.

In this paper, we close this gap with the following contributions:

  • We present a nonlinear Model Predictive Contouring Control (MPCC) in all six DoF that exploits the holonomic actuation of the AUV to track position and attitude references independently. To the best of our knowledge, this is the first real-time deployment of such a scheme on a holonomic AUV.
  • We augment the nominal model with Gaussian Process (GP) residual dynamics, embed them into the MPCC via a zero-order robust optimization scheme, and show in a simulation ablation that the choice of which residuals to learn is decisive for the resulting performance.
  • We validate the controllers in-water on the MOLA AUV against a well-tuned Proportional-Integral-Derivative (PID) controller and demonstrate improved attitude tracking on a lawnmower survey as well as a spiraling inspection maneuver.

II RELATED WORK

MPC has attracted growing interest for AUVs in recent years [31, 36]. Often, the model is reduced to three DoF, i.e., surge, sway, and yaw [32, 28, 29]. While reducing the model order speeds up the computation, depth, roll, and pitch control are equally important for inspection tasks. Trajectory tracking for a fully actuated vehicle considering all states is proposed in [37], but, like the aforementioned works, it is verified in simulation only. Experimental validation is provided in [3], where MPC controls surge, heave, and heading of an AUV with an attached manipulator, in [9] for the position control of a holonomic AUV, and in [26] for velocity control. MPC was further used to dock a holonomic AUV to a moving docking station [35], to move an ROV between waypoints [12], also in a self-triggered fashion [11], and to mimic inspection tasks on a space station with a holonomic ROV [33]. These works track waypoints or time-parameterized references. MPCC [20], in contrast, follows a geometric path and optimizes the progress along it, which has enabled time-optimal driving [21] and flight [25, 17]. To the best of our knowledge, MPCC has not been deployed on an underwater vehicle in all six DoF yet.

Learning-based methods can be incorporated into MPC in different ways [14]: a) augmenting the dynamical model used in the optimization, b) learning the cost function, or c) using MPC as a safety filter for a learned policy. There is growing interest in incorporating the uncertainty of the learned model into the optimal control problem [27], e.g., to tighten chance constraints and increase the robustness of a race car [13]. These methods are also increasingly applied in the underwater domain [22, 15]. GPs combined with MPC were used to predict the disturbances acting on an ROV [1]; however, the righting moment of the ROV is leveraged to reduce the system dynamics to four DoF. In [2], different methods for residual learning are compared, with the GP residual performing best, but the work focuses on learning the hydrodynamic damping and validates the resulting Linear Time Varying (LTV)-MPC in simulation only.

In this work, we build upon [2] and use GPs to learn a residual model, but without restricting it to the damping terms, and embed it into the optimal control problem following [18]. Furthermore, we deploy a full nonlinear MPCC in 3D [25] and exploit the holonomic properties of the AUV to additionally track an attitude reference. This allows us to orient the vehicle independently of its direction of travel, which is crucial during surveys and inspections.

III PRELIMINARIES

III-A Problem Statement

Consider the discrete-time nonlinear system

\bm{x}(t+1)=\bm{f}(\bm{x}(t),\bm{u}(t))+\bm{B}_{d}\,\bm{g}(\bm{x}(t),\bm{u}(t))+\bm{w}(t),
(1)

with state \bm{x}\in\mathcal{X}\subseteq\mathbb{R}^{n_{x}} and input \bm{u}\in\mathcal{U}\subseteq\mathbb{R}^{n_{u}}. The dynamics consist of a nominal part \bm{f} derived from first principles, an unknown residual \bm{g}:\mathbb{R}^{n_{x}}\times\mathbb{R}^{n_{u}}\rightarrow\mathbb{R}^{n_{g}} that captures unmodeled effects and parameter mismatch, and i.i.d. process noise \bm{w}(t)\sim\mathcal{N}(\bm{0},\bm{\Sigma}_{w}). The matrix \bm{B}_{d}\in\mathbb{R}^{n_{x}\times n_{g}} selects the states on which the residual acts. We aim to control Eq. 1 optimally in a receding horizon fashion using MPC [24] as

\displaystyle\pi(\bm{x}) \\ \displaystyle=\argmin_{\bm{u}}\sum_{k=0}^{N-1}\|\bm{e}_{\bm{x},k}\|_{\bm{Q}}^{2}+\|\bm{u}_{k}\|_{\bm{R}}^{2}+l_{N}(\bm{x}_{N}) \\ \displaystyle\text{s.t.} \\ \displaystyle\bm{x}_{0}=\bm{x}(t) \\ \displaystyle\bm{x}_{k+1}=\bm{f}(\bm{x}_{k},\bm{u}_{k}) \\ \displaystyle\bm{x}_{k}\in\mathcal{X},\bm{u}_{k}\in\mathcal{U},

where \bm{e}_{\bm{x}}=\bm{x}_{ref}-\bm{x} denotes the tracking error, \bm{Q} and \bm{R} are positive (semi-)definite weights on the tracking error and the control effort, and l_{N} is the terminal cost. Whereas the nominal part is known, we learn the residual from data. From Eq. 1, samples of the residual can be computed from consecutive state measurements as

\bm{g}(\bm{x}(t),\bm{u}(t))\approx\bm{B}_{d}^{\dagger}\left(\bm{x}(t+1)-\bm{f}(\bm{x}(t),\bm{u}(t))\right),
(3)

where \bm{B}_{d}^{\dagger} is the Moore-Penrose pseudo-inverse.

III-B Notation

We denote scalars as a, vectors as \bm{a}, and matrices as \bm{A}. \|\bm{a}\|_{\bm{W}}^{2}=\bm{a}^{\mathrm{T}}\bm{W}\bm{a} denotes the weighted squared norm. t denotes time, whereas k denotes the prediction step within the MPC horizon. For clarity, we omit the indices.

III-C AUV Dynamics

The nominal part of Eq. 1 follows from the well-known equations of motion of a marine craft [8],

\displaystyle\dot{\bm{\eta}} \\ \displaystyle=\bm{J}(\bm{\eta})(\bm{\nu}_{r}+\bm{\nu}_{c}) \\ \displaystyle\bm{M}\dot{\bm{\nu}}_{r} \\ \displaystyle+\bm{C}(\bm{\nu}_{r})\bm{\nu}_{r}+\bm{D}(\bm{\nu}_{r})\bm{\nu}_{r}+\bm{g}(\bm{\eta})+\bm{g}_{0}=\bm{\tau},

where \bm{\eta} denotes the AUV’s pose in the world frame, \bm{\nu}_{r} its velocity relative to the water expressed in the body frame, \bm{\nu}_{c} the current velocity, and \bm{J}(\bm{\eta}) the Jacobian transforming body-frame velocities into the world frame. The system is parameterized by the mass matrix \bm{M}=\bm{M}_{RB}+\bm{M}_{A} and the Coriolis matrix \bm{C}=\bm{C}_{RB}+\bm{C}_{A}, both consisting of a rigid-body and an added-mass term, and by the hydrodynamic damping \bm{D}. Gravity and buoyancy are expressed in \bm{g}(\bm{\eta}) and \bm{g}_{0}, and all external forces and moments, i.e., actuators and disturbances, in \bm{\tau}. For the remainder of the paper, we use a body frame with Forward-Right-Down (FRD) axes, i.e., the depth z is positive downwards, and we represent the attitude by a unit quaternion \bm{q} to avoid singularities, such that \bm{\eta}=[x,y,z,\bm{q}^{\mathrm{T}}]^{\mathrm{T}} and \bm{\nu}=[u,v,w,p,q,r]^{\mathrm{T}}. Identifying every parameter in these matrices is challenging due to the inherent nonlinearities and cross-couplings [2]. We simplify the model by assuming a symmetric vehicle body and a diagonal damping matrix \bm{D}, and we assume no known current, hence \bm{\nu}_{c}=\bm{0} and \bm{\nu}_{r}=\bm{\nu}. Solving the second line of Eq. 4 for the acceleration yields

\dot{\bm{\nu}}=\bm{M}^{-1}\left(\bm{\tau}-\bm{C}(\bm{\nu})\bm{\nu}-\bm{D}(\bm{\nu})\bm{\nu}-\bm{g}(\bm{\eta})-\bm{g}_{0}\right),
(5)

which, together with the kinematics in Eq. 4 and a discretization with the sampling time \Delta t, constitutes \bm{f} in Eq. 1 with \bm{x}=[\bm{\eta}^{\mathrm{T}},\bm{\nu}^{\mathrm{T}}]^{\mathrm{T}} and \bm{u}=\bm{\tau}.

IV MODEL PREDICTIVE CONTOURING CONTROL

IV-A Contouring and Lag Error

Instead of tracking a time-parameterized reference as in Eq. 2, MPCC follows a geometric reference path \bm{p}(\theta) parameterized by its arc length \theta and treats the progress along the path as an additional decision variable. The distance between the current position \bm{p}_{k} and the path is the distance to the closest point on the path, whose computation is itself an optimization problem. Following [25], we approximate it using the path parameter \theta_{k} at prediction step k, as illustrated in Fig. 1. Let \bm{t}(\theta_{k}) be the unit tangent of the path at \bm{p}(\theta_{k}) and \bm{e}(\theta_{k})=\bm{p}(\theta_{k})-\bm{p}_{k} the position error. Then, the lag error is the projection of the position error onto the tangent,

\bm{e}^{l}(\theta_{k})=\left(\bm{t}(\theta_{k})^{\mathrm{T}}\bm{e}(\theta_{k})\right)\bm{t}(\theta_{k})=e^{l}(\theta_{k})\,\bm{t}(\theta_{k}),
(6)

and the contouring error is the remaining component in the normal plane of the path,

\bm{e}^{c}(\theta_{k})=\bm{e}(\theta_{k})-e^{l}(\theta_{k})\,\bm{t}(\theta_{k}).
(7)

Their weighted norms follow as \|\bm{e}^{l}\|_{Q_{l}}^{2}=Q_{l}\,(e^{l})^{2} and \|\bm{e}^{c}\|_{\bm{Q}_{c}}^{2}=\bm{e}^{c\mathrm{T}}\bm{Q}_{c}\,\bm{e}^{c}.

IV-B Optimal Control Problem

The complete MPCC problem follows as

\displaystyle\pi(\bm{x}) \\ \displaystyle=\argmin_{\bm{u},\Delta v_{\theta}}\sum_{k=0}^{N-1}\|\bm{e}^{c}_{k}\|_{\bm{Q}_{c}}^{2}+\|\bm{e}^{l}_{k}\|_{Q_{l}}^{2} \\ \displaystyle+\|e_{v_{\theta},k}\|_{Q_{v}}^{2}+\|\bm{e}_{\bm{q},k}\|_{\bm{Q}_{q}}^{2}+\|\Delta\bm{q}_{k}\|_{\bm{Q}_{\Delta\bm{q}}}^{2} \\ \displaystyle+\|\Delta\bm{u}_{k}\|_{\bm{R}}^{2}+l_{N}(\bm{x}_{N}) \\ \displaystyle\text{s.t.} \\ \displaystyle\bm{x}_{0}=\bm{x}(t),\ \theta_{0}=\theta(t),\ v_{\theta,0}=v_{\theta}(t) \\ \displaystyle\bm{x}_{k+1}=\bm{f}(\bm{x}_{k},\bm{u}_{k}) \\ \displaystyle\theta_{k+1}=\theta_{k}+v_{\theta,k}\Delta t \\ \displaystyle v_{\theta,k+1}=v_{\theta,k}+\Delta v_{\theta,k}\Delta t \\ \displaystyle\bm{x}_{k}\in\mathcal{X},\quad\underline{\bm{u}}\leq\bm{u}_{k}\leq\macc@depth\char 1\relax\macc@set@skewchar\macc@nested@a 111{} \\ \displaystyle 0\leq v_{\theta,k}\leq\macc@depth\char 1\relax\macc@set@skewchar\macc@nested@a 111{v}_{\theta},\quad\underline{\Delta v}_{\theta}\leq\Delta v_{\theta,k}\leq\macc@depth\char 1\relax\macc@set@skewchar\macc@nested@a 111{}_{\theta} \\ \displaystyle h(\bm{x}_{k})\leq 0,

with the terminal cost l_{N}=\|\bm{e}^{c}_{N}\|_{\bm{Q}_{c}}^{2}+\|\bm{e}^{l}_{N}\|_{Q_{l}}^{2}+\|\bm{e}_{\bm{q},N}\|_{\bm{Q}_{q}}^{2} for stability [4]. The progress along the path is encouraged by the term e_{v_{\theta}}=v_{\theta,ref}-v_{\theta}: choosing v_{\theta,ref}\gg\macc@depth\char 1\relax\macc@set@skewchar\macc@nested@a 111{v}_{\theta} recovers the linear progress reward of [25] while keeping the cost convex, which improves the solver performance. Leveraging the holonomic actuation of the AUV, we add the attitude error \bm{e}_{\bm{q}}=\bm{q}_{ref}\otimes\bm{q}^{-1}, where \otimes denotes the quaternion product and \bm{q}^{-1} the conjugate of the current attitude, and penalize its deviation from the identity quaternion. For numerical stability, we additionally penalize the change in attitude between consecutive steps, \Delta\bm{q}_{k}, which acts as a soft angular rate limit [25], as well as the change in control input \Delta\bm{u}_{k}=\bm{u}_{k}-\bm{u}_{k-1} to avoid jerky motions. To prevent noisy control inputs, the progress speed v_{\theta} is treated as a virtual state and its rate of change \Delta v_{\theta} as the optimized control variable. Finally, the nonlinear state constraint h(\bm{x})=\|\bm{e}_{c}\|-r\leq 0 constraints the deviation from the trajectory’s center line with radius r.

IV-C Reference Trajectory

The reference for the AUV is generated from position and orientation waypoints. The positions are connected by cubic splines, which yield the path \bm{p}(\theta) and its arc length \theta. The attitude reference \bm{q}_{ref}(\theta) is obtained by spherical linear interpolation (SLERP) [30] between the waypoint orientations, parameterized by the same arc length such that position and attitude references are aligned along the path.

V GP-MPCC

There are different ways to learn the residual in Eq. 3 [2]. In this work, we use GPs [23], which provide a measure of uncertainty alongside the mean prediction [13]. Using Eq. 3, the training targets are computed from recorded state and input data as

\bm{y}(t)=\bm{B}_{d}^{\dagger}\left(\bm{x}(t+1)-\bm{f}(\bm{x}(t),\bm{u}(t))\right),
(9)

with the regression inputs \bm{z}(t)=\left[\bm{x}(t)^{\mathrm{T}},\bm{u}(t)^{\mathrm{T}}\right]^{\mathrm{T}}.

V-A Gaussian Processes

Given the training inputs \bm{z} and targets \bm{y}, the posterior mean and variance of a GP at a query point \bm{z}_{*} are

\displaystyle\bm{\mu}^{g}(\bm{z}_{*}) \\ \displaystyle=\bm{K}_{\bm{z}_{*},\bm{z}}\left(\bm{K}_{\bm{z},\bm{z}}+\sigma_{n}^{2}\bm{I}\right)^{-1}\bm{y} \\ \displaystyle\bm{\Sigma}^{g}(\bm{z}_{*}) \\ \displaystyle=\bm{K}_{\bm{z}_{*},\bm{z}_{*}}-\bm{K}_{\bm{z}_{*},\bm{z}}\left(\bm{K}_{\bm{z},\bm{z}}+\sigma_{n}^{2}\bm{I}\right)^{-1}\bm{K}_{\bm{z},\bm{z}_{*}},

where \bm{K}_{\cdot,\cdot} denotes the kernel matrix evaluated between the respective inputs and \sigma_{n}^{2} the noise variance. The kernel encodes prior assumptions on the residual, e.g., its smoothness [23], and its hyperparameters are optimized by maximizing the marginal likelihood of the training data.

V-B GP-MPCC Formulation

Following [18], we embed the learned residual into the MPCC formulation Eq. 8 by replacing the nominal dynamics with the mean dynamics and propagating the resulting uncertainty along the horizon:

\displaystyle\min_{\bm{u},\bm{\mu},\bm{\Sigma}}\quad \\ \displaystyle\sum_{k=0}^{N-1}l(\bm{\mu}_{k},\bm{u}_{k})+l_{N}(\bm{\mu}_{N}) \\ \displaystyle\bm{\mu}_{0}=\bm{x}(t),\quad\bm{\Sigma}_{0}=\bm{0}, \\ \displaystyle\bm{\mu}_{k+1}=\bm{f}(\bm{\mu}_{k},\bm{u}_{k})+\bm{B}_{d}\,\bm{\mu}^{g}(\bm{\mu}_{k},\bm{u}_{k}), \\ \displaystyle\bm{\Sigma}_{k+1}=\Psi_{k}(\bm{\mu}_{k},\bm{u}_{k},\bm{\Sigma}_{k}), \\ \displaystyle h(\bm{\mu}_{k})+\beta(\bm{\mu}_{k},\bm{\Sigma}_{k})\leq 0, \\ \displaystyle h(\bm{\mu}_{N})+\beta(\bm{\mu}_{N},\bm{\Sigma}_{N})\leq 0,
(11a) (11b) (11c) (11d) (11e) (11f)

where l collects the stage cost terms of Eq. 8, the remaining decision variables and constraints of Eq. 8 are omitted for brevity, and \bm{\mu}^{g} and \bm{\Sigma}^{g} are the GP mean and variance from Eq. 10 evaluated at \bm{z}=[\bm{\mu}_{k}^{\mathrm{T}},\bm{u}_{k}^{\mathrm{T}}]^{\mathrm{T}}. The state covariance is propagated by linearizing the dynamics,

\Psi_{k}(\bm{\mu}_{k},\bm{u}_{k},\bm{\Sigma}_{k})=\bm{A}_{k}\bm{\Sigma}_{k}\bm{A}_{k}^{\mathrm{T}}+\bm{B}_{d}\bm{\Sigma}^{g}(\bm{\mu}_{k},\bm{u}_{k})\bm{B}_{d}^{\mathrm{T}}+\bm{\Sigma}_{w},
(12)

with the Jacobian of the nominal and the GP dynamics

\bm{A}_{k}=\left.\frac{\partial\bm{f}(\bm{x},\bm{u}_{k})}{\partial\bm{x}}+\bm{B}_{d}\frac{\partial\bm{\mu}^{g}(\bm{x},\bm{u}_{k})}{\partial\bm{x}}\right|_{\bm{x}=\bm{\mu}_{k}}.
(13)

The back-off term \beta tightens the constraints according to the predicted uncertainty, e.g., \beta_{i}=\gamma\sqrt{\nabla h_{i}^{\mathrm{T}}\bm{\Sigma}_{k}\nabla h_{i}} for each constraint h_{i}, where \gamma sets the desired confidence level [13]. Note that Eq. 11 has the covariances \bm{\Sigma}_{k} as decision variables, which is computationally expensive [18]. Following [19], we instead propagate the covariance outside of the Sequential Quadratic Program (SQP) iterations based on the previous solution (\hat{\bm{\mu}}_{k},\hat{\bm{u}}_{k}) in a Zero Order Robust Optimization (zoRO) fashion,

\hat{\bm{\Sigma}}_{k+1}=\Psi_{k}(\hat{\bm{\mu}}_{k},\hat{\bm{u}}_{k},\hat{\bm{\Sigma}}_{k}),
(14)

and evaluate the tightening \hat{\beta}_{k}=\beta(\hat{\bm{\mu}}_{k},\hat{\bm{u}}_{k},\hat{\bm{\Sigma}}_{k}) and \hat{\beta}_{N}=\beta(\hat{\bm{\mu}}_{N},\hat{\bm{\Sigma}}_{N}) with the propagated covariances. The optimal control problem then reduces to Eq. 11 without the covariance dynamics Eq. 11d and with the fixed tightening \hat{\beta}_{k} in Eq. 11f. It has the same structure as the nominal problem Eq. 8 and is solved with the same SQP machinery, where the GP mean and its Jacobian are evaluated externally and passed to the solver [18]. Fig. 2 summarizes the proposed framework.

Fig. 2: Overview of the proposed GP-MPCC framework: an offline-learned GP residual augments the nominal AUV model, with propagated uncertainty tightening the constraints of an online contouring MPC

VI EXPERIMENTS

We validate the proposed method with the MOLA AUV first in simulation and then in hardware experiments (Fig. 3). In both cases, the setup is kept the same, allowing for a seamless transition from simulation to the real vehicle: the controller, the communication, and the residual learning pipeline are identical, and only the vehicle interface differs.

Fig. 3: The MOLA AUV and its simulation in Stonefish.

Since the hull of MOLA AUV resembles a BlueROV2 and no identified hydrodynamic model of the vehicle is available, we parameterize the nominal model \bm{f} with the known weight and the BlueROV2 coefficients of [7] as used in [33]. The resulting mismatch between the nominal model and the true vehicle is precisely what the learned residual is meant to compensate. The controller is implemented in Python using acados [34] for the nominal MPCC and L4acados [18] for the zoRO implementation of the GP-MPCC presented in Sec. V-B. To guarantee real-time feasibility, the optimal control problem is solved with the Real-Time Iteration (RTI) scheme [6], i.e., one SQP iteration per sampling instant, warm-started from the previous solution. The controller runs at 25 Hz with a prediction horizon of N=40 steps on an Ubuntu 24.04 notebook with an Intel i7 CPU and 64 GB of RAM. Communication with the vehicle, both in simulation and in the experiments, runs via Lightweight Communications and Marshalling (LCM) [16]. The MPCC weights were tuned empirically and kept the same for the simulation and the experimental validation.

VI-A Residual Learning

The residuals of the six body velocities in \bm{\nu} are modeled as independent GPs, each with a Squared Exponential (SE) kernel with Automatic Relevance Determination (ARD), implemented in GPyTorch [10]; \bm{B}_{d} selects the velocity states accordingly, and the regression inputs are the body velocities and the control inputs. Training data is collected in open loop by exciting each axis first individually with increasing effort and subsequently in a coupled manner. The recorded data is sub-sampled to 100 uniformly spread data points per GP, which keeps the inference cost within the real-time budget. Separate models are trained on the same maneuvers for the simulation and for the real vehicle, respectively.

Fig. 4 shows the GP predictions of a representative linear and angular residual during one of the in-water experiments. The linear residual is dominated by measurement noise and offers little structure to exploit, whereas the angular residual exhibits a clear structure that the GP captures well. The consequence of this is clearly shown in the ablation experiment in Fig. 5, where the linear residuals predictions mainly inject noise into the model, degrading the controller performance for the gp-full. We therefore focus on the angular residuals in the remaining experiments.

Fig. 4: GP prediction (mean and \pm 2\sigma band) of the surge residual u (top) and the roll rate residual p (bottom) against the measured residual (target) during an in-water experiment. The linear residual is at noise level, whereas the angular residual exhibits structure that the GP captures.
Fig. 5: Ablation study with a simulated lawnmower pattern, five runs per controller: position and attitude RMSE, control energy, and the trajectories of one representative run. The GP-augmented controller is split into linear and angular components to showcase the deterioration in performance caused by the linear GPs.
Fig. 6: Simulated inspection spiral, ten runs per controller: position and attitude RMSE, control energy, and the trajectories of one representative run.

VI-B Evaluation Metrics

Since the reference is a geometric path, at every step i we evaluate the tracking error against the closest point on the position spline rather than against a time-indexed reference. For each recorded state \bm{x}_{i}=[\bm{\eta}_{i}^{\mathrm{T}},\bm{\nu}_{i}^{\mathrm{T}}]^{\mathrm{T}} with pose \bm{\eta}_{i}=[\bm{p}_{i}^{\mathrm{T}},\bm{q}_{i}^{\mathrm{T}}]^{\mathrm{T}}, we determine the closest point on the position spline,

\theta_{i}^{*}=\argmin_{\theta}\|\bm{p}(\theta)-\bm{p}_{i}\|_{2},
(15)

and evaluate the reference pose [\bm{p}(\theta_{i}^{*})^{\mathrm{T}},\bm{q}_{ref}(\theta_{i}^{*})^{\mathrm{T}}]^{\mathrm{T}} at that arc length. The position and attitude errors then follow, consistent with Eq. 8, as

\bm{e}_{\bm{p},i}=\bm{p}_{i}-\bm{p}(\theta_{i}^{*}),\qquad\bm{e}_{\bm{q},i}=\bm{q}_{ref}(\theta_{i}^{*})\otimes\bm{q}_{i}^{-1},
(16)

where we use the Euclidean norm \|\bm{e}_{\bm{p},i}\|_{2} and the rotation angle \varphi_{i}=2\arccos|e_{\bm{q},i,w}| of the error quaternion, with e_{\bm{q},i,w} its scalar part. Both are aggregated over a run as the Root Mean Square Error (RMSE). Lastly, we report the control energy as the sum of the absolute commanded control effort, \sum_{i}\|\bm{\tau}\|_{i}, as a proxy for the energy consumption.

Fig. 7: In-water lawnmower pattern, five runs per controller: position and attitude RMSE, control energy, and the trajectories of one representative run. Boxes span the quartiles and triangles mark the mean.

VI-C Simulation Study

The controllers are first analyzed in the Stonefish simulator [5] in two scenarios. The first is a constant heading lawnmower pattern, similar to a common survey in the field, on which we compare the nominal MPCC (nom) against the angular-residual (gp-pqr) and the full-state (gp-full) GP-MPCC over five runs each. The second is an upward spiral around a virtual object of interest, during which the vehicle keeps pointing towards the center while gradually increasing its pitch angle, mimicking a close-range inspection. This maneuver demands continuous attitude changes and is repeated ten times with the nominal and the angular-residual MPCC.

VI-D Hardware Validation

We validate the presented methods on the MOLA AUV shown in Fig. 1. The MOLA AUV is equipped with an Inertial Measurement Unit (IMU), a pressure sensor, and a Doppler Velocity Log (DVL), which are fused by an Extended Kalman Filter (EKF) running on an onboard NVIDIA Orin NX for state estimation. The MPCC runs topside on the same notebook as in the simulation study and sends the commanded normalized body-frame efforts \bm{\tau} to the vehicle, where the onboard thrust allocation distributes them to the individual thrusters. The experiments were conducted in a 13\times 9\times 10\,\mathrm{m} saltwater test tank. We compare the nominal MPCC as well as the angular-residual GP-MPCC against the well-tuned PID controller running on the MOLA AUV, which has proven itself during multiple field deployments and tracks the same waypoints sequentially as pose setpoints. Each controller performs the lawnmower pattern five times. As a final test of the method’s deployability in a real scenario, the controller execute the more challenging inspection spiral.

Fig. 8: Upward inspection spiral in the test tank: the MPCC variants follow the spline reference, whereas the PID controller moves between the waypoints one DoF at a time.

VII RESULTS

VII-A Simulation

Fig. 5 summarizes the lawnmower runs in simulation. The angular-residual GP-MPCC reduces the attitude RMSE from 0.81^{\circ} to 0.55^{\circ} (32%) at an unchanged position RMSE of 0.06 m and unchanged control energy. The full-state variant, on the other hand, roughly doubles the position and attitude errors as well as the control energy, and its trajectory visibly oscillates around the reference, confirming that the noisy linear residuals deteriorate the closed-loop performance. The inspection spiral in Fig. 6 shows the benefit of the learned angular residual much more clearly. The mismatch in the rotational dynamics, which had a small impact on the lawnmower pattern with constant attitude, becomes dominant when the reference demands continuous attitude changes. With the nominal model, the attitude RMSE ranges from 8^{\circ} to 48^{\circ} with a mean of 31^{\circ}, i.e., the controller does not reliably hold the commanded attitude while circling the object. The angular-residual GP-MPCC, in contrast, tracks the attitude consistently with an RMSE of 4.5^{\circ}, while the position RMSE decreases from 0.048 m to 0.043 m and the control energy by 6%.

VII-B In-Water Experiments

Fig. 7 shows the aggregated metrics of the lawnmower experiments with the MOLA AUV. The nominal MPCC matches the position RMSE of the PID controller of 0.033 m, while reducing the attitude RMSE from 4.5^{\circ} to 3.2^{\circ} at a slightly lower control energy. Adding the angular residual further reduces the attitude RMSE to 2.4^{\circ}, i.e., by 47% compared to the PID and by 25% compared to the nominal MPCC, at the cost of a higher position RMSE of 0.040 m and 28% more control energy than the nominal MPCC. The higher control energy of the GP-augmented model stems from more aggressive control actions; since the MPCC weights are kept the same across all experiments, a higher weight on the input rate can mitigate this effect.

Fig. 8 shows the inspection spiral in the test tank. Both the nominal and the angular-residual GP-MPCC follow the spiral closely, whereas the PID controller, which regulates each DoF independently towards the next waypoint, resorts to a piecewise motion that does not resemble the intended inspection path. Since the PID controller does not follow the spline reference, a quantitative comparison is not meaningful for this maneuver.

VII-C Discussion

The results in simulation and in the test tank show consistent qualitative behavior. Compensating the angular residuals improves the attitude tracking, whereas using a GP for every DoF degrades the performance in our setup, so that domain knowledge about where the nominal model is deficient is crucial to deploy learning-based methods sensibly. The benefit of the learned residual grows with the complexity of the maneuver: it is moderate on the lawnmower pattern and substantial on the inspection spiral. Furthermore, the nominal and the angular-residual MPCC perform similar to or better than the PID controller on the lawnmower pattern at a comparable control energy, while the PID fails to follow the more complex spiraling inspection motion. It is worth noting that considerably less engineering time was spent on integrating and tuning the MPCC-based controllers than on the PID controller, which has matured over multiple field deployments. Beyond the tracking performance, the MPCC formulation directly incorporates state and actuator constraints, which the PID controller cannot.

VIII CONCLUSIONS

In this paper, we presented a 6-DoF MPCC scheme for a holonomic AUV that tracks position and attitude references independently, and augmented its model with GP-learned residual dynamics. Simulation and in-water experiments showed that a sensible selection of the learned residuals improves the tracking performance, whereas learning all residuals is detrimental. Compensating the angular residuals halves the attitude error of a field-proven PID controller on a lawnmower survey and, on a spiraling inspection maneuver in simulation, reduces the attitude error of the nominal MPCC by 85% at a lower control energy. The MPCC approaches match or outperform the PID controller on the lawnmower pattern and follow an inspection maneuver that the PID cannot execute, while requiring less engineering effort.

Several avenues open up from here. While training the GPs is lightweight, online learning becomes crucial during longer deployments to reflect changes in the dynamics over time, and active learning schemes could improve the coverage of the state space. Navigation is an essential factor during field deployments, and state estimation underwater is inherently uncertain. Incorporating this uncertainty into the propagation scheme of the GP-MPCC is a natural extension. Improving the constraint tightening would further increase the robustness and allow for maneuvers where constraint satisfaction is critical, i.e., the close inspection of fragile underwater structures. Finally, since the MPCC readily incorporates constraints and geometric references, it enables further capabilities such as obstacle avoidance or seafloor

ACKNOWLEDGMENT

In accordance with the IEEE policy on AI-generated content, the authors disclose that Claude (Anthropic) was used for coding assistance during the implementation and for language editing of the manuscript.

References

  1. [1] A. Amer, M. Mehndiratta, Y. Brodskiy, and E. Kayacan (2025) Empowering Autonomous Underwater Vehicles Using Learning-Based Model Predictive Control With Dynamic Forgetting Gaussian Processes. pp. 1–8. External Links: ISSN 1558-0865, Document
  2. [2] S. Bhat, G. Troni, and I. Stenius (2026) Online learning for agile underwater maneuvering: Gaussian processes and sparse regression for data-driven model predictive control. 195, pp. 105211. External Links: ISSN 0921-8890, Document
  3. [3] M. Cai, Y. Wang, S. Wang, R. Wang, and M. Tan (2024) Autonomous Manipulation of an Underwater Vehicle-Manipulator System by a Composite Control Scheme With Disturbance Estimation. 21 (1), pp. 1012–1022. External Links: ISSN 1558-3783, Document
  4. [4] H. Chen and F. Allgöwer (1998) A Quasi-Infinite Horizon Nonlinear Model Predictive Control Scheme with Guaranteed Stability. 34 (10), pp. 1205–1217. External Links: Document
  5. [5] P. Cieślak (2019) Stonefish: An Advanced Open-Source Simulation Tool Designed for Marine Robotics, With a ROS Interface. In OCEANS 2019 - Marseille, pp. 1–6. External Links: Document
  6. [6] M. Diehl, H. G. Bock, and J. P. Schlöder (2005) A Real-Time Iteration Scheme for Nonlinear Optimization in Optimal Feedback Control. 43 (5), pp. 1714–1736. External Links: Document
  7. [7] family=Benzon, F. F. Sørensen, E. Uth, J. Jouffroy, J. Liniger, and S. Pedersen (2022) An Open-Source Benchmark Simulator: Control of a BlueROV2 Underwater Robot. 10 (12), pp. 1898. External Links: ISSN 2077-1312, Document
  8. [8] T. I. Fossen (2021) Handbook of Marine Craft Hydrodynamics and Motion Control, 2nd Edition. John Wiley & Sons, Ltd. External Links: Link, ISBN 978-1-119-57503-0
  9. [9] T. Gao, Y. Luo, C. Lv, W. Luo, X. Fu, N. Zhao, X. Luo, and Y. Shen (2024) Model Predictive Control for an Autonomous Underwater Robot with Fully Vectored Propulsion. In 2024 IEEE International Conference on Robotics and Automation (ICRA), pp. 10482–10488. External Links: Document
  10. [10] J. R. Gardner, G. Pleiss, D. Bindel, K. Q. Weinberger, and A. G. Wilson (2018) GPyTorch: Blackbox Matrix-Matrix Gaussian Process Inference with GPU Acceleration. In Advances in Neural Information Processing Systems, Vol. 31.
  11. [11] S. Heshmati-Alamdari, A. Eqtami, G. C. Karras, D. V. Dimarogonas, and K. J. Kyriakopoulos (2014) A self-triggered visual servoing model predictive control scheme for under-actuated underwater robotic vehicles. In 2014 IEEE International Conference on Robotics and Automation (ICRA), pp. 3826–3831. External Links: ISSN 1050-4729, Document
  12. [12] S. Heshmati-alamdari, G. C. Karras, P. Marantos, and K. J. Kyriakopoulos (2018) A Robust Model Predictive Control Approach for Autonomous Underwater Vehicles Operating in a Constrained Workspace. In 2018 IEEE International Conference on Robotics and Automation (ICRA), pp. 6183–6188. External Links: ISSN 2577-087X, Document
  13. [13] L. Hewing, J. Kabzan, and M. N. Zeilinger (2020) Cautious Model Predictive Control Using Gaussian Process Regression. 28 (6), pp. 2736–2743. External Links: ISSN 1558-0865, Document
  14. [14] L. Hewing, K. P. Wabersich, M. Menner, and M. N. Zeilinger (2020) Learning-Based Model Predictive Control: Toward Safe Learning in Control. 3 (1), pp. 269–296. External Links: ISSN 2573-5144, 2573-5144, Document
  15. [15] L. Hong, L. Liu, Z. Peng, and F. Zhang (2025)Control of Marine Robots in the Era of Data-Driven Intelligence(Website) External Links: 2506.21063, Document
  16. [16] A. S. Huang, E. Olson, and D. C. Moore (2010) LCM: Lightweight Communications and Marshalling. In 2010 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pp. 4057–4062. External Links: Document
  17. [17] M. Krinner, A. Romero, L. Bauersfeld, M. Zeilinger, A. Carron, and D. Scaramuzza (2024)MPCC++: Model Predictive Contouring Control for Time-Optimal Flight with Safety Constraints(Website) External Links: 2403.17551, Document
  18. [18] A. Lahr, J. Näf, K. P. Wabersich, J. Frey, P. Siehl, A. Carron, M. Diehl, and M. N. Zeilinger (2026) L4acados: Learning-Based Models for acados, Applied to Gaussian Process-Based Predictive Control. 34 (3), pp. 1091–1105. External Links: ISSN 1558-0865, Document
  19. [19] A. Lahr, A. Zanelli, A. Carron, and M. N. Zeilinger (2023) Zero-order optimization for Gaussian process-based model predictive control. 74, pp. 100862. External Links: ISSN 0947-3580, Document
  20. [20] D. Lam, C. Manzie, and M. Good (2010) Model predictive contouring control. In 49th IEEE Conference on Decision and Control (CDC), pp. 6137–6142. External Links: ISSN 0191-2216, Document
  21. [21] A. Liniger, A. Domahidi, and M. Morari (2015) Optimization-based autonomous racing of 1:43 scale RC cars. 36 (5), pp. 628–647. External Links: ISSN 1099-1514, Document
  22. [22] X. Macatangay, S. A. Gabriel, R. Hoseinnezhad, A. Fowler, and A. Bab-Hadiashar (2024) Machine Learning for Modeling Underwater Vehicle Dynamics: Overview and Insights. 12, pp. 139486–139504. External Links: ISSN 2169-3536, Document
  23. [23] C. E. Rasmussen and C. K. I. Williams (2008) Gaussian processes for machine learning. 3. print edition, Adaptive Computation and Machine Learning, MIT Press. External Links: ISBN 978-0-262-18253-9
  24. [24] J. B. Rawlings, D. Q. Mayne, and M. Diehl (2024) Model Predictive Control: Theory, Computation, and Design. 2 edition, Nob Hill Publishing, LLC. External Links: Link
  25. [25] A. Romero, S. Sun, P. Foehn, and D. Scaramuzza (2022) Model Predictive Contouring Control for Time-Optimal Quadrotor Flight. 38 (6), pp. 3340–3356. External Links: Document
  26. [26] R. M. Saback, A. G. S. Conceicao, T. L. M. Santos, J. Albiez, and M. Reis (2020) Nonlinear Model Predictive Control Applied to an Autonomous Underwater Vehicle. 45 (3), pp. 799–812. External Links: ISSN 1558-1691, Document
  27. [27] A. Scampicchio, E. Arcari, A. Lahr, and M. N. Zeilinger (2025) Gaussian processes for dynamics learning in model predictive control. 60, pp. 101034. External Links: ISSN 1367-5788, Document
  28. [28] C. Shen, B. Buckham, and Y. Shi (2017) Modified C/GMRES Algorithm for Fast Nonlinear Model Predictive Tracking Control of AUVs. 25 (5), pp. 1896–1904. External Links: ISSN 1558-0865, Document
  29. [29] C. Shen, Y. Shi, and B. Buckham (2017) Integrated Path Planning and Tracking Control of an AUV: A Unified Receding Horizon Optimization Approach. 22 (3), pp. 1163–1173. External Links: ISSN 1941-014X, Document
  30. [30] K. Shoemake (1985) Animating Rotation with Quaternion Curves. In Proceedings of the 12th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH ’85, pp. 245–254. External Links: Document, ISBN 0-89791-166-0
  31. [31] T. V. Slawik, L. Christensen, and F. Kirchner (2026) Recent advances in tracking control of hydrobatic AUVs. 74 (2), pp. 91–101. External Links: ISSN 2196-677X, Document
  32. [32] Z. Tian and M. Chen (2025) Safe and Optimal Motion Planning for Autonomous Underwater Vehicles: A Robust Model Predictive Control Framework Integrating Fast Marching Time Objectives and Adaptive Control Barrier Functions. 9 (4), pp. 273. External Links: ISSN 2504-446X, Document
  33. [33] J. Verhagen, E. Krantz, C. Sidrane, D. Dörner, N. De Carli, P. Roque, H. Mao, G. Tibert, I. Stenius, C. Fuglesang, D. Dimarogonas, and J. Tumova (2026) Validation of Space Robotics in Underwater Environments via Disturbance Robustness Equivalency.
  34. [34] R. Verschueren, G. Frison, D. Kouzoupis, J. Frey, Niels van Duijkeren, A. Zanelli, B. Novoselnik, T. Albin, R. Quirynen, and M. Diehl (2022) Acados—a modular open-source framework for fast embedded optimal control. 14 (1), pp. 147–183. External Links: ISSN 1867-2957, Document
  35. [35] R. Vivekanandan, D. Chang, and G. A. Hollinger (2023) Autonomous Underwater Docking using Flow State Estimation and Model Predictive Control. In 2023 IEEE International Conference on Robotics and Automation (ICRA), pp. 1062–1068. External Links: Document
  36. [36] H. Wei and Y. Shi (2023) Mpc-based motion planning and control enables smarter and safer autonomous marine vehicles: perspectives and a tutorial survey. 10 (1), pp. 8–24. External Links: ISSN 2329-9274, Document
  37. [37] F. Xu, L. Zhang, and J. Zhong (2024) Three-Dimensional Path Tracking of Over-Actuated AUVs Based on MPC and Variable Universe S-Plane Algorithms. 12 (3), pp. 418. External Links: ISSN 2077-1312, Document