1 Introduction

Autonomous underwater vehicles (AUVs) are robotic devices which travel underwater to perform a set of predefined tasks such as accurate navigation, control and guidance tasks without operator intervention. The application of AUVs ranges from commercial purposes like the mapping of ocean floors by oil companies and post-lay pipeline survey to research and military operations like surveillance, anti-submarine warfare, and mine detection [1].

It is well known that underwater vehicles are very difficult to control due to the highly non-linear dynamics, time-varying dynamic behavior and uncertainties in hydrodynamic coefficients due to the unstructured ocean environment. The environmental disturbances like wind generated waves and ocean currents make the motion control of AUV a more challenging [1]. In addition, there are 6-DOF of the motion of an AUV and nonlinear coupling among them, making control design even more complicated. Though the dynamics of an AUV is highly coupled and non-linear in nature, decoupled control system strategy is widely used for practical applications [2, 3]. The 6-DOF non-linear equations of motion of an AUV can be decomposed into three non-interacting (or lightly interacting) subsystems for speed control, steering control and diving as suggested in [4]. A number of control strategies, developed over a period of time to control the dynamics of an AUV can be found in the literature. Due to the inherent non-linearities in the dynamic model of the underwater vehicle, conventional linear controllers such as PD/PID might not ensure satisfactory control performance. This problem can be handled very well by non-linear controllers such as sliding mode control [2, 58], adaptive control [911], fuzzy logic control [12, 13] and neural network control [1417]. However, these methods involve complex designing of a controller.

It is very difficult to find an exact mathematical model of an AUV due to dynamics that are highly non-linear, time-varying and coupled. Another problem in AUV is to measure or estimate the hydrodynamic coefficients accurately which is again difficult due to variations in the environmental conditions. Due to these problems, designing a control technique for an AUV becomes very challenging. There are numerous techniques for estimating parametric uncertainties and external disturbances. Most popular estimation techniques are time delay control (TDC) [18], disturbance observer (DO) [19, 20] and uncertainty and disturbance estimator (UDE) [21]. Among them, UDE is found to be very promising estimation technique because of its simplicity in design as well as ease of implementation. The combination of UDE - sliding mode control is widely accepted in literature [2226], since it does not require the upper bound of uncertainty which is the limitations of SMC. The other advantage of this combination is, it gives chatter free control performance because of the absence of switching term in the control law.

In this paper, a UDE based sliding mode control (UDE-SMC) is proposed for control of steering and diving planes of an AUV under the effect of variations in the hydrodynamic coefficients and external disturbances. The control law includes equivalent control and estimated lumped uncertainty term, i.e. uncertainties in the hydrodynamic parameters and external disturbances. The equivalent control is derived using sliding surface which gives desired dynamics when state trajectories are driven and attracted towards the sliding surface and slide on it. The another term in control law, i.e. UDE is derived by estimating the lumped uncertainty using a low pass filter with proper bandwidth.

The paper is organized in the following sequence. Section 2 describes a mathematical modeling of an AUV. Linerized AUV model is given in Sect. 3. Section 4, presents the UDE-SMC controller design. Stability analysis is done in Sect. 5. Application of UDE-SMC to control of an AUV is presented in Sect. 6, followed by the simulation results in Sect. 7. Finally the paper is concluded in Sect. 8.

Fig. 1
figure 1

AUV in body-fixed frame and earth-fixed reference frame

Fig. 2
figure 2

Schematic drawing of the NPS AUV II [2]

2 AUV modeling

The notations used in this paper is in accordance with SNAME (1950) [27]. The 6-DOF non-linear equations of motion can be described with two co-ordinate frames. The moving co-ordinate frame \(X_{0}Y_{0}Z_{0}\) is fixed to the vehicle and is known as the body-fixed reference frame. For a low-speed marine vehicle, the acceleration of a point on earth is neglected since the motion of earth hardly affects the vehicle. This helps to consider the earth-fixed reference XY Z frame as an inertial frame. The motion of the body-fixed frame is described relative to an earth-fixed reference XY Z frame as shown in Fig. 1. An AUV 6-DOF non-linear equations of motion in the body-fixed frame is given in a compact form as follows [28],

$$\begin{aligned} M(\nu )\dot{\nu } + C(\nu )\nu + D(\nu )\nu + g (\eta ) + \tau _d = \tau \end{aligned}$$
(1)

where \(M(\nu )\in \mathfrak {R}^{6\times 6}\) is the inertia matrix including hydrodynamic added mass, \(C(\nu )\) \(\in \) \(\mathfrak {R}^{6\times 6}\) is a matrix of Coriolis and Centripetal forces, \(D(\nu )\) \(\in \) \(\mathfrak {R}^{6\times 6}\) is the hydrodynamic damping matrix, \(g(\nu )\) \(\in \) \(\mathfrak {R}^{6}\) is a vector of restoring forces and moments, \(\tau _d\) \(\in \) \(\mathfrak {R}^{6}\) is a vector of nonlinear disturbances like ocean waves, current etc. and \(\tau \) \(\in \) \(\mathfrak {R}^{6}\) is the control input vector describing forces and moments efforts, is given by

