Real-Time Prediction of Capacity Fade and Remaining Useful Life of Lithium-Ion Batteries Based on Charge/Discharge Characteristics

of Fade and Remaining Useful Life of Lithium-Ion Batteries Based on Charge/Discharge Characteristics. Abstract: We propose a robust and reliable method based on deep neural networks to estimate the remaining useful life of lithium-ion batteries in electric vehicles. In general, the degradation of a battery can be predicted by monitoring its internal resistance. However, prediction under battery operation cannot be achieved using conventional methods such as electrochemical impedance spectroscopy. The battery state can be predicted based on the change in the capacity according to the state of health. For the proposed method, a statistical analysis of capacity fade considering the impedance increase according to the degree of deterioration is conducted by applying a deep neural network to diverse data from charge/discharge characteristics. Then, probabilistic predictions based on the capacity fade trends are obtained to improve the prediction accuracy of the remaining useful life using another deep neural network.


Introduction
Energy storage devices (i.e., batteries) for electric vehicles (EVs) are among the most expensive components and are essential for supplying the energy required to drive these vehicles. A malfunction of batteries and their reduced lifetime that hinders an adequate energy supply to drive the vehicle may lead to accidents in the worst case. Accordingly, various approaches have been proposed to increase the lifetime of batteries while maintaining the size of a battery pack and protecting from electromagnetic interferences (EMIs) [1,2]. Such various efforts have improved the performance and safety of batteries used in electric vehicles, but there is still a possibility of malfunction at any time. Therefore, the deterioration of batteries supplying power to an EV must be continuously monitored [3]. Batteries are generally charged and discharged through repetitive electrochemical redox processes. Hence, it is difficult to accurately predict the remaining useful life (RUL) using theoretical models based on the mechanism of functional degradation by utilizing the data from experimental measurements of state of charge (SOC), state of health (SOH), and state of life (SOL) because of these nonlinear characteristics [4]. Moreover, the battery characteristics are determined by various features such as the microscopic structure of the active materials in the anode and cathode, as well as the operation environment, conditions, and frequency of use [5,6]. It is cumbersome to set the requirements according to the characteristics of the target applications. Therefore, various approaches are required to improve the battery management system (BMS).
To assess the reliability of a system relying on battery power, prognostics and health management (PHM) [7,8] based on measured data can be applied. This technique is an advancement compared with regular maintenance, corrective maintenance, and conventional diagnosis of the system state [9]. Therefore, this technology can improve the function of BMSs for EV batteries with high voltages, which can increase user and manufacturer satisfaction [10]. Research is being actively performed on technology to predict the RUL of lithium-ion batteries (LIBs) by applying prognostics and health management based on machine learning [11][12][13][14][15][16][17]. Conventional prognostics and health management detect deterioration or failure due to aging or harsh environments of various mechanical devices or electronic boards such as BMS [18]. In addition, analysis and predictive diagnosis identify and characterize anomalies, and facility management helps to maintain systems and processes. Although most early studies on prognostics and health management have focused on aerospace engineering, they are currently being applied to diverse areas such as rail transportation and power generation [19][20][21].
In the past, RUL prediction could be achieved by measuring their impedance after removing the batteries from a vehicle for evaluation according to the frequency based on the potentiostatic/galvanostatic method [11,12]. During the continuous charging and discharging of the battery, its internal parameters (e.g., conductivities of electrode active materials and electrolyte ions) are used in this method to identify the relationship between the battery internal resistance and discharge capacity to predict the RUL. In fact, after several charge/discharge cycles, the battery deteriorates because of irreversible reactions, and the discharge capacity is reduced over the cycles [22].
Other methods for RUL prediction include data analysis, model-based methods, and hybrid methods that combine data analysis and models [11][12][13][14]. Recently, data analysis has been more frequently used and involves acquiring and analyzing performance data that change over time according to the unique characteristics of the battery. Alternatively, physics-based methods rely on mathematical models to predict system deterioration [21,23]. Although mathematical modeling based on the analysis of the charge/discharge mechanisms can provide highly accurate and interpretable results, it is difficult to model large battery packs as opposed to single cells, and environmental variables cannot be reflected in the model even if interlock circuits and automatic control are considered [10]. RUL prediction using filtering, a statistical technique, has recently attracted research attention [13,14]. For instance, the particle filter (PF) [13], which has been primarily used in the fields of control, location tracking, and pattern recognition, has been recently used for battery RUL prediction.
Although data obtained from simulations of data-driven models can be used for RUL prediction, the low accuracy and efficiency of data analysis based on statistical methods render machine learning necessary for accurate and fast prediction. Methods based on machine learning involve the analysis of data relevance, data stratification through multiple weighted learning models, and other related processes. Learning based on the battery historic data allows the RUL to be predicted based on currently available data. Therefore, the prediction accuracy depends on the quantity and quality of the collected data.
Commonly used machine learning techniques include long short-term memory (LSTM), artificial neural networks (NNs), support vector machines (SVM), and relevance vector machines (RVMs). Among these, NNs further developed into a generalized regression artificial neural network that estimates the relationship between the cause and the factor [24]. This technique can be effectively used in BMS because it reflects the probability of failure of the features from the system according to the representativeness of the learned data. Thus, it is evaluated as a promising PHM because it is the basis of deep learning and can compensate for the limitations of prediction [25]. In addition, the regression neural network technique is probabilistic in the prediction results, so filtering is often used to improve accuracy [17,19]. For example, researchers from Toyota recently obtained data from 124 battery cells and predicted the life of the cells with a probability of approximately 90% [15]. Then, they used the prediction to optimally charge the battery for 10 min. If the data needed for battery RUL prediction are insufficient, it is difficult to obtain valid predictions for a distant horizon. Therefore, in addition to research on enhancing the performance of machine learning algorithms, it is crucial to obtain high-quality experimental data under a variety of conditions and determine representative features for prediction through preprocessing.
In this study, we applied deep neural networks (DNNs) to charge and discharge data of lithium-ion batteries provided by the Ames Prognostics Center of NASA (National Aeronautics and Space Administration), a U.S. research institute specialized in aerospace. Then, we predicted the RUL of the batteries by analyzing 11 battery features and classifying them into training and test data. The 11 features include five test environment and test condition features and six geometric features from the curves related to the battery deterioration, which is caused by an increase in internal resistance over charge/discharge cycles. We implemented a machine learning algorithm in Python to learn the discharge capacity according to each feature and then predict the capacity from unseen data. Finally, we analyzed the capacity fading characteristics related to performance degradation with increasing charge/discharge cycles for RUL prediction. We compared a PF, which has been extensively used in prior studies, with the proposed prediction method regarding estimation error considering DNN parameters such as the hidden layers and activation functions. Furthermore, we evaluated the feature extraction and analysis according to the training data and analyzed the findings. Figure 1 shows the diagram for data preprocessing (i.e., feature extraction) and RUL prediction adopted in this study. As the charge and discharge data of the lithium-ion batteries are related to performance degradation that may occur over the cycles, we determined charge/discharge curve features and extracted additional features from the test environment and condition data, obtaining 11 features. We used two DNNs to predict the capacity fade and RUL of batteries: (i) the SOH (i.e., capacity fade) of batteries was predicted using 11 features, and (ii) the RUL prediction was performed based on the SOH prediction results obtained in the previous step. Finally, the prediction results are com-pared with the test data to determine their accuracy. To validate the proposed DNNs, the battery test data used for prediction were excluded from the training.

