# Control for Ship Course-Keeping Using Optimized Support Vector Machines
## 3 Controller Design and Stability Analysis
### Stability Analysis  
Based on (26), (27) and (30), the inequality (24) becomes  
\[\dot{V}_{1}+||z||^{2}-\mu_{1}^{2}w^{2}\leq(r_{1}^{2}+r_{2}^{2}\lambda^{2}- \lambda)e^{2}+\zeta\eta_{1}+\zeta\widetilde{\mathbf{H}}_{1}^{\mathsf{T}}\mathbf{ \varphi}_{1}(\mathbf{x})-\lambda_{1}T\zeta^{2}+\xi\eta_{2}+\zeta\widetilde{ \mathbf{H}}_{2}^{\mathsf{T}}\mathbf{\varphi}_{2}(\mathbf{x})-\lambda_{2}T_{E}\xi^{2} \tag{32}\]  
in which  
Figure 1: Control framework. \[ \begin{array}{ll}\widetilde{\mathbf{H}}_{i}=\mathbf{H}_{i}-\mathbf{H}_{i^{\prime} }^{\prime}\left(i=1,2\right),\\ \mathbf{H}_{1}=\left[\begin{array}{cccc}\alpha_{1},&\alpha_{2},&\ldots& \alpha_{l_{1}}\\ \end{array}\right]^{\mathrm{T}};\mathbf{H}_{1}^{\prime}=\left[\begin{array}{ ccccc}\alpha_{1}^{\prime},&\alpha_{2}^{\prime},&\ldots&\alpha_{l_{1}}^{\prime} \\ \end{array}\right]^{\mathrm{T}};\\ \mathbf{H}_{2}=\left[\begin{array}{cccc}\beta_{1},&\beta_{2},&\ldots& \beta_{l_{2}}\\ \end{array}\right]^{\mathrm{T}};\mathbf{H}_{2}^{\prime}=\left[\begin{array}{ ccccc}\beta_{1^{\prime}}^{\prime},&\beta_{2^{\prime}}^{\prime},&\ldots& \beta_{l_{2}}^{\prime}\\ \end{array}\right]^{\mathrm{T}};\end{array} \]  
\(\boldsymbol{\varphi}_{1}(\boldsymbol{x})=\left[K\left(\boldsymbol{x}_{1}, \boldsymbol{x}\right),K\left(\boldsymbol{x}_{2},\boldsymbol{x}\right),\ldots K \left(\boldsymbol{x}_{1},\boldsymbol{x}\right),\right]^{\mathrm{T}}; \boldsymbol{\varphi}_{2}(\boldsymbol{x})=\left[K\left(\boldsymbol{x}_{1}, \boldsymbol{x}\right),K\left(\boldsymbol{x}_{2},\boldsymbol{x}\right), \ldots K\left(\boldsymbol{x}_{l_{2}},\boldsymbol{x}\right),\right]^{\mathrm{ T}}\). To make sure the right hand side of (32) be negative, the estimates \(a_{i}^{\prime}\) and \(\beta_{i}^{\prime}\) are designed by adopting the following on-line tuning algorithms  
\[ \begin{array}{l}\dot{\mathbf{H}}_{1}^{\prime}(t)=\varepsilon_{1} \boldsymbol{\varphi}_{1}(\boldsymbol{x})\zeta(t)-\varepsilon_{2}|\zeta| \mathbf{H}_{1}^{\prime}(t)\\ \dot{\mathbf{H}}_{2}^{\prime}(t)=\varepsilon_{1}\boldsymbol{\varphi}_{2}( \boldsymbol{x})\zeta(t)-\varepsilon_{2}||\zeta||\mathbf{H}_{2}^{\prime}(t) \end{array} \Bigg{\}} \tag{33}\]  
where \(\varepsilon_{1}\) and \(\varepsilon_{2}\) are positive constants. In addition, an augmented error signal is defined as  
\[\varsigma=\left[ \begin{array}{cc}\zeta&\zeta\end{array} \right]^{T} \tag{34}\]  
Based on (19), another Lyapunov function candidate that involves the error vector \(\widetilde{\mathbf{H}}_{i}\) can be defined as  
\[V_{2}=V_{1}+\frac{1}{2\varepsilon_{1}}(tr\{\widetilde{\mathbf{H}}_{1}^{ \mathrm{T}}\widetilde{\mathbf{H}}_{1}\}+tr\{\widetilde{\mathbf{H}}_{2}^{ \mathrm{T}}\widetilde{\mathbf{H}}_{2}\}) \tag{35}\]  
where \(tr\{\cdot\}\) represents the trace of a matrix. Combined with the definition given by (33), the following derivative can be obtained  
\[ \begin{array}{l}\frac{d}{dt}\left(\frac{1}{2\varepsilon_{1}}(tr\{\widetilde{ \mathbf{H}}_{1}^{\mathrm{T}}\widetilde{\mathbf{H}}_{1}\}+tr\{\widetilde{ \mathbf{H}}_{2}^{\mathrm{T}}\widetilde{\mathbf{H}}_{2}\})\right)\\ =-\zeta\widetilde{\mathbf{H}}_{1}^{\mathrm{T}}\boldsymbol{\varphi}_{1}-\zeta \widetilde{\mathbf{H}}_{2}^{\mathrm{T}}\boldsymbol{\varphi}_{2}+\frac{ \varepsilon_{2}}{\varepsilon_{1}}|\zeta|tr\{\widetilde{\mathbf{H}}_{1}^{ \mathrm{T}}(\mathbf{H}_{1}-\widetilde{\mathbf{H}}_{1})\}+\frac{\varepsilon_{2 }}{\varepsilon_{1}}||\zeta||tr\{\widetilde{\mathbf{H}}_{2}^{\mathrm{T}}( \mathbf{H}_{2}-\widetilde{\mathbf{H}}_{2})\}\end{array}  \tag{36}\]  
Let \(0\leqslant\lambda_{3}\leqslant 1\) and  
\[\lambda_{0}=\min\Big{\{} \begin{array}{ll}-r_{1}^{2}-r_{2}^{2}\lambda^{2}+ \lambda,&(1-\lambda_{3})\lambda_{1},&(1-\lambda_{3})\lambda_{2},&(1-\lambda_ {3})\varepsilon_{2}|\zeta|,&(1-\lambda_{3})\varepsilon_{2}||\zeta||\end{array}  \Big{\}}\]  
the following inequality w.r.t. (35) holds  
\[