1 Introduction

Underactuated surface vessels have been used to carry out some tasks in the marine environment, such as dynamic positioning for offshore oil drilling [1] and underwater pipe-laying [2]. The development of the unmanned underactuated surface vessel is particularly significant in providing cost-effective solutions to coastal and offshore problems [3]. In recent years, the most popular task for the underactuated surface vessel is to search for Malaysia Airlines MH370, which disappeared in south China sea on March 8, 2014. Due to the deep water and the extreme marine conditions, a plan of path is needed, before they performed the search mission. This event has fully demonstrated the importance of trajectory tracking problem in marine practice.

The main challenge to solve the trajectory tracking problem of the underactuated systems is that the number of actuators is less than the degree of freedom [4,5,6], which can generate the non-integral constraints in the control design. However, due to its practical importance research on this topic is of great current interest, some of the previous works have been solved the case of trajectory tracking control of underactuated surface vessels. In the early literature, a majority of researches focused on the global stabilization problem of underactuated ships. In [8], a point-to-point navigation control for underactuated ships is proposed. Although such algorithm can guarantee the closed-loop system to be uniformly ultimately bounded, the desired speed magnitude of the underactuated surface ship can just converge to an invariant set rather than the equilibrium. In [9], a discontinuous exponential law to control the underactuated surface vessel is investigated, but it also increased the chattering of the system. In [10], a Lyapunov’s direct method was proposed to solve the global tracking problem. However, it is difficult to compute a feasible reference trajectory due to the system uncertainty and the complex nonlinearity [11]. In addition, K.D.Do et al. proposed the idea of robust adaptive path following underactuated ships by employing a robust adaptive control strategy [12] and used a suitable virtual ship in a frame attached to the ship body to solve the global tracking under relaxed conditions [13]; unfortunately, the size of the attraction region is unknown. Therefore, due to the kinematic and dynamical models of underactuated surface vessel which are highly nonlinear and coupled, the trajectory tracking control of the underactuated surface vessel is hard work

Focusing on the ship motion control, sliding mode control is a most successful approach in handing bounded uncertainties/disturbances and parasitic dynamics [14]. For the virtue of these advantages, sliding mode control is attracting more and more attention in the academic community. It is widely used in the control systems in the presence of model uncertainties and unknown disturbances, especially in practical engineering. In [15], a novel methodology was developed using the adaptive sliding model control and the backstepping technique with the simplified model. However, by using the rudder angle to design the controller, it made tracking insensitive, especially for small-scale changing yaw angle. Furthermore, Zheping Yan et al. used the proportional-integral-derivative sliding model control (PID-SMC) to solve globally finite-time stable tracking problem of underactuated unmanned underwater vehicles [16]. But the yaw angular was bounded input bounded output (BIBO) stabilization. Jian Xu et al. proposed a dynamical sliding mode control for the trajectory tracking of underactuated unmanned underwater vehicles [7], which is under assumptions that the first derivative of environment disturbances and thruster force existed. But in practical system, environment disturbances are unknown; therefore, these assumptions may have some limitations in practical marine engineering.

Since the control in the presence of environment disturbances is one of the challenging tasks in the ship motion control, many research works have been devoted to it in various algorithms. Among those control algorithms, sliding mode control is an effective control strategy to solve aforementioned problems, such as external disturbances, system uncertainty and unknown plant parameters [17, 18]. Therefore, the sliding mode control is an effective method to deal with the control of nonlinear system.

Motivated by the above observation, we address the problem of trajectory tracking for the underactuated surface vessel under the model uncertainties and unknown disturbances. The main contributions of this paper can be summarized as follows:

  1. 1.

    A novel robust adaptive algorithm is developed to implement the trajectory tracking task of underactuated vehicles. In this algorithm, due to the systematical uncertainty and the environment disturbances, a continuous sliding mode term is constructed to stabilize the control system. And one merit is that it could reduce the chattering of the closed-loop system. Comparing with the existing works [7], it is more effective to implement the control law in the practical engineering.

  2. 2.

    A practical robust trajectory tracking control law is designed, which considers the practical situation of the control model. Compared to proportional derivative (PD) or proportional integral derivative (PID) sliding mode control, a PI sliding mode scheme could successfully relax the aforementioned mentioned constraints, e.g, the model uncertainty and the discontinuous disturbances of the practical marine environment.

The remainder of this paper is generally organized by four parts: in Sect. 2, the kinematics and kinetics of the underactuated surface vessel are derived. In Sect. 3, a globally asymptotically stabilizing controller based on sliding model control and backstepping technique for an underactuated surface vessel trajectory tracking problem is investigated. In Sect. 4, simulation results are presented to demonstrate the effectiveness of this novel method. Finally, a brief conclusion is given in Sect. 5.

