Fields of Manuscript

Journal of Advanced Marine Engineering and Technology - Vol. 48 , No. 4

[ Original Paper ]
Journal of Advanced Marine Engineering and Technology - Vol. 48, No. 4, pp. 207-218
Abbreviation: JAMET
ISSN: 2234-7925 (Print) 2765-4796 (Online)
Print publication date 31 Aug 2024
Received 07 Jul 2024 Revised 30 Jul 2024 Accepted 30 Jul 2024
DOI: https://doi.org/10.5916/jamet.2024.48.4.207

Computationally efficient trajectory tracking control of AUVs with nonlinear model predictive control using neural-based dynamics modeling
Ajay Gautam

Correspondence to : Assistant Professor, School of Electrical, Electronics and Communication Engineering, Korea University of Technology and Education, 1600 Chungjeol-ro, Byeongcheon-myeon, Cheonan-si, Chungcheongnam-do 31253, Republic of Korea, E-mail: agautam@koreatech.ac.kr, Tel: 041-560-1425


Copyright © The Korean Society of Marine Engineering
This is an Open Access article distributed under the terms of the Creative Commons Attribution Non-Commercial License (http://creativecommons.org/licenses/by-nc/3.0), which permits unrestricted non-commercial use, distribution, and reproduction in any medium, provided the original work is properly cited.
Funding Information ▼

Abstract

A computationally efficient nonlinear model predictive control (MPC) scheme is presented for the problem of trajectory tracking control, in the 3D space, of autonomous underwater vehicles (AUVs) under constrained speeds and thruster forces, and possibly in the presence of disturbances and actuator limitations. The proposed scheme considers AUV dynamics with four degrees of maneuverability and uses an accurate modeling of the discrete-time dynamics of the system using a suitable neural network that enables efficient state propagations and MPC cost gradient computations owing to the parallel computation structure of the network, thereby allowing a more efficient solution of the constrained nonlinear MPC optimization problem using a sequential quadratic programming-based approach. This also paves way for MPC optimizations over larger time horizons which may be necessary under certain situations. The effectiveness of the proposed scheme is verified with extensive simulations covering various scenarios including the ones that deal with the presence of random and non-random time-varying disturbances and, additionally, the condition of underactuation of the vehicle due to the failure of an actuator.


Keywords: Trajectory tracking, Nonlinear model predictive control, Autonomous underwater vehicles, Underactuated AUV, Computationally efficient NMPC

1. Introduction

Over the past several years, there has been an increasing aca-demic, technological and commercial interest in unmanned auton-omous systems operating in various environments – on ground and water, in air and space and under the sea [1]. An autonomous underwater vehicle (AUV) is a computer controlled robotic vehi-cle equipped with a propulsion system enabling its maneuvering in the three-dimensional (3D) space under the sea. Like other unmanned autonomous systems, AUVs have extensive scientific, military and commercial applications such as mapping and imag-ing of underwater landscapes, deep-sea exploration of marine life, inspection of underwater infrastructure, detection and clear-ance of pollutants and mines, undersea search and rescue and so on (see, e.g., [2]-[5]). Behind the successful design and operation of AUVs are various enabling technologies in the field of sens-ing, propulsion, communications, guidance, navigation and con-trol [6].

Target or trajectory tracking ability is very crucial for most AUV applications and this requires sophisticated navigation and control schemes since an AUV and the environment that it oper-ates in are characterized by high-dimensional nonlinear dynamics, often uncertain, constrained and underactuated, and usually un-predictable oceanic disturbances. Research on reliable control of AUVs is extensive and continuing [7]. A survey of early works on AUV control can be found in [8]. Traditional control design for AUVs includes various analytical design approaches employ-ing nonlinear feedback [9], gain-scheduled or parameterized line-ar feedback [10], input-output feedback linearization [11], and so on. To deal with control challenges owing to the highly nonlinear dynamics involving parameter uncertainties and disturbances, techniques such as sliding mode control [12] and adaptive control [13] have been tried and continue to be explored [14]-[16]. Al-ternative approaches that have been extensively explored include the more computation-oriented techniques such as those using fuzzy logic [17], and neural networks [18]-[19].

Control approaches explored in the works mentioned above do not directly deal with state and input constraints whose satisfac-tion is usually crucial in trajectory tracking applications. Model predictive control (MPC) is a promising computation-oriented control approach that handles constraints in a systematic way [20]. This approach is based on solving an open-loop control optimization problem online in real time and, with the advance-ments in computing hardware speed, the technology has become applicable for an increasing variety of linear and nonlinear control applications including trajectory planning and tracking applica-tions. Theoretical analysis of the method has also matured over the years [21]. MPC has been used for trajectory tracking control of marine vehicles in several earlier works [22]-[28]. Nonlinear MPC is used together with an unscented Kalman filter for posi-tioning of ships in [22]. In [23], the authors present a combina-tion of MPC and genetic algorithms to achieve dynamic trajectory tracking. Similarly, a Lyapunov-based MPC is explored for robust trajectory tracking of AUVs in [24]. An event-triggered nonlinear MPC is presented in [25] for trajectory tracking by an underactuated ship with reduced computational burden and a similar approach is used for AUVs in the presence of disturb-ances in [26]. In these schemes, the MPC optimization is carried out only when the vehicle’s deviation from the desired state is outside a chosen bound. In [27], a robust nonlinear MPC is de-signed to achieve robust trajectory tracking of underactuated AUVs in the presence of disturbance inputs.

While MPC offers a remarkable control performance, it is computationally demanding, which is particularly significant for nonlinear systems. So, a fast and reliable algorithm to solve the nonlinear MPC problem is always a necessity [28]. Since MPC is primarily envisaged in the discrete-time (DT) domain, an accu-rate DT model of the system is required, and is not readily ob-tained for a nonlinear system. Most MPC schemes use DT mod-els obtained using a simple Euler or Runge-Kutta (RK)-based discretization, which requires a very small sampling period to be considered. This limits the horizon length over which the MPC optimization can be carried out in real time, and it can be a draw-back in certain situations in trajectory tracking.

In this work, we present a trajectory tracking nonlinear MPC scheme that is based on an accurate modeling of the DT dynam-ics of the AUV and therefore allows an MPC optimization over a larger time horizon. In particular, we consider an AUV with four degrees of maneuverability and model its DT dynamics for a suitable sampling time with a feedforward neural network (NN). A network with a single hidden layer is chosen so that nested or sequential computations can be avoided during cost gradient computations. Such a model can be obtained for sampling inter-vals significantly larger than those that can be used with the ap-proximate methods. Following [29], we present a sequential quadratic programming (sQP) algorithm to solve the resulting NMPC problem for trajectory tracking. The sQP algorithm en-sures feasibility after each iteration and uses a simple trust region constraint to achieve convergence.

We verify the performance of the proposed tracking control scheme through extensive nonlinear simulations for an AUV mission in ideal and non-ideal scenarios. Non-ideal conditions include the presence of external disturbances and/or the failure of the control component along the transverse direction. Simulations show the effectiveness of the proposed approach.

Notations: In denotes an identity matrix of size n, 0m×n denotes an m×n matrix of all zeros, and 1n represents a n-dimensional vector of all ones. If any subscript is omitted, the dimension should be clear from the context. For a vector v, diag(v) represents a diagonal matrix with the elements of v along the diagonal, and with entities Δ1, Δ2, …, diag(Δ1, Δ2, …) represents a (block) diagonal matrix with Δ1, Δ2, … along the diagonal. For a vector v, vQ2 with a symmetric matrix Q represents the quadratic form vTQv. For a DT signal x(k), x(k + i|k) denotes the future signal value x(k + i) predicted at time k.


2. System Description
2.1 Mathematical Model of AUV Motion

The motion of an AUV, like that of any marine vehicle, is conveniently described in 6 degrees of freedom (DOF) with its pose specified by its position p=(x, y, z) and its orientation θ=(ϕ, θ, ψ) (in terms of Euler angles) in an Earth-fixed coordinate frame XE-YE-ZE and its linear and angular velocities v=(u, v, w) and ω=(p, q, r) specified in a body-fixed reference frame XB-YB-ZB as illustrated in Figure 1. The origin O of the body-fixed frame is chosen at the vehicle’s center of gravity (CG) and its axes are chosen to coincide with the three principal axes of inertia – longitudinal, transverse and normal. So, the linear velocity components u, v and w correspond to surge, sway and heave speeds and the angular velocity components p, q and r correspond to roll, pitch and yaw speeds.


Figure 1: 
Coordinate frames for describing AUV motion

The kinematic relationship between the pose vectors and the velocity vectors are given by

p˙=J1θv,   θ˙=J2θω

where J1 (θ) and J2 (θ) are 3×3 transformation matrices with elements depending on ϕ, θ, ψ (see, e.g., [30] for the details).

In this paper, we consider underwater vehicles equipped with metacentric restoring forces preventing roll and pitch motions so that the roll and pitch angles ϕ and θ and the angular speeds p and q are negligible and close to zero. Under this assumption, the reduced-order kinematic relationship is described by

p˙=J1ψv=cos ψ-sin ψ0sin ψ   cos ψ0001v,        ψ˙=r(1) 

Further, the dynamics of the vehicle are specified in terms of the combined velocity vector υ=(v, r) by the relationship

Mυ˙+Cυυ+Dυυ+g=τ+d(2) 

where M is the matrix of mass/inertia components (including the added mass/inertia), C(υ) is the matrix of Coriolis terms (including that of added mass/inertia), D(υ) is the hydrodynamic damping matrix, g is the vector of gravitational forces and moments, τ is the control input vector comprising forces and torques and d is the vector of disturbance forces/torques, mainly due to water currents. Assuming the AUV body to be symmetric about the x-y and x-z planes, and that it has a slightly positive buoyancy, we have,

M=diagmX,mY,mZ,IZ,C(v)=000-mYv000mXu0000mYv-mXu00D(v)=-diagXu,Yv,Zw,Nr-diagXu|u||u|,Yv|v||v|,Zw|w||w|,Nr|r||r|g=00B-W0Tτ=τXτYτZτNT

where W and B are the weight and the buoyancy of the vehicle, and, mX, mY, mZ, IZ are mass/inertia terms (including added mass/inertia), Xu, Yv, Zw, Nr and Xu|u|, Yv|v|, Zw|w|, Nr|r| are hydrodynamic damping terms, τX, τY, τZ, τN are the control forces/torque generated by the thrusters and dX, dY, dZ, dN are disturbance forces/torque effective along/about the surge, sway, heave and yaw directions.

Thus, combining Equations (1) and (2), we can write the mathematical description of the AUV motion in the 3D space in the form of the following nonlinear state-space model

x˙=fx,u,d,        y=C x(3) 

where x=x  y  z  ψ  u  v  w  rTR8 is the state vector, u=τR4 is the control input vector, dR4 is the disturbance input vector, and

fx,u,d=ucosψ-vsinψusinψ+vcosψwr1mX(mYvr+(Xu+Xuuu)u+τX+dX) 1mY(-mXur+(Yv+Yvvv)v+τY+dY)1mZ(W-B+(Zw+Zwww)w+τZ+dZ)1IZ((mX-mY)uv+(Nr+Nrrr)r+τN+dN)

Further, the output vector y=CX=x  y  z  ψTR4 so that =[I4     04×4].

Remark 1: The motion of an AVU described by (3) has 4 DOF and is supported by control inputs along the 4 directions. The AUV can still be maneuvered if the sway input component τY is unavailable or the corresponding actuator is faulty. A vehicle in such a situation is considered to be underactuated. Several works on AUV trajectory tracking control have focused on underactuated AUVs (e.g., [27])

2.2 Problem Description

We wish to control the motion of an AUV for missions that re-quire tracking a constant target point or tracking a specified time-varying reference trajectory in some optimal way while satisfying all requirements including system constraints.

2.2.1 System Constraints

The motion of an AUV is usually constrained by limitations on the values of control inputs and state components; that is, the limits on the thruster forces and torque that can be generated and the limits on the velocities that are tolerated in each direction. Considering that the control input components and the velocity components are bounded in their absolute values, we express the constraints in collective forms mentioned below:

u=τU=uR4|u1τ^X,|u2τ^Y,|u3τ^Z,|u4τ^N(4a) 
xX=xR8|x5u^,|x6v^,|x7w^,|x8r^(4b) 

Constraints on the position components of the state may exist but they mostly depend on the mission and the environment and may be specified dynamically during the mission.

2.2.2 Target Reference Point or Trajectory

When a target reference point is given, it is the desired final position pd which the vehicle is supposed to eventually reach. The reference trajectory and the final time may not be specified in this scenario.

When a target reference trajectory is given, it is specified in the form of a time-varying position vector pdt=xdt,ydt, zdt which is a smooth and continuous function of time. The other components of the desired state xdt can be readily obtained by first finding ψdt=atanydtxdt, , and then finding the derivatives: vdt=J1-1ψp˙d(t) and rdt=ψ˙dt.

Here, we assume that the target reference point or reference trajectory is feasible in the sense that it can be tracked by the AUV while satisfying all constraints. This is theoretically so if the desired position trajectory is a part of a feasible solution to the system model (3) satisfying all constraints.

2.2.3 Control Objectives

Given a constant target position pd (t) = pd or a time-varying reference trajectory pd (t), the primary control objective is to drive the AUV as close as possible to the reference point or trajectory in some best possible way, particularly in the sense of minimizing a quadratic function of the position error

t=t0tfΔpTt Qp Δptdt,      Δpt=pt-pdt(5) 

over the specified or some reasonable time horizon [t0, tf]. The control scheme should ensure that all system constraints are satisfied at all times. Further, it is also expected to show a reasonably good performance even when there are disturbances and parameter uncertainties or some minor faults in the system model.

2.2.4 Other Considerations

A control scheme designed to achieve the above-mentioned control objective needs to be aware of the desired reference tra-jectory and the vehicle state at all times. It is assumed that the AUV receives tracking mission information through suitable communications from some external agency or it is capable of generating the reference trajectory itself. Further, it is supported by an appropriate navigation system with several sensors whose readings can be used to estimate the actual state of the AUV. Nav-igation schemes for autonomously operating systems have been well researched and newer and more promising techniques con-tinue to be explored (see, e.g., [31], [32]).


3. AUV Trajectory Tracking with NMPC using Neural-Modeled System Dynamics
3.1 Basic NMPC Algorithm

Among various control approaches, MPC is perhaps one of the best suited control schemes to achieve the control goal men-tioned in Section 2.2.3 for a constrained AUV system. MPC uses the system dynamics model, usually in the DT framework, to numerically optimize the control input over some time horizon so as to minimize a suitably defined cost function over that horizon. This optimization is done regularly in real time, usually at every discrete time step to update the control input to be applied to the system.

Consider a DT version of model (3), viz.,

xk+1=ϕxk,uk,dk,        yk=Cxk(6) 

Here, x(k), u(k), d(k) and y(k) represent the values of the signals at the discrete sampling time kT,kZ, where T is the sampling period. An MPC scheme meant to achieve the desired trajectory tracking by the AUV uses a cost function of the form

Jxk, Uk,k=i=0N-1lxk+i|k,uk+i|k,k+i (7) 

with lx,u,k=x-xdkQ2+u-udkR2

where Q and R are positive (semi-)definite matrices defining the stage cost function l(., ., .) and

Uk=uk|kT  uk+1|kT uk+N-1|kT T

is the stacked vector of inputs to be optimized. The MPC optimization problem to be solved at each time step k is stated as

minimizeUk Jxk, Uk,k(8) 

such that

xkk=xkxk+i+1k=ϕxk+i|k,uk+i|k,dk+i|k,i=1,..,N-1Mx xk+ik1,  i=1,2,..,NMu uk+ik1,  i=0,1,..,N-1

where matrices Mx and Mu in the last two constraints are so chosen that they represent xk+ikX and uk+ikU.

A basic MPC algorithm based on problem (8) is outlined below.

Algorithm 1: Online MPC algorithm: At each time step k:

 i) Measure or estimate the state of the system, x(k).

 ii) Solve problem (8) to obtain an optimal U*(k).

 iii) Apply the control input u*(k|k) to the AUV.

