# Nonlinear Adaptive Robust Control of the Electro-Hydraulic Servo System
## 3 Controller Design  
In order to find the correct control input for the hydraulic system, a nonlinear adaptive robust controller is developed for the state Equations (7). Here, we assume that the desired motion trajectory \(x_{d}(t)\), its velocity\(\dot{x}_{d}(t)\), acceleration \(\ddot{x}_{d}(t)\), and the derivate of acceleration \(\dddot{x}_{d}(t)\) exist and are bounded. The procedure for designing the controller based on the backstepping technique is described as follows:  
Step 1: define the system output tracking error as  
\[z_{1}\triangleq x_{1}-x_{d} \tag{8}\]  
then the time derivative term of tracking error is calculated as follows:  
\[\dot{z}_{1}=x_{2}-\dot{x}_{d} \tag{9}\]  
Define \(z_{2}\) as the state error between state variable \(x_{2}\) and the virtual control \(x_{2d}\) as  
\[z_{2}\triangleq x_{2}-x_{2d} \tag{10}\]  
Here, treat \(x_{2d}\) as a virtual control input for \(x_{2}\), which is defined as  
\[x_{2d}\triangleq\dot{x}_{d}-k_{1}z_{1} \tag{11}\]  
where \(k_{1}\) is a positive constant. Combining (10) and (11), we have  
\[\dot{z}_{1}=-k_{1}z_{1}+z_{2} \tag{12}\]  
Consider a candidate Lyapunov function  
\[V_{1}=\frac{1}{2}z_{1}^{2} \tag{13}\]  
then  
\[\dot{V}_{1}=z_{1}\dot{z}_{1}=z_{1}z_{2}-k_{1}z_{1}^{2} \tag{14}\]  
It can be found that, if the \(z_{2}\) is close to zero, the tracking error \(z_{1}\) will converge to zero as well. Thus, the next step is to design a control law to make \(z_{2}\) as small as possible. Step2: Take the derivative of \(z_{2}\) results in the following equation  
\[\dot{z}_{2}=\dot{x}_{2}-\dot{x}_{2d}=\overline{x}_{3}+d-\ddot{x}_{d}+k_{1}\dot {z}_{1} \tag{15}\]  
A virtual control law \(\overline{x}_{3d}\) for Equation (15) is chosen as  
\[\overline{x}_{3d}\triangleq\dot{x}_{d}-z_{1}-k_{1}\dot{z}_{1}-k_{2}z_{2}-\dot {d},\quad k_{2}=\frac{H_{1}^{2}}{4\delta}+\eta_{2} \tag{16}\]  
where \(\dot{d}\) is the estimate of the disturbance \(d\) and the estimate error \(\dot{d}\) is defined as \(\dot{d}\triangleq d-\dot{d}\). \(\eta_{2}\) and \(\delta\) are positive constants and \(\delta\) is determined by the acceptable bound of \(z_{2}\). \(H_{1}\) is the upper bound of \(\dot{d}\) and can be expressed as \(H_{1}=\sup|\dot{d}|\). Since the ideal values of \(z_{1}\), \(z_{2}\) and their derivatives are all equal to zero, it is reasonable to construct a discrete disturbance estimator as follows:  
\[\hat{d}(k+1)=\ddot{x}_{d}(k)-\overline{x}_{3}(k) \tag{17}\]  
where \(k\) is the kth sample time. Define the state error \(z_{3}\) as  
\[\dot{z}_{1}=x_{2}-\dot{x}_{d} \tag{9}\]0  
Consider a candidate Lyapunov function  
\[\dot{z}_{1}=x_{2}-\dot{x}_{d} \tag{9}\]1  
Then, the time derivative of \(V_{2}\) is  
\[\dot{z}_{1}=x_{2}-\dot{x}_{d} \tag{9}\]2 \[\dot{z}_{1}=x_{2}-\dot{x}_{d} \tag{9}\]3  
It is obvious that, if the value of \(z_{3}\) is close to zero, \(z_{1}\) and \(z_{2}\) will converge to a bounded region determined by \(\tilde{d}\) and system initial state values. Thus, the next step is to maintain the value of \(z_{3}\) close to zero. Step3: this step is aimed to synthesize an actual control law \(u\) for the input of the hydraulic system. For simplicity, the last equation in state Equations (7) can be rewritten as  
\[\dot{z}_{1}=x_{2}-\dot{x}_{d} \tag{9}\]4  
where  
\[\left\{ \begin{aligned} g(x)&=(V_{01}+A_{1}x_{1})(V_{02 }-A_{2}x_{1})\\ &=V_{01}V_{02}+(V_{02}A_{1}-V_{01}A_{2})x_{1}-A_{1}A_{2}x_{1}^{2} >0\\ h_{1}(x)&=\beta V_{02}gR_{1}(x)+\beta k_{A}V_{01}gR_ {2}(x)+\beta gA_{2}[R_{2}(x)-R_{1}(x)]x_{1}\\ h_{2}(x)&=\beta(V_{02}-A_{2}x_{1})(-A_{1}x_{2}-C_{t}(x _{3}-x_{4}))\\ &\quad-k_{A}\beta(V_{01}+A_{1}x_{1})(A_{2}x_{2}+C_{t}(x_{3}-x_{4} ))\\ &=-C_{t}\beta(V_{02}+K_{A}V_{01})(x_{3}-x_{4})-\beta(V_{02}A_{1}+k _{A}V_{01}A_{2})x_{2}\\ &\quad+\beta A_{2}(A_{1}-A_{2})x_{1}x_{2}\end{aligned} \right.\]  
Here, parametric uncertainties in the hydraulic system are considered as a parametric vector, which is defined as  
\[\left\{