Lithium-Ion Battery Capacity Estimation Based on Incremental Capacity Analysis and Deep Convolutional Neural Network

: Accurate estimation of Li-ion battery capacity is critical for a battery management system (BMS). This paper proposes an innovative method which combines a convolutional neural network and incremental capacity analysis (ICA). In the present approach, the voltage and temperature, which signiﬁcantly affect the ICA curve during the discharging process, are adopted as the inputs for CNN. Rather than extracting feature parameters of an IC curve, as is carried out in the available research, the present method uses the whole ICA curve as the input to avoid complicated feature extraction and correlation analysis. The results show that the maximum error of capacity estimation is less than 4.7%, the rectiﬁed mean squared error is less than 1.3% for each battery, and the overall RMSE is below 1.12%.


Introduction
Lithium-ion batteries have been widely employed as promising devices for energy storage in many fields such as electronics, hybrid and electric vehicles in the automotive industry, and in space exploration [1,2].The wide range of applications of lithium-ion batteries benefits from their obvious advantages, such as long lifespans, fast self-discharge rates, and high energy and power capability [3,4].However, their performance suffers from two main obstacles: capacity loss and resistance increase during the use of the batteries, because lithium-ion batteries are complex chemical systems.The safety and reliability of Li-ion batteries have drawn the attention of researchers.Online capacity estimation through a battery management system (BMS) is required to enhance the performance of a power battery, to predict and monitor the battery's actual status, such as the state of health (SOH) and state of charge (SOC).These properties monitored by BMS can help avoid under-use and ensure safety and reliability during operation process [5,6].
Many researchers study the prognostics of lithium-ion battery use capacity [7][8][9] or internal resistance [10] to show the internal degradation.In practical operation, the cost of monitoring the internal resistance of batteries is high and also hard to achieve.Thus, it is valuable for practical use to extract health indicators that can be easily measured or calculated for battery health prognostics.
Research on extracting the features reflecting lithium-ion batteries' state of health through analyzing the charge/discharge curves are rather extensive.Parameters such as battery terminal voltage [11], charge time interval in a fixed voltage range [12], and the area under the constant voltage curve in the charging processes [13] are used in battery prognostics.
Moreover, a signal processing approach is applied in battery SOH prognostics.This approach includes increment capacity analysis (ICA), discrete wavelet transform, differential voltage analysis, and differential thermal voltage (DTV).In this approach, filters such Energies 2024, 17, 1272 2 of 14 as a Gaussian filter and moving average filter are used to reduce the influence of noise.Then, feature parameters are calculated to identify the state of health.For example, the Gaussian filter can be used to denoise the IC curve and to build a degradation model for battery SOH forecasting [14].In summary, the approach for signal processing can extract feature variables to acquire precise capacity value.
Studies for estimating battery capacity have been emerging for decades, and a large number of relevant methods have been published [15].These methods of capacity estimation can be approximately divided into two categories: (1) model-based methods and (2) data-based methods.
Model-based methods consist of (semi)empirical models and electrochemical models.
(Semi)empirical models describe the chemical and physical processes in a battery via an empirical or semi-empirical model.The degradation of the battery depends on several factors, such as discharging of depth (DOD) and the discharging current.Consequently, for a (semi)empirical model, the calendar-life test data are critical [16].The equivalent circuit model (ECM) is an empirical model [17].An ECM-based method can identify the ECM parameters and then estimate the capacity of a battery based on the identified parameters [18].Recursive least squares (RLSs) are also applied to the capacity estimation combined with ECM.In Ref. [19], a genetic algorithm and recursive least square with forgetting factors are combined to obtain precise values of internal resistance in a standard equivalent circuit model (ECM), and then the health conditions are obtained.Ref. [20] proposed a method based on ECMs, and decoupled weighted recursive least squares are also applied in this method, which can provide accurate estimations of the SOC value.Plett [21] used the combination of an extended Kalman filter (EKF) and an empirical model to make an accurate estimation of the Li-ion battery capacity.By using the empirical model, state transition and measurement function can be implied.EKF results may be unstable for highly nonlinear state space models due to the model's linearization process.To overcome the limitations of EKF, Plett applied a variant of a Kalman filter which uses a sigma point instead of Taylor expansion to achieve capacity estimation [22].Earlier studies by Plett proposed a number of empirical model-based methods that use EKF [23], UKF [24] and a particle filter [25].The performance of a (semi)empirical model-based approach relies on the fidelity of the measurement data.And a (semi)empirical model-based approach can hardly show physical insight into a battery cell.
Electrochemical models [26] treat battery ageing by modelling the real internal chemical and physical processes in a battery, e.g., the pseudo-two-dimensional (P2D) model and the single particle model (SPM) [27].Electrochemical models include electrochemical impedance spectroscopy (EIS) and solid electrolyte interface (SEI), both of which lead to capacity loss [22,23].To parameterize the P2D model, Laue and his cooperators [28] employed quasi-static three-electrode measurements of the open-circuit potential, electrochemical impedance spectra and C-rate tests.But those models need in-depth chemical and physical knowledge, as well as abundant lab data.Additionally, the real internal electrochemical processes are difficult to observe in an experimental study.
The data-driven approaches, such as regression vector machine (RVM) [29], artificial neural network (ANN) [30], Gaussian process regression (GPR) [31,32] and fuzzy logicbased [33], have recently attracted much attention.These approaches extract feature variables as input and treat the battery capacity as output.Zenati et al. [34] proposed a fuzzy logic model using parameters measured by EIS to estimate the SOH.Liu et al. [31] utilized a GPR model to make predictions.Li et al. [32] proposed a method based on a combination of GPR and incremental capacity analysis to prognosticate the battery condition.Although the data-driven approaches are able to capture the nonlinear processes for battery degradation, they require manual feature selection.
To overcome the disadvantages of the traditional estimation methods, in this paper an online capacity estimation method is proposed based on a convolutional neural network (CNN) and incremental capacity analysis (ICA).Moreover, a Gaussian filter is adopted to smooth the IC curves and to preserve the important features which strongly influence Energies 2024, 17, 1272 3 of 14 battery aging processes.Those features are extracted automatically via the CNN without any complicated correlation analysis or calculation for feature values and capacity.The output of the present model is the capacity of marked batteries.The signal processing and incremental capacity curve are verified by the aging datasets from NASA PCoE.This paper is divided as follows: Section 2 gives a brief introduction to the incremental capacity analysis method and battery experimental dataset used in this work.In Section 3, CNN models used in this model are introduced and more detailed information, such as parameter values, are listed.Four Li-ion battery testing data including voltage, temperature, and calculated IC curves from NASA PcoE battery datasets are applied to verify the performance of the present CNN model.Section 4 presents the estimation of battery capacity results and discusses both advantages and disadvantages of the proposed model.Conclusions are presented in Section 5.