The cost function (7) used in the MPC algorithm can be made to approximate (5) with the choices Q=CTC and R=0. Still, there are various difficulties in successfully achieving the control objective by implementing Algorithm 1. These include theoretical and practical concerns related to stability, robustness and implementation.

3.2 Stability

If the time horizon [t0, tf] of the reference trajectory is significant, covering it entirely in (7) may be computationally prohibitive. It is desired that a repeated solution of (8) with a modest value of N in (7) as outlined in Algorithm 1 ensures the asymptotic or exponential convergence of the tracking error Δx(k) = x(k) - xd(k) to the origin or to a set around it.

Let us consider the disturbance-free dynamics

xk+1=ϕoxk,uk(9) 

where ϕo (x, u) = ϕ(x, u, 0).We make the following assumption about the reference trajectory.

Assumption 1: The desired reference trajectory (xd(k), ud(k)) satisfies the DT state dynamics in (9) :

xdk+1=ϕoxdk,udk

Under Assumption 1, the tracking error dynamics are given by

Δxk+1=ϕoxdk+Δxk,udk+Δuk-ϕoxdk,udk

where Δu(k) = u(k) - ud(k). A local linearization of the error dynamics about a reference point r=(xd(k), ud(k)) in the desired trajectory results in

Δxk+1=Ar Δxk+Br Δuk+ϑΔxk, Δuk

