# Fuzzy Sliding Mode Control of Vehicle Magnetorheological Semi-Active Air Suspension
## 4 Design of Sliding Mode Controller for MR Semi-Active Air Suspension
### Design of Sliding Mode Controller  
The design principle of the sliding mode controller (SMC) is to make the actual controlled system track the motion of the reference system and produce the sliding mode in the error dynamics system between the actual controlled system and the reference system. The error vector \(e\) of the air suspension system is defined as the velocity error, displacement error and integral of displacement error, and its matrix form can be expressed as follows:  
\[e=[ \begin{array}{cc}\dot{x}_{b}-\dot{x}_{b1}&x_{b}-x_{b1}&\int\left(x_{b}-x_ {b1}\right)\end{array} ]^{T} \tag{26}\]  
\[\dot{e}=[ \begin{array}{cc}\ddot{x}_{b}-\ddot{x}_{b1}&\dot{x}_{b}-\dot{x}_{b1 }&x_{b}-x_{b1}\end{array} ]^{T} \tag{27}\]  
Therefore, the error dynamics equation is defined as follows:  
\[\dot{e}=A(t)e+B(t)X+H(t)X_{r}+G(t)u \tag{28}\]  
In the design of switching the surface of the sliding mode variable structure, the pole assignment method is generally used to set the function of the switching surface. The output value of the controller is the controllable damping force, and thus its switching surface can be expressed as follows:  
\[s=cx[c_{1},c_{2},\cdots,c_{n}].[x_{1},x_{2},\cdots,x_{n}]^{T} \tag{29}\]  
Parameter \(n\) is 3, so the sliding mode switching surface function is as follows:  
\[s=ce \tag{30}\]  
The state Equation (29) is simplified as follows:  
\[\left[ \begin{array}{c}s_{1}\\ s_{2}\end{array} \right]=\left[ \begin{array}{cc}0&1\\ -c_{1}&-c_{2}\end{array} \right]\left[ \begin{array}{c}e_{1}\\ e_{2}\end{array} \right] \tag{31}\]  
All control points of sliding mode motion must have good dynamic quality and be asymptotically stable when entering the sliding mode switching surface. Equation (31) is the motion differential equation of the sliding mode, and its characteristic equation is as follows:  
\[D(\lambda)=\lambda^{2}+c_{2}\lambda+c_{1} \tag{32}\]  
The values of \(c_{1}\) and \(c_{2}\) can be obtained by making the characteristic root equal to the given pole. The transfer function in standard form for a second-order system is as follows:  
\[\Phi(s)=\frac{Y(s)}{U(s)}=\frac{{\omega_{n}}^{2}}{s^{2}+2\xi\omega_{n}s+{ \omega_{n}}^{2}} \tag{33}\]The two closed-loop poles of the system are \(s_{1,2}=-\xi\omega_{n}\pm j\omega_{n}\sqrt{1-\xi^{2}}\). Only when the pole is on the left half of the complex plane does the control system have partial oscillations. The desired number of poles \(n\) is set as 3. Among them, the dynamic performance of the control system is determined by the dominant pole, and the far pole has little influence on it. It can be obtained that the characteristic root of the system is \(-3.9\pm 5.2j\), under the condition of \(\sigma\leq 15\%\), \(t_{p}\leq 0.7\), \(\omega_{n}=6.5\), and \(\xi=0.6\). Then, \(c=[42.25,\,7.8,\,1]\) can be obtained. Therefore, the switching surface function of MR semi-active air suspension is as follows:  
\[s=\big{[}\ \ (\dot{x}_{b}-\dot{x}_{b1})\ \ \ c_{1}(x_{b}-x_{b1})\ \ \ c_{2}(\int\ (x_{b}-x_{b1})\ \ )\big{]}^{T} \tag{34}\]  
According to Equation (30), it can be obtained as follows:  
\[\dot{s}=c\dot{e}=cA(t)e+cB(t)X+cH(t)X_{r}+cG(t)u \tag{35}\]  
From the above, it can be developed as follows:  
\[U=(cG)^{-1}[\dot{s}-(cA(t)e+cB(t)X+cH(t)X_{r}] \tag{36}\]  
To minimize the error between the actual controlled model and the reference model, let \(\dot{s}\) be 0, and Equation (36) can be deduced as follows:  
\[U=(cG)^{-1}\big{[}(cA(t)e+cB(t)X+cH(t)X_{r}] \tag{37}\]  
The equivalent output damping force of the sliding mode controller can be obtained as follows:  
\[U_{eq}=(c_{0}-c_{1}m_{b})(\dot{x}_{b}-\dot{x}_{b1})+(k_{a}-c_{2}m_{w})(x_{b}- x_{b1})-k_{a}(x_{w}-x_{w1})-c_{0}(\dot{x}_{w}-\dot{x}_{w1}) \tag{38}\]  
To improve sliding mode motion, the reaching law is defined as follows:  
\[\dot{s}=-\varepsilon\cdot\text{sgn}(s),\ (\varepsilon>0) \tag{39}\]  
where sgn(s) is a sign function, and \(\varepsilon\) is the rate of control point approaching the switching surface, which affects the system stability.