*2.3. Dynamics*

With the assumptions that the center of mass of the rigid body is coincident with the origin of {B} and {I} is an inertial frame, Newton–Euler's laws apply in the latter frame and the dynamic equations for translation can be written as

$$\sum \,^{\mathcal{T}} F\_{RB} = m \frac{d}{dt} \left( ^{\mathcal{T}} \nu\_1 \right) = m \frac{d}{dt} (R \nu\_1) \tag{9}$$

$$
\dot{\nu}\_1 = m \frac{d\mathcal{R}}{dt} \nu\_1 + m \mathcal{R} \frac{d}{dt} \nu\_1 \tag{10}
$$

$$=mRS(\nu\_2)\nu\_1 + mR\frac{d}{dt}\nu\_1\tag{11}$$

where *m* is the mass matrix and ∑<sup>I</sup> *FRB* is the sum of external forces expressed in the inertial reference frame. The dynamic equations for an AUV are usually expressed in the body-fixed frame for convenience, where the inertia tensor is constant and the external forces are more easily expressed. The sum of external forces expressed in {B} is given by

$$\sum R^{-1T} F\_{RB} = mR^{-1}RS(\nu\_2)\nu\_1 + mR^{-1}R\frac{d}{dt}\nu\_1 \tag{12}$$

$$\sum F\_{RB} = m[\nu\_2 \times \nu\_1 + \dot{\nu}\_1].\tag{13}$$

where *FRB* are the external forces measured in {B}. Similarly, applying Newton–Euler's laws in {B}, the dynamic equations for rotational motion can be written as

$$\sum \,^T N\_{RB} = \frac{d}{dt} \left( ^T L \right) = \frac{d}{dt} (RI\_{RB} \nu\_2) \tag{14}$$

$$
\dot{\omega} = RS(\nu\_2)I\_{RB}\nu\_2 + RI\_{RB}\frac{d}{dt}\nu\_{2\prime} \tag{15}
$$

where *IRB* is the moment of inertia matrix and I *L* is the angular momentum measured in {I}. Now, expressing the above dynamic equations in body-fixed reference frame {B} yields

$$\sum \mathcal{R}^{-1T} N\_{RB} = \mathcal{R}^{-1} R S(\nu\_2) I\_{RB} \nu\_2 + \mathcal{R}^{-1} R I\_{RB} \frac{d}{dt} \nu\_2 \tag{16}$$

$$
\sum \dot{N}\_{RB} = I\_{RB}\dot{\nu}\_2 + \nu\_2 \times I\_{RB}\nu\_2.\tag{17}
$$

where *NRB* includes the external torques measured in {B}.

Combining the equations for translation and rotational motion, a simplified vectorial representation can be written as

$$M\_{RB}\dot{\nu} + \mathbb{C}\_{RB}(\nu)\nu = \tau\_{RB\prime} \tag{18}$$

where *MRB* is the rigid-body inertia matrix, which in the general case, is given by

$$\begin{aligned}{}^{B}M\_{RB} &= \begin{bmatrix} mI\_{3 \times 3} & -mS\left(r\_{\mathcal{S}}^{b}\right) \\ mS\left(r\_{\mathcal{S}}^{b}\right) & I\_{0} \end{bmatrix} \\ &= \begin{bmatrix} m & 0 & 0 & 0 & mz\_{\mathcal{S}} & -my\_{\mathcal{S}} \\ 0 & m & 0 & -mz\_{\mathcal{S}} & 0 & -mx\_{\mathcal{S}} \\ 0 & 0 & m & my\_{\mathcal{S}} & -mx\_{\mathcal{S}} & 0 \\ 0 & -mz\_{\mathcal{S}} & my\_{\mathcal{S}} & I\_{x} & -I\_{xy} & -I\_{xz} \\ mz\_{\mathcal{S}} & 0 & -mx\_{\mathcal{S}} & -I\_{xy} & I\_{y} & -I\_{yz} \\ -my\_{\mathcal{S}} & mx\_{\mathcal{S}} & 0 & -I\_{zx} & -I\_{zy} & I\_{z} \end{bmatrix}, \end{aligned} \tag{20}$$

and satisfies the properties