Preprocessing
To create an accurate machine learning model, big data must be refined, classified according to the application, and prioritized according to relevance. For example, for a learning model to determine capacity fading due to battery deterioration, the available data include charge voltage/current, discharge voltage/current, temperature condition, usage frequency, and production date. From the available data, the production date has a low relevance for capacity fading estimation. The analysis of big data related to lithium-ion battery charge and discharge and the exclusion of irrelevant data corresponds to data mining. In fact, regardless of data availability, accurate results may not be obtained if redundant or irrelevant data are included in the model.

Data Structure
The publicly available NASA data used in this study correspond to the lithium-ion battery charge and discharge tests. These data were collected on the Gen2 18650 lithiumion batteries of Idaho National Laboratory (INL: Idaho Falls, ID) under the Advanced Technology Development (ATD) program. In addition, the data were collected in a study from 2007 by Saha and Goebel to develop battery failure prognostics and prediction for accident prevention in the aerospace field [16]. The study was intended to compare and analyze data obtained via modeling and data obtained from a hardware testbed for predicting battery deterioration.
In this study, we used the charge and discharge test data obtained from the hardware testbed to train an RUL prediction model. The data comprised six datasets according to the experimental conditions and were classified considering the experiment end capacity, discharge current, discharge conditions, and experimental temperature. In addition to the charge and discharge voltage and current during the battery cycle testing, various types of data were included in each dataset, as shown in Figure 2. Although the measured impedance can indicate battery deterioration or aging, it was irregularly measured after various cycles and not in every cycle during data collection. On the other hand, although impedance can provide accurate predictions of battery aging, the battery must be separated from its host system, and the electrochemical impedance spectrometer used for the measurements is costly. In this study, we aimed to avoid expensive equipment for determining battery deterioration and instead use only data that can be collected during charge and discharge from all the battery data that can be collected during the operation of an electric vehicle to achieve RUL prediction.

