Energy Management of Fuel Cell Vehicles Based on Model Prediction Control Using Radial Basis Functions

Energy management strategies can improve fuel cell hybrid electric vehicles’ dynamic and fuel economy, and the strategies based on model prediction control show great advantages in optimizing the power split effect and in real time. In this paper, the influence of prediction horizon on prediction error, fuel consumption, and real time was studied in detail. The framework of energy management strategy was proposed in terms of the model prediction control theory. The radial basis function neural network was presented as the predictor to obtain the short-term velocity in the future. A dynamic programming algorithm was applied to obtain optimized control laws in the prediction horizon. Considering the onboard controller’s real-time performance, we established a simple fuel cell vehicle mathematical model for simulation. Different prediction horizons were adopted on UDDS and HWFET to test the influence on prediction and energy management strategy. Simulation results showed the strategy performed well in fuel economy and real-time performance, and the prediction horizon of around 20 s was appropriate for this strategy.


Introduction
The transportation industry is one of the primary sources of energy consumption and exhaust emissions. Many technologies on NEVs (new energy vehicles) have high fuel efficiency and fewer emissions. As one of the most popular NEVs, FCVs (fuel cell vehicles) have huge development space in transportation, depending on their zero emission and high efficiency.
The vehicle with fuel cell stack as the single energy source has a poor dynamic response, and the practical solution is to add a short-term storage system to assemble a hybrid vehicle, thus improving the vehicle's drivability and dynamic. The most common short-term storage systems include battery and supercapacitor-the former can store more electricity due to its higher specific energy, and the latter has high power density. The hybrid vehicle's dynamic performance and fuel economy are related to the architecture, the components, and the energy management strategy of the vehicle [1]. The work focused on the opti-mization of fuel economy for FCV with an energy management strategy. The vehicle propulsion system's power split is optimized by the energy management strategy when the dynamic vehicle performance is satisfied. Depending on the control method, energy management strategies include optimization-based and rule-based ones.
Current energy management strategies are mostly based on certain/fuzzy logic rules. Certain rule-based strategies are first presented to solve the power split for hybrid electric vehicles, and these strategies have been extensively applied to real vehicles such as Toyota's Mirai and Hyundai's Nexo. Fuzzy logic-based strategies, relying on the fuzzy processing of control variables and the threshold value, are more robust and adaptive than those based on specific rules.
Buntin et al. first proposed a switching logic control system for hybrid vehicles [2]. For the fuel cell/battery FCV configuration, Liu et al. designed a control strategy to realize the vehicle's cold start in terms of meeting the dynamic performance requirements [3]. Hemi et al. analysed the performance of FCV's three configurations in the unknown driving cycle and real-time driving conditions [4]. However, the formulation of rule-based strategies relies on engineering experience, different from practical solutions.
Optimization-based strategies can be decided into instantaneous optimization, global optimization, and MPC-based (model-predictive-control-based) ones. The most popular instantaneous optimization strategy is ECMS (equivalent consumption minimization strategy), wherein the equivalent consumption of hydrogen in the fuel cell is changed into that of fuel in the battery, and the strategy is used to minimize the equivalent fuel consumption at each sampling time [5,6]. Global optimization strategy, adopting the optimization algorithms such as DP (dynamic programming) [7,8], Pontryagin's minimum principle [9], and pseudospectral method [10], can obtain the global optimal control laws following the certain drive cycle. And in addition to that, Lü et al. present a review of energy management system of fuel cell hybrid vehicle from the perspective of heuristic algorithm [11]. In a sense, the MPC-based strategy can be regarded as a compromise between instantaneous optimization and global optimization ones. In this strategy, the vehicle's short-term future demanded velocity is predicted by the constructed model, and the controller optimizes the control laws in the prediction horizons [12][13][14].
In this paper, a MPC-based energy management strategy for fuel cell vehicles was proposed, and the influence of prediction horizon was studied in detail. In the built MPC framework, a radial basis function (RBF) neural network was adopt as predictor to obtain the prediction speed, dynamic programming algorithm was employed as the solver to get the optimal trajectory of SOC, and different prediction horizons were tested in terms of prediction error, fuel consumption, and real-time performance. This work is based on fuel cell vehicles, but the method is applicable to other vehicles with two energy sources.
The remainder of this paper is organized as follows. The fuel cell vehicle power system's mathematical model is established in Section 2. The MPC-based energy management strategy is presented in Section 3, and Section 4 shows the simulation results. Section 5 shows the conclusion.

