3.2.2. Yaw Rotation Speed Control Subsystem

Since the actual forward speed *v* is obtained, we now consider the yaw rotation speed subsystem in the second equation of (18). First, the state equation of the reference model is obtained as

$$
\Delta\_3 \dot{\omega}\_0 + \Delta\_4 \upsilon\_0 \omega\_0 = \Upsilon\_{21} \mathbf{D}\_2 \Upsilon\_{22} = \mathfrak{u}\_{2\prime} \tag{27}
$$

where **D**<sup>2</sup> = diag(Δ3, Δ4), **Y**<sup>21</sup> = (*ω*˙ 0, 1), and **Y**<sup>22</sup> = (1, *ω*0*v*0)T. Since (27) is strongly nonlinear, it is unlikely to obtain an exact solution. Therefore, to seek an approximate solution, we introduce the adaptive control method based on its inverse dynamics. To this end, the basic part of controller *u*<sup>2</sup> is designed as

$$
\Delta u\_{20} = \Delta\_3 s\_2 + \Delta\_4 v\_0 \omega\_{0\prime} \tag{28}
$$

which yields the adjusted system of (27) as follows:

$$
\Delta\_3 \dot{\omega}\_0 + \Delta\_4 v\_0 \omega\_0 = \iota\_{20}.\tag{29}
$$

Here, *<sup>s</sup>*<sup>2</sup> <sup>=</sup> ˙*ω*˜ <sup>0</sup> <sup>−</sup> *<sup>k</sup>*2(*ω*<sup>0</sup> <sup>−</sup> *<sup>ω</sup>*˜ <sup>0</sup>) is the adaptation law, *<sup>ω</sup>*˜ <sup>0</sup> is the ideal yaw rotation speed target of the tugboat, *k*<sup>2</sup> is an adjustable control parameter, *e*<sup>2</sup> = *ω*<sup>0</sup> − *ω*˜ <sup>0</sup> is the yaw rotation speed error, and Δˆ 3, Δˆ <sup>4</sup> are the estimated values of Δ3, Δ4, respectively. Besides, **D**ˆ <sup>2</sup> = diag(Δˆ 3, Δˆ <sup>4</sup>) is defined as the estimated value of **D**2. The adjustment gain coefficient *k*<sup>2</sup> can be obtained by using Lyapunov stability theory, thereby getting the adaptation law *s*2. It can be seen from (28) and (29) that large errors between Δˆ <sup>3</sup> and Δ3, Δˆ <sup>4</sup> and Δ<sup>4</sup> may deteriorate the tracking performance, which can be overcome by adjusting the adjustable control parameter *k*2. Substituting (28) into (29), one has

$$
\hat{\Delta}\_3(\hat{\omega}\mathbf{0} - k\_2(\omega\mathbf{0} - \bar{\omega}\mathbf{0})) + \hat{\Delta}\_4\mathbf{v}\_0\omega\mathbf{0} = \Delta\mathbf{\hat{z}}\dot{\omega}\mathbf{0} + \Delta\_4\mathbf{v}\_0\omega\mathbf{0},
$$

which yields

