Real-Time Parameter Estimation of an Electrochemical Lithium-Ion Battery Model Using a Long Short-Term Memory Network

An electrochemical lithium-ion battery model is well known to be suited for effectively describing the microstructure evolution in charging and discharging processes of a lithium-ion battery with practically realizable complexity. This paper presents a neural network-based parameter estimation scheme to identify the parameters of an electrochemical lithium-ion battery model in a near-optimal and real-time manner in order to consistently observe the electrochemical states of batteries. The network is first trained to learn the dynamics of the electrochemical lithium-ion battery model, and then, it is applied to estimate the parameters with available finite-time measurements of voltage, current, temperature, and state of charge. In order to efficiently learn the dynamic characteristics of a lithium-ion battery, a well-known recurrent neural network, called a long short-term memory model, is employed with other techniques such as batch normalization, dropout, and stochastic gradient descent with warm restarts for learning speed enhancement and regularization. Using synthetic and experimental data, we show that the proposed estimation scheme works well, finding parameters and recovering the voltage profiles within the root-mean-square error of 0.43% and 26 mV, respectively, even with measurements obtained within a sufficiently short interval of time.


I. INTRODUCTION
As one of the most promising energy storage devices, lithiumion batteries have been actively used in various fields. The advantages of a lithium-ion battery over other types of energy storage devices include high energy and power density with the least amounts of memory effect and resulting capacity loss. With these advantages, lithium-ion batteries have been expanding their applications to the fields of energy storage systems [1] and electric vehicles [2], [3]. However, despite these advantages and applications, the lithium-ion battery suffers from problems caused by undesired side reactions. For example, a surface film formed on a graphite negative electrode, called solid electrolyte interface (SEI) layer, becomes thicker with continuous consumption of electrolyte The associate editor coordinating the review of this manuscript and approving it for publication was Rui Xiong . solvents and lithium-ions during the charging process. Such an SEI layer can cause safety issues in connection with ignition or explosions resulting from separator damage or frequent improper operations. Therefore, it is important to continually observe the physico-chemical changes inside the battery in order to properly adjust the operating conditions and prevent safety issues. The so-called electrochemical lithiumion battery model could be usefully employed for identifying those internal changes [4]- [6].
The electrochemical lithium-ion battery model represents the internal states of a battery in a more realistic way since it is derived from the microstructure of a lithium-ion battery [7]. Since this model covers actual physico-chemical phenomena such as those associated with the conservation laws of lithium and electrons, it can be said that each model parameter is directly related to the physico-chemical properties of the actual battery. In addition, the degrees of undesired side reactions are expressed with lumped parameter values by reflecting them quantitatively in the model [4]. Therefore, if the parameters of the electrochemical lithium-ion battery model could be estimated, it is possible to observe the current state of the battery in accordance with the estimated parameter values. However, it is very challenging to accurately estimate the parameters because the electrochemical lithiumion battery model is composed of complicatedly coupled partial differential equations, and the model involves a large number of parameters and boundary conditions.
Many studies have been conducted to accurately estimate the parameters of the electrochemical lithium-ion battery model. Some of these are based on Jacobian-based algorithms such as the Gauss-Newton method or Levenberg-Marquardt method, which have the advantage of fast convergence within a few iterations [8], [9]. However, since the electrochemical lithium-ion battery model is highly nonlinear, the Jacobianbased parameter estimation algorithms are likely to converge to the local optima and hence show the poor parameter estimation accuracy [9], [10]. Empirical studies have also been conducted to estimate the parameters of the electrochemical lithium-ion battery model using meta-heuristic algorithms such as the genetic algorithm, particle swarm optimization, and harmony search [11]- [16]. Since the meta-heuristic algorithms try to obtain the globally optimal solution through random searches, they are less likely to trap into the local optima. However, such algorithms require many iterations for convergence, and thus, considerable time is required to estimate the parameters of the electrochemical lithium-ion battery model [16], [17]. In order to observe the internal states of the actual battery and ensure its safe and healthy performance, a more sophisticated real-time parameter estimation algorithm is needed. This paper proposes a parameter estimation method based on deep learning to overcome the disadvantages of the existing parameter estimation schemes.
Deep learning has been used to some extent in research pertaining to lithium-ion batteries. Attempts have been made to estimate parameters such as the battery's remaining useful capacity or state of health (SOH) [18]- [20]. Such partial and superficial information, however, poses limitations with regard to identifying the internal problems associated with the physico-chemical parameters of the battery, as mentioned earlier. Therefore, in this paper, a network is designed to estimate not only the capacity of the battery, but also the additional parameters representing its electrochemical states. For this purpose, a recurrent neural network (RNN) is used to consider the correlation between the time-series data comprising the voltage, current, temperature, and state of charge (SOC) of the battery used in network learning and hence grasp its dynamic characteristics. Specifically, as one of the most representative and widely used RNNs [21], the long short-term memory (LSTM) model is employed to explicitly avoid the long-term dependency problem and maintain good performance even with long time-series data. Overall, the proposed RNN-based model is composed of LSTM modules and fully connected layers (FCLs), and further improved in terms of the learning performance of the network by applying techniques such as batch normalization layer, dropout, and stochastic gradient descent with warm restarts (SGDR) [22]- [24].
In this paper, actual battery aging mechanisms are considered to generate data for training the RNN, which can be reasonably described by properly setting the parameter values of the electrochemical lithium-ion battery model. To begin with, the aging mechanism-related parameters are chosen to represent the progress of the performance degradation and the reduced life span of the battery according to the general chemical reaction rate formulas. After applying the designated parameter values to an electrochemical lithiumion battery model, practically measurable data such as voltage, current, temperature, and SOC are synthesized and then used for training the RNN. While it takes a long time to run existing parameter estimation schemes based on the original electrochemical lithium-ion battery model, the proposed trained RNN achieves real-time parameter estimation with the knowledge that is already learned. Using simulations and experiments, this study shows that the proposed estimation scheme accurately finds the parameters in a sufficiently short interval of time.
In summary, even though the electrochemical lithium-ion battery model parameter estimation is of growing importance for the safe and efficient operation, many battery management system (BMS) could not achieve it in real-time manner. In this perspective, the overall contributions of this study are as follows: • To estimate the electrochemical lithium-ion battery model parameters in near-optimal and real-time manner by using a neural network-based estimation scheme.
• To generate a large amount of the synthetic data in consideration with the aging phenomena from the electrochemical lithium-ion battery model.
• To validate the feasibility of the neural network-based estimation scheme trained with the synthetic data as well as the experimental data.
This paper is organized as follows. Section II describes an electrochemical lithium-ion battery model and discusses the parameters to be estimated. Section III provides a brief introduction to deep learning and RNN by employing the LSTM, and shows the proposed network structure used in this paper. Section IV discusses how the training and testing data can be generated by varying the parameter values to be estimated based on the aging phenomena occurrence scenarios. Section V illustrates the accuracy of the estimated parameters and the computation time. The conclusions are described in Section VI.