2 Problem formulation

Following the reference [13], the system model is employed to describe the underactuated surface vessel, including the kinematic and dynamical equations as follows.

$$\begin{aligned} \begin{aligned} {\dot{x}}&= u\cos \psi -v\sin \psi \\ {\dot{y}}&= u\sin \psi +v\cos \psi \\ {\dot{\psi }}&=r\\ {\dot{u}}&= \frac{m_{22}}{m_{11}}vr-\frac{d_{11}}{m_{11}}u+\frac{1}{m_{11}}\tau _u+\frac{1}{m_{11}}\tau _{w1}\\ {\dot{v}}&= -\frac{m_{11}}{m_{22}}ur-\frac{d_{22}}{m_{22}}v+\frac{1}{m_{22}}\tau _{w2}\\ {\dot{r}}&= \frac{m_{11}-m_{22}}{m_{33}}uv-\frac{d_{33}}{m_{33}}r+\frac{1}{m_{33}}\tau _r+\frac{1}{m_{33}}\tau _{w3}, \end{aligned} \end{aligned}$$
(1)

where (xy) denotes the position coordinates of the underactuated surface vessel model in the earth-fixed frame and \({\psi }\) is the yaw angle. (uvr) are the velocities in surge, sway and yaw directions. The surge force \({\tau _u}\) and the yaw moment \({\tau _r}\) are considered as two available control inputs. Parameters \({m_{ii}}\) and \({d_{ii} (i=1,2,3)}\) are nonzero constant control coefficients and given by the vehicle inertia and damping matrices [5]. \(\tau _{w1}\), \(\tau _{w2}\) and \(\tau _{w3}\) are the environment disturbances, which act on the surge, sway and yaw axes, respectively.

In this paper, we investigate the task of designing a controller to make the vessel to track a pre-defined trajectory \(({x_d}, {y_d}, {\psi _d})\) in the presence of the environmental disturbances, where \(({x_d}, {y_d}, {\psi _d})\) denotes the desired position and orientation of an underactuated surface vessel model in the earth-fixed frame. Define the error variables \(({x_e}, {y_e}, {\psi _{e}})\) as \(x_e := x-x_d\) \(y_e := y-y_d\), \(\psi _e:=\psi -\psi _d\). Clearly, the error variables can be rewritten as follows [19].