$$\begin{aligned} \tau = [\delta _{r}(t)\quad \delta _{s}(t) \quad n(t)]^{T} \end{aligned}$$
(2)

where \(\delta _{r}(t)\) is the rudder angle of AUV, \(\delta _{s}(t)\) is the fin angle of AUV and n(t) is the revolution of propellers as thrusters of AUV. \(\nu \) is the vector of linear and angular velocity of the vehicle in the body-fixed co-ordinate frame and has six velocity components \([u \quad v \quad w \quad p \quad q \quad r]^{T}\) (surge, sway, heave, roll, pitch, and yaw) that represents translation and rotational motion and is represented as

$$\begin{aligned} \nu = [u \quad v \quad w \quad p \quad q \quad r]^{T} \end{aligned}$$
(3)

and \(\eta \) is the vector of position and orientation given by Euler angles relative to an earth-fixed reference frame as follows

$$\begin{aligned} \eta = [x \quad y \quad z \quad \phi \quad \theta \quad \psi ]^{T} \end{aligned}$$
(4)

The mapping between the two co-ordinate systems is given by the Euler angle transformation given as

$$\begin{aligned} \dot{\eta } = J(\eta )\nu \end{aligned}$$
(5)

where \(J(\eta )\) is the Euler angle transformation matrix and defined as

$$\begin{aligned} J(\eta ) = \begin{bmatrix} J_{1}(\eta )&\quad 0 \\ 0&\quad J_{2}(\eta ) \end{bmatrix} \end{aligned}$$
(6)

where,

$$\begin{aligned}&J_{1}(\eta ) \nonumber \\&= \begin{bmatrix} c\psi c\theta&\quad -s\psi c\phi + c\psi s\theta s\phi&\quad s\psi s\phi + c\psi c\phi s\theta \\ s\psi c\theta&\quad c\psi c\phi + s\phi s\theta s\psi&\quad -c\psi s\phi + s\theta s\psi c\phi \\ -s\theta&\quad c\theta s\phi&\quad c\theta c\phi \end{bmatrix} \end{aligned}$$

and

$$\begin{aligned} J_{2}(\eta ) = \begin{bmatrix} 1&\quad s\phi t\theta&\quad c\phi t\theta \\ 0&\quad c\phi&\quad -s\psi \\ 0&\quad s\phi / c\theta&\quad c\phi / c\theta \end{bmatrix} \end{aligned}$$

where \(s\cdot = \sin (\cdot )\), \(c\cdot = \cos (\cdot )\) and \(t\cdot = \tan (\cdot )\).

3 Linerizing AUV model

While decoupling the AUV dynamics it is assumed that the vehicle is geometrically symmetric in \(x-z\) and \(x-y\) axes. In this study, the nonlinear model of NPS AUV II type underwater vehicle is considered (see Fig. 2) and its 6-DOF nonlinear dynamics is linearised to yaw and pitch planes for controller design purpose. The geometrical parameters of this vehicle are given in Appendix [28].

3.1 Linear model of the AUV dynamics in the horizontal plane

The steering system will be responsible for control of heading errors. The automatic steering or heading control can be done by means of a rudder or a pair of thrusters. The linearised model in horizontal plane or yaw steering plane can be obtained with following assumptions [28],

  • the origin of the vehicle coincides with the centre of gravity,

  • the forward vehicle velocity \(u_{0}\) is constant,

  • state vectors related to the diving plane are considered as null (\(w=p=q=\phi =\theta =0\))

The rigid-body vehicle dynamics in sway and yaw can be simplified to [29]

$$\begin{aligned}&m\dot{\nu } + mu_{0}r = Y \nonumber \\&I_{z}\dot{r} = N \end{aligned}$$
(7)

where \(u_{0}\) is the constant forward vehicle velocity. For small roll and pitch angles, we have

$$\begin{aligned} \dot{\psi }=\frac{sin \theta }{cos \theta } q + \frac{cos \phi }{cos \theta } r \approx r. \end{aligned}$$
(8)

Linear modeling of hydrodynamic added mass, damping, and the rudder yields

$$\begin{aligned} Y= & {} Y_{\dot{\nu }}\dot{\nu } + Y_{\dot{r}}\dot{r} + Y_{\nu }\nu + Y_{r}r + Y_{\delta } \delta _{r} \nonumber \\ N= & {} N_{\dot{\nu }}\dot{\nu } + N_{\dot{r}}\dot{r} + N_{\nu }\nu + N_{r}r + N_{\delta } \delta _{r} \end{aligned}$$
(9)

Equations (7), (8) and (9) can be expressed in a compact form as