where Ar=ϕoxr, Br=ϕour and ϑ(.,.) represents the higher order terms.

If (Ar, Br) is stabilizable, for a Δx(k) sufficiently close to the origin, there exists a state feedback gain matrix Kr such that with u(k) = ud(k) + KrΔx(k), the tracking error satisfies the contractivity property

Δxk+1Pr2<ρΔxkPr2(10) 

with ρ ∈ (0, 1) for some positive definite Lyapunov matrix Pr [21]. This fact can be used to construct terminal state feedback controllers together with associated invariant sets to be used as terminal state constraints in the online MPC optimization problem to guarantee stability. For a class of tracking problems, a parameterized state feedback gain and the associated invariant set may be computed and used for a range of desired state-input pairs [29]. However, computing terminal state-feedback gains and the associated invariant sets is usually computationally burdensome. As explored in [21], under the local stabilizability condition (which the AUV system satisfies), Algorithm 1 with a positive definite matrix Q in (7) and a sufficiently large horizon length N ensures that the tracking error exponentially converges to the origin. However, the theoretical bound on the required horizon length N can be quite conservative.

3.3 Handling Disturbances and Uncertainties

The AUV motion model includes the disturbance term d(t) which is used to mainly model the effect of ocean currents. This creates a difficulty in the evaluation of the cost function and in ensuring the constraints in (8). Since the bounds on the disturbance components can be estimated, we can use a robust approach to cost evaluation and constraint satisfaction. Potential robust approaches include the tube-based approach [33], disturbance-feedback-based approach (e.g., [34]), and so on. The latter deals with linear time-varying systems, and, as we shall see in Section 3.4, when problem (8) is solved using the sQP approach, nonlinear dynamics constraints are linearized about the existing state-input trajectories effectively resulting in an MPC problem for a linear-time-varying system.

