Energy Control Strategy of Fuel Cell Hybrid Electric Vehicle Based on Working Conditions Identification by Least Square Support Vector Machine

Aimed at the limitation of traditional fuzzy control strategy in distributing power and improving the economy of a fuel cell hybrid electric vehicle (FCHEV), an energy management strategy combined with working conditions identification is proposed. Feature parameters extraction and sample divisions were carried out for typical working conditions, and working conditions were identified by the least square support vector machine (LSSVM) optimized by grid search and cross validation (CV). The corresponding fuzzy control strategies were formulated under different typical working conditions, in addition, the fuzzy control strategy was optimized with total equivalent energy consumption as the goal by particle swarm optimization (PSO). The adaptive switching of fuzzy control strategies under different working conditions were realized through the identification of driving conditions. Results showed that the fuzzy control strategy with the function of driving conditions identification had a more efficient power distribution and better economy.


Introduction
The introduction of a power battery can make up for the shortcomings of fuel cell hybrid electric vehicles (FCHEV), such as the inability to recover braking energy, slow start speed and soft output characteristics. The dual power source (fuel cell and battery pack) can make the fuel cell hybrid electric vehicles (FCHEVs) produce a better power performance, but how to make the power source power distribution more reasonable and better improve the economy is a research difficulty. Based on previous experience, researchers developed rule-based energy management algorithms, such as thermostatic control strategy (TCS) [1] and a power following control strategy (PFCS) [2,3]. Fuzzy control strategy (FCS) [4][5][6] and fuzzy control strategy optimized by other algorithms [7] can adapt to the requirements of vehicle nonlinear control and effectively distribute the power between the power sources of fuel cell hybrid vehicles. However, due to the lack of road condition information, they are difficult to further improve the working efficiency and the economy of power sources in complex working conditions. Another control strategy based on optimization, such as dynamic programming (DP) [8][9][10], are widely used in hybrid electric vehicle energy management strategy because they can achieve global optimization. However, those methods will increase the computational burden and make it difficult to realize the online application. In order to simplify the calculation, some strategies, such as equivalent consumption minimization strategy (ECMS) [11][12][13], Pontryagin minimum principle strategy (PMPS) [14,15] and stochastic dynamic programming (SDP) [16], further improve the energy management performance on the basis of effectively reducing the calculation amount. For some intelligent algorithms, such as particle swarm optimization (PSO) [17] and genetic algorithm (GA) [18], the fuel economy can also be improved by optimizing some relevant parameters based on the rule-based control strategy.
Working conditions have a profound impact on the economy and power source performance of FCHEVs. Ahmadi et al. [19] investigated the influence of driving patterns, and they found that various driving patterns under different conditions could affect the degradation of a fuel cell, and then affect the economy of the fuel cell vehicles. Raykin et al. [20] investigated the influence of driving patterns under different working conditions and an electric power supply on the well-to-wheel energy use and greenhouse gases of a plug-in hybrid electric vehicle (PHEV). When formulating the FCHEVs' energy control strategy, some references mentioned that they took single working condition into account, and there were certain limitations in improving the economy under different working conditions. Moreover, they did not consider the efficient working area of a fuel cell (FC) and battery pack to give full play to their respective advantages. Under the condition that working conditions can be identified, the energy management strategy of FCHEV should be adjusted according to the actual situation to achieve efficient and reliable power distribution among power sources, improve economy and extend the service life of power sources.
A lot of scholars have studied working condition identification. References [21][22][23][24] based on a fuzzy control recognizer, realized the identification of driving conditions. However, membership functions and rules of the fuzzy controller were selected and formulated based on personal experience, and the ideal effect could be achieved after multiple debugging. Clustering methods also play a role in the field of driving conditions recognition [25,26]. In [25], working conditions were divided into five typical working conditions by way of a clustering analysis method, then working conditions were identified by a Euclid approach degree. Yu et al. [26] identified high impact factors affecting pattern characteristics from static and quasi-static environment and traffic information, then proposed a trip/route division algorithm based on data clustering method. However, the selection of initial clustering center affected the clustering analysis results. Recently, machine learning has been further applied. Neural networks, such as back-propagation (BP) neural network [27] and learning vector quantization (LVQ) neural network [28,29], involve first, characteristic parameters that have an important influence on driving conditions being selected as the input, then, the identification period of the working condition samples are classified. After training the samples, the prediction of future working conditions can be realized. However, the accuracy of neural network depends on its structure. Chen [30] et al. proposed an improved hierarchical clustering algorithm to divide the driving cycle data into four groups, and then applied a support vector machine (SVM) to predict driving conditions based on the clustering results.
The least square support vector machines (LSSVM) based on support vector machines (SVM), compared with SVM, can complete a prediction in a shorter time and has a great generalization ability. Moreover, LSSVM is not subject to the set of algorithm structures and has good robustness in handling regression and classification problems.
In order to improve the performance of FCHEV, this paper proposes a driving condition recognizer. By extracting feature parameters and segmenting recognition segments from driving conditions information, LSSVM optimized by CV is used to realize working condition recognition. Energy management controllers based on a fuzzy control under different working conditions are established and optimized. Combined with the driving conditions identification, the energy management controller adopts corresponding fuzzy control strategy according to driving conditions to improve the performance of FCHEV.