$$\begin{aligned}&\begin{bmatrix} m-Y_{\dot{\nu }}&\quad -Y_{\dot{r}}&\quad 0\\ -N_{\dot{\nu }}&\quad I_{z} - N_{\dot{r}}&\quad 0 \\ 0&\quad 0&\quad 1 \end{bmatrix} \begin{bmatrix} \dot{\nu }\\ \dot{r}\\ \dot{\psi } \end{bmatrix}\nonumber \\&\quad + \begin{bmatrix} -Y_{\nu }&\quad -Y_{r} + mu_{0}&\quad 0 \\ -N{\nu }&\quad -N_{r}&\quad 0\\ 0&\quad -1&\quad 0 \end{bmatrix} \begin{bmatrix} \nu \\ r\\ \psi \end{bmatrix} = \begin{bmatrix} Y_{\delta }\\ N_{\delta }\\ 0 \end{bmatrix}\delta _{r}. \end{aligned}$$
(10)

where \(\nu \) is the sway velocity, r is the angular velocity in yaw, \(\psi \) is the heading angle and \(\delta _{r}\) is the rudder deflection. The final assumption made for NPS AUV II [28] is that the cross coupling terms in the mass matrix are zero. Thus, in matrix form, the final vehicle dynamics are defined as

$$\begin{aligned}&\begin{bmatrix} m-Y_{\dot{\nu }}&\quad 0&\quad 0\\ -N_{\dot{\nu }}&\quad I_{z} - N_{\dot{r}}&\quad 0 \\ 0&\quad 0&\quad 1 \end{bmatrix} \begin{bmatrix} \dot{\nu }\\ \dot{r}\\ \dot{\psi } \end{bmatrix}\nonumber \\&\quad + \begin{bmatrix} -Y_{\nu }&\quad -Y_{r} + mu_{0}&\quad 0 \\ -N{\nu }&\quad -N_{r}&\quad 0\\ 0&\quad -1&\quad 0 \end{bmatrix} \begin{bmatrix} \nu \\ r\\ \psi \end{bmatrix}= \begin{bmatrix} Y_{\delta }\\ N_{\delta }\\ 0 \end{bmatrix}\delta _{r}. \end{aligned}$$
(11)

Rearranging this expression into state-space form,

$$\begin{aligned} \dot{x}= & {} A x + b \delta _{r} \end{aligned}$$
(12)
$$\begin{aligned} y= & {} c^{T}x \end{aligned}$$
(13)

where, \(x = [ \nu \quad r \quad \psi ]\) and \(y=\psi \) yields

$$\begin{aligned} \begin{bmatrix} \dot{\nu }\\ \dot{r}\\ \dot{\psi } \end{bmatrix}= \begin{bmatrix} a_{11}&\quad a_{12}&\quad 0 \\ a_{21}&\quad a_{22}&\quad 0 \\ 0&\quad 1&\quad 0 \end{bmatrix} \begin{bmatrix} \nu \\ r\\ \psi \end{bmatrix}+ \begin{bmatrix} b_{1}\\ b_{2}\\ 0 \end{bmatrix}\delta _{r}. \end{aligned}$$
(14)

where the choices of \(a_{ij}\) and \(b_{i}\) should be quite obvious.

3.2 Linear model of the AUV dynamics in the vertical plane

The diving system will be responsible for control of depth errors. By changing the deflection of stern planes (two horizontal fins), the corresponding pitch moment will be changed and as a result, the pitch angle of the AUV will also be changed i.e. changing the depth of an AUV. The linearized model in the vertical plane or pitch diving plane can be obtained with following assumptions [28],

  • state vectors related to the steering plane are assumed to be zero (\(v=p=r=\phi =\psi =0\))

The simplified AUV rigid-body equations of motion in heave and pitch is given by Fossen [28]

$$\begin{aligned} m(\dot{w} - u_0 q) = Z \nonumber \\ I_y \dot{q} = M \end{aligned}$$
(15)

Apart from the external forces and moments described by hydrodynamic added mass, linear damping and the effects of the stern plane defection, the moment caused by the vertical distance between the center of gravity and the center of buoyancy, \(\bar{BG}_z = z_G - z_B \) must be modeled.

$$\begin{aligned} Z= & {} Z_{\dot{w}}\dot{w} + Z_{\dot{q}}\dot{q} + Z_w w + Z_q q + Z_{\delta } \delta _{s} \nonumber \\ M= & {} M_{\dot{w}}\dot{w} + M_{\dot{q}}\dot{q} + M_w w + Z_q q \nonumber \\&- mg(z_G - z_B) sin \theta + M_{\delta } \delta _{s} \nonumber \\\approx & {} M_{\dot{w}}\dot{w} + M_{\dot{q}}\dot{q} + M_w w + Z_q q \nonumber \\&- W \bar{BG}_z \theta + M_{\delta } \delta _{s} \end{aligned}$$
(16)

In steady-state, we have \(\theta _0 = q_0 = \phi _0 = 0\). This suggest the following relations :

$$\begin{aligned} \dot{\theta }= & {} q \nonumber \\ \dot{z}= & {} - \theta u_0 + w \end{aligned}$$
(17)

Equations (15), (16) and (17) can be written as

