2.1.1. Probabilistic Prediction Algorithm for the Residual Life of a Lithium Battery Based on the Bayesian LS-SVR
The prediction framework for the residual life of a lithium battery based on the Bayesian LS-SVR is shown in
Figure 1.
A capacitor is used to discharge the battery at a constant current. The capacity of the battery is equal to the time of discharge times the discharge current. Like most methods, the SOH is characterized using the capacity in this paper:
where
Co is rated capacity and
Ci is the capacity of the
ith charge–discharge cycle. When the capacity is reduced to 70% of the rated capacity, the lithium battery function is judged to be invalid.
(1) Training sample selection
When training samples are few, all historical data can be used as training samples [
12,
13]. When the sample size is large, the rolling time window method is used to extract the training data in view of the demand of the online prediction. Assuming that the length of the window is n, the latest n data at any current time is selected as training data. This method has a small amount of computation, which is a significant advantage compared with others. Moreover, the model training in this method can also be focused on learning the latest evolution trend of lithium battery health.
(2) Phase space reconstruction
The selected training sample sequence of lithium battery’s health status is
. Takens’ Theorem is a basic proposition for calculating the dimension of the embedded phase space, which is also the theoretical basis of phase space reconstruction technology. An important problem in chaotic applications is to reconstruct an n-dimensional phase space containing the chaotic motion from the time series of a single variable. According to Takens’ Theorem [
14], the inherent evolution rule can be restored in a high dimensional space, that is, when the embedding dimension
d of the phase space is greater than a certain value, there exists a smooth mapping
f, making the time-series delay time τ Equation (1). Then, there is
Equation (2) is a one-step prediction formula in which the high-dimensional mapping function
f can be trained by the Bayesian LS-SVR method. In order to reduce the computational complexity, it is necessary to determine the minimum embedding dimension
m. In this paper, Cao’s method was used to determine such a minimum embedding dimension
m. [
15]. The
ith phase point in the phase space can be expressed as
, where the nearest neighbor point is represented by
, as shown by
where
i = 1, 2, …,
n −
d.
where
E(
d) is the function of the embedding number
d, which can be expressed as follows:
When the value is greater than d0, E1(d) no longer changes significantly but approaches to 1, then m = d0 + 1 is the minimum embedding dimension that is looked for.
(3) Bayesian LS-SVR Model Training
After determining the minimum embedding dimension, the training of the model can be started.
(i) Data preprocessing: In order to obtain more accurate prediction results, all input and output data are normalized before being used for training, i.e., converted to the value range of [0,1]. According to the degradation characteristics of a lithium battery’s health state,
where
xmax and
xmin are the maximum and minimum values of the training samples respectively.
(ii) To establish training sample pairs: At the current
k moment,
n–
m training samples pairs can be obtained according to the selected samples and the minimum embedding dimension.
(iii) Bayesian LS-SVR model training: According to the training steps of the Bayesian three-layer reasoning, the kernel parameter σ
0 and regularization parameter γ
0 are initialized first, then a linear search is performed from σ
0 until finding σ
MP, which makes the
p(D|σ) be the max in the third layer reasoning. Then γ
MP and the LS-SVR model are derived.
(4) Iterative Prediction and Uncertainty Management
The life of Li-ion batteries is defined to be terminated when the actual discharge capacity of the Li-ion batteries is lower than 70%.
Generally, there are two kinds of prediction methods for the Li-ion battery life cycle [
16]: direct predictions and iterative predictions. Since the time range of lithium batteries entering the failure state is uncertain and unknown, direct prediction is not feasible. The Bayesian LS-SVR prediction model obtained in the previous section is used to iteratively predict the SOH of lithium batteries until it crosses the failure threshold. The Bayesian LS-SVR prediction model has the ability to obtain the probability distribution output. However, the residual life prediction is a multistep prediction problem, which needs to consider the transfer of the prediction uncertainty between steps [
17], that is, how the uncertainty of the previous prediction output is accurately transmitted as input to the next step and ultimately to the predicted output. In this paper, the Monte Carlo method was used to realize the representation and management of the prediction uncertainty in the multistep prediction [
18]. The Monte Carlo method is a random simulation method, which is also known as a statistical simulation or random sampling technology. It is a calculation method based on probability and statistical theory, which uses random numbers or more common pseudorandom numbers to solve many computational problems. As shown in
Figure 2, the starting time of the prediction is assumed to be
k.
In the first step,
is the input and
and
are obtained from the expected value and difference of the probabilistic predictive output, where
In the second step, the Gauss distribution
is sampled by the Monte Carlo method. All particles are sorted from large to small, so as to get the set
where
M is the number of sample particles. Then,
M input vectors
are constructed, the Bayesian LS-SVR prediction model is input and the outputs of M particles and M Gaussian density distribution
are obtained.
It can be seen that the output of the second step prediction is equal the weight Gauss mixture distribution, that is,
From the second step, it can be seen that the prediction uncertainty in the multistep prediction consists of two parts: One is the uncertainty of the prediction model itself, corresponding to the Gaussian output of each particle, and the other is the uncertainty introduced when using the previous step prediction output as the next step prediction input, which is manifested in the mixture of Gaussian distribution.
In the third step, since
is a Gaussian mixture distribution composed of M Gaussian distributions, it is difficult to obtain a satisfactory discrete approximation if the distribution is sampled with M as the sample number. If the number of samples is increased, the number of samples will increase exponentially in the later iteration, which is not feasible in long-term predictions. In this paper, the deterioration of the lithium battery’s health status is considered as a Gaussian process. A normal distribution
of equal mean and equal force-difference is used to approximate
, where
Then the Gauss distribution is sampled by the Monte Carlo method, and all the M particles are sorted from large to small to obtain set . Then the M input vectors are established, and the next Gaussian mixture distribution is obtained by the input prediction model.
In step p (p > 3), the step 3 for the iterative prediction is repeated until all particles pass through the failure threshold or complete the specified prediction step.
In order to establish the particle sequence connection between steps, it is necessary to sort the particles according to an identical rule after each sampling. In this paper, it is assumed that the principle of “degenerate trajectories do not intersect each other” is satisfied [
19], i.e., the relationship between the degradation magnitude of each branch track remains unchanged at any time. As shown in
Figure 3, if the relationship between any two particles at an
k + 1 time satisfies
, their subsequent sub-particles at any time also satisfy
. This principle reflects the trend consistency of each branch’s degeneration trajectory derived from the same degeneration trajectory in the future, which is consistent with the actual situation and is beneficial to reducing the uncertainty of the prediction.
(5) Probability Distribution Approximate of Residual Life
According to
Section 2.1.1 (4), the approximate distribution
of the health state of lithium batteries can be obtained at any time
t within a given prediction step. Firstly, the inverse function
of Equation (6) is used to inversely transform
and obtain the actual health state value
. Combined with the failure threshold η, there are two methods for calculating the residual life of lithium batteries. (I) The bilateral failure definition [
20] is used to count the number of particles in the symmetrical region above and below the failure threshold, so that the probability distribution of the residual life can be calculated. The weight of each particle is 1/
M. (II) Since the health degradation process of lithium batteries is a monotonic process in theory, the cumulative failure probability at time
t can be expressed as follows according to the single threshold failure definition [
21]:
where
is the probability of satisfying the condition.
For the Monte Carlo approximation, there is
Therefore, the probability distribution of residual life is
2.1.2. Prediction of the Lithium Battery Cycle Life Based on the Wavelet Neural Network
Cycle life refers to the number of charge–discharge cycles that the battery can withstand before its capacity decreases (attenuates) to a certain specified value under a certain charge/discharge current profile. In this paper, the charge/discharge current profile is set as 10 C. Before using the wavelet neural network to predict, the parameters of the network need to be set [
22]. According to the demand of the cyclic multistep prediction, the number of output nodes is selected to 1, and then the wavelet basis function as well as the number of input layer and hidden layer nodes are discussed. Appropriate settings can be obtained according to the probabilistic distribution of the residual life of lithium batteries based on the Bayesian LS-SVR. The number of nodes in the input layer and hidden layer is set to be within a suitable range. The effects of different wavelet basis functions on the sample processing of lithium batteries are compared [
23]. Using the same method, the number of input layer nodes and hidden layer nodes can be determined [
24].
The number of input layer nodes was set to 6 and that of hidden layer nodes was set to 8. The convergences of the training error in the WNN training with respect to the Mexican Hat wavelet, the Marr wavelet and the Morlet wavelet as wavelet basis functions were compared. It can be seen that the convergence speeds of the 3 wavelet basis functions are similar with each other. In order to obtain the best prediction effect, the wavelet basis function with the least convergence error should be selected, that is, the Morlet Wavelet should be selected. Similarly, the number of input layer nodes was set to 4 and that of the hidden layer nodes was set to 6.
The wavelet neural network has a strong stability. In structural design, it avoids the appearance of the local optimal problem and has a strong function learning ability. Therefore, the wavelet neural network is used to predict the cycle life of batteries. After completing the WNN network setup, it can complete the network learning by using sample training. The life cycle data of battery No. 1 was selected as the training samples to train the neural network, and then the cycle life of batteries No. 2–4 were predicted. Generally, the failure of a battery is defined when its capacity is deteriorated by 70% [
25,
26,
27]. However, in this paper, the failure of battery is reached when battery capacity is deteriorated by 25%; that is, when SOH = 75%, the failure of battery occurs.
The cycle life of No. 2 battery was predicted when the SOH of the batteries decreased to 90%, 85% and 80%. The predicted results are shown in
Table 1.
Among them, the relative error formula is as follows:
where
Lr refers to the actual cycle life of the battery and
Lp refers to the battery’s predicted cycle life.