The robust approaches, however, usually lead to conservative results while significantly increasing the computational burden. In our problem, the disturbance input is an input disturbance that enters the system in the same way as the control input. It can be estimated using an appropriate filter and its effect countered ef-fectively using the control input. Since the disturbance is slowly time-varying, it can be assumed to remain constant through the prediction horizon. Slightly tightened input constraints can be used to account for potential variations in the disturbance values.

Since the system model that we use is based on several simpli-fying assumptions and the model uses a number of parameters whose values may only be approximately known, there are other potential sources of uncertainties. However, the inherent robust-ness of the MPC approach due to its receding horizon implemen-tation can be trusted to handle the effects of these uncertainties.

3.4 Numerical Implementation

The desired performance of the control scheme outlined in Al-gorithm 1 is achieved only under the condition that the DT dy-namics model is accurate and that the nonlinear optimization problem can be numerically solved within a fraction of the sam-pling period. An exact equivalent DT model of a continuous-time nonlinear system is not readily available. Numerical approxima-tions using Euler difference methods or RK methods are often used in applications. However, these numerical approximations are accurate only for small sampling intervals. Since we envisage the possibility of considering optimizations over longer horizon lengths, we consider a more accurate modeling of the DT dynam-ics using alternative approximations. A suitable approximator in this context is a single-layer feedforward neural-network (ff-NN) which does not involve nested nonlinear function evaluations. This simplifies and speeds up future state computations and also provides a simple analytical expression for gradient evaluations when solving the numerical optimization problem.

3.4.1 Neural Modeling of DT Dynamics

In the continuous-time state equation, the function f(x, u, d) is such that the input vectors u and d always appear together and none of the component functions depend on position variables x, y and z. So, we can assume a single input vector u representing the combined input and also omit x, y, z as variable inputs to the DT nonlinear dynamics function. Under these considerations, defining a vector χ=ψ  u  v  w  rT, the DT state equation can be written as

xk+1=A- xk+ϕnχk,uk(11) 

where A-= =diagI3,05×5 and ϕnχk,uk represents the nonlinear part of DT dynamics. Clearly, ϕnχ ,u is a continuous function of its arguments and it can be approximated to any desired accuracy by a ff-NN with a single hidden layer of a sufficiently large number of neurons. Let it be approximated by a network with η neurons in the hidden layer:

ϕnχ,u=WoφWχχ+Wuu+b+eχ,u

where WχRη×5 and WuRη×4 are the hidden layer weights for network inputs χ and u, bRη is the bias vector and WoR8×η is the output layer weight matrix. The vector function φ:RηRη is a diagonal operator that applies an identical continuous nonlinearity φi(.) = φ(.), usually a sigmoidal function (e.g., tanh(.) function) to each component of the argument of φ(.). e(χ, u) represents the approximation error and is assumed to be small.

