## Abstract

Accurate estimation of the state of health (SOH) is an important guarantee for safe and reliable battery operation. In this paper, an online method based on indirect health features (IHFs) and sparrow search algorithm fused with deep extreme learning machine (SSA-DELM) of lithium-ion batteries is proposed to estimate SOH. First, the temperature and voltage curves in the battery discharge data are acquired, and the optimal intervals are obtained by ergodic method. Discharge temperature difference at equal time intervals (DTD-ETI) and discharge time interval with equal voltage difference (DTI-EVD) are extracted as IHF. Then, the input weights and hidden layer thresholds of the DELM algorithm are optimized using SSA, and the SSA-DELM model is applied to the estimation of battery's SOH. Finally, the established model is experimentally validated using the battery data, and the results show that the method has high prediction accuracy, strong algorithmic stability, and good adaptability.

## 1 Introduction

Lithium-ion batteries are widely used in the field of electric vehicle power supply and energy storage system because of their high energy density, long cycle life, good safety performance, and many other advantages [1]. In order to ensure the safe and efficient operation of electric vehicles, an effective battery management system (BMS) is crucial [2]. While state of health (SOH) is the key BMS detection state parameter, it is of great significance to accurately estimate the SOH of the battery [3]. In addition, the estimation of SOH can provide an important basis for the calculation of parameters such as state of charge and state of power of batteries, as well as useful information for the equalization control of batteries [4].

Currently, the estimation of battery SOH is mainly divided into model and data-driven methods [5–7]. The modeling method requires the establishment of a suitable battery model, through which the relevant parameters are obtained for battery SOH estimation [8]. Among them, the electrochemical model is complex in structure and computationally intensive, and the equivalent circuit model ignores the influence of internal parameters on the battery decay, which leads to a decrease in model accuracy [9,10]. The data-driven method does not need to explore the working mechanism of the battery, but to find the representative characteristics from the perspective of data [11]. It can directly mine the hidden battery health state information and its evolution pattern from the battery performance test data, and model the input and output variables to achieve battery SOH estimation by machine learning algorithms [12]. Extreme learning machine (ELM), a new single hidden layer feedforward neural network (SLFN) algorithm, can not only well avoid the problems of gradient descent-based neural network algorithms with many adjustment parameters and the tendency to fall into local optimal solutions but also overcome the defects of a class of algorithms represented by support vector machines in terms of uncertainty representation [13]. Deep learning (DL) is a method in machine learning based on learning representations of data, which can get rid of the disadvantages of traditional shallow learning algorithms that cannot capture the effective features of data [14]. Deep extreme learning machine (DELM) has the advantages of DL, while retaining the characteristics of ELM algorithm with few adjustment parameters and fast learning speed [15]. However, random input weights and hidden layer thresholds can affect the stability and estimation accuracy of the DELM algorithm, so their selection is important. For parametric optimization problems, population intelligence algorithms are usually introduced. Particle swarm algorithm can improve the convergence speed but easily fall into local optimum solutions [16]. Genetic algorithm is an effective global optimization algorithm but has a slow convergence rate and a complex optimization process [17]. Artificial Bee Colony algorithm can overcome the local optimum solution well but cannot be updated iteratively using the global optimum information [18]. SSA is superior to the existing algorithm in search accuracy, convergence speed, stability, and avoiding local optimal value [19].

Data-driven methods often need a lot of data to train the SOH estimation model and establish the mapping relationship between health factors (HFs) and battery SOH. IHF, which can be monitored during battery charging and discharging, is the mainstream online SOH estimation index. Li et al. used correlation analysis to extract important health feature variables from partial incremental capacity curves, but the HF extraction process is complicated [20]. Jiang et al. selected the average values of charge and discharge currents and voltages as the input of the battery SOH prediction model, but the SOH could not be predicted online and there is redundancy among the health features [21].

Based on the above research, this paper proposes IHF and SSA-DELM to estimate SOH, which overcomes the shortcomings of traditional off-line estimation and model estimation. First, the relationship between the change pattern of temperature and voltage during battery discharge and the decay of battery SOH with charge/discharge cycles is analyzed, and two IHFs, DTD-ETI and DTI-EVD, are theoretically extracted as model inputs. Then, to address the problems of poor stability and low estimation accuracy caused by random input weights and hidden layer thresholds of DELM algorithm, a battery SOH estimation method based on SSA algorithm to optimize DELM is proposed to improve the model accuracy and algorithm stability.

## 2 Construction of Indirect Health Feature for Lithium-Ion Battery

