State of Health Estimation of Lithium-Ion Battery Using Time Convolution Memory Neural Network

*e accurate state of health (SOH) estimation of lithium-ion batteries enables users to make wise replacement decision and reduce economic losses. SOH estimation accuracy is related to many factors, such as usage time, ambient temperature, charge and discharge rate, etc. *us, proper extraction of features from the above factors becomes a great challenge. In order to extract battery’s features effectively and improve SOH estimation accuracy, this article proposes a time convolution memory neural network (TCMNN), combining convolutional neural networks (CNN) and long short-term memory (LSTM) by dropout regularization-based fully connected layer. In experiment, the terminal voltage and charging current of the battery during charging process are collected, and input and output data sets are sorted out from the experimental battery data. Due to the limited equipment in the laboratory, only one battery can be charged and discharged at a time; the amount of battery data collected is relatively small, which will affect the extraction of features during the training process. Data augmentation algorithms are applied to solve the problem. Furthermore, in order to improve the accuracy of estimation, exponential smoothing algorithm is used to optimize output data. *e results show that the proposed method can well extract and learn the feature relationship of battery cycle charge and discharge process in a long time span. In addition, it has higher accuracy than that of CNN, LSTM, Backpropagation (BP) algorithm, and Greymodel-based neural network.*emaximum error is limited to 3.79%, and the average error is limited to 0.143%, while the input data dimension is 514.


Introduction
Lithium batteries as a power source have received great attention. In the long-term development of batteries, lithium batteries have been able to stand out and gradually replace traditional power sources with the advantages of long cycle charge and discharge life and high energy density. e field of lithium batteries is honored to win the Nobel Prize in chemistry in 2019. However, the Battery Management System (BMS) is still a difficult problem worth studying [1,2]. Typical BMS includes State of Charge (SOC) [3], State of Health (SOH), State of Function (SOF), and thermal management [4]. e SOH estimation of BMS is one of the most important techniques during the actual operation of batteries' electrode clean production and manufacturing. At present, the battery's SOH is characterized by the battery capacity, battery charge, and internal resistance, and the corresponding SOH definition is given from the following aspects [5][6][7]. In this article, SOH uses the proportional relationship between the current maximum storable capacity and the battery rated capacity [5], and the equation is as follows: where C aged is the maximum battery capacity that the battery can currently store and C rated is the battery's rated capacity. When the percentage drops to 70%, it is judged that the lithium-ion battery has failed [8]. Many studies have been conducted to estimate the SOH accurately. Such methods can be divided into the following three categories: direct measurement methods, model-based methods, and data-driven methods. For direct measurement methods, the SOH of battery is determined by its capacity loss and the increment of its internal resistance [9]. ose methods directly measure the actual discharge capacity of the battery during constant current discharge [10] then calculate the corresponding battery SOH through the battery SOH definition formula (1). e accuracy and reliability of those methods are relatively high and robust. However, the long discharge time greatly affects the actual working efficiency. Furthermore, the battery environment in real operation is very complicated, and the laboratory discharge condition is also different, which all affect the accuracy of the methods and make them impossible for online estimation.
Model-based methods can achieve battery SOH estimation by obtaining battery model parameters. It analyzes and utilizes the physical characteristics and internal chemical characteristics of the battery then establish circuit equivalent model [11,12] or electrochemical model [13]. Han et al. [14] give a comparative analysis of 12 battery models; then, a battery SOH estimation method combining the online model-based capacity estimation is proposed where regular calibration is needed. However, these are always ideal equivalents or empirical models. Furthermore, model-based SOH estimation, without considering the chemical reaction and aging mechanism inside the battery, makes the accuracy of the estimation results difficult to guarantee with the battery ages. From the above analysis, it can be concluded that the physical and chemical characteristics of the battery are very complicated. Different from model-based methods and direct measurement methods, data-driven methods do not need to consider these characteristics and directly start from the data collected in the battery aging experiment; then they conduct data mining and analysis of the information related to the battery health status and then establish the relationship between these features and the battery SOH by machine learning algorithms [15]. For example, a constant-current and constantvoltage protocol [16], the open circuit voltage [17], the peak values of IC curves [18], cycle number [19], incremental capacity [20], differential voltage [21], first 30% of aging trajectories, and candidate features in the voltage response under the current pulse test [22] are chosen as the features to describe the battery degradation. en, the machine learning methods such as Support Vector Machine (SVM) [18], Support Vector Regression (SVR) [23], Gaussian Process Regression (GPR) [24], Grey Relational Analysis [20], and Radial Basis Function Neural Network (RBFNN) [25] are used to learn the nonlinear mapping from features to SOH.
As is well known, the process of battery aging is complicated and there are many factors, such as usage time, the battery's ambient temperature, charge and discharge rate, etc. ese all have an impact on battery aging. However, the traditional data-driven methods present insufficient feature extraction, resulting in affecting the accuracy of battery SOH estimation and there are two key issues that deserve attention. One is the lack of many details when extracting the existing features from the charge and discharge curve, and the features relationship of battery parameters between different cycles during charge and discharge may be easily overlooked due to the large time span. Another is that feature extraction requires human intervention and cannot be done automatically, which will consume a lot of manpower and time. Recently, with the development of deep learning technology, such as convolutional neural network (CNN), deep neural network (DNN), recurrent neural network (RNN), and long short-term memory (LSTM), those networks have been widely used in pattern recognition applications, such as computer vision [26], fault diagnosis [27], and medicine [28]. e successful application in the above fields motivates researchers to apply these methods for SOH estimation. Zhang et al. [29] proposed a Nesterov Accelerated Gradient (NAG) algorithm-based Bidirectional Gated Recurrent Unit (Bi-GRU) network for the battery state of charge (SOC) estimation. Similarly, to overcome the short-term dependence problem of simple RNN, [30] used the variant LSTM to synthesize a data-driven battery RUL predictor. Recently, Fan et al. [31] presented a hybrid neural network called gate recurrent unit-convolutional neural network (GRU-CNN) to map the features from charging voltage, current, and temperature to battery SOH. Different from the mentioned methods above, this article proposes a novel SOH estimation method based on deep learning algorithm. e proposed method is based on the idea that the charging curve during constant current charging can reflect the SOH of battery. Our model combines CNN and LSTM networks into a new network model for SOH estimation, namely, time convolutional memory neural network (TCMNN). e convolutional block of CNN utilizes the shared weights structure to reduce the amount of weights and try to find the shared information from the measured voltage of charging data. For another, the LSTM block uses their internal state (memory) to learn features and time dependencies from the sequential data. In addition, data augmentation algorithms are applied to the training data for the better feature extraction, and exponential smoothing algorithm is used to optimize output data to improve the accuracy of estimation. By training the data collected in NASA [32] and testing the proposed model, the results present the high accuracy and strong feature extraction capabilities and can overcome the short-term dependence problem. e rest of this article is organized as follows. Section 2 describes the process and structure of SOH estimation using time convolution memory neural network. Section 3 describes the lithium battery experiment process and data sets partitioning method; then, it applies data augmentation to extend data sets and exponential smoothing as noise reduction. e experiment results are given by the error curves 2 Mobile Information Systems to illustrate the effectiveness of the proposed model in Section 4. Finally, conclusion is given in Section 5.