The ff-NN representing the nonlinear DT dynamics function ϕn (χ, u) needs to be suitably trained by generating a rich set of input-output data samples through numerical simulations. Input data samples are chosen randomly from within the bounds considered and the corresponding output samples are computed using highly accurate numerical integration.

3.4.2 Numerical Solution of the MPC Optimization Problem

Having obtained a sufficiently accurate neural-based model of nonlinear DT dynamics, we follow the sQP-based algorithm mentioned in [29] to numerically solve the MPC optimization problem (8) where we replace the nonlinear dynamics constraint by the neural-based model

xk+i+1|k=A-xk+i|k+ Woφzk+i|k(12) 

where zk+i|k=WχGxk+i|k+Wuuk+i|k+b with G=05×3   I5. Here, we have assumed that the approximation error is negligible. The algorithm is based on the linearization of the nonlinear equation in (12) about the existing feasible state and input trajectories. Given an existing feasible input sequence

U-k=u-k|kT   u-k+1|kT u-k+N-1|kT T

the corresponding state sequence

X-k= x-k|kT   x-k+1|kT x-k+N|kT T

can be immediately obtained using (12). Linearizing (12) using the fist-order Taylor expansion of the function φ(.) about the existing state-input trajectories gives us

xk+i+1|k=Ak+ik xk+i|k+Bk+ik uk+ik+ hk+ik(13) 

where

Ak+ik=A-+Wo diagφ'z-k+i|kWχGBk+ik=Wo diagφ'z-k+i|kWuhk+ik= Woφz-k+i|k - Ak+ik-A-×x-k+i|k-Bk+iku-k+i|k

Here, φ'.=φ1'z-1  φη'z-η T is a vector with component-wise derivatives.

With the linearized version (13) of the dynamics constraint for i = 0, 1, .., N - 1, the optimization problem (8), can be expressed as a QP problem

minimize    UkxkT    UkTTH2such that   MxkT    UkTT1(14) 

with appropriately defined matrices H and M (See, e.g., [29], [34] for the details.

In the following, we briefly outline the sQP-based algorithm to solve problem (14).

Algorithm 2: sQP-based solution of neural-modeled NMPC problem

  • i) If k=0, choose a feasible initial decision vector
    U-k=u-k|kT  u-k+1|kT u-k+N-1|kT T
    Else, set u-k+i|k=uk+i|k-1, i=0,..,N-2
    and u-k+N-1|k=uk+N-2|k-1.
    Also, using (12), find the corresponding state sequence
    {x-k+iki=0N
  • ii) Compute Ak+ik, Bk+ik and hk+ik for i=0,,N-1 as mentioned in (13).
  • iii) Imposing an additional constraint Uk-U-kU for some suitably chosen set U, solve (14) to obtain U*k.
  • iv) If U*k-U-kϵ, stop.
    Else
    • • Compute the state sequence {x*k+iki=1N corresponding to the optimal solution U*k.
    • • If x*k+ikX, i=1,,N, set U-k=U*k and go to Step (ii).
      Else, update the set U and go to Step (iii).

The approach outlined in Algorithm 2 is also referred to as feasibility-perturbed sequential QP approach [35] since the feasibility is ensured through nonlinear propagation after each iteration. The additional constraint used in Step (iii) is a trust region constraint imposed to ensure that the new computed vector U(k) does not deviate too much from U-k so that the convergence of the solution can be ensured. A proper initialization procedure starting with a small N is usually required to obtain a feasible solution at time k = 0. With a proper initialization and a suitable trust region constraint, the algorithm gives a near-optimal solution within a few iterations.


4. Numerical Simulations
4.1 AUV Details

Extensive simulations are carried out to assess the performance of the proposed approach. Parameters specifying the dynamics of the AUV and the constraints applicable on speeds and thruster actions are mentioned in Table 1.

Table 1: 
AUV dynamics parameters and constraints
Mass / Inertia Hydrodynamic damping Coefficients Speed limits Thruster limits
mX 40 Xu -70 Xu|u| -100 u^ 1 τ^X 200
mY 51 Yv -100 Yv|v| -200 v^ 0.12 τ^Y 25
mZ 51 Zw -100 Zw|w| -100 w^ 0.75 τ^Z 180
IZ 15 Nr -50 Nr|r| -100 r^ π/4 τ^N 100
Restoring forces: W = 343.5, B = 345

4.2 AUV DT Dynamics Modeling with NNs

We obtain two ff-NNs – NN-1 and NN-2 to represent nonlinear DT dynamics for two different sampling periods – T1 = 1s and T2 = 0.25s. Both are trained with about 10000 samples of input-output data. Input data samples are selected randomly from the set 1.1(-π, π×GX×U) where the set [-π, π] is the range chosen for the yaw angle ψ. The factor 1.1 is used to provide some margin at the constraint boundaries. Outputs corresponding to input samples are obtained using the ode45 solver in MATLAB. Networks NN-1 and NN-2 are designed with η1 = 48 and η2 = 40 hidden layer neurons which use the tanh() activation function. After sufficient training, their mean squared error (MSE) performances are found to be of the order 10-5 and 10-6 respectively.

Table 2 gives a comparison, in terms of accuracy and computational efficiency, of model NN-2 with the popular RK-4 method (which is used, e.g., in [22], [26]). Here, the model accuracy is indicated by the MSE over all training and test samples, and, the computational efficiency is expressed in terms of the ratio of the average model function evaluation time over the average time taken by the accurate ode45 method in the same machine. While NN-2 is expectedly more accurate for this step size, what is significant is its comparative computational advantage which should remain significant (for both function evaluation and gradient evaluation) even for small step sizes for which the accuracy advantage may not be significant. Note that the RK-4 method is not stable with the time step size h = 1.

Table 2: 
Comparison of approximations with NN-2 and RK-4
NN-2 (T = 0.25) RK-4 (h = 0.25)
MSE 2 × 10-6 0.036
t-c/t-ode45 0.004 0.032

4.3 AUV Mission Simulation with NMPC

For tracking control performance evaluation, we consider an AUV mission comprising predefined time-varying trajectory tracking and free set-point tracking segments. In particular, the following phases are considered in the mission:

  • 1) Descending phase: Trajectory tracking phase 1 (100s)
    xdt=2+0.2t,  ydt=1+0.05t, 
    zdt=22-20e-xdt-22+ydt-1225
  • 2) Free set-point tracking phase (No fixed target time)
    xd,yd,zd=60,10,30 
  • 3) Object inspection phase (Trajectory tracking phase 2 (800s))
    xdt=71-10cos0.05(t-t2) + 0.01(t-t2)
    ydt=10+8sin(0.05(t-t2)),  
    zd(t) = 30-0.025(t-t2)

