Keywords

1 Introduction

Electric Vehicles (EV’s) and Hybrid Electric Vehicle (HEV’s) are rapidly becoming an essential mode of modern transportation. The research on green energy and transport systems will lead to the adoption of EVs widely across the globe. Driving a battery powered vehicle does not generate harmful exhaust fumes as opposed to vehicles which run on gasoline. Hence, studies on developing effective capacity estimation methods for battery systems of EVs play a critical role in the improvement of EV’s and HEV’s battery life and range prediction research [1, 2]. Li-ion batteries are preferred over other battery chemistries, due to certain advantages such as high energy density [3, 4]. However, like any other cell chemistry, Li-ion also comes with certain common limitations, such as specific operational temperature and voltage range, and a need to improve the accuracy of capacity estimation. Likewise, a range of external and internal factors, also influences Li-ion battery’s performance. These may include temperature, voltage, charge/discharge cycles, ageing process, depth of discharge (DOD), and battery’s internal electro-chemical processes. Consequently, all the above stated factors affect the stabilisation of an EV’s battery pack and estimation of its driving range. Hence, an optimal framework for an EV battery capacity estimation is crucial to ensure reliable operation of battery management [2, 5, 6].

2 Background and Motivation

Estimating a battery’s capacity state also provides measures to assess its performance, health, and monitor the ageing process. A battery is easily influenced by the variation in external factors values due to vehicle load and driving habits. These driving habits may include, but are not limited to variation in the speed and braking. Such driving behaviours render capacity estimation of EV battery more challenging. Furthermore, the capacity estimation of an EV has to account for the factors mentioned in Sect. 2.1, as they affect battery performance [5, 6]. One of the measures to assess the battery capacity is the estimation of its state of charge (SOC), which is the ratio between the outstanding capacity of a battery to its available capacity [7]. A mathematical representation of SOC is shown below in Eq. (2.1) where \( Q_{n} \) is the available capacity of the battery and \( Q_{m} \) is the outstanding capacity of the battery.

$$ SOC\% = \frac{{Q_{n} }}{{Q_{m} }} \times 100\% $$
(2.1)

Several methods have been used by researchers to estimate SOC, such as conventional methods, adaptive filter algorithms and hybrid methods as categorised in our previous work [8]. All these methods come with some drawbacks for estimating EV battery’s SOC. These drawbacks include ruling out the effects of variation in external factors such as current, voltage and temperature on battery behaviour and life.

2.1 Machine Learning Methods for SOC Estimation of EV Batteries

Besides the aforementioned methods, machine learning algorithms, especially deep neural networks (DNN), have been widely used and proposed to estimate SOC of EV batteries. Some researchers have integrated other methods such as Kalman filters with equivalent circuit battery models to extract battery parameters in conjunction with DNNs to estimate SOC [9]. Whereas, others have extracted battery parameters by using battery testers and estimated SOC using DNNs [10, 11]. Works, such as Du. et al. have used constant temperature and steady discharge pulses for battery parameter extraction [12]. The extraction of steady state condition input parameters for learning algorithms, renders the learned model untrained for transient load demand and real-world situations.

On the other hand, works including and similar to Chemali et al.’s, have extracted data from non-steady state conditions by simulating different custom and standardised drive cycles, such as UDDS at multiple temperatures and C-rate [11]. However, to the best of authors’ knowledge, such works run the risk of overfitting the proposed models to training data by running tens of thousands of learning epochs and iterations to minimise the error metrics. Hence, possibly resulting in significant computational time and memory resources.

Following the discussion in this and the previous section, two research questions have been formulated:

  • RQ1—can the SOC of Li-ion EV cells be effectively estimated by identifying a minimal DNN architecture (number of hidden layers and neurons)?

  • RQ2—can the number of learning epochs of the DNN architecture proposed in RQ1 be optimised by searching the DNN hyperparameters space to estimate the SOC of Li-ion EV cells?

3 Experimental Setup and Design

The experiment was designed into four main phases, as shown in Fig. 2.1. The first phase is to facilitate model parameter extraction, which would be used as inputs to the DNNs. The second phase is to train a number of DNNs over a range of hyperparameter settings. Each DNNs would be validated to find the optimal model for SOC estimation with the given set of training input. The last two phases deal with testing and evaluating the best model determined from validation in the previous phase against test data. The performance is measured using multiple error metrics, followed by estimated result’s analysis to draw conclusion and recommendations for future work.

Fig. 2.1
figure 1

Experimental phases

3.1 Data Extraction