Problem Definition.
e goal of machine learning is to find and build a suitable model according to the given training samples (x i , y i ) N i�1 to get the mapping from training data to target output y, where x is the charge voltage of charging curves, N is the number of training samples, and y is the SOH of Li-ion battery. us, the nonlinear mapping f(·) can be established as follows: (2) is article proposes an improved hybrid neural network named TCMNN to learn the nonlinear mapping shown in Figure 1. Both the LSTM and CNN have been applied to deal with the time series prediction problem.
is is mainly because the two networks are able to find the shared information (extract feature) and mine the time dependencies from the sequential data, respectively. It is obvious that the architecture is sequential streams. e CNN stream contains three temporal convolution blocks, which consist of a convolution layer, batch normalization, and ReLU activation function. A fully connected (Dense) layer is followed at the end of the CNN for dimension conversion. On the other hand, it contains a long short-term memory (LSTM) layer with dropout and a fully connected (Dense) layer. At the end of the LSTM architecture, the final output projected to the SOH.

CNN.
Convolutional neural network is a kind of feedforward neural network, which not only contains convolution calculation function, but also has a certain depth structure. It is often used in computer vision, natural language processing, and other fields [33]. Convolutional neural networks are divided into input layer, hidden layer, and output layer [34,35]. e schematic diagram of the convolutional neural network is shown in Figure 2. e hidden layer of CNN includes both a convolutional layer with a weighted convolution kernel, a pooling layer for filtering, and a tiled layer for connection, usually called a fully connected layer. In Figure 2, the convolutional layer and the pooling layer in the hidden layer present an alternating pattern.

