Design of Real-Time Control Based on DP and ECMS for PHEVs

A real-time control is proposed for plug-in-hybrid electric vehicles (PHEVs) based on dynamic programming (DP) and equivalent fuel consumption minimization strategy (ECMS) in this study. Firstly, the resulting controls of mode selection and series mode are stored in tables through offline simulation of DP, and the parallel HEV mode uses ECMS-based real-time algorithm to reduce the application of maps and avoid manual adjustment of parameters. Secondly, the feedback energy management system (FMES) is built based on feedback from SoC, which takes into account the charge and discharge reaction (CDR) of the battery, and in order to make full use of the energy stored in the battery, the reference SoC is introduced. Finally, a comparative simulation on the proposed real-time controller is conducted against DP, the results show that the controller has a good performance, and the fuel consumption value of the real-time controller is close to the value using DP. The engine operating conditions are concentrated in the low fuel consumption area of the engine, and when the driving distance is known, the SoC can follow the reference SoC well to make full use of the energy stored in the battery.


Introduction
Hybrid electric vehicles use at least two power sources, usually driven by an internal-combustion engine associated with a motor, in order to minimize the fuel consumption and/or emissions. e energy management of a PHEV is often divided into two categories. e first concerns global optimization based on offline simulation. In this case, the vehicle speed is regulated to follow a speed cycle using a torque at the wheel controller. Examples of such methods include Pontryagin's minimum principle [1,2], dynamic programming (DP) [3][4][5][6][7], and genetic algorithm [8]. A second class of algorithms is real-time optimal control strategy that can be used to control a vehicle. Several algorithms have been proposed, some of which are based on rulers [9,10] and Equivalent fuel Consumption Minimization Strategy (ECMS) [11][12][13][14][15][16], and others are approximate real-time control strategies based on DP [17][18][19]. ECMS has strong dynamic adaptability and can get similar results with DP in theory [20]; therefore, it has been extensively studied.
In this paper, a real-time control for PHEV based on DP and ECMS is studied. Real-time implementation has remained a major challenge in the design of complex control systems. To address this hurdle, simple and efficient models and fast optimization algorithms are developed. e real-time controllers must be simple in order to be implemented with limited computation and memory resources. Moreover, manual tuning of control parameters should be avoided to reduce the calibration work efforts. DP can obtain global optimal solutions, and ECMS can realize real-time computing and can theoretically get similar results with DP. is study combines the advantages of both to establish a real-time controller. e contribution of the paper is to use the DP algorithm solving the optimal controls of driving cycle to establish the framework of FEMS. In order to fully utilize the potential of the battery, the charge and discharge reaction (CDR) of the battery is taken into account in the DP-based FEMS, and the reference SoC is introduced into the FEMS. e ECMS realtime algorithm is used for the parallel HEV mode to reduce the application of maps and avoid manual adjustment of parameters.

Hybrid Vehicle Modeling
For this study, two levels of modeling are considered. e first, called plant model (PM), shown in Figure 1, is used to simulate the vehicle over speed cycles [21]. It only represents the longitudinal behavior and is designed for the energeticconsumption simulation. It includes the following: Dynamic response of engine torque Motor model based on the characteristic map provided by the motor supplier Dedicated hybrid transmission (DHT) model (including the shift strategy) Full dynamic vehicle model High-voltage lithium battery model based on battery charge and discharge characteristics An important part of PM is the fuel consumption model of engine.
is is done only for fuel consumption using classical map and is validated according to real data results, as shown in Figure 2.
Based on this PM, a simplified model, called Energy Consumption Model (ECM), has been derived. e purpose of this paper is not the vehicle modeling, but control law synthesis. So, only ECM is used to derive the optimization algorithm. PM is omitted here, but PM is used for the simulation results at the end of this paper. Figure 1 is the simulation model of PHEV.

Energetic Consumption Modeling.
e power flows of the PHEV and connections between components are shown in Figure 3. e vehicle has three energy converters, an internal-combustion engine (ENG), a drive electric motor (DEM) connected through a dedicated hybrid transmission (DHT), and a generator electric motor (GEM) as a generator connected to the engine via DHT. Both electric machines can work in both motoring and generating modes. e main component parameters of the powertrain are listed in Table 1.
As shown in Figure 3, the powertrain allows the vehicle to be driven in the following four modes: Mode 1: one-motor pure electric mode: only the DEM is connected to DHT. Mode 2: two-motor pure electric mode: the DEM and GEM are connected to DHT. Mode 3: series HEV: only the DEM is connected to DHT. e ENG and GEM work as an auxiliary power unit (APU), producing electric power. Mode 4: parallel HEV: all energy converters are connected to the DHT. e following relations can be described as shown in Figure 3: where n and j correspond to the engine transmission gear and the motor transmission gear, respectively.

