Design of Optimized Energy Management Strategy for All-Wheel-Drive Electric Vehicles

: The performance of the all-wheel-drive electric vehicle is inseparable from the energy management strategy (EMS). An outstanding EMS could extend the cycling mileage, coordinating the power output of the battery and exerts the advantage of the motor comprehensively. However, the current EMS has poor performance in real-time, and this paper proposes the dynamic programming coordination strategy (DPCS) to solve the problem. Firstly, the EMS based on a rule-based control strategy (RBCS) is applied in a different driving cycle. Secondly, the dynamic programming algorithm (DP) is proposed in the process. The DPCS cooperated the advantage of RBCS and DP, extracting the boundary parameters along with the demand power and vehicle speed. Finally, the number of motors joined in the driving condition is elucidated and the method obtains the optimal torque split ratio through a partly-known driving cycle. By incorporating the thought of a basis of rules, the DPCS determines the torque of each motor that conﬁrm the motor working in an efﬁcient range that incorporates the mind of dynamic programming. The method is validated through the simulation. The results show that the strategy can signiﬁcantly improve the mileage of the driving cycle, with comprehensive performance in energy distribution and utilization.


Introduction
With the development of battery technology, pure electric vehicles occupy an increasingly large proportion of the way people travel nowadays. The electric configuration can briefly be divided into driving by front motor, rear motor, and driving by four in-wheel motor. The difference in each vehicle configuration is that the power and the control strategy used in each model are different. Electric vehicles (EVs), with the benefit of low cost and zero-emission [1,2], are widely used. In addition, the EV has the advantage of high torque reserve at low speed in the driving system, which can realize the shift frequently switch in the start-stop mode and with the recovery of braking energy [3][4][5].
The all-wheel-drive electric control strategy (EMS) is central, and an excellent EMS is the foundation of the EV's comprehensive performance. The EMS ensures the optimal torque distribution in front and rear shifts, including driving and braking mode. Many methods have been studied in the EV control process. The dominant thoughts of energy management can be classified into rule-based EMS and optimization-based EMS [6,7]. The rule-based control strategy is widely used in the vehicle control unit (VCU) for its simplified calculation in VCU. However, the rule-based EMS of the determined threshold has poor adaptability to dynamic conditions. In recent years, more attention has been paid to EVs' energy management control strategy. For example, some researchers proposed a genetic algorithm to optimize the torque distribution ratio considering constraints of motor characteristics [8]. Other researchers used the least-squares method to get the control logic of the in-wheel motor [9]. Xie [10] coupled the following distance and power distribution of the electric truck in a model predictive controller and co-optimized the safety and energy efficient range. The method can significantly improve the mileage of the driving cycle, with comprehensive performance in energy distribution and utilization.

Power Flow Modeling
On the basis of the balance of vehicle longitudinal dynamics, traction required by the vehicle F(t) is used to overcome rolling resistance, air friction, and pushing vehicle acceleration. Then, the formula expressing the dynamic model is presented as Equation (1). The power comes from the motors and transmits to wheels, respectively. The expression of the transmission process is employed as the following formula, and the parameters of the PHEV are shown in Table 1. PMSM works as a tractor motor, the PMSM power Pm can be calculated by Equation (7). Meanwhile, when the PMSM works as a generator, Pg could be obtained by Equation (8).
where η m and η g are PMSM efficiency while PMSM works as tractor motor or generator, respectively. η m and η g could be obtained through previous experiments. The PMSM efficiency diagram is shown in Figure 1.
In PHEV, the driving mode or braking energy recovery mode corresponds to PMSM working as a tractor motor or generator, respectively. The PMSM model is established through experiments, in which PMSM motor data that indicate the torque corresponds to different speeds calculated as motor efficiency are measured by the test platform. When PMSM works as a tractor motor, the PMSM power Pm can be calculated by Equation (7). Meanwhile, when the PMSM works as a generator, Pg could be obtained by Equation (8).
where m η and g η are PMSM efficiency while PMSM works as tractor motor or generator, respectively. m η and g η could be obtained through previous experiments. The PMSM efficiency diagram is shown in Figure 1. Power battery is established through the Rint model [19], and the battery is composed of a generous battery cell. According to Ohm's law, the diagram of the equivalent circuit diagram is shown in Figure 2. The open-circuit voltage and current are expressed in:  Power battery is established through the Rint model [19], and the battery is composed of a generous battery cell. According to Ohm's law, the diagram of the equivalent circuit diagram is shown in Figure 2. The open-circuit voltage and current are expressed in:

Power System Modeling
The source of power comes from permanent magnet synchronous motors (PMSM). In PHEV, the driving mode or braking energy recovery mode corresponds to PMSM working as a tractor motor or generator, respectively. The PMSM model is established through experiments, in which PMSM motor data that indicate the torque corresponds to different speeds calculated as motor efficiency are measured by the test platform. When PMSM works as a tractor motor, the PMSM power Pm can be calculated by Equation (7). Meanwhile, when the PMSM works as a generator, Pg could be obtained by Equation (8).
where m η and g η are PMSM efficiency while PMSM works as tractor motor or generator, respectively. m η and g η could be obtained through previous experiments. The PMSM efficiency diagram is shown in Figure 1. Power battery is established through the Rint model [19], and the battery is composed of a generous battery cell. According to Ohm's law, the diagram of the equivalent circuit diagram is shown in Figure 2. The open-circuit voltage and current are expressed in:  carries on at an ambient temperature, so the influence of temperature on SOC is ignored. According to Equation (9), the battery power of output can be obtained: (10) where the R i is initial resistance of the battery. V BT (SOC, I BT ) is battery voltage that applies to load, and I BT is output current of the battery which could be calculated by: (11) ment carries on at an ambient temperature, so the influence of temperature on SOC i ignored. According to Equation (9), the battery power of output can be obtained: where the i R is initial resistance of the battery. VBT (SOC, IBT) is battery voltage that ap plies to load, and IBT is output current of the battery which could be calculated by: Thus, the state equation of SOC is presented as follows: where the Q0 is the Maximum capacity of the battery, SOC(k) is the SOC of k at this moment The configuration of the four in-wheel motor EV is shown in Figure 4. The front-lef and right motor are controlled by the front motor control unit (F-MCU). The configura tion of the rear-left and right motor is the same as the front. The EV's control unit (VCU is connected with F-MCU and R-MCU by CAN bus.  There are three driving forms in driving mode, front driving mode, rear drivin mode, and coupling operation of front and rear drive mode, respectively. Thus, Thus, the state equation of SOC is presented as follows: where the Q0 is the Maximum capacity of the battery, SOC(k) is the SOC of k at this moment. The configuration of the four in-wheel motor EV is shown in Figure 4. The front-left and right motor are controlled by the front motor control unit (F-MCU). The configuration of the rear-left and right motor is the same as the front. The EV's control unit (VCU) is connected with F-MCU and R-MCU by CAN bus. The open voltage is related to state-of-charge (SOC). Furthermore, the voltage of the open circuit VOC is measured with the battery discharge along with different SOC. The battery's open-circuit voltage corresponding to SOC is shown in Figure 3. The experiment carries on at an ambient temperature, so the influence of temperature on SOC is ignored. According to Equation (9), the battery power of output can be obtained: where the i R is initial resistance of the battery. VBT (SOC, IBT) is battery voltage that applies to load, and IBT is output current of the battery which could be calculated by: Thus, the state equation of SOC is presented as follows: where the Q0 is the Maximum capacity of the battery, SOC(k) is the SOC of k at this moment. The configuration of the four in-wheel motor EV is shown in Figure 4. The front-left and right motor are controlled by the front motor control unit (F-MCU). The configuration of the rear-left and right motor is the same as the front. The EV's control unit (VCU) is connected with F-MCU and R-MCU by CAN bus.  There are three driving forms in driving mode, front driving mode, rear driving mode, and coupling operation of front and rear drive mode, respectively. Thus, There are three driving forms in driving mode, front driving mode, rear driving mode, and coupling operation of front and rear drive mode, respectively. Thus, When the VCU receives the signal of the brake pedal of the four in-wheel motors working together in breaking mode, the braking power is given by Equation (15). According to the demand level of the brake pedal, the electric braking will work firstly, and once the demand level of the breaking pedal exceeds 30% of all ranges, the mechanical braking and electric braking will work together to maintain braking force. Because electric braking can recover electric energy, and the motor can transfer mechanical energy to electrical energy, then electric breaking can improve the utilization of energy.
where the f fb (t) and f rb (t) are the front and rear distribution rate of braking force, respectively. L r is the distance between the rear axle and center of mass, L is the distance between the rear and front wheels. H is the height of the center of the mass from the ground. a(t) is the deceleration in breaking. c g is distribution ratio between breaking torque of front and rear axle. Where the P gen is power generation, T gen (t) is the braking torque produced by the motor, T mec (t) is mechanical braking torque.
In the condition of normal operation and without considering other electrical devices, the torque distribution coefficient β is defined as the ratio of front axle torque to driving torque, such as Equation (19).
In real working conditions and modeling, we make the following consumptions for simplicity [8].

1.
The two front and rear in-wheel motors have no relative slip in synchronous rotation.

2.
The two front and rear in-wheel motors' configuration is the same, but the output torque depends on applications.
Based on those assumptions and considering longitudinal dynamics in this paper, when the rear or front motor work singularly, the assumptions can be expressed as follows. In the case of front and rear motor working together, the equation is expressed as: So the efficiency objective function can be acquired by the following equation: In the whole driving cycle, the control vector is defined as torque split ratio u β (k), and u c (k), indicating which motor is working. Further, in the whole drive, the time interval is selected as 1s, so the discrete-time state equation is given by (25).
where X(k) is the system state vector, U(k) is the system control vector. In the offline optimization process of all-wheel-drive (AWD), energy management is carried out in different driving conditions. For example, the Manhattan bus driving cycle, West Virginia Suburban driving cycle, and typical cities in China driving cycles. With the help of the vehicle longitudinal dynamic theory, the driven torque can be calculated. Therefore, the system state vector can be confirmed as battery SOC and motors' state.
For four in-wheel motor independence drives, the input torque consists of rear motors and front motors torque, and the power split ratio which is defined as torque split ratio. Therefore, the control vector could be simplified by So, the optimal energy management strategy is described as finding optimal control vector U(k) to minimize cost function Jd and sustain relatively higher SOC in terminal driving. To insurance security and drivability in the driving cycle, the penalty function of torque increases sharply, and motor temperatures are considered in the cost function.
The m is n plenty factors in the optimal process, and Q(k) is the temperature predictor function which is measured in the experiment of different working conditions and recorded. When the temperature of the motor exceeds the threshold, the front driving mode will be replaced by the rear driving mode, corresponding to this condition, when the vehicle working in all driving modes the power of the motor will be limited.
Based on Bellman's optimization thought, all processes of optimization could be decomposed into a serious minimum optimization problem. The sub-problems are each step of optimal decision, where all processes of optimization control vector U * (k) consist of the stage of optimal control vector u(k).
In all optimization, procedures are described as Equations (31) and (32) Appl. Sci. 2021, 11, 8218 8 of 14 Step N − 1: Step k(0 < k < N − 1): where the J * k (X(k)) is the optimal function of indicator, the optimal control strategy is solved by the above formula in the reserve method. In each moment k, there is always a control vector U * (k) to optimal indicator function. All processes of dynamic programming are shown in Figure 5. The optimal control vector U * (k) including different driving cycles is determined through objective function and record with the help of state-space updating.
In all optimization, procedures are described as Equations (31)-(32) Step N − 1: Step k(0 < k< N − 1): where the ( (k)) k J X * is the optimal function of indicator, the optimal control strategy is solved by the above formula in the reserve method. In each moment k, there is always a control vector (k) U * to optimal indicator function. All processes of dynamic programming are shown in Figure 5. The optimal control vector (k) U * including different driving cycles is determined through objective function and record with the help of state-space updating. To ensure that each component is working safely, the constraint condition of the part operating status should be created as the following constraints:  To ensure that each component is working safely, the constraint condition of the part operating status should be created as the following constraints: In the equation, ω m,min and ω m,max are the motors minimum and maximum speed, respectively. T f−min and T f−max are front shaft torque in the current speed and SOC(k) corresponds to the minimum and maximum torque which consists of two motors. T r−min , T r−max are the same configuration with front shaft torque. SOC(t) is the current state of charge, SOC min and SOC max are the healthy range of the battery. In the electric vehicle driving mode, the electric energy should make full use by energy management, and in the starting point and terminal point, SOC is described by

Rule-Based Control Strategy
The state of the battery packs is critical in the process of the vehicle life cycle. To measure the charge of the battery, the threshold is defined as soc low , soc cs , soc CD and soc high , respectively. The operation can be divided into three modes which are front driving mode, front-rear driving mode, and all-wheel driving mode, separately. All of the driving modes supply energy by the battery system, so according to the driving condition, allocating the energy properly is essential in extending the driving range. In a rule-based control strategy, the torque demand (P d ) of the system is converted by the operating percentage of the accelerator pedal. In the default model, the torque demand is less than twice the rated torque of the motor, and the vehicle operates in fronting mode. With the increase in the demand power, the rear motors participate in the cycle gradually. When the vehicle demands instantaneous power dramatically or the four-wheel is in tough conditions, the vehicle will carry out in the all-wheel driving mode. The constriction of different operation models of rule-based energy management strategy is presented in Table 2.

All-Wheel-Driving Optimal Torque Distribution Based on DP
In the research of torque distribution problem, the objective function is given by (24) which is affected by motor torque T f , rotating speed w, and motor efficiency η. The solving torque distribution process is a discontinuous and constrained issue. In the previous study, quadratic programming (QP) was used to solve the problem, which has the defect of much computation, where it is easy to fall into a locally optimal solution [20]. Thus, in the online optimal process, the computation and feasibility algorithm in the vehicle control unit should be considered. In the usual driving cycle, cycle conditions can be defined as traffic congestion in which the motor works in common instantaneous high torque, and in suburban conditions where the motor works in rare start-stop points, and in the high-speed condition where the rear and front motor work in the cooperation mode. In the offline dynamic programming process, the boundary conditions that switch in actual operation can be defined. Simultaneously, the boundary condition parameters are recorded in the embedded system.

Optimizing Process and Results
In the driving cycle of traffic congestion, suburban conditions and high-speed conditions are shown in Figure 6. To display the different power demands at various speeds, the three typical driving conditions are used in parameter extraction with the help of a rule-based control strategy (RBCS). Figure 7 is the results of optimizing the parameter extraction of the rule-based strategy for three driving cycles. In a single motor driving mode, the vehicle demand power increases with speed linearly. In the single motor mode, two-motor coordination mode, and three-motor coordination mode, the demand power is separated from each other in a low-speed range (25 km/h). The vehicle in low-speed acceleration requires less power than high-speed acceleration. Along the longitudinal axis of vehicle speed, the working vehicle slows down or slides the vehicle demand to no power, and in this condition, all-wheel driving motors have no output power. Thus, in practical application, the rapid prototyping controller will be incorporated in the vehicle control unit (VCU) which in rule-based control strategy (RBCS) or dynamic programming coordination strategy (DPCS), the threshold of speed (25 km/h) and accelerator pedal opening indicate that the power demand will be incorporated in the control strategy. and in this condition, all-wheel driving motors have no output power. Thus, in p application, the rapid prototyping controller will be incorporated in the vehicle con (VCU) which in rule-based control strategy (RBCS) or dynamic programming coord strategy (DPCS), the threshold of speed (25 km/h) and accelerator pedal opening that the power demand will be incorporated in the control strategy.

Results and Discussion
To overcome the shortcoming of rule-based energy management strategy in a tation to dynamic driving cycles, the DPCS combines the advantage of rule-based dynamic programming. The dynamic programming coordination strategy (DPCS) c determine the number of motors joined c u (k) firstly, by incorporating the thought rule basis. Then, the DPCS determines the torque of each motor which confirms tha motor is working efficiently, incorporating the mind of dynamic programming. The timization process of each step is shown in Figure 8. Figure 9 is the SOC curve of a typ city in China's driving cycle under different control strategies. It donates, in DPCS m the joined motor working in an efficient range, with the motor consuming less pow maintain the vehicles; thus, the SOC decreases slower than RBCS mode.

Results and Discussion
To overcome the shortcoming of rule-based energy management strategy in adaptation to dynamic driving cycles, the DPCS combines the advantage of rule-based and dynamic programming. The dynamic programming coordination strategy (DPCS) could determine the number of motors joined u c (k) firstly, by incorporating the thought of a rule basis. Then, the DPCS determines the torque of each motor which confirms that the motor is working efficiently, incorporating the mind of dynamic programming. The optimization process of each step is shown in Figure 8. Figure 9 is the SOC curve of a typical city in China's driving cycle under different control strategies. It donates, in DPCS mode, the joined motor working in an efficient range, with the motor consuming less power to maintain the vehicles; thus, the SOC decreases slower than RBCS mode.

Results and Discussion
To overcome the shortcoming of rule-based energy management strategy in adaptation to dynamic driving cycles, the DPCS combines the advantage of rule-based and dynamic programming. The dynamic programming coordination strategy (DPCS) could determine the number of motors joined c u (k) firstly, by incorporating the thought of a rule basis. Then, the DPCS determines the torque of each motor which confirms that the motor is working efficiently, incorporating the mind of dynamic programming. The optimization process of each step is shown in Figure 8. Figure 9 is the SOC curve of a typical city in China's driving cycle under different control strategies. It donates, in DPCS mode, the joined motor working in an efficient range, with the motor consuming less power to maintain the vehicles; thus, the SOC decreases slower than RBCS mode.   The vehicle demand power can be divided into front power and rear power, such as Equation (19). The torque distribution coefficient β is defined as the ratio of front axle torque to driving torque, in DPCS mode or RBCS mode, and the torque distribution coefficient is presented in Figure 10. In the RBCS mode, the vehicle works in three-motor coordination or all-wheel drive along with the vehicle demand power, while in the DPCS mode, with the increase in vehicle power or decrease in vehicle power, the front motor is always working, indicating that the high torque of the front motor is often provided. Combined with Figure 11, in the DPCS mode, the motor works in an efficient range correspondingly. As shown in Figure 11, the two rear motors work in the same output power, so the rear motor efficiency represents the dynamic programming action effect. In the RBCS mode, the rear motor maintains the efficiency of 0.3 to provide the required power of the vehicle, but in the DPCS mode, the required power of the vehicle is supplied in front motors. Thus, in the DPCS mode, the motor rarely works in inefficient areas.  The vehicle demand power can be divided into front power and rear power, such as Equation (19). The torque distribution coefficient β is defined as the ratio of front axle torque to driving torque, in DPCS mode or RBCS mode, and the torque distribution coefficient is presented in Figure 10. In the RBCS mode, the vehicle works in three-motor coordination or all-wheel drive along with the vehicle demand power, while in the DPCS mode, with the increase in vehicle power or decrease in vehicle power, the front motor is always working, indicating that the high torque of the front motor is often provided. Combined with Figure 11, in the DPCS mode, the motor works in an efficient range correspondingly. As shown in Figure 11, the two rear motors work in the same output power, so the rear motor efficiency represents the dynamic programming action effect. In the RBCS mode, the rear motor maintains the efficiency of 0.3 to provide the required power of the vehicle, but in the DPCS mode, the required power of the vehicle is supplied in front motors. Thus, in the DPCS mode, the motor rarely works in inefficient areas.
Appl. Sci. 2021, 11, 8218 12 Figure 9. SOC curve of a typical city in China under different control strategies.
The vehicle demand power can be divided into front power and rear power, suc Equation (19). The torque distribution coefficient β is defined as the ratio of front torque to driving torque, in DPCS mode or RBCS mode, and the torque distribution efficient is presented in Figure 10. In the RBCS mode, the vehicle works in three-m coordination or all-wheel drive along with the vehicle demand power, while in the D mode, with the increase in vehicle power or decrease in vehicle power, the front mot always working, indicating that the high torque of the front motor is often provi Combined with Figure 11, in the DPCS mode, the motor works in an efficient range respondingly. As shown in Figure 11, the two rear motors work in the same ou power, so the rear motor efficiency represents the dynamic programming action effec the RBCS mode, the rear motor maintains the efficiency of 0.3 to provide the requ power of the vehicle, but in the DPCS mode, the required power of the vehicle is supp in front motors. Thus, in the DPCS mode, the motor rarely works in inefficient areas.

Discussion and Conclusions
This paper proposed energy management for all-wheel-drive electric vehicles based on the partly-known driving cycle. To overcome the shortcoming in real-time of the al gorithm, the control strategy was divided into three parts. The parameters that affected the vehicle power demand and speed were extracted, and the torque distribution coeffi cient was determined according differ driving cycles, which is developed based on dy namic programming coordination strategy (DPCS) and rule-based control strategy (RBCS), respectively. In the end, the extracted parameters as shown in Figure 7 will be used in the on-line control strategy to extend the cycling mileage, and coordinating the power output of the battery and exerts the advantage of the motor comprehensively The specific work could be summarized as the following aspects.
(1) In this paper, based on rule-based and dynamic programming coordination, a con trol strategy of the offline parameter extraction method is proposed. When the ve hicle speed is higher than 25 km/h, the two rear motors get involved, with the fron motors working more reasonably, along with increasing the vehicle demand power (2) The dynamic programming coordination strategy is proposed, and the method ob tains the optimal torque split ratio through a partly-known driving cycle. The bene fit of this strategy is using electric power to the greatest extent and taking manage ment of the motor, which will work and put the motor in an efficient range. (3) To verify the dynamic programming coordination strategy, the simulation was conducted based on MATLAB/Simulink. According to simulation results, the dy namic programming coordination strategy plays a significant role in all-wheel-drive performance, compared to a rule-based control strategy.

Discussion and Conclusions
This paper proposed energy management for all-wheel-drive electric vehicles based on the partly-known driving cycle. To overcome the shortcoming in real-time of the algorithm, the control strategy was divided into three parts. The parameters that affected the vehicle power demand and speed were extracted, and the torque distribution coefficient was determined according differ driving cycles, which is developed based on dynamic programming coordination strategy (DPCS) and rule-based control strategy (RBCS), respectively. In the end, the extracted parameters as shown in Figure 7 will be used in the on-line control strategy to extend the cycling mileage, and coordinating the power output of the battery and exerts the advantage of the motor comprehensively. The specific work could be summarized as the following aspects.
(1) In this paper, based on rule-based and dynamic programming coordination, a control strategy of the offline parameter extraction method is proposed. When the vehicle speed is higher than 25 km/h, the two rear motors get involved, with the front motors working more reasonably, along with increasing the vehicle demand power. (2) The dynamic programming coordination strategy is proposed, and the method obtains the optimal torque split ratio through a partly-known driving cycle. The benefit of this strategy is using electric power to the greatest extent and taking management of the motor, which will work and put the motor in an efficient range. (3) To verify the dynamic programming coordination strategy, the simulation was conducted based on MATLAB/Simulink. According to simulation results, the dynamic programming coordination strategy plays a significant role in all-wheel-drive performance, compared to a rule-based control strategy.