Convolutional Layer.
e convolutional layer uses the internal convolution kernel to extract features from the input samples. ere are three important parameters in the convolution kernel: the size of the convolution kernel, step size, and padding. ese parameters together determine the size of the output feature map of the convolution layer. In the convolutional layer, the activation function is often used to help express the complex features of the input. CNN usually uses the ReLU function. e activation function is used after the convolution kernel, but it is not immutable.
ere are many types of activation functions, and they are not all used in the same location.

Pooling Layer.
After the convolutional layer, a feature map is obtained, and then the pooling layer is used to perform feature selection and information filtering on the feature map. e pooling layer also contains the pooling size, step size, and filling control parameters like the convolution kernel. But the difference from the convolution kernel for weighted sum is that the pooling layer only adjusts these parameters to extract the maximum or average value of the features. e pooling layer can also reduce the number of nodes in the fully connected layer and prevent overfitting.

Fully Connected Layer.
e fully connected layer is similar to the hidden layer in the BP neural network. Its structure and corresponding working principle are the same as the hidden layer in BP neural network. Its function is to perform a series of nonlinear combinations on the features extracted after convolutional pooling of the input sample to obtain the corresponding output.

LSTM.
e convolutional neural network may be effective for a short-term battery charging and discharging process. But the entire life cycle of the battery is particularly large; it contains hundreds of thousands of cycles of charging and discharging experiments to achieve complete battery aging. e characteristic relationship of battery parameters between cycles may be easily ignored due to the large time span.
erefore, the long short-term memory (LSTM) is introduced. is network is more suitable for processing and predicting important events with long intervals and delays in the time series [36][37][38]. e long short-term memory network is a time cyclic neural network, which is an improved RNN network. e RNN network takes the data sequence as the input, and recursively recursive all nodes during the model training process [39,40]. e structure of LSTM is shown in Figure 3. e LSTM network improves the hidden layer structure of the RNN network and makes it more complex to avoid the phenomenon of vanishing gradient. As shown in Figure 3, the LSTM network adds a more complex cell state structure on the basis of only a tanh layer structure. e improved RNN network has the advantage of avoiding gradient explosion in the process of long-term prediction. e core of LSTM consists of input gates, memory gates, and output gates. e memory gates added to the RNN network in the network structure have strong functions. Not only can it selectively forget the useless information in the input time series, but it can also save the valid input information and decide which information to output. is makes the model handle long time sequences well. e calculation formulas in the model structure are shown as follows: Mobile Information Systems 3 In above formulas, x and y represent the input samples and output samples of the network; i t , f, and o represent the three gates mentioned above; C represents the cell state; and the matrices W and b indicate the weight parameter and the bias term, respectively; σ(·) is the activation function, which is a nonlinear function. rough the above formulas, the output value of the LSTM model can be calculated step by step, and then the function formulas shown in equations are used to update network data by calculating the error and weight of each LSTM neuron in the backpropagation process.
In the above formulas, N is the number of samples, y t is the predicted value, and y * t is the true value. e memory gate unit added in the LSTM network structure can make good use of long-term information. e door line restriction can timely find and feedback the situation with large data fluctuation. e newly added memory gate cooperates with the input gate and output gate in the traditional RNN to improve the robustness of the network model, which makes the model avoid gradient disappearance or explosion. Since the high utilization rate of LSTM network for long-term sequence, this article uses LSTM to estimate battery SOH.