Capacity (CAP) tests via a battery cell tester (Bitrode) were conducted on eight 20 Ah LiFePO4 cells at a range of temperature variations T/°C = [0, 10, 25, 35, 45] per cell, at the CAPSE Laboratory, University of South Wales. A constant current of 1 C-rate was applied to charge and discharge cells in the battery tester; along with an environmental chamber to maintain the required temperatures, respectively. The sampling rate was set to be 0.1 Hz and the data extracted from all of the 40 CAP tests was individually stored on a host computer. The parameters extracted for DNN input included voltage: V/V (voltage), current: C/A, both battery and external temperature via environmental chamber’s temperatures in degree Celsius: Tb and Te, charged capacity of the cell in ampere hour: Qn/Ah, and battery state: S (rest, charge, and discharge). A typical charging profile based on the model parameters extracted from one of the cells is shown in Fig. 2.2. The effect of various temperatures on a LiFePO4 cell’s behaviour during the CAP test around voltage and current can be clearly seen from the plots and reinforces the need to train estimation models on a range of temperatures.

Fig. 2.2
figure 2

CAP test charge profile of a LiFePO4 cell on various temperatures

3.2 Deep Learning for SOC Estimation

The learning phase for SOC estimation was carefully designed to find answers to the research questions posed in Sect. 2.2. The aim was to find an optimal trend of hyperparameter values for a minimally configured DNN. Thus, achieving an effective SOC estimation model with minimal values of error metrics. Consequently, the study also focused on alleviating the need for using high specification hardware, such as GPUs for the learning phase by finding a trend of minimal number of neurons as well as hidden layer configuration for DNN architecture. A greedy search approach was deployed to find the optimal number of hidden layers and neurons along with other DNN hyperparameters values. Some of the hyperparameter and DNN configurations searched are listed in Table 2.1. All possible DNN architectures and hyperparameter settings resulted in 360 DNN models. Each model was trained and cross validated with 5 folds, using the entire data extracted from 6 out of 8 cells. Whereas 2 cells’ data was used to test the models, which approximately accounts for 25% of the extracted data.

Table 2.1 DNN hyperparameters list for greedy search

4 Results and Discussion

To evaluate the DNNs performance, using the error metrics value between actual SOC and estimated SOC; actual SOC was calculated using the formula provided in (1). The top 20 models, determined from the validation phase, shared common DNN architecture: [10,15,20] and hyperparameter settings except for the number of epochs. The learning rate for the top 10 models was 0.8, which signifies the generalisation capability of the architecture, as compared to the other smaller values provided to greedy search. The linear and locally weighted regression smoothing curves in the epochs vs residual error plot in Fig. 2.3: Actual and Predicted SOC from best estimation models at a range of temperatures [0,10,25,35,45] °C

Fig. 2.3
figure 3

Actual and Predicted SOC from best estimation models at a range of temperatures [0,10,25,35,45] °C

Figure 2.4 verify the decreasing trend in error rate as the DNN SOC estimation models’ learning epoch increased. Another interesting observation can be made from this plot, where each point in the plot shows the residual error at its final epoch. A 40% decrease ~(50–10) in number of epochs has cost a less than ~0.15 increase in error metrics values. If the trend in the cost vs number of epochs remains similar with larger and richer training datasets, a slight trade-off on accuracy can bring significant reduction in temporal costs and computing resources in the learning phase of SOC estimation. A number of error metrics were used to evaluate the performance of the best model other than residual error as shown in Table 2.2. The decrease in each error metrics’ value from validation to test phase provides evidence for the model’s generalisation capability as it has performed better on unseen test data. The actual and estimated SOC plots at charging from the best model in in Fig. 2.4 also depict that the model has generalised well on unseen data and did not overfit on training data. This is further supported by the low MAE reported in Table 2.2. as well as its comparison with Chemali et al.’s MAE values on three different test data sets: 0.39, 1.85 and 1.35 [12]. It is worth mentioning that while the lowest MAE is lower and highest MAE is higher than the reported MAE in this work, the number of learning epochs for their work (85000) is significantly higher than the best model’s learning epochs (~50).

Fig. 2.4
figure 4

Epoch vs error along with smoothed trends curves

Table 2.2 Error metrics of the best SOC estimation model from validation and test phase

5 Conclusion

Based on the analysis driven from results and the discussion in the previous section we can answer the research questions posed in Sect. 2.2. A minimal DNN architecture has been identified from 360 DNN models with different configurations of minimal architectures to effectively estimate EV battery cells SOC with a performance metrics value on par with state of the art research work. Furthermore, the number of learning epochs to reduce computation resources and temporal costs, as well as to avoid risk of overfitting, have shown to be significantly less in comparison with existing research works to the best of the authors’ knowledge.

The DNN estimation models can be further improved by training and testing on data extracted from more battery tests, such as HPPC tests on a range of temperatures and C-rate. Similarly, adding custom and standard drive cycles data extracted from the battery cells to both the training and testing sets can further inform the estimation model on impacts of external factors affecting EV battery’s behaviour.