Vehicle Structure and Parameters
The FCHEV was a front-drive vehicle with the structure shown in Figure 1. The fuel cell system was connected to the Controller Area Network (CAN) bus through a one-way DC/DC converter, while the battery pack was directly connected to the CAN bus. The motor drives the vehicle through the final drive and differential. The complete vehicle parameters of a fuel cell hybrid electric vehicle are shown in Table 1.  In this paper, the vehicle model of FCHEV was established in AVL Cruise, as shown in Figure 2, and the control strategy model was established in Matlab/Simulink, shown in Figure 3. In Figure 2, the overall simulation model includes driver module, fuel cell system, power battery pack, motor and controller, one-way DC/DC converter, final drive, and energy management module. The blue line and red line represent mechanical connection electrical connection, respectively.

Fuel Cell Module
The fuel cells in this paper were proton exchange membrane fuel cells (PEMFC), and they were built out of membrane electrode assemblies (MEA), which included the electrodes, electrolyte, anode catalyst layer, cathode catalyst layer (CCL), and gas diffusion layer (GDL). The detailed modeling process is found in references [31,32]. In the fuel cell component, in addition to the fuel cell, there was a simple compressor model, and its properties are shown in Table 2. The compressor delivered hydrogen continuously to the fuel cell stack, which generated electricity to drive the motor. The voltage of the fuel cell electrochemical model is calculated as follows: where U fc is the output voltage, U oc is the ideal open circuit voltage, η 0 is the cathode voltage loss, V act is the activation over potential, V CCL is the voltage loss caused by the oxygen transmission loss in the cathode catalyst layer (CCL), V GDL is the voltage loss caused by the oxygen transmission loss in the anode catalyst layer, j 0 and I st are the electric flow density and current of the stack, while A area is the effective area of the fuel cell, R is the ohmic internal resistance of the fuel cell. The activation loss can be defined as follows.
where b Tf is the Tafel slope which describes the speed of the chemical reaction, and c cc is the oxygen concentration in the cathode channel, while c ci is the oxygen concentration at the channel inlet. Moreover, j a and j * can be defined as where i * is the volumetric exchange current density, and S pc is the CCL proton conductivity, in addition, l CCL is the thickness of the CCL. The voltage loss V CCL can be defined as where F is the Faraday constant, D CCL is the oxygen diffusion coefficient in the CCL. j* l and B can be defined as where D GDL is the oxygen diffusion coefficient in the GDL, while l GDL is the thickness of GDL.
The voltage loss V GDL can be defined as Assuming that the fuel cell stack consists of n fuel cell cells, the output power of the fuel cell stack is The efficiency of fuel cell stack can be expressed as follows: The single fuel cell properties are shown in Table 3.