Feature Extraction
To predict the capacity at any battery cycle, features must be extracted according to the corresponding test environment. We extracted features for machine learning from the lithium-ion battery data provided by NASA. Figure 3 shows the current and voltage curves during the battery charge and discharge over time. As the number of cycles increased, although the curves retained a similar shape, various changes occurred in the curves due to aging. For example, as the internal resistance increased, the constant-voltage section gradually decreased during discharge, and the usable time continuously de-creased. Lu et al. [26] proposed a method to extract four types of features from the curves, called geometric features, and predicted the battery RUL by applying dimensionality re-duction to the NASA battery data. The four geometric features are the length of the constant voltage section, maximum curvature radius, area under the constant voltage section in the charge current curve, and initial slope of the discharge. After extracting the four geometric features, we analyzed the extraction of additional features. Figure 3a shows the current curve over 168 charge cycles for battery B0005 from the dataset. As the number of cycles increased, the constant-voltage section increased, and the constant-current section decreased. Figure 3b shows the voltage curve over 168 discharge cycles of the battery B0005. Besides the initial slope, we extracted two additional geometric features, namely the discharge section above 3 V and the curvature radius of the voltage drop. Figure 4 shows the changes in current and voltage at 10, 50, 100, and 150 charge/discharge cycles, along with the corresponding definitions of the six extracted geometric features (a-f). Numerous variables affect battery deterioration over time. Excluding electrochemical elements, they can be classified as test environment and test condition variables. We used the test temperature (test environment), discharge voltage and current (test condition), and discharge time and charge time per cycle to complete the features for training and evaluation of the proposed machine learning model. The output label for the model is the capacity per cycle, and Table 1 lists the extracted features used to construct the corresponding datasets. Length of voltage range above 3 V Discharge 6 Maximum radius of curvature in voltage curve Discharge 7 Discharging time 8 Charging time 9 Test temperature 10 Discharging voltage 11 Discharging current RUL: remaining useful life.

Proposed DNNs for Capacity Fade and RUL Prediction
In a DNN structure, the input data are processed through multiple hidden layers to obtain an output. We used two DNN models. To predict the battery capacity at a cycle, we adopted a DNN architecture with 1 output layer, 11 input layers, and 5 hidden layers with rectified linear unit (ReLU) activation. The training data consisted of seven of the eight types of battery data, and the test data consisted of one of the eight types for capacity prediction. For the second DNN model, we considered 1 output layer, 65 hidden layers, and the capacity predicted in the first model as the input. Figure 5 shows the structure of the DNN proposed in the first step (i.e., capacity fading prediction). If the SOH predicted by the first model is accumulated, then time-series prediction is performed for the RUL prediction in the next step.

Data-Based PF for Comparison
The PF was introduced in 1993 to obtain numerical approximations for nonlinear problems. Since then, it has been used in diverse fields, including economics, defense, transportation, image analysis, and robotics. PF is a Monte Carlo method based on Bayesian statistics. An empirical model from known data was used to estimate the current probabilities in several cases. To predict the capacity based on battery data using a PF, the battery behavior must be modeled. The obtained model can provide an accurate prediction of capacity fading. Equation (1) describes a capacity fading trend based on regression analysis from a previous study [27]. The model was generated from a base model considering several cases using a PF.
where Q is the battery capacity, k is the number of cycles, a and b are constants related to the internal impedance, and c and d indicate the aging rate. Using Equation (1), the parameter constants were defined according to the battery capacity data. x k i is a vector that reflects the noise in the parameter constant. Equation (2) represents the likelihood of the existing measured battery capacities z k and z k i [28]: where σ is the standard deviation of the measurement noise and h k is the capacity fading model in Equation (1). Equation (2) expresses the likelihood by considering a Gaussian distribution of the measurement noise of a single particle. However, multiple particles accumulate as a probability density function, and the noise distribution no longer follows a Gaussian distribution because of the state distribution and nonlinearity. By predicting without nonlinear constraints, the PF can be compared with existing unscented and extended Kalman filters [12].
To calculate the likelihood for one particle, the accumulation of existing weights should be performed as in Equation (3).
Finally, Equation (4) normalizes the accumulated weights to satisfy a total weight of 1. We adopted this PF model to compare the lithium-ion battery RUL prediction using the pro-posed DNNs with that using the PF.

