# Control Design and Validation for Floating Piston Electro-Pneumatic Gearbox Actuator
## 3 Model-Based Controller Development
### LQR Method
\begin{bmatrix}\frac{-\kappa A_{MP1}v_{MP}}{V_{ch1}}&0&\frac{- \kappa A_{MP1}^{2}v_{MP}p_{ch1}}{V_{ch1}^{2}}&\frac{-\kappa A_{MP1}v_{MP}}{V_{ ch1}}\\ 0&\frac{\kappa(A_{MP2}+A_{FP})v_{MP}}{V_{ch2}}&\frac{-\kappa(A_{MP2}+A_{FP})^{2}v_{MP}p_{ch2}}{V_{ ch2}^{2}}&\frac{-\kappa A_{MP2}v_{MP}}{V_{ch2}}\\ 0&0&1\\ \frac{A_{MP1}}{m_{MP}}&\frac{-(A_{MP2}+A_{FP})}{m_{MP}}&0&\frac{-d_{II}}{m_{MP}} \end{bmatrix}  \tag{30}\]\[\mathbf{B}= \begin{bmatrix}\frac{\kappa R_{tip}T_{lim1}}{V_{cil}}&0\\ 0&\frac{\kappa R_{tip}T_{lim2}}{V_{cil2}}\\ 0&0\\ 0&0\end{bmatrix}  \tag{31}\]  
\[\mathbf{C}= \begin{bmatrix}1&0&0&0\\ 0&1&0&0\\ 0&0&1&0\end{bmatrix}  \tag{32}\]  
It is shown that, due to the applied simplifications, values of \(A_{FP}\), \(x_{FP}\) (through them \(V_{cil1}\) and \(V_{cil2}\)), and \(m_{MP}\) depend on the sign of the Main piston's position, whereas \(T_{lim1}\) and \(T_{lim2}\) depend on the signs of the mass flow rates. Assuming the same ambient and supply temperature, the temperature of the flowing air changes as follows. \[T_{intv}= \begin{cases}T_{cH},&\text{if }\frac{dm_{ch}}{dt}<0\\ T_{amb},&\text{otherwise}\end{cases}  \tag{33}\]  
With the given assumptions and simplifications, the state-space representation describing the actuator's behavior can be written in a single form as (30)-(32), but the values of these matrices depend on the actual states indirectly through (19), (20), (21) and (33), which results in two versions of \(\mathbf{A}\) and four versions of \(\mathbf{B}\) matrices; therefore, it has eight hybrid states, where the actual state is determined by the mass flow rates and the Main piston position. Besides, the state-space representation also depends directly on the state variables, thus the system is a quasi-linear parameter varying (qLPV) system. The given representation is basically a grid-based qLPV model, where the model is given as a set of LTI models defined at fix parameter values. The state-space representation of an LPV system takes the following form,  
\[\dot{\underline{x}}=\mathbf{A}(\underline{\rho}(t))\underline{x}+\mathbf{B}( \underline{\rho}(t))\underline{u} \tag{34}\]  
\[\underline{y}=\mathbf{C}(\underline{\rho}(t))\underline{x}, \tag{35}\]  
where \(\underline{\rho}(t)\) is a time-dependent vector of the scheduling parameters. Such a system is called a quasi-LPV system if the scheduling parameters depend on the actual states. In the presented model, the scheduling parameter vector contains the four state variables and the temperatures of the flowing air. While the presented state-space model is the continuous-time representation, it must be discretized in time. The linear-quadratic algorithm implemented in the MIL environment performed the linearization in the actual state and calculated the feedback matrix online, which had to be modified for the embedded application, as shown in Section 4.3. It is conceivable that in case of the state-space representation, the condition of the BIBO stability is not met, while on the real system, only the mechanical constraints can guarantee stability and only in the three dedicated positions (H, L, and N). In H and L positions, the cylinder housing ensures stability. The main piston can be stabilized in N only under low pressure differences and low speed. Figure 6 shows the architecture of the LQR controller. Q matrix is used to weight the state error of the system, while R penalizes the control signal; therefore, it affects the number of solenoid valve switches. Increasing Q matrix weight helps with the shift time, but it increases overshoot and the collision speed due to the delay in the system. To guarantee the stability of the system in the dedicated positions, a relatively expensive control strategy is used. In the case of cheaper control strategies, the controller tries to load the corresponding chamber until it is too close to the request. As the contact is ignored in the state-space representation, it predicts an overshoot and during its compensation yields a highly oscillating piston position.