## 3 Control Design
### Adaptive Sliding Mode Trajectory Tracking Control Design
#### 3.2.3 Yaw Motion Control Law  
A second-order sliding surface is defined as  
\[s_{2}=\dot{v}_{e}+\gamma_{2}v_{e} \tag{22}\]  
where \(\gamma_{2}\) is a positive constant. The time derivative of (22) is  
\[\dot{s}_{2}=\dot{v}-\bar{\alpha}_{v}+\gamma_{2}\left(\dot{v}-\dot{\alpha}_{v}\right) \tag{23}\]where \(\dot{\alpha}_{v}=\chi-r\alpha_{u}\), in which  
\[\chi =-\left(\ddot{x}_{d}-\lambda\left(\mu^{-1}-\mu^{-3}x_{e}^{2}\right) \dot{x}_{e}+\lambda\mu^{-3}x_{e}y_{e}\dot{x}_{e}\right)\sin\psi\] \[+\left(\ddot{y}_{d}-\lambda\left(\mu^{-1}-\mu^{-3}y_{e}^{2}\right) \dot{y}_{e}+\lambda\mu^{-3}x_{e}y_{e}\dot{x}_{e}\right)\cos\psi \tag{24}\]  
where \(\mu=\sqrt{x_{e}^{2}+y_{e}^{2}+M}\). From Remark 2, to further avoid the computational explosion in the time derivative of \(\chi\), let \(\chi\) pass a neural shunting model, which can be written as  
\[\dot{\beta}_{r}=-A_{r}\beta_{r}+\left(B_{r}-\beta_{r}\right)f\left(\chi\right) -\left(D_{r}+\beta_{r}\right)g\left(\chi\right) \tag{25}\]  
where \(\dot{\beta}_{r}\) denotes the output of the neural shunting model. Then the time derivative of \(\dot{\alpha}_{v}\) is  
\[\ddot{\alpha}_{v}=\dot{\beta}_{r}-\dot{r}\alpha_{u}-\dot{r}\dot{x}_{u} \tag{26}\]  
Combining (4), (13), (25) and (26), we have  
\[\dot{s}_{2}=r\dot{\beta}_{u}-\dot{\beta}_{r}+\gamma_{2}\left(\dot{v}-\dot{ \alpha}_{v}\right)+\frac{\alpha_{u}}{m_{33}}\left(m_{33}f_{r}+\tau_{cr}+d_{r} \right)+\frac{\Delta f_{m}}{m_{33}} \tag{27}\]  
where \(\Delta f_{m}=m_{33}\ddot{v}+\alpha_{u}\Delta f_{r}\). Similarly, a hyperbolic tangent function is used to reduce the chattering problem, and we have  
\[\dot{s}_{2}=-\hat{d}_{r}^{*}\tanh\left(s_{2}/\varepsilon_{2}\right)-\rho_{2}s _{2} \tag{28}\]  
where \(\rho_{2}\) and \(\varepsilon_{2}\) are two design parameters, \(\hat{d}_{r}^{*}\) is the estimate of \(d_{r}^{*}\), and the estimated error is \(\hat{d}_{r}^{*}=d_{r}^{*}-\hat{d}_{r}^{*}\). The adaptive law with \"\(\kappa\)-correction\" is selected as  
\[\dot{\hat{d}}_{r}^{*}=\Gamma_{2}\left(s_{2}\tanh\left(s_{2}/\varepsilon_{2} \right)-\kappa_{2}\left(\hat{d}_{r}^{*}-d_{r0}^{*}\right)\right) \tag{29}\]  
where \(\Gamma_{2}\) and \(\kappa_{2}\) represent positive constants, \(d_{r0}^{*}\) is the initial value. Then the yaw motion control law is designed as  
\[\tau_{cr}=\frac{1}{\alpha_{u}}\left(m_{33}\left(\dot{\beta}_{r}-r\dot{\beta}_ {u}-\gamma_{2}\left(\dot{v}-\dot{\alpha}_{v}\right)\right)-\Delta\dot{f}_{m}- \hat{d}_{r}^{*}\tanh\left(s_{2}/\varepsilon_{2}\right)-\rho_{2}s_{2}\right)-m _{33}f_{r} \tag{30}\]  
where \(\Delta\dot{f}_{m}=\frac{1}{2}s_{2}\dot{\theta}_{2}\Theta^{T}\Theta\), the corresponding adaptive law is  
\[\dot{s}_{2}=\dot{v}-\bar{\alpha}_{v}+\gamma_{2}\left(\dot{v}-\dot{\alpha}_{v}\right) \tag{23}\]0  
where \(\varsigma_{2}\) and \(\phi_{2}\) are positive constants, and the estimated error is \(\ddot{\vartheta}_{2}=\vartheta_{2}-\dot{\vartheta}_{2}\). For the input saturation problem of the yaw motion control, the auxiliary dynamic system is designed as  
\[\dot{\zeta}_{r}=\left\{ \begin{array}{ll}-K_{\zeta r}\zeta_{r}-\frac{|s_{2} \Delta\tau_{r}|+0.5\Delta\tau_{r}^{2}}{\|\zeta_{r}^{2}}\cdot\zeta_{r}+\Delta \tau_{r},&\|\zeta_{r}\|\geq\sigma_{r}\\ 0,&\|\zeta_{r}\|<\sigma_{r}\end{array} \right. \tag{32}\]  
where \(\zeta_{r}\) is a state variable, \(\Delta\tau_{r}=\tau_{r}-\tau_{cr}\), \(K_{\zeta r}\) is a positive constant, and \(\sigma_{r}>0\) is a small design constant. The yaw motion control law \(\tau_{cr}\) is modified by  
\[\tau_{cr}=\frac{1}{\alpha_{u}}\left(h_{2}-\frac{1}{2}s_{2}\hat{\vartheta}_{2} \Theta^{T}\Theta-\hat{d}_{r}^{*}\tanh\left(s_{2}/\varepsilon_{2}\right)-\rho_{2} s_{2}+k_{s2}\zeta_{r}\right)-m_{33}f_{r} \tag{33}\]  
where \(h_{2}=m_{33}\left(\dot{\beta}_{r}-r\dot{\beta}_{u}-\gamma_{2}\left(\dot{v}- \dot{\alpha}_{\varphi}\right)\right)\), \(k_{s2}\) is a positive design parameter. **Remark 3**. : _In practice, the surge velocity satisfies \(u\geqslant 0\). From (30), \(\tau_{r}\) will produce singular value when \(\alpha_{u}=0\).