## 2 Control Algorithm
### Proportional-Integral Sliding Mode Control
Let the function \(\tilde{u}\) be specified in (12) with \(\tilde{u}_{\mathrm{eq}}\) being equivalent signal and \(v_{\mathrm{sw}}\) being switching control defined in (13) and (14), respectively. The gain \(k\) is designed to satisfy (5) with the definition of \(\hat{w}\) given in (15). If there is a \(k\) and an \(\eta>0\) such that_  
\[k = \tilde{F}(\tilde{\mathbf{X}},t)+\eta, \tag{16}\]  
_then the tracking error as defined in (3) will tend to a neighborhood of zero within a finite time._  
Proof: The proof is a brief version of [19] for further usage. Define the following Lyapunov function  
\[V=\frac{1}{2}(s_{1}+s_{2})^{2}=\frac{1}{2}s^{2}. \tag{17}\]  
Choose an appropriate \(\tilde{u}\) to satisfy \(\hat{V}(s)<0\). Then,  
\[\hat{V} = s\hat{s} \tag{18}\] \[= \left[\hat{x}^{(n)}-\hat{x}_{d}^{(n)}+\sum_{m=0}^{n-2}\left( \begin{array}{c}n-1\\ m\end{array} \right)e^{(m+1)}\lambda^{n-m-1}\right.\] \[+\sum_{m=0}^{n-1}\left( \begin{array}{c}n-1\\ m\end{array} \right)e^{(m+1)}\alpha^{n-m-1}\] \[+\alpha\sum_{m=0}^{n-1}\left( \begin{array}{c}n-1\\ m\end{array} \right)e^{(m)}\alpha^{n-m-1}\right]s\] \[= (\hat{f}+\hat{w}+\Delta f+\tilde{u})s\] \[= [\Delta f-k\mathrm{sgn}(s)]\,s\] \[\leq |\Delta f||s|-k|s|\] \[\leq -(k-\tilde{F})|s|.\]  
The sufficient condition of (18) to ensure the stability of system and to satisfy the sliding conditions as in (5) is given by  
\[\hat{V}\leq 0.\]Let  
\[(k-\tilde{F})|s| = \eta|s|>0,\]  
provided \(\eta>0\). We conclude  
\[k = \tilde{F}(\mathbf{\hat{X}},t)+\eta,\]  
as stated in (16). It is also conclusive from (18) that \(e(t)\) converges to the neighborhood around origin of the phase plane for any trajectory. In fact, in the control signal there is a the discontinuous contribution \(v_{sw}\), caused by the discontinuous switching function (sgn). This function results in an infinitely large switching frequency. However, this infinitely large switching frequency can not be realized in real physical system. Therefore, a switching component with extremely high-speed is applied. That way, the state trajectory would oscillate around the two sides of \(s=0\) which results in the chattering phenomenon. In order to reduce the chattering problem, the concept of boundary layers for a sliding surface is employed, as depicted in Figure 1.  
The definition of boundary layers is given by  
\[B = \left\{\mathbf{\hat{X}}|s(\mathbf{\hat{X}},t)=\pm\Phi\right\}, \quad\Phi>0. \tag{19}\]  
The error phase-plane of boundary layers of a sliding surface, \(s\), coincides with the boundary range of \(\epsilon\). Note that \(s=\pm\Phi\) is the boundary layer. Since the switch action can not be completed in a blink of time and the effect of delay exists, the state trajectory \(\mathbf{\hat{X}}\) would oscillate between the boundary layers. Figure 1 is the 2 nd-order error phase plane, and it is the most common way to mitigate the oscillation by replacing the sliding surface with the boundary layers. \(v_{sw}\) is the switching law of the controller, defined as follows  
\[v_{sw} = -k\text{sat}\left(\frac{s}{\Phi}\right). \tag{20}\]  
\[= [\Delta f-k\mathrm{sgn}(s)]\,s\]0 The definition of boundary layer for a sliding surface [19]. Here \(\text{sat}(s,\Phi)\) is the saturation function defined by  
\[\text{sat}(s,\Phi) = \left\{ \begin{array}{rl}\frac{s}{\Phi}&\text{if }|s|\leq\Phi\\ \text{sgn}(s)&\text{if }|s|>\Phi\end{array} \right..\]