# A Novel Optimal Control Strategy of Four Drive Motors for an Electric Vehicle
## 2 Simulation Platform and Optimal Energy Management
### Optimal Energy Management of the Four-Wheel-Side Motors  
The resolution of the ECMS method is limited by the size of the grid established and the hardware equipment used. If the range between the parameter grids is too large, the conditions calculated may not precisely fall on the grid points of the multi-dimensional table. In such cases, the solution for that condition will be obtained using the built-in interpolation method within the system. By using this method and considering all factors in the search, it is possible to find the global optimum solution. Based on the optimal efficiency method of four-wheel-side motors, this study applies the ECMS theory to obtain the optimal power distribution ratio (PR), presenting the battery power variation in the form of equivalent fuel consumption. The vehicle specifications are shown in Table 1. The simulated whole-vehicle structure diagram is shown in Figure 6. The demanded vehicle velocity is first provided by the driving mode model. The actual vehicle velocity is then calculated in the vehicle dynamics model. The difference in velocity between the two is determined to carry out PI control. In this setup, the PI controller controls the forward torque command to the energy management model for power distribution of the four-wheel-side motors. The negative torque command controls the brake torque to the vehicle dynamics model for vehicle braking. The energy management model calculates, based on the actual rotation speed of the vehicle dynamics model, using the optimal power distribution torque command to operate each motor. Finally, the output from the four-wheel-side motors is sent to the entire vehicle dynamics model for the actual vehicle velocity. The output torque of the left front wheel motor is related to the demanded torque and varies linearly with the power distribution ratio of the first gear, as shown in Formula (12):  
\[T_{m,FL}=\alpha\times T_{d} \tag{12}\]  
where \(T_{m,FL}\) is the output torque of the left front wheel motor; \(\alpha\) is the power distribution ratio of the first gear; \(T_{d}\) is the demanded torque. The output torque of the right front wheel motor is related to the demanded torque and varies linearly with the power distribution ratio of the second gear, as shown in Formula (13):  
\[T_{m,FR}=\beta\times T_{d} \tag{13}\]  
where \(T_{m,FR}\) is the output torque of the right front wheel motor; \(\beta\) is the power distribution ratio of the second gear. Figure 5: Diagram of the HIL system architecture. The output torque of the left rear wheel motor is related to the demanded torque and varies linearly with the power distribution ratio of the third gear, as shown in Formula (14):  
\[T_{m,RL}=\gamma\times T_{d} \tag{14}\]  
where \(T_{m,RL}\) is the output torque of the left rear wheel motor; \(\gamma\) is the power distribution ratio of the third gear. The output torque of the right rear wheel motor is determined by subtracting the torques of the other three wheels from the total demanded torque, as indicated in Formula (15):  
\[T_{m,RR}=(1-\alpha-\beta-\gamma)\times T_{d} \tag{15}\]  
where \(T_{m,RR}\) is the output torque of the right rear wheel motor. Formulas (12)-(15) are consolidated into Formula (16):  
\[T_{m,FL}+T_{m,FR}+T_{m,RL}+T_{m,RR}=\alpha T_{d}+\beta T_{d}+\gamma T_{d}+T_{d} -\alpha T_{d}-\beta T_{d}-\gamma T_{d} \tag{16}\]  
Formula (16) is derived by simplifying Formula (17):  
\[T_{d}=T_{m,FL}+T_{m,FR}+T_{m,RL}+T_{m,RR} \tag{17}\]  
Measurement data and physical constraint input: Data from real vehicle examples (Escape 2002) of four types of wheel-side motors and lithium battery groups were tested and needed to be imported into the program, formed into one-dimensional or two-dimensional tables. This included demanded torque, motor speed, and power distribution ratios. Limitations included the relationship between the maximum output torque and speed of the four-wheel-side motors. Based on the quantified data, optimization algorithms can be implemented.