$$\begin{aligned}&\begin{bmatrix} m - Z_{\dot{w}}&\quad -Z_{\dot{q}}&\quad 0&\quad 0 \\ - M_{\dot{w}}&\quad I_y - M_{\dot{q}}&\quad 0&\quad 0 \\ 0&\quad 0&\quad 1&\quad 0 \\ 0&\quad 0&\quad 0&\quad 1 \end{bmatrix} \begin{bmatrix} \dot{w} \\ \dot{q} \\ \dot{\theta } \\ \dot{z} \end{bmatrix} \nonumber \\&\quad + \begin{bmatrix} Z_w&\quad m u_0 - Z_q&\quad 0&\quad 0 \\ - M_w&\quad -M_q&\quad \bar{BG}_z W&\quad 0 \\ 0&\quad -1&\quad 0&\quad 0 \\ -1&\quad 0&\quad u_0&\quad 0 \end{bmatrix} \begin{bmatrix} w \\ q \\ \theta \\ z \end{bmatrix} = \begin{bmatrix} Z_{\delta } \\ M_{\delta } \\ 0 \\ 0 \end{bmatrix} \delta _{s}. \nonumber \\ \end{aligned}$$
(18)

Both simulations and sea trials indicated that the heave velocity w during diving is small (<0.05 m/s) [29]. Thus, term containing w or \(\dot{w}\) can be neglected. This implies that the linear model in (18) reduces to

$$\begin{aligned}&\begin{bmatrix} \dot{q} \\ \dot{\theta } \\ \dot{z} \end{bmatrix}{=} \begin{bmatrix} \dfrac{M_q}{I_y - M_{\dot{q}}}&\quad -\dfrac{\bar{BG}_z W}{I_y - M_{\dot{q}}}&\quad 0 \\ 1&\quad 0&\quad 0\\ 0&\quad -u_0&\quad 0 \end{bmatrix} \begin{bmatrix} q \\ \theta \\ z \end{bmatrix} \nonumber \\&+ \begin{bmatrix} \dfrac{M_{\delta _{s}}}{I_y - M_{\dot{q}}} \\ 0 \\ 0 \end{bmatrix} \delta _{s}. \end{aligned}$$
(19)

Rearranging this into state-space form, yields:

$$\begin{aligned} \dot{x}= & {} A x + B \delta _{s} \end{aligned}$$
(20)
$$\begin{aligned} y= & {} C x \end{aligned}$$
(21)

where, \(x = [q, \quad \theta , \quad z]^T\) and \(y = z\).

4 Control design

4.1 Problem formulation

Consider an nth order uncertain dynamic model,

$$\begin{aligned} \dot{x}=Ax + \triangle Ax+Bu+ d \end{aligned}$$
(22)

where x \(\in \) \(\mathfrak {R}\) is a state vector, u \(\in \) \(\mathfrak {R}\) is the input vector, d \(\in \) \(\mathfrak {R}\) is an external disturbance vector, \(\triangle A\) is the parametric uncertainty of system matrix A and B is the input matrix. The objective of the controller is to track the reference trajectory, \(x_{d}\) in the presence of parametric uncertainties and external disturbances. The following assumptions are made to design a UDE-SMC control.

Assumption 1

The uncertainty and disturbance satisfy the matching conditions required to guarantee invariance and robustness property of SMC and are given by,

$$\begin{aligned} \triangle A&=BD \end{aligned}$$
(23)
$$\begin{aligned} d&=BF \end{aligned}$$
(24)

where D and F are unknown matrices.

Under the Assumption 1, and using matching conditions in (23) and (24), the lumped uncertainty term, e can be defined as

$$\begin{aligned} e=Dx+F \end{aligned}$$
(25)

Remark 1

The (25) implicitly states that the lumped uncertainty term e, and its derivative up to some finite order be bounded since the e is continuously differentiable as many times as x. The rate of change of the disturbance acting on the AUV is negligible in comparison with the estimation error dynamics of the UDE, i.e. slowly varying disturbances and this assumption is not overly restrictive and is commonly made in the AUV literature [3033].

Hence, the system in (22) can be rewritten as

$$\begin{aligned} \dot{x}=Ax+Bu+Be \end{aligned}$$
(26)

4.2 UDE-SMC control design

The objective in SMC design is to choose a sliding surface which will drives the plant dynamics onto the sliding surface so that the system becomes robust against parametric uncertainties and external disturbances. Hence, the sliding surface can be chosen as,

$$\begin{aligned} \sigma =S(x-x_{d})=S\tilde{x} \end{aligned}$$
(27)

where, S is vector of sliding surface coefficients. When \(\sigma \rightarrow 0\), \(\tilde{x} \rightarrow 0\). This require the sliding condition \(\sigma \dot{\sigma }<0\), should be satisfied.

Differentiating (27) and using (22)

$$\begin{aligned} \dot{\sigma }=SAx+SBu+SBe-S\dot{x}_{d} \end{aligned}$$
(28)

Splitting the control signal u as

$$\begin{aligned} u=u_{eq}+u_{n} \end{aligned}$$
(29)

where \(u_{eq}\) is the equivalent control which takes care of known dynamics of the plant and the control term \(u_{n}\) takes care of lumped uncertainty in (22).

Hence, the equivalent control takes the form

$$\begin{aligned} u_{eq}=-(SB)^{1}[SAx+K\sigma -S\dot{x}_{d}] \end{aligned}$$
(30)