Optimal Control Problem
e objective in energy management for hybrid vehicles is to minimize the cumulative fuel consumption, which is equivalent to minimizing the power consumption of the engine. e battery is considered as a dynamical system, with the state of charge From (1) and (3), formula (5) can be expressed as follows: e objective function is , ω e (k) Δt.
e speeds and torques of both engine and motor are limited by the following mechanical constraints.
Constraints on speeds: Constraints on torques: However, the constraints on state of charge are With ΔSoC, the desired electric energy consumption over the speed cycle is called overall SoC variation. e relationships between the different torques and speeds, (2)-(4), allow writing the constraints (8) and (11) as where T e min ′ � max 0, [EMS] [Gearbox] [Clutch1] [Clutch2] [Driver] : desired torque T wh (k) can be produced by both motor and engine 3.1. DP Formulation. Dynamic programming (DP) is a multistep decision process, which uses Bellman's optimal principle for making hierarchical decisions and solving optimal controls [19].
For an optimal decision, regardless of the initial state and initial decision (stage cost) d(x k , x k−1,i ), the remaining decisions (cost-to-go) J k−1 (x k−1,i ) must be optimal for the first decision. at is, the second section of the optimal trajectory is also the optimal trajectory. e following is the equation of the multistep decision process: where J k (x k ) is the optimal value function of k-stage decision process starting state x k to the end state x f and u k,i is the control strategy at starting state x k of k-stage decision process so that the state is transferred to next state. In this paper, reverse solution is used. Figure 4 shows the optimal path of WLTC using DP reverse solution (Figure 4(a)) and the cumulative fuel consumption of the corresponding optimal path (Figure 4(b)).

ECMS Formulation.
After dividing by η e q LHV , this results in the following objective function: Introducing the Lagrangian parameter λ(k), the Hamiltonian function can be written as , ω e (k) In order to avoid exceeding the boundary value of the constraint condition, introducing an additional cost function, then, (19) can be rewritten as , ω e (k) In order to make the SoC meet the constraint condition (12), a penalty function is introduced: en, the Hamiltonian function can be rewritten as , ω e (k) where s(k) is the equivalent factor. According to Pontryagin's minimum principle, the optimal controls are obtained by solving the minimum value of Hamiltonian function, shown as follows: 3.2.1. ECMS Algorithm. e following steps must be executed to implement ECMS, as also illustrated in Figure 5: (1) Identify the acceptable range of control [T gem, min (k), T gem, max (k)] and [T dem, min (k), T dem, max (k)] which satisfies the instantaneous torque constraints into a finite number of controls T dm ,i and T gm,i , where i � 1, 2, . . . , q and j � 1, 2, . . . , p, a total of q × p control candidates (3) Calculate the equivalent fuel consumption H corresponding to each control candidate (4) Select the control values T gem (k) and T dem (k) that minimize H Steps 1 to 4 are computed at each instant of time over the entire duration of the driving cycle. is approach has been shown to closely approximate the global optimal solution.

Control Design
In order to reduce the amount of memory use and improve the calculation speed, the offline simulation is used to calculate the fuel cost in series mode and mode selection for a given combination (T w , ω w , SoC) [7,19,25]. Because the efficiency of the battery does not change greatly with the change of SoC in the desired operating region, the SoC is found to have minor effects on the optimal solution, so that effect is ignored.
However, not only are all control variables stored in tables, but also some insights can be gained from the kinematic relations in (1) Mode 4 is implemented using ECMS algorithm, and the algorithm flow is shown in Figure 4. ere could be instances where an engine torque command produces the minimum cost but differs greatly from the previously selected engine torque. is can occur when higher engine torque and lower engine torque produce minimum costs that are close in value, which causes the Min function to alternate between higher and lower engine torque outputs. erefore, the difference between the current engine power vector (P * e (k)) and the previously selected engine power (P * e (k − 1)) is introduced into the Hamiltonian function and will help limit the rate at which the engine power (and torque) can change from time step to time step, and the Hamiltonian function (23) can be rewritten as , ω e (k) 4.1. Controller. e structure of the controller is shown in a block diagram in Figure 7, which consists of three main subsystems. e first subsystem is the operation mode detection, combined with formulas (14)-(16) as the boundary Mathematical Problems in Engineering condition of the mode selection; the second subsystem is operation mode management, which mainly realizes the transition of the four modes by the state machine; the third subsystem is torque distribution amnagement, which mainly realizes the torque distribution of pure electric mode (modes 1 and 2), series mode (mode 3), and parallel hybrid mode (mode 4).

