# Sliding Mode-Based Slip Control of Compact Electric Vehicle Truck for Varying Load and Yaw Rate
## 5 VMUG Based Sliding Mode Slip Controller Design  
To confirm the proposed desired yaw rate, a sliding mode controller, which is a universal robust controller, was designed. The VMUG based desired yaw rate designed in Chapter 3 was used as the control reference. The control block diagram is shown in Figure 9. The vehicle slip controller controls the brake so that the sum of the longitudinal force and the lateral force does not exceed the maximum allowable friction based on the Kamm's circle at the turning of the vehicle. The sliding mode plane for applying the brake is expressed as follows.  
\[s=(\gamma-\gamma_{d}) \tag{21}\]  
\[\dot{s}=-Ks\quad(K>0) \tag{22}\]  
Figure 8: Calculated desired yaw rate of Double-Lane-Change test: (a) desired yaw rate at 60 km/h, 0.85 \(\mu\), 0 kg cargo; (b) desired yaw rate at 60 km/h, 0.85 \(\mu\), 600 kg cargo.  
Figure 9: Block diagram of VMUG based sliding mode controller.  
The derivative value of the sliding mode plane s is rearranged, and the sliding mode surface obtained in the lateral dynamics is substituted. Rearranging for the derivative of yaw rate gives the following:  
\[\dot{s}=-Ks=-K(\gamma-\gamma_{d})=\dot{\gamma}-\dot{\gamma_{d}} \tag{23}\]  
\[\dot{\gamma}=\dot{\gamma_{d}}-K(\gamma-\gamma_{d}) \tag{24}\]  
If the sliding mode plane is applied to (5) for the yaw moment derived in Chapter 2, it is arranged as follows.  
\[M_{z}=I_{z}\left(\dot{\gamma_{d}}-K(\gamma-\gamma_{d})\right)+\left((I_{2} \theta_{r}-I_{xz})\ddot{\phi}-mh\big{(}\dot{v}_{x}+rv_{y}\big{)}\phi\right)-l_ {f}\Big{(}F_{yfl}+F_{yfr}\Big{)}+l_{r}\left(F_{yrl}+F_{yrr}\right) \tag{25}\]  
The yaw moment when both braking and driving force can be used, such as in the wheel motor, can be summarized as a control formula that uses all four wheels. However, it is simplified as follows because the brake control must be used in the general motor drive method.  
\[M_{InWheel}=-\frac{t_{f}}{2}\Big{(}F_{xfl}+F_{xrl}\Big{)}+\frac{t_{f}}{2}(F_{ xlr}+F_{xrr})+l_{f}\Big{(}F_{yfl}+F_{yfr}\Big{)}-l_{r}\Big{(}F_{yrl}+F_{yrr} \Big{)} \tag{26}\]  
\[M_{Brake}=-\frac{t_{f}}{2}\Big{(}F_{xfl}+F_{xrl}\Big{)}+l_{f}\Big{(}F_{yfl}+F_ {yfr}\Big{)} \tag{27}\]  
When the slip in the vehicle tire occurs, the control method changes due to the reduction of the maximum friction. This is not considered in the current study. In absence of the slip, the driving force and braking force are generated in proportion to the longitudinal force of the tire as follows.  
\[M_{Brake}=-\frac{t_{f}}{2}\Bigg{(}1+\frac{F_{zrl}}{F_{zfl}}\Bigg{)}F_{fl}+l_{f }\Bigg{(}1+\frac{F_{zfr}}{F_{fl}}\Bigg{)}F_{yfl} \tag{28}\]  
Since the braking force for brake control must be within [PERSON]'s circle, the maximum braking force can be calculated as follows.  
\[F_{xfl}^{2}+F_{yfl}^{2}-\mu^{2}F_{zfl}^{2}<0 \tag{29}\]  
\[F_{xfl}<\sqrt{-F_{yfl}^{2}+\mu^{2}F_{zfl}^{2}} \tag{30}\]  
The yaw moment using the sliding mode controller based on the controller formula (25) and the brake yaw moment (27) is obtained as follows.  
\[M_{z}=I_{z}\big{(}\dot{\gamma_{d}}-K(\gamma-\gamma_{d})\big{)}+\Big{(}(I_{2} \theta_{r}-I_{xz})\ddot{\phi}-mh\big{(}\dot{v}_{x}+rv_{y}\big{)}\phi\Big{)}-l_ {f}\Big{(}F_{yfl}+F_{yfr}\Big{)}+l_{r}\Big{(}F_{yrl}+F_{yrr}\Big{)}\]  
\[M_{Brake}=-\frac{t_{f}}{2}\Bigg{(}1+\frac{F_{zrl}}{F_{zfl}}\Bigg{)}F_{fl}+l_{f }\Bigg{(}1+\frac{F_{zfr}}{F_{fl}}\Bigg{)}F_{yfl}\]  
With the two equations, under the assumption that the ratio of the lateral force and the longitudinal force is maintained linear, if the braking force of the front-left wheel \(F_{xfl}\) for VDC is calculated, it can be reorganized and expressed as follows.  
\[F_{xfl}=\frac{1}{\frac{t_{f}}{2}\Big{(}1+\frac{F_{zrl}}{F_{zfl}} \Big{)}}\Big{(}l_{f}\Big{(}1+\frac{F_{zfr}}{F_{zfl}}\Big{)}F_{yfl}-I_{z}\big{(} \dot{\gamma_{d}}-K(\gamma-\gamma_{d})\big{)} \tag{31}\] \[\qquad\qquad-\Big{(}(I_{2}\theta_{r}-I_{xz})\ddot{\phi}-mh\big{(} \dot{v}_{x}+rv_{y}\big{)}\phi\Big{)}+l_{f}\Big{(}F_{yfl}+F_{yfr}\Big{)}-l_{r} \Big{(}F_{yrl}+F_{yrr}\Big{)}\]