Power Battery Pack
The lithium battery selected in this paper had a capacity of 24 Ah and a rated voltage of 3.3 V, and its specific parameters are shown in Table 4. Its equivalent circuit model adopted the Rint model, as shown in Figure 4a. The voltage of the battery output to the CAN bus is: where U OCV is the open circuit voltage of lithium battery, U Out is the output voltage, I b and R 0 are the current and ohmic internal resistance of lithium battery respectively.  SOC, an important parameter of a lithium battery, is expressed by the following equation: where η is the coulomb efficiency, in this paper, η = 1, SOC 0 was the initial value, sampling time ∆t = 1 s, and C P was the actual capacity of the battery. Through experiments, the parameters relationships of the battery are shown in Figure 4b.

Typical Driving Conditions
Working conditions of a vehicle have an important impact on economy and power distribution. Therefore, a more efficient energy management strategy can be developed by predicting the future working conditions.
In this paper, three typical driving conditions were selected, namely UDDS (Urban Dynamometer Driving Schedule), EUDC (Extra Urban Driving Cycle) and US06 (Highway Driving Schedule), as shown in Figure 5, which corresponded to an urban condition, suburban condition and highway condition, respectively. In an urban working condition, the vehicle speed is low and frequent parking occurs. The average vehicle speed is less than 35 km·h −1 , moreover, the vehicle is in a state of low power output. The speed is fast in highway conditions, and the average speed is about 70 km·h −1 , in addition, the output power of the car is relatively large. The suburban working condition is in the middle of the two, with an average speed of about 60 km·h −1 .