### 2.1 Battery Aging Experimental Data Analysis.

To study high-power batteries, the NASA Ames Center for Estimated Excellence conducted a series of experimental charge and discharge tests on 18650-type lithium-ion batteries at room temperature [22]. The charging and discharging process of Li-ion battery includes constant current charging mode, constant voltage charging mode and constant current discharging mode. The battery is charged at a constant current of 1.5 A until the voltage drops to 4.2 V. Then, the battery remains in constant voltage charging mode until the charging current drops to 20 mA and charging is complete. Finally, the discharge phase is performed at a constant current of 2 A until the voltage of the batteries marked B0005 and B0007 drops to 2.7 V and 2.2 V. Meanwhile, the experiments were conducted by electrochemical impedance spectroscopy frequency scan from 0.1 Hz to 5 kHz for impedance measurement.

*C*

_{i}is the capacity of the battery at the

*i*th discharge process and

*C*

_{0}is the rated capacity of the battery.

Figure 1 shows the cell SOH versus the number of cycles for the two Li-ion batteries during the 168 charge and discharge cycles. As can be seen from Fig. 1, with the increase in the number of charge and discharge cycles, the overall SOH values corresponding to the two batteries show a decreasing trend.

### 2.2 Construction of Indirect Health Feature.

The physical quantities that can be directly measured from the outside of the lithium-ion battery include voltage, current, temperature, and time. With the continuous cycle of the charge and discharge process, the voltage curve and temperature curve of the battery have obvious changes. Considering that the new energy storage device has the largest working time at the beginning when it is fully charged, but as the charge and discharge cycle is used, the working time becomes shorter and shorter. It can be seen that there is a certain relationship between the discharge time and battery capacity degradation. This paper analyzes the relationship between the discharge voltage curve and the discharge temperature curve and the gradual attenuation of battery SOH with the charge and discharge cycle and constructs DTD-ETI and DTI-EVD as IHF to characterize the attenuation of SOH during the cycle of charge and discharge.

Figure 2 shows the extraction process of IHF. Figure 2(a) is the temperature and voltage change curve during the battery discharge stage. It can be seen that as the number of charge and discharge increases, while the SOH of the lithium-ion battery gradually attenuates, the constant current discharge time shows a shortening trend. Figure 2(b) constructs DTD-ETI and DTI-EVD, respectively, as IHF to characterize the attenuation of battery SOH. This paper takes the Pearson correlation coefficient close to 1 as the goal and uses the ergodic method to find the optimal time segment of the discharge temperature and time curve. Figure 2(c) shows the Pearson correlation coefficient of DTD and SOH obtained at different times or voltage segments of the battery. It can be seen from the figure that the selection of different segments has a greater impact on the SOH correlation. Taking the B0005 battery as an example, the optimal time segment is selected [990,1240], and the optimal voltage segment is selected [3.7,4].

*k*th cycle is as follows:

*k*cycles is expressed as follows:

*t*

_{max}and

*t*

_{min}is the corresponding time of DTD;$TtmaxandTtmin$ is the corresponding temperature, $tDTI_EVD$ is a health feature sequence, namely, DTI-EVD;

*V*

_{max}and

*V*

_{min}is the corresponding voltage of EVD, $tVmax$ and $tVmin$ is the corresponding time.

### 2.3 Analysis and Validation of the Constructed Indirect Health Feature.

The correlation degree between IHF and battery SOH has been expressed visually in Sec. 2.2, but there is no mathematical analysis of the relationship between them, so this section uses Spearman's rank correlation analysis and Pearson's correlation analysis to quantify the correlation degree between IHF and SOH of the constructed Li-ion battery.

*Y*= {

*y*(

*k*),

*k*= 1, 2, …,

*n*}; and make the health characteristic sequence as the comparison sequence

*X*= {

*x*(

*k*),

*k*= 1, 2, …,

*n*}. The Pearson correlation analysis can quantitatively reflect the linear relationship between two variables

*X*and

*Y*, which is calculated by the formula:

The correlation coefficient takes values in the range of *r* ∈ [−1, +1], and when *r* is ±1 indicates that there is a linear relationship between two data series, and one set of data can be directly used to describe another set of data.

*R*(

*k*) is the rank of

*x*(

*k*) in

*X*, and

*Q*(

*k*) is the rank of

*y*(

*k*) in

*Y*, where rank represents the number of positions where the values of the variables are arranged in descending order. The value range of the correlation coefficient is

*r*

_{s}∈ [−1, +1]. If

*r*