where *<sup>I</sup>*3×<sup>3</sup> is the identity matrix, *Io* <sup>=</sup> *<sup>I</sup><sup>T</sup> <sup>o</sup>* > 0 is the inertia matrix about O, and *S rb g* in (19) is the matrix cross-product operator.

The rigid body Coriolis and centripetal matrix *CRB*(*ν*) can always be represented in symmetric form, i.e., *CRB*(*ν*) = *C<sup>T</sup> RB*(*ν*) <sup>∀</sup>*<sup>ν</sup>* <sup>∈</sup> IR6. For the given inertia matrix,

$$M\_{RB} = M\_{RB}^T = \begin{bmatrix} M\_{11} & M\_{12} \\ M\_{21} & M\_{22} \end{bmatrix} > 0,\tag{21}$$

where *M*<sup>21</sup> = *M<sup>T</sup>* <sup>12</sup>, *CRB*(*ν*) can be written as

$$\mathbb{C}\_{\text{RB}}(\nu) = \begin{bmatrix} 0\_{3 \times 3} & -mS(\nu\_1) - mS\left(S(\nu\_2)r\_{\mathcal{S}}^b\right) \\ -mS(\nu\_1) - mS\left(S(\nu\_2)r\_{\mathcal{S}}^b\right) & mS\left(S(\nu\_1)r\_{\mathcal{S}}^b\right) - S\left(I\_o\nu\_2\right) \end{bmatrix} \tag{22}$$

with *S*(*ν*1)*ν*<sup>1</sup> = 0. All external forces and torques are represented as a generalized vector *τRB* = ∑ *F<sup>T</sup> RB* <sup>∑</sup> *<sup>N</sup>TRB<sup>T</sup>* <sup>=</sup> [*XYZKMN*] *<sup>T</sup>* where [*XYZ*] *<sup>T</sup>* are the external forces and [*KMN*] *<sup>T</sup>* are the external torques both expressed in body {B}. To explicitly take into account different types of external forces and torques, this vector can be decomposed as

$$
\tau\_{RB} = \tau + \tau\_A + \tau\_D + \tau\_R + \tau\_{dist\prime} \tag{23}
$$

where


Neglecting the term *τdist*, the final dynamic model of an AUV can be written as

$$[M\_{RB} + M\_A]\dot{\nu} + [\mathbb{C}\_{RB}(\nu) + \mathbb{C}\_A(\nu)]\nu + D(\nu)\nu + \mathbb{g}(\eta) = \tau \tag{24}$$

$$
\Leftrightarrow M\dot{\nu} + \mathbb{C}(\nu)\nu + D(\nu)\nu + \mathbb{g}(\eta) = \tau. \tag{25}
$$

#### **3. Examples of Horizontal Plane Dynamics**

#### *3.1. 3-DOF Nonlinear Model*

In what follows, we consider the horizontal plane dynamics of an underwater vehicle with 3 degrees of freedom (surge, sway, and yaw rate). Assuming that the roll of the vehicle is negligible and vertical and the horizontal plane dynamics are decoupled, and the {B} frame coincides with the principal axes of inertia of the body, the corresponding nonlinear equations of motion can be written as

$$m\_{\rm u}\dot{u} - m\_{\rm v}\upsilon r + d\_{\rm u}u = \tau\_{\rm u} \tag{26}$$

$$
\dot{m}\_{\text{\textquotedblleft}} \dot{\upsilon} + m\_{\text{\textquotedblleft}}ur + d\_{\text{\textquotedblright}} \upsilon = 0 \tag{27}
$$

$$m\_r \dot{r} - m\_{uv} \mu v + d\_r r = \tau\_r \tag{28}$$

with

$$m\_{\rm u} = m - X\_{\rm ii} \qquad \qquad m\_{\rm r} = I\_z - N\_{\rm r} \qquad \qquad \qquad d\_{\rm u} = -X\_{\rm u} - X\_{|u|u}|u| \tag{29}$$

$$m\_{\mathbb{D}} = m - \mathbf{Y}\_{\mathbb{D}} \qquad \qquad \qquad m\_{\mathbb{W}} = m\_{\mathbb{W}} - m\_{\mathbb{U}} \qquad \qquad \qquad d\_{\mathbb{U}} = -\mathbf{Y}\_{\mathbb{U}} - \mathbf{Y}\_{|\mathbb{U}| \mathbb{U}} |\boldsymbol{v}| \tag{30}$$

