# 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
### Characteristic Analysis of SMC Controller Based on Adaptive Reaching Law  
When the system state variable \(x\) is far away from the sliding mode surface, \(|s|^{2}\) is the largest, \(\lim\limits_{x\rightarrow\infty}\zeta\frac{1-e^{-|x|}}{1+e^{-|x|}}\text{sgn}(s )=\zeta\), \(-\xi|s|^{2}\text{sgn}(s)\) plays a major role in the controller output, and \(-\xi|s|^{2}\text{sgn}(s)\) ensuring that the rate of approaching the sliding mode surface is large enough.  
When the system state variable \(x\) moves in the direction close to the sliding mode surface, \(s\) decreases, \(-\xi|s|^{2}\text{sgn}(s)\) approaches zero, and \(-\xi\dfrac{1-e^{-|x|}}{1+e^{-|x|}}\text{sgn}(s)\) plays a major role in the output of the controller:  
\[\lim_{x\to 0^{+}}\zeta\dfrac{1-e^{-|x|}}{(1+e^{-|x|})x}=\dfrac{\zeta}{2} \tag{42}\]  
where \(-\zeta\dfrac{1-e^{-|x|}}{1+e^{-|x|}}\) converges to near the origin \(\frac{\zeta x}{2}\) and the approach velocity decreases with the decrease of \(|x|\).  
Next, the characteristics of the SMC controller using the adaptive reaching law are analyzed and proved. Only when the reaching law meets the arrival condition can the existence of the sliding mode state be guaranteed, that is, it satisfies \(s\dot{s}<0\).  
The adaptive reaching law has reachability.  
Proof of Theorem 1.: Suppose a Lyapunov function \(V=s^{2}/2\), and derivate this function to obtain \(\dot{V}=s\dot{s}=-\xi|s|^{3}-\zeta\dfrac{1-e^{-|x|}}{1+e^{-|x|}}|s|\). From the adaptive approach rate parameter \(\zeta\dfrac{1-e^{-|x|}}{1+e^{-|x|}}>0\), we obtain \(\dot{V}<0\), it can be seen that the system satisfies the arrival condition, that is, the adaptive reaching law \(\dot{s}=-\xi|s|^{2}\text{sgn}(s)-\zeta\dfrac{1-e^{-|x|}}{1+e^{-|x|}}\text{sgn }(s)\) satisfies the arrival condition. \(\square\)  
For the adaptive reaching law, the reaching law can make the system reach the sliding mode surface in a certain time, that is, the system converges to \(s=\dot{s}=0\) in a certain time.  
Proof of Theorem 2.: Assuming the initial position \(s(0)>1\), the proof of the arrival time of the system is divided into two stages. \(\square\)  
1. Approach \(s=1\) from the initial position \(s(0)\). At this stage \(-\xi|s|^{2}\text{sgn}(s)>>-\zeta\dfrac{1-e^{-|x|}}{1+e^{-|x|}}\text{sgn}(s)\), ignoring the \(-\zeta\dfrac{1-e^{-|x|}}{1+e^{-|x|}}\text{sgn}(s)\) term influence, that is \(\dfrac{ds}{dt}=-\xi s^{2}\), by integrating it, we obtain \[\int_{s(0)}^{1}s^{-2}ds=\int_{0}^{t_{1}}-\zeta dt\] (43) and \(t_{1}\) as \[t_{1}=\dfrac{1-s(0)^{-1}}{\xi}\] (44)
2. From \(s=1\), approach \(s=0\). At this stage \(-\zeta\dfrac{1-e^{-|x|}}{1+e^{-|x|}}\text{sgn}(s)>>-\xi|s|^{2}\text{sgn}(s)\), ignoring the shadowing of \(-\xi|s|^{2}\text{sgn}(s)\), that is, \(\dfrac{ds}{dt}=-\zeta\dfrac{1-e^{-|x|}}{1+e^{-|x|}}\), by integrating it, we obtain \[\int_{0}^{t_{1}}ds=\int_{0}^{t_{2}}-\zeta\dfrac{1-e^{-|x|}}{1+e^{-|x|}}dt\] (45) and \(t_{2}\) as \[t_{2}=\dfrac{1+e^{-|x|}}{\zeta(1-e^{-|x|})}\] (46)It can be obtained that the total time \(t^{\prime}\) for the system state trajectory to reach the sliding surface is  
\[t^{\prime}=t_{1}+t_{2}=\frac{1-s(0)^{-1}}{\xi}+\frac{1+e^{-|x|}}{\zeta(1-e^{-|x| })} \tag{47}\]  
Assuming that the second-stage system state \(|x|\) lies between \(|x|_{\text{min}}\) and \(|x|_{\text{max}}\), and the above derivation ignores secondary factors, then \(t<\frac{1-s(0)^{-1}}{\xi}+\frac{1+e^{-|x_{\text{min}}|}}{\zeta(1-e^{-|x_{\text {min}}|})}\).  
It can be seen that the electro-hydraulic position servo system designed in this paper can reach the sliding surface in a limited time. The schematic diagram of the SMC system based on the adaptive reaching law is shown in Figure 2. The AMESim/Simulink co-simulation block diagram is shown in Figure 3.