FCV Mathematical Model
2.1. Vehicle and Drivetrain. Figure 1 shows the studied vehicle structure. A vehicle propulsion system contains the fuel cell system and battery, which provide power to the motor during the vehicle operation. The bus voltage is provided by connecting the battery to the bus, and a unidirectional DC-DC converter is used to connect the fuel cell system to the bus. The vehicle operates with the kinetic energy provided by the DC motor.
When the impacts of lateral dynamics and rotating mass are ignored, the traction force F t can be calculated by where m is the vehicle's total mass, v is the vehicle's current velocity, ρ is the air density, A f is the frontal area, C d is the aerodynamic drag's coefficient, f is the rolling resistance coefficient, and α is the road's inclination angle. Table 1 shows the parameters of the fuel cell vehicle.
With the calculated traction force and velocity, the torque T w and the speed ω w of wheels are given by ð2Þ where r is the rolling radius of the wheel. When the wheel torque is positive, the motor exports kinetic energy to drive the vehicle; when it is negative, the vehicle is in the braking energy recycling, and the motor converts the braking energy into electricity to charge the battery. With the wheel torque and wheel speed, the torque T m , the speed ω m , and the power demand P m of the motor are as follows.
wherein η fd and r fd are the efficiency and gear ratio of the final drive, respectively. The efficiency of the motor can be looked up in the motor's efficiency map. It is defined that the motor power demand P m is positive during the traction phase and negative during the breaking phase. The fuel cell net power P fc is positive all the time, and the battery power P bat is positive when discharging and negative when charging. The relationship of three variables is written as 2.2. Fuel Cell System. A 50 kW fuel cell system is chosen as the primary energy source of the vehicle. A complete onboard fuel cell system [15] contains a fuel cell stack and other auxiliary equipment such as a hydrogen storage system,  Journal of Sensors hydrogen circuit, air circuit, water circuit, and coolant circuit. The complete model can obtain the fuel cell system's detailed internal dynamic responses, but cost more time. In this work, a simplified model is adopted to obtain a rapid response. The net power P fc can be divided into the stack power P stack and the auxiliary power P aux as The hydrogen consumption rate _ m H 2 can be written as the function of the stack current I stack : where N is the number of cells, M H 2 is the molar mass of hydrogen, F is the Faraday constant, and n is the number of electrons lost in electrochemical reactions. The net power is a function of the stack current, and the hydrogen consumption rate can be described as a function of the net power. Figure 2 shows the relationship between them.
The efficiency η fc of a fuel cell system is defined as a function of the net power and the power provided by hydrogen: where LHV is the low heating value of hydrogen. Figure 3 shows a typical physical model of battery. In this model, the battery can be denoted by an ideal voltage source in series with internal resistance. The output power of the battery can be written as

Battery.
where V oc , I b , and R int are the open-circuit voltage, the terminal current, and the internal resistance of the battery, respectively. The open-circuit voltage and the internal resistance are the functions of the SOC and the temperature. The test can be used to obtain internal resistance and the relationship between the open-circuit voltage and SOC (see Figure 4).
The battery temperature is assumed to be constant in this work.
The change rate of SOC is defined as the ratio of the terminal current and the battery capacity: where _ SOC is the change rate of SOC and Q b is the battery capacity. With formulas (11) and (12), the change rate of SOC is calculated by Net power (kW) Hydrogen consumption rate (g/s) Figure 2: Curve of hydrogen consumption rate.

