A Method for Battery Health Estimation Based on Charging Time Segment

: The problem of low accuracy and low convenience in the existing state of health (SOH) estimation method for vehicle lithium-ion batteries has become one of the important problems in the electric vehicle ﬁeld. This paper proposes an improved cuckoo search particle ﬁlter (ICS-PF) algorithm based on a charging time segment from equal voltage data to estimate battery health status. Appropriate voltage ranges of charging time segments are selected according to the battery charging law, and in the meantime, the charging time segments are collected as a health indicator to establish the corresponding relationship with battery capacity attenuation value. An improved cuckoo search particle ﬁlter algorithm based on the traditional particle ﬁlter (PF) and cuckoo search (CS) algorithm is proposed by enhancing the search step size and discovery probability to estimate the capacity attenuation. The estimation result shows that this method is superior to the traditional particle ﬁlter and cuckoo search particle ﬁlter (CS-PF) method, as the maximum estimation error is less than 2%.


Introduction
As an ideal energy storage element, lithium-ion batteries make a great contribution to energy storage and environmental protection. They are popular with the public due to their outstanding advantages such as high energy density, long service life, and low selfdischarge rate [1,2]. To keep all lithium-ion batteries in good working condition, the health status (state of health, SOH) and especially the battery capacity has to be estimated precisely.
To improve the estimation accuracy of the state of health of lithium-ion batteries, the current academia has conducted a lot of research on SOH estimation methods [3]. Currently, the common methods used for estimating the SOH of lithium-ion batteries mainly include: the direct discharge method [4,5], the internal resistance method [6,7], the model method [8,9], the data-driven method [10], etc.
The direct discharge method is currently recognized as the only reliable method using a load to evaluate the SOH of a single battery. However, it is an offline test that has a strict application condition for vehicle power batteries [11]. The internal resistance method estimates SOH through the relationship between battery internal resistance and battery capacity attenuation, however, the accurate measurement of internal resistance is difficult in practical applications [12]. The electrochemical model [13], mathematical model [14], and equivalent circuit model [15,16] is collectively referred to as model methods. As for electrochemical models, the complex electrochemical system makes it difficult to control the internal degradation mechanism. Besides, the accuracy of the estimation is restricted by the credibility and robustness of the battery model.
The establishment of the mathematical model requires a large amount of summarized experimental data to obtain the change law of battery related parameters, which is timeconsuming. Generally speaking, the complexity of the equivalent circuit is lower than electrochemical model and the mathematical model. The circuits and electronic components are suitable for simulation and system-level design. However, their prediction accuracy is not as good as other methods as the parameters of the equivalent circuit model cannot change to reflect the dynamic characteristics of the battery [17]. The data-driven method does not need to analyze the internal mechanism of the battery. It can use artificial neural networks (ANNs) [18,19], a particle filter (PF) [20], support vector machines (SVMs) [21], or fuzzy logic (FL) [22,23] to process a large amount of battery working data to estimate the battery SOH. The error of the results of this model can be effectively reduced by increasing the sample data and learning frequency; this method has higher flexibility and estimation accuracy.
The particle filter is outstanding among the many filter technologies because of its sound processing capabilities for non-Gaussian and nonlinear systems [24], especially for SOH prediction. However, the prediction accuracy of the traditional particle filter method is limited for the particle degradation problem [25,26]. In recent years, many scholars have improved the particle filter by improving resampling technology [27,28]. Besides, with the introduction of biological intelligence algorithms, such as the intelligent water drop algorithm [29], the ant colony algorithm [30], etc., the particle degradation problem of particle filter algorithms can also be improved. The cuckoo search (CS) is a new biological algorithm with advantages such as few parameters, simple operation, easy implementation, random search path optimization, and strong search ability [31,32]. This search method has been widely used in the field of engineering optimization, such as in visual tracking [33] and defect prediction [34]; however, few battery SOH estimation algorithms introduce the dynamic cuckoo search algorithm into particle filters including in the existing improved particle filter algorithms, which provided us with the inspiration for the method proposed in this paper.
Although the current SOH prediction methods have made great progress in prediction accuracy, considering the uncertainty of electric vehicle operating environments the battery data of complete charging and discharging has become unrepresentative. The research at the current stage has proved that the proper partial charging voltage profile of batteries can be used in SOH prediction [35][36][37], which is a straightforward and effective solution for electric vehicles. Thus, we enhance the applicability of the SOH prediction method proposed in this paper from the perspective of batteries' charging time.
In this paper, we present the estimation of the SOH of vehicle power batteries based on the charging segment data using the improved cuckoo search particle filter method. First, we selected the appropriate charging time of the equal voltage interval during the constant current charging process as the health indicator. Second, we used the Pearson coefficient and Spearman rank correlation coefficient to evaluate the relationship between the health indicator and the capacity attenuation value, and then used a double exponential function to build the corresponding relationship between these two factors to construct a battery capacity attenuation model. Third, we improved the cuckoo search method through replacing the fixed discovery probability with dynamic discovery probability and introducing the changing trend of function value into the step update formula, then combining the improved cuckoo search and particle filter. Lastly, we tested the ICS-PF method, the traditional PF method, and the CS-PF method based on two types of batteries. The results showed that the charging time segment selected in this paper could reflect the battery capacity attenuation, with the ICS-PF method achieving higher accuracy in power battery SOH estimation than the traditional PF and CS-PF methods. Compared with other SOH estimation methods, the method proposed in this paper is easier in terms of data collection during actual application and has higher estimation accuracy.

