Battery life prediction method and device, electronic equipment and storage medium
By performing complete multimodal decomposition and Kalman filtering on battery capacity data, combined with the fusion of multiple types of deep learning models, the problems of gradient vanishing and gradient explosion in neural network models in battery life prediction are solved, and high-precision battery life prediction is achieved.
Patent Information
- Application Number
- CN202510775754.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-09-23
AI Technical Summary
In the existing technology, battery life prediction methods based on neural network models are prone to gradient vanishing and gradient exploding phenomena, which make the model difficult to converge or training unstable, affecting the accuracy of the prediction.
The battery capacity data is processed using full multimodal decomposition technology, combined with Kalman filtering and multi-type deep learning model fusion, an initial prediction model is constructed through a fully connected layer, and recursive prediction and multi-model fusion strategies are used to generate the final battery life prediction results.
It effectively suppresses data noise, improves signal quality, enhances the model's ability to learn sequence features, generates high-precision battery life prediction results, and improves the accuracy and robustness of the prediction.
Smart Images

Figure CN120687768A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of energy storage batteries, and in particular to a battery life prediction method, device, electronic equipment and storage medium. Background Art
[0002] The Kalman filter is a recursive estimation algorithm that uses measurements and model predictions to estimate the system state. In battery life prediction, the Kalman filter can be used to estimate the battery's state of health (SOH) and remaining useful life (RUL). By constructing an appropriate battery model and observation equations, the Kalman filter can effectively address the nonlinearities and noise inherent in the battery system, thereby improving the accuracy and reliability of predictions. Significant progress has been made in the application of Kalman filters in battery life prediction.
[0003] The current battery life prediction method based on neural network model is prone to gradient vanishing and gradient exploding phenomena during the training process, which will make the model difficult to converge or the training unstable, thus affecting the accuracy of the prediction. Summary of the Invention
[0004] In view of this, it is necessary to provide a battery life prediction method, device, electronic device and storage medium to solve the technical problem of insufficient prediction accuracy caused by data noise interference in the existing technology.
[0005] In order to achieve the above technical effects, in a first aspect, the present invention provides a battery life prediction method, comprising: Perform full multimodal decomposition on battery capacity data to obtain time series data; Performing Kalman filtering on the time series data to obtain feature data; The preset RNN model, LSTM model and CNN model are integrated through the fully connected layer to obtain the initial prediction model; The initial prediction model is trained and predicted based on the characteristic data to obtain a final battery life prediction result.
[0006] In some embodiments of the present invention, performing full multimodal decomposition on the battery capacity data to obtain time series data includes: After adding white noise to the battery capacity data, complete multimodal decomposition is performed to obtain several IMF components; performing averaging and residual processing on the plurality of IMF components; Repeat the above steps several times to obtain time series data.
[0007] In some embodiments of the present invention, the preset RNN model, LSTM model, and CNN model are fused through a fully connected layer to obtain an initial prediction model, including: Set the random seed; Create a Sequential model; In the structure of the Sequential model, the multiple different types of deep learning models are fused by adding a fully connected layer, wherein the fully connected layer serves as the output layer of the initial prediction model and the output dimension is 1; The preset loss function in the initial prediction model is optimized based on the Adam optimizer and the momentum term is introduced.
[0008] In some embodiments of the present invention, before setting the random seed, the method further includes: Setting a relative error function for calculating the position of the degradation point of the battery according to the true value of the battery capacity data and the predicted value of the initial prediction model; Establish a time series function for converting input time series data into input-output pairs; Set up a training function for splitting time series data into training and test sets and generating input features and target values for the training and test sets.
[0009] In some embodiments of the present invention, the training and predicting of the initial prediction model based on the feature data to obtain a final battery life prediction result includes: Circularly processing each component in the time series data, extracting current component data, and dividing the time series data into a training set and a test set; Based on the training set and the test set, a recursive prediction method is used to generate a data frame including actual values and predicted values; generating a prediction result of the current component data based on the data framework; The prediction results of all current component data are integrated to obtain the final battery life prediction result.
[0010] In some embodiments of the present invention, generating a data frame including actual values and predicted values using a recursive prediction method based on the training set and the test set includes: Initialize the prediction sequence; generating initial historical data based on the training set; generating a predicted value for each test time step based on the initial historical data; Fill the predicted values into the predicted series to generate a data frame containing actual values and predicted values.
[0011] In some embodiments of the present invention, after generating a prediction result of the current component data based on the data framework, the method further includes: Deletes the model object corresponding to the current component data and releases the memory.
[0012] In a second aspect, the present invention further provides a battery life prediction device, comprising: The modal decomposition module is used to perform complete multimodal decomposition of battery capacity data to obtain time series data; A Kalman filter module, configured to perform Kalman filtering on the time series data to obtain feature data; The model building module is used to fuse the preset RNN model, LSTM model, and CNN model through the fully connected layer to obtain the initial prediction model; The prediction module is used to train and predict the initial prediction model based on the feature data to obtain a final battery life prediction result.
[0013] In a third aspect, the present invention further provides an electronic device, comprising: Memory, used to store programs; A processor, coupled to the memory, is configured to execute the program stored in the memory to implement the steps of the battery life prediction method described in any one of the above method items.
[0014] In a fourth aspect, the present invention further provides a storage medium, comprising: Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps of the battery life prediction method described in any one of the above method items.
[0015] The beneficial effects of the present invention are as follows: the present invention provides a battery life prediction method, which first performs a complete multimodal decomposition of the battery capacity data to extract the core features; secondly, the core features are filtered using adaptive Kalman filtering technology, which can effectively suppress data noise and improve signal quality by dynamically adjusting the covariance of process noise and measurement noise and combining an innovation value threshold detection mechanism; then, a prediction model including multiple types of deep learning models is constructed to enhance the model's learning ability for sequence features; finally, a prediction result is generated through recursive prediction and multi-model fusion strategies. The present invention effectively suppresses data noise through Kalman filtering technology, and avoids the influence of irrelevant features on the prediction results through a multi-model prediction model enhancement model, ultimately generating a high-precision prediction result, thereby effectively solving the technical problem of insufficient prediction accuracy due to data noise interference in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 A schematic flow chart of an embodiment of a battery life prediction method provided by the present invention; Figure 2 for Figure 1 A flow chart of an embodiment of step S101; Figure 3 A flow chart of an embodiment of the present invention for applying EMD to perform multimodal decomposition of battery capacity data; Figure 4 for Figure 1 A flow chart of an embodiment of step S103; Figure 5 for Figure 1 A flow chart of an embodiment of step S104; Figure 6 for Figure 5 A flow chart of an embodiment of step S502; Figure 7 A schematic structural diagram of an embodiment of a battery life prediction device provided by the present invention; Figure 8 This is a structural diagram of an embodiment of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0018] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.
[0019] In the description of the embodiments of the present invention, unless otherwise specified, "plurality" means two or more. "And / or" describes the association relationship between associated objects, indicating that three relationships can exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone.
[0020] The terms "first," "second," and so on, used in the embodiments of the present invention are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, technical features designated as "first" or "second" may explicitly or implicitly include at least one such feature.
[0021] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute a separate or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0022] The present invention provides a battery life prediction method, device, electronic device and storage medium, which are described below respectively.
[0023] like Figure 1 As shown, in a first aspect, the present invention provides a battery life prediction method, comprising: S101. Perform complete multimodal decomposition on battery capacity data to obtain time series data.
[0024] like Figure 2 In some embodiments of the present invention, step S101 includes: S201 , adding white noise to the battery capacity data and performing complete multimodal decomposition to obtain several IMF components.
[0025] S202: Perform averaging and residual processing on several IMF components.
[0026] S203. Repeat the above steps several times to obtain time series data.
[0027] Preferably, the Empirical Mode Decomposition (EMD) method is used to decompose the battery capacity data. The specific decomposition process is as follows: Figure 3 As shown: (1) Adding white noise: Add white noise of a certain intensity to the original battery capacity data and determine the number of decompositions and other parameters, such as performing 100 EMD decompositions with white noise. White noise has a uniform power spectral density and can help alleviate the problem of mode aliasing.
[0028] (2) Perform empirical mode decomposition Perform EMD decomposition on the data after adding white noise to obtain a set of intrinsic mode functions (IMFs) and a residual term. The IMF components are then extracted sequentially. Each IMF component must have an equal number of extreme points and zero crossings or a difference of 1, and the average of the upper and lower envelopes must be zero. By filtering extreme points, generating upper and lower envelopes, calculating the envelope mean, and extracting IMF components, IMF components of varying characteristic scales are continuously isolated until the residual signal no longer meets the IMF condition. This IMF component extraction process is repeated for each EMD decomposition with white noise.
[0029] (3) Calculate the average value The IMF components obtained from multiple EMD decompositions with white noise are ensemble-averaged to obtain the final stable IMF components. To ensure that the number and corresponding relationships of the IMF components obtained from each decomposition are basically consistent, the order of the IMF components from each decomposition is aligned. The average is calculated by averaging the corresponding IMF components obtained from each decomposition to obtain the ensemble average version of each IMF component. This effectively suppresses the influence of white noise and ensures that the decomposition results more realistically reflect the intrinsic modal characteristics of the original data.
[0030] (4) Processing the residual: Analyzing the residual: After the decomposition is complete, analyze the residual. It represents the remaining portion of the original data after removing all IMF components, usually containing trend information or low-frequency components. Based on the characteristics of the residual and the analysis requirements, determine whether it needs to be further decomposed or processed. If the residual still contains useful information and meets the decomposition conditions, it can be considered as a new input signal for further decomposition; otherwise, it is retained as part of the final decomposition result.
[0031] It is important to note that the number of decompositions should be determined based on a comprehensive consideration of data characteristics and computing resources, as it affects the stability of the decomposition results and the computational complexity. The white noise intensity should be moderate; excessive noise can obscure the original signal characteristics, while too low a value can make it difficult to effectively mitigate mode aliasing. The appropriate intensity should be determined through experimentation or experience. After the decomposition is complete, the resulting IMF components and residual terms should be analyzed and verified to ensure they accurately reflect the characteristics and variation patterns of the original battery capacity data. This can be assessed using various analysis methods, including those in the time and frequency domains.
[0032] S102: Perform Kalman filtering on the time series data to obtain feature data.
[0033] Specifically, the operation process is as follows: (1) Set initial parameters: The Kalman filter accepts the time series data obtained after modal decomposition and defines the variable data length. , state estimate , estimated error covariance , prior estimate , prior covariance , Kalman gain , process noise covariance factor , measurement noise covariance factor , initialize all relevant initial parameters to zero. The initial state is estimated to be the first measurement value, and the initial covariance is set to 1, indicating that the uncertainty of the estimate is high at the beginning.
[0034] (2) Prediction step: assuming the state remains unchanged while uncertainty increases with process noise; (3) Outlier detection: If the innovation value exceeds the threshold, it is considered an outlier and replaced with a priori estimates to identify and process atypical measurements that may have an adverse impact on the system state estimation; (4) Update step: It is the core link of each time step in the Kalman filter and is responsible for combining the prior estimate and the actual measurement to produce the posterior state estimate; (5) Adaptive adjustment: by dynamically modifying the process noise covariance and the measurement noise covariance , so that the filter can better adapt to system characteristics and environmental changes, thereby improving filtering performance.
[0035] S103: The preset RNN model, LSTM model and CNN model are integrated through a fully connected layer to obtain an initial prediction model.
[0036] like Figure 4 In some embodiments of the present invention, step S103 includes: S401 : Setting a relative error function for calculating the position of a degradation point of a battery according to a true value of battery capacity data and a predicted value of an initial prediction model.
[0037] It should be noted that the relative error function mainly calculates the position of the degradation point by comparing the first point where the true value and the predicted value are lower than the threshold. The calculation of the degradation point is based on the threshold triggering condition, and the accuracy of the prediction is evaluated by the relative error. This function is used to evaluate the performance of the model in the degradation prediction task.
[0038] S402: Establish a time series function for converting input time series data into input-output pairs.
[0039] Specifically, the given time series data (represented in list form) is converted into supervised learning input-output pairs for training a time series prediction model. Each input sequence is a sliding window of fixed size, and the corresponding output value is the value after that window. Based on the characteristics of battery capacity data, this data conversion makes the subsequent training process faster and more accurate.
[0040] S403 : Setting a training function for dividing the time series data into a training set and a test set and generating input features and target values for the training set and the test set.
[0041] It should be noted that when splitting the data set, the size of the training set should be determined and the sliding window of the test set should be ensured to contain enough data.
[0042] S404: Set a random seed.
[0043] Call a custom function to set the random seed to ensure the repeatability of the model's initialized weights and other random initializations.
[0044] S405. Create a Sequential model.
[0045] Create a sequential model using the Keras library's Sequential API, which allows you to stack multiple layers to build a neural network.
[0046] S406. In the structure of the Sequential model, several different types of deep learning models are fused by adding a fully connected layer.
[0047] Among them, the fully connected layer serves as the output layer of the initial prediction model, and the output dimension is 1.
[0048] Preferably, deep learning models such as RNN, LSTM, and CNN can be added to the initial prediction model.
[0049] S407: Optimize the preset loss function in the initial prediction model based on the Adam optimizer and introduce a momentum term.
[0050] It should be noted that when optimizing the loss function, the model performance can be improved by adjusting the model parameters to minimize the loss; and the introduction of the momentum term can make the descent direction of the gradient more stable, which helps to accelerate convergence and escape from the local minimum.
[0051] S104: Train and predict the initial prediction model based on the feature data to obtain a final battery life prediction result.
[0052] like Figure 5 In some embodiments of the present invention, step S104 includes: S501 , looping through each component in the time series data, extracting the current component data, and dividing the time series data into a training set and a test set.
[0053] S502: Based on the training set and the test set, a recursive prediction method is used to generate a data frame including actual values and predicted values.
[0054] like Figure 6 In some embodiments of the present invention, step S502 includes: S601, initializing the prediction sequence; S602, generating initial historical data based on the training set; S603, generating a predicted value for each test time step based on the initial historical data; S604: Fill the predicted value into the predicted sequence to generate a data frame containing the actual value and the predicted value.
[0055] Specifically, the initial historical data of the test set is used as the input of the model to make the first prediction. The length of the initial historical data should be consistent with the input window size of the model.
[0056] Using a recursive forecasting method, extract the current input window (a fixed-size sequence) from the historical data. Use the model to forecast the current input window and obtain the predicted value for the next time step. Add the predicted value to the historical data to form a new input window for the next prediction. Add the current actual value and the predicted value to the data frame. Repeat these steps until all time steps to be forecasted have been traversed.
[0057] It is important to note that after all predictions are completed, the resulting data frame can be processed and visualized to analyze and evaluate the prediction results. Performance metrics can also be calculated and actual values can be plotted against the predicted values.
[0058] S503: Generate prediction results for the current component data based on the data framework.
[0059] S504: Delete the model object corresponding to the current component data and release the memory.
[0060] It's important to note that in complex machine learning tasks, especially those involving the training and prediction of multiple models, model objects can occupy a significant amount of memory. Failure to promptly clean up these unused model objects can lead to insufficient memory, impacting program efficiency or even causing a crash. Therefore, deleting model objects is a crucial step in memory management, optimizing program performance and resource usage.
[0061] S505 : Integrate the prediction results of all current component data to obtain a final battery life prediction result.
[0062] Compared with the existing technology, the present invention provides a battery life prediction method, which first performs a complete multimodal decomposition of the battery capacity data to extract the core features; secondly, it uses adaptive Kalman filtering technology to filter the core features. Kalman filtering technology can effectively suppress data noise and improve signal quality by dynamically adjusting the covariance of process noise and measurement noise and combining the innovation value threshold detection mechanism; then it constructs a prediction model containing multiple types of deep learning models to enhance the model's learning ability for sequence features; finally, it generates prediction results through recursive prediction and multi-model fusion strategies. The present invention effectively suppresses data noise through Kalman filtering technology, and avoids the influence of irrelevant features on the prediction results through the multi-model prediction model enhancement model, and finally generates high-precision prediction results, thereby effectively solving the technical problem of insufficient prediction accuracy caused by data noise interference in the existing technology.
[0063] The present invention also incorporates an innovative threshold detection mechanism to effectively suppress data noise and improve signal quality. By designing a degradation point relative error evaluation function and a time series data conversion method, the model's ability to learn sequence features is enhanced. Finally, recursive prediction and multi-model fusion strategies are used to generate prediction results, and model performance is verified through visual analysis. This invention significantly improves the accuracy and robustness of battery life prediction and is suitable for energy storage battery degradation assessment under different operating conditions.
[0064] like Figure 7 In a second aspect, the present invention further provides a battery life prediction device 70, comprising: A modal decomposition module 710 is used to perform full multimodal decomposition on the battery capacity data to obtain time series data; Kalman filter module 720, used to perform Kalman filtering on time series data to obtain feature data; The model building module 730 is used to fuse the preset RNN model, LSTM model and CNN model through a fully connected layer to obtain an initial prediction model; The prediction module 740 is used to train and predict the initial prediction model based on the feature data to obtain a final battery life prediction result.
[0065] like Figure 8 In a third aspect, the present invention further provides an electronic device 80, comprising: Memory 810, used for storing programs; The processor 820 is coupled to the memory 810 and is configured to execute the program stored in the memory 810 to implement the steps of the battery life prediction method described in any one of the above method items.
[0066] In a fourth aspect, the present invention further provides a storage medium, comprising: Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps of the battery life prediction method described in any one of the above method items.
[0067] The above is a detailed introduction to the battery life prediction method, device, electronic device and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A battery life prediction method, characterized in that: include: Perform full multimodal decomposition on battery capacity data to obtain time series data; Performing Kalman filtering on the time series data to obtain feature data; The preset RNN model, LSTM model and CNN model are integrated through the fully connected layer to obtain the initial prediction model; The initial prediction model is trained and predicted based on the characteristic data to obtain a final battery life prediction result.
2. The battery life prediction method according to claim 1, characterized in that: The battery capacity data is subjected to complete multimodal decomposition to obtain time series data, including: After adding white noise to the battery capacity data, complete multimodal decomposition is performed to obtain several IMF components; performing averaging and residual processing on the plurality of IMF components; Repeat the above steps several times to obtain time series data.
3. The battery life prediction method according to claim 1, wherein: The preset RNN model, LSTM model and CNN model are integrated through the fully connected layer to obtain the initial prediction model, including: Set the random seed; Create a Sequential model; In the structure of the Sequential model, the multiple different types of deep learning models are fused by adding a fully connected layer, wherein the fully connected layer serves as the output layer of the initial prediction model and the output dimension is 1; The preset loss function in the initial prediction model is optimized based on the Adam optimizer and the momentum term is introduced.
4. The battery life prediction method according to claim 3, characterized in that: Before setting the random seed, also include: Setting a relative error function for calculating the position of the degradation point of the battery according to the true value of the battery capacity data and the predicted value of the initial prediction model; Establish a time series function for converting input time series data into input-output pairs; Set up a training function for splitting time series data into training and test sets and generating input features and target values for the training and test sets.
5. The battery life prediction method according to claim 1, wherein: The training and prediction of the initial prediction model based on the characteristic data to obtain a final battery life prediction result includes: Circularly processing each component in the time series data, extracting current component data, and dividing the time series data into a training set and a test set; Based on the training set and the test set, a recursive prediction method is used to generate a data frame including actual values and predicted values; generating a prediction result of the current component data based on the data framework; The prediction results of all current component data are integrated to obtain the final battery life prediction result.
6. The battery life prediction method according to claim 5, characterized in that: The method of generating a data frame including actual values and predicted values based on the training set and the test set by adopting a recursive prediction method comprises: Initialize the prediction sequence; generating initial historical data based on the training set; generating a predicted value for each test time step based on the initial historical data; Fill the predicted values into the predicted series to generate a data frame containing actual values and predicted values.
7. The battery life prediction method according to claim 5, characterized in that: After generating the prediction result of the current component data based on the data framework, the method further includes: Deletes the model object corresponding to the current component data and releases the memory.
8. A battery life prediction device, characterized in that: include: The modal decomposition module is used to perform complete multimodal decomposition of battery capacity data to obtain time series data; A Kalman filter module, configured to perform Kalman filtering on the time series data to obtain feature data; The model building module is used to fuse the preset RNN model, LSTM model, and CNN model through the fully connected layer to obtain the initial prediction model; The prediction module is used to train and predict the initial prediction model based on the feature data to obtain a final battery life prediction result.
9. An electronic device, characterized in that: include: Memory, used to store programs; A processor, coupled to the memory, is configured to execute the program stored in the memory to implement the steps of the battery life prediction method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: include: Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps of the battery life prediction method described in any one of claims 1 to 7.