where K is a positive scalar constant.

Now, to tackle the parametric uncertainties and unknown external disturbances in (22), the control term \(u_{n}\) is chosen as [26]

$$\begin{aligned} u_{n}=-\hat{e} \end{aligned}$$
(31)

The UDE estimates lumped uncertainty, e as \( \hat{e} \) and use \(-\hat{e}\) as a component in control (29) to compensate the effect of lumped uncertainty, e.

Using (30) and (31),

$$\begin{aligned} \dot{\sigma }=-K\sigma +SB\tilde{e} \end{aligned}$$
(32)

where \(\tilde{e}\) is an estimation error given by,

$$\begin{aligned} \tilde{e}=e-\hat{e} \end{aligned}$$
(33)

It is concluded from (32) that, as \(\tilde{e} \rightarrow 0\), sliding condition is satisfied and \(\sigma \) will asymptotically approach to 0, if \(K>0\).

4.3 Uncertainty and disturbance estimator (UDE)

UDE is a promising technique for estimating slow-varying uncertainties [21]. The UDE control algorithm is based on the assumption that a signal can be approximated and estimated using a low pass filter with the proper bandwidth [21]. The negative of the estimate is then used in control to negate the effect of the uncertainty. The lumped uncertainty term e can be estimated as

$$\begin{aligned} \hat{e}=G_{f}(s)e \end{aligned}$$
(34)

where \( G_{f}(s) \) is a strictly proper low-pass filter with unity steady-state gain and sufficiently large bandwidth. The (34) estimate e by passing it through an inertial filter \( G_{f}(s) \). This is analogous to time delay control (TDC) in which the estimates are obtained by delaying the plant signals in time.

From (34) and (32), the estimate \(\hat{e}\) is obtained as,

$$\begin{aligned} \hat{e}=G_{f}(s)\big [(SB)^{-1}(\dot{\sigma }+K\sigma )+\hat{e}\big ] \end{aligned}$$
(35)

where \(G_{f}(s)\) is,

$$\begin{aligned} G_{f}(s)=\dfrac{1}{\tau s +1} \end{aligned}$$
(36)

where \(\tau \) is a small positive number. If we choose small value of \(\tau \), then (34) gives,

$$\begin{aligned} \hat{e} \approx e. \end{aligned}$$
(37)

Thus, the accuracy of estimation depends upon the value of \(\tau \).

The (35) can be obtained as

$$\begin{aligned} \tau \dot{\hat{e}}+\hat{e}=(SB)^{-1}(\dot{\sigma }+K\sigma )+\hat{e}. \end{aligned}$$
(38)

Thus, with a first order low pass filter, the estimate is

$$\begin{aligned} \hat{e}=\dfrac{(SB)^{-1}}{\tau }\Big [\sigma +K\int \sigma \Big ]. \end{aligned}$$
(39)

From (33), (34) and (36)

$$\begin{aligned} \dot{\tilde{e}}=-\dfrac{1}{\tau }\tilde{e}+\dot{e}. \end{aligned}$$
(40)

If the lumped uncertainty e is constant, then practically \( \dot{e} = 0 \), and \(\tilde{e} \) goes to zero asymptotically, otherwise it is ultimately bounded. However, this is not possible, as per (25) but it is always bounded i.e. \( \mid \dot{e}(x,t) \mid \) \(\le \mu \), where \(\mu \) is a small positive number. Then the accuracy of estimation can be improved by estimating e as well as \( \dot{e}\). The complete control structure with closed loop form is depicted in Fig. 3.

Fig. 3
figure 3

Control structure of UDE-SMC scheme

5 Stability analysis of UDE-SMC

Theorem 1

If we consider the Lyapunov candidate function as,

$$\begin{aligned} V(\sigma , \tilde{e}) = \dfrac{1}{2} \sigma ^T \sigma \end{aligned}$$
(41)

then

$$\begin{aligned} \dot{V} \le -K |\sigma ^T | |\sigma | + | \sigma ^T S B | | \tilde{e} | \le 0 \end{aligned}$$
(42)

Hence, \(\dot{V}\) is negative definite.

Proof

Let us consider the Lyapunov candidate function as,

$$\begin{aligned} V(\sigma , \tilde{e}) = \dfrac{1}{2} \sigma ^T \sigma \end{aligned}$$
(43)

Differentiating (43) and using (32)

$$\begin{aligned} \dot{V}= & {} \sigma ^T \dot{\sigma } \nonumber \\= & {} \sigma ^T (-K \sigma + S B \tilde{e} ) \nonumber \\\le & {} -K |\sigma ^T | |\sigma | + | \sigma ^T S B | | \tilde{e} | \nonumber \\\le & {} 0. \end{aligned}$$
(44)

Since from (37) and (40), \(\tilde{e} \rightarrow 0 \) asymptotically as \(t \rightarrow \infty \). Hence, \(\sigma \rightarrow 0 \) asymptotically as \(t \rightarrow \infty \). Therefore, \(\dot{V}\) is negative definite function i.e. \(\dot{V}\) < 0. \(\square \)