The Estimation Method for Lithium-Ion Batteries
The health status of lithium-ion batteries characterizes the battery's power storage capacity. In the current research, the SOH of lithium-ion batteries includes performance parameters such as capacity, power, internal resistance, and peak power, etc. Generally speaking, SOH represents the ratio of the measured capacity to the rated capacity after the battery is fully charged under standard conditions [38]. The calculation formula is given in Equation (1): where: Q i is the maximum available capacity of the battery after the ith cycle of the aging test and Q e is the maximum available capacity of the initial battery.

Construction of Health Indicators
The recognition of health status is to establish the correspondence between the health indicator and the capacity attenuation of batteries. From the perspective of the actual driving process of electric vehicles, due to different drive situations the current, voltage, temperature, and other related performance parameters in lithium-ion batteries will be variable. Therefore, it is difficult to accurately estimate the SOH of a battery during driving conditions. To facilitate the collection of the relevant performance parameters, it is necessary to keep the parameters stable and reduce external environment influences as much as possible. It is also necessary to select the battery constant current charging process to estimate the battery SOH. Figure 1 shows the voltage change curve of a lithium-ion battery charged in a constant current and constant voltage mode under different charge and discharge cycles. The voltage drops are the transition stage of the external power supply from the constant current charging mode to constant voltage. As the number of charge and discharge cycles increases, the battery constant current charging time becomes shorter. During the actual use of the battery, its capacity cannot be fully utilized. Therefore, the health indicator selected in this article is the time interval between the two voltage intervals during the constant current charging process instead of the entire charging time.   The voltage range selected in this article is 3.8-4.05 V, and its expression can be computed using Equation (2): where T V=4.05 is the time required from the start of charging to the voltage of 4.05 V. T V=3.8 is the time required from the start of charging to the voltage of 3.80 V, and T i is the time required for the voltage to rise from 3.8 V to 4.05 V during the first cycle constant current charging process, which is the health indicator (HI). The sequence of this HI is given in Equation (3).
This paper analyzes the correlation between the selected HI and the capacity attenuation by introducing the correlation coefficients: Pearson coefficient r p and Spearman rank correlation coefficient r s . r p is used to evaluate the linear relationship between two variables and r s is to evaluate the monotonic relationship between two variables and to ensure the practicability of the prediction [39]. The correlation coefficients can verify the validity of the selected HI through quantitatively analyzing the degree of its influence on the capacity attenuation. The value range is in between (−1,1). When the value is 0, it means no correlation; when the value falls in (−1,0), it means negative correlation. On the other hand, when the value is in the range of (0,1), it means there is a positive correlation between the two variables.
The formula for the capacity attenuation in the aging process of lithium-ion batteries can be expressed by Equation (4), and the correlation coefficients can be expressed by Equations (5) and (6).
where Q e is the initial maximum capacity of the battery, Q i is the maximum capacity available for the battery after the ith cycle, and ∆Q i is the attenuation of the maximum capacity available to the battery after the ith cycle.
where x and y stand for the two data sequences of the correlation coefficient to be solved, x represents the constructed health indicator HI sequence, and y represents the battery capacity attenuation ∆Q sequence. d is the difference of sequence rank. The three batteries in the experiment are labeled as CS2#35, CS2#36, and CS2#37. The relationship between capacity attenuation data and HI can be calculated with the Pearson correlation coefficient r p and Spearman correlation coefficient r s through Equations (5) and (6). After data cleaning and noise reduction, the calculation results are shown in Table 1.
The calculation results of the two correlation coefficients of CS2#35, CS2#36, and CS2#37 are all close to −1, indicating a strong correlation between the time difference T i and the capacity attenuation ∆Q i . Therefore, it is theoretically feasible to construct the lithium-ion battery's HI to estimate the lithium-ion battery's health state.