SOH Estimation Based on TCMNN.
e proposed architecture actual implementation is shown in Figure 1. According to the capacity definition of battery SOH, the number of neurons of output layer is one. e input and output variables of each estimation model need to have a certain correlation. rough the previous analysis, this article takes the voltage data of the battery constant current charging process as the input variable of the model and combines CNN and LSTM to build a time-based convolutional memory network model for battery health estimation, which can be used to solve complex uncertain problems. e detailed estimation flowchart is shown in Figure 4. Figure 4 is the architecture of the estimation system, which consists of data preprocessing and a deep regression model for SOH estimation and the entire process can be described as follows:  Figure 1: e time convolutional memory network structure.
Step 1. Collect data from the charging process, and change it into the charging data to 258 * 1 vector with equally spaced resample method. en, normalize the data with min-max algorithm, and spilt data into training data and testing data. In addition, data augmentation algorithms are applied to the training data for better feature extraction, and exponential smoothing algorithm is used to optimize output data to improve the accuracy of estimation.
Step 2. Set the channels of input layer; set the numbers of convolutional layers and the numbers of convolution kernel in each convolutional layer; set the size of LSTM layer; set the connection layer between convolutional layers and LSTM layer; set the hyperparameters of the model including the epochs, sequence length, batch size, and iteration; and select the optimization algorithm.
Step 3. Apply the training data to obtain model parameters with Adam optimizer.
Step 4. Apply the testing data to validate the model accuracy and evaluate the performance of the novel method.  Figure 5 illustrates the diagram of the aging experiment. Batteries' charging and discharging are implemented at a constant temperature of 20°C. e battery terminal voltage data and the battery life cycle capacity data were collected during the constant current charging process to get four data sets (5#, 6#, 7#, and 18#). rough data normalization processing, the data are divided into two groups: training data and testing data. Among them, the data of three batteries (6#, 7#, and 18#) are used as training data, and 5# is the testing data set. Figure 6 shows the change of terminal voltage in aging process during battery constant current charging. It can be x t−1 Mobile Information Systems seen from Figure 7 that the overall trend of the battery terminal voltage change curve during each charging process of the battery is consistent. But after a number of charge and discharge cycles, the initial voltage value of the battery terminal voltage changes. Figure 7 also shows that the four initial battery terminal voltage is not on the same curve during the aging experiment. en, it can be inferred that the terminal voltage curve of the battery during the constant current charging stage will also present certain features related to SOH.

Data Augmentation.
e battery aging experiment process takes a long time. Due to the limited equipment in the laboratory, only one battery can be charged and discharged at a time, so the amount of battery data collected is relatively small, and the small amount of data will affect the extraction of features during the training process, and small data set also might lead to overfitting. erefore, data augmentation algorithms are often used to solve the problem of insufficient data. e diagram is shown in Figure 8. e batteries are numbered as Battery ID , and the Battery IDMAX is the last battery. cycle id are the cycles of each battery, and the last cycle is cycle idmax . us, build arrays as follows: low � low 0 , . . . , low idx , . . . , low cycle_idmax , high � high 0 , . . . , high idx , . . . , high cycle_idmax .
In the arrays, [low idx , high idx ] are the upper and lower limits of augmentation interval, and low 0 � high 0 � 0. Generate rand idx in [low idx , high idx ], and copy 1 to rand idx from

Mobile Information Systems
Battery ID to the end of existing data. If high idx > cycle idx , turn to next battery; else idx++, if Battery ID > Battery IDMAX , algorithm is over, else idx � 0, and go to the next loop. Data augmentation results are shown in Figure 9.

Exponential Smoothing.
In the original parameters, it can be found that there are many interference conditions in the measured environment, such as temperature and humidity. erefore, there are many large pulses and glitches in the measured battery capacity data curve. Estimation tracking capabilities are full of loopholes. In order to reduce the noise and improve the accuracy of the prediction results, we choose exponential smoothing to optimize the output data. e exponential smoothing formula is as follows: where y t+1 ′ is the smooth value at time ty t+1 ′ � ay t + (1 − a)y t ′ ,+ 1, y t is the actual value at time t, y t is the smooth value at time t, and a � 0.7 is the smoothing factor. Data smoothing results are shown in Figure 10.

Implementation Details.
e training of the temporal convolutional memory network model used in this article is complicated. Simple CPU environment or low-version GPU environment are difficult to support the training of the model. us, the training of the neural network in this article is carried out on a higher version with the GTX1080Ti (11 GB on-board memory) graphics card. GPU's high-performance parallel computing effectively shortens the network training time and is a very suitable hardware platform for the model training in this article. All models were trained using the Keras library with the TensorFlow backend. e parameters of the network were optimized using Adam optimizer with a primary learning rate of 0.001, and the rules for increasing or decreasing the learning rate are as follows: when the number of iterations reaches 1000 times in the training process, the learning rate will be reduced by a multiplier of 0. configuration of the software environment, PyCharm is adopted as a GUI assistance software for code debugging. Table 2 summarizes the mean computational times over the 10 runs.
To evaluate the performance of the novel model, maximum error (MAX), mean absolute error (MAE), and mean square error (MSE) are applied as shown below.
where y i and y i ′ are the expected value and predicted value for a specific charging curve, respectively. N is the total amount of training samples. e training data set obtained above is used for model training, and the model is continuously optimized through the alternation of the forward and back propagation stages in the model training. In the training, the initial learning rate of training is set to 0.001. In the experiment, the batch size of the training process is set to 4, the initial error is set to 10 −4 , and the number of iterations of training is determined by the actual data set size. e mean square error (MSE) during the entire training iteration is shown in Figure 2. It can be seen from Figure 11 that the iteration error decreases exponentially at the initial stage and then presents a slightly smooth declining curve, which tends to zero overall. is shows that the model tends to convergence. e iterative error fluctuates from 0.02 to 0.1.