6 Application of UDE-SMC to control of an AUV

As the dynamics of an AUV can be decoupled into steering and diving planes, two separate SISO UDE-SMC controllers are designed for steering and diving control as shown in Fig. 4. Therefore the dynamics of an AUV can be controlled by two control inputs; the stern plane and rudder plane deflections and six output parameters; surge, sway, heave, roll, pitch, and yaw. The effect of a stern plane on the forward speed of the vehicle is neglected. Also, the forward speed control scheme is not discussed in this paper. During simulations of the vehicle, it is found that the relationships between stern and rudder planes are fairly separable and hence the control scheme could be simplified into two separate implementations [34]: (i) control input as a rudder deflection \(\delta _{r}\), with yaw (\(\psi \)), roll (\(\phi \)), and sway (y) as an output parameter (ii) control input as a stern plane deflections \(\delta _{s}\), with depth (z), pitch (\(\theta \)), and heave (w) as output parameters. The steering and diving controllers are designed as explained in Sect. 3.

Fig. 4
figure 4

Control structure of UDE-SMC scheme

Fig. 5
figure 5

Steering control: a steering response, b yaw rate, r and c rudder plane angle, \(\delta _r\) with no ocean current and parametric uncertainties

Fig. 6
figure 6

Steering control: a sliding surface and b actual lumped uncertainty, e and estimated lumped uncertainty, \(\hat{e}\) with no ocean current and parametric uncertainties

For constant surge speed, \(u_{0} = 1.2\,\hbox {m/s}\) and using hydrodynamic coefficients of NPS AUV II vehicle [2], the linearised steering and diving model of the vehicle can be obtained as stated in (14) and (19) respectively. The steering model with external disturbances and uncertainties in the hydrodynamic parameters are considered and can be stated as,

$$\begin{aligned} \dot{x}_y= & {} A_y x_y + \bigtriangleup A_y + b_y \delta _{r} + d_y \end{aligned}$$
(45)
$$\begin{aligned} y_y= & {} c_y^{T}x_y \end{aligned}$$
(46)

where, \(x_y=[ \nu \quad r \quad \psi ]\) steering state vector, \(b_y\) is input matrix, \(y_y=\psi \), \( d_y \) and \(\bigtriangleup A_y\) are the external disturbances and parametric uncertainties in steering plane respectively. Using matching condition stated in Assumption 1, the lumped uncertainty in steering plane becomes

$$\begin{aligned} e_y = D_y x_y + F_y \end{aligned}$$
(47)

where, \(D_y\) and \(F_y\) are unknown matrices. Hence, (45) can be rewritten as,

$$\begin{aligned} \dot{x}_y= & {} A_y x_y + b_y \delta _{r} + b_y e_y. \end{aligned}$$
(48)

From (30), (31) and (48), the control law for steering control is obtained as,

$$\begin{aligned} \delta _r = - (S_yb_y)^{-1} \left[ S_yA_y x_y + K \sigma _y - S_y \dot{x}_{dy} \right] - \hat{e}_y \end{aligned}$$
(49)

where, \(\sigma _y\) is the sliding surface, \(x_{dy}\) is reference trajectory for steering control.

Similarly, UDE-SMC law can be designed for diving control plane of an AUV. The depth model with external disturbances and uncertainties in the hydrodynamic parameters is

$$\begin{aligned} \dot{x}_z= & {} A_z x_z + \bigtriangleup A_z + b_z \delta _{s} + d_z \end{aligned}$$
(50)
$$\begin{aligned} y_z= & {} c_z^{T}x_z \end{aligned}$$
(51)

where, \(x_z=[ q \quad \theta \quad z]\) diving state vector, \(b_z\) is input matrix, \(y_z= z\), \( d_z \) and \(\bigtriangleup A_z\) are the external disturbances and parametric uncertainties in diving plane respectively. The depth model in (50) with lumped uncertainty, \(e_z\) can be written as

$$\begin{aligned} \dot{x}_z= & {} A_z x_z + b_z \delta _{r} + b_z e_z \end{aligned}$$
(52)

where, \(e_z = D_z x_z + F_z\) with unknown matrices, \(D_z\) and \(F_z\). Therefore, the control law for depth control plane is obtained as

$$\begin{aligned} \delta _s = - (S_zb_z)^{-1} \left[ S_zA_z x_z + K \sigma _z - S_z \dot{x}_{dz} \right] - \hat{e}_z. \end{aligned}$$
(53)
Fig. 7
figure 7

Depth control: a depth response, b pitch rate, r and c stern plane angle, \(\delta _s\) with no ocean current and parametric uncertainties

Fig. 8
figure 8

Depth control: a sliding surface and b actual lumped uncertainty, e and estimated lumped uncertainty, \(\hat{e}\) with no ocean current and parametric uncertainties

7 Simulations results

The effectiveness of the proposed control law is analyzed through numerical simulations of AUV models in steering and diving planes. The efficacy of the controller has been verified under ocean current disturbance and 0, 20 and 40 % uncertainties in the hydrodynamic coefficients of the vehicle. To show the effectiveness of the proposed control scheme, the comparison of the proposed method is made with benchmark controllers like PID and SMC. The control law for PID and SMC used in the simulation are as follows,