Results
From the battery data provided by NASA, we used those from cells B0005-B0007, B0018, B0029-B0032, and B0043-B0045. Batteries B0005-B0018 were tested at a discharge current of 2 A until 70% of its capacity. However, verification of the actual capacity data revealed slight differences across the batteries. Similarly, we detected the differences between the other batteries. Nevertheless, as we use capacity as output, these differences do not influence the model provided that conditions such as discharge current are correct. The 11 extracted features were input to the proposed model to predict the battery capacity using the first DNN model. Then, the number of cycles and capacity predicted from the first model were input to the second DNN model for the prediction of RUL, which was defined as the time at which the effective capacity of the battery reached 70%.

Feature Extraction for Capacity Fade and RUL Prediction
We obtained 5 of the 11 features (features 7-11 in Table 1) from the available battery data and calculated the other six features (features 1-6 in Table 1) from the charge current curve and discharge voltage curve per cycle according to the definitions depicted in Figure 4. Figure 6 shows the geometric features extracted from the cycle testing data of B0005 according to the cycle. For the DNN, the training dataset was constructed using 11 features. In the data shown in Figure 6, there is one cycle at which the charge current and discharge voltage change sharply. This phenomenon was not mentioned in the original study by the NASA team.  Figure 4) extracted from charge/discharge curves of battery B0005.

Prediction of Capacity Fade and RUL Using DNNs
We used the first DNN model to predict the capacity fade trend considering 80% of the data from seven batteries as the training data, and the data from battery B0018 as test data. In Figure 7, the data from the cycles shaded in gray were not used for training. In addition, the B0043-B0045 data were used as verification data for learning during training. To prevent overfitting during learning, training was conducted by setting the dropout rate to 0.1. In the training algorithm, the function "ReLU" was used as the activation function, the function "He normal" was used as the kernel initializer, and the function "Adam" was used as the optimizer. Finally, we use the mean-squared error for the loss function: where n is the number of data points, y i is the output from the DNN, and t i is the corresponding measurement. As shown in Figure 8, the training and test errors decreased throughout the training and converged close to zero (9.01 × 10 −5 and 1.07 × 10 −4 , respectively).  We confirmed that the prediction error differs depending on the battery considered for training and testing. Therefore, we obtained the error according to the battery data used for training and testing. Table 2 lists the error during training and prediction error after training considering different test data. The maximum and minimum training errors occurred for data from batteries B0018 and B0007, respectively, and the maximum and minimum test errors were obtained for data from batteries B0032 and B0018, respectively. The average prediction error of battery capacity was 3.40 × 10 −4 for the test data of battery B0018, being the smallest average error. Therefore, the capacity prediction results may vary with the characteristics of the training data.  We confirmed that the prediction error differed depending on the battery used for training and testing. Therefore, we obtained the error based on the battery data used for training and testing. Table 2 lists the training and prediction test errors (e.g., root meansquared error (RMSE)) obtained using the process proposed in this study. Each training dataset consisted of the remaining batteries, excluding one specific battery among all the battery data. That is, it shows the capacity prediction results performed after training on a dataset excluding a specific battery. The maximum and minimum training errors occurred for data from batteries B0018 and B0007, respectively, and the maximum and minimum test errors were obtained for B0032 and B0018 batteries, respectively. The average prediction error of battery capacity was 3.40 × 10 −4 for test data of battery B0018, which had the smallest average error. The sum of the mean-squared errors of the predicted capacities of various batteries was 13.69 × 10 -3 , which was the smallest when the data of the B0018 battery was selected as the test data. The average prediction error of battery capacity was 3.40 × 10 −4 for test data of battery B0018, which had the smallest average error. Therefore, the capacity prediction results may vary according to the characteristics of the training data.
Considering the training and test errors, we constructed training datasets to achieve the most accurate prediction, excluding data from battery B0018. Thus, excluding this battery that provides the smallest training error, we used the data from the other batteries during training to predict the capacity of battery B0018. Figure 9 shows the measured capacity, predicted capacity, and predicted RUL based on the predicted capacity. For RUL prediction from the capacity obtained by the DNN with 11 features over various cycles, we determined the future capacity fade and RUL over cycles through DNN-based regression. Therefore, we determined the capacity fade and RUL using the predicted capacity trends from the 11 features under the actual operating environment conditions of an electric vehicle. DNN-based prediction enhances accuracy by using training data from actual conditions and obtained during battery manufacturing. For instance, using training data from batteries other than B0018 for capacity prediction, corresponding to approximately 70% of the available data for battery B0018, we accurately predicted the capacity fading over the remaining cycles through regression. From the obtained results, the error with respect to the actual capacity was 7.93 × 10 −4 , and the RUL prediction provided an error of approximately 7.63%. Meanwhile, for battery B0018, despite the small error in capacity prediction, the change in capacity over the cycles notably increased, as shown in Figure 9a. In contrast, when using data from battery B0005 for testing, despite the larger training error than that for battery B0018, the capacity prediction exhibited a small error of 3.59%, as shown in Figure 9b. Hence, when the data of battery B0005 were used for training, the training error was reduced. Overall, accurate prediction depends on both the preprocessing of data collected under multiple test conditions and the type and quality of the data collected during operation.

