# Hybrid Model Predictive Control of Semiactive Suspension in Electric Vehicle with Hub-Motor
## 3 Hybrid Model Predictive Controller Design
Excessive suspension dynamic deflection can lead to an increase in the probability of hitting a limit during its movement, so it is necessary to constrain the suspension dynamic deflection. Suspension limit deflection is typically \(\pm\)60 mm, and the probability of the suspension hitting the limit is 0.3% when the suspension limit deflection is three times larger than the suspension dynamic travel. Therefore, it is necessary to limit the suspension dynamic deflection to \(\pm\)20 mm. For the damping force, the direction of the damping force must be the same as the direction of the relative speed of the suspension and must also meet the maximum damping force constraint. The constraints are shown in the following equation:  
\[ \begin{array}{rl}-20\;\text{mm}\leq x_{4}(k)\leq 20\;\text{mm}\\ 0\leq u(k)(x_{1}(k)-x_{2}(k))\leq(c_{max}{-}c_{min})(x_{1}(k)-x_{2}(k))^{2} \end{array}  \tag{25}\]  
Since both pavement excitation and unbalanced electromagnetic forces are unmeasurable, the chosen predictive equations are as follows:  
\[\left\{ \begin{array}{rl}x(k+1)=&A_{d}x(k)+B_{du}u(k)\\ y(k)=&C_{d}x(k)+D_{du}u(k)\end{array} \right. \tag{26}\]  
The optimization problem can be expressed as the following equation:  
\[ \begin{array}{rl}\text{min}\;J=&\sum_{k=1}^{N}y^{\prime}(k)Qy(k)+\sum_{k=1 }^{N}u^{\prime}(k)Ru(k)\\ \text{Subject to}\left\{\begin{array}{rl}x(k+1)&=Ax(k)+B_{u}u(k)\\ y(k)&=Cx(k)+D_{u}u(k)\\ u(k)(x1(k){-}x2(k))\geq 0\\ 0\leq u(k)(x1(k)-x2(k))\leq(c_{max}{-}c_{\text{min}})(x1\left(k\right)-x2(k) )^{2}\end{array}\right.\end{array}  \tag{27}\]  
In the above constraint, the computational equation used for the constraint is related to the logical relationship between state variables, so not only the magnitude of the constraint has to be satisfied, but the correct constraint also has to be switched according to the logical relationship between the state variables. It is clear that traditional linear MPC does not handle these types of constraints. In order to better deal with the above constraints, a hybrid model in the damping adjustment process needs to be established. Due to the complex engineering background, there is no unified way to construct hybrid system models for different research fields. The main models currently used to describe hybrid systems are: stepwise structural hybrid system models, hybrid automata models, piecewise affine models, mixed logical dynamical (MLD) models and linear complementary models [33]. The MLD model is a modeling framework for hybrid systems proposed by [PERSON] and [PERSON] in 1999, which can effectively solve the problem of modeling continuous dynamic processes coupled with discrete events in hybrid systems, and at the same time, with certain theoretical derivations, the MLD model can also be transformed into other model structures of hybrid systems, thus it has a strong generality. The MLD-based model can effectively handle the integrated problem of optimizing control laws for hybrid systems. Therefore, in this paper, the MLD modeling approach was used to model the mixing dynamics in the damping regulation process. The standard form of the MLD model is as follows [34]:  
\[\left\{ \begin{array}{l}x(k+1){=}Ax(k){+}B_{1}u(k){+}B_{2}\delta(k){+}B_{3}z( k)\\ y(k){=}\operatorname{Cx}(k){+}D_{1}u(k){+}D_{2}\delta(k){+}D_{3}z(k)\\ E_{2}\delta(k){+}E_{3}z(k)\leq E_{1}u(k){+}E_{3}x(k){+}E5\end{array} \right. \tag{28}\]  
where \(x\) is the state variable, \(y\) is the output variable, \(u\) is the system input and \(\delta\) is the auxiliary variable. \(x,y,u\) and \(\delta\) can be continuous and logical variables. Two logical and continuous auxiliary variables need to be introduced in order to accurately describe the nonlinear constraints. \[ \begin{array}{l}\left[\delta_{v}{=}\ 1\ \right]\leftrightarrow\left[\dot{z }_{s}-\dot{z}_{us}\right]\geq 0\\ \left[\delta_{u}{=}\ 1\ \right]\leftrightarrow\left[u\geq 0\right]\\ \left[\delta_{v}{=}\ 1\ \right]\rightarrow\left[\delta_{u}{=}\ 1\right]\\ \left[\delta_{v}{=}\ 1\ \right]\rightarrow\left[\delta_{u}{=}\ 0\right]\end{array}