Optimal Energy Management Strategy of a Plug-in Hybrid Electric Vehicle Based on a Particle Swarm Optimization Algorithm

: Plug-in hybrid electric vehicles (PHEVs) have been recognized as one of the most promising vehicle categories nowadays due to their low fuel consumption and reduced emissions. Energy management is critical for improving the performance of PHEVs. This paper proposes an energy management approach based on a particle swarm optimization (PSO) algorithm. The optimization objective is to minimize total energy cost (summation of oil and electricity) from vehicle utilization. A main drawback of optimal strategies is that they can hardly be used in real-time control. In order to solve this problem, a rule-based strategy containing three operation modes is proposed first


Introduction
Plug-in hybrid electric vehicles (PHEVs), possessing a large capacity onboard energy storage system (ESS) that can be recharged by direct connection with the electric grid and one or more electrical motors, can reduce fuel consumption and alleviate global warming compared to internal combustion engine (ICE) vehicles or conventional hybrid electric vehicles (HEVs) [1][2][3][4][5][6]. Different from the conventional HEVs, most of which can only work in charge sustaining (CS) mode, PHEVs can also be operated at a charge depleting (CD) mode, giving a notable potential to achieve clean transportation. Due to the multiple operating modes of PHEVs and the complex system power demand in daily driving, an advanced energy management strategy (EMS) is required to ensure that the hybrid system can operate reliably and with high efficiency [5,[7][8][9][10][11][12].

Review of the Literature
With the development of PHEV technologies, several studies about EMS have been proposed. A simple but very useful approach of energy management is the heuristic method, most representative of which are rule-based strategies [6,[13][14][15] and fuzzy logic controllers (FLC) [16][17][18]. The rule-based strategies consist of some rules and algorithms based on engineering intuition. For example, all electric range (ARE) focused strategy and blended strategy are two rule-based strategies that are commonly used for PHEV energy management design [6,19]. In the ARE-focused strategy (also known as CD-CS strategy), vehicles use electricity to operate initially in CD phase, and switch to CS mode when the electricity is almost exhausted. In blended strategy, the power demand is split between the engine and the battery according to the presented rules throughout the driving route. Ref. [6] further categorizes the blended strategy into the engine-dominant blended strategy and the electricity-dominant blended strategy and indicates that the fuel savings of these strategies are significantly affected by the driving distance before recharge. A significant advantage of rule-based strategies is that they can be implemented in real-time. Similarly, FLC energy management strategies can also be used in real time control. Ref. [18] proposes a FLC approach for series PHEVs combining the battery management system, and indicates the presented FLC strategy is effective in improving the fuel economy while preventing the battery from over-discharging. Generally, these strategies are effective, easy to implement, high robust and widely used online due to the low computational load requirement. However, both the rule-based strategies and FLC strategies fail to reach the optimal performance due to lack of an optimization process.
Another online available methodology of EMS design are local optimization strategies, like model predictive control (MPC) [20][21][22][23] and stochastic dynamic programming [24,25]. These strategies are based on a period of predicted driving cycle in the future and employ the optimal control policy on this short-term time horizon. Theoretically, the local optimization strategies have the potential to achieve a near-optimal energy management performance and could be implemented for real-time control if there are sufficient and precise predictions of future driving conditions. However, a very high computational capability is demanded in this kind of methodology [10], resulting in its difficulty to be used on-vehicle nowadays. In addition, a precise driving condition prediction is also hard to get [26]. In order to obtain the most likely driving cycles in the future, the off-vehicle infrastructures such as cloud and GPS signals are required. How to blend the external data with signals from onboard sensors is as well a very difficult problem that has not been solved yet.
The global optimization approaches, using advanced optimization algorithms to solve the power flow control problem, have been widely investigated [27][28][29][30][31][32][33][34][35] recently. For example, genetic algorithm (GA) optimization is used for EMS of parallel HEVs in [27], the optimal objective is to minimize the fuel consumption and emissions. Three different driving cycles are used to evaluate the presented GA-based strategy, indicating that it is effective at reducing fuel cost and emissions without sacrificing any dynamics performance. Ref. [28] presents a particle swarm optimization (PSO)-based strategy for the bus power flow control problem to minimize the fuel cost and to enhance the voltage stability. The robustness and effectiveness of PSO-based energy management strategy have been demonstrated in this research. One hundred different initializations are used to test the performance, showing the PSO-based strategies can finally reach the optimal solution regardless of the differences in initial conditions. Ref. [36] describes an application of the PSO approach to optimize the control strategy parameters of PHEVs to maximize fuel economy. In this study, vehicle performances are taken as constraints. Simulation results show the PSO approach can improve the fuel economy without compromise of vehicle performance. The dynamics programming (DP) algorithm has also been employed and helps to design the energy management strategy for PHEVs [31,34]. Another important optimal method used for PHEVs is convex programming [19,32,37]. For example, Ref. [19] proposes a convex programming approach to optimize the control rules the CD-CS strategy and blended strategy for a series plug-in hybrid electric bus. The Tank-to-Wheel (TTW) efficiencies in these two strategies are compared in this paper, and the impact of battery downsizing on energy efficiency is also discussed. Ref. [37] uses convex programming to optimize the sizes of battery pack and supercapacitor stack in hybrid energy storage system (HESS) and the power allocation between HESS and fuel cell in a hybrid bus. On top of that, the HESS and battery-only energy storage system (ESS) is systematically compared under the convex programming framework. Basically, all of these global optimization approaches mentioned above are useful to get an optimal control policy for PHEVs. However, reliance on the priori driving cycles that can hardly be obtained at real time situation makes the global optimization algorithms based strategies difficult to be implemented online, which is the uppermost drawback of this category. So far, literatures lack of discussion on how to deploy the global optimization based strategies on the real-time vehicle control.

Motivation and Innovation
The main purpose of this paper is to propose a PSO global optimization approach for energy management to minimize the energy cost and to obtain a solution to directly implement the presented optimal strategy in real-time control. The main contributions are: (1) A novel rule-based strategy for EMS of PHEVs is proposed and used to build a correlation between the control policy and four control threshold parameters; (2) The PSO approach is proposed to optimize the threshold parameters of the rule-based strategy to achieve the minimization of the total energy consumption (summation of electricity and oil consumption). Since the PSO optimization variables are parameters of the rule-based strategy, once the offline optimization process is over, the strategy no longer relies on a priori driving cycles, so the strategy can be used online. The energy management strategy will achieve a near optimal control performance because the real driving cycle is different from the offline speed profile that is used to operate PSO algorithm.

Outline of the Paper
The remainder of paper is organized as follows: the powertrain system model of a PHEV is introduced in Section 2. Section 3 describes the energy management strategy, comprising a rule-based strategy and the PSO-based global optimization process. Simulation and analysis based on MATLAB/Simulink are given in Section 4 while a driver-in-the-loop experiment is implemented in Section 5 to test the real-time performance of the proposed energy management strategy. Conclusions and future work are illustrated in Section 6.

Powertrain System Model
The PHEV with a series powertrain topology is investigated in this paper, as shown in Figure 1. The vehicle is propelled by an 86 kW electric motor (EM) with an automatic mechanical transmission (AMT). A 26 kWh lithium-ion battery pack and a 6 0 kW engine-generator set (EGS) are employed to supply electric power to the motor. The battery pack is mainly responsible for power supply to the EM during the initial period of a driving route. However, when the state of charge (SoC) of battery is relatively low, EGS will start to work in order to achieve a prolonged travel range. In considering that the dynamics effects are much faster than energy consumption variation and don't affect the power flow distribution, they have been ignored in the powertrain system model [10]. The power balance relationship can be described by Equation (1). The EM output power is determined according to the driver operation signals. Here driver is simply modeled as a PID control according to the objective velocity v* and real v feedback: When making the EGS and battery pack work together, the energy management strategy will make the decisions about power allocation between the EGS and battery. Since there is no direct mechanical connection between the engine and the wheels, the engine can be operated within the high efficiency range. Here PH and PL are used to define the power thresholds of the high efficient range of the engine. For any given power requirement of engine, there is a highest efficiency working point forming a optimal curve of engine operation, as shown in Figure 2. The battery pack contains many signal cells. For the purposes of this energy management investigation, it is assumed that each cell is consistent, thus the battery pack can be modeled as a whole, as described in Equation (4). In this paper the influence of temperature changes is neglected, so Voc is treated as a function of battery SoC [11,30], as shown in Equation (5). The variation of the SoC can be calculated as Equation (6) according to the battery current:

Optimal Energy Control Problem
First of all, a rule-based strategy is proposed to describe the power split relationship. The energy management strategy is responsible for operating mode switching and optimal power distribution to minimize the energy consumption of the powertrain system. As mentioned above, there are two commonly used rule-based strategies for PHEVs, one is called CD-CS strategy, in which the vehicle first operates in all electric CD mode until the battery SoC is lower than a predetermined threshold and then changes to CS mode; the other is blended strategy, which means the power demand is split between the battery and engine throughout the whole range. Here the CD-CS strategy and blend strategy are combined to generate a new rule-based strategy as the basis of the PSO algorithm. Three modes are defined for the PHEVs operation process. The first mode is called charge depleting electric (CD-E) mode, in which all the power demand is supplied by the battery pack since electricity is cheaper and cleaner than oil fuel [38]. If the battery SoC is higher than a relative low threshold (here, it is 0.4), the CD-E mode is adopted, but if the battery SoC is a little lower than 0.4, the vehicle will operate in the second mode, namely charge depleting hybrid (CD-H) mode. In this mode, the battery pack and EGS output power together as a hybrid energy supply system and power demand will be split between the battery pack and EGS according to the optimization algorithm. Since the battery pack is still one of the main power supply units, the battery SoC will continue declining. After the SoC reaches a lower threshold (here, is 0.2), the third mode, charge-sustaining (CS) mode, will be deployed, in which the EGS is the main power supply unit and the battery only recaptures the kinetic energy during braking. The rule-based control algorithm is then proposed according to these three modes. A detailed description of the presented rule-based strategy is given in Table 1. Table 1. The rule-based control strategy.

Modes
Control rules if P L * < P req ≤ P H * then P e = P req ; P batt = 0; if 0 < P req ≤ P L then P e = P opt ; P batt = P e − P req ; if P req ≤ 0 then P batt = P req ; P e = 0; end CS else P e = max{0, P req }, P batt = P req − P e ; end The proposed rule-based strategy contains four undetermined threshold values PL, PH, P1, and P2. Except for these four parameters, the control rules and algorithms in this strategy are explicit and firm. Therefore, these four parameters can be chosen as optimal values, expressed as ρ= [PL PH P1 P2], which are to be optimized by the PSO algorithm. The proposed rule-based strategy is the correlation between the optimal value and control policy. Once we determine these four parameters, the battery power Pbatt and engine power Pe could be calculated according to the control strategy in Table 1 and then the energy consumption could be calculated.
The PSO algorithm is used to find out the optimal control ρ * = [PL * PH * P1 * P2 * ] from all the candidate solutions. For a given driving trip that covers the time horizon [t0, tf], the optimization objective for PHEVs is defined as: Supposing that the driving time of the given speed profile is long enough to reach the minimum capacity of the battery pack, the whole driving route of PHEVs can be divided into three periods based on the presented operation modes, so the optimization objective function described in Equation (7) can be unfolded: In CD-E mode the electricity dominates to achieve clean and cheap travel while in CS mode the EGS takes over in order to maintain the battery SoC level. In these two cases, the optimization algorithm doesn't work because the control rules are totally fixed and very clear. Only with the CS-H mode can the optimal strategy have a significant role to play, because in this mode the electricity and fuel work together to supply the power demand. There is a degree of freedom allowing the power split between the battery pack and EGS, so the global optimal problem can be transformed into how to minimize the energy cost in CD-H mode. The optimization objective can be rewritten as Equation (9). Here the energy cost is defined as a sum of electricity consumption and fuel consumption: Thus, the optimization problem can be described as how to find the optimal control policy u * to reach the minimum of JCD-H: During the operation of the optimization process, some constraints have to be obeyed to make sure the optimal result belongs to the feasible solutions. According to the threshold design rules, the constraints for threshold values are shown in Equations (11) and (12)

Optimization Algorithm
In the PSO algorithm, the control variable of the optimal problem are defined and programmed as a lot of particles, which possess two properties, the position and the velocity. Position of each particle represents a candidate control policy. The particles can move to a new position from the present position according to their current velocity. The velocity of a particle is determined according to the personal best position of the particle and the global best position of the particle swarm. Some detailed descriptions about the basic PSO algorithm can be found in Refs. [19,36,39]. In this paper, each particle is defined by the threshold values ρ in rule-based strategy, expressed as X = ρ = [PL, PH, P1, P2] T while velocity is expressed as V = [v1, v2, v3, v4] T . There are four basic numerical operation processes in the PSO algorithm, which are listed in Table 2. At each iteration time, w is linearly decreased from wmax (here, is 1.2) to wmin (here, is 0.1) according to k and iterative process of each particle's position and velocity are operated by Equations (13) and (14): The optimization process based on the US06 driving cycle is shown in Figure 3. The particles converge at the optimal point after about 20 iterative steps and optimal results of threshold values in rule-based strategy are set as follows: PL * = 15.2, PH * = 26.7, P1 * = 34.8 and P2 * = 55.0.

Table 2. Operation program flowchart of PSO algorithm.
Step 1: Set the initial conditions. The particle swarm scale is set to M = 20 and maximum iteration times is set to N = 50. The bounds of each particle parameters are set according to Equations (11) and (12). Within the bounds, the positions of particles are given randomly and velocity is set 0.
Step 2: The first iteration time. Calculate the objective function (Equation (9)) for each particle according to rule-based strategy listed in Table 1 on the basis of the a priori driving cycle and then record each particle as their personal best the first time, denoted as P 1 0 …P M 0 , the best of which is chosen as the global best G 0 .
Step 3: Iteration. From the second iteration time on, the position of each particle X 1 k ,…X M k and their velocity V 1 k …V M k is calculated as Equations (13) and (14). And at each iteration time, the objective functions are calculated and the personal best P 1 k …P M k and the global best G k are recorded according to: Step 4: End optimization. When the iteration time reaches the maximum iteration time N, the PSO algorithm ends. The best particle is the optimized threshold values in rule-based strategy ρ * = G N .

Simulation and Analysis
Given the optimal threshold values determined by PSO algorithm we replace them in the rule-based strategy of Table 1, and the power allocation at each time point can then be calculated. To evaluate the performance of this approach, the strategy is simulated by a forward simulation model in the MATLAB/Simulink software. Figure 4 illustrate the simulation results of engine power, battery power, and battery SoC with four US06 cycles (51.5 km) as speed profile. Since the simulation is mainly utilized to test the optimization process implemented on CD-H mode, the initial SoC of the battery is set to 0.4. At the end of the driving cycle, SoC drops to about 0.3. It is clear that both the battery and engine output power in almost the whole driving cycle, which indicates that the power split determined by the PSO algorithm is a compromise between the engine dominant blended strategy and electricity dominant blended strategy. The engine dominant blended strategy [6,19] is used here as a benchmark to make a comparison. The adopted blended strategy is to split the power requirement between the battery and engine throughout the driving route. When the power demand is lower than the maximum power of the EGS, it supplies the electric power following the optimal curve; if the power demand exceeds the EGS power capability, the battery will supplement it for demands greater than the maximum power of the EGS, described as follows: Table 3 gives the energy consumption results of the proposed PSO-based strategy, original rule-based strategy before optimization and the engine dominant blended strategy.
The electricity consumption is already transferred as equivalent fuel consumption into the cost function according to the equal price, so the comparison result indicates the EMS using the PSO approach can reduce the energy consumption effectively.  The power split of the first 200 s in the proposed PSO-based strategy and blended strategy are compared in Figure 5. Different from the blended strategy, the battery power in the PSO-based strategy increases properly most of the time but at some individual time points (such as 165 s to 185 s) the battery power is reduced to maintain the engine work at higher efficiency. The engine works at the threshold optimized by the PSO algorithm instead of working at the system optimal point according to the engine efficiency map. The load power allocation is more reasonable after the global threshold optimization, leading to lower energy consumption. Considering the optimization process is not directly acting on the power distribution during the whole driving cycle but at some threshold values in the rule-based strategy, it can possibly be operated online because the strategy doesn't rely on the a priori driving conditions once the offline optimization process is over.
When the EMS is utilized in a real environment, the driving conditions are likely to be very different from the offline scenarios. Therefore, the algorithm should have good generalization ability in order to A achive a good online performance. To better evaluate the performance of the proposed PSO-based energy management strategy, two other driving speed profiles, the REP05 and ARB02 (as shown in Figure 6), are adopted here to repeat the simulation. The energy consumption simulation results are listed in Tables 4 and 5. Compared to the blended strategy, the energy management strategy with the PSO algorithm can effectively reduce the energy consumption.

Driver-in-the-Loop Experiment
A driver-in-the-loop experiment is performed to evaluate the real time performance of the presented energy management approach. The experimental platform, containing a real driver and controller hardware, is based on a controller "development to production" system from the Woodward Company (Fort Collins, CO, USA), referred to as D2P system. D2P system is a software-hardware development platform based on the MATLAB/Simulink software and product level controller, offering C language rapid generating and online calibration functions. Figure 7 shows the operating principle of this driver-in-the-loop experiment platform. As the inputs of the whole system, the real-time driver signals are passed to the controller hardware through the I/O signal requisition port. Other data are transmitted through controller area network (CAN) buses. There are two CAN buses in this test; the CAN bus-1 is responsible for the C language programming from the computer software to the controller hardware and the communication between the controller hardware and controlled objects' models is implemented through CAN bus-2. To get the test data, a monitoring interface is designed using the NI LabVIEW system. All of the control information and status of the vehicle are displayed in real-time on the LabVIEW monitoring interface and fed back to the driver, forming a control loop. A photo of this platform is shown in Figure 8.  The main objective of the real-time experiment is to evaluate the performance of the proposed strategy in a real-time situation. In particular, since the correctness and effect of the proposed approach and algorithm have already been tested through comparison with other methods in offline simulation, here the purpose is to compare the offline simulation result with the real-time experimental data based on the same driver operation. If the real-time experiment data and the offline result can well fit, it could indicate that online performance of the presented strategy is credible.
The input from the driver for the real-time experiment is plotted in Figure 9. The position of driver's acceleration pedal and brake pedal are quantized as a variable from 0 to 100 linearly. Pedal = 0 represents the empty position of pedal while pedal = 100 represents pushing the pedal to the bottom. The driver's inputs are recorded throughout the real-time test process and then are used as the MATLAB/Simulink forward simulator's input to repeat the offline simulation. The comparison of real-time test data and offline simulation result are shown in Figure 10. It can be seen that in a real-time control situation the presented PSO-based energy management strategy can work as well as in the offline simulation.

Conclusions
The performance of PHEVs is significantly determined by the energy management approach employed. An optimal energy management strategy for PHEVs using a PSO algorithm is proposed in this paper. Firstly a rule-based strategy that can be implemented online is proposed to solve the energy management problem of PHEVs. Then some key threshold values in the rule-based strategy are selected as the optimization objectives of the PSO algorithm. The proposed PSO-based strategy is implemented in a forward simulation model in MATLAB/Simulink. Using a traditional blended strategy as benchmark, the simulation results indicate that the objective function value can be reduced by 8.28% due to the optimization process and the energy consumption is 6.3% less than that in a traditional blended strategy.
Although an a priori driving cycle is required during the optimization process, once the offline optimization is over, the strategy no longer relies on a predetermined speed profile, so it is possible to use it online. When the real driving cycle differs from the cycle used in the offline optimization, the energy management will achieve a near optimal control performance. Indicated by simulation, the proposed energy management could achieve an improved result compared to other speed profiles. Energy consumptions are reduced by 1.99% and 3.72%, respectively, for the two new driving cycles that are used to evaluate the generalization ability.
In order to test the online operation possibilities of the proposed strategy, a driver-in-the-loop real-time experiment platform is performed based on a D2P system and NI LabVIEW. The real-time test data is used to make a comparison with the offline simulation results, which indicates that in a real-time control situation the presented PSO-based energy management strategy can work as well as that in the offline simulation. Future work will evaluate the proposed approach in a real environment and compare it with other optimization algorithms. Coulombic efficiency [p 1 (k), p 2 (k), p 3 (k), p 4 (k)] T personal best position of the particle Q nom nominal capacity of the battery [g 1 (k), g 2 (k), g 3 (k), g 4 (k)] T global optimal position of the particle