Energy Management
Charge-depleting charge-sustaining strategy (CDCS) is to make use of all the stored electric energy in the battery. e PHEV is run as an electric vehicle until the SoC is under a certain limit and then operates as a hybrid in the chargesustaining mode. It is guaranteed to make use of the stored electric energy, and it does not need information about the future driving mission, which is the main advantage of this strategy. Global optimal strategy based on DP is to mix usage of fuel and electricity throughout the driving cycle. Comparing the optimization-based strategies with the CDCSbased strategies, the optimization-based strategies may result in a lower fuel consumption than the CDCS-based strategies [24]. However, in order to use all the energy in the battery for the global optimal strategy, the distance of the driving cycle must be known.
In order to make full use of the electric energy in the battery, in this paper a mix between global optimal strategy and CDCS strategies is implemented, and in order to reduce the application of maps and avoid manual adjustment of parameters, parallel HEV is implemented based on ECMS algorithm.

Charge-Discharge Reaction.
In order to extend the life cycle of the battery, the charge and discharge reaction (CDR) of the battery is taken into account in the energy management strategy. e CDR of the battery is divided into 5 states: discharging, effective (Eff) discharging, normal, effective (Eff) charging, and critical (Crit) charging, as shown in Figure 8. When the SoC is close to the maximum boundary value, the CDR is in discharging state. With the SoC gradual decrease, the CDR will be in the effective discharging state and the normal state and then in the effective charging state, and when the SoC is close to its minimum boundary value, the CDR will be in the critical charging state to avoid the voltage of the battery and the discharge depth of the battery into the nonlinear region [22,23].
In Figure 9, with SoC as the feedback variable, a feedback energy management system (FEMS) is established to maintain the SoC within an allowable interval, as shown in Figure 10(d). When the SoC decreases, the CDR also decreases accordingly; then, the FEMS will select charging maps, shown in Figure 11; when the SoC increases, the CDR also increases; then, the system will select the discharging maps. Each map is approximate estimates of the corresponding optimal trajectory of DP, which can be generated with the help of the Model-Based Calibration (MBC) toolbox of MathWorks.

Reference SoC.
In order to make full use of all the energy stored in the battery, a blended strategy that the instantaneous optimal strategy based on ECMS is combined with CDCS strategy is implemented. In order to avoid SoC not reaching the final value of the reference SoC, when the end is reached, the strategy is to underestimate the approximate distance by 15% and use it as the horizon for the blended strategy and then switch to CS mode. is is achieved by setting a reference SoC [25], x rf , which is linear in the ratio of traveled distance versus expected distance according to equation (27). Minimum x rf is set to 0.3 in order to ensure that the final SoC is 0.3. e shape of x rf is shown in Figure 12. With reference SoC

Mathematical Problems in Engineering
where x f is the minimum reference SoC. In order to improve the robustness of the system, the PI controller is designed according to the following formula:

Adaptive Optimal Supervisory
Control. e adaptive optimal supervisory control is designed based on SoC feedback, which is to dynamically change s(k) (without using past driving information or trying to predict future driving behavior) to compare SoC changes and maintain its value near the reference value [26][27][28].
An adaptation law based on the PI controller of the type: In (29), s 0 represents the initial value of s at time t � 0, and K p and K i are the proportional and integral gains of the adaptation law. e initialization of this algorithm, i.e., the choice of s 0 , is arbitrary, and it can be done by averaging different optimal initial values obtained offline [28,29].