Experimental Battery Data and Feature Extraction
In this part, four datasets extracted from the NASA Ames Prognostic Center of Excellence are applied in this study.Firstly, datasets of the battery aging experiment are analyzed.Then, the IC curves and temperature are calculated and denoised before the training process of CNN.

Experimental Battery Data
To test the performance of high-power batteries, the NASA Ames Prognostic Center of Excellence applied 18,650 lithium-ion batteries to make a series of charging and discharging cycle experiments on the testing platform and to obtain a series of datasets under certain experimental conditions.The batteries were marked with #5, #6, #7 and #18, and they were tested under different conditions (charging, discharging and EIS).The rated capacity and rated voltage of the tested batteries were 2.2 Ah and 3.7 V, respectively.
In the test process, all the batteries were tested using three test strategies, which were constant current and constant voltage charge (CC-CV), constant current (CC) discharge, and impedance measurements modes, at 24 • C (room temperature).The battery test methods and the tendencies of battery capacity degradation during the test process are shown in Figure 1.The charging process in constant current (CC) mode at 1.5 A was first carried out until the battery voltage reached 4.2 V; then, a constant voltage (CV) process was carried out at 4.2 V until the battery current dropped to 20 mA, as shown in Figure 1b.For batteries #5, #6, #7, and #18, the discharging process in constant current mode at 2.0 A is first carried out until the voltage drops to 2.7 V, 2.5 V, 2.2 V and 2.5 V, respectively, as shown in Figure 1a.Table 1 lists the NASA battery testing conditions.In this paper, the input data are chosen (capacity curve) from the discharging data.Discharging profiles are composed with a CC process.As depicted in Figure 1b, when charging and discharging cycles increase, the capacity does not decrease monotonically, as there will appear regeneration phenomena and the unsteady phenomena will influence the capacity estimation remarkably due to the nonlinear relationship between battery capacity and cycle number.This characteristic brings difficulties in estimating capacity in traditional methods.In this paper, the input data are chosen (capacity curve) from the discharging data.Discharging profiles are composed with a CC process.As depicted in Figure 1b, when charging and discharging cycles increase, the capacity does not decrease monotonically,