_{s}= ±1, it means that the two sets of data are strictly monotonic.

The discharge temperature difference corresponding to the optimal discharge time segment [990,1240] is extracted as DTD-ETI and the discharge time interval corresponding to the optimal discharge voltage segment [3.7,4] is taken as DTI-EVD. The correlation between SOH and IHF of the two batteries is shown in Table 1. From the results, it can be seen that the absolute value of the correlation between IHF and SOH of the two batteries constructed is greater than 0.9, indicating the effectiveness of the extracted IHF.

Battery | IHF | r_{s} | r |
---|---|---|---|

B0005 | DTD-ETI | −0.9934 | −0.9944 |

DTI-EVD | 0.9883 | 0.9975 | |

B0007 | DTD-ETI | −0.9820 | −0.9886 |

DTI-EVD | 0.9929 | 0.9977 |

Battery | IHF | r_{s} | r |
---|---|---|---|

B0005 | DTD-ETI | −0.9934 | −0.9944 |

DTI-EVD | 0.9883 | 0.9975 | |

B0007 | DTD-ETI | −0.9820 | −0.9886 |

DTI-EVD | 0.9929 | 0.9977 |

Figure 3 shows the correlation curve between SOH and DTD-ETI and DTI-EVD of No. B0005 lithium-ion battery. It can be seen from the left figure of Fig. 3(a) that as the charge and discharge continue, the opposite numbers of DTD-ETI and SOH show the same trend, so it can be concluded that the two are negatively correlated. The right figure shows that they have a strong linearity. Relationship, verifying that DTD-ETI and SOH are linearly negatively correlated. In the same way, it can be seen from Fig. 3(b) that DTI-EVD and SOH are linearly positively correlated, and the expected effect is obtained.

## 3 State of Health Estimation Model for Lithium-Ion Batteries

### 3.1 Deep Extreme Learning Machine.

DELM first performs layer-by-layer unsupervised training on the input data using ELM-AE, and then initializes the entire DELM with the trained ELM-AE parameters. Compared with traditional deep neural networks, DELM has faster training speed while maintaining good generalization performance.

*X*= {

*x*

_{i}|1 ≤

*i*≤

*N*} and the set of samples for the output data is

*Y*= {

*y*

_{i}|1 ≤

*i*≤

*N*},where

*N*is the total number of samples. If the number of neurons in the hidden layer is

*J*, then

*H*= {

*h*

_{i}|1 ≤

*i*≤

*J*} is the set of output vectors of the hidden layer. The output of the hidden layer is as follows:

*G*is the activation function, and this paper uses the Sigmoid function, which has good feature discrimination.

*W*is the orthogonal random input weight from the input layer to the hidden layer,

*B*is the orthogonal random threshold of the hidden layer, and

*E*denotes the unit matrix.

*β*between the ELM-AE implicit layer to the output layer are obtained by solving the least squares solution of the following equation:

*C*is the regularization factor. For the sparse and compressed ELM-AE representations, the output weights are obtained by deriving

*β*in Eq. (10) and making the objective function zero as follows:

*X*is the input and output of the ELM-AE.

*X*is obtained as the 1st weight matrix

*β*

^{1}according to ELM-AE theory, followed by the feature vector

*H*

^{1}of the hidden layer, and so on until the input weights and the feature vector of the hidden layer of the last layer are derived. The output of the

*k*th implicit layer can be expressed as follows:

Compared with other DLs, DELM does not need to be fine-tuned. Its regression layer uses the least squares method and only performs one-step reverse calculation to get the updated weights. Therefore, the distinguishing characteristics of DELM are fast learning speed and strong generalization ability.

### 3.2 Sparrow Search Algorithm.

*t*is the current number of iterations,

*j*= 1, 2, …,

*d*, $Xi,jt$ denotes the

*j*th dimensional position of the

*i*th sparrow at the

*t*th iteration,

*T*is the maximum number of iterations,

*α*∈ [0, 1] is a random number.

*q*is a random number obeying the standard normal distribution,

*L*denotes a 1 ×

*d*matrix with all elements 1,

*R*

_{2}∈ [0, 1] and

*ST*∈ [0.5, 1] denote the warning and safety values, respectively.

*X*

_{p}denotes the best position optimal position of the sparrow,

*X*

_{w}denotes the current global worst position, and

*A*denotes a 1 ×

*d*-dimensional matrix with each element randomly assigned as 1 or −1,

*A*=

*A*

^{T}(

*AA*

^{T})

^{−1}.

*X*

_{w}is the current global optimal position,