$$\begin{aligned} U_{PID}= & {} K_P \bar{e} + K_I \int \bar{e} dt + K_D \dfrac{d\bar{e}}{dt}{:} \quad \text {PID} \end{aligned}$$
(54)
$$\begin{aligned} U_{SMC}= & {} -(SB)^{-1} (SAx + K \sigma ) - \rho sign(\sigma S B): \text {SMC}\nonumber \\ \end{aligned}$$
(55)

where, \(K_P\), \(K_I\) and \(K_D\) are PID tuning parameters. \(\bar{e}\) is the error between the output (depth or steering) and reference trajectory. \(\rho \) is the known upper bound on the lumped uncertainty. The parameters of PID controller are tuned manually using PID tuning tool in MATLAB to achieve a good balance between performance and robustness. By default, the algorithm chooses a crossover frequency (loop bandwidth) based on the plant dynamics, and designs for a target phase margin of \(60^{\circ }\). When we change the response time, bandwidth, transient response, or phase margin using the PID Tuner interface, the algorithm computes new PID gains. The computed PID gains for steering control are, \(K_P=3.8389\), \(K_I=0.12088\) and \(K_D=4.9543\) and for diving control ar4 rb, \(K_P=-1.2826\), \(K_I=-0.00204\) and \(K_D=0.06160\). The sliding surface parameters for steering and depth control are obtained using LQR method, as \(S_y=[0.01 \quad 0.08\quad 0.05]\) and \(S_z=[10.33 \quad 30.16 \quad -2.19]\) respectively and \(K=1\) and same has been used for proposed UDE-SMC scheme. The ocean current acting on both the planes is considered as,

$$\begin{aligned} d_y = d_z = 0.1 sin(0.02t). \end{aligned}$$
(56)

The control law in (49) and (53) are used to generate rudder plane and stern plane angle, in such a way to have desired steering angle and depth position respectively. The constructed desired trajectories are passed through a first order low pass filter to filter out the unfeasible signals from the reference. The performance of the controller is evaluated with and without considering the disturbance acting on the vehicle and uncertainties in the vehicle parameters.

7.1 Simulations in the absence of external disturbances and uncertainties in the hydrodynamic parameters

The simulated response of the steering, yaw rate, and rudder plane angle without considering the ocean current disturbance and 0 % parametric uncertainties in the hydrodynamic parameters are shown in Fig. 5. From these figures, it can be seen that all state variables are successfully attained their desired steady state values. It is observed that an AUV tracks the sinusoidal steering trajectory accurately and stays on the trajectory since the actual and desired trajectories overlap in the plot. The PID controller shows the steady state error, while proposing and SMC controller provides nearly the same performance. The sliding surfaces corresponding to this steering control immediately falls to zero about within 1 s as shown in Fig. 6a. However, SMC surface does not attain exact zero value, but toggles about the zero within the acceptable range of \(10^{-3}\). As noted in Fig. 6b, there is no uncertainty acting on the vehicle dynamics as lumped uncertainty (e) and estimated lumped uncertainty (\(\hat{e}\)) are zero which is estimated by UDE technique and overlap on each other. The step change in desired depth occurs at \(t=0,500,1000,1500\) s and the corresponding tracking of actual depth can be seen in Fig. 7a. It could be observed that approximately 40 s are required to attain the desired depth by all the controllers. However, PID gives maximum 9.6 % overshoot with a constant steady state error of value 0.32 during the depth tracking. The corresponding changes in the pitch rate and required control efforts can be observed in Fig. 7b, c respectively. Whenever there is a step change in depth occurred, initially controller output goes to saturation value, i.e. 0.5 rad for about 40 s and then after it comes down to zero using proposed and SMC techniques, whereas, initially PID control requires more control efforts to overcome the overshoot during the tracking control. After about 40 s the diving plane dynamics acquire the sliding surface dynamics in the case of proposed and SMC technique as shown in Fig. 8a. However, deviation in sliding surface of SMC from zero is occurred whenever there is a step change in the depth, whereas proposed controller keeps the sliding surface unaltered. The actual and estimated lumped uncertainty estimated by UDE is zero as shown in Fig. 8b. This shows the effectiveness of the proposed control technique under ideal conditions (absence of lumped uncertainty).

Fig. 9
figure 9

Steering control: a steering response, b yaw rate, r and c rudder plane angle, \(\delta _r\) with ocean current and 20 % parametric uncertainties

Fig. 10
figure 10

Steering control: a sliding surface and b actual lumped uncertainty, e and estimated lumped uncertainty, \(\hat{e}\) with ocean current and 20 % parametric uncertainties

Fig. 11
figure 11

Depth control: a depth response, b pitch rate, r and c stern plane angle, \(\delta _s\) with ocean current and 20 % parametric uncertainties

Fig. 12
figure 12

Depth control: a sliding surface and b actual lumped uncertainty, e and estimated lumped uncertainty, \(\hat{e}\) with ocean current and 20 % parametric uncertainties