$$d\_r = -N\_r - N\_{|r|v}|r| \,\text{}\tag{31}$$

where *m* is the mass, *Izz* is the moment of inertia about the vertical axis, *Xu*˙ , *Yv*˙ , and *Nr*˙ are added mass coefficients, *Xu*, *Yv*, and *Nr* are linear damping coefficients, and *<sup>X</sup>*|*u*|*u*, *<sup>Y</sup>*|*v*|*v*, and *N*|*r*|*<sup>r</sup>* are the nonlinear damping coefficients of the AUV model. The compact form of these equations describing the motion of a marine vehicle which is three-plane symmetric can be written as [36]

$$M\dot{\nu} + \mathbb{C}(\nu)\nu + D(\nu)\nu = \text{tr},\tag{32}$$

where

$$\boldsymbol{\nu} = \begin{bmatrix} \boldsymbol{u} & \boldsymbol{v} & \boldsymbol{r} \end{bmatrix}^{\mathrm{T}}, \tag{33}$$

$$\boldsymbol{\pi} = \begin{bmatrix} \boldsymbol{\pi}\_{\boldsymbol{u}} & \mathbf{0} & \boldsymbol{\pi}\_{\boldsymbol{r}} \end{bmatrix}^{\mathrm{T}}, \tag{33}$$

$$M = \begin{pmatrix} m\_{\mathcal{U}} & 0 & 0 \\ 0 & m\_{\mathcal{U}} & 0 \\ 0 & 0 & m\_{r} \end{pmatrix} > 0,\tag{34}$$

$$\mathbf{C}(\boldsymbol{\nu}) = \begin{pmatrix} 0 & 0 & -m\_{\boldsymbol{\nu}}\boldsymbol{\upsilon} \\ 0 & 0 & m\_{\boldsymbol{u}}\boldsymbol{u} \\ m\_{\boldsymbol{\nu}}\boldsymbol{\upsilon} & -m\_{\boldsymbol{u}}\boldsymbol{u} & 0 \end{pmatrix},\tag{35}$$

$$D(\nu) = \begin{pmatrix} d\_{\nu} & 0 & 0 \\ 0 & d\_{v} & 0 \\ 0 & 0 & d\_{r} \end{pmatrix} > 0,\tag{36}$$

We shall now discuss the modeling of an underwater vehicle referring to two examples of actual vehicles: (1) the MEDUSA vehicle in which yaw and heave motions are controlled only by thrusters (see Figure 3), (2) Maya, a torpedo-shaped AUV where the yaw and pitch motions are controlled using conventional rudders and fins while the vehicle cruises propelled by a single thruster aligned with the *x*-axis of the body (see Figure 4). In this model, the surge equations are not considered, and the vehicle is assumed to be cruising at a constant speed *uo* [31].

**Figure 3.** Medusa Autonomous Marine Vehicles, developed at DSOR, IST, Lisbon.

**Figure 4.** The MAYA Autonomous underwater vehicle developed at NIO, Goa.

*3.2. MEDUSA-Class Vehicle as an Example*

The MEDUSA-class vehicles are autonomous robotic marine vehicles, capable of working both as surface and underwater robots, developed at the Dynamical Systems and Ocean Robotics group (DSOR) of Instituto de Sistemas e Robótica, Instituto Superior Técnico (ISR-IST) [37]. The MEDUSA-class AUV is a twin hull vehicle separated by 150 mm (see Figure 3). It weighs around 17 kg, is 1 m long, and with a hull diameter of 150 mm. The two hulls contain the batteries, onboard electronics, sensors, and the main computer running the Robot Operating System (ROS) .

The surface operating vehicles have two thrusters placed on each side of the vehicle at 150 mm from the center line. The forward force *τ<sup>u</sup>* = *Fs* + *Fp* is generated as a sum of two forces generated by starboard (*Fs* ) and portside (*Fp*) thrusters and a yaw moment *τ<sup>r</sup>* = 0.15 *Fs* − *Fp* . The restoring moments for the vehicle is large enough for the roll and pitch motions to be neglected due to large separation between center of gravity and center of buoyancy. The vehicles are not actuated in the sway axis (i.e., *τ<sup>v</sup>* = 0) [38]. The hydrodynamic parameters for Medusa are derived using the combination of semi-empirical and analytical methods and experimental data in calm waters. The parameters are tabulated in Table A1.