Discussion
The two proposed DNN models were used to predict the capacity fade and RUL based on capacity by training the measured data in a real driving environment without requiring expensive and complex equipment for measurement. However, the DNN model cannot suitably predict the battery capacity during manufacturing, and massive amounts of data are required to achieve accurate deep learning. We evaluated the DNN model and PF implemented in previous research to confirm the error in terms of the cycle at which the capacity fade reaches 80% of the nominal capacity. We also determined the mean squared error, assuming that 10% to 100% of the initial battery capacity was secured. Figure 10 shows the error between the evaluated methods and the real end of life (EOL) cycle (i.e., 80% capacity fading of all cycles). The EOL cycle based on the cycle testing data of battery B0018 is the 75th cycle. At the 13th cycle, that is, 10% of the cycles, we performed DNN training and PF modeling for prediction. The predicted EOL cycle using the DNN showed an overall error of 45.7%, which rapidly dropped to 1.1% after 76 cycles. Likewise, the predicted EOL cycle using the PF showed an overall error of 6.4%, which decreased to 3.7% at 76 cycles, which is when the DNN error rate decreases. Thus, using the proposed DNN, the EOL was predicted only when at least 80% of the tested battery data were available, while the PF could predict the EOL using initial data from less than eight cycles. An analysis of this result was performed to evaluate the utility of this algorithm during operation in real-time, assuming that there is no total capacity data. For learning-based algorithms, it can be understood that obtaining a certain amount of prior data has a great effect on improving accuracy. Figure 11 shows the results of the training and modeling capacities up to 76 cycles using the DNN and PF, respectively. The DNN accuracy depends on the data availability, whereas the PF can perform a suitable prediction even when only initial data are available, given the underlying model for prediction. Figure 11. Results from DNN learning and PF modeling at cycle 76 for capacity prediction.

Conclusions
We investigated the application of DNNs and machine learning algorithms for battery capacity fading and RUL prediction. We detail the method design, preprocessing of training data to extract representative features, and application of the proposed method. The training data comprise the geometric features of the current and voltage curves during charge and discharge, test environment features, and test condition features. Using these features to construct a training dataset, two DNNs were trained to predict the capacity fading and the corresponding RUL. Specifically, we predicted the capacity using the 11 extracted features and obtained RUL predictions through regression. The proposed DNN model can provide accurate predictions with an error of approximately 3.59%. Unlike other studies in which the battery should be detached to conduct electrochemical impedance spectroscopy to determine the battery deterioration, we predict the RUL using charge and discharge data collected during operation, thus preventing the cumbersome process of measuring the battery impedance. As the 11 features reflect different characteristics of capacity related to deterioration, we obtained a high RUL prediction accuracy. In addition to data acquired during battery manufacturing, data from actual operation reflecting environmental factors and load characteristics can be integrated during training, thus securing accurate results under different conditions. Accordingly, this study can be further improved. For instance, we aim to predict capacity fade and RUL using partial data during charging and discharging and other battery storage devices such as supercapacitors and Li-S. Further research and development in this area can shorten the battery development period, prevent accidents during battery operation, and improve battery preservation.