where t2 is the time when Phase 2 is completed.

We assume that the AUV is initially at rest at (0, 0, 0).

4.3.1 Performance in Disturbance-Free Scenario

We first consider the case without disturbances in the simulation model. In the MPC cost function, we use the cost matrix Q = diag(I4, 0.1I4 ) in all phases, and since the desired inputs are not specified, we mildly penalize the actual inputs with R = 10-5I4 in Phases 1 and 3 and R = 10-3I4 in Phase 2. We also look for a horizon length N that is sufficient to ensure that the predicted terminal state is close to the desired pose throughout the mission. It is found that with model NN-1 (T1 = 1s), a horizon length of N = 10 is generally sufficient when the initial state is not very far from the corresponding reference point. In Phase 2, the target point is initially not close but to avoid using a large horizon length, we consider a virtual reference converging to the target point (60, 10, 30) and update the virtual reference in real time.

Figure 2 shows the reference and actual AUV position trajec-tories that we achieve with the MPC scheme using model NN-1 in the disturbance-free scenario. It can be seen that the MPC is able to drive the AUV closely along the desired trajectory.


Figure 2: 
AUV trajectory obtained with the MPC scheme in disturbance-free scenario, alongside the reference trajectory

Figure 3 shows the position and velocity components of the AUV state and the thruster forces in x-, y-, z- directions. It can be seen that the z-direction thruster reaches the limit during Phase 1 when the decent is steep. Similarly, the surge and sway speed limits are reached during Phase 2. Figure 4(a) shows the position tracking errors during Phase 1 and 3, and it can be seen from the figure that the tracking error is within ±0.025m in each dimension. Note that the tracking error is not relevant in Phase 2.


Figure 3: 
Position, velocity and thruster force components during AUV mission in disturbance-free scenario


Figure 4: 
Position tracking errors in Phases 1 and 3 in disturbance-free scenario: (a) with model NN-1, (b) with model NN-2

In order to assess the impact of the accuracy of the dynamics model, we also simulate the performance of the MPC scheme with model NN-2. Since NN-2 uses a sampling time of 0.25s, a horizon length of 10s would require N = 40. However, since the input can be updated quickly, we consider N = 10 as earlier. The tracking response is similar to the one obtained with NN-1. However, as we can see in Figure 4(b), which presents the position tracking errors during Phase 1 and Phase 3, the tracking errors are smaller with NN-2 than with NN-1.

This can be expected since model NN-2 is at least one order of magnitude more accurate (in terms of MSE values) than NN-1 and it also updates the control actions 4 times more frequently.

4.3.2 Performance in the Presence of Disturbances

We next consider a scenario with disturbance inputs. Disturb-ances are mainly due to water currents inside the sea and are slowing varying in time but there can be other sources too. We consider a disturbance vector of the following form:

d=8sin0.1t+2v18cos(0.1t-0.3)+2v28cos(0.1t+0.8)+2v32sin0.1t+0.5+0.05v4

where v1,v2,v3,v4 are zero-mean Gaussian random variables with unit variance.

Figure 5 shows the tracking errors in Phases 1 and 3 in the presence of disturbance inputs. The errors in Part (a) are for the scheme with NN1 and those in Part (b) are for that with NN-2. Note that the transient phase is not shown. Evidently, the error magnitudes in the presence of disturbances are larger by a factor of about 5 (compare with Figure 4). Also, the error magnitudes are lower by about 50% with NN-2 than with NN-1 for reasons mentioned above. Nevertheless, the MPC scheme is able to limit the tracking errors within about 10cm in each direction when NN-1 is used and within about 5cm when NN-2 is used.


Figure 5: 
Position tracking errors in Phases 1 and 3 in the presence of disturbances: (a) with model NN-1, (b) with model NN-2

4.3.3 Performance in the Absence of Sway Control

In this part, we explore the performance of the MPC scheme in a scenario with a faulty sway (transverse direction) actuator. Even without a fault, the sway control considered in our scheme is limited because of the limitation in sway speed and sway-direction thrust. When sway control is completely absent, the AUV is considered to be underactuated and its maneuvering ability may be restricted in some situations. We consider this situation in the presence of disturbances as mentioned in Section 4.3.2. Figure 6 shows the state and control components evolving under the MPC scheme (using NN-1) in this scenario. It can be observed that while the control inputs (except τY, which is zero) and the velocities react and fluctuate to correct the effect of the disturbances that affect the system, position components vary rather smoothly with time.


