# Sliding Mode Control of Electro-Hydraulic Position Servo System Based on Adaptive Reaching Law
## 3 Design of Sliding Mode Controller Based on Adaptive Reaching Law  
### Design of Sliding Surface  
The nonlinear effect of the servo valve is not considered in the electro-hydraulic servo system, and it is simplified as a proportional link, through the mathematical model of the electro-hydraulic servo system, the transfer function of the control voltage of the servo valve to the piston displacement of the hydraulic cylinder is obtained as  
\[G(s)=\frac{{K_{sys}}}{{s(\frac{{s}^{2}}{{\omega_{h}}^{2}}+\frac{{2\xi_{h}}s} {{\omega_{h}}}+1)}} \tag{17}\]  
where \(K_{sys}\) is the system's open-loop gain obtained by simplifying it into a proportional link without considering the nonlinear influence of the servo valve. Then, the state equation of the electro-hydraulic position servo system is as follows  
\[\left\{{\begin{array}{*{20}{c}}{\dot{X}}=Ax+Bu\\ y=Cx\end{array}}\right. \tag{18}\]  
\[A=\begin{bmatrix}0&1&0\\ 0&0&1\\ 0&-{\omega_{h}}^{2}&-2\xi_{h}{\omega_{h}}\end{bmatrix} \tag{19}\]  
\[B=\left[0\;0\;{K_{sys}}{\omega_{h}}^{2}\right] \tag{20}\]  
\[C=\left[1\;0\;0\right] \tag{21}\]  
In Equations (19)-(21), the controlled object is the third-order system, and \(X=\left[x_{1}\;x_{2}\;x_{3}\right]^{T}\) is the system's state variable. \(x_{1}\) is the piston displacement of the cylinder; \(x_{2}\) is the piston velocity of the cylinder; \(x_{3}\) is the piston acceleration of the cylinder; \(u\) is the system's control input; and \(y\) is the system's output.  
The state equation of the system model can be expressed as  
\[\left\{{\begin{array}{*{20}{c}}{\dot{x}_{1}}=x_{2}\\ {\dot{x}_{2}}=x_{3}\\ {\dot{x}_{3}}=-{\omega_{h}}^{2}x_{2}-2\xi_{h}^{2}{\omega_{h}}x_{3}+{K_{sys}}{ \omega_{h}}^{2}u\\ \\ y=x_{1}\end{array}}\right. \tag{22}\]The displacement tracking error of the system is  
\[e=r-y \tag{24}\]  
where \(r\) is the desired motion trajectory.  
The error vector of the system is defined as  
\[E=\left[e_{1}\;e_{2}\;e_{3}\right]^{T}=\left[r-y\;\dot{r}-\dot{y}\;\ddot{r}-\ddot {y}\right]^{T} \tag{25}\]  
The error state equation can be written according to Equations (22) and (23):  
\[\left\{\begin{array}{l}\dot{e}_{1}=e_{2}\\ \dot{e}_{2}=e_{3}\\ \dot{e}_{3}=-\omega_{h}{}^{2}e_{2}-2\xi_{h}\omega_{h}e_{3}-K_{sys}\omega_{h}{} ^{2}u+\omega_{h}{}^{2}\dot{r}+2\xi_{h}\omega_{h}\ddot{r}+\dddot{r}\end{array}\right. \tag{26}\]  
The designed sliding mode switching function is  
\[s=c_{1}e_{1}+c_{2}e_{2}+e_{3} \tag{27}\]  
The state equation of the sliding mode motion is  
\[\left\{\begin{array}{l}\dot{e}_{1}=e_{2}\\ \dot{e}_{2}=e_{3}\\ \dot{e}_{3}=-\omega_{h}{}^{2}e_{2}-2\xi_{h}\omega_{h}e_{3}-K_{sys}\omega_{h}{ }^{2}u+\omega_{h}{}^{2}\dot{r}+2\xi_{h}\omega_{h}\ddot{r}+\dddot{r}\\ c_{1}e_{1}+c_{2}e_{2}+e_{3}=0\end{array}\right. \tag{28}\]  
For satisfying \(s=c_{1}e_{1}+c_{2}e_{2}+e_{3}=0\), simplifying the state Equation (28) of the sliding mode motion yields  
\[\left\{\begin{array}{l}\dot{e}_{1}=e_{2}\\ \dot{e}_{2}=e_{3}=-c_{1}e_{1}-c_{2}e_{2}\end{array}\right. \tag{29}\]  
Equation (29) determines the dynamic quality of the sliding mode, and \(c_{1}\) and \(c_{2}\) are obtained by the pole configuration method.