# Adaptive Robust Fuzzy Impedance Control of an Electro-Hydraulic Actuator
## 4 Adaptive Robust Velocity Control
### Velocity Control Design  
The velocity control consists of an outer-loop velocity control and an inner-loop pressure control. According to the recursive backstepping technique, a velocity controller can be designed. _Step 1:_  
The velocity tracking error is defined as \(z_{1}=x_{2}-\dot{x}_{\text{s}}\). Then, a sliding surface \(z_{2}\) can be defined as  
\[z_{2}=z_{1}+k_{1}{\int}z_{1}dt \tag{16}\]  
where \(k_{1}\) is a positive constant. Since making \(z_{1}\) small or converge to zero is same as making \(z_{2}\) small or converge to zero, the rest of the controller design concentrates on making \(z_{2}\) as small as possible. Differentiating (16) and noting (11) based on Assumption 2, yielding  
\[\dot{z}_{2}=\theta_{1}\Big{[}A_{1}\overline{x}_{3}-bx_{2}-F_{L}+G-F_{f\ell} \Big{]}+\theta_{2}+\widetilde{d}-\dot{x}_{2 eq} \tag{17}\]  
where \(\dot{x}_{2 eq}=\ddot{x}_{s}-k_{1}\big{(}x_{2}-\dot{x}_{s}\big{)}\). A virtual control input \(\alpha_{2}\) for \(\overline{x}_{3}\) is designed as  
\[ \begin{split}&\alpha_{2}=\alpha_{2a}+\alpha_{2s}\\ &\alpha_{2a}=\frac{1}{A_{1}}\Big{[}\Big{(}bx_{2}+F_{L}-G+F_{f\ell} \Big{)}+\hat{\theta}_{1}\big{(}\dot{x}_{2 eq}-\dot{\theta}_{2}\big{)}\Big{]}\\ &\alpha_{2s}=\alpha_{2s1}+\alpha_{2s2}\\ &\alpha_{2s1}=-k_{2s1}z_{2},\ k_{2s1}\geq\frac{1}{\theta_{\text{ limit}}A_{1}}\Big{(}\big{\|}C_{\phi_{2}}\Gamma\dot{\phi}_{2}\big{\|}^{2}+k_{2}\Big{)}\\ &\tau_{2}=w_{2}\phi_{2}z_{2},\ w_{2}>0\end{split}  \tag{18}\]  
where \(C_{\phi_{2}}\) is a positive definite constant diagonal matrix, and \(\alpha_{2s2}\) is a robust control function, which will be designed later. \(k_{2}\) and \(w_{2}\) are positive constants, \(k_{2s1}\) is the positive feedback coefficient in the outer velocity control loop. \(\phi_{2}\) is defined as  
\[\phi_{2}=\big{[}\ A_{1}\alpha_{2a}-bx_{2}-F_{L}+G-F_{f\ell}\ 1\ 0\ \big{]}^{T} \tag{19}\]\(\alpha_{2a}\) is a model compensation through online parameter adaption, \(\alpha_{2s}\) is a robust control law, of which \(\alpha_{2s2}\) is a function satisfying the following conditions [45]  
\[ \begin{split}&\text{i}\;z_{2}\Big{[}\theta_{1}\alpha_{2s2}-\widehat {\partial}^{T}\phi_{2}+\widehat{d}\Big{]}\leq\varepsilon_{2}\\ &\text{ii}\;z_{2}\alpha_{2s2}\leq 0\end{split}  \tag{20}\]  
where \(\varepsilon_{2}\) is a positive constant that can arbitrarily be small. Define a following Lyapunov function  
\[V_{2}=\frac{1}{2}w_{2}z_{2}^{2} \tag{21}\]  
Let \(z_{3}=\overline{x}_{3}-\alpha_{2}\) represent the tracking error of the inner pressure control loop, and taking (17)-(19) into account, the time derivative of \(V_{2}\) is expressed as  
\[\dot{V}_{2}=w_{2}\theta_{1}A_{1}z_{2}z_{3}+w_{2}A_{1}z_{2}\Big{(}\theta_{1} \alpha_{2s2}-\widetilde{\theta}\phi_{2}+\widehat{d}\Big{)}-w_{2}\theta_{1}A_ {1}k_{2s1}z_{2}^{2} \tag{22}\]  
_Step 2:_  
The time derivative of \(z_{3}\) is expressed as  
\[\dot{z}_{3}=\theta_{3}\big{[}-f_{1}x_{2}-f_{2}C_{t}(x_{3}-x_{4})+k_{qx}f_{3}u \big{]}-\dot{\alpha}_{2c}-\dot{\alpha}_{2u} \tag{23}\]  
where  
\[ \begin{split}&\dot{\alpha}_{2c}=\frac{\partial\alpha_{2}}{ \partial x_{1}}x_{2}+\frac{\partial\alpha_{2}}{\partial x_{2}}\dot{\gamma}_{ 2}+\frac{\partial\alpha_{2}}{\partial t}\\ &\dot{\alpha}_{2u}=\frac{\partial\alpha_{2}}{\partial x_{2}} \Big{[}-\Big{(}A_{1}\overline{x}_{3}-bx_{2}-F_{L}+G-F_{fc}\Big{)}\widetilde{ \theta}_{1}-\widetilde{\theta}_{2}+\widehat{d}\Big{]}+\frac{\partial\alpha_{2 }}{\partial\theta}\hat{\theta}\end{split}  \tag{24}\]  
\(\dot{\alpha}_{2c}\) is the calculable part of \(\alpha_{2}\), which will be used in the control function design, \(\dot{\alpha}_{2u}\) is the incalculable part which should be handled with robust feedback.