# Automation of a Hybrid Control for Electrohydraulic Servo-Actuators with Residual Dynamics
## 4 Controller Design
### Force Controller  
The second system has the same vectors fields as \((S_{1})\), but the control law is replaced by \(u_{F}\). Indeed, in the current case, the force output is controlled, where the subsystem \((S_{2})\) is defined by:  
\[\dot{X}=f(X)+g(X)u_{F};\quad\quad(S_{2}) \tag{23}\]  
Let the Lyapunov function be defined as:  
\[V_{2}=\frac{1}{2}(F(t)-F_{d}(t))^{2}=\frac{1}{2}e_{F}^{2}(t) \tag{24}\]  
where \(F\) is the force of the hydraulic fluid on the piston and \(F_{d}\) is its desired trajectory, which is assumed to be a \(C^{\infty}\) differentiable function.  
The equilibrium point \(X^{\epsilon}=[0,0,0]^{\prime}\), the following condition \(V_{2}(0)=0\) is easily checked. Differentiating (24) along the system trajectories, we obtain:  
\[\dot{V}_{2}=(F(t)-F_{d}(t))\Big{(}\dot{F}(t)-\dot{F}_{d}(t)\Big{)} \tag{25}\]  
The expression of the hydraulic force is given by:  
\[\dot{F}=S\Delta\dot{P}=-\beta S^{2}\Big{[}\frac{1}{V_{1}(y)}+\frac{1}{V_{2}(y )}\Big{]}v+\beta\bigg{[}\frac{r\psi_{1}(p_{1},sign(u))}{V_{1}(y)}+\frac{r\psi_ {2}(p_{2},sign(u))}{V_{2}(y)}\bigg{]}u_{F} \tag{26}\]  
\[u_{F}=\frac{1}{\beta\Big{[}\frac{r\dot{y}_{1}(p_{1},sign(u))}{V_{1}(y)}+\frac{ r\dot{y}_{2}(p_{2},sign(u))}{V_{2}(y)}\Big{]}}\times\bigg{[}S^{2}\beta\bigg{(} \frac{1}{V_{1}(y)}+\frac{1}{V_{2}(y)}\bigg{)}v+\varphi(t)\bigg{]} \tag{27}\]  
where \(\psi_{1}(.)\) and \(\psi_{2}(.)\) are the same nonzero quantities defined in (6). By replacing the expression of \(u_{F}\) into (26), we obtain:  
\[\dot{F}=\varphi(t) \tag{28}\]To have an exponential convergence of \(e_{F}\), the function \(\varphi(t)\) can be selected as follows:  
\[\varphi(t)=\dot{F}_{d}-K_{f}(F-F_{d}) \tag{29}\]  
where \(K_{f}\) is a positive gain. Replacing (29) in (28), we obtain the following equation:  
\[\dot{F}=\dot{F}_{d}-K_{f}(F-F_{d})\Rightarrow\dot{e}_{F}=-K_{f}e_{F}(t) \tag{30}\]  
The solution of the previous equation guarantees the exponential force stabilization:  
\[e_{F}(t)=e^{-K_{f}t}e_{F}(0) \tag{31}\]  
The convergence time is adjusted by the gain \(K_{f}\). Now, substituting the previous Equation into (30) gives:  
\[\dot{V}_{2}=-K_{f}(F-F_{d})^{2}=-2K_{f}V_{2}\Rightarrow\dot{V}_{F}\leq 0 \tag{32}\]  
Therefore \(\dot{V}_{2}\) is a negative definite function. Note that \(\dot{V}_{2}\) is a differentiable function, where \(\ddot{V}_{2}\) exists and is bounded. Then, with [PERSON]'s lemma, the asymptotic stability can be deduced. However, the overall stability of \((S_{2})\) depends on the stability of the uncontrolled dynamics. These dynamics are represented by the following linear state space:  
\[\dot{X}_{res}=A.X_{res}(t)+BE_{res}(t) \tag{33}\]  
where: \(X_{res}=\begin{bmatrix}y&v\end{bmatrix}^{T}\), \(E_{res}=(S\Delta P-Mg)\) are the inputs of the linear system and the matrix \(A\), \(B\) are defined by:  
\[A=\begin{bmatrix}0&1\\ &-k/M&-b/M\end{bmatrix}\text{:}B=\begin{bmatrix}0\\ \frac{1}{M}\end{bmatrix}\]  
The characteristic polynomial of (33) is given by:  
\[\pi(s)=s^{2}+\frac{b}{M}s+\frac{k}{M}=0 \tag{34}\]  
where \(s\) is a complex number frequency parameter. Equation (34) represents a Hurwitz characteristic polynomial. From the bounded-input bounded-output (BIBO) stability, the residual dynamics can also be stable. Indeed, the input signal \(E_{res}\) of the linear system (33) is always bounded, and, with the physical domain \(D_{\varphi}\), all state variables are bounded, which easily justifies the stability of these dynamics.