A lithium battery residual life estimation method based on LSTM and Gaussian process regression
By combining LSTM and Gaussian process regression models, the problem of insufficient reflection of uncertainty in the prediction of the remaining life of lithium batteries is solved, and high-precision prediction of the health status and remaining life of lithium batteries is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING INST OF TECH
- Filing Date
- 2023-06-15
- Publication Date
- 2026-04-24
AI Technical Summary
Existing methods for predicting the remaining life of lithium batteries only provide point predictions, which fail to reflect the level of uncertainty and cannot meet the needs of practical applications.
We employ an LSTM-based and Gaussian process regression approach. By constructing the state of health (SOH) of a lithium battery, we use a sliding window method to divide the dataset, build an LSTM network for training and optimize hyperparameters, and combine the Gaussian process regression model to output the predicted value and uncertainty of the battery's SOH.
It achieves high-precision prediction of the remaining life of lithium batteries, and can simultaneously output the prediction of SOH value and uncertainty prediction, thereby improving the accuracy and reliability of the prediction.
Smart Images

Figure CN116559679B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the prediction of the remaining life of lithium-ion batteries, specifically a method for estimating the remaining life of lithium batteries based on LSTM and Gaussian process regression. Background Technology
[0002] Lithium-ion batteries are widely used in the power battery field due to their high operating voltage, high specific energy, long cycle life, low self-discharge rate, and environmental friendliness. In 2022, the global total shipment of lithium-ion batteries reached 957.7 GWh, a year-on-year increase of 70.3%, of which the shipment of automotive power batteries was 684.2 GWh, a year-on-year increase of 84.4%. China's lithium-ion battery shipments reached 660.8 GWh, a year-on-year increase of 97.7%, accounting for 69.0% of the global total. However, during the charge-discharge cycle, irreversible physicochemical processes occur inside lithium-ion batteries, forming a solid electrolyte interphase, which leads to a continuous decline in the capacity and performance of lithium-ion batteries, and in severe cases, even failure, causing safety accidents. In addition, the performance degradation of lithium-ion battery systems has a significant impact on the driving range of electric vehicles, which is one of the obstacles to the further popularization of electric vehicles. Therefore, accurate prediction of the remaining useful life (RUL) of lithium-ion batteries is of great significance for improving battery management technology, extending battery life, and improving battery application safety.
[0003] Currently, data-driven battery RUL prediction methods are mainly divided into traditional machine learning methods and deep learning methods. Deep learning models, especially LSTM and CNN, are increasingly widely used in battery RUL prediction due to their superior performance in long-term sequence prediction. However, compared to machine learning algorithms based on mathematical statistics, the output of deep learning models is usually just a single label, lacking any information reflecting its probability distribution. In practical applications, providing only point predictions is often insufficient for battery aging prediction; the level of uncertainty in such predictions should also be included. Summary of the Invention
[0004] To overcome the shortcomings of existing technologies, this invention proposes a lithium battery remaining life estimation method based on LSTM and Gaussian process regression, aiming to simultaneously output the predicted RUL value and uncertainty prediction. This invention achieves its objective through the following technical solution: a lithium battery remaining life estimation method based on LSTM and Gaussian process regression, comprising the following steps:
[0005] S1. Obtain raw data of lithium batteries through experiments, define the state of health (SOH), and process the data;
[0006] S2. Construct input and output based on the sliding window method, and divide the dataset;
[0007] S3. Build an LSTM network, train it on the training set, and optimize the hyperparameters;
[0008] S4. Input the last window of data from the training dataset into the trained LSTM model for sliding prediction until the battery fails;
[0009] S5. Input the prediction results of the LSTM network into the Gaussian process regression model as its mean function, use the Gaussian process regression to output the predicted value of the battery SOH, and calculate the remaining battery life.
[0010] Further, step S1 includes the following sub-steps:
[0011] S101. Based on the battery's rated capacity, charge / discharge cutoff voltage, and other nominal parameters, perform constant current and constant voltage charge / discharge cycles on the battery at room temperature. One cycle includes charging and discharging processes. During charging: the battery is charged with a constant current. When the battery voltage reaches the charging cutoff voltage, the battery enters the constant voltage charging stage. Charging stops when the current falls below a certain small current. During discharging: the battery discharges with a constant current, and the voltage gradually decreases. Discharging stops when the voltage drops to the discharge cutoff voltage. This cycle is repeated until the battery fails. Battery capacity data is recorded for each charge / discharge cycle.
[0012] S102. Define the state of health (SOH) of the battery in the Nth cycle as:
[0013]
[0014] Where C0 is the rated capacity of the battery, C N This represents the battery's capacity in the Nth cycle. When SOH... N When the battery level is less than 70%, it is considered to be in failure. In this case, N is the battery's lifespan. The remaining lifespan of the battery is defined as the difference between the battery's lifespan and the current number of battery cycles.
[0015] S103. Convert the battery capacity data into battery SOH data, and use median filtering to replace outliers in the data.
[0016] Further, step S2 includes the following sub-steps:
[0017] S201. Represent the preprocessed health status data as [x(1),x(2),...,x(k)], where x(k) represents the SOH of the kth cycle;
[0018] S202. Construct the input and output using the sliding window method. First, define a window of size d, and the i-th window is shown below:
[0019] Xi =[x(i),x(i+1),...,x(i+d-1)],i=1,2,...kd (2)
[0020] The input and output of the lifetime prediction model are defined as follows:
[0021]
[0022] S203. Divide the dataset into training and test sets according to the proportions.
[0023]
[0024] Furthermore, step S3 includes the following sub-steps:
[0025] S301. Construct an LSTM-based neural network, determining the input, hidden, and output layers. The number of neurons in the input layer corresponds to the window size in S2, and the network weights are initialized. The hidden layer includes LSTM neural network units, dropout layers, fully connected layers, and activation layers. The output layer is the capacity value predicted by the neural network. The LSTM has three inputs: the current input x of the network. t The output value h of the LSTM at the previous time step t-1 and the cell state c from the previous time step t-1 The output has two parts: the current LSTM output value h. t and the current cell state c t c t The changes are relatively slow, reflecting the model's long-term memory, h t It is used to update the internal state of the model, which varies with x. t Because of its rapid changes, LSTM reflects the model's short-term memory. LSTM uses three gates to protect and control the internal state of the control unit: the forget gate, the input gate, and the output gate. The forget gate determines what information is discarded.
[0026] f t =σ(W f ·[h t-1 ,x t ]+b f (5)
[0027] Among them, W f and b f It represents the weights and biases of the forget gate. Output f t The value of c ranges from 0 to 1. When the value is 1, it means that c t-1 All information in c is retained; when the value is 0, it means c t-1 All the information in the database has been forgotten. Update it via an input gate:
[0028]
[0029] Finally, the output is calculated using the output gate:
[0030]
[0031] S302. After setting up the LSTM, use X train Using the input as input and minimizing the root mean square error loss function (RMSE) as the optimization objective, the Adam optimizer is used to update the model parameters, adjust the hyperparameters, and store the model parameters that minimize the loss function on the training set, along with the parameters of the model that minimize the loss function. RMSE is defined as follows:
[0032]
[0033] Where Y i * Y is the output value of the LSTM network. i For Y train The actual value in.
[0034] Furthermore, the specific implementation of step S4 is based on the definition in S202, using X n Using the input as the variable, we obtain the predicted value x(k). * , with x(k) * Build X n+1 * The input network continues to predict, and this prediction cycle continues until the battery fails, as shown below:
[0035]
[0036] Where x k * Less than or equal to 70%.
[0037] Finally, step S5 includes the following sub-steps:
[0038] S501. Define a Gaussian process. A Gaussian process is defined by a mean function and a kernel function. The mean function uses the predicted values from the LSTM in step S4, and the kernel function includes SquaredExponential. The Gaussian process regression is defined as follows:
[0039]
[0040] in:
[0041]
[0042] σ l ,σ f The hyperparameter is solved by minimizing the negative logarithmic marginal likelihood function L:
[0043]
[0044] After solving for the hyperparameters, the training of the Gaussian process regression model is complete. The predicted values and variances of the predicted values are as follows:
[0045]
[0046] S502. The predicted value of the battery SOH [x(d+1)] is obtained by using a fusion model of LSTM and Gaussian process regression. * ,x(d+2) * ,...,x(k) * After that, the difference between the predicted value k of the corresponding cycle when the battery fails and the current cycle is used to obtain the predicted value of the remaining battery life.
[0047] The beneficial effects of this invention are: it proposes a method for estimating the remaining life of lithium batteries based on LSTM and Gaussian process regression. The method of this invention has two advantages: first, it uses an LSTM model to make high-precision predictions of the battery's SOH and remaining life; second, it inputs the prediction results of the LSTM model into Gaussian process regression as the mean function, and finally outputs the predicted values of SOH and remaining life, as well as the uncertainty prediction. Attached Figure Description
[0048] Figure 1 This is a flowchart of the method of the present invention;
[0049] Figure 2 This is the basic structure of the LSTM network of the present invention;
[0050] Figure 3 This refers to the battery capacity data in the embodiment;
[0051] Figure 4 The prediction results of the present invention are shown in the embodiments. Detailed Implementation
[0052] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0053] like Figure 1 and Figure 2 As shown, a method for estimating the remaining life of a lithium battery based on LSTM and Gaussian process regression specifically includes the following steps:
[0054] S1. Obtain raw data of lithium batteries through experiments, define the state of health (SOH), and process the data;
[0055] S101. Based on the battery's rated capacity, charge / discharge cutoff voltage, and other nominal parameters, perform constant current and constant voltage charge / discharge cycles on the battery at room temperature. One cycle includes charging and discharging processes. During charging: the battery is charged with a constant current. When the battery voltage reaches the charging cutoff voltage (4.2V in this embodiment), the battery enters the constant voltage charging stage. Charging stops when the current falls below a certain small current (20mA in this embodiment). During discharging: the battery discharges with a constant current (2A in this embodiment), and the voltage gradually decreases. Discharging stops when the voltage drops to the discharge cutoff voltage (2.7V in this embodiment). This cycle is repeated until the battery fails. Battery capacity data is recorded during each charge / discharge cycle.
[0056] S102. Define the state of health (SOH) of the battery in the Nth cycle as:
[0057]
[0058] Where C0 is the rated capacity of the battery, which is 2Ah in this embodiment, C N This represents the battery's capacity in the Nth cycle. When SOH... N When the battery level is less than 70%, it is considered to be in failure. In this case, N is the battery's lifespan. The remaining lifespan of the battery is defined as the difference between the battery's lifespan and the current number of battery cycles.
[0059] S103. Convert the battery capacity data into battery SOH data, and use median filtering to replace outliers in the data. In this embodiment, the processed data is as follows: Figure 3 As shown.
[0060] S2. Construct input and output based on the sliding window method, and divide the dataset;
[0061] S201. Represent the preprocessed health status data as [x(1),x(2),...,x(k)], where x(k) represents the SOH of the kth cycle, and in this embodiment k≤153;
[0062] S202. Construct the input and output using the sliding window method. First, define a window of size d, and the i-th window is shown below:
[0063] X i =[x(i),x(i+1),...,x(i+d-1)],i=1,2,...kd
[0064] The input and output of the lifetime prediction model are defined as follows:
[0065] X = [X1, X2, ..., X i ]
[0066] Y = [x(d+1), x(d+2), ..., x(k)]
[0067] S203. Divide the dataset into training and test sets according to the proportions.
[0068] X train =[X1,X2,...,X n ]Y train = [x(d+1),x(d+2),...,x(d+n)]
[0069] X test =[X n+1 ,X n+2 ,...,X i ]Y test =[x(d+n+1),x(d+n+2),...,x(k)]
[0070] In this embodiment, the capacity data from the first 60 battery cycles is used as the training set, and the capacity data after the first 60 cycles is used as the test set. That is:
[0071] d+n=60
[0072] S3. Build an LSTM network, train it on the training set, and optimize the hyperparameters;
[0073] S301. Construct an LSTM-based neural network, determining the input, hidden, and output layers. The number of neurons in the input layer corresponds to the window size in S2, and the network weights are initialized. The hidden layer includes LSTM neural network units, dropout layers, fully connected layers, and activation layers. The output layer is the capacity value predicted by the neural network. The LSTM has three inputs: the current input x of the network. t The output value h of the LSTM at the previous time step t-1 and the cell state c from the previous time step t-1 The output has two parts: the current LSTM output value h. t and the current cell state c t c t The changes are relatively slow, reflecting the model's long-term memory, h t It is used to update the internal state of the model, which varies with x. t Because of its rapid changes, LSTM reflects the model's short-term memory. LSTM uses three gates to protect and control the internal state of the control unit: the forget gate, the input gate, and the output gate. The forget gate determines what information is discarded.
[0074] ft =σ(W f ·[h t-1 ,x t ]+b f )
[0075] Among them, W f and b f It represents the weights and biases of the forget gate. Output f t The value of c ranges from 0 to 1. When the value is 1, it means that c t-1 All information in c is retained; when the value is 0, it means c t-1 All the information in the database has been forgotten. Update it via an input gate:
[0076]
[0077] i t =σ(W i ·[h t-1 ,x t ]+b i )
[0078]
[0079] Finally, the output is calculated using the output gate:
[0080] o t =σ(W O [h t-1 ,x t ]+b O )
[0081] h t =o t *tanh(c t )
[0082] S302. After setting up the LSTM, use X train Using the input as input and minimizing the root mean square error loss function (RMSE) as the optimization objective, the Adam optimizer is used to update the model parameters, adjust the hyperparameters, and store the model parameters that minimize the loss function on the training set, along with the parameters of the model that minimize the loss function. RMSE is defined as follows:
[0083]
[0084] Where Y i * Y is the output value of the LSTM network. i For Y train The actual value in.
[0085] The optimized hyperparameters in this embodiment are shown in Table 1 below:
[0086] Table 1
[0087]
[0088] S4. Input the last window of data from the training dataset into the trained LSTM model for sliding prediction until the battery fails; the specific implementation of step S4 is as follows: based on the definition in S202, let X... n Using the input as the variable, we obtain the predicted value x(k). * , with x(k) * Construct X n+1 * The input network continues to predict, and this prediction cycle continues until the battery fails, as shown below:
[0089] x(d+n) * =LSTM(X) n )=LSTM{x(n),x(n+1),...,x(n+d-1)}
[0090] x(d+n+1) * =LSTM(X) n+1 * )=LSTM{x(n+1),x(n+2),...,x(n+d) *}
[0091] …
[0092] x(k) * =LSTM(X) k-d * )=LSTM{x(kd) * ,x(k-d+1) * ,...,x(k-1) *}
[0093] Where x k * Less than or equal to 70%.
[0094] S5. Input the prediction results of the LSTM network into the Gaussian process regression model as its mean function, use the Gaussian process regression to output the predicted value of the battery SOH, and calculate the remaining battery life.
[0095] S501. Define a Gaussian process. A Gaussian process is defined by a mean function and a kernel function. The mean function uses the predicted values from the LSTM in step S4, and the kernel function includes Squared Exponential. The Gaussian process regression is defined as follows:
[0096]
[0097] in:
[0098] μ(X)=x *
[0099]
[0100] σ l ,σ f The hyperparameter is solved by minimizing the negative logarithmic marginal likelihood function L:
[0101]
[0102] After solving for the hyperparameters, the training of the Gaussian process regression model is complete. The predicted values and variances of the predicted values are as follows:
[0103]
[0104]
[0105] S502. The predicted value of the battery SOH [x(d+1)] is obtained by using a fusion model of LSTM and Gaussian process regression. * ,x(d+2) * ,...,x(k) * In this embodiment, the prediction performance of the fusion model on the test set is as follows: Figure 4 As shown, the predicted value of the battery's remaining lifespan is obtained by calculating the difference between the predicted value k of the corresponding cycle when the battery fails and the current cycle. In this embodiment, the predicted value of the remaining lifespan is 93 cycles, which is completely consistent with the actual remaining lifespan of the battery.
[0106] In summary, a lithium-ion battery remaining life estimation method based on LSTM and Gaussian process regression is proposed. By designing a fusion model based on LSTM and Gaussian process regression, the advantages of both models are combined to achieve both numerical and uncertainty prediction of battery health status and remaining life. Compared to Gaussian process regression, LSTM can better handle the impact of long-term and short-term data on the prediction results, while Gaussian process regression provides richer probabilistic information.
[0107] The above description represents preferred embodiments of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in other combinations, modifications, and environments, and can be altered within the scope of the concept described herein through the above teachings or related technical or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.
Claims
1. A method for estimating the remaining life of a lithium battery based on LSTM and Gaussian process regression, characterized in that: Includes the following steps: S1. Obtain raw data of lithium batteries through experiments, define the state of health (SOH), and process the data; S2. Construct input and output based on the sliding window method, and divide the dataset; Includes the following sub-steps: S201. Represent the preprocessed health status data as follows: ,in Indicates the first A cycle ; S202. Construct the input and output using the sliding window method. First, define a window of size... The window, the The window is shown below: (2) The input and output of the lifetime prediction model are defined as follows: (3) S203. Divide the dataset and distribute it proportionally. Divided into training set and test set; (4); S3. Build an LSTM network, train it on the training set, and optimize the hyperparameters; S4. Input the last window of data from the training set into the trained LSTM model for sliding prediction until the battery fails; The specific approach is based on the definition in S202, with Input, and obtain the predicted value. ,by Build The input network continues to predict, and this prediction cycle continues until the battery fails, as shown below: (9) in Less than or equal to 70%; S5. Input the prediction results of the LSTM network into the Gaussian process regression model as its mean function, use the Gaussian process regression to output the predicted value of the battery SOH, and calculate the remaining battery life. Includes the following sub-steps: S501. Define a Gaussian process, which is defined by a mean function and a kernel function. The mean function uses the predicted values from the LSTM in step S4, and the kernel function includes Squared Exponential. The Gaussian process regression is defined as follows: (10) in: (11) For hyperparameters, minimize the negative logarithmic marginal likelihood function. Solution: (12) After solving for the hyperparameters, the training of the Gaussian process regression model is complete. The predicted values and variances of the predicted values are as follows: (13) S502. The battery is obtained through a fusion model of LSTM and Gaussian process regression. Predicted value Then, the predicted value of the corresponding cycle when the battery fails is calculated. The difference between the current cycle and the current cycle value is the predicted value of the remaining battery life.
2. The lithium battery remaining life estimation method based on LSTM and Gaussian process regression according to claim 1, characterized in that: Step S1 includes the following sub-steps: S101. Based on the battery's rated capacity and nominal charge / discharge cutoff voltage parameters, perform constant current and constant voltage charge / discharge cycles on the battery at room temperature. One cycle includes charging and discharging processes. During the charging process: the battery is charged with a constant current. When the battery voltage reaches the charging cutoff voltage, the battery enters the constant voltage charging stage. Charging stops when the current is less than the set microcurrent. During the discharging process: the battery discharges with a constant current, and the voltage gradually decreases. Discharging stops when the voltage drops to the discharge cutoff voltage. This cycle is repeated until the battery fails. Record the battery capacity data during each charge / discharge cycle. S102. Define the battery. The health status (SOH) for each cycle is: (1) in The rated capacity of the battery. For the battery The capacity of each loop; when When the battery level is below 70%, it is considered to be in failure. This refers to the battery's lifespan. The remaining battery lifespan is defined as the difference between the battery's lifespan and the current number of battery cycles. S103. Convert battery capacity data into battery... The data was processed using median filtering to replace outliers.
3. The lithium battery remaining life estimation method based on LSTM and Gaussian process regression according to claim 1, characterized in that: Step S3 includes the following sub-steps: S301. Construct an LSTM-based neural network, determining the input layer, hidden layers, and output layer. The number of neurons in the input layer corresponds to the window size in S2, and the network weights are initialized. The hidden layer includes LSTM neural network units, dropout layers, fully connected layers, and activation layers. The output layer is the capacity value predicted by the neural network. The LSTM has three inputs: the current input to the network. The output value of the LSTM at the previous time step and the cell state at the previous time step The output has two parts: the current LSTM output value. and the current cell state ; The changes are relatively slow, reflecting the model's long-term memory. It is used to update the internal state of the model, which follows Because of its rapid changes, LSTM reflects the model's short-term memory. LSTM uses three gates to protect and control the internal state of the control unit: the forget gate, the input gate, and the output gate. The forget gate determines what information is discarded. (5) in, and It consists of the weights and biases of the forget gate; the output is... The value of is between 0 and 1. When the value is 1, it means All information in the data is retained; when the value is 0, it means... All information in the input field is forgotten; updates are performed using an input gate: (6) Finally, the output is calculated using the output gate: (7) S302. After setting up the LSTM, with As input, with the optimization objective of minimizing the root mean square error loss function (RMSE), the Adam optimizer is used to update the model parameters, adjust the hyperparameters, and store the model parameters that minimize the loss function on the training set, along with the parameters themselves. RMSE is defined as follows: (8) in The output value of the LSTM network. for The true value in.
Citation Information
Patent Citations
Lithium battery state of health prediction method based on neural network and Maternard kernel function GPR
CN106405427A
Lithium ion battery remaining service life prediction method based on variational mode decomposition
CN114936682A