II. AN ELECTROCHEMICAL MODEL AND ITS PARAMETER DESCRIPTION A. A PSEUDO TWO-DIMENSIONAL MODEL
As an electrochemical lithium-ion battery model provides accurate and detailed information about the microstructure dynamics, it has been widely employed in various fields. Unlike other battery models, it covers physico-chemical phenomena occurring in the microstructure inside the battery. In addition to macroscopic information such as the voltage and current profiles, it shows microscopic information such as the lithium concentration or electric potential distributed in the solid particles and electrolyte, as shown in Fig. 1.
The most fundamental electrochemical lithium-ion battery model, called a microscale model, is very complicated since it reflects the microstructure of the battery thoroughly by considering the solid and electrolyte phases separately. To decrease the computation burden, this study uses a continuum model derived by applying the volume averaging technique to the microscale model [25]. Such a continuum model is reduced once more assuming zero y-axis and z-axis gradients. This reduced model is called a pseudo two-dimensional (P2D) model, which considers only the gradients of the x-axis (lithium-ion flow direction) and r-axis (radial direction of the solid particle). The P2D model has been employed in various battery simulation fields because it has practically realizable complexity while describing the physico-chemical characteristics of the battery as efficiently as the conventional complicated microscale model. The P2D model consists of five governing equations arising from conservation of charge and mass (lithium) in the solid particles, conservation of charge and mass (lithium) in the electrolyte, and intercalation rate of lithium-ions between the solid particles and the electrolyte [26], [27]. The geometric parameters or material properties employed in the P2D model simulation were sourced from the battery specifications provided by the manufacturer or the literature [26]. Some physico-chemical parameter values of the lithium-ion battery might change as the temperature increases or decreases. Thus, an additional thermal dynamic model is combined with the P2D model to achieve more physically accurate and realistic results. Also, an SEI layer precipitation model is considered so that the dynamics of the P2D model reflect the resistance of the SEI layer. The overall governing equations and the corresponding parameters for the employed models are represented in Table 1 and 2, respectively.