$$(-\hat{\Delta}\mathfrak{z}(\dot{\omega}\mathfrak{v}-\dot{\bar{\omega}}\mathfrak{v}+k\mathfrak{z}(\omega\mathfrak{v}-\dot{\omega}\mathfrak{v}))+(\hat{\Delta}\mathfrak{z}-\Delta\mathfrak{z})\dot{\omega}\mathfrak{v}+(\hat{\Delta}\_{4}-\Delta\_{4})\mathfrak{v}\chi\omega\mathfrak{v}=0.\tag{30}$$

It follows from (30) and *<sup>e</sup>*˙2 <sup>=</sup> *<sup>ω</sup>*˙ <sup>0</sup> <sup>−</sup> ˙*ω*˜ <sup>0</sup> that

$$
\Delta\_3(\epsilon\_2 + k\_2 \epsilon\_2) = \Delta\_{3\epsilon}\dot{\omega}\_0 + \Delta\_{4\epsilon}v\_0\omega\_{0\prime} \tag{31}
$$

where <sup>Δ</sup>3*<sup>e</sup>* <sup>=</sup> <sup>Δ</sup><sup>ˆ</sup> <sup>3</sup> <sup>−</sup> <sup>Δ</sup>3, <sup>Δ</sup>4*<sup>e</sup>* <sup>=</sup> <sup>Δ</sup><sup>ˆ</sup> <sup>4</sup> <sup>−</sup> <sup>Δ</sup>4, and **<sup>D</sup>**2*<sup>e</sup>* <sup>=</sup> **<sup>D</sup>**<sup>ˆ</sup> <sup>2</sup> <sup>−</sup> **<sup>D</sup>**2. Then, together with (27), one has

$$
\Delta\_{3c}\dot{\omega}\_0 + \Delta\_{4c}v\_0\omega\_0 = \mathbf{Y}\_{21}\mathbf{D}\_{2c}\mathbf{Y}\_{22}.\tag{32}
$$

Assume that Δˆ <sup>3</sup> is reversible, and then (31) can be written as

$$(\dot{\mathfrak{e}}\_2 + k\_2 \mathfrak{e}\_2) = \tilde{\Delta}\_{\mathfrak{z}}^{-1} (\Delta\_{\mathfrak{z}\mathfrak{e}} \dot{\mathfrak{w}}\_0 + \Delta\_{4\mathfrak{e}} \upsilon\_0 \omega\_0).$$

Combining (32), one has

$$
\dot{\varepsilon}\_2 + k\_2 \varepsilon\_2 = \hat{\Delta}\_3^{-1} \mathbf{Y}\_{21} \mathbf{D}\_{2c} \mathbf{Y}\_{22} \tag{33}
$$

which is the error state equation of (27). Furthermore, (33) can be rewritten in a state equation form as

$$\dot{\mathbf{X}}\_2 = \mathbf{A}\_2 \mathbf{X}\_2 + \mathbf{B}\_2 \dot{\boldsymbol{\Lambda}}\_3^{-1} \mathbf{Y}\_{21} \mathbf{D}\_{2x} \mathbf{Y}\_{22},\tag{34}$$

where **A**<sup>2</sup> = 0 1 0 −*k*<sup>2</sup> , **B**<sup>2</sup> = 0 1 and **X**<sup>2</sup> = *ζ*<sup>2</sup> *e*2 with *<sup>ζ</sup>*<sup>2</sup> = *<sup>t</sup>* <sup>0</sup> *e*2(*τ*)d*τ*.

On the other hand, to improve the precision of the estimated matrix **D**ˆ 2, a symmetric matrix **Q**<sup>2</sup> is chosen to satisfy the following Lyapunov equation:

$$\mathbf{A}\_2^T \mathbf{D}\_2 + \mathbf{D}\_2 \mathbf{A}\_2 + \mathbf{Q}\_2 = \mathbf{0},\tag{35}$$

which can be rewritten in a more detailed form as

$$\begin{aligned} \left( \begin{pmatrix} 0 & 0 \\ 1 & -k\_2 \end{pmatrix} \right) \begin{pmatrix} \Delta\_3 & 0 \\ 0 & \Delta\_4 \end{pmatrix} + \left( \begin{pmatrix} \Delta\_3 & 0 \\ 0 & \Delta\_4 \end{pmatrix} \right) \begin{pmatrix} 0 & 1 \\ 0 & -k\_2 \end{pmatrix} &= \begin{pmatrix} 0 & \Delta\_3 \\ \Delta\_3 & -2k\_2\Delta\_4 \end{pmatrix} \\ &= \begin{pmatrix} -\mathbf{Q}\_{11} & -\mathbf{Q}\_{12} \\ -\mathbf{Q}\_{21} & -\mathbf{Q}\_{22} \end{pmatrix} \end{aligned} \tag{36}$$

where **Q**<sup>2</sup> = **Q**<sup>11</sup> **Q**<sup>12</sup> **<sup>Q</sup>**<sup>21</sup> **<sup>Q</sup>**<sup>22</sup> . It follows from (36) that

$$\begin{cases} \mathbf{Q}\_{11} = 0, \\ \mathbf{Q}\_{12} = \mathbf{Q}\_{21} = -\Delta\_{3\nu}, \\ \mathbf{Q}\_{22} = 2k\_2 \Delta\_4. \end{cases}$$

Therefore, we can uniquely determine the positive definite matrix **D**<sup>2</sup> by selecting an appropriate matrix **Q**2.

After that, apositive definite quadratic function is defined as

$$V = \mathbf{X}\_2^T \mathbf{D}\_2 \mathbf{X}\_2 + \mathbf{Y}\_{22}^T \mathbf{D}\_{2x}^T \mathbf{F}\_2 \mathbf{D}\_{2x} \mathbf{Y}\_{22} \tag{37}$$

where **D**<sup>2</sup> is the unique positive definite solution of (34), and **Γ**<sup>2</sup> is an appropriate positive definite symmetric matrix. Differentiating both sides of (35) with respect to *t* and combining (34) with (35), one has

*V*˙ =**X**˙ <sup>T</sup> <sup>2</sup> **<sup>D</sup>**2**X**<sup>2</sup> + **<sup>X</sup>**<sup>T</sup> <sup>2</sup> **<sup>D</sup>**2**X**˙ <sup>2</sup> <sup>+</sup> **<sup>Y</sup>**˙ <sup>T</sup> 22**D**<sup>T</sup> <sup>2</sup>*e***Γ**2**D**2*e***Y**<sup>22</sup> + **<sup>Y</sup>**<sup>T</sup> <sup>22</sup>**D**˙ <sup>T</sup> <sup>2</sup>*e***Γ**2**D**2*e***Y**<sup>22</sup> + **Y**<sup>T</sup> 22**D**<sup>T</sup> <sup>2</sup>*e***Γ**2**D**˙ <sup>2</sup>*e***Y**<sup>22</sup> + **<sup>Y</sup>**<sup>T</sup> 22**D**<sup>T</sup> <sup>2</sup>*e***Γ**2**D**2*e***Y**˙ <sup>22</sup> =(**A**2**X**<sup>2</sup> + **B**2Δˆ <sup>−</sup><sup>1</sup> <sup>3</sup> **<sup>Y</sup>**21**D**2*e***Y**22)T**D**2**X**<sup>2</sup> <sup>+</sup> **<sup>X</sup>**<sup>T</sup> <sup>2</sup> **<sup>D</sup>**2(**A**2**X**<sup>2</sup> + **<sup>B</sup>**2Δ<sup>ˆ</sup> <sup>−</sup><sup>1</sup> <sup>3</sup> **Y**21**D**2*e***Y**22) + **Y**˙ <sup>T</sup> 22**D**<sup>T</sup> <sup>2</sup>*e***Γ**2**D**2*e***Y**<sup>22</sup> + **<sup>Y</sup>**<sup>T</sup> <sup>22</sup>**D**˙ <sup>T</sup> <sup>2</sup>*e***Γ**2**D**2*e***Y**<sup>22</sup> + **<sup>Y</sup>**<sup>T</sup> 22**D**<sup>T</sup> <sup>2</sup>*e***Γ**2**D**˙ <sup>2</sup>*e***Y**<sup>22</sup> + **<sup>Y</sup>**<sup>T</sup> 22**D**<sup>T</sup> <sup>2</sup>*e***Γ**2**D**2*e***Y**˙ <sup>22</sup> =**X**<sup>T</sup> 2**A**<sup>T</sup> <sup>2</sup> **<sup>D</sup>**2**X**<sup>2</sup> + <sup>Δ</sup><sup>ˆ</sup> <sup>−</sup><sup>1</sup> <sup>3</sup> **<sup>Y</sup>**<sup>T</sup> 22**D**<sup>T</sup> 2*e***Y**<sup>T</sup> 21**B**<sup>T</sup> <sup>2</sup> **<sup>D</sup>**2**X**<sup>2</sup> + **<sup>X</sup>**<sup>T</sup> <sup>2</sup> **<sup>D</sup>**2(**A**2**X**<sup>2</sup> + **<sup>B</sup>**2Δ<sup>ˆ</sup> <sup>−</sup><sup>1</sup> <sup>3</sup> **Y**21**D**2*e***Y**22) + **Y**˙ <sup>T</sup> 22**D**<sup>T</sup> <sup>2</sup>*e***Γ**2**D**2*e***Y**<sup>22</sup> + **<sup>Y</sup>**<sup>T</sup> <sup>22</sup>**D**˙ <sup>T</sup> <sup>2</sup>*e***Γ**2**D**2*e***Y**<sup>22</sup> + **<sup>Y</sup>**<sup>T</sup> 22**D**<sup>T</sup> <sup>2</sup>*e***Γ**2**D**˙ <sup>2</sup>*e***Y**<sup>22</sup> + **<sup>Y</sup>**<sup>T</sup> 22**D**<sup>T</sup> <sup>2</sup>*e***Γ**2**D**2*e***Y**˙ <sup>22</sup> =**X**<sup>T</sup> <sup>2</sup> (−**Q**<sup>2</sup> <sup>−</sup> **<sup>D</sup>**2**A**2)**X**<sup>2</sup> <sup>+</sup> <sup>Δ</sup><sup>ˆ</sup> <sup>−</sup><sup>1</sup> <sup>3</sup> **<sup>Y</sup>**<sup>T</sup> 22**D**<sup>T</sup> 2*e***Y**<sup>T</sup> 21**B**<sup>T</sup> <sup>2</sup> **<sup>D</sup>**2**X**<sup>2</sup> + **<sup>X</sup>**<sup>T</sup> <sup>2</sup> **<sup>D</sup>**2(**A**2**X**<sup>2</sup> + **<sup>B</sup>**2Δ<sup>ˆ</sup> <sup>−</sup><sup>1</sup> <sup>3</sup> **Y**21**D**2*e***Y**22) + **Y**˙ <sup>T</sup> 22**D**<sup>T</sup> <sup>2</sup>*e***Γ**2**D**2*e***Y**<sup>22</sup> + **<sup>Y</sup>**<sup>T</sup> <sup>22</sup>**D**˙ <sup>T</sup> <sup>2</sup>*e***Γ**2**D**2*e***Y**<sup>22</sup> + **<sup>Y</sup>**<sup>T</sup> 22**D**<sup>T</sup> <sup>2</sup>*e***Γ**2**D**˙ <sup>2</sup>*e***Y**<sup>22</sup> + **<sup>Y</sup>**<sup>T</sup> 22**D**<sup>T</sup> <sup>2</sup>*e***Γ**2**D**2*e***Y**˙ <sup>22</sup> <sup>=</sup> <sup>−</sup> **<sup>X</sup>**<sup>T</sup> <sup>2</sup> **<sup>Q</sup>**2**X**<sup>2</sup> + <sup>2</sup>**Y**<sup>T</sup> 22**D**<sup>T</sup> 2*e***Y**<sup>T</sup> <sup>21</sup>Δ<sup>ˆ</sup> <sup>−</sup><sup>1</sup> <sup>3</sup> **<sup>B</sup>**<sup>T</sup> <sup>2</sup> **<sup>D</sup>**2**X**<sup>2</sup> + <sup>2</sup>**Y**<sup>T</sup> 22**D**<sup>T</sup> <sup>2</sup>*e***Γ**2**D**˙ <sup>2</sup>*e***Y**<sup>22</sup> + <sup>2</sup>**Y**<sup>T</sup> 22**D**<sup>T</sup> <sup>2</sup>*e***Γ**2**D**2*e***Y**˙ <sup>22</sup> <sup>=</sup> <sup>−</sup> **<sup>X</sup>**<sup>T</sup> <sup>2</sup> **<sup>Q</sup>**2**X**<sup>2</sup> + <sup>2</sup>**Y**<sup>T</sup> 22**D**<sup>T</sup> 2*e*[**Y**<sup>T</sup> <sup>21</sup>Δ<sup>ˆ</sup> <sup>−</sup><sup>1</sup> <sup>3</sup> **<sup>B</sup>**<sup>T</sup> <sup>2</sup> **<sup>D</sup>**2**X**<sup>2</sup> + **<sup>Γ</sup>**2**D**˙ <sup>2</sup>*e***Y**<sup>22</sup> + **<sup>Γ</sup>**2**D**2*e***Y**˙ <sup>22</sup>]. (38)

Since **<sup>D</sup>**˙ <sup>2</sup>*<sup>e</sup>* <sup>=</sup> ˙ **D**ˆ 2, **D**ˆ <sup>2</sup> is assumed to

$$\mathbf{d}\mathbf{\dot{D}}\_2 = -\Gamma\_2^{-1} (\mathbf{Y}\_{21}^T \hat{\Delta}\_3^{-1} \mathbf{B}\_2^T \mathbf{D}\_2 \mathbf{X}\_2 + \Gamma\_2 \mathbf{D}\_{2x} \dot{\mathbf{Y}}\_{22}) \mathbf{Y}\_{22}^{-1}. \tag{39}$$

If follows from (38) and (39) that

$$
\dot{V} = -\mathbf{X}\_2^T \mathbf{Q}\_2 \mathbf{X}\_2 \le 0. \tag{40}
$$

We have seen, from (37) and (40), that (33) is stablized. In this way, the adaptive control *u*<sup>20</sup> can track the ideal yaw rotation speed *ω*˜ <sup>0</sup> well, which ensures that all signals of the control system are bounded. Thus, by choosing appropriate parameters, the tracking error of the yaw speed can be controlled in a small area.

In order to improve the robustness of the yaw rotation speed subsystem, we introduce an integral sliding mode control method. On the one hand, the basic part of controller *u*<sup>2</sup> is designed as (28). On the other hand, a sliding mode function *S*(*ω*(*t*)) is defined as [25]

$$S(\omega(t)) = G[\omega(t) - \omega\_0(0)] - G \int\_0^t \hat{\omega}\_0(\eta) \mathbf{d}\eta\_\prime \eta$$

where *G* is an appropriate constant. Then, the switching control part is designed on the integral sliding mainifold which is defined as

$$S(\omega\_0(t)) = 0.$$

Thus, the switching control part of controller *u*<sup>2</sup> is designed as

$$\mu\_{21} = -(G^{-1}\gamma + \varepsilon \parallel e\_2 \parallel) \text{sgn}(S(\omega\_0(t))).\tag{41}$$

where *ε* is the control parameter related to the uncertainties, and *γ* is the sliding mode control parameter. As a consequence, from (28) and (41), the controller is eventually designed as

$$
u\_2 = 
u\_{20} + 
u\_{21}.$$

## **4. Simulation Results**

In this section, we present three simulation results to verify the effectiveness of the proposed method. First, we performed a comparison between using the dynamical target and the statical target. Then, we report the actual trajectories of the towed ship affected by different steering coefficients. Finally, we give an uncertain factor acted on the forward speed subsystem to validate the robustness of the proposed controller.

The target trajectory curve of the STS is assumed to be

$$\begin{aligned} \mathbf{\bar{r}}\_0 &= \left( \mathbf{\bar{x}}\_0(t), \mathbf{\bar{y}}\_0(t) \right)^\mathrm{T} = \left( 80 \sin(\frac{t-\pi}{2}) + 40t - 40\pi, 80 - 80 \cos(\frac{t-\pi}{2}) \right)^\mathrm{T}, \\\\ \text{where } t \in [0, 2\pi], l &= 80\sqrt{2}, \dot{\phi}(t) = 80\sqrt{2}te^{-t}, k\_0(s(t)) = \frac{1}{320 \cos(\frac{t-\pi}{4})}. \end{aligned}$$