Incremental Capacity Curve
ICA works well for estimation of state of health.The IC curves reflect the rate of capacity change over voltage monitored during a discharging process.Thus, the battery capacity and voltage in the whole discharging process should be monitored.Capacity is estimated by the Coulomb counting method: where I and t represent the discharging current and time, respectively.The IC curve is calculated by Equation (2): where V represents the discharging measured voltage.

Temperature
The performance of an IC curve significantly depends on temperature.Thus, the IC curve must be calculated at the same initial temperature.To mitigate such influences, the temperature is calculated as a part of the input matrix for CNN.
An IC curve will be disturbed by the noise in a cycling process, and temperature is also easy to be noised when measured, as shown in Figure 2.
where I and t represent the discharging current and time, respectively.The IC curve is calculated by Equation ( 2): where V represents the discharging measured voltage.

Temperature
The performance of an IC curve significantly depends on temperature.Thus, the IC curve must be calculated at the same initial temperature.To mitigate such influences, the temperature is calculated as a part of the input matrix for CNN.
An IC curve will be disturbed by the noise in a cycling process, and temperature is also easy to be noised when measured, as shown in Figure 2. One can observe that the IC curve is strongly affected by measurement noise, which makes it hard to extract feature parameters and to analyze for a convolutional neural network (refer to Figure 3).Thus, filter methods should be applied to reduce the influence of noise and smooth the curves.One can observe that the IC curve is strongly affected by measurement noise, which makes it hard to extract feature parameters and to analyze for a convolutional neural network (refer to Figure 3).Thus, filter methods should be applied to reduce the influence of noise and smooth the curves.There are many effective filter methods that can be used to smooth the curves.Two filter methods, namely moving average (MA) and Gaussian filter (GSF), are popular.
where x(•) is the input of methods, y(•) is the output, and M represents the fixed window size.With the moving average filter, random white noise can be reduced when the sharp- There are many effective filter methods that can be used to smooth the curves.Two filter methods, namely moving average (MA) and Gaussian filter (GSF), are popular.
where x(•) is the input of methods, y(•) is the output, and M represents the fixed window size.With the moving average filter, random white noise can be reduced when the sharpest step response is continued.The size of the window strongly influences the performance of denoising and the smoothness of the curve.Choosing a too-small window size may make the smoothing effect of curves unacceptable; on the contrary, if the size is too large, curves may become severely deformed and therefore make it difficult to extract some important feature parameters from them.Thus, the size of the window should be chosen from within a proper range.
The Gaussian filter has good performance in smoothing the curves, which is critical in distinguishing the low-frequency part from the high-frequency part.Generally, the low-frequency part is regarded as the true signal and the high-frequency part is regarded as noise.Thus, the Gaussian filter can extract a signal from the high-frequency noise.The corresponding Gaussian distribution reads:

Input and Output Matrix
The objective of this research is to make a precise capacity estimation of Li-ion batteries using measured current, incremental capacity curve and temperature as inputs.The voltage and temperature can be directly measured from the batteries.The incremental curve can be calculated through acquiring capacity by the Coulomb counting method.To better show the inputs and outputs, three curves for one discharging cycle are plotted in Figure 1.
The discharging data from t 1 to the end of the CC test time t L are employed for the input vector: where V l represents the charging current at the l sample interval.dT dt l and dQ dV l are differentials of temperature and incremental capacity at l sampling intervals, corresponding to the voltage V l , respectively.

Overall Structure of CNN Net
This paper investigated a CNN net to predict the capacity of batteries based on acquired data: voltage, current and incremental capacity curves in a discharging cycle.The CNN is employed for this purpose.The structure of the CNN is shown in Figure 4.
the voltage Vl, respectively.

Overall Structure of CNN Net
This paper investigated a CNN net to predict the capacity of ba eries based on acquired data: voltage, current and incremental capacity curves in a discharging cycle.The CNN is employed for this purpose.The structure of the CNN is shown in Figure 4.

Batch normalization
Batch normalization (BN) is one of the most necessary methods for training a deep neural network.BN is used before the activation function of each layer, so that the nonactivated output obeys a normal distribution, the mean of which equals 0 and the variance of which equals 1.Then, the batch normalization calculation results are reduced to the original input characteristics by scaling and translation.This process not only ensures the network capacity and speeds up the network training; to a certain extent, it also alleviates the problem of gradient disappearance and explosion in the deep network and greatly improves the network generalization ability.

ReLU (rectified linear unit) layer
The rectified linear unit function can be expressed as: Values are passed through ReLU to form a feature map and are then transformed to the next layer.There are four type of layers in a CNN:

Fully connected layers
1. Convolutional layer A convolutional layer carries a convolution operation which is calculated through convolution kernels.Specifically, a connection between each unit of a convolutional layer and local patches is established through a set of weights called filter banks.Local patches are parts of the image in the feature maps of the previous layer.

Batch normalization
Batch normalization (BN) is one of the most necessary methods for training a deep neural network.BN is used before the activation function of each layer, so that the nonactivated output obeys a normal distribution, the mean of which equals 0 and the variance of which equals 1.Then, the batch normalization calculation results are reduced to the original input characteristics by scaling and translation.This process not only ensures the network capacity and speeds up the network training; to a certain extent, it also alleviates the problem of gradient disappearance and explosion in the deep network and greatly improves the network generalization ability.

ReLU (rectified linear unit) layer
The rectified linear unit function can be expressed as: Values are passed through ReLU to form a feature map and are then transformed to the next layer.

Fully connected layers
Fully connected layers play an important role in matrix multiplication.Fully connected layers contain separate weight matrices, which can show pair-wise interactions occurring between output and input.The fully connected layer acts as a "classifier" in the entire convolutional neural network.If operations such as convolutional layers, pooling layers, and activation functions map raw data to the hidden feature space (the process of feature extraction and selection), the fully connected layer acts as a marker space that maps the learned feature representations to the sample.In other words, the features are grouped together (highly purified features) so that they can be handed over to the final classifier or regression.

Implemented CNN Architecture
The structure of CNN for an estimation model is composed of six models, as shown in Figure 5.The proposed CNN architecture consists of four convolution models, three fully connected models, and a regression layer.The first convolution model owns a convolutional layer, a max pooling layer, a batch normalization layer and a ReLU layer.The second and third convolution models owns a convolutional layer, a batch normalization layer and a ReLU layer.Two fully connected models follow.The first connected model owns a fully connected layer, a batch normalization layer and a ReLU layer.The second fully connected model owns only a fully connected layer.The last layer is an output layer, which owns a regression layer that gives a estimation of capacity.

Implemented CNN Architecture
The structure of CNN for an estimation model is composed of six models, as shown in Figure 5.The proposed CNN architecture consists of four convolution models, three fully connected models, and a regression layer.The first convolution model owns a convolutional layer, a max pooling layer, a batch normalization layer and a ReLU layer.The second and third convolution models owns a convolutional layer, a batch normalization layer and a ReLU layer.Two fully connected models follow.The first connected model owns a fully connected layer, a batch normalization layer and a ReLU layer.The second fully connected model owns only a fully connected layer.The last layer is an output layer, which owns a regression layer that gives a estimation of capacity.

