# Automation of a Hybrid Control for Electrohydraulic Servo-Actuators with Residual Dynamics
## 4 Controller Design
### Problem Statement  
Backstepping control is a design procedure developed for systems with a lower-triangular form. The key property of this technique is that it offers a constructive way of forwarding the non-reachable control to a new virtual control law. Indeed, a recursive procedure is repeated until the actual control variable is reached. Let us start with the first subsystem \((S_{1})\), which is defined by:  
\[\dot{X}=f(X)+g(X)u_{p};\qquad(S_{1}) \tag{11}\]  
The equilibrium point \(X^{e}\) is given by: \(X^{e}=\left[y^{e}=0,v^{e}=0,\Delta P^{e}=Mg\right]^{\prime}\), where \(y^{e},v^{e},\Delta P^{e}\) are the position, the velocity and the pressure drop defined at the equilibrium point, respectively. Therefore, with a simple translation \(\Delta P^{e}-Mg=0\), the equilibrium point can be defined by \(X^{e}=\left[0,0,0\right]^{\prime}\). Note that \(y_{d},v_{d},a_{d}\) are the desired trajectories of the position, velocity and acceleration, respectively. In order to apply the backstepping technique, different steps are considered as explained in the Figure 4. Each step is based on the definition of a virtual input, error variable, stabilizing function and the use of Lyapunov functions. The subscript i in Figure 4 represents the number of equation related to the sub-system 1. Figure 4: Basic principles of the controller position. The expressions of \(\alpha_{i}(. )\) and \(u_{p}\) are only one possible choice in order to exactly compensate the terms that come from the measurements. The details of the different calculation steps are described below. Step 1: Let \(e_{1}\) be the deviation of \(y\) from its desired value: \(e_{1}=y-y_{d}\). The derivative of the position error is computed as: \(\dot{e}_{1}=\dot{y}-\dot{y}_{d}=v-v_{d}\). In this step, \(v\) is viewed as the input of the first equation of \((S_{1})\). Let us define \(\alpha_{0}(e_{1},v_{d})\) as a stabilizing function. Now, the aim is to design a feedback control \(v=\alpha_{0}(e_{1},v_{d})\) to stabilize the origin \(e_{1}=0\). \(\alpha_{0}\), which is chosen as:  
\[\alpha_{0}(e_{1},v_{d})=v_{d}-c_{1}e_{1}, \tag{12}\]  
where \(c_{1}\) is a positive constant: \(c_{1}[s^{-1}]>0\). The closed-loop subsystem becomes: \(\dot{e}_{1}=-c_{1}e_{1}\). For satisfying the requirement, the Lyapunov function of the first equation of \((S_{1})\) is chosen as \(V_{11}(e_{1})=\frac{1}{2}e_{1}^{2}\). Then, the derivative of the Lyapunov function along the solutions corresponds to:  
\[\dot{V}_{11}(e_{1})=e_{1}\dot{e}_{1}<0 \tag{13}\]  
Hence, the origin \(e_{1}=0\) is globally exponentially stable. Step 2: Since \(v\) is not an effective control of the system but rather a state variable, so a new error variable is introduced to represent the difference between this variable \(v\) considered as a virtual control and the stabilizing function \(\alpha_{0}(. )\), as defined in (12). Consider a new error variable \(e_{2}\) defined as the difference between the virtual input \(v\) and the associated stabilizing function as following:  
\[e_{2}=v-\alpha_{0}(e_{1},v_{d})=v-v_{d}+c_{1}e_{1}=\dot{e}_{1}+c_{1}e_{1} \tag{14}\]  
According to the variables \(e_{1}\) and \(e_{2}\), the \((y,v)\) subsystem is transformed to the following form:  
\[\left\{ \begin{array}{c}\dot{e}_{1}=-c_{1}e_{1}+e_{2}\\ \dot{e}_{2}=\ddot{e}_{1}+c_{1}\dot{e}_{1}=a-a_{d}+c_{1}(e_{2}-c_{1}e_{1})\\ \end{array} \right. \tag{15}\]  
Consider now \(\Delta p\) as the new virtual input of the system error described above. In this case, the Lyapunov function \(V_{12}\) is constructed by augmenting \(V_{11}\) with a quadratic term in the error variable \(e_{2}\) :  
\[V_{12}(e_{1},e_{2})=V_{11}(e_{1})+\frac{1}{2}(v-\alpha_{0}(e_{1},v_{d}))^{2}= V_{11}(e_{1})+\frac{1}{2}e_{2}^{2} \tag{16}\]  
Then, the derivative of \(e_{2}\) is given by:  
\[\dot{e}_{2}=\frac{S}{M}\bigg{[}\frac{1}{S}\Big{[}e_{2}(-b+c_{1}M)+e_{1}\Big{(} bc_{1}-kM-c_{1}^{2}M\Big{)}-(bv_{d}+ky_{d}+Mg+Ma_{d})\Big{]}+\Delta P\quad\bigg{]} \tag{17}\]  
Let us now define \(\alpha_{1}(e_{1},e_{2},y_{d},v_{d},a_{d})\) as a new stabilizing function.