Journal of Sensors
Every single battery has a capacity of 6 Ah and a peak voltage of 3.8 V. A battery pack is constituted with 87 cells in series and three battery packs formed by the parallel connection for simulation.

Structure of MPC-Based Energy Management Strategy.
With the transformation of global optimization into a series of suboptimizations, MPC can obtain the optimal local control laws based on model prediction, rolling optimization, and feedback correction. In Figure 5, the typical MPC-based energy management strategy consists of three steps [16].
Step 1. Predict the vehicle's future short-term velocity through the constructed prediction model.
Step 2. Obtain the optimal control rules in the short-term drive cycle by minimizing the cost function.
Step 3. Apply the optimal control rules in the first time step of the prediction horizon to vehicles' control system. Repeat the above steps until the drive cycle ends.
The whole system is discretized into constrained optimization problems in the finite time domain, and DP algorithm [17,18] is employed as the solution algorithm. The power split factor and SOC are selected as the control variable and state variable, respectively. Therefore, the system function at each prediction step is described as where x k is the battery's SOC, u k is the power split factor, v k is the prediction velocity, and N is the length of drive cycle.
The fuel consumption is employed as the cost function: where _ mðx k , u k v k Þ is the fuel consumption per step and Δt is the rolling step length (1 s).
For the structure of fuel cell vehicle, a terminal constraint is implemented to the SOC at every control horizon Sampling horizon Prediction horizon Step (k) Step (N-1) Step (k+1)

Velocity predictor
Mathematical model Dynamic programming

Sampling horizon
Prediction horizon

Input layer Hidden layer
Output layer where SOCðk + H p Þ is the terminal target SOC of every control horizon and H p is the length of the prediction horizon.
Other parameters under constraints are shown in equation (17).

Velocity Prediction with Neural
Network. The neural networks can respond to the nonlinear relationship between inputs and outputs through training the black-box model. In this work, a neural network of the radial basis function is trained to predict the velocity.
In Figure 6, the neural network inputs are the historical velocity sequence [Vðt k−H h +1 Þ, Vðt k Þ]; the outputs are the prediction velocity sequence [Vðt k+1 Þ, Vðt k+H p Þ] in the future; H h is the sampling horizon length; H p is the length of prediction horizon. The Gaussian function is selected as the activation function of the hidden layer, which is formulated as where IW is the neural network center, P is the input vector, and b is the maximum width between selected centers.
Here, a RBF-neural network with the structure of 10-50-H p is constructed to predict the velocity. Seven standard drive cycles (ARB-02, LA92, NYCC, REP05, SC03, UNIF01, and US06), including urban, suburban, and highway conditions, are used for the network training; 70% of the data are employed as the training dataset and 30% as the test dataset. In addition, untrained drive cycle (UDDS) and highway fuel economy test (HWFET) are used as the validate dataset.

Simulation Results and Discussion
The simulation was performed at MATLAB 2018b on a laptop with the configurations of Inter Core i3-3227U CPU @ 1.90 GHz. Seven drive cycles were used to train the network, the other two was used to test the performance of the network and the MPC-based energy management strategy. It was defined that the sampling time H h was 10 s, and the prediction time H p was 5 s to 25 s. The initial SOC of the battery was 0.6, and the terminal target SOC per prediction horizon was set as the same value of initial SOC. The upper and lower boundaries of SOC were 0.5 and 0.7, respectively. Also, the average root mean squared error (RMSE) was employed to assess the network performance, formulated as where RMSEðiÞ is the RMSE of prediction for the prediction horizon (from i + 1 seconds to i + H p seconds) at step i, RMSE ave is the global average RMSE of prediction, and N is the length of the drive cycle.

