Towards an Optimal Deep Neural Network for SOC Estimation of Electric-Vehicle Lithium-Ion Battery Cells

This paper has identiﬁed a minimal conﬁguration of a DNN architecture and hyperparameter settings to effectively estimate SOC of EV battery cells. The results from the experimental work has shown that a minimal conﬁguration of hidden layers and neurons can reduce the computational cost and resources required without compromising the performance. This is further supported by the number of epochs taken to train the best DNN SOC estimations model. Hence, demonstrating that, the risk of overﬁtting estimation models to training datasets, can also be subsided. This is further supported by the generalisation capability of the best model demonstrated through the decrease in error metrics values from test phase to those in validation phase.


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].

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.
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.

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:

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.2. The effect of various temperatures on a LiFePO 4 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.

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

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 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 [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).

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.
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.