# Vehicle Rollover Warning and Control Based on Attitude Detection and Fuzzy PID
## 2 Vehicle Dynamics Modeling
### Validation of the Vehicle Dynamics Model  
To study the anti-rollover control of vehicles, the developed mathematical model of the rollover must be validated. CarSim and MATLAB/Simulink joint simulations were used to select two typical conditions, namely the angular step-input condition and the double-shift condition, and the output results of the mathematical model were compared with the simulation results of CarSim to validate the model. The vehicle-specific parameters are listed in Table 1.  
The response curves of the yaw rate (Figure 2b) and lateral acceleration (Figure 2c) of the two vehicle models were obtained by loading the steering wheel angle step input condition with the steering wheel angle (front wheel angle) curve, as shown in Figure 2a for the 3-DOF dynamics model of the vehicle and the CarSim vehicle model, respectively. Following comparison, the response curves of the CarSim vehicle model fit well with the 3-DOF dynamics model of the car, and the CarSim model has higher accuracy compared with the 3-DOF dynamics model, where the CarSim model not only models the parameters in more detail compared with the 3-DOF dynamics model, but also considers the flexibility of the car frame, the suspension, and the tire more comprehensively in the modeling. CarSim also simulates the effect of road environment factors on the car driving on a real road surface, so it has higher accuracy. Owing to error accumulation and modeling accuracy, the relative errors of the two models keep increasing with time. However, the overall trend conforms with the actual law; thus, it is considered that the proposed CarSim vehicle model has a better response under the steering wheel stepping input conditions.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Name, Symbol/Legal Unit of Measure** & **Value** \\ \hline Overall vehicle mass \(m/\)kg & 2515 \\ Spring mass \(m_{s}/\)kg & 1780 \\ Wheelbase \(d/\)m & 1.478 \\ Distance from center of mass to front axle \(l_{r}/\)m & 1.485 \\ Distance from center of mass to rear axle \(l_{r}/\)m & 1.265 \\ Distance from center of mass to rear axle \(h/\)m & 0.484 \\ Inertia around \(z\)-axis \(l_{z}/\)kg\(\cdot\)m\({}^{2}\) & 3300 \\ Inertia around the \(x\)-axis \(l_{x}/\)kg\(\cdot\)m\({}^{2}\) & 1000 \\ Front-wheel lateral deflection stiffness \(k_{f}/\)(N/rad) & 44,400 \\ Rear-wheel lateral deflection stiffness \(k_{r}/\)(N/rad) & 43,600 \\ Supension equivalent damping coefficient \(c\) & 2000 \\ Supension Sway Stiffness \(k_{s}/\)(N\(\cdot\)m/rad) & 44,500 \\ Gravitational acceleration \(g/\)(m/s\({}^{2}\)) & 9.8 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Parameters of intelligent inspection vehicles for forest land.  
Figure 2: _Cont._  
The response curves of the yaw rate (Figure 3b) and lateral acceleration (Figure 3c) of the two vehicle models were obtained by loading the 3\(-\)DOF dynamics model and the CarSim vehicle model with double-shift line conditions and inputting the road offset curves, as shown in Figure 3a, respectively. Following the comparison, the response curves of the CarSim vehicle model and the 3\(-\)DOF dynamics model of the car were basically fit, and the CarSim vehicle model was shown to have higher accuracy. Combining the good responses of the CarSim vehicle model and the 3\(-\)DOF dynamics model for the above two operating conditions, it was concluded that the proposed CarSim vehicle model was suitable for most of the operating conditions and the modeling was accurate and effective.  
Figure 2: Step-input response curve of steering wheel angle: (**a**) steering angle curve; (**b**) yaw rate; and (**c**) lateral acceleration.  
Figure 3: Response curve of double shifting line: (**a**) road offset routes; (**b**) yaw rate; and (**c**) lateral acceleration.