Parameter Update and Stochastic Gradient Descent with Momentum
Most unknown parameters in a CNN model, such as weights and bias, are adjusted and optimized in the training process.In order to properly update parameters, a cost function L(θ) was proposed to calculate the difference (or generalization errors) between hypothesis values predicted by the model and the target value.The generalization error calculated by the cost function was expected to be minimized through the optimization process, the stochastic gradient descent with momentum, which is widely used in all kinds of methods.The stochastic gradient descent with momentum (SGDM) updates the parameter θ (weights, ω, and biases, b) by moving in small steps, the direction of which is the negative gradient of cost function.This process was repeated many times in each iteration until the error was below the expected value.Each iteration was finished on a small training sample batch.
The loss function can be expressed as: where N means the number of samples in one iteration, h θ (x) means the hypothesis function, y means the ground truth corresponding to the input matrix x, λ is the L 2 regularization factor which determines the penalty, and Ω(θ) is a regularization term.
Energies 2024, 17, 1272 9 of 14 The hypothesis function can be expressed as: where ω n and x n represent the n th parameter and the n th corresponding input value.b 0 is the bias of layer, and x 0 = 1.It is difficult for the stochastic gradient descent method to search in an effective way if an anisotropic function is optimized.SGD with momentum can somehow accelerate the optimization process.The formula of SGD with momentum is as follows: where ω is the weights; η, as one of super parameters, is the learning rate, which needs to be set before optimization by experience; v represents the so-called momentum in this method, and the super parameter α determines the contribution of the gradient calculation in the previous iteration.

∂L(θ)
∂θ is the gradient of the loss function.For a certain iteration, the gradient can be expressed as: ∂L(θ) ∂θ = ĝ + λθ (13) where N denotes the number of samples, x i denotes the i th input matrix, and θ denotes a certain parameter (weights ω and bias b).

Detail Information of CNN
To guarantee accuracy, the CNN model was trained with 40 epochs in which each minibatch contains 40 examples.The initial learning rate α was set to 0.01 for all fully connected layers and convolutional layers.The values of weights in each layer were randomly initialized; the mean of weights was set to 0, the standard deviation of weights was set to 0.01, and the biases were set to 0. The CNN configurations are listed in Tables 2 and 3. Table 4 lists some important parameters for training the present CNN, which has three convolutional layers and three fully connected layers.Battery prognostics plays a key role in electric equipment, since characteristics parameters can make both reliability and safety of the equipment better and provide valuable information for users.Accurate estimated capacity belongs to battery health management.Many researchers have carried out many studies of capacity or SOH estimations based on ICA.
In this work, IC curves are treated as input data without pre-processing, which can reduce the complexity for online estimation.
Here, the external parameters can be directly measured and IC curves can be calculated; both are used to estimate battery capacity.Hence, battery capacity estimation models are built for predicting battery health conditions.Firstly, CNN and ICA are trained for estimation.The next section shows the estimation of battery capacity according to the feature variables of IC curves.The input matrix variables are X = [x 1 , x 2 . .., x N ] T , where x i is a 3D vector consisting of voltage, temperature and ICA value, and N is the cycle number.The true value is chosen as the output dataset.
According to the present CNN based on ICA battery capacity estimation models, four battery testing data from NASA are used to evaluate the performance, including the accuracy and efficiency of the proposed method.The battery data are divided into two parts: training and validation sets.
Figure 6 gives the flow diagram for capacity estimation and its main difference from much previous ICA research, which contains three methods.In method 1, the IC curves are extracted from parameters including the voltages and currents of battery datasets; then, the IC curves are smoothed by using a Gaussian filter.In method 2, data are transformed into a 40 × 3 matrix.

Results and Analysis
Four ba ery testing data from the NASA database were used to analyze the accuracy of the proposed prediction model.mean absolute percentage error (MAPE) was employed to monitor the performance of the present CNN:

Results and Analysis
Four battery testing data from the NASA database were used to analyze the accuracy of the proposed prediction model.
The mean absolute percentage error (MAPE) was employed to monitor the performance of the present CNN: where N represents the number of samples for testing, x i is the estimated value, and x i is the corresponding true value.The capacity estimation results and the MAPE for batteries #5, #6, #7 and #18 are shown in Figure 7. Figure 7a-d Table 4 shows the performance estimation for the proposed CNN.It can be seen that the mean absolute percentage errors are a, b, c, d for the ba eries labeled #5, #6, #7, and #18.

Conclusions
The capacity estimation of ba eries is an important factor for ba ery health prognostics.In this study, ICA and a CNN were integrated to monitor ba ery health.
The present approach is proposed for online capacity estimation.The voltage, temperature and incremental capacity are used to construct the input matrix.The CNN is employed to extract the relevant complex relationship.
The NASA database under different test conditions was utilized to verify the performance of the model.The results of the estimation are that the capacity estimation has high accuracy, effectiveness, reliability and robustness, where the maximum error and MAPE of the estimation value are less than 6% and 1.2%, respectively.The entire IC curve is Table 4 shows the performance estimation for the proposed CNN.It can be seen that the mean absolute percentage errors are a, b, c, d for the batteries labeled #5, #6, #7, and #18.

Conclusions
The capacity estimation of batteries is an important factor for battery health prognostics.In this study, ICA and a CNN were integrated to monitor battery health.
The present approach is proposed for online capacity estimation.The voltage, temperature and incremental capacity are used to construct the input matrix.The CNN is employed to extract the relevant complex relationship.
The NASA database under different test conditions was utilized to verify the performance of the model.The results of the estimation are that the capacity estimation has high accuracy, effectiveness, reliability and robustness, where the maximum error and MAPE of the estimation value are less than 6% and 1.2%, respectively.The entire IC curve is adopted as one component of an input matrix to avoid the complex signal process for acquiring points that carry feature information.In summary, the proposed method has many advantages, including high accuracy, robustness, reliability, and so on.
There are also some limitations in this work.For example, the input matrix size is fixed, and the inner mechanism is not reflected in the present model, which undoubtedly restricts the application of this method in the estimation of battery capacity.Another limitation is that the present approach is not suitable for different kinds of batteries; thus, it should be further developed.Moreover, other methods will be employed in our future work to improve the accuracy of the present model, as pointed out by one of the reviewers.

Figure 1 .
Figure 1.(a) Overall capacity change with cycle number of four labeled ba eries.(b) Current and voltage of a discharging testing process.

Figure 1 .
Figure 1.(a) Overall capacity change with cycle number of four labeled batteries.(b) Current and voltage of a discharging testing process.

Figure 2 .
Figure 2. Comparison of Gaussian filter and initial incremental capacity curve.

Figure 2 .
Figure 2. Comparison of Gaussian filter and initial incremental capacity curve.

Figure 3 .
Figure 3. Incremental capacity curve of #6 battery in different cycles.

Figure 4 .
Figure 4.The Overall Structure of DCNN model.There are four type of layers in a CNN: 1. Convolutional layer A convolutional layer carries a convolution operation which is calculated through convolution kernels.Specifically, a connection between each unit of a convolutional layer and local patches is established through a set of weights called filter banks.Local patches are parts of the image in the feature maps of the previous layer.

Figure 4 .
Figure 4.The Overall Structure of DCNN model.

15 Figure 6 Figure 6 .
Figure6gives the flow diagram for capacity estimation and its main difference from much previous ICA research, which contains three methods.In method 1, the IC curves are extracted from parameters including the voltages and currents of ba ery datasets then, the IC curves are smoothed by using a Gaussian filter.In method 2, data are transformed into a 40 × 3 matrix.

Figure 6 .
Figure 6.Main difference between traditional ICA-based estimation and proposed model: (a) Traditional ICA based model.(b) ICA-based CNN.

Table 2 .
Parameters for the present CNN.