Battery Remaining Useful Life Prediction with Inheritance Particle Filtering

: Accurately forecasting a battery’s remaining useful life (RUL) plays an important role in the prognostics and health management of rechargeable batteries. An e ﬀ ective forecast is reported using a particle ﬁlter (PF), but it currently su ﬀ ers from particle degeneracy and impoverishment deﬁciencies in RUL evaluations. In this paper, an inheritance PF is developed to predict lithium-ion battery RUL for the ﬁrst time. A battery degradation model is ﬁrst mapped onto a PF problem using the genetic algorithm (GA) framework. Then, a Lamarckian inheritance operator is designed to improve the light-weight particles by heavy-weight ones and thus to tackle particle degeneracy. In addition, the inheritance mechanism retains certain existing information to tackle particle impoverishment. The performance of the inheritance PF is compared with an elitism GA-based PF. The former has fewer tuning parameters than the latter and is less sensitive to tuning parameters. Both PFs are applied to the prediction of lithium-ion battery RUL, which is validated using capacity degradation data from the NASA Ames Research Center. The experimental results show that the inheritance PF method o ﬀ ers improved RUL prediction and wider applications. Further improvement is obtained with one-step ahead prediction when the charging and discharging cycles move along.


Introduction
Optimized lithium-ion batteries play an important role in daily applications, from mobile phones, through microgrids, to satellites [1,2]. Despite the fact that they offer many advantages over other types of batteries, such as a low weight, high power density, and long lifespan [3], their performance degrades with repeated charging and discharging. Hence, their degradation identification, state estimation and prediction, and maintenance optimization have become a focus of attention in engineering research [4]. To optimize the energy deployment of a battery, avoid its premature failure, and improve its reliability and durability, it is important to monitor its degradation process accurately. This involves evaluating the state of health (SOH) [5] and predicting the state of charging (SOC) and remaining useful life (RUL) [6] in a battery management system (BMS) [7], which can be used for automated and optimized scheduling of maintenance actions that, in turn, ensure safe operation and use of lithium-ion batteries. Capacity is a direct indicator of SOH, where the end of life (EOL) is defined as the state in which the capacity reaches 70-80% of the nominal value [8] at the same SOC and operating conditions.
In recent years, a number of RUL prediction methods have been developed. For instance, neural networks [9] and relevance vector machines (RVMs) [10] have been utilized to learn the battery SOH, using test data to estimate the parameters of a battery degradation model. However, these methods are dependent on the training datasets and their models lose accuracy under complex conditions [11]. A more adaptive method is a parameter estimation approach, using a filter such as the extended Kalman filter (EKF) [12], unscented Kalman filter [13], or their improved versions [14][15][16], which Q = a·exp(b·k) + c·exp(d·k) (1) where a, b, c and d are the parameters of the double-exponential function, the amplitudes of which, a and c, are related to the internal impedance of the battery and the degradation rates of which, b and d are related to aging; k is the number of charging cycles, and Q the remaining capacity of the battery.
Here, the objective of modeling and hence predicting the RUL is to estimate these model parameters. They can be estimated as transitional states and measurements of a stochastic dynamic system [30]: where Q k is the capacity of the battery at cycle index k and N(µ, σ) the Gaussian noise with mean µ and standard deviation (SD) σ, which could be different for different parameters, but are usually constant and hence not expressed as state variables to estimate. To determine the probabilistic characteristics of the estimation, the state variables are estimated conditionally based on observation information, which can be achieved via particle filtering.

Inheritance Particle Filtering Approach to RUL Prediction
Here, we propose an inheritance particle filtering approach to predicting battery RUL, using the GA framework to develop an inheritance-based Lamarckian particle filter (LPF). A Lamarckian operator is designed in the GA context to modify the light-weight particles by heavy-weight ones and to retain the information of light-weight particles. This is to improve from the standard PF the diversity of resampled particles, to mitigate the particle degeneracy and impoverishment problem. In the following, the standard PF will be first outlined, followed by the LPF algorithm.