$$\begin{aligned} {\left\{ \begin{array}{ll} x_{e} = \cos \psi (x-{x_d})+\sin \psi (y-{y_d})\\ y_{e} = -\sin \psi (x-{x_d})+\cos \psi (y-{y_d})\\ \psi _{e}= {\psi -\psi _d}.\\ \end{array}\right. } \end{aligned}$$
(2)

From the descriptions above, in order to design the controller, we will define that the desired heading angle \({\psi _d}\) is only related to the reference trajectory as follows [20]:

$$\begin{aligned} \psi _d=\arctan \frac{{{\dot{y}}_d}}{{\dot{x}}_d}. \end{aligned}$$
(3)

According to the descriptions of Eq. (1)–(3), we can get the time derivatives of the position tracking error variables is as follows [7]:

$$\begin{aligned} {\left\{ \begin{array}{ll} {\dot{x}}_e = u-\digamma {\cos \psi _e}+r{y_e}\\ {\dot{y}}_e = v+\digamma {\sin \psi _e}-r{x_e},\\ \end{array}\right. } \end{aligned}$$
(4)

where \({\digamma }=\sqrt{{{\dot{x}}_d}^2+{{\dot{y}}_d}^2}\).

Fig. 1
figure 1

The control scheme of an underactuated vessel

Before wrapping up this section, we give some mild technical assumptions, which are practical in the marine engineering.

Assumption 1

The vessel model (1) together with the given trajectory \(({x_d}, {y_d}, {\psi _d})\) satisfies

A1:

The reference signals \(u_d\), \(r_d\), \({\dot{u}}_d\), \({\dot{r}}_d\) and the size of \(\tau _{w1}\), \(\tau _{w2}\) and \(\tau _{w3}\) which are the environment disturbance acting on the surge, sway and yaw axes are all bounded.

A2:

The states of target point \(x_d\), \({\dot{x}}_d\), \({\ddot{x}}_d\), \(y_d\), \({\dot{y}}_d\), \({\ddot{y}}_d\) and \({\dot{\psi }}_d\) are all bounded.

3 The controller design and analysis

3.1 A recursive design via backstepping

In this subsection, a recursive trajectory tracking feedback law for underactuated surface vessels, based on sliding mode control and backstepping techniques, is presented.

First, considering the stabilization of the \((x_e,y_e)\) subsystem, a candidate Lyapunov function (CLF) is selected as follows.

$$\begin{aligned} V_1 = \frac{1}{2}\left( {x_e}^2+{y_e}^2\right) . \end{aligned}$$
(5)

Substituting (4) into the derivatives of (5), the time derivative of \(V_1\) is

$$\begin{aligned} \begin{aligned} {\dot{V}}_1&= x_e{\dot{x}}_e+y_e{\dot{y}}_e\\&=x_e(u-{\digamma }{\cos \psi _e}+r{y_e})+y_e(v+{\digamma }{\sin \psi _e}-r{x_e})\\&={x_e}(u-\digamma \cos \psi _e)+{y_e}(v+\digamma \sin \psi _e). \end{aligned} \end{aligned}$$
(6)

Following the design of [7], a virtual velocity variable has been defined as:

$$\begin{aligned} \vartheta _v = \digamma \sin \psi _e. \end{aligned}$$
(7)

In order to let \({{\dot{V}}_1}\) be negative, the desired virtual controls u and \({\vartheta }\) will be defined as \({u_d}\) and \({\vartheta _d}\), which are chosen as follows:

$$\begin{aligned} {\left\{ \begin{array}{ll} u_d=\digamma \cos \psi _e-{k_1}{x_e}\\ \vartheta _d = -v-{k_2}{y_e}, \end{array}\right. } \end{aligned}$$
(8)

where \(k_1\) and \(k_2\) are positive constants, which will be chosen later.

From the description above, the error variables \(u_e\) and \(\vartheta _e\) can be described as:

$$\begin{aligned} {\left\{ \begin{array}{ll} u_e=u-u_d\\ \vartheta _e=\vartheta _v-\vartheta _d.\\ \end{array}\right. } \end{aligned}$$
(9)

According to (6)–(9), Eq. (4) can be rewritten as:

$$\begin{aligned} {\left\{ \begin{array}{ll} {\dot{x}}_e = {u_e}-{k_1}{x_e}+r{y_e}\\ {\dot{y}}_e = \vartheta _e-{k_2}{y_e}-r{x_e}.\\ \end{array}\right. } \end{aligned}$$
(10)

Thus, Eq. (6) can be rewritten as the form:

$$\begin{aligned} {\dot{V}}_1 = -\left( {k_1}{x_e}^2+{k_2}{y_e}^2\right) +{u_e}{x_e}+\vartheta _e{y_e}. \end{aligned}$$
(11)

Stabilizing the error variable \(u_e\)

Based on the (11), in order to let the CLF be stabilized, we should stabilize the error variables \(u_e\) and \(\vartheta _e\). Considering \(u_d\) as a virtual control, according to (1) and (8), the time derivative of \(u_e\) can be described as:

$$\begin{aligned} \begin{aligned} {\dot{u}}_e&= {{\dot{u}}}-{{\dot{u}}_d}\\&=\frac{m_{22}}{m_{11}}vr-\frac{d_{11}}{m_{11}}u+\frac{1}{m_{11}}\tau _u-{{\dot{u}}_d}\\&=({\delta _1}+{\tau _u}){m_{11}}^{-1}, \end{aligned} \end{aligned}$$
(12)

where \({\delta _1}={m_{22}vr-{d_{11}u-{m_{11}{{\dot{u}}_d}}}}+\tau _{w1}\).

From (11), we will select the CLF as follows:

$$\begin{aligned} V_2=V_1+{\frac{1}{2}}{m_{11}}{u_e^2}+{\frac{1}{2}}(\delta _1-{\hat{\delta }}_1)^2. \end{aligned}$$
(13)

In order to solve the problem of the nonlinear system, according to (12), the sliding manifold \(s_1\) yields:

$$\begin{aligned} \begin{aligned} s_1&={u_e}+k_3\int _{0}^{t}u_e\,\mathrm{d}\tau +{m_{11}}^{-1}\int _{0}^{t}x_e\,\mathrm{d}\tau \\&\quad -\;{m_{11}}^{-1}\int _{0}^{t}({\delta _1-{\hat{\delta }}_1})\,\mathrm{d}\tau , \end{aligned} \end{aligned}$$
(14)

where \(k_3\) is a positive constant.

Thus, the time derivative of the variable \(s_1\) is

$$\begin{aligned} \begin{aligned} {\dot{s}}_1&={\dot{u}}_e+k_3u_e+{m_{11}}^{-1}x_e-{m_{11}}^{-1}(\delta _1- {\hat{\delta }}_1)\\&=({\delta _1}+{\tau _u}){m_{11}}^{-1}+k_3u_e\\&\quad +\;{m_{11}}^{-1}x_e-{m_{11}}^{-1}(\delta _1-{\hat{\delta }}_1). \end{aligned} \end{aligned}$$
(15)

Based on (15), the time derivative of the variable \(u_e\) is

$$\begin{aligned} {{\dot{u}}_e}={\dot{s}}_1-k_3u_e-{m_{11}}^{-1}x_e+{m_{11}}^{-1}(\delta _1-{\hat{\delta }}_1). \end{aligned}$$
(16)

From (11), (16), the time derivative of \(V_2\) is

$$\begin{aligned} \begin{aligned} {{\dot{V}}_2}&={{\dot{V}}_1}+{m_{11}{u_e}{{\dot{u}}_e}}-{\dot{{\hat{\delta }}}}_1(\delta _1-{\hat{\delta }}_1)\\&={{\dot{V}}_1}+{m_{11}{u_e}}\left( {\dot{s}}_1-k_3u_e-{m_{11}}^{-1}x_e+{m_{11}}^{-1}(\delta _1-{\hat{\delta }}_1)\right) \\&=-{\dot{{\hat{\delta }}}}_1(\delta _1-{\hat{\delta }}_1)-\left( {k_1}{x_e}^2+{k_2}{y_e}^2\right) +\vartheta _e{y_e}-k_3{m_{11}}{u_e}^2\\&\quad +\;{m_{11}}{{\dot{s}}_1}{u_e}+(ue-{\dot{{\hat{\delta }}}}_1)(\delta _1-{\hat{\delta }}_1). \end{aligned} \end{aligned}$$
(17)

Then, consider the CLF as follows:

$$\begin{aligned} V_3=V_2+{\frac{1}{2}}{m_{11}}{s_1}^2. \end{aligned}$$
(18)

According to (15), (17), it is easy to get the time derivative of \(V_3\) is (19):

$$\begin{aligned} \begin{aligned} {{\dot{V}}_3}&= {{\dot{V}}_2}+{m_{11}{s_1}}{{\dot{s}}_1}\\&=-\left( {k_1}{x_e}^2+{k_2}{y_e}^2\right) +\vartheta _e{y_e}-k_3{m_{11}}{u_e}^2\\&\quad +\;{m_{11}}{{\dot{s}}_1}({u_e}+s_1)+(ue-{\dot{{\hat{\delta }}}}_1)(\delta _1-{ \hat{\delta }}_1)\\&=-\left( {k_1}{x_e}^2+{k_2}{y_e}^2\right) +\vartheta _e{y_e}-k_3{m_{11}}{u_e}^2\\&\quad +\;(ue-{\dot{{\hat{\delta }}}}_1)(\delta _1-{\hat{\delta }}_1)+m_{11}[({\delta _1}+{\tau _u}){m_{11}}^{-1}\\&\quad +\;k_3u_e+{m_{11}}^{-1}x_e-{m_{11}}^{-1}(\delta _1-{\hat{\delta }}_1)](u_e+s_1). \end{aligned} \end{aligned}$$
(19)

Choosing \({\dot{{\hat{\delta }}}}_1=u_e\) and dynamic sliding mode control law \({\tau _u}\) as:

$$\begin{aligned} \tau _u=-{\hat{\delta }}_1-k_3m_{11}u_e-x_e+u_e-s_1. \end{aligned}$$
(20)

Therefore, (19) can be rewritten as:

$$\begin{aligned} {{\dot{V}}_3}=-\left( {k_1}{x_e}^2+{k_2}{y_e}^2\right) +{\vartheta _e}{y_e} -(k_3{m_{11}}-1){u_e}^2-s_1^2. \end{aligned}$$
(21)

Stabilizing the error virtual variable\(\vartheta _e\)

According to (7), (8) and (9), the time derivative of \(\vartheta _e\) is

$$\begin{aligned} \begin{aligned} {\dot{\vartheta }}_e&={\dot{\vartheta }}_v-{\dot{\vartheta }}_d \\&={\dot{\digamma }} \sin \psi _e+\digamma \cos \psi _e(r-{\dot{\psi }}_d)+{{\dot{v}}}+k_2{{\dot{y}}_e} \\&={\dot{\digamma }} \sin \psi _e+\digamma \cos \psi _e(r-{\dot{\psi }}_d)+{\delta _2}{m_{22}}^{-1}+\varpi _1, \\ \end{aligned} \end{aligned}$$
(22)

where \(\delta _2=-{m_{11}}ur-{d_{22}}v+\tau _{w2}, \varpi _1=k_2{{\dot{y}}_e}\), and the desired heading angle will be chosen as:

$$\begin{aligned} r_d={{\dot{\psi }}_d}+\left( -{\dot{\digamma }} \sin \psi _e-{{\hat{\delta }}_2}{m_{22}}^{-1}-\varpi _1-k_4{\vartheta _e}-{y_e}{m_{22}}^{-1}\right) (\digamma \cos \psi _e)^{-1}, \end{aligned}$$
(23)

where \(k_4\) is a positive constant.

Considering \(r_d\) as a virtual control, the form of the error variable \(r_e\) can be described as:

$$\begin{aligned} r_e=r-r_d. \end{aligned}$$
(24)

Combining (23), (24) with (22), the time derivative of \(\vartheta _e\) can be rewritten as:

$$\begin{aligned} {\dot{\vartheta }}e={r_e}\digamma \cos \psi _e-{k_4}{\vartheta _e}-{y_e}{m_{22}}^{-1}+(\delta _2-{\hat{\delta }}_2){m_{22}}^{-1}. \end{aligned}$$
(25)

In a similar way, consider the following CLF as:

$$\begin{aligned} V_4=V_3+\frac{1}{2}{m_{22}}{\vartheta _e}^2+\frac{1}{2}(\delta _2-{\hat{\delta }}_2)^2. \end{aligned}$$
(26)

Substituting (21), (25) into the time derivative of \(V_4\), \(\dot{V_4}\) can be written as:

$$\begin{aligned} \begin{aligned} {{\dot{V}}_4}&={{\dot{V}}_3}+{m_{22}}{\vartheta _e}{\dot{\vartheta }_e}\\&=-({k_1}{y_e}^2+{k_2}{y_e}^2)-(k_3m_{11}-1){u_e}^2-{s_1}^2\\&\quad -\;k_4{m_{22}}{\vartheta _e}^2+{m_{22}}{\vartheta _e}{r_e}\digamma \cos \psi _e+(\vartheta _e-{\dot{{\hat{\delta }}}}_2)(\delta _2-{\hat{\delta }}_2). \end{aligned} \end{aligned}$$
(27)

Choosing the \({\dot{{\hat{\delta }}}}_2=\vartheta _e\), Eq. (27) can be written as:

$$\begin{aligned} \begin{aligned} {{\dot{V}}_4}&={{\dot{V}}_3}+{m_{22}}{\vartheta _e}{\dot{\vartheta }_e}\\&=-({k_1}{x_e}^2+{k_2}{y_e}^2)-(k_3m_{11}-1){u_e}^2-{s_1}^2\\&\quad -\;k_4{m_{22}}{\vartheta _e}^2+{m_{22}}{\vartheta _e}{r_e}\digamma \cos \psi _e. \end{aligned} \end{aligned}$$
(28)

Stabilizing the error variable \(r_e\)

According to (1), the time derivative of \(r_e\) is

$$\begin{aligned} \begin{aligned} {\dot{r}}_e&={{\dot{r}}}-{{\dot{r}}_d}\\&=[({m_{11}-{m_{22}})uv-{d_{33}r}}-{m_{33}}{{\dot{r}}_d}+{\tau _r}+\tau _{w3}]{m_{33}}^{-1}\\&=({\tau _r}+{\delta _3}){m_{33}}^{-1}, \end{aligned} \end{aligned}$$
(29)

where \({\delta _3}=({m_{11}-{m_{22}})uv-{d_{33}r}}-{m_{33}}{{\dot{r}}_d}+\tau _{w3}\).

Consider the following CLF as:

$$\begin{aligned} V_5=V_4+\frac{1}{2}{m_{33}}{r_e}^2+\frac{1}{2}(\delta _3-{\hat{\delta }}_3)^2. \end{aligned}$$
(30)

As a similar way, based on Eq. (28), the sliding manifold \(s_2\) is with the form as:

$$\begin{aligned} \begin{aligned} s_2&={r_e}+k_5\int _{0}^{t}r_e\,\mathrm{d}\tau +{m_{33}}^{-1}\int _{0}^{t}{m_{22}}{\vartheta _e}\digamma \cos \psi _e\,\mathrm{d}\tau \\&\quad -\;{m_{33}}^{-1}\int _{0}^{t}({\delta _3-{\hat{\delta }}_3})\,\mathrm{d}\tau , \end{aligned} \end{aligned}$$
(31)

where \(k_5\) is a positive constant.

Therefore, the time derivative of the variable \(s_2\) is

$$\begin{aligned} \begin{aligned} {\dot{s}}_2&={\dot{r}}_e+k_5r_e+{m_{22}}{m_{33}}^{-1}{\vartheta _e}\digamma \cos \psi _e-{m_{33}}^{-1}({\delta _3-{\hat{\delta }}_3})\\&=({\delta _3}+{\tau _r}){m_{33}}^{-1}+k_5r_e+{m_{22}}{m_{33}}^{-1}{\vartheta _e}\digamma \cos \psi _e-{m_{33}}^{-1}({\delta _3-{\hat{\delta }}_3}). \end{aligned} \end{aligned}$$
(32)

Then, the time derivative of \(r_e\) can be expressed as:

$$\begin{aligned} {{\dot{r}}_e}={\dot{s}}_2-k_5r_e-{m_{22}}{m_{33}}^{-1}{\vartheta _e}\digamma \cos \psi _e+{m_{33}}^{-1}({\delta _3-{\hat{\delta }}_3}). \end{aligned}$$
(33)

According to (27), (31), the time derivative of \(V_5\) is

$$\begin{aligned} \begin{aligned} {{\dot{V}}_5}&={{\dot{V}}_4}+{m_{33}}{r_e}{{\dot{r}}_e}-{\dot{{\hat{\delta }}}}_3({\delta _3-{\hat{\delta }}_3})\\&=-\left( {k_1}{x_e}^2+{k_2}{y_e}^2\right) -(k_3{m_{11}}-1){u_e}^2\\&\quad -\;{s_1}^2-k_4{m_{22}}{\vartheta _e}^2-k_5{m_{33}}{r_e}^2\\&\quad +\;{m_{33}}{r_e}{\dot{s}}_2+(r_e-{\dot{{\hat{\delta }}}}_3)({\delta _3-{\hat{\delta }}_3}). \end{aligned} \end{aligned}$$
(34)

Consider the CLF as:

$$\begin{aligned} V_6=V_5+\frac{1}{2}{m_{33}}{s_2}^2. \end{aligned}$$
(35)

Combine (31) and (33), the time derivative of \(V_6\) is

$$\begin{aligned} \begin{aligned} {{\dot{V}}_6}&={{\dot{V}}_5}+{m_{33}}{s_2}{{\dot{s}}_2} \\&=-\left( {k_1}{x_e}^2+{k_2}{y_e}^2\right) -(k_3{m_{11}}-1){u_e}^2 \\&\;\quad -\;{s_1}^2-k_4{m_{22}}{\vartheta _e}^2-k_5{m_{33}}{r_e}^2+{m_{33}}{r_e}{\dot{s}}_2 \\&\;\quad +\;(r_e-{\dot{{\hat{\delta }}}}_3)({\delta _3-{\hat{\delta }}_3})+{m_{33}}{s_2}{{\dot{s}}_2} \\&=-\left( {k_1}{x_e}^2+{k_2}{y_e}^2\right) -(k_3{m_{11}}-1){u_e}^2-{s_1}^2 \\&\;\quad -\;k_4{m_{22}}{\vartheta _e}^2-k_5{m_{33}}{r_e}^2+(r_e-{\dot{{\hat{\delta }}}}_3)({\delta _3-{\hat{\delta }}_3}) \\&\;\quad +\;{m_{33}}{r_e}{\dot{s}}_2+m_{33}(re+s_2)[({\delta _3}+{\tau _r}){m_{33}}^{-1}+k_5r_e \\&\;\quad +\;{m_{22}}{m_{33}}^{-1}{\vartheta _e}\digamma \cos \psi _e-{m_{33}}^{-1}({\delta _3-{\hat{\delta }}_3})]. \end{aligned} \end{aligned}$$
(36)

Choosing \({\dot{{\hat{\delta }}}}_3=r_e\) and dynamic sliding mode control law \({\tau _r}\) as:

$$\begin{aligned} \tau _r=-{{\hat{\delta }}_3}-k_5m_{33}r_e-{m_{22}}{\vartheta _e}\digamma \cos \psi _e+r_e-s_2. \end{aligned}$$
(37)

Therefore, Eq. (36) can be rewritten as:

$$\begin{aligned} \begin{aligned} {{\dot{V}}_6}&=-\left( {k_1}{x_e}^2+{k_2}{y_e}^2\right) -(k_3{m_{11}}-1){u_e}^2-{s_1}^2 \\&\;\quad -\;k_4{m_{22}}{\vartheta _e}^2-(k_5{m_{33}}-1){r_e}^2-s_2^2\le 0, \end{aligned} \end{aligned}$$
(38)

when \(k_3{m_{11}}-1\ge 0\) and \(k_5{m_{33}}-1\ge 0\).

3.2 Main results

According to the aforementioned analysis, for the studied vessel model, a robust state feedback law could be designed as (20) and (37), with the designed adaptive laws of \(\hat{\delta }_i \,(i=1,2,3\)).

We are now in the position to present our main result of the recursive controller design.

Proposition 1

Suppose Assumptions A1A2 hold, and consider an underactuaded vessel with kinematic and dynamic (1), adaptive laws \({\dot{{\hat{\delta }}}}_1=u_e\), \({\dot{{\hat{\delta }}}}_2=\vartheta _e\), \({\dot{{\hat{\delta }}}}_3=r_e\), under the control laws (20) and (37), thus the tracking error \(z_e=(x_e, y_e, u_e, \vartheta _e, r_e,)\) converges to zero. Furthermore, the equilibrium of closed-loop error dynamics (4), (22) is globally uniformly asymptotically stable, and all the intermediate variables are all bounded.

Proof

In order to analyze the stability of the closed-loop system, we consider a Lyapunov function \(V_6^*\) for the full closed-loop system as follows.

$$\begin{aligned} \begin{aligned} V_6^*&=\frac{1}{2}\left( x_e^2+y_e^2\right) +\frac{1}{2}m_{11}u_e^2+\frac{1}{2}m_{11}s_1^2\\&\quad +\;\frac{1}{2}{m_{22}}{\vartheta _e}^2+\frac{1}{2}{m_{33}}{r_e}^2+\frac{1}{2}{m_{33}}{s_2}^2. \end{aligned} \end{aligned}$$
(39)

In terms of (38), if there exists any non-zero error variable in the system vector \(z_e=[x_e, y_e, u_e, \vartheta _e, r_e]\), it is obvious to note that \({\dot{V}}_6<0\) is satisfied automatically. Therefore, from Eq. (38), one can obtain that all the error variables \(x_e\), \(y_e\), \(u_e\), \(\vartheta _e\), \(r_e\) would be stabilized to zero as \(t\rightarrow \infty\). Furthermore, the modified Lyapunov function \(V_6^*(\cdot )\) is global uniformly asymptotically stable, i.e., \(\lim _{t \rightarrow \infty }V_6=0\). According to adaptive laws \({\dot{{\hat{\delta }}}}_1=u_e\), \({\dot{{\hat{\delta }}}}_2=\vartheta _e\), \({\dot{{\hat{\delta }}}}_3=r_e\), we can get when \(t\rightarrow \infty\), the adaptive laws \({\dot{{\hat{\delta }}}}_1=0\), \({\dot{{\hat{\delta }}}}_2=0\), \({\dot{{\hat{\delta }}}}_3=0\), that means \({\hat{\delta }}_1\), \({\hat{\delta }}_2\), \({\hat{\delta }}_3\) are all bounded. Therefore, according to (8), (20) and (37), all the intermediate variables of control system \(u_d\), \(\vartheta _d\), \(r_d\), \(\tau _u\) and \(\tau _r\) are all bounded. \(\square\)

3.3 Further discussions

In current literatures, most attention is paid to use signum function in the controller design [7, 16]. However, the signum function is a discontinuous function, which can cause the chattering of the system. To avoid this situation, a continuous control law, i.e, \(u_e-s_1\), \(r_e-s_1\) in (20), (36) has been proposed and, by this design, \(u_e^2\) and \(r_e^2\) can be substituted into the \(-k_3m_{11}u_e^2\), \(-k_5m_{33}r_e^2\) in (19), (35); this novel method can not only avoid the chattering of system by the signum function, but also ensure the stability of error variable \(u_e\) and \(r_e\) by choosing the parameter \(k_3\) and \(k_5\) of the controller. Meanwhile, in the literature [7], a dynamic sliding mode control is proposed with the following assumptions.

  • \(\tau _{w1}\) is the environmental disturbances induced by wind, waves and currents, which is first order differentiable in time.

  • The first derivative of \(\tau _u\) has existed.

  • \(\tau _{w3}\) is the environmental disturbances induced by wind, waves and currents, which has existed the first derivative.

  • The first derivative of \(\tau _r\) has existed.

However, in practical system, environment disturbances are often unknown; therefore, the above assumptions are strict. In this part, in order to avoid this problem, the PI sliding mode control is proposed in (14) and (31); using this method, the above assumptions are unnecessary.

4 Simulations

In this section, the experiments of the control system are executed in MATLAB R2016a on the computer. Some numerical simulations are included to demonstrate the efficiency and effectiveness of the proposed scheme. Consider an underactuated surface vessel model with the model parameters [7]: \(m_{11}=200\) kg, \(m_{22}=250\) kg, \(m_{33}=80\) kg, \(d_{11}=70\) kg/s, \(d_{22}=100\) kg/s, and \(d_{33}=50\) kg/s, the control parameters are chosen as \(k_1=0.09,\) \(k_2=0.5,\) \(k_3=20,\) \(k_4=0.8,\) \(k_5=8\), and \(\tau _{w1}=\tau _{w2}=\tau _{w3}=rand(\cdot )\), where \(rand(\cdot )\) is the uniformly distributed random signals with \(5{-}N\) amplitude. Finally, the desired reference trajectories can be divided into three scenarios, which are shown below (Fig. 1):

$$\begin{aligned} \left\{ \begin{array}{ll} \left\{ \begin{array}{ll} x_d=t, &{} \quad t<200s \\ y_d=100, &{} \\ \end{array} \right. &{} \\ \left\{ \begin{array}{ll} x_d=200+100\sin (0.005\pi (t-200)), &{} \quad 200\le t<400s \\ y_d=100\cos (0.005\pi (t-200)), &{} \end{array} \right. &{} \\ \left\{ \begin{array}{ll} x_d=600-t, &{} \quad t\ge 400s \\ y_d=300-t, &{} \end{array} \right. &{} \\ (x_0, y_0, \psi _0)=(0,120,0) &{} \\ (u_0,v_0,r_0)=(0,0,0). &{} \end{array} \right. \end{aligned}$$
(40)
Fig. 2
figure 2

The trajectory tracking path with perturbations effect

Fig. 3
figure 3

Tracking error and attitude error with perturbations effect

Fig. 4
figure 4

Velocities of surge, sway, and yaw with perturbations effect

Fig. 5
figure 5

Control inputs with perturbations effect

Fig. 6
figure 6

Time evolution of the Sliding surface with perturbations effect

Fig. 7
figure 7

Adaptive approximate errors

The simulation results are shown in Figs. 2, 3, 4, 5, 6, 7. Figure 2 shows the time evolution of the original position (xy). It can be observed that the vessel follows the reference trajectory accurately and smoothly under time-varying disturbances. In order to make the simulation experiment persuasive, the desired reference trajectories consist of straight lines and circles. These desired reference trajectories can represent somewhat realistic performance in the problem of trajectory tracking or path following in practical engineering. Figure 3 shows the tracking error between the actual and the desired vehicle, which is defined as \(e=\sqrt{(x_e^2+y_e^2)}\). It can be seen that the tracking error \(e\) can quickly converge to the origin in the presence of the random disturbances. Furthermore, it also can be observed that the tracking error in sway direction \(\psi _e\) can quickly converge to the origin. Figure 4 shows the curves of the velocity of surge, sway and the yaw rate vary with timing law, it is obvious that the dynamic responses of the underactuated vessel are varying dramatically, when the reference trajectories change at time 200 and 400 s. This phenomenon is sufficient to illustrate the effectiveness of the control algorithm. The control inputs are shown in Fig. 5, simulation results show that the thruster outputs are smoothness, the \(\tau _u\), and \(\tau _r\) are given in the control law directly, rather than the derivative of these are given in [7], it can make the control input more accurate in the close-loop system. Figures 6, 7 present the dynamic sliding surfaces, adaptive approximate errors. It can be observed that the dynamic sliding surfaces converge to the origin, and the adaptive approximate errors also converge to zero. All the above simulation results show the outstanding merits of the proposed method, especially in the practice of marine engineering.

5 Conclusion

In this paper, a sliding mode controller has been designed to solve the problem of trajectory tracking of an underactuated surface vessel. By combining the adaptive continuous sliding mode control with backstepping technique, the problem of system chattering and trajectory tracking can be effectively solved. To solve the practical problem of trajectory tracking, a novel PI sliding mode control is proposed in the design of control law. Furthermore, in order to guarantee the stability of the state variables \(u_e\), \(r_e\) and the intermediate variables \(s_1\) and \(s_2\), a novel design was carried out on the output of the controller, which let the controller output with the terms \(u_e-s_1\) and \(r_e-s_2\). The global stabilization of the overall system is discussed based on the Lyapunov stability theory. However, different from the existing research works [4, 21], this note has fully considered the external environment disturbances in the control system, which is extremely important in the fields of ship motion control. In comparison with the controller design in [7, 22, 23], the PI sliding mode control can not only solve the random disturbances, but also deal with the thruster discontinuity, which is more effective in the practical ship motion control.