Fig. 13
figure 13

Steering control: a steering response, b yaw rate, r and c rudder plane angle, \(\delta _r\) with ocean current and 40 % parametric uncertainties

Fig. 14
figure 14

Steering control: a sliding surface and b actual lumped uncertainty, e and estimated lumped uncertainty, \(\hat{e}\) with ocean current and 40 % parametric uncertainties

Fig. 15
figure 15

Depth control: a depth response, b pitch rate, r and c stern plane angle, \(\delta _s\) with ocean current and 40 % parametric uncertainties

Fig. 16
figure 16

Depth control: a sliding surface and b actual lumped uncertainty, e and estimated lumped uncertainty, \(\hat{e}\) with ocean current and 40 % parametric uncertainties

Fig. 17
figure 17

Steering control by proposed UDE-SMC scheme a steering response, b estimation of lumped uncertainty and c rudder plane angle with 40 % parametric uncertainty and fast varying disturbance of \(0.1*sin(0.1t)\)

Fig. 18
figure 18

Diving control by proposed UDE-SMC scheme a diving response, b estimation of lumped uncertainty and c stern plane angle with 40 % parametric uncertainty and fast varying disturbance of \(0.1*sin(0.1t)\)

7.2 Simulations in the presence of external disturbance and uncertainties in the hydrodynamic parameters

Practically, AUV suffers from a number of environmental disturbances like ocean currents, ocean waves etc and also the uncertainties in the hydrodynamic parameters due to which control of AUV becomes difficult. To evaluate the efficacy of the proposed control technique, the dynamics of an AUV in vertical and horizontal planes are simulated by considering ocean currents as an unknown external disturbance and \(20\,\%\) uncertainties in the hydrodynamic parameters. The ocean current is considered as given in (56).

The simulated response to sinusoidal steering control is shown in Fig. 9a, which shows the perfect steering tracking control even under the ocean current disturbance and 20 % parametric uncertainty by using proposed and SMC technique. Even though control performance of SMC is quiet comparable with the proposed controller, it suffers from the chattering phenomenon as depicted in Fig. 9c. This has been verified from the sliding surface shown in Fig. 10a. The PID controller in such situation is not able to provide satisfactory steering tracking control performance. The corresponding changes in yaw rate and the control signal as a rudder plane deflection are noted in Fig. 9b, c, respectively. The proposed UDE technique exactly estimate the lumped uncertainty during the steering control and can be observed in Fig. 10b. Similarly, under the influence of lumped uncertainty, AUV follows the desired depth trajectory as shown in Fig. 11a and the corresponding pitch rate can be observed in Fig. 11b. Here also, PID controller fails to track the depth trajectory as compared to the proposed and SMC technique. This shows that control performance by PID gets affected by the lumped uncertainty effect. During this depth tracking, the change in stern plane deflections are shown in Fig. 11c. The sliding surface for the same goes to zero and get deviated whenever a step change in depth occurs in the case of conventional SMC as shown in Fig. 11b, whereas proposed control provides tight tracking control under a step change in depth. The actual and estimated lumped uncertainty in depth plane are shown in Fig. 12a, b, respectively. This confirmed the effectiveness of the proposed control technique.

To have an extreme check on the robustness of the proposed control scheme, control of steering and diving planes for 40 % uncertainties in hydrodynamic parameters were considered under the effect of ocean current and can be seen in Figs. 131415 and 16. From these results, it can be concluded that the proposed controller provides better immunity to parametric uncertainties as compared to SMC and PID controllers. From the above simulation results, it can be concluded that, as the value of uncertainties in the hydrodynamic parameters increases, the performance of PID controller becomes poorer. This indicates that the PID controller provides a limited stability range under the effect of lumped uncertainty for the trajectory tracking control. Under this situation, SMC gives an acceptable control performance but at the cost of chattering phenomenon in the control signal. Another limitation of SMC is that the upper bound on uncertainty must be known. All above-mentioned drawbacks are overcome by the proposed control technique as evident from the simulation results. Furthermore, to show the performance of the proposed control in a worst case scenario, the effect of fast varying disturbance, say \(0.1*sin(0.1t)\) and 40 % uncertainties in hydrodynamic parameters were considered in steering and diving planes of an AUV and can be observed in Figs. 17 and 18. From these results, it can be noted that the proposed controller provides satisfactory performance even for a fast varying disturbance at the cost of high control efforts.

8 Conclusion

In this paper, UDE based sliding mode control technique is presented and applied for motion control of an AUV in vertical and horizontal planes. The efficacy of the controller has been tested using the numerical simulation of an AUV for steering and depth control under the influence of ocean current and uncertainties in the hydrodynamic parameters of the vehicle. The UDE technique negates the effect of lumped uncertainty acting on the vehicle by its correct estimation. Finally, the simulation results show that the proposed control techniques provide satisfactory control performance under the disturbance and parameter uncertainties over the PID and SMC technique. The proposed controller has the simple control structure and easy to design. Also, it can be easily implemented with the low-cost microprocessor.