Particle Filter Algorithm
A particle filter is also known as a sequential Monte Carlo method in statistics. It combines Bayesian learning with importance sampling to estimate a posterior probability density function with a set of weighted particles representing sampled values from an unknown state space. Particle filtering has thus found wide applications in stochastic processes of given noisy and/or partial observations, such as the prediction of a battery's remaining lifetime [22].
Many dynamic processes can be described by a state space model [31], including the state transition and measurement equations written as: where x k and z k are the state variables and observations at time k, respectively; x k ∈ R n x , z k ∈ R n z , n x and n z are the dimensions of x k and z k , respectively; f (·) and h(·) are the known system and observation functions, respectively; u k−1 ∈ R n x and v k ∈ R n z are the system and observation noises, respectively, which are both random in terms of known distributions and v k likely independent of u k−1 ; and u k−1 and v k−1 are independent of the past and current states. A standard PF estimates the posterior distribution of the states using an observation measurement process. The sequences of the states and observations are denoted as x 0:k = x 0,··· , x k and z 1:k = z 1,··· , z k , respectively. The initial distribution of states p(x 0 ) is known a priori. A PF consists of a mass of N particles x i k (i = 1, · · · , N), where the number of particles, N, remains a constant at each time step k. Particle filtering is an approximation, but it can become more accurate with enough particles.
The objective of the aforementioned particle filtering is to estimate the posterior probability density p(x 0:k |z 1:k ) using a collection of particles , based on all available measurements z 1:k . Hence, the posterior probability density p(x k |z 1:k ) can be written as [31]: where δ(·) is the Dirac delta function.
Actually, it is difficult to obtain the ideal particle distribution directly from the posterior probability density distribution. Therefore, an "importance sampling" technique is used to sample the particles. The "importance distribution" in the filtering process is given by [31]: In the PF, a resampling procedure is used to solve the particle degeneracy problem. It is to eliminate samples with a low importance weight and retain those with a high importance weight. Following this resampling process, the weights are estimated as w i k = 1/N, and the posterior density p(x k z 1:k ) is approximated by [31]: While the resampling procedure of the PF reduces the particle degeneracy efficiently, particle impoverishment remains to be solved, as the low-weight particles are eliminated, whereas offspring particles share few distinct values. Therefore, the following section develops inheritance particle filtering to tackle this problem.

Genetic Algorithm Framework for Particle Filtering
A GA solves a significant number of complex optimization problems, including the PF problem. The principle of a GA PF is based on Darwin's theory of natural evolution through a "survival-of-the-fittest" selection. Several candidate PF solutions to the PF problem are drawn from its potential solution space. These solutions are optimized by mimicking a natural evolutionary process, through selection, crossover and mutation operations. One example of work using the GA mechanism to construct a PF for improved estimation performance is given in [31]. However, deficiencies such as a low convergence speed, weak local search ability, and premature convergence are not overcome.

Lamarckian Particle Filter
Compared with the working mechanism of a standard GA or an elitism GA, the Lamarckian mechanism of evolution is based on the theory that specific characteristics of an organism are directly inheritable by its offspring and survives the given environment [32,33]. In evolutionary algorithms, it has been shown that Lamarckian inheritance is an effective way to improve machine learning and convergence characteristics [34].
Here, in place of the conventional selection and crossover operators of a GA, an overwriting operator is implemented in the LPF on Lamarckian inheritance. This operator ensures that fitter organisms are given the priority directly to pass on their characteristics to their offspring in evolution. Suppose that each of the N particles at time k, x i k , consists of six parameters of the RUL model as shown in Equation (2). Each parameter is termed a "phenotype" of "genes". For simplicity of illustration, we assume that each parameter is represented by one gene. A complete set of the genes representing the parameter set is termed a "chromosome". Consider two chromosomes at time k, x In an LPF, for chromosomes A and B to produce offspring, a certain percentage of the genes of chromosome B will be overwritten by corresponding genes of chromosome A, forming chromosome B as a new candidate PF. The percentage of the overwriting genes transferred over to B is termed the Lamarckian probability, which is denoted p t and is calculated as: The numbers of genes transferred, n t , is calculated by: where n x is the number of parameters (or genes in this simplified example) or the number of dimensions of a particle in the PF. This overwriting operation is depicted in Figure 1. In an LPF, for chromosomes and to produce offspring, a certain percentage of the genes of chromosome will be overwritten by corresponding genes of chromosome , forming chromosome as a new candidate PF. The percentage of the overwriting genes transferred over to is termed the Lamarckian probability, which is denoted and is calculated as: The numbers of genes transferred, , is calculated by: where is the number of parameters (or genes in this simplified example) or the number of dimensions of a particle in the PF. This overwriting operation is depicted in Figure 1.
Hence, the number of genes passed on at crossover depends on the relative fitness of the two parental chromosomes. In this way, even if the fitness of chromosome B is too low, it will retain a small portion of its genes instead of being unselected as in a GA, thereby maintaining a degree of diversity in the gene pool and thus mitigating the particle impoverishment problem.
Further, the overwriting operation saves the mutation operation of a GA. With elitism, the overwriting operations will retain the best characteristics in the PF, while some lightweight particles are still present in the population for particle diversity potentially useful for future explorations.

Implementation of the LPF Algorithm
The steps of the LPF for RUL are given below.
Step 1: Initialization Generate an initialization particle set , = 1,2, ⋯ , , by drawing from an assumed or a priori probability density ( ). In the population, each particle or chromosome can be encoded in binary if necessary or if the number of parameters is relatively small, to explore finer estimation.
Step 2: Importance Sampling to Form an Initial Population Sample particles with weights , using the transition density , = as the importance density to estimate the weight of each particle: for normalization to Hence, the number of genes passed on at crossover depends on the relative fitness of the two parental chromosomes. In this way, even if the fitness of chromosome B is too low, it will retain a small portion of its genes instead of being unselected as in a GA, thereby maintaining a degree of diversity in the gene pool and thus mitigating the particle impoverishment problem.
Further, the overwriting operation saves the mutation operation of a GA. With elitism, the overwriting operations will retain the best characteristics in the PF, while some lightweight particles are still present in the population for particle diversity potentially useful for future explorations.

Implementation of the LPF Algorithm
The steps of the LPF for RUL are given below.
Step 1: Initialization Generate an initialization particle set x i 0 , i = 1, 2, · · · , N, by drawing from an assumed or a priori probability density p(x 0 ). In the population, each particle or chromosome can be encoded in binary if necessary or if the number of parameters is relatively small, to explore finer estimation. Step 2: Importance Sampling to Form an Initial Population as the importance density to estimate the weight of each particle: for normalization to The importance sampling particle set at k = 0 forms the initial population of the PF. The size of the population means the number of particles, which remains as N, constant to k in the filtering process.
Step 3: Overwriting Operation First, the overwriting chromosome is chosen according to the given inheritance probability. For instance, suppose that particles i 1 and i 2 are chosen with w Then, the probability of each gene in i 1 to overwrite its corresponding gene in i 2 is calculated as: The numbers of genes transferred, n t , is calculated by (11). In this way, the lower-weight particle is overwritten in part by the higher-weight one with favorable genes, like gene editing in biochemistry. If the weight of one selected particle is zero, overwriting will not be performed. Note that the overwriting operation will automatically retain the elitist particle, as depicted in Figure 1. Hence, the LPF is always an elitism algorithm, as there is no need to use a mutation operation in an LPF.
Step 4: Evolution Until Termination The particle set evolves generation by generation until the process terminates when a fixed number of iterations have been reached or no meaningful improvements may be obtained.
Step 5: Outputting the State Estimates Then, the particle phenotypes are decoded back to real numbers of the optimal particles with equal weights . By Equation (9), the system state is thus estimated as:

State Updating and Prediction in the LPF Algorithm
The accurate estimation of battery capacity not only depends on a degradation model, but also on its parameters. According to [30], using the LPF, the estimated capacity for each particle at cycle k is given by: and hence the capacity is estimated as: An L-step-ahead prediction at cycle k with present observations can be estimated as: The estimated posterior PDF can be predicted at each trajectory with weights: Hence, the expectation of the L-step-ahead prediction yields: As the failure threshold is 70% of the rated capacity, the RUL estimation L i k of the ith trajectory is obtained by solving the equation: Then, the distribution of RUL is estimated as: The expectation of the RUL at the cycle k is thus predicted as:

Experiments and Validation
Here, the performances of LPF is demonstrated in a single-dimensional (1D) system against the PF that is based on genetic algorithm with elitism (GAe), which is termed GAePF. The LPF is then compared with the standard PF for lithium-ion RUL prediction.

Single-Dimension Experiment
A nonlinear 1D experiment widely used in PF testing is given by [35]: where v k is a random variable modeling the process noise in Gamma ( To evaluate the performance of LPF and GAePF, three root-mean-squared errors are used: where the mean of rmse is rmse, rmse is the rmse for M simulations, x m k the real state at time k for the mth simulation, andx m k the estimated state. The mean estimation rmse values of the generic PF, LPF, and GAePF for 200 simulations are presented in Figures 2 and 3, respectively. As can be seen from the figures, the rmse of the LPF is lower than that of the other two algorithms. The root mean square error (rmse) results of the three algorithms with N = 100 and 200 are compared in Table 1. It can be seen that the estimation accuracy of the LPF with just 100 particles is better than that of the other two filters with 200 particles. In other words, the LPF not only improves the accuracy, but also has a higher utilization rate, while its runtime is close to that of the GAePF.

Experimental Battery Datasets
In this subsection, the proposed LPF framework for RUL prediction is validated against lithium-ion battery data provided by the NASA Ames Research Center Prognostics Center of Excellence [36]. The data were obtained at room temperature (24 • C).
The dataset contains four cells, labeled as B05, B06, B07, and B18. Their nominal capacity is 2000 mAh, while the nominal voltage is 3.7 V. To estimate accelerated aging, multiple charge-discharge cycles were undertaken. All of the test cells went through the same constant-current (CC) and constant-voltage (CV) charging with current maintained at 1.5 A until the voltage reaches the upper limit of 4.2 V and then maintained until the current dropped to 20 mA. Similarly, discharging went through a constant current of 2 A until the voltages fell to 2.7 V, 2.5 V, 2.2 V, and 2.5 V for battery B05, B06, B07, and B18, respectively. The failure threshold was 1400 mAh.
The capacity degradation trend is shown in Figure 4, where the degradation data were drawn using MATLAB ®®® (MathWorks, Natick, MA, USA) curve fitting. It can be seen that the empirical model of Equation (4) fit the regression process. Figure 5 shows that if the parameters are accurately estimated, the model fits the degradation trend.   To test the prediction accuracy, the data of batteries labeled B05, B06 and B07 were used as the training data. For validation, battery B18 was predicted using the LPF. For simplicity in this experiment, µ was set to 0.6 and σ a = 1 × 10 −4 , σ b = 1 × 10 −6 , σ c = 1 × 10 −6 , σ d = 1 × 10 −7 , and σ n = 1 × 10 −3 for the Gaussian noise mode. Hence, only the four parameters a, b, c, and d must be estimated in a particle.
The parameters of the three known batteries were produced by the fitting to obtain initial training data, as shown in Table 2.

Results and Analysis
In this work, the initial parameters were set as their corresponding mean values of batteries B05, B06, and B07 shown in Table 2. The number of particles N was set to 100. To test the robustness of the LPF method, different numbers of training cycles were used to compare the prediction results, which were the first 33 and 70 measurement cycles. To test the relative prediction performance, the results were compared with those obtained using the standard PF. Furthermore, the model accuracy was evaluated on the RUL absolute error (AE), the RUL relative prediction error (RPE), and the capacity root-mean-square-error (RMSE). These are defined as: where C is the number of measurement cycles,Q k is the estimate at cycle k, Cp is the number of cycles that must be predicted, andQ k the prediction result at cycle k.
Prediction Performance Analysis Figure 6 shows the RUL prediction results from the standard PF and the proposed LPF, where the first 33 cycles were used to update the prediction. Compared with the dataset, it is apparent that the LPF offers better predictions.

Results and Analysis
In this work, the initial parameters were set as their corresponding mean values of batteries B05, B06, and B07 shown in Table 2. The number of particles was set to 100. To test the robustness of the LPF method, different numbers of training cycles were used to compare the prediction results, which were the first 33 and 70 measurement cycles. To test the relative prediction performance, the results were compared with those obtained using the standard PF. Furthermore, the model accuracy was evaluated on the RUL absolute error (AE), the RUL relative prediction error (RPE), and the capacity root-mean-square-error (RMSE). These are defined as: where C is the number of measurement cycles, is the estimate at cycle k, is the number of cycles that must be predicted, and the prediction result at cycle k.
Prediction Performance Analysis Figure 6 shows the RUL prediction results from the standard PF and the proposed LPF, where the first 33 cycles were used to update the prediction. Compared with the dataset, it is apparent that the LPF offers better predictions.  Figure 7 compares the histograms of the RULs predicted by the PF and LPF. It can be seen from Figure 7a that, using the PF method, more than 10% of the particles failed to predict the RUL from existing measurements during the first 33 cycles, and the estimated predicted RULs of cycles were within the range [50, 130], giving an average at 80 cycles, far away from the RUL data at 97 cycles. In contrast, Figure 7b plots the performance of the LPF predicted RULs within the range [94, 100], showing 90% of the particles predicting 95 cycles, which were very close to the true RUL of 97.  Figure 7 compares the histograms of the RULs predicted by the PF and LPF. It can be seen from Figure 7a that, using the PF method, more than 10% of the particles failed to predict the RUL from existing measurements during the first 33 cycles, and the estimated predicted RULs of cycles were within the range [50, 130], giving an average at 80 cycles, far away from the RUL data at 97 cycles. In contrast, Figure 7b plots the performance of the LPF predicted RULs within the range [94, 100], showing 90% of the particles predicting 95 cycles, which were very close to the true RUL of 97.
When using the first 70 cycles as measurement data to predict the RULs, Figure 8 similarly shows that the LPF offers better results. Figure 9a,b show the histograms of the RULs predicted by the PF and LPF, respectively. The same conclusions as drawn from Figures 6 and 7 can be drawn from Figure  9, confirming the robustness of the LPF method.  When using the first 70 cycles as measurement data to predict the RULs, Figure 8 similarly shows that the LPF offers better results. Figure 9a,b show the histograms of the RULs predicted by the PF and LPF, respectively. The same conclusions as drawn from Figures 6 and 7 can be drawn from Figure 9, confirming the robustness of the LPF method.
Energies 2019, 12, x FOR PEER REVIEW 12 of 17 When using the first 70 cycles as measurement data to predict the RULs, Figure 8 similarly shows that the LPF offers better results. Figure 9a,b show the histograms of the RULs predicted by the PF and LPF, respectively. The same conclusions as drawn from Figures 6 and 7 can be drawn from Figure  9, confirming the robustness of the LPF method.   Figure 10a,b show the capacity RMSEs for the predictions using the PF and LPF methods, in which the first 33 and 70 cycles were used for the prediction, respectively. This confirms that the proposed LPF method results in a smaller RMSE than the PF. Table 3 shows prediction errors between the two methods. It can be seen from the table that the predicted AEs, RPEs, and RMSEs obtained by the LPF are all smaller than those obtained with a standard PF.  Figure 10a,b show the capacity RMSEs for the predictions using the PF and LPF methods, in which the first 33 and 70 cycles were used for the prediction, respectively. This confirms that the proposed LPF method results in a smaller RMSE than the PF. Table 3 shows prediction errors between the two methods. It can be seen from the table that the predicted AEs, RPEs, and RMSEs obtained by the LPF are all smaller than those obtained with a standard PF.

One-Step Ahead Prediction Analysis
As all of the measurements of the battery could not be obtained while it was working, one-step prediction performance will also be considered as an on-line prediction reference. Figure 11a,b show the one-step-ahead capacity estimates using the standard PF and proposed LPF, respectively. Again, the LPF offers better results than the PF. To visualize the performance difference more clearly, the capacity RMSEs of the estimates at every cycle are compared in Figure 12 and mean RMSEs of all cycles are compared in Table 4. The results of these comparisons confirm that the LPF is a better method.

One-Step Ahead Prediction Analysis
As all of the measurements of the battery could not be obtained while it was working, one-step prediction performance will also be considered as an on-line prediction reference. Figure 11a,b show the one-step-ahead capacity estimates using the standard PF and proposed LPF, respectively. Again, the LPF offers better results than the PF. To visualize the performance difference more clearly, the capacity RMSEs of the estimates at every cycle are compared in Figure 12 and mean RMSEs of all cycles are compared in Table 4. The results of these comparisons confirm that the LPF is a better method.

Conclusions
In this work, a novel approach to predicting lithium-ion battery's remaining useful life has been developed and evaluated. In the literature, effective forecast of remaining useful life has been reported using a particle filter, but it suffers from particle degeneracy and impoverishment deficiencies. The Lamarckian particle filter developed in this paper was to solve these problems for the first time to improve and broaden prediction of lithium-ion battery RUL.
Since the standard PF is a widely used algorithm for RUL prediction, we have used the RUL estimations from the traditional methods for comparison and have mapped a battery degradation model onto a particle filter problem. The LPF method developed in this paper is based on the PF estimates using the genetic algorithm framework with a Lamarckian inheritance mechanism. A Lamarckian inheritance operator has been developed to reduce particle degradation, enhance particle diversity and simplify the filtering process. Thus, the optimized particle will tend to cluster around the high likelihood region. The LPF has yielded better estimates of the RUL for cases considered with different numbers of measurement data, which are from NASA lithium-ion battery capacity degradation database, in terms of the average.

Conclusions
In this work, a novel approach to predicting lithium-ion battery's remaining useful life has been developed and evaluated. In the literature, effective forecast of remaining useful life has been reported using a particle filter, but it suffers from particle degeneracy and impoverishment deficiencies. The Lamarckian particle filter developed in this paper was to solve these problems for the first time to improve and broaden prediction of lithium-ion battery RUL.
Since the standard PF is a widely used algorithm for RUL prediction, we have used the RUL estimations from the traditional methods for comparison and have mapped a battery degradation model onto a particle filter problem. The LPF method developed in this paper is based on the PF estimates using the genetic algorithm framework with a Lamarckian inheritance mechanism. A Lamarckian inheritance operator has been developed to reduce particle degradation, enhance particle diversity and simplify the filtering process. Thus, the optimized particle will tend to cluster around the high likelihood region. The LPF has yielded better estimates of the RUL for cases considered with different numbers of measurement data, which are from NASA lithium-ion battery capacity degradation database, in terms of the average.

Conclusions
In this work, a novel approach to predicting lithium-ion battery's remaining useful life has been developed and evaluated. In the literature, effective forecast of remaining useful life has been reported using a particle filter, but it suffers from particle degeneracy and impoverishment deficiencies. The Lamarckian particle filter developed in this paper was to solve these problems for the first time to improve and broaden prediction of lithium-ion battery RUL.
Since the standard PF is a widely used algorithm for RUL prediction, we have used the RUL estimations from the traditional methods for comparison and have mapped a battery degradation model onto a particle filter problem. The LPF method developed in this paper is based on the PF estimates using the genetic algorithm framework with a Lamarckian inheritance mechanism. A Lamarckian inheritance operator has been developed to reduce particle degradation, enhance particle