Principles of Particle Filter
Particle filter is an approximate Bayesian filter algorithm based on Monte Carlo simulation. It can be described by a dynamic space model for many nonlinear filter problems and it uses discrete sampling points to approximate the probability distribution function of system random variables. It also replaces the integral operation with the sample mean to obtain the minimum variance estimate. The dynamic space model can describe many nonlinear filter problems as stated in Equation (7) below: where x k and y k are state equation and observation, respectively. The traditional particle filter algorithm has four main steps as follows: Step 1: Initialize particles-randomly generated x i 0 , i = 1, 2, 3 . . . N particle set.
Step 2: Importance sampling-the posterior probability density is approximately by the particle generated in step 1 with importance weights w i k , thus the state equation f k is used to predict the particle state value x i k+1 at k + ∆t in the beginning of importance sampling; then importance weight value should be updated to normalize the weight.
where y 1:k stands for the accumulation observation results up to time k and δ is the Dirac delta function.
Step 3: The resampling stage, mainly based on resampling the ∼ w i k value after the normalized weight to obtain the particle set at time k. In this stage, larger weighted particles are extracted repeatedly, while smaller weighted particles are removed, which can clear up the influence of the smaller weighted particles. However, the resampling stage bring a new negative phenomenon known as sample impoverishment [40,41]. The over-replication of high-weighted particles might lead to the reduction of the quantity of meaningful particles, which causes the capacity reduction of the new particle set. The number of effective particles is given in Equation (9).
Step 4: Describe the output particle set and compute the mean value using the statespace equation.
The particle diversity and effectiveness of the particle filter algorithm determine the accuracy of the algorithm. It is worth noticing that the weight of most particles is reduced after iteration, leading to the reduction of particle diversity. This paper selects a large overlap with the posterior distribution of real particles. The particle distribution replaces the original particles, which improves the prediction accuracy of the particle filter algorithm while controlling sample impoverishment.

Improvements to Particle Filter
The CS algorithm effectively solves the optimization problem by simulating the brood parasitism of certain species of cuckoos. It has advantages such as using the related Lévy [42] flight search mechanism, fewer parameters, it is easy to operate and realize, it has random search path optimization and strong optimization ability, etc. Hence, it has attracted the attention of many scholars. It has global optima solution through establishing a Markov chain model of the CS algorithm.
Based on the analysis of Section 2.2, the important and resampling process in PF is suboptimal, which leads to the problem of particle impoverishment. Therefore, CS is applied to the particle filter to mitigate the negative issue. The CS algorithm is based on three assumptions [43]: (1) Each cuckoo lays an egg, stacked in a randomly selected nest; (2) The best high-quality egg will be transferred to the next generation; (3) The number of nests is fixed, and the probability of cuckoo eggs being found is P(a).
Combined with the particle filter algorithm, under the condition that these assumptions are established, the updated formula for finding a bird nest is given in Equation (10).
where x t k stands for the Kth solution looped to the tth generation, α is the control step size which obeys the normal distribution, and L(λ) follows the L . evy probability distribution and it expressed as the following Equation (11).
where x t k stands for the Kth solution looped to the tth generation, µ and v are two parameters that obey normal distribution, and x t b is the best solution reached after tth generation. This paper mainly improved the particle filter method through two aspects as follows: (1) The fixed discovery probability is replaced by dynamic discovery probability.
The location formula has been improved by comparing the generated solution and discovery probability P a to realize the replacement of the original discovery probability with a dynamic one. The discovery probability P a is a fixed value set in an initialization period in the traditional CS algorithm, which makes the algorithm easier to fall into the local optimum at a later stage of iteration. By using the improved location formula, each iteration process produces a new solution for replacing the original particle generated randomly. After that, the discovery P a is compared with M to determine whether to produce the new particles or not. When M is bigger than P a , the original particle has to be eliminated; on the other hand, when M is less than P a , the original particle will not be changed. M is a random value between 0 and 1.
where x t a , x t b are the two solutions selected randomly when the number of iterations is t. The purpose of the function update is not to concentrate all particles in the high likelihood region. The individuals should be reasonably distributed in the high-likelihood area. A larger value in the early stage of iteration is helpful for the formula to jump out of the local optimal solution. However, as the particle weight increases, the algorithm should keep a convergence level by decreasing the discovery probability P a . In this paper, the cosine decreasing strategy is used to realize the dynamic change of P a .
where N max is the maximum loop times during the calculation period, and P a max is the control parameters of P a , generally equal to 0.45.
(2) The relationship between search precision and search speed is balanced by introducing the changing trend of the function value into the step update formula.
The size of search step is related to the search range: the larger search range, the larger the step size required to improve the speed of the search to the global optimum solution. The traditional step search is entirely random, which is determined by the normal distribution of process noise µ and observation noise v. Although the random search step size could satisfy the diversity of solutions and avoid falling into the local optimal solution in operation of the CS algorithm, the global convergence speed of the CS algorithm can be reduced due to the uncertainty of step size in the scope of partial search. To achieve faster search speed and higher accuracy of the algorithm, the following two steps are considered: a.
The algorithm uses a large step size in the early stages to improve the global search speed in battery information; b.
The algorithm also uses a small step size in the later stages to improve the accuracy of the algorithm.
The calculation formula of the step factor is stated in Equation (14).
where α max is the maximum factor during the searching period, and α min is the minimum factor during the searching period where its value is 0.01. After finishing calculating the step size and updating the searching speed and accuracy, the position update formula can be expressed as shown in Equation (15).
where x t b is the best solution when looped to tth generation, f t stands for the formula value when looped to tth generation, and ∆ f = f t+1 − f t f t represents the changing trend of the function value. The location update formula takes the change trend of the formula value as the measurement target, when the changing trend is large, a large search step can ensure the search speed, and when the changing trend is small, the search accuracy can be ensured.
The basic process of the improved cuckoo search is as follows: Step 1: Set formula f (x) as the initial objective function. x k stands for the initial bird nest, k = 1, 2, 3 · · · N.
Step 2: Use the N solutions of x = (x 1,1 , x 1,2 · · · x 1,N ) T to stand for the random initial nests and calculate the target formula values respectively.
Step 3: Calculate the step size factor through Equation (14) and preserve the optimal value of the last generation. Update the residual solutions by introducing α into Equation (15). The optimal value can be acquired by comparing the solution and the optimal value generated in the last generation.
Step 4: Calculate the discovery probability through Equation (13) then compare the value of M and P a to determine whether to produce the new particles. The new nest can be ensured by Equation (12). The optimal solution x t k can be acquired by comparing the bird nests of the two generations.
Step 5: Verify whether x t k satisfies the corresponding target formula value f (x t k ). If not, return to step 3.