*β*denotes the step control parameter, which is a normally distributed random number obeying a mean of 0 and a variance of 1.

*K*∈ [−1, 1] is a random number indicating the direction of sparrow movement and also the step control parameter;

*ɛ*is a very small constant to avoid the case that the denominator is 0;

*f*

_{i}denotes the adaptation value of the

*i*th sparrow,

*f*

_{g}and

*f*

_{w}, respectively, denote the current global best and worst fitness values.

### 3.3 State of Health Estimation Model Based on SSA-DELM Algorithm.

The constructed ELM-AE makes the random input weight of DELM orthogonal to the random threshold, but its input weight is still randomly generated. This paper combines the global optimization ability of the SSA algorithm with the rapid learning ability of DELM and solves the optimal solution of the input weights of the model to obtain the optimal SSA-DELM estimation model, which is used to estimate the battery SOH. The flowchart of the algorithm is shown in Fig. 6. First, the SSA parameters and DELM parameters are initialized. Then, the input weights and thresholds of DELM are optimized using SSA. The optimal values are input into DELM for training to obtain the desired output value. If the error function between the desired value and the actual value of SOH does not satisfy the set accuracy, the above optimization process is repeated continuously until the error function is less than the set value to form the final network. Finally, the results are obtained using test data.

According to Fig. 6, the specific process of SOH estimation using the SSA-DELM algorithm is as follows:

IHF extraction. The IHF sequences of DTI-EVD and DTD-ETI for Li-ion batteries were extracted from the discharge voltage curve and discharge temperature curve, respectively.

Data pre-processing. After importing the sample set of lithium-ion battery IHF, a normalization operation is performed to normalize the sample features to the [0,1] interval.

Model parameter search optimization. The specific operation steps are as follows:

Initialize the sparrow population. Each sparrow consists of a set of input weights and an implicit threshold.

- Initialize ELM-AE and DELM, assign the information of each sparrow to ELM-AE, and complete the training of each ELM-AE and DELM. And the fitness of each sparrow is evaluated. In this paper, the root-mean-square error (RMSE) of the expected output of DELM and the actual output is taken as the fitness function of each sparrow, and its formula is as follows:where(15)$E=\u2211j=1N\Vert \u2211i=1K\beta iG(wi\u22c5xj+bi)\u2212yj\Vert 22N$
*N*is the number of training data samples. Update the entire population information, calculate its fitness

*E*, and then compare it with the optimal fitness value during the previous iteration to obtain the new optimal value.Repeat the above optimization steps until the goal is reached or the maximum iteration cycle is completed.

Extract the sparrow location information of the sparrow population with the optimal fitness as DELM model parameters and construct the final estimation model for training in the training set.

Li-ion battery SOH estimation. The SSA-DELM model is used to perform SOH estimation on the lithium-ion battery test set, and the results are output after inverse normalization.

- Performance evaluation. The RMSE, mean absolute error (MAE), mean absolute percentage error (MAPE), and coefficient of adaptation (
*R*^{2}) are calculated for the prediction results. Smaller values of the first three indicate better estimation performance of the model, and*R*^{2}is close to 1, indicating good adaptation.(16)$RMSE=1n\u2211i=1n(xi\u2212xi*)2$(17)$MAE=1n\u2211i=1n|xi\u2212xi*|$(18)$MAPE=1n\u2211i=1n|xi\u2212xi*xi|\xd7100%$where(19)$R2=1\u2212\u2211i=1n(xi\u2212xi*)2\u2211i=1n(xi\u2212xi*\xaf)2$*n*is the total number of sample data;*x*_{i}and $xi*$ are the actual and estimated values of the*i*th sample data, respectively, and $xi*\xaf$ is the average of the estimated values of the*i*th sample data.

## 4 Results and Analysis

This paper validates the effectiveness of the SOH estimation model based on the SSA-DELM algorithm on the matlab2016b computing platform. First, the DTD-ETI and DTI-EVD of B0005 and B0007 batteries are extracted as the input of the model, and their SOH is used as the output of the model. The first 100 sample data of the batteries are used as the training set, and the remaining 68 samples are used as the test set for validation. The SSA algorithm was used in the experiment to determine the optimal input weights of the DELM model. In the initial parameters, the number of SSA algorithm populations is set to 10, the maximum number of iterations is set to 100, and the number of nodes in the input and hidden layers are 30 and 20, respectively. Finally, the model performance is compared with that of the commonly used BP neural network and DELM models, and the estimation results and errors of the two batteries are shown in Fig. 7.