Figure 6: 
The evolution of state and control components during the mission without sway control in the presence of disturbances

The plots in Figure 7 show 3D position errors (e=x-xd2+y-yd2+z-zd2 )  during Phase 3 in the three different scenarios considered (in Sections 4.3.1~4.3.3).


Figure 7: 
3D position tracking errors in various scenarios with dynamics models NN-1 and NN2

The errors in the first figure are obtained with model NN-1 and those in the second figure are obtained with model NN-2. Clearly, the presence of disturbances increases the tracking error and the actuator fault further increases it. And, because of higher accuracy and smaller sampling time, with model NN-2, errors are smaller by a factor of about 2.

4.3.4 Computational Requirements

Solving the nonlinear MPC problem is computationally demanding. Algorithm 2 requires a repeated solution of a QP problem at every time step. It is found that, except at the first step of every phase, the algorithm converges in up to 4 or 5 steps. The initial step requires the search for an initial feasible solution which may take 5 to 10 or more steps depending on the horizon length. We use the QP solver qpOASES [36] in MATLAB in a Windows machine with Intel i7 1.8 GHz processor and 24 GB RAM for the computations. It is found that the computations (QP solving and other preparatory computations) to be made after the measurement of the state at each step to obtain the optimal solution take, on the average, about 19ms when NN-1 is used and about 15ms when NN-2 is used for a horizon length of N = 10. In the absence of sway control, since we have a fewer number of optimization variables, the corresponding average computation times are slightly smaller – 15ms and 12ms respectively. Clearly, these computation times are small fractions of the respective sampling times and therefore they do not adversely affect the implementability of the control scheme.


5. Conclusion

The problem of 3D trajectory tracking of AUVs under 4 or 3 degrees of maneuverability was addressed with an effective and efficient nonlinear MPC scheme that uses a suitable modeling of the DT dynamics of the system using a ff-NN. An accurate NN-based DT dynamics model simplifies the online state propagation and cost gradient computations when solving the nonlinear MPC optimization problem with a sequence of QPs. Realistic numeri-cal simulations have shown the effectiveness of the approach in various situations including the presence of random and non-random disturbances and/or the lack of maneuverability along the sway direction.


Acknowledgments

This paper was supported by Education and Research promotion program of KOREATECH.

Author Contributions

All relevant contributions are by the Corresponding author.