Combination of the Algorithms
The specific steps of the algorithm are organized as follows: (1) Initialize the particle, set the value of t to 0. Sampling the prior probability distribution P(x 0 ) achieves particle group x i 0 , i = 1, 2, 3 · · · N .x i 0 obeys the density function (2) Set the weight of every single particle as w i k = 1 N , the random direction obeys uniform distribution while the random step size is obtained from a L . evy distribution described in Equation (11).
(3) Replace the resampling step by searching for particles globally using the optimized cuckoo search particle filter idea.
a. Initialize the ICS algorithm. Initialize the algorithm parameters: step size α, discovery probability, and the optimized initial particles Introduce the sample particles into the ICS algorithm. The operation should follow steps 2-5 in Section 2.4. c.
Identify the fitness value: use a suitable fitness function to calculate the fitness of each particle and identify the particle with highest fitness values. The fitness function of x i m is defined as in the equation below referring to the definition formula of the particle weight in the particle filter [38,42]: where Z i m is the prediction value of the current particle i. Z m is the observation value, and S is the noise variance. d.
Output the particle after the resample process.
(6) Output state estimation: the resampled particles are fed into the state equation. The observed particles can be directly obtained in the next round of filtering. The output particle status is given by Equation (19).
The complete calculation steps are shown in Figure 3.