From Fig. 7, the SOH estimates of the two batteries based on the SSA-DELM algorithm are closer to the true values compared with the other algorithms. The absolute error of SOH estimation for the battery based on DELM algorithm is within [−0.025,0.025]; the error of SOH estimation for the battery based on BP algorithm is within [−0.025,0.03]. And the battery SOH estimation error based on SSA-DELM is within [−0.02,0.015], which is small and shows high estimation accuracy, reflecting the good regression performance of SSA-DELM model in lithium-ion battery SOH estimation.

Figure 8 shows the RMSE and MAE of the two algorithms run 60 times on two sets of batteries. Analysis of Fig. 8 shows that the length of the variation range of RMSE based on the DELM algorithm is 0.009 and the length of the variation range of MAE is 0.007; while the variation range of RMSE and MAE based on the SSA-DELM algorithm are both below 0.004, which is half of that of the DELM algorithm, indicating that SSA-DELM model has higher estimation accuracy and stronger stability.

Table 2 lists the average values of RMSE, MAE, MAPE, and *R*^{2} for the two groups of cells run 60 times on the two algorithms, and the estimation errors of the two algorithms are expressed quantitatively, and it can be concluded that the RMSE and MAPE based on the DELM model are above 1% and the MAE is above 0.8%, while the RMSE and MAPE based on the SSA-DELM model are below 0.7%. The RMSE and MAPE of the SSA-DELM model are below 0.7%, and the MAE is below 0.5%, indicating that the SOH estimation by the proposed method has a high prediction accuracy. In addition, the R2 of SOH estimation using the proposed method is above 0.95, which indicates that the SSA-DELM model has good adaptability for battery SOH estimation. Table 2 records the running time of each estimation model. The calculation efficiency of the adopted SSA-DELM is not high, but it has high estimation accuracy and strong model stability.

Data set | Algorithm | RMSE | MAE | MAPE/% | R^{2} | Time (s) |
---|---|---|---|---|---|---|

B0005 | BP | 0.0433 | 0.0191 | 2.8452 | 0.9283 | 1.0103 |

DELM | 0.0114 | 0.0090 | 1.3300 | 0.8885 | 0.0554 | |

SSA-DELM | 0.0061 | 0.0048 | 0.7000 | 0.9687 | 5.1355 | |

B0007 | BP | 0.0226 | 0.0229 | 2.6452 | 0.8829 | 1.0153 |

DELM | 0.0105 | 0.0084 | 1.1420 | 0.8613 | 0.0527 | |

SSA-DELM | 0.0057 | 0.0045 | 0.6210 | 0.9528 | 5.2862 |

Data set | Algorithm | RMSE | MAE | MAPE/% | R^{2} | Time (s) |
---|---|---|---|---|---|---|

B0005 | BP | 0.0433 | 0.0191 | 2.8452 | 0.9283 | 1.0103 |

DELM | 0.0114 | 0.0090 | 1.3300 | 0.8885 | 0.0554 | |

SSA-DELM | 0.0061 | 0.0048 | 0.7000 | 0.9687 | 5.1355 | |

B0007 | BP | 0.0226 | 0.0229 | 2.6452 | 0.8829 | 1.0153 |

DELM | 0.0105 | 0.0084 | 1.1420 | 0.8613 | 0.0527 | |

SSA-DELM | 0.0057 | 0.0045 | 0.6210 | 0.9528 | 5.2862 |

## 5 Summary

Accurate battery SOH estimation can ensure the efficient and safe operation of electric vehicle battery systems. This study proposes a lithium-ion battery SOH estimation method based on the SSA-DELM algorithm. First, theoretically extract the new health feature of DTD-ETI from the discharge temperature curve, and at the same time extract DTI-EVD from the discharge voltage curve, together as the IHF estimated by the battery SOH, and verify their correlation with the battery SOH. Then, the SSA algorithm is used to optimize the input weight of the DELM algorithm, and the SOH estimation model of the lithium-ion battery based on the SSA-DELM algorithm is constructed. Finally, the NASA data set was used to verify the accuracy and robustness of the method on the matlab simulation test platform, and compared with the conventional DELM. The results show that the method has high prediction accuracy, strong algorithm stability and good adaptability.

## Acknowledgment

This work is supported by the Open research fund project of Hubei Engineering Research Center for safety monitoring of new energy and power grid equipment (Grant No. HBSKF202120).

## Conflict of Interest

There are no conflicts of interest.

## Data Availability Statement

All data that support the findings of this study are available from the corresponding author upon reasonable request.