Journal of Sensors
In fact, with the structure of MPC, the final SOC for the global time horizon is practically impossible to have SOCð0Þ = SOCðNÞ. SOC deviation is converting into equivalent hydrogen consumption to eliminate the impact above.
To evaluate the performance of the constructed controllers, DP-based energy management strategy is employed as the benchmark of the simulation. It should be noted that unlike the DP algorithm mentioned in Section 3.1, the DPbased energy management strategy selected there is a global optimization strategy, aiming to obtain the optimal control rules and the hydrogen consumption at the whole drive cycle.
Different prediction horizons are tested in this work to explore the effect of the prediction horizon on fuel economy. Figure 7 shows the results of UDDS in prediction horizons are 10 s, 15 s, and 20 s. The prediction results of three prediction horizons reflect the changing trend of velocity without exception; however, with the increasing reduction horizon, the predicted velocity is further different from the actual velocity, which means the prediction error increases. Figure 8 presents the results of HWFET in the prediction horizons are 10 s, 15 s, and 20 s, and it shows the same trends as the results of UDDS; however, it is obvious that the prediction results of HWFET are more close to the actual velocity trajectory compared with UDDS. Figures 9 and 10 show the SOC trajectories for UDDS and HWFET, respectively. Each figure includes 4 SOC trajectories, 3 of which are obtained with three predictors (the prediction horizons are 10 s, 15 s, and 20 s, respectively) and the other one is obtained with DP-based energy management strategy. In these two figures, the SOC trajectory of DP is different from these trajectories of MPC; this is related to the optimization horizons of the two algorithms. Benefiting from global optimization, the SOC trajectory planned by the DP algorithm is optimal for the specific drive cycle, whereas the MPC-based energy management strategy obtains a locally optimal SOC trajectory at every prediction  Journal of Sensors horizon. And for the MPC-based energy management strategy, with the same constraints in the final SOC, the battery's power split capacity can be improved by increasing the prediction horizon.
To explore the relationship between prediction error, prediction horizon, and fuel consumption, the hydrogen consumption at different prediction horizons for UDDS and HWFET is shown in Tables 2 and 3, respectively. In these tables, the calculated time T cal of MPC is the optimized time of each prediction horizon, and for the DP, it is the entire drive cycle. For the UDDS, it should be noted that with the increasing of prediction horizon H p , the prediction accuracy EMSE ave decreases, and the fuel economy C H 2 improves. The subsequent problem is that the calculated time T cal increases; while for the HWFET, with the increasing of prediction horizon, the fuel economy improves first and then decreases, and the best fuel consumption could be obtained at H p = 20 s. These trends are shown in Figure 11 obviously.
As an onboard controller, the real-time performance of strategy should also be considered. The simulation time at laptop is 0.213 s with the prediction horizon 20 s; this data shows that the MPC-based energy management strategy has a real-time basis. In this work, considering the requirements of energy management strategy on fuel consumption and real-time performance, the prediction horizon is selected to be 20 s. The following analysis is established in the selected horizon. Table 4 shows the comparison between MPC-based and DP-based energy management strategy. In terms of fuel economy, the strategy's effect based on model predictive control (with 20 s as the prediction horizon's length) can reach 87.42% of DP-based in UDDS, while in HWFET, benefiting from a smaller forecast error, this data can rise to 90.09%.

Conclusions
Based on the simple vehicle model, the RBF-based predictor, and the DP-based solving algorithm, the work presented an MPC-based energy management strategy on a fuel cell vehicle. Models with different prediction horizons were built to study the influence of the prediction time steps.
Simulation results showed that the fuel economy performed best with 25 s as the prediction horizon for UDDS, while for HWFET the best fuel economy appeared at 20 s. In addition, large prediction horizon led to the longer optimizing time. In fact, to a real vehicle, in addition for energy management strategy, the onboard controller also needs to process a lot of real-time data from other components, which may result in much greater actual processing time than simulation. With this in mind, the prediction horizon of around 20 s is appropriate for the onboard MPC-based energy management strategy.
Although the structure of MPC-based energy management strategy is studied in this work, the results are based on the single prediction model with RBF neural network as the frame. In the future, prediction models with multiple algorithms will be studied to obtain the batter predictor.

Data Availability
The dataset and codes of this paper for the simulation are available from the corresponding author if requested.

Conflicts of Interest
The authors declare that there is no conflict of interest regarding the publication of this paper.