B. AGING-RELEVANT PARAMETERS
Since an electrochemical lithium-ion battery model describes actual physico-chemical phenomena, the parameters of the model also represent specific physical and chemical properties of the battery. The aging phenomena cause the change in the internal parameters of the battery. For example, SEI layer formation, which arises when charging the battery, increases the film resistance of the solid particles in the negative electrode. In addition, the surface area and conductivity of the solid particles could change due to the aging-related chemical side reactions caused by the decomposition of the solid particles or electrolytes. If such parameters could be estimated accurately on a real-time basis, it might be easier to predict the aging of a real battery. In this paper, the parameters to be estimated are highly affected by the aging phenomena [28]. They are as follows: two solid particle surface areas (cathode and anode), two solid particle conductivities (cathode and anode), SEI layer thickness, and normalized available capacity. The parameters to be estimated are denoted by θ as follows: which are also described in Table 2. The manner in which the parameters in (1) are related to the aging phenomena is discussed in detail in the next section.

III. RNN WITH USING LSTM A. DEEP LEARNING AND NEURAL NETWORK
Deep learning, one of the machine learning algorithms, has been usefully employed in various fields since even novices can easily conduct end-to-end learning without human intervention. That is, if a sufficient amount of data are available, it is possible for non-experts to train a neural network to have high performance, even up to or higher than human levels. In general, the deep learning algorithm is implemented through artificial neural networks that consist of what is known as neurons and nodes, and it mimics the decisionmaking process of the chain reaction of neurons in a human brain. Weight and bias values are assigned to each connection, and the neural network tries to find the appropriate weight and bias values in the training process in order to produce the expected outputs corresponding to the alreadyknown references or labels. As the neural network learns the dynamics of the P2D model, it is expected to result in shorter computation time and higher model accuracy compared to other typical simple battery models such as single particle models and equivalent circuit models, as shown in Fig. 2. For achieving the desired result, the neural network is trained with the synthetic data generated from the P2D model as briefly shown in Fig. 3.  [27], [29], [30].
Also, it could be said that the given finite-time measurement data are utilized more effectively since the neural network considers the time correlation between the measurements or their change patterns over time.