Selection of Working Condition Characteristic Parameters
The selection of characteristic parameters of working conditions is the key to accurately identifying future working conditions. In principle, more characteristic parameters is more helpful for prediction, but that requires high computational power. In contrast, too few characteristic parameters cannot cover the information of working conditions, which may lead to a large prediction deviation. Many scholars have studied the selection of characteristic parameters of driving conditions [25,30,[33][34][35]. Based on some research and the importance of each parameter in driving conditions identification, six common characteristic parameters were selected, i.e., acceleration time/total time (r c ), deceleration time/total time (r dc ), time of uniform speed/total time (r u ), average speed (v a ), average acceleration (a c ) and average deceleration (a dc ). Six characteristic parameters of three working conditions are shown in Table 5.

Dividing of Working Condition Samples
The time length of the working conditions samples, namely, the identification cycle and update of identification cycle, will also have an impact on the working condition recognition. The specific segmentation of the working condition recognition samples is shown in Figure 6. T is the identification period, therefore, six characteristic parameters in this period of time can be calculated to identify the working conditions of this sample. While s is the update of the period, that is, the time difference between the beginning of the previous cycle segmentation and the beginning of the current cycle segmentation. If T is too long, although it contains more information, it will increase useless information and calculation burden, which will reduce the effect of recognition. If T is too short, it will not accurately reflect the real situation of working conditions. Similarly, a too small s leads to frequent cycle switching, which will cause a burden on the processor, while a too large s is not conducive to the timely switching of working conditions. References [35,36] studied in detail the effect of T and s on the accuracy of working conditions identification. Based on considering the accuracy and calculation cost, T = 100 s, s = 3 s.

Least Squares Support Vector Machine
LSSVM is able to classify samples by mapping them into high-latitude feature Spaces. LSSVM replaces the inequality constraints of problems in SVM with a set of linear equality constraints, thus simplifying the solution of Lagrange multipliers. A training set is considered with n data samples to be (X i , y i ), where input data X i ∈ R n , output data y i ∈ R. A linear function in the high-level feature space will be used to fit the samples.
where ϕ(X) is a nonlinear mapping function, ω is the weight vector in the feature space, and b is the bias term.
According to the principle of structural risk minimization and taking into account the complexity of function and fitting error, the optimization problem of LSSVM can be expressed as: where ξ i is the error variable and C is the penalty factor. Converting Equation (16) to unconstrained functions by building Lagrange functions and solving this Lagrange function, the classification prediction model of LSSVM can be obtained, as shown in Equation (8), and its structure is shown in Figure 7. Combined with Section 3, six characteristic parameters are taken as the input of the LSSVM, and the output is the working condition categories: where the radial basis function (RBF) is selected as the kernel function, namely K(X, Xi) = exe(− X − Xi 2 /(2σ 2 )), α is the Lagrange multiplier.

The Influence of Key Parameters on the Accuracy of LSSVM
If σ→0, then K(X, X i )→0, which means that all the mapped points have the same distance from each other, that is, there is no clustering phenomenon. However, If σ→∞, then K(X, X i )→1, which means that all sample points will be divided into the same class and cannot be distinguished. As for the penalty factor C, if C is too large, ξ i →0, the tolerance of samples between boundaries is very low, and there are less misclassifications, which means the fitting of samples is good, however, the prediction effect is not always good; on the other hand, if the value of C is too small, there are more samples between two boundaries, resulting in a greater possibility of misclassification, and the fitting of samples decreases.
The accuracy of LSSVM's model depends on the kernel parameter σ and the penalty factor C. A too large σ will reduce the model's accuracy, but a too small σ will lead to overfitting. The penalty factor C will affect the error and complexity of the model. Therefore, in this study, the cross-validation method was used to obtain the optimal parameters.

The K-Fold Cross-Validation for Optimizing LSSVM
Cross-validation has been widely used to estimate prediction errors. In this work, K-fold cross-validation combined with grid search was applied to optimize LSSVM, which could overcome the limitations of the holdout validation [37]. The steps to optimize LSSVM were as follows: (1) Establish grid coordinates. Let a = [-10, 10], b = [-10, 10], and the step size is 0.5, then the mesh points of the model parameters are σ = 2 a and C = 2 b respectively. In this work, the exponential function was selected to divide the grid, which would ensure that the parameter value was not negative. (2) Divide the sample data and calculate the test error. The training data are divided into K subsets (K = 10, which means that the CV is 10-fold cross-validation method). For each group (σ, C) in the grid, a 10-fold cross validation method was applied to iterate the training data 10 times, and the mean value of the mean square error (MSE) of the test results under this group of parameters could be obtained. (3) Get the optimal combination of parameters. Repeat (2) to replace the parameter σ and C, and calculate the mean square deviation of the training model under all the parameter combinations in the grid in turn. After comparing one by one, the parameter combination corresponding to the minimum mean square deviation is the optimal parameter combination in the grid interval.
In order to present equidistant grid search results more clearly, grid coordinates (σ, C) are converted to logarithmic coordinates (log 2 σ, log 2 C).

Fuzzy Energy Management Strategy Based on Working Condition Identification
Fuzzy control based on the theory of fuzzy mathematics, fuzzes the actual input and output, and formulates rules through experience. These kinds of simulation of a human's approximate reasoning and comprehensive decision-making process has good robustness and adaptability. Fuzzy energy management strategies [4][5][6] developed by some researchers were aimed at a single working condition. In addition, fuzzy control rules based on personal experience are difficult to deal with complex multi-working conditions. Therefore, on the basis of condition identification, three fuzzy energy management strategies were formulated to deal with urban, suburban and expressway conditions, respectively. Besides, PSO is used to optimize the fuzzy control under various working conditions with total equivalent energy consumption as the objective function, and the adaptive switching effect is achieved through the identification of working conditions. It should be noted that the following fuzzy controller and optimization take the urban working condition as an example.

Fuzzy Controller Design
(1) Selection of input and output variables of fuzzy controller.
The SOC of the battery pack and the total power demand P r of FCHEV were selected as the input of the fuzzy controller, while the output is the output power P fc of the fuel cell. The power demand relationship is as follows: (18) where P b is the output power of the battery, and P r includes the power of the drive motor and the power consumed by accessories.
(2) Fuzzy distribution of input and output variables.  The fuzzy control rules of FCHEV are formulated according to the following principles: 1 When the SOC of the power battery is too low, the output power of the fuel cell should not only meet the requirements of driving the vehicle, but also charge the battery to make the SOC of the power battery rise to a reasonable range (SOC = 40-80%). 2 When the SOC of the power battery and the demand power are both medium level, the fuel cell acts as the active power source and changes with the demand power. SOC of battery fluctuates in a reasonable range, which is beneficial to prolonging battery life. 3 When SOC is too high, the power battery acts as the main power source, and the output power of the fuel cell is as small as possible to reduce the SOC to a reasonable range. 4 When the demand power is too large, the power battery and fuel cell provide output power together.

Fuzzy Controller Optimization Based on PSO
As an optimization algorithm, PSO is a solution to reducing the influence of making fuzzy control strategy based on personal experience. In this paper, the membership functions of the input and output of the fuzzy controller were selected as the parameters to be optimized, and the objective function was total equivalent energy consumption (TEEC) of the power sources, i.e., where E fc (x) and E b (x) are the equivalent electric energy consumption of the fuel cell and electric energy consumption of battery, respectively, while G i (x) is the constraint condition of the vehicle, such as the time of acceleration and SOC fluctuation range of the battery pack. The distributions of control rules under urban working condition before and after optimization are shown in Figure 8.

Fuzzy Energy Management Based on Condition Identification
After identifying working conditions by LSSVM, the corresponding fuzzy control rules are selected by the fuzzy controller according to the working conditions. The flow chart of the energy management strategy based on working conditions identification is shown in Figure 9. Firstly, the characteristic parameters were extracted from the working condition information and sample segmentations were determined, and then working condition identifications were carried out by LSSVM. Fuzzy control strategies were optimized under three working conditions, and corresponding fuzzy control rule was selected under a specific working condition to realize the adaptive switching of the control strategy under complex working conditions.

Results of Working Conditions Identification
The samples of three typical working conditions were divided into 730 samples, of which 547 were training samples and the other 183 were validation samples. Figure 10a describes the iterative optimization process of LSSVM's parameters under grid search and cross-validation. Among the 183 validation samples shown in Figure 10b, the recognition accuracy reached 98.36%. The key parameters of LSSVM optimized by CV were σ = 2.64, C = 25.61. Figure 10c shows the randomly generated driving conditions, where the LSSVM could identify the random driving conditions with an accuracy of 100%.

Fuzzy Control Energy Management Strategy Based on Driving Conditions Identification
In order to verify the effectiveness of the proposed energy management strategy, it was compared with the power follow control strategy in the efficiency of fuel cell stack, the SOC fluctuation of battery pack and the economy, at medium SOC level (SOC = 60%) and high SOC level (SOC = 85%).

The Initial SOC of Battery Pack Was 60%
As shown in Figure 11a, the vehicle speed of the proposed fuzzy control strategy (FC1) can well follow the real vehicle speed. In Figure 11b, for total equivalent energy consumption, the power following control strategy (PFCS) was 3.99 (kW·h), which was 5.26% higher than that of the traditional fuzzy control strategy (FC2) (3.78/kW·h). In Figure 11c,d and Table 6, the average efficiency of the fuel cell stack of the FC2 was 67.62%, which was 2.05% higher than that of PFCS. The fluctuation range of SOC of FC2 was 58.56-61.55%, which was gentler than that of PFCS, for the ∆SOC of FC2 improved by 6.67% compared with PFCS.
In Figure 11b, for total equivalent energy consumption, FC1 was 3.65 (kW·h), which was 3.44% lower than that of FC2. In Figure 11c,d and Table 6, the average efficiency of the fuel cell stack for FC1 was 68.71%, which was 1.09% higher than of FC2. The fluctuation range of SOC of the FC1 was 58.15-61.00%. Compared with FC2, the ∆SOC of FC1 improved by 0.47%, which was conducive to the durability of the battery pack. Therefore, when the SOC initial value was 60%, the FC1 was better than the FC2 and PFCS in improving the efficiency and durability of power sources and the economy of FCHEV.  As shown in Figure 12a, the speed of FC1 can also follow the actual speed well, which is similar to the case of SOC = 60%. In Figure 12b, for total equivalent energy consumption, the PFCS was 4.45 (kW·h), but the figure for FC2 was 3.95 (kW·h), which was 11.24% lower than that of PFCS. In Figure 12c,d and Table 7, the average efficiency of the fuel cell stack of the FC2 was 68.22%, which was 2.66% higher than that of PFCS (65.56%). The fluctuation range of SOC of PFCS was 80.55-86.12%, while the range of SOC for FC2 was 74.80-85.00%, so the ∆SOC of PFCS improved by 4.63% compared with FC2.  In Figure 12b, for total equivalent energy consumption, FC1 was 3.85 (kW·h), which was 2.53% lower than that of FC2. In Figure 12c,d and Table 7, the average efficiency of the fuel cell stack for FC1 was 68.62%, which was 0.40% higher than of FC2. The fluctuation range of SOC of the FC1 was 75.64-85.00%, which meant the ∆SOC of FC1 improved by 0.84% compared with FC2, so FC1 was more conducive to the durability of the battery pack. Therefore, when SOC = 85%, PFCS was better than FC1 and FC2 in controlling the fluctuation of SOC, on the other hand, FC1 showed that it had better performances on the average efficiency of the fuel cell stack and the economy than the other two control strategies.
To summarise, in order to verify the effectiveness of the proposed fuzzy control strategy, it was compared with the traditional fuzzy control and power following control strategy in the case of SOC = 60% and SOC = 85%. It can be seen form Tables 6 and 7, when SOC = 85%, the total equivalent energy consumption of PFCS, FC1 and FC2 were much more than these of SOC = 60%, particularly for PFCS, where the largest difference of the equivalent energy consumption occurred between SOC = 60% and SOC = 85%. At a high SOC level (SOC is above 80%), the battery pack has sufficient power, and the braking energy recovery rate of the FCHEV is low, so as to avoid overcharging of the battery pack. In terms of the operating efficiency of the fuel cell stack, when SOC = 85%, though the average efficiency of the fuel cell stack of FC1 is slightly lower than that of SOC = 60%, the figure for FC1 is still the highest, which indicates the stability of the proposed fuzzy control to maintain the high efficiency of the fuel cell stack. As for the fluctuation of SOC, the expected SOC range of the battery pack of FCHEV was 40-80%, which can prevent the overcharging and over-discharging of the battery pack, thus extending the life of the power battery. It can be seen from Figure 12d that more hydrogen was consumed to reduce the fluctuation of SOC, so the SOC of PFCS was kept above 80%. Although the fluctuation of SOC became smaller, it did not fall rapidly to the expected range, which showed that the power distribution of PFCS was insufficient at a high SOC level. On the contrary, the SOC of FC1 and FC2 decreased from 85% to 75.64% and 74.80% respectively, moreover the fluctuation of SOC for FC1 was smaller, which was more conducive to extending the life of the power battery. It was noted that at a high SOC level, the performance gap between FC1 and FC2 had narrowed. However, at a high SOC level or medium SOC level, the proposed fuzzy control strategy showed the better performances on the working efficiency of fuel cell stack, controlling SOC fluctuation and the economy of FCHEV.

Conclusions
In order to deal with the influence of complex working conditions on economy and power distribution between power sources on FCHEV, an energy management strategy based on driving condition identification was developed.
(1) After selecting the characteristic parameters and dividing the working condition samples of three typical driving conditions, working conditions identification were realized by LSSVM. (2) Fuzzy control rules under different working conditions were formulated, and the total equivalent energy consumption of power sources were taken as the objective function to optimize fuzzy control rules by PSO, and the adaptive switching of the fuzzy control could be realized on the basis of working condition identification. (3) Simulation results showed that at high SOC level or medium SOC level, the proposed fuzzy control strategy had the ability to recognize the future driving condition, showed a better performance than the traditional fuzzy control strategy and power following the control strategy on improving the working efficiency of the fuel cell stack, controlling the fluctuation of SOC of battery pack and enhancing the economy of FCHEV. (4) The future work is to establish more complete vehicle driving conditions, and choose different working condition predictors to compare their performance of working conditions prediction, so as to choose a more reliable and efficient working condition predictor.

Conflicts of Interest:
The authors declare no conflict of interest.