## 4 Simulation and Experiment
### Simulation Verification
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Condition** & **Driving Condition** & **Failure Condition** \\ \hline F1 & Uniform linear motion 72 km/h & Left front wheel failure \\ F2 & Uniform linear motion 72 km/h & Left front and right front wheel failure \\ F3 & Uniform steering motion 72 km/h & Left front wheel failure \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Special condition of simulation verification. wheel fails, the steering wheel illustrated in Figure 2(b) responds immediately. Furthermore, it decreases the normal wheel motor torques at the right front and rear and increases the normal wheel motor torques of the left rear, as illustrated in Figure 2(a). Therefore, it ensures vehicle safety after the drive system fails and maintains the expected speed, as indicated in Figure 2(c), so it does not deviate from the expected trajectory illustrated in Figure 2(e). We can also observe from Figure 2(a),b that, during the entire fault-tolerant process, the adjustment ratio of the steering wheel angle is decreased with the drive system adjustment, thereby achieving the coordinated fault-tolerant result of the two systems. This provides an easy method for avoiding the overloading problem caused by using only the single actuator for fault tolerance after failure of the drive system and improving the vehicle safety. Table 6 below displays the vehicle speed and yaw rate and the later position deviation in the controlled and uncontrolled conditions after failure occurs. Figure 3: Simulation comparison with/without control under F1 condition. Therefore, it can be concluded that the algorithm achieves the proposed active fault-tolerant result; moreover, this method can control the vehicle deviation within 10 cm and speed error within 3%. Condition F2: The vehicle is traveling at a constant speed and the expected speed is 72 km/h. At the 8 th second, left front and right front motor failure occur at the same time. Without control, it is obvious from Figure 4c that the vehicle speed is reduced immediately when the motor fails but under the algorithm proposed in the paper, we can observe from Figure 4a that the controller increases the normal left rear and right rear motor torque to compensate for the lost motor torque of the left front and right front wheels. Therefore, it maintains the desired vehicle speed of 72 km/h, as the left front and right front wheels fail at the same time and the 4 WID electric vehicle failure mode is the opposite side double-wheel failure. As illustrated in Figure 4b,d, no additional steering wheel angle and yaw rate are generated in the lateral direction. From the above analysis, the effectiveness of the designed controller designed is verified. The controller ensures that the vehicle can maintain the desired speed after failure of the drive system and will not allow deviation from the established path. Table 7 displays the vehicle speed, yaw rate and later position deviation with control or without control after failure occurs. Condition F3: The vehicle is turning at a constant speed and the expected speed is 72 km/h. At the time of the 0 th second, left front wheel failure occurs. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Item** & **Without Control** & **With Control** \\ \hline Maximum yaw rate deviation (rad/s) & 0.224 & 0.002 \\ Maximum speed deviation of speed (km/h) & 2.75 & 1.2019 \\ Maximum lateral deviation/(m) & 15.5312 & 0.0964 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Statistical control effect under F1 condition. Figure 4: Simulation comparison with/without control under F2 condition. The vehicle turns at a constant speed of 72 km/h, as indicated in Figure 5c. At the 0 th second, left front motor failure occurs. Without control, as indicated in Figure 5e, it is clear that the vehicle exhibits an obvious deviation; thus, it is likely to induce traffic accidents. When the left front wheel fails under the control of the proposed algorithm, the steering wheel responds immediately, as illustrated in Figure 5b.