B. LSTM NETWORK STRUCTURE
Typically, the important physical quantities of the battery, namely its voltage, current, temperature, and SOC, are measured and logged at a fixed sampling rate. An RNN is a class of artificial neural networks to process such time series data and learn their implicit dynamics for decision, pattern analysis, modeling, and so on. In the RNN, the neurons are networked with feedback connections to also accommodate time series data arising from complicated and uncertain dynamics. In this study, LSTM, one of the widely used recurrent units for RNN, is adopted for effective learning. Notably, LSTM is effective for capturing hidden dynamics from past information, so it is expected that this advantage can help estimate the parameters of the battery from its captured dynamics. Overall, as shown in Fig. 4, the proposed neural network consists of one LSTM layer and two FCL. In Fig. 4, an FCL is added at the front to extract the features of the input values in advance, that is, before entering the LSTM network.  Then, all the hidden state outputs of the LSTM layer are used as input values of the rear FCL for post-processing. In the end, the parameter values are estimated from the last outputs of the FCL. In the LSTM layer, the hidden state dropout layers are added to the back of the LSTM layer to regularize the output results, and a batch normalization layer is also attached to each FCL layer for accurate and rapid learning. In Fig. 4, the networks in the black dashed boxes are repeatedly drawn for the series input values, which implies that at every time point, input data pass through a network sharing identical weights and biases. [V , I , T , SOC] t is the t-th input vector composed of voltage, current, temperature, and SOC series. Each h in [h 1 , h 2 , h 3 , . . . , h L * H −1 , h L * H ] is a hidden state output from the LSTM network. L and H denote the sequence length of the input and the hidden state dimension of the LSTM layer, respectively.

IV. DATA SYNTHESIS FOR LEARNING THE DYNAMICS OF THE P2D MODEL A. PARAMETER VARIATIONS ACCORDING TO AGING PHENOMENA
The LSTM network is trained to learn the dynamics of the P2D model from the dynamic relations between the model VOLUME 8, 2020 parameters and the corresponding time series data pertaining to the voltage, current, temperature, and SOC of a battery. For dynamics learning, such a dataset is provided by the P2D model. For given P2D model parameters, if a current profile is specified over a finite time interval, then voltage, temperature, and SOC time series data can be generated from the P2D model. Repeating the same procedure, this study produces a variety of time series data for 100 s with diverse P2D model parameter sets. In order to reflect realistic aging mechanisms, the P2D model parameters should be chosen appropriately over time. Motivated by general chemical reaction rate equations [31], the following parameter evolution is proposed: where θ aging is the time-varying parameter value under aging conditions, θ BOL is the parameter value for a fresh battery, N is the number of the aging phenomena affecting the corresponding parameter, SOH is the decrement in SOH or the normalized capacity, k is the coefficient for variation range, F is the parameter variation rate, and D i is a quantitative occurrence degree of the i aging phenomenon. It is noted that when the sign of k is positive, the parameter value decreases, and vice versa. F, the variation rate, is independently assigned to each parameter as a fixed value. If D i has larger value, the rate of the parameter change increases. As an example of the parameter variation, when the battery's volume change only is considered as a aging phenomena, or N = 1 in 2, one of the aging phenomena, each dashed line with a given D i value produces a curved line under various SOH values, as seen in Fig. 5. Consequently, the synthetic data are generated by repeatedly changing the P2D model parameter values for various D i and SOH values.