Simulation Result in MATLAB-Simulink
e controller is evaluated in a closed loop together with PM, and the simulation results are compared with the global optimal results of DP offline simulation. e offline simulation results of using DP reverse to solve WLTC are presented in Figure 4. Figure 4(a) shows the optimal paths with different SoC initial values, and the cumulative fuel consumption of the corresponding optimal path is shown in Figure 4(b), and the SoC constraints are 25% ≤ x ≤ 100%, In Figure 4, the optimal paths with different SoC initial values converge to one path at 900 s, and the fluctuation range of SoC is in a larger interval [30,95]; the average fuel consumption of all optimal paths after the WLTC is 820 g, corresponding to the one-hundred-kilometer fuel consumption which is 4.69 L. Figure 13 shows that the engine operating points are concentrated in the low fuel consumption area of the engine and the speed is in the interval [1000 r/min, 3500 r/min]. It can also be seen from Figures 10(b) and 14(a) that the engine torque is mostly concentrated around 80 Nm, and the number of engine starts with the reference SoC (27 times) is lower than the number of engine starts without the reference SoC (31 times). Figure 10(c) is the trajectory of the equivalent factor, and the overall trend of the equivalent factor is stable with the peak upward. e larger the peak value, the greater the desire for engine power. Conversely, as shown in Figure 14(b), the equivalent fuel factor decreases with the decrease of the reference SoC, the peak is down, and the smaller the peak value, the greater the desire for motor Mathematical Problems in Engineering 9 power. e resulting SoC trajectories for the tested cycle are shown in Figures 10(d) and 14(c). In Figure 10(d), the SoC fluctuation range of the tested cycle is narrower than the DP offline simulation result in Figure 4(a), which is located in the interval [61, 65]. Compared with Figure 14(c), SoC can better follow the reference SoC, and the range of SoC variation is relatively large, indicating that the energy stored in the battery can be fully utilized. As shown in Figure 10(a), the measured vehicle speed can follow the target vehicle speed very well. In order to verify the adaptability of the controller to different tested cycles, in addition to the WLTC tested cycle, two tested cycles, China Urban Driving Cycle (CUDC) and NEDC, are also selected for simulation comparison.
e results for the 3 tested cycles are shown in Table 2.
In fact, in WLTC testing, the final SoC may not reach exactly the target value (75%) of DP; therefore, in order to fairly compare fuel consumption results, a linear correlation between final SoC and fuel consumption is visible, which is easily approximated by the linear expression [30].
where m f is the actual fuel consumption, m f0 is the value that would correspond to a zero SoC variation, and σ is a curve fitting coefficient that translates ΔSoC into a corresponding amount of fuel; here, σ ≈ s. In Table 2, the fuel consumption of the WLTC without reference SoC is 4.81 L/100 km with the final SoC 63%. After correction, the fuel consumption is 4.83 L/100 km, which is 0.14 higher than the average fuel consumption of DP simulation with the final SoC value 75%. For the 3 test cycles, the fuel consumption without the reference SoC is higher than the fuel consumption with the reference SoC; the final value of the SoC without the reference SoC is close to the target value of 75%; the final value of the SoC with the reference SoC is close to 30%.

Conclusion
is study proposes a real-time control of PHEV based on DP and ECMS. In order to fully exploit the potential of the battery, combined with the CDR and CDCS, the FEMS was established, and the controller was evaluated by closed-loop simulation. e conclusion is as follows: (1) is study proposes a real-time control of PHEV based on DP-ECMS, which is a suboptimal solution, and the results show that the real-time controller has good control ability and better robustness, and the fuel consumption value of the real-time controller is close to the offline simulation results of DP. (2) e engine operating points are concentrated in the low fuel consumption area of the engine, and the engine starts and stops are evenly distributed. ey effectively avoid alternating output between higher and lower engine torques. (3) When the future driving distance is unknown, the controller can make the SoC within a admissible interval, but the SoC change range is relatively small, and the system cannot make full use of the energy stored in the battery. When the future driving distance is known, the system can make the SoC better follow the reference SoC, which can make full use of the energy stored in the battery; therefore, fuel economy is effectively improved.

Nomenclature
q LHV : Fuel lower heating value (J/Kg) U a : Vehicle speed (Km/h) T: Torque (Nm) i: Gear ratio (-) η: Efficiency (-) ρ: Air density (kg/m 3 ) g: Gravitational acceleration (m/s 2 ) Δt: Sample time (s) Q: Battery capacity (As) P: Power (W) ω: Angular velocity (rad/s) b h : Fuel consumption (Kg/h) x: State of charge (-) _ m f : Fuel mass flow (g/s) m f : Fuel consumption (L/100 km) m f xf : Fuel consumption with reference SoC (L/100 km) D real : Actual distance traveled (km) D cycle : Estimated driving cycle distance (km) λ: Lagrangian parameter (-) s: Equivalent factor (-) Subscripts wh: Wheel req: Requirement gb: Gear box elec: Electricity e: Engine m: Motor gem: Generator electric motor dem: Drive electric motor red: Reducer opt: Optimal rf: Reference BT: Battery APU: Auxiliary power unit Acronyms ENG: Engine Eload: Electronic load Data Availability e Models.slx data used to support the findings of this study are currently under embargo while the research findings are commercialized. Requests for data 6 months after publication of this article will be considered by the corresponding author.

Conflicts of Interest
e authors declare that they have no conflicts of interest.