Experiment Result on Testing Data Set.
To validate the performance of the proposed deep learning model based on the collected data set, another two existing SOH estimation algorithms belonging to machine learning are applied for comparison. One method is based on Backpropagation neural network (BP); another is Grey model-based neural network. In the BP neural network, the number of nodes in the two network layers of input and output have generally been determined according to actual needs, and the number of nodes in the hidden layer is generally 1-10. After experimental testing, the experimental effect is better when the number of hidden layer nodes is 7. e Grey model-based neural network is a series combination forecasting model of the Grey model and the BP neural network. It is a combination of the high-precision advantages of the Grey model in dealing with uncertain systems and the good nonlinear mapping of the BP neural network. In addition, to improve prediction accuracy, two features (battery constant current charging time and the initial jump value of terminal voltage during battery discharge) are extracted in advance as input to the above network.  Mobile Information Systems 0.0121, 0.0400, and 0.1, 0.046, 0.0297, 0.1732 for the TMCNN, BP, Grey model-based, CNN, and LSTM, respectively. In general, the performance of the proposed method is superior to the traditional BP and Grey modelbased, but the difference between them is not far apart. at may be due to the success of the feature engineering, which is applied in our experiment. e result further certificates that the deep learning methods can predict the SOH accurately relying on charging curves in the absence of feature engineering, which is necessary to add another data collection program and increases the workload of data collection. Furthermore, the performance of the proposed method is superior to either CNN or LSTM, with a MAX decrease of 57.8% and 62.1%, respectively. us, the novel hybrid network combines the superiority of two single networks.

Analysis of Different Input Data Dimension.
e input data of the battery is a two-dimensional matrix composed of the number of cycles of charge and discharge of the battery and the selected voltage data. e selected voltage data dimensions are all 258 dimensions in the previous section, including 256-dimensional voltage data, 1-dimensional battery number, and 1-dimensional battery cycle. Different dimension is conducted to evaluate the effect on prediction results. e dimension is set to 130, 258, and 514, and the estimation results of changed dimensions are shown in Figures 17 and 18. From the figures, the fluctuation range of the dimension 130 is −0.028∼0.067, the fluctuation range of the dimension 258 is −0.045∼0.018, and the fluctuation range of the dimension 514 is −0.037∼0.007. Obviously, the higher the dimension, the smaller the model estimation         dimension, the greater the amount of calculation. us, dimension should not be higher than 514.

Conclusion
is article proposes a time convolutional memory neural network model for battery health estimation. By combining the traditional CNN and LSTM network and employing the data augmentation and exponential smoothing algorithm, a novel time convolutional memory network model is constructed. Furthermore, the training data and testing data are collected from NASA to train and test the combined model, respectively. In addition, the BP algorithm, Grey modelbased neural networks, traditional CNN, and LSTM are employed to estimate SOH to compare with the proposed method. Experiment result shows that the proposed method is superior than the existing algorithms; the prediction maximum error is 3.79% and average error is 0.143%, while the input data dimension is 514. e accuracy of the estimation is analyzed to verify the time convolutional memory network model, which can be used to estimate battery health. Besides, the process of extraction of features, which is timeconsuming and sometimes complexed, is not needed. Priorities for future work are simplifying the network structure without loss of accuracy, enabling the model to run in the embedded system, and realizing online SOH estimation in electric vehicles.

Data Availability
e data used to support the findings of this study can be accessed at https://ti.arc.nasa.gov/tech/dash/groups/pcoe/ prognostic-data-repository/#battery.

Conflicts of Interest
e authors declare that they have no conflicts of interest regarding the publication of this paper.

Authors' Contributions
Chuxiang Zhu conceptualized the study, developed methodology, was responsible for software, and reviewed and edited the manuscript. Bowen Zheng was responsible for software, validated the study, and wrote the original draft. Zhiwei He validated the study, did formal analysis, and did project administration. Mingyu Gao did formal analysis and visualized the study. Changchen Sun investigated the study and curated the data. Zhengyi Bao did grammar check.