Lithium-Ion Aging Cycle Experiment
The basic parameters of the two types of batteries selected in this article are shown in Table 2. Besides, the curve of cell voltage and battery power over time for one aging cycle is shown in Figure 4.  During the test, the battery adopts the standard constant-current and constant-voltage charging method and the temperature of the test environment is 25 • C. First charging the battery by the constant current, when the voltage reaches 4.2 V, the battery is maintained at 4.2 V until the charging current drops below 0.05 A. After being fully charged, let the battery stand for a while, then discharge it to the battery cut-off voltage of 2.7 V at a small rate of current, and record its charge power, discharge power, current, voltage, time, and other related parameters in each cycle.
The change curve of battery capacity attenuation ∆Q i and cycle number of a CS2#35 full-life cycle is shown in Figure 5. ∆Q i is the direct characteristic of power battery health decline (shown as the black part of Figure 5), which can be calculated as the integral of the current obtained from the battery from the fully charged state to the fully discharged state. To accurately estimate the health status of various lithium-ion batteries, it is necessary to establish a capacity decay model with the charging cycle.
The model [32] used to describe the capacity degradation of batteries is expressed as Equation (20).
where a i , b i , c i , d i are the parameters of the model, a, c is the internal impedance, and b, d is the degradation speed. These model parameters are regarded as the state space variables of the system, so the state transition equation can be expressed as: a n = a n−1 + v a,n−1 v a,n ∼ N(0, where a n , b n , c n , d n are the state variables when the cycle is n, and v is the process noise of the system. Considering the ∆Q i and the relationship between HI and SOH, the measurement formula is expressed as Equation (22). SOH n = ∆Q n Q e = (a n ×exp(b n ×n)+c n ×exp(d n ×n)) where formula g(x) stands for the conversion relationship between HI and battery SOH. The initial cycle of capacity decay prediction is 400 and the end cycle is 800 (when the capacity of the battery is reduced to 80% of its original capacity). We use the estimate error and cycles when the battery capacity reached the end of performance (EOP) to illustrate the estimation result. The estimate error is expressed as in Equation (23).
where y pi is the estimated capacity attenuation value when the cycle is i; y oi is the measured capacity attenuation value when the cycle is i.

Results and Discussion
The experimental results are shown by the marching degree of the battery capacity attenuation prediction result. The predicted value of the battery capacity attenuation generated by the ICS-PF method was compared with the real value of battery capacity attenuation and the tool used by this paper to measure the accuracy of the estimated result is the root mean square error (RMSE).
where y is the mean value of the estimated value. The estimated results and error of CS2#38 and CX2#38 batteries are shown in Figure 6. The estimated results and error of CS2#37 and CX2#37 batteries are shown in Figure 7. In the CS2#37 estimation there is a slight deviation in the estimated curve at the beginning, then the deviation gradually disappears as the number of cycles increases. The estimated curve of CS2#38 matches with the measured value well.  Table 3 demonstrates the summary of the experimental results. The sign + indicates that the estimated EOP cycles is earlier than the measured value, and -indicates that the estimated value is later than the measured value. The ICS-PF method estimate results of the EOP cycles is very close to the measured data. In the CS2#37 and CX2#37 estimations, the estimation results of the battery reaching EOP are 5 and 3 cycles ahead of the actual value, respectively. As for CS2#38 and CX2#38, the estimation results are 8 and 10 cycles behind the actual value, respectively. When batteries CS2#37, 38 and CX2#37, 38 reach EOP, the estimated SOHs are 79.50%, 79.90%, 80.96%, and 81.14%, respectively. The maximum error is under 1.9% and the mean value of the error is under 1%.
Regarding the testing of the global coincidence of the estimation result and the measured value, the value of the RMSE shows that the ICS-PF estimation curve has a high degree of coincidence with the capacity attenuation of the battery, which indicates that this method is suitable for SOH estimations.
In addition, this paper also used the traditional PF method and the CS-PF method to do the same battery prediction, and the prediction results are shown in Figure 8 and Table 4.
In two groups of different battery capacity attenuation prediction experiments, the value of the RMSEs of three methods show that the ability of ICS-PF in tracking different battery capacity attenuation is superior that of traditional PF and the CS-PF. It also has a more accurate estimation result than the method mentioned in this part. Furthermore, the health state estimation method proposed in this paper improves the convenience of estimating battery health by the using charging time segment, and it can effectively adapt to a lithium-ion battery with nonlinear and non-Gaussian characteristics.  ICS-PF, improved cuckoo search particle filter; PF, particle filter; CS-PF, cuckoo search particle filter; RMSE, root mean square error.

Conclusions
Aiming at solving the problem of low accuracy of SOH estimation in lithium-ion batteries for electric vehicles, this paper proposed an ICS-PF algorithm for online battery SOH estimation based on the charging time segment of equal voltage, using the lithiumion battery capacity attenuation experimental data to verify the feasibility of this method. The charging time segment was select as a health indicator based on the capacity attenuation data of power batteries, and the double exponential function was used to construct the relationship between the health indicator and the capacity attenuation value. Furthermore, by increasing the search step size and detection probability, an improved cuckoo search algorithm was proposed and applied to the optimization of the traditional particle filter algorithm. The RMSE value of the final result shows that this method has the ability to estimate lithium-ion battery capacity attenuation and health status accurately. Compared with the traditional battery SOH estimation method, the method proposed in this paper obtains more accurate prediction results and has a stronger adaptability. In addition, the method improves the convenience of testing battery health in daily use and provides a theoretical framework and reference for the next step in the study of health estimation in power battery echelon utilization.