#### *3.3. Maya AUV: An Example*

The Maya AUV is an axis-symmetric underwater vehicle developed at the National Institute of Oceanography (NIO), Goa, India. The Maya AUV [39] follows a low-drag hull with a removable nose cone which carries scientific sensors (see Figures 2 and 4). It has a single propeller for propulsion and two pairs of stern planes to control depth and heading. The nose section can accommodate different sensors for specific missions at sea. The AUV is equipped with an attitude and heading reference system (AHRS), a Doppler velocity log (DVL) for navigation underwater, and GPS for surface navigation.

Based on the assumption that the complete six-degrees-of-freedom model for the AUV can be split into two non-interacting models for the vertical and horizontal planes (see [40]), the simplified sway and yaw dynamics at constant speed *u*<sup>0</sup> are given by [36],

$$m\dot{v} + mu\_0 r = \text{Y} \tag{37}$$

$$I\_z \dot{\tau} = \mathcal{N}.\tag{38}$$

For small roll and pitch angles,

$$
\dot{\psi} = \frac{\sin \theta}{\cos \theta} q + \frac{\cos \phi}{\cos \theta} r \approx r. \tag{39}
$$

The linear modeling of hydrodynamic damping, added mass, and rudder angle gives

$$\mathcal{Y} = \mathcal{Y}\_{\mathcal{U}}\dot{\boldsymbol{v}} + \mathcal{Y}\_{\mathcal{R}}\dot{\boldsymbol{r}} + \mathcal{Y}\_{\mathcal{U}}\boldsymbol{v} + \mathcal{Y}\_{\mathcal{I}}\boldsymbol{r} + \mathcal{Y}\_{\dot{\boldsymbol{\phi}}}\boldsymbol{\delta}\_{\mathcal{I}}\tag{40}$$

$$N = N\_{\mathcal{V}} \dot{\boldsymbol{\upsilon}} + N\_{\mathcal{R}} \dot{\boldsymbol{r}} + N\_{\mathcal{V}} \boldsymbol{\upsilon} + N\_{\mathcal{I}} \boldsymbol{r} + N\_{\delta} \delta\_{\boldsymbol{\delta}}.\tag{41}$$

The quadratic terms on damping are neglected because of limited magnitude of *v* and *r*. The model is linearized about the nominal cruising speed of *u*<sup>0</sup> = 1.2 m/s and the linearized dynamic equations of motion for the horizontal plane represented in matrix form is given by

$$
\begin{bmatrix} m - \varUpsilon\_{\dot{v}} & -\varUpsilon\_{\dot{r}} & 0 \\ -N\_{\vartheta} & I\_{z} - N\_{\dot{r}} & 0 \\ 0 & -1 & 1 \end{bmatrix} \begin{bmatrix} \dot{v} \\ \dot{r} \\ \dot{\Psi} \end{bmatrix} + \begin{bmatrix} -\varUpsilon\_{v} & -\varUpsilon\_{r} + mu\_{0} & 0 \\ -N\_{\dot{v}} & -N\_{\dot{r}} & 0 \\ 0 & -1 & 0 \end{bmatrix} \begin{bmatrix} v \\ r \\ \Psi \end{bmatrix} = \begin{bmatrix} \varUpsilon\_{\delta} \\ N\_{\delta} \\ 0 \end{bmatrix} \delta\_{\boldsymbol{r}}. \tag{42}
$$

The vehicle parameters were estimated by resorting to analytic and semi-empirical methods for hydrodynamic parameter estimation (see [33]), and the details of the parameters for the MAYA AUV are given in Table A2.

#### **4. Heading Control for a 3-DOF Nonlinear Model**

In preparation for the analysis of combined guidance and control systems for a marine vehicle in 2D, we start by obtaining a compact description of the dynamics of a closed-loop yaw control system. This will serve as an important step to tackle the problem of path following. Most surface and underwater vehicles use simple Proportional-Derivative (PD) yaw controllers, oftentimes designed using a 3-DOF model linearized about a trimming condition with a view to steering the vehicle along a straight line at a fixed forward speed. However, there is no formal proof of stability for the convergence of the error (between desired and true heading) to zero when the controller is applied to a nonlinear model. This section provides proof of convergence for a PD controller coupled with the 3-DOF nonlinear dynamics of a Medusa Class marine vehicle, using concepts from the Lyapunov theory. We will be later using a simple characterization of the combination of the AUV dynamics with a heading controller, in the form input-output gains or bandwidth-like characterization and this is a key contribution of this article. The motion of an AUV in the horizontal plane expressed in the body-fixed frame is given in (27), and is repeated here for the reader's convenience:

$$M\dot{\nu} + \mathbb{C}(\nu)\nu + D(\nu)\nu = \text{tr},\tag{43}$$

where *ν* = [*uvr*] *<sup>T</sup>* is the state vector; *τ* = [*τ<sup>u</sup>* 0 *τr*] *<sup>T</sup>* is the control vector and

$$M = \begin{bmatrix} m\_{\mathcal{U}} & 0 & 0 \\ 0 & m\_{\mathcal{U}} & 0 \\ 0 & 0 & m\_{r} \end{bmatrix} > 0,$$

$$\mathcal{C}(\boldsymbol{\nu}) = \begin{bmatrix} 0 & 0 & -m\_{\mathcal{U}}\boldsymbol{\nu} \\ 0 & 0 & m\_{\mathcal{U}}\boldsymbol{\mu} \\ m\_{\mathcal{U}}\boldsymbol{\nu} & -m\_{\mathcal{U}}\boldsymbol{\mu} & 0 \end{bmatrix},$$

$$D(\boldsymbol{\nu}) = \begin{bmatrix} d\_{\boldsymbol{u}} & 0 & 0 \\ 0 & d\_{\boldsymbol{\nu}} & 0 \\ 0 & 0 & d\_{r} \end{bmatrix} > 0,$$

$$\begin{aligned} & \boldsymbol{m} - \boldsymbol{Y}\_{\boldsymbol{\nu}}; m\_{\mathcal{V}} = \boldsymbol{I}\_{\boldsymbol{\Sigma}} - \boldsymbol{N}\_{\boldsymbol{r}}, \\ & \boldsymbol{d} - \boldsymbol{d} + \boldsymbol{d}\_{r} \cdot |\boldsymbol{u}| \end{aligned}$$

*mu* = *m* − *Xu*˙ ; *mv* = *m* − *Yv*˙ ; *mr* = *Izz* − *Nr*˙, *du* = −*Xu* − *<sup>X</sup>*|*u*|*u*|*u*| = *du*<sup>1</sup> + *du*2|*u*|, *dv* = −*Yv* − *<sup>Y</sup>*|*v*|*v*|*v*| = *dv*<sup>1</sup> + *dv*2|*v*|, *dr* = −*Nr* − *<sup>N</sup>*|*r*|*r*|*r*| = *dr*<sup>1</sup> + *dr*2|*r*|.

Considering practical issues, the following assumptions are made:


Thus, taking into account assumptions (a) to (c), the mathematical model of the system that describes, for a fixed *U*, the evolution of the closed-loop system under PD control, is given by

$$
\begin{split}
\begin{bmatrix}
\dot{\psi} \\
\dot{r} \\
\dot{\psi}
\end{bmatrix} &= \underbrace{\begin{bmatrix}
\end{bmatrix}}\_{A} \underbrace{\begin{bmatrix}
v \\
r \\
\dot{\psi}
\end{bmatrix}}\_{x} + \\
&\underbrace{\begin{bmatrix}
0 & -\frac{d\_{r2}|r|}{m\_{r}} & 0 \\
0 & 0 & 0
\end{bmatrix}}\_{G(x)} \begin{bmatrix}
v \\
r \\
\dot{\psi}
\end{bmatrix} + \underbrace{\begin{bmatrix}
0 \\
\frac{K\_{d}}{m\_{r}} \\
\end{bmatrix}}\_{B} \dot{\psi}\_{d}
\end{split}
\tag{44}
$$

Equation (44) can be rewritten as:

$$
\dot{\mathbf{x}} = A\mathbf{x} + G(\mathbf{x})\mathbf{x} + Bu, \; \mu \in \mathbb{R} \tag{45}
$$