References
1. T. Fossen, K. Y. Pettersen, and H. Nijmeijer, Sensing and Control for Autonomous Vehicles: Applications to Land, Water and Air Vehicles, Lecture Notes in Control and In-formation Sciences, vol. 474, 2017.
2. H. Singh, C. Roman, O. Pizarro, R. Eustice, and A. Can, “Towards high-resolution imaging from underwater vehi-cles,” The International Journal of Robotics Research, vol. 26, no. 1, pp. 55-74, 2007.
3. D. Sward, J. Monk, and N. Barrett, “A systematic review of remotely operated vehicle surveys for visually assessing fish assemblages,” Frontiers in Marine Science, vol. 6, 2019.
4. L. Wang, D. Zhu, W. Pang, and Y. Zhang, “A survey of underwater search for multi-target using multi-AUV: Task allocation, path planning, and formation control,” Ocean Engineering, vol. 278, 114393, 2023.
5. R. B. Wynn, et al., “Autonomous Underwater Vehicles (AUVs): Their past, present and future contributions to the advancement of marine geoscience,” Marine Geology, vol. 352, pp. 451-468, 2014.
6. A. Wibisono, M. J. Piran, H. -K. Song, and B. M. Lee, “A survey on unmanned underwater vehicles: Challenges, ena-bling technologies, and future research directions,” Sensors, vol. 23, no. 17, p. 7321, 2023.
7. A. Bashir, S. Khan, N. Iqbal, S. Bashmal, S. Ullah, Fayyaz, and M. Usman, “A review of the various control algorithms for trajectory control of unmanned underwater vehi-cles,” Sustainability, vol. 15, no. 20, p. 14691, 2023.
8. J. Yuh, “Design and control of autonomous underwater robots: A survey,” Autonomous Robots, vol. 8, pp. 7-24, 2000.
9. K. Y. Pettersen and O. Egeland, “Time-varying exponential stabilization of the position and attitude of an underactuated autonomous underwater vehicle,” IEEE Transactions on Automatic Control, vol. 44, no. 1, pp. 112-115, 1999.
10. C. Silvestre and A. Pascoal, “Control of the INFANTE AUV using gain scheduled static output feedback,” Control Engineering Practice, vol. 12, no. 12, pp. 1501-1509, 2004.
11. C. Paliotta, E. Lefeber, K. Y. Pettersen, J. Pinto, M. Costa and J. T. de F. B. de Sousa, “Trajectory tracking and path following for underactuated marine vehicles,” IEEE Trans-actions on Control Systems Technology, vol. 27, no. 4, pp. 1423-1437, 2019.
12. M. Mat-Noh, R. Mohd-Mokhtar, M. R. Arshad, Z. M. Zain, and Q. Khan, “Review of sliding mode control application in autonomous underwater vehicles,” Indian Journal of Geo Marine Sciences, vol. 48, no. 7, pp. 973-984, 2019.
13. J. Nie, J. Yuh, E. Kardash, and T. I. Fossen, “On-board sensor-based adaptive control of small UUVs in very shal-low water,” International Journal of Adaptive Control and Signal Processing, vol. 14, no. 4, pp. 441-452, 2000.
14. J. Guerrero, J. Torres, V. Creuze, and A. Chemori, “Trajec-tory tracking for autonomous underwater vehicle: An adap-tive approach,” Ocean Engineering, vol. 172, pp. 511-522, 2019.
15. Z. Yan, M. Wang, and J. Xu, “Robust adaptive sliding mode control of underactuated autonomous underwater ve-hicles with uncertain dynamics,” Ocean Engineering, vol. 173, pp. 802-809, 2019.
16. L. Qiao and W. Zhang, “Trajectory tracking control of AUVs via adaptive fast nonsingular integral terminal sliding mode control,” IEEE Transactions on Industrial Informatics, vol. 16, no. 2, pp. 1248-1258, 2020.
17. B. Sun, D. Zhu, and S. Yang, “An optimized fuzzy control algorithm for three-dimensional AUV path planning,” Inter-national Journal of Fuzzy Systems, vol. 20, no. 5, pp. 1-14, 2017.
18. B. S. Park, “Neural network-based tracking control of un-deractuated autonomous underwater vehicles with model uncertainties,” Journal of Dynamic Systems, Measurement, and Control, vol. 137, no. 2, p. 021004, 2015.
19. J. Li, J. Du, and C. L. P. Chen, “Command-filtered robust adaptive NN control with the prescribed performance for the 3-D trajectory tracking of underactuated AUVs,” IEEE Transactions on Neural Networks and Learning Systems, vol. 33, no. 11, pp. 6545-6557, 2022.
20. J. M. Maciejowski, Predictive Control with Constraints, Prentice Hall, Harlow, England, 2002.
21. J. Köhler, M. A. Müller, and F. Allgöwer, “Nonlinear refer-ence tracking: An economic model predictive control per-spective,” IEEE Transactions on Automatic Control, vol. 64, no. 1, pp. 254-269, 2019.
22. A. Jayasiri, A. Nandan, S. Imtiaz, D. Spencer, S. Islam, and S. Ahmed, “Dynamic positioning of vessels using a UKF-based observer and an NMPC-based controller,” IEEE Transactions on Automation Science and Engineering, vol. 14, no. 4, pp. 1778-1785, 2017.
23. W. Gan, D. Zhu, and D. Ji, “QPSO-model predictive con-trol-based approach to dynamic trajectory tracking control for unmanned underwater vehicles,” Ocean Engineering, vol. 158, pp. 208-220, 2018.
24. C. Shen, Y. Shi, and B. Buckham, “Trajectory tracking control of an autonomous underwater vehicle using Lya-punov-based model predictive control,” IEEE Transactions on Industrial Electronics, vol. 65, no. 7, pp. 5796-5805, 2018.
25. C. Liu, Q. Hu, X. Wang, and J. Yin, “Event-triggered-based nonlinear model predictive control for trajectory tracking of underactuated ship with multi-obstacle avoidance,” Ocean Engineering, vol. 253, 111278, 2022.
26. W. Zhang, Q. Wang, W. Wu, X. Du, Y. Zhang, and P. Han, “Event-trigger NMPC for 3-D trajectory tracking of UUV with external disturbances,” Ocean Engineering, vol. 283, 115050, 2023.
27. S. Heshmati-Alamdari, A. Nikou, and D. V. Dimarogonas, “Robust trajectory tracking control for underactuated auton-omous underwater vehicles in uncertain environments,” IEEE Transactions on Automation Science and Engineering, vol. 18, no. 3, pp. 1288-1301, 2021.
28. C. Shen, B. Buckham, and Y. Shi, “Modified C/GMRES algorithm for fast nonlinear model predictive tracking con-trol of AUVs,” IEEE Transactions on Control Systems Technology, vol. 25, no. 5, pp. 1896-1904, 2017.
29. A. Gautam and Y. C. Soh, “Stabilizing model predictive control using parameter-dependent dynamic policy for non-linear systems modeled with neural networks,” Journal of Process Control, vol. 36, pp. 11-21, 2015.
30. T. I. Fossen, Guidance and Control of Ocean Vehicles, John Willey & Sons, 1994.
31. P. A. Miller, J. A. Farrell, Y. Zhao, and V. Djapic, “Auton-omous underwater vehicle navigation,” IEEE Journal of Oceanic Engineering, vol. 35, no. 3, pp. 663-678, 2010.
32. Y. -S. Han, M. -J. Kim, H. -I. Seo, and D. -H. Seo, “Direct orientation estimation through inertial odometry based on a deep transformer model,” Journal of Advanced Marine En-gineering and Technology, vol. 48, no. 2, pp. 96-106, 2024.
33. D. Q. Mayne, E. C. Kerrigan, E. V. Wyk, and P. Falugi, “Tube-based robust nonlinear model predictive control,” In-ternational Journal of Robust and Nonlinear Control, vol. 21, no. 11, pp. 1341-1353, 2011.
34. A. Gautam, Y. -C. Chu, and Y. C. Soh, “Optimized dynam-ic policy for receding horizon control of linear time-varying systems with bounded disturbances,” IEEE Transactions on Automatic Control, vol. 57, no. 4, pp. 973-988, 2012.
35. S. J. Wright and M. J. Tenny, “A feasible trust-region se-quential quadratic programming algorithm,” SIAM Journal of Optimization, vol. 14, no. 4, pp. 1074-1105, 2004.
36. H. J. Ferreau, C. Kirches, A. Potschka, H. G. Bock, and M. Diehl, “A parametric active-set algorithm for quadratic pro-gramming,” Mathematical Programming Computation, vol. 6, no. 4, pp. 327-363, 2014.