# Design of Hybrid Phase Sliding Mode Control Scheme for Lower Extremity Exoskeleton
## 2 Methods
### Design of SMC Based on ESO  
#### 2.2.1 Design of Extended State Observer  
In this section, ESO is designed, which estimates the total disturbances. First of all, an additional lemma is introduced to prove the convergence of ESO.  
**Lemma 1**.: _For any symmetric positive definite matrix, there is a positive definite matrix that satisfies \(\bar{A}^{T}P+P\bar{A}{=}-Q\)._  
For the system (2), the following extended state observer is designed:  
\[\left\{\begin{array}{l}\dot{z}_{1}=z_{2}+\frac{a_{1}}{c}\left(x_{1}-z_{1} \right)\\ \dot{z}_{2}=-b(C\dot{q}+G)+bu+z_{3}+\frac{a_{2}}{c^{2}}\left(x_{1}-z_{1}\right) \\ \dot{z}_{3}=\frac{a_{3}}{c^{2}}\left(x_{1}-z_{1}\right)\end{array}\right. \tag{4}\]where \(z_{1},z_{2},z_{3}\in R^{2\times 1}\) are states of the observer system. \(\alpha_{1},\alpha_{2},\alpha_{3}\) are the gain matrixs of the observer, and \(\varepsilon\in R\) is observer normal constant parameter to be designed.  
\[\left\{\begin{array}{l}\alpha_{1}=diag(l_{11},l_{12})\\ \alpha_{2}=diag(l_{21},l_{22})\\ \alpha_{3}=diag(l_{31},l_{32})\end{array}\right. \tag{5}\]  
where \(l_{ij}>0\), \((i=1,2,3;j=1,2)\).  
Under the proposition 1 and the lemma 1, with the lower extremity exoskeleton robot system (2), the high gain extended state observer is given by (4), the total disturbances are observed by state \(z_{3}\), and the upper limit of the observation error depends on the positive constant parameter \(\varepsilon\).  
Define the observer error is:  
\[\xi=\left[\xi_{1},\xi_{2},\xi_{3}\right]^{T} \tag{6}\]  
where \(\xi_{1}=\frac{\chi_{1}-z_{1}}{\varepsilon^{2}},\xi_{2}=\frac{\chi_{2}-z_{2}}{ \varepsilon},\xi_{3}=f\left(t\right)-z_{3}\).  
Deriving on both sides of Equation (6) and multiply it with \(\varepsilon\),  
\[\left\{\begin{array}{l}\varepsilon_{1}^{\xi}=-\alpha_{1}\xi_{1}+\xi_{2},\\ \varepsilon_{2}^{\xi}=-\alpha_{2}\xi_{1}+\xi_{3},\\ \varepsilon_{3}^{\xi}=-\alpha_{3}\xi_{1}+\varepsilon\dot{f}(t),\end{array}\right. \tag{7}\]  
Consider the observer canonical form realization, \(\bar{A}=\left[\begin{array}{ccc}-\alpha_{1}&l_{2\times 2}&0_{2\times 2}\\ -\alpha_{2}&0_{2\times 2}&l_{2\times 2}\\ -\alpha_{3}&0_{2\times 2}&0_{2\times 2}\end{array}\right]\),\(\bar{B}=\left[\begin{array}{c}0_{2\times 2}\\ 0_{2\times 2}\\ l_{2\times 2}\end{array}\right]\), and the observer error equation obtained:  
\[\varepsilon_{\xi}^{\xi}=\bar{A}\bar{\varepsilon}+\varepsilon\bar{B}\dot{f} \tag{8}\]  
Define the observer Lyapunov function is:  
\[V_{o}=\varepsilon^{\bar{\xi}T}P\bar{\xi} \tag{9}\]  
Deriving on both sides of the above Equation (9)  
\[\begin{array}{l}\dot{V}_{o}=\varepsilon^{\bar{\xi}T}P\bar{\xi}+\varepsilon_{ \bar{\xi}}^{T}P\bar{\xi}=\left(\bar{A}\bar{\varepsilon}+\varepsilon\bar{B} \dot{f}\right)^{T}Px+\bar{\xi}^{T}P\left(\bar{A}\bar{\varepsilon}+\varepsilon \bar{B}\dot{f}\right)\\ =\left(\bar{\xi}^{T}\bar{A}^{T}+\varepsilon\left(\bar{B}\dot{f}\right)^{T} \right)P\bar{\xi}+\bar{\xi}^{T}P\left(\bar{A}\bar{\varepsilon}+\varepsilon\bar {B}\dot{f}\right)\\ =\bar{\xi}^{T}\left(\bar{A}^{T}P+P\bar{A}\right)\bar{\xi}+\varepsilon\left[ \left(\bar{B}\dot{f}\right)^{T}P\bar{\xi}+\bar{\xi}^{T}P\left(\bar{B}\dot{f} \right)\right]\\ =\bar{\xi}^{T}\left(\bar{A}^{T}P+P\bar{A}\right)\bar{\xi}+2\varepsilon\bar{ \xi}^{T}P\bar{B}\dot{f}\leq-\bar{\xi}^{T}Q\bar{\xi}+2\varepsilon D\left\|P\bar{ B}\right\|\left\|\bar{\xi}^{T}\right\|\end{array} \tag{10}\]  
By Lemma 1, Equation (10) can be rewritten as  
\[\dot{V}_{o}\leq-\lambda_{\min}\left(Q\right)\left\|\bar{\xi}\right\|^{2}+2 \varepsilon D\left\|P\bar{B}\right\|\left\|\bar{\xi}\right\| \tag{11}\]  
where \(\lambda_{\min}\) is the minimum eigenvalue. Eventually, the convergence condition of the observer is  
\[\left\|\bar{\xi}\right\|\leq\frac{2\varepsilon D\left\|P\bar{B}\right\|}{ \lambda_{\min}\left(Q\right)} \tag{12}\]Equation (12) indicates: the system observation error has convergence upper bound, and the final error depends on the value of the parameter \(\varepsilon\). The smaller the selected \(\varepsilon\), the smaller the observation error.