for *<sup>x</sup>* <sup>∈</sup> *Dx* <sup>=</sup> {*v*,*r*, *<sup>ψ</sup>*˜ <sup>⊂</sup> IR3 : <sup>|</sup>*v*| ≤ *vmax* <sup>|</sup>*r*| ≤ *rmax*, <sup>|</sup>*ψ*˜| ≤ *<sup>ψ</sup>*˜*max*} and *<sup>u</sup>* <sup>∈</sup> *Du* <sup>=</sup> {*<sup>u</sup>* <sup>⊂</sup> IR : |*u*| ≤ *umax*}. Notice that Equation (45) contains linear and nonlinear terms.

#### **5. Analysis of the Stability of the Origin**

The stability analysis of the origin of the mathematical model of the system (45) is performed considering the influence of the vehicle speed *U* on the eigenvalues of matrix *A*, once the values for *K* and *Kd* have been defined. To analyze the stability of the origin, we use the properties of *input-to-state* (ISS) and *input-output stability* (IOS) of the control system. Furthermore, this analysis is important because ISS and IOS properties of the system are based on a Lyapunov equation that involves the matrix *A*. In what follows, we provide definitions of *ISS* and *IOS* and essential theorems from [29] that will be used to perform the stability analysis of the systems considered in this paper.

#### *5.1. Input-to-State Stability (ISS)*

Consider the system

$$
\dot{\mathbf{x}} = f(\mathbf{x}, t, u) \quad \mathbf{x}(t\_0) = \mathbf{x}\_0 \tag{46}
$$

where *<sup>x</sup>*(*t*) <sup>∈</sup> IR*<sup>n</sup>* and *<sup>u</sup>*(*t*) <sup>∈</sup> IR*<sup>m</sup>* denotes states and the input at time *<sup>t</sup>* <sup>≥</sup> 0. The function *<sup>f</sup>* : [0, <sup>∞</sup>] <sup>×</sup> IR*<sup>n</sup>* <sup>×</sup> IR*<sup>m</sup>* <sup>→</sup> IR*<sup>n</sup>* is piecewise continuous in *<sup>t</sup>* and locally Lipschitz in *<sup>x</sup>* and *<sup>u</sup>*. The input *u*(*t*) is a piecewise continuous, bounded function of *t* for all *t* ≥ 0.

**Definition 1.** *The system* (46) *is said to be* input-to-state stable *(ISS) if there exists a class* KL*-function β and α class* K*-function, such that for any initial slate x*(*t*0) *and any bounded input u*(*t*)*, the solution x*(*t*) *exists for all t* ≥ *t*<sup>0</sup> *and satisfies*

$$\|\mathbf{x}(t)\| \le \beta(\|\mathbf{x}\_0\|, t - t\_0) + \gamma \left(\sup\_{t\_0 \le \tau \le t} \|\mathbf{u}(\tau)\|\right) \tag{47}$$

*The function γ* ∈ K *describes the influence of the input on the solution of the system. The function β* ∈ KL *describes the transient behavior of the system [29,41].*

The Lyapunov-based technique for the ISS verification gives a sufficient condition for input-to-state stability.

**Theorem 1.** *Let V* : [0, <sup>∞</sup>) <sup>×</sup> *IR<sup>n</sup>* <sup>→</sup> *IR be a continuously differentiable function such that*

$$
\mathfrak{a}\_1(\|\!|x\|\!|) \le V(t, x) \le \mathfrak{a}\_2(\|\!|x\|\!|) \tag{48}
$$

$$\frac{\partial \upsilon}{\partial t} + \frac{\partial \upsilon}{\partial x} f(\mathbf{x}, t, \mu) \le -\mathcal{W}\_3(\mathbf{x}), \ \forall \ ||\mathbf{x}|| \ge \rho(||\mathbf{u}||) > 0 \tag{49}$$

<sup>∀</sup>(*t*, *<sup>x</sup>*, *<sup>u</sup>*)[0, <sup>∞</sup>) <sup>×</sup> *IR<sup>m</sup>* <sup>×</sup> *IRn, where <sup>α</sup>*1, *<sup>α</sup>*<sup>2</sup> *are class* <sup>K</sup>∞*-functions, <sup>ρ</sup> is class* <sup>K</sup>*-function and W*3(*x*) *is continuous definite function on IRn. Then, the system* (46) *is input-to-state stable with γ* = *α*−<sup>1</sup> <sup>1</sup> *o α*<sup>2</sup> *o ρ.*