B. DATA SYNTHESIS CONSIDERING AGING PHENOMENA
For the data generation, three major aging phenomena are considered: anode electrolyte decomposition, cathode solid particle decomposition, and volume change of the battery [28]. The affected parameters of the battery differ depending on the aging phenomenon, as seen in Table 3. The anode electrolyte decomposition influences the anode solid particle surface area (a s n ) and the thickness of the SEI layer (SEI). The cathode solid particle decomposition affects the cathode solid particle surface area (a s p ) and the thickness of the SEI layer (SEI). Finally, the volume change of the battery affects the anode and cathode solid particle surface areas (a s p,n ), thickness of the SEI layer (SEI), and anode and cathode solid particle conductivities (σ s p,n ) [28]. In order to monitor the above-mentioned three aging phenomena, a total of six parameters (solid particle surface areas and conductivities of the anode and cathode, SEI layer thickness, and normalized available capacity) are estimated by the LSTM-based scheme proposed in the previous section. As discussed earlier, such parameters are varied over the normalized SOH according to the occurrence degree of the aging phenomena.
However, depending on the occurrence degree of the aging phenomena, five parameters (except for the normalized capacity) could have almost identical values even though the designated SOHs are different. This means that some data could be generated under similar physical quantities even for distinct SOHs. To avoid such cases, five additional parameters known to vary with the battery usage are assumed to change linearly with the normalized available capacity only. At the anode, these parameters are reaction rate, solid particle diffusivity coefficient, and current collector conductivity, and at the cathode, these parameters are reaction rate and solid particle diffusivity coefficient. Thus, it becomes possible to reasonably distinguish all synthetic data and hence produce more realistic data.
By varying the conditions, three sets of data are generated for training, validating, and testing. The aging-related parameters are as follows: k is 0.2 for the decreasing parameters and −0.2 for the increasing parameters. The chosen variation rates F for the solid particle surface areas of the anode and cathode, conductivities of the anode and cathode, and SEI layer thickness are 39.80, −35.08, 31.76, −62.72, and −50, respectively. These physical values are obtained from the beginning-of-life and end-of-life data provided by SAMSUNG SDI Co., Ltd. Different values of N, D i , and SOH are applied to generate data for training, validating, and testing. As aforementioned, N represents the number of the aging phenomena affecting the corresponding parameter; N is assumed to be 2 for each solid particle surface area, 1 for each solid particle conductivity, and 3 for SEI layer thickness, respectively, as shown in Table 3. In order to obtain the diverse data (ensuring that the parameters are spread out evenly in the data generation process), D i is determined as follows: where the constants D max and α are chosen to be 1.7 and 5.5 for the realistic and uniform parameter variations, respectively. It is noted that D max and α are identically applied to generate the training, validating, and testing data. For training data generation, 20 different values of d i are evenly chosen between 0 and D max , and for validating and testing data generation, 6 and 7 different values are chosen similarly. Eventually, for the training data generation, a total of 8,000 scenarios of parameter changes were generated since each of the three aging phenomena considered in this study had 20 D i values. Similarly, a total of 216 (=6 3 ) and 343 (=7 3 ) scenarios were generated for the validating and testing data generation, respectively. These scenarios were simulated over SOH ranging from 0 to 1. As the end-of-life of the lithium-ion battery is typically defined as 80 % of the nominal SOH, in the training data generation, SOH took values from 0.00 to 0.20 with an increment of 0.01, and in the validation and testing data generation, it took values from 0.005 to 0.195 with the same increment. Consequently, the number of datasets amounted to 168,000, 4,320, and 6,860 for training, validating, and testing, respectively. Each data item included the parameter values and corresponding voltage, current, temperature, and SOC time series data over 100 s. As an example of synthetic data, the training data generated from the 1000-th scenario at an SOH of 85% is shown in Fig. 6, which is targeted to a 37 Ah nickel-manganese-cobalt (NMC) lithium-ion battery produced by Samsung SDI CO., Ltd.

A. PARAMETER ESTIMATION WITH SYNTHETIC DATA
As in the previous section, the LSTM network is first trained to learn the electrochemical model dynamics by sweeping through a variety of profiles and parameters and then capturing its dynamics. In this section, the trained LSTM network is validated by illustrating how accurately it estimates the parameters within a short interval of time.
The overall schemes for the dynamics training and parameter estimation are shown in Fig. 7. The tuned hyperparameters of the LSTM network are as follows: The number of nodes in the two layers in the front FCL are 32 and 16, respectively, and the number of hidden states in the LSTM is 96. The rear FCL consists of two layers with 128 nodes each. The minibatch size is 3,000 and the last epoch is set as 8,000. The dropout probability applied to the hidden state of the LSTM is 0.1, and the maximum and minimum learning rates used in the SGDR are 1e-4 and 1e-5 until 6,000 epochs, and then 1e-5 and 1e-6 until the last epoch. For fast and accurate learning of the LSTM, the sequence length of the LSTM should not be too long. Thus, the time series data for 100 s is split into 10 s segments, and then learning for each 10 s sequence is performed, which can be done by setting the sequence length of the input to 10 (L = 10). In other words, every input to the front FCL is of the 40-length vector form composed of each 10 s data segment for voltage, current, temperature, and SOC. Among the six parameters to be estimated, the estimates of the SEI layer thickness are shown in Fig. 8, where the orange and blue lines represent the estimation results of the SEI layer thickness and the true values, respectively. The enlarged figures show that the parameter is accurately estimated in both the small and large perturbations. As with the SEI layer VOLUME 8, 2020  thickness, the estimates of the other parameters are also very close to the true values.
The overall estimation results for the training and testing data are shown in Fig. 9, where the solid and dashed lines represent the fitted Gaussian distributions for the parameter estimation errors of the training and testing data, respectively, and two area charts show their original histograms. As shown in Fig. 9, the mean values of the error distributions are almost zero with low variances, which means that the neural network learns the data properly and estimates the parameter accurately even when using the testing data. For the detailed analysis, the mean absolute error (MAE) and root mean squared error (RMSE) of the parameter estimations for training and testing dataset are computed and shown in Table 4 and 5, respectively. In summary, it could be concluded that the proposed estimation scheme finds all the parameter values very accurately.
For performance comparison in terms of network architecture, other networks are also applied to the proposed approach. In the case of multi-layer perceptron (MLP), it is composed of eight layers with 256 nodes each [32]. In the cases of VGG11, VGG16 and ResNet18, the kernel sizes are slightly adjusted in consideration of the given data size [33], [34]. In addition, the RNN with a gated recurrent unit (GRU) network is compared [35]. The mini-batch size, the learning rate schedule, and the last epoch are all set to be the same as those of the earlier LSTM network. Table 6 shows the sizes of the networks, and the parameter estimation performance of each network. As shown in Table 6, it can be said that the LSTM network estimates the electrochemical parameters with the best accuracy compared with other neural networks even though it has a relatively small network size. In addition to its outstanding accuracy, the LSTM network has a little computational burden, which enables the real time estimation.
Also, several neural networks with different memory sizes are validated in order to identify the trade-off between the computation burden and real-time performance. Generally, when the memory size increases, the computation time tends to increase. In addition, a lot of computations with large memory sizes do not always provide excellent performance. Therefore, it is important to select the appropriate memory size of the neural network to obtain the best real-time performance in consideration of both computation time and accuracy.

B. PARAMETER ESTIMATION WITH EXPERIMENTAL DATA
The neural network pre-trained with the synthetic data, is validated with the experimental data measured from real batteries in order to illustrate the feasibility of the proposed neural network-based estimation method. The experimental data are obtained from 37 Ah NMC batteries produced by Samsung SDI Co., Ltd. The data comprise voltage, current, and temperature profiles. Throughout the experiment, the batteries    were locked up by a jig for safe charging and discharging, as shown in Fig. 10. The SOC profile is computed from available data using the coulomb counting technique [3]. The target parameters of two real batteries are estimated on a realtime basis with the LSTM network that learns the P2D model dynamics, similar to the technique conducted earlier with the synthetic data. As seen in Table 7, the resulting estimates are within a reasonable range. From these estimated parameters, the simulated profiles are compared to the measured ones as shown in Fig. 11 and 12, respectively, and their differences are within the tolerable range of 18 mV for the first battery  and 26 mV for the second battery. It is believed that the estimates in Table 7 become more accurate if the LSTM network is trained with more diverse and a larger synthetic dataset. VOLUME 8, 2020

VI. CONCLUSION
This study proposed a real-time neural network-based scheme to estimate the parameters of a complicated electrochemical lithium-ion battery model. The long short-term memory network is first trained to learn the pseudo two-dimensional model dynamics with synthetic data, and then, the trained network directly provides the estimated parameters by inputting voltage, current, temperature, and state of charge data. Results using the synthetic data show that the parameters of the pseudo two-dimensional model are estimated within the root mean square error of 0.43% on a real-time basis. The estimates from the real experimental data could also have such an accuracy level. In addition to the application on the pseudo two-dimensional model, the proposed scheme could be generally employed on the other battery models such as single particle models or fractional order models [27], [36].
It is believed that a variety of applications involving lithium-ion batteries such as state estimation or diagnosis of batteries can be possible with the proposed neural networkbased parameter estimation scheme. In the future, attempts will be made to employ the state-of-the-art network architecture for performance improvement.