Battery life prediction method and device based on small sample battery acquisition data

By adopting self-supervised learning and fine-tuning methods of small amounts of labeled data in battery life prediction, the problem of dependence on large-scale labeled data in the existing technology is solved, and the rapid and accurate prediction of battery life is achieved, and the generalization and prediction speed of the model are improved.

CN119830161APending Publication Date: 2025-04-15SHANGHAI DIANJI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510201768.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The prior art relies on a large amount of labeled data in battery life prediction, which leads to a time-consuming training process and insufficient adaptability and stability of the model in different environments, especially in dynamic environments to greatly reduce practicality.

Method used

Using a battery life prediction method based on small sample data, a pre-trained model is built and the algorithm performance is verified on the test set through self-supervised learning and fine-tuning of a small amount of labeled data, thereby achieving fast and accurate prediction of battery life.

Benefits of technology

It significantly improves the accuracy and reliability of battery life prediction, reduces dependence on large-scale annotation data, improves the generalization and prediction speed of the model, and allows flexible life prediction at all stages of the battery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119830161A_ABST
    Figure CN119830161A_ABST
Patent Text Reader

Abstract

The invention provides a battery life prediction method and device based on small sample battery collection data. The method comprises the following steps: collecting a multi-dimensional data set containing battery charge-discharge cycle data; preprocessing and cleaning the acquired data, and dividing the data into a training set and a test set; carrying out normalization processing on the data input into the model, and inputting the data into the model in a blocking manner; mapping the data features to time domain, amplitude and phase information, and respectively carrying out data masking operation on the time domain, amplitude and phase information; reconstructing time domain and frequency domain shielded data by using self-supervised training to obtain a pre-training model; performing fine tuning on the pre-training model by using a small amount of data with labels, verifying the performance of an algorithm in different classification tasks after few sample training in a test set, and obtaining a battery life prediction model; and using the battery life prediction model to predict and output the remaining life of the battery. The accuracy and reliability of battery life prediction are improved through small sample data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of battery technology, and in particular to a method and device for predicting battery life based on small sample battery collection data. Background Art

[0002] With the widespread application of energy storage systems, especially in the field of renewable energy, batteries, as core components of energy storage and conversion, play a vital role in improving system efficiency, ensuring safety, and optimizing economic benefits through accurate prediction of their lifespan. The prediction of battery life can not only effectively extend the service life of the system, but also avoid economic losses and safety hazards caused by battery degradation or failure by discovering potential battery failures in advance. Therefore, improving the accuracy and efficiency of battery life prediction has become an important task in current research.

[0003] At present, the state of health (SOH) of the battery is usually estimated in real time through models based on equivalent circuits, which can effectively reflect the current condition of the battery. However, predicting the future remaining useful life (RUL) of the battery is a key issue in battery health management. In order to achieve more accurate life prediction, more and more scholars have begun to adopt data-driven methods, which rely on features highly correlated with SOH extracted from historical data, such as the battery's charge and discharge curves, temperature, internal resistance, etc. However, conventional data-driven methods usually require a large amount of labeled data for supervised learning, which brings significant challenges in practical applications. First, traditional methods usually require a long charge and discharge process to obtain a large amount of data, resulting in a time-consuming and resource-intensive training process. Second, the features extracted by these methods are often easily affected by changes in the external environment, thereby affecting the adaptability and stability of the model in different environments. This greatly reduces the practicality of traditional methods in large-scale applications, especially in dynamic environments. Therefore, how to quickly and accurately predict battery life with fewer samples has become a key issue that needs to be solved urgently. Summary of the invention

[0004] In view of the defects in the prior art, the purpose of the present invention is to provide a battery life prediction method and device based on small sample battery collection data. The present invention improves the accuracy and reliability of battery life prediction through limited sample data.

[0005] To solve the above problems, the technical solution of the present invention is:

[0006] A battery life prediction method based on small sample battery collection data includes the following steps:

[0007] Collect multidimensional datasets containing battery charge and discharge cycle data;

[0008] Preprocess and clean the acquired data, and divide it into training set and test set;

[0009] Normalize the data input into the model and input the data into the model in blocks;

[0010] Mapping data features to time domain, amplitude, and phase information, and performing data masking operations on the time domain, amplitude, and phase information respectively;

[0011] Use self-supervised training to reconstruct masked data in the time and frequency domains to obtain a pre-trained model;

[0012] Fine-tune the pre-trained model using a small amount of labeled data, and verify the performance of the algorithm in different classification tasks after few-sample training on the test set to obtain a battery life prediction model;

[0013] Use the battery life prediction model to predict the remaining battery life.

[0014] Preferably, the step of collecting a multidimensional data set containing battery charge and discharge cycle data specifically comprises:

[0015] Obtain the original charge and discharge cycle data of 124 commercial lithium iron phosphate / graphite batteries tested by MIT;

[0016] To acquire the laboratory data set, 1C constant current charging was adopted, and then constant voltage charging was switched until the cut-off voltage was reached. After charging, the battery was left to stand for 2 hours, and then constant current discharge was performed until the cut-off voltage was reached, and then the battery was left to stand for another 2 hours. The above charge and discharge cycles were repeated continuously until the available capacity of the battery dropped to less than 80% of its nominal capacity, thereby acquiring the actual service life of the battery and completing the generation of the data set.

[0017] Preferably, the steps of preprocessing and cleaning the acquired data and dividing the data into a training set and a test set specifically include:

[0018] Clean outliers and reconstruct outliers and missing data using spline interpolation;

[0019] To construct a training set, a continuous 300-second data segment containing voltage, power, and temperature is randomly selected from 30% of the total charge and discharge cycle data of each battery as the constituent data of the training set;

[0020] To construct the test set, a continuous 300-second data segment containing voltage, charge, and temperature is randomly extracted from the 15% total charge and discharge cycle data of each battery that is not used for training set construction as the constituent data of the test set.

[0021] Preferably, the step of normalizing the data input into the model and inputting the data into the model in blocks specifically includes:

[0022] For the data input into the model, perform minimum and maximum normalization operations to map its eigenvalues ​​to the range of [0,1];

[0023] Use the Patch operation in the image field to divide the data into multiple small blocks for input to facilitate model processing and feature learning.

[0024] Preferably, the step of mapping the data features to time domain, amplitude, and phase information, and performing data masking operations on the time domain, amplitude, and phase information respectively, specifically includes:

[0025] The ResNet1d structure based on convolutional neural network is used to map data features to the time domain and frequency domain, fully capturing the time domain, amplitude, and phase information in the time series, and forming a joint representation of the time domain, amplitude, and phase information;

[0026] Perform data masking operations on time domain, amplitude, and phase information respectively;

[0027] Preferably, the step of using self-supervised training to reconstruct the masked data in the time domain and the frequency domain to obtain a pre-trained model specifically includes:

[0028] In the pre-training stage, the masked parts of the time domain and frequency domain data are used for reconstruction to train the pre-training model. The masked data is X masked , the data before masking is X true :

[0029]

[0030] M is the set of masked indices, is the mean squared error loss function used for optimization.

[0031] Preferably, the step of fine-tuning the pre-trained model using a small amount of labeled data, verifying the performance of the algorithm in different classification tasks after a small number of sample training on a test set, and obtaining a battery life prediction model specifically includes:

[0032] Use 30% of the data in the training set that contains life span labels to fine-tune the classification layer first;

[0033] Freeze the classification layer and fine-tune the model’s encoder using 30% of the data in the training set that contains life span labels;

[0034] The test set verifies the performance of the algorithm in different classification tasks after few-sample training.

[0035] Preferably, in the fine-tuning phase, the model uses the pre-trained parameters as initialization and fine-tunes the downstream task through the task-specific objective function:

[0036]

[0037] Y true is the true label of the task, Y pred is the predicted output of the model.

[0038] Furthermore, the present invention also provides a battery life prediction device based on small sample battery collection data, including a processor and a memory for storing executable instructions of the processor, and the processor is configured to execute the battery life prediction method based on small sample battery collection data as described above by executing the executable instructions.

[0039] Compared with the prior art, the present invention combines a self-supervised learning strategy with a small amount of labeled data, and the few-sample learning method can effectively reduce the model's dependence on large-scale labeled data and improve generalization, while significantly improving the speed and accuracy of battery life prediction. The model based on few-sample training can be inferred through continuous segments starting from any time point in the battery life cycle without relying on data from the entire life cycle. The advantage of the method of the present invention is that it can flexibly predict the life of the battery at various stages of operation, and can still maintain a high prediction accuracy even in the early stages of the battery or when data is scarce. This is crucial for practical engineering applications, especially in large-scale energy storage systems or electric vehicles, because the working environment of the battery is complex and changeable, and complete historical data cannot always be obtained. Therefore, it is possible to make accurate predictions based on short-term, limited sample data, which not only saves a lot of time and computing resources, but also significantly improves the real-time and reliability of the prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0041] Figure 1 This is a flowchart of a battery life prediction method based on small sample battery collection data of the present invention;

[0042] Figure 2 Schematic diagram of the operation of dividing input data by Patch;

[0043] Figure 3 A schematic diagram of using a self-supervised learning method for reconstruction training;

[0044] Figure 4 This is a diagram of the model kernel architecture during the self-supervised training and fine-tuning phases;

[0045] Figure 5 The battery life is divided into three categories for prediction based on the MIT dataset.

[0046] Figure 6 This is a graph showing the change in loss during self-supervised training on the MIT dataset;

[0047] Figure 7 This is a graph showing the changing trend of loss decline in the two-stage fine-tuning strategy;

[0048] Figure 8 This is a curve chart showing the change in validation set accuracy under the two-stage fine-tuning strategy. DETAILED DESCRIPTION

[0049] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0050] Specifically, the present invention provides a battery life prediction method based on small sample battery collection data, such as Figure 1 As shown, the method comprises the following steps:

[0051] S1: Collect multidimensional datasets containing battery charge and discharge cycle data;

[0052] Specifically, the step S1 includes the following steps:

[0053] S11: Obtain the original charge and discharge cycle data of 124 commercial lithium iron phosphate / graphite batteries tested by MIT;

[0054] S12: Further acquire the laboratory data set. The specific experimental steps are as follows: adopt 1C constant current charging, switch to constant voltage charging, until the cut-off voltage is reached, let it stand for 2 hours after charging, and then discharge at a constant current until the cut-off voltage is reached, and then let it stand for another 2 hours; by continuously repeating the above charge and discharge cycles until the available capacity of the battery is reduced to less than 80% of its nominal capacity, the actual service life of the battery is acquired and the data set is generated.

[0055] S2: Preprocess and clean the acquired data, and divide it into training set and test set;

[0056] The method for preprocessing and cleaning data includes: cleaning outliers and reconstructing outliers and missing data using spline interpolation.

[0057] Specifically, the outliers are removed by using quartile anomaly detection and then filled with null values ​​and outliers by using spline interpolation. For spline interpolation, given a set of discrete point data (x i ,y i ),i=1,2,…,n, the goal of spline interpolation is to construct a piecewise polynomial function S(x) that satisfies the following conditions: S(x) is in every interval [x i ,x i+1 ] is a cubic polynomial: S(x) = a i (xx i ) 3 +b i (xx i ) 2 +c i (xx i )+d i ,x∈[x i ,x i+1 ]S(x)

[0058] It has second-order continuous differentiability, that is:

[0059]

[0060] The boundary conditions can be set to natural boundaries (S) (x 1 )=S”(x n )=0) or other types of boundaries.

[0061] To construct a training set, a continuous 300-second data segment containing voltage, power, and temperature is randomly extracted from 30% of the total charge and discharge cycle data of each battery as the constituent data of the training set.

[0062] To construct the test set, a continuous 300-second data segment containing voltage, power, and temperature is randomly selected from 15% of the total charge and discharge cycle data of each battery (the 15% data is not used for training set construction) as the constituent data of the test set.

[0063] S3: Normalize the data input to the model and input the data into the model in blocks;

[0064] Specifically, for the data input to the model, the minimum and maximum normalization operation is performed to map its eigenvalues ​​to the range of [0,1]. The dimension of the input data is For any input tensor X(b,n,l) (where b is the batch index, n is the input feature, and l is the time step):

[0065]

[0066] X min=min(X): represents the minimum value of the input data X; X max =max(X): indicates the maximum value of input data X; X norm (b,n,l): normalized value, in the range of [0,1].

[0067] If you want to normalize each batch independently, you can calculate the minimum and maximum values ​​of each batch:

[0068]

[0069] The normalized formula becomes:

[0070]

[0071] The output dimension after normalization, the dimension of the data remains unchanged after normalization, which is: X(b,n,l)

[0072] The method of inputting data into the model in blocks is to use the Patch operation in the image field, that is, to divide the data into multiple small blocks for input, so as to facilitate model processing and feature learning. The specific Patch process is as follows Figure 2 shown.

[0073] After further dividing the time dimension T into N windows of length P, the data tensor is reorganized so that the features of each window are concatenated into a vector.

[0074] X patch (b,n,:)=reshape(X(b,:,n·P:(n+1)·P)),n=0,1,…,N-1

[0075] Among them, b represents the batch index, n represents the block index, and the new tensor is obtained

[0076] S4: Mapping the data features to time domain, amplitude, and phase information, and performing data masking operations on the time domain, amplitude, and phase information respectively;

[0077] The method of mapping data features to time domain, amplitude, and phase information is mainly to map data features to time domain and frequency domain through the ResNet1d structure based on convolutional neural network (CNN). Specifically, after dividing the data into blocks, ResNet1d is used for feature extraction, which can fully capture the time domain, amplitude, and phase information in the time series. Finally, a joint representation of time domain, amplitude, and phase information is formed, which is convenient for the subsequent global modeling of the Transformer encoder.

[0078]

[0079]

[0080]

[0081] x final =Concat( Token t ,X time ,Token m ,X magnitude ,Token p ,X phase )

[0082] The final output is

[0083] The specific process of performing data masking operations on the time domain, amplitude, and phase information is as follows: Figure 3 As shown;

[0084] For time features Applying a masking matrix

[0085] t masked =t⊙M t

[0086] Among them, M t : masking matrix in the time domain, randomly generated according to the required ratio; ⊙: element-by-element multiplication operation; t masked : Time domain features after masking.

[0087] For the amplitude characteristics Applying a masking matrix

[0088] m masked =m⊙M m

[0089] Among them, M m : masking matrix in amplitude domain; m masked Amplitude characteristics after masking.

[0090] For the phase characteristics Application of masking matrix

[0091] p masked =p⊙M p

[0092] Among them, M p : masking matrix in phase domain; p masked : Phase characteristics after masking.

[0093] S5: Use self-supervised training to reconstruct the masked data in the time domain and frequency domain to obtain a pre-trained model;

[0094] Specifically, in the pre-training stage, the masked data is X masked , the data before masking is X true :

[0095]

[0096] M is the set of masked indices, is the mean squared error loss function used for optimization.

[0097] S6: Fine-tune the pre-trained model using a small amount of labeled data, and verify the performance of the algorithm in different classification tasks after few-sample training on the test set to obtain a battery life prediction model;

[0098] Specifically, the classification layer is first fine-tuned using the data containing life span labels in the training set that is 30%; the classification layer is frozen, and the encoder of the model is first fine-tuned using the data containing life span labels in the training set that is 30%;

[0099] In the fine-tuning stage, the model uses the pre-trained parameters as initialization and fine-tunes the downstream tasks through task-specific objective functions.

[0100]

[0101] Y true is the true label of the task, Y pred is the predicted output of the model.

[0102] Furthermore, the parameters trained with a few samples are used to predict the test set and the predicted category is output:

[0103] Y pred =argmax(Softmax(f(X test ;θ)))

[0104] Where f is the output of the model and θ is the model parameter.

[0105] The specific formula for evaluating the prediction performance using accuracy, precision, and recall is as follows:

[0106]

[0107]

[0108] Among them, TP is true positive, FP is false positive, and FN is false negative.

[0109] S7: Use the battery life prediction model to predict the remaining battery life.

[0110] The following example shows a specific implementation of the prediction of the remaining battery life interval based on the small sample technology. This implementation uses the aging cycle test set of the Massachusetts Institute of Technology as an example and adopts the three-category battery end-of-life classification method for implementation. Specifically, batteries with an end-of-life of less than 400 cycles are classified into the first category; batteries with an end-of-life of between 400 and 1500 cycles are classified into the second category; and batteries with an end-of-life of more than 1500 cycles are classified into the third category. This classification method ensures that battery data of different end-of-life intervals are evenly and reasonably distributed during the training and testing process.

[0111] Whether it is a training set or a test set, multivariate features are normalized before entering the model. The normalized data format remains unchanged, matches the model input requirements, and is suitable for subsequent deep learning modeling tasks.

[0112] In the training phase, masking operations are performed on the time domain, amplitude, and phase information, and self-supervised reconstruction training is performed to fully explore the intrinsic feature correlation of the data and improve the feature expression ability and generalization performance of the model. Figure 4 As shown. Since the training data comes from random 300-second segments of random battery cycles, self-supervised training does not need to rely on a large amount of labeled data. Instead, it reconstructs masked information to learn potential patterns in multiple dimensions such as time domain, amplitude, and phase. This method can effectively enhance the adaptability of the model to small sample scenarios, reduce dependence on large-scale labeled data, and improve the modeling ability of random input data segments. In addition, by mining the internal characteristics of the data, self-supervised training further improves the prediction reliability of the model in different battery cycle stages and operating environments, laying a solid foundation for subsequent classification or life prediction tasks.

[0113] In the fine-tuning stage, a small amount of labeled data is used to further optimize the pre-trained model, and the model parameters are initialized with the common features obtained by self-supervised learning to improve the performance of the model in downstream tasks. The fine-tuned life prediction classification model is applied to the test set, and each test sample is predicted one by one, and the corresponding life prediction probability is returned. In this embodiment, in the battery classification task, the model predicts the probability distribution P of samples belonging to different categories through input features (such as voltage, current, temperature, etc.) 0 ,P 1 ,P 2 ]. The classification principle is based on the maximum probability rule, that is, the sample is classified into the category with the highest probability argmax(P). The role of the threshold is to judge whether the prediction result is confident enough. It is usually set to 0.5, that is, when the predicted probability of a category exceeds 50%, the sample is classified into this category. Figure 5As shown in , the correspondence between the true category and the predicted category is shown, such as 926 samples of category 0 are correctly classified, while 19 samples are misclassified as category 1. Figures 6 to 8 As shown, the method proposed in the present invention can achieve rapid convergence of loss during training and significantly improve the accuracy.

[0114] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A battery life prediction method based on small sample battery collection data, characterized in that: The method comprises the following steps: Collect multidimensional datasets containing battery charge and discharge cycle data; Preprocess and clean the acquired data, and divide it into training set and test set; Normalize the data input into the model and input the data into the model in blocks; Mapping data features to time domain, amplitude, and phase information, and performing data masking operations on the time domain, amplitude, and phase information respectively; Use self-supervised training to reconstruct masked data in the time and frequency domains to obtain a pre-trained model; Fine-tune the pre-trained model using a small amount of labeled data, and verify the performance of the algorithm in different classification tasks after few-sample training on the test set to obtain a battery life prediction model; Use the battery life prediction model to predict the remaining battery life.

2. The battery life prediction method based on small sample battery collection data according to claim 1 is characterized in that: The step of collecting a multidimensional data set containing battery charge and discharge cycle data specifically includes: Obtain the original charge and discharge cycle data of 124 commercial lithium iron phosphate / graphite batteries tested by MIT; To acquire the laboratory data set, 1C constant current charging was adopted, and then constant voltage charging was switched until the cut-off voltage was reached. After charging, the battery was left to stand for 2 hours, and then constant current discharge was performed until the cut-off voltage was reached, and then the battery was left to stand for another 2 hours. The above charge and discharge cycles were repeated continuously until the available capacity of the battery dropped to less than 80% of its nominal capacity, thereby acquiring the actual service life of the battery and completing the generation of the data set.

3. The battery life prediction method based on small sample battery collection data according to claim 1 is characterized in that: The steps of preprocessing and cleaning the acquired data and dividing the data into training sets and test sets specifically include: Clean outliers and reconstruct outliers and missing data using spline interpolation; To construct a training set, a continuous 300-second data segment containing voltage, power, and temperature is randomly selected from 30% of the total charge and discharge cycle data of each battery as the constituent data of the training set; To construct the test set, a continuous 300-second data segment containing voltage, charge, and temperature is randomly extracted from the 15% total charge and discharge cycle data of each battery that is not used for training set construction as the constituent data of the test set.

4. The battery life prediction method based on small sample battery collection data according to claim 1 is characterized in that: The step of normalizing the data input into the model and inputting the data into the model in blocks specifically includes: For the data input to the model, perform minimum and maximum normalization operations to map its eigenvalues ​​to the range of [0,1]; Use the Patch operation in the image field to divide the data into multiple small blocks for input to facilitate model processing and feature learning.

5. The battery life prediction method based on small sample battery collection data according to claim 1 is characterized in that: The step of mapping the data features to time domain, amplitude, and phase information, and performing data masking operations on the time domain, amplitude, and phase information respectively, specifically includes: The ResNet1d structure based on convolutional neural network is used to map data features to the time domain and frequency domain, fully capturing the time domain, amplitude, and phase information in the time series, and forming a joint representation of the time domain, amplitude, and phase information; Data masking operations are performed on the time domain, amplitude, and phase information respectively.

6. The battery life prediction method based on small sample battery collection data according to claim 1, characterized in that: The step of using self-supervised training to reconstruct the masked data in the time domain and the frequency domain to obtain a pre-trained model specifically includes: In the pre-training stage, the masked parts of the time domain and frequency domain data are used for reconstruction to train the pre-training model. The masked data is X masked , the data before masking is X true : M is the set of masked indices, is the mean squared error loss function used for optimization.

7. The battery life prediction method based on small sample battery collection data according to claim 1 is characterized in that: The steps of fine-tuning the pre-trained model using a small amount of labeled data, verifying the performance of the algorithm in different classification tasks after the small sample training in the test set, and obtaining the battery life prediction model specifically include: Use 30% of the data in the training set that contains life span labels to fine-tune the classification layer first; Freeze the classification layer and fine-tune the model’s encoder using 30% of the data in the training set that contains life span labels; The test set verifies the performance of the algorithm in different classification tasks after few-sample training.

8. The battery life prediction method based on small sample battery collection data according to claim 7 is characterized in that: In the fine-tuning phase, the model uses the pre-trained parameters as initialization and fine-tunes the downstream task through the task-specific objective function: Y true is the true label of the task, Y pred is the predicted output of the model.

9. A battery life prediction device based on small sample battery collection data, characterized in that: The device includes a processor and a memory for storing executable instructions of the processor, and the processor is configured to perform the battery life prediction method based on small sample battery collection data as claimed in any one of claims 1 to 8 by executing the executable instructions.