Life prediction method based on lithium battery characteristic relation and parallel attention

By using the combination of parallel attention mechanism and Transformer network in lithium battery life prediction, the problem that the existing technology is difficult to fully explore the degradation characteristics of lithium battery is solved, and a more accurate prediction of lithium battery life is achieved.

CN120012608APending Publication Date: 2025-05-16UNIV OF JINAN

Patent Information

Application Number
CN202510457408.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

The existing Transformer neural network is difficult to fully explore the complex relationship between the degradation characteristics of lithium batteries when predicting the life of lithium batteries, resulting in poor prediction results.

Method used

A parallel attention mechanism is used to combine with the Transformer network to build a lithium battery life prediction model. Time series data is processed through the parallel attention mechanism, attention parameters are generated, and global feature fusion is combined with the Transformer network to form a comprehensive feature vector to achieve life expectancy prediction.

Benefits of technology

The correlation between lithium battery characteristics at different time steps was successfully explored, which significantly improved the accuracy and effectiveness of lithium battery life prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120012608A_ABST
    Figure CN120012608A_ABST
Patent Text Reader

Abstract

The invention discloses a lithium battery characteristic relation and parallel attention-based life prediction method, and relates to the technical field of lithium battery life prediction, and the method comprises the steps: obtaining the characteristics of a lithium battery, and converting the characteristics into original characteristic vectors; dividing the original feature vectors into a training set, a verification set and a test set according to a certain proportion; combining a parallel attention mechanism with a Transform network to construct a lithium battery life prediction model; inputting the training set into a lithium battery life prediction model for training, and optimizing model parameters to obtain a model after initial training; continuing to train the model on the same data set, and stopping training according to a set termination condition to obtain a trained lithium battery life prediction model; and inputting the test set into the verified lithium battery life prediction model to obtain a life prediction result of the lithium battery. According to the method, the parallel attention mechanism Transform neural network is adopted, and the effect of accurately predicting the remaining service life of the lithium battery can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of lithium battery life prediction, and more specifically to a life prediction method based on lithium battery characteristic relationship and parallel attention. Background Art

[0002] Lithium batteries are one of the most common power batteries and are widely used in new energy vehicles, energy storage and other fields. An important part of ensuring the long-term safety of industrial production is life prediction. Once a lithium battery fails, it will cause huge economic and time losses, and may even cause major accidents or casualties. Therefore, in order to prevent this situation, it is crucial to pursue a complete life prediction method. During the operation of lithium batteries, capacity decay is an inevitable phenomenon. For electric vehicles, when the battery capacity drops below a certain threshold, the battery needs to be replaced or repaired to prevent battery failure. Therefore, in-depth exploration of the relationship between the degradation characteristics of lithium batteries at different time nodes has become a key factor in realizing lithium battery life prediction.

[0003] Transformer neural network is a deep learning method currently widely used in data mining. It uses the self-attention mechanism to capture the long-term dependencies between elements in the sequence, extracts features from the relationship between time series, and continuously learns the features through the neural network to achieve tasks such as sequence prediction. For lithium battery life prediction, Transformer neural network can effectively extract the relationship between lithium battery degradation features and achieve the task of life prediction. However, in reality, the amount of data is huge, and the relationship between lithium battery degradation features is complex. The general Transformer neural network cannot fully mine the feature relationship for lithium battery life prediction and cannot meet satisfactory requirements.

[0004] Therefore, how to provide a life prediction method based on lithium battery feature relationships and parallel attention, and use the parallel attention mechanism Transformer neural network to accurately predict the remaining service life is an urgent problem that technical personnel in this field need to solve. Summary of the invention

[0005] In view of this, the present invention provides a life prediction method based on lithium battery feature relationship and parallel attention, and adopts parallel attention mechanism Transformer neural network to achieve the effect of accurately predicting the remaining service life of lithium batteries.

[0006] In order to achieve the above object, the present invention adopts the following technical solution: a life prediction method based on lithium battery characteristic relationship and parallel attention, comprising: Obtain each time node of the lithium battery and the features corresponding to each time node to generate time series data; Converting the time series data into original feature vectors; Divide the original feature vector into training set, validation set and test set according to a certain ratio; Combine the parallel attention mechanism with the Transformer network to build a lithium battery life prediction model; Inputting the training set into the lithium battery life prediction model for training, optimizing the model parameters, and obtaining the model after initial training; then, continuing to train the model on the same data set, and stopping the training according to the set termination condition, to obtain the trained lithium battery life prediction model; The validation set is input into the trained lithium battery life prediction model for verification, so as to obtain a verified lithium battery life prediction model; The test set is input into the verified lithium battery life prediction model to obtain the lithium battery life prediction result.

[0007] Preferably, converting the time series data into an original feature vector comprises: The time series data is sampled in sections according to a certain sampling interval using the segmented sampling method to obtain multiple subsequences; Concatenate multiple subsequences to generate the original feature vector.

[0008] Preferably, the parallel attention mechanism and the Transformer network are combined to construct a lithium battery life prediction model, including: using the parallel attention mechanism to process the original feature vector to calculate the attention parameter, obtaining a new feature vector according to the attention parameter, and normalizing the new feature vector to obtain the final feature vector; The Transformer network is used to globally accumulate feature variables to obtain node-level features. The features of all time steps are fused with variable features through an iterative process to form a comprehensive feature vector. The feature vector is input into the fully connected network to infer the predicted sequence.

[0009] Preferably, the characteristics of the lithium battery include: discharge capacity, health index and internal resistance, and each characteristic is a characteristic vector composed of the time series variable value of the current time step.

[0010] Preferably, the time series data is segmented and sampled at a certain sampling interval using a segmented sampling method to obtain multiple subsequences, including: For time series data of length H, divide it into C subsequences, and the length of each subsequence is H / C; The original time series is ;Subsequence is defined as follows: ; in, , each subsequence Contains a portion of the original time series data.

[0011] Preferably, multiple subsequences are concatenated to generate an original feature vector, including: Concatenate C subsequences together to get the original feature vector , whose dimensions are , expressed as: ; Among them, the original time series , subsequence , the original feature vector .

[0012] Preferably, the original feature vector is processed by using a parallel attention mechanism to calculate an attention parameter, a new feature vector is obtained according to the attention parameter, and the new feature vector is normalized to obtain a final feature vector, including: By calculating and processing the feature vector, three matrices are generated: query, key, and value; the formula is as follows: ; in, is a trainable parameter, , , is the input dimension; Compute the similarity between the query and the key via a dot product, then scale the similarity to ensure numerical stability; Finally, the Softmax function is applied along the time dimension to convert it into weights; These weights are used to perform a weighted sum of the values ​​to get the output of the attention mechanism.

[0013] Preferably, a Transformer network is used to globally accumulate feature variables to obtain node-level features, and the features of all time steps are fused with variable features through an iterative process to form a comprehensive feature vector; the feature vector is input into a fully connected network to infer and obtain a prediction sequence, including: The Transformer feature fusion expression is: ; in, and are the extracted features, Make the model capture and characteristic information; Then use the new features As the input of the decoder, the decoder is used to infer the prediction of the time series, and the loss function is used to complete the prediction of the sequence. The loss function expression is as follows: ; in, Y pre is the prediction result of the model, is the real data, N represents the degradation feature number of lithium battery, T represents the prediction time step, Represents the weight of the loss function.

[0014] Through the above technical solutions, it can be known that compared with the prior art, the present invention discloses a life prediction method based on lithium battery feature relationships and parallel attention, including: obtaining each time node of the lithium battery and the features corresponding to each time node to generate time series data; converting the time series data into original feature vectors; dividing the original feature vectors into training sets, validation sets and test sets according to a certain ratio; combining the parallel attention mechanism with the Transformer network to construct a lithium battery life prediction model; inputting the training set into the model for training, optimizing the model parameters, and obtaining a preliminary training model; then, inputting the training data into the preliminary model again, and using the set or iterative rounds as the stop condition until the model converges to obtain a trained lithium battery life prediction model; inputting the validation set into the trained lithium battery life prediction model for verification to obtain a verified lithium battery life prediction model; inputting the test set into the verified lithium battery life prediction model to obtain a lithium battery life prediction result. The present invention has the following beneficial effects: 1. The present invention establishes a parallel attention mechanism Transformer neural network model, which focuses on predicting the remaining service life of lithium batteries and converts the original data structure into a time series feature vector to reflect the data relationship between each time step. The parallel attention mechanism Transformer neural network is used to learn the feature vector and successfully mine the correlation between lithium battery features at different time steps, thereby achieving effective prediction of life.

[0015] 2. The present invention uses a parallel attention mechanism to mine the relationship between the degradation features of lithium batteries at each time node, and uses a parallel attention mechanism Transformer method to realize the life prediction of lithium batteries; first, the variable encoding layer uses the attention mechanism to identify the importance of degradation features along the feature dimension, and the time encoding layer uses the attention mechanism to capture information along the time dimension. The two layers use a parallel structure to collaboratively process the information of different features in the feature vector, and then set new weights for each degradation feature at different time steps, which can not only more effectively capture the relationship between different time steps, but also reduce the impact of noise; secondly, through the parallel attention mechanism Transformer network, time attention and variable attention are used to explore the feature vector respectively, which more accurately aggregates the features of each element in the multi-set, so that the time information of the feature vector and its variable correlation can be analyzed, and the sequence prediction is completed, thereby realizing the life prediction of lithium batteries under large-scale data. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0017] Figure 1 A flow chart of a life prediction method based on lithium battery characteristic relationship and parallel attention provided in an embodiment of the present invention.

[0018] Figure 2 Schematic diagram of the parallel attention mechanism Transformer provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0020] The embodiment of the present invention discloses a life prediction method based on lithium battery characteristic relationship and parallel attention, such as Figure 1 As shown, including: Obtain each time node of the lithium battery and the features corresponding to each time node to generate time series data; Converting the time series data into original feature vectors; The original feature vector is divided into training set, validation set and test set in a certain ratio of 8:1:1.

[0021] Combine the parallel attention mechanism with the Transformer network to build a lithium battery life prediction model; Inputting the training set into the lithium battery life prediction model for training, optimizing the model parameters, and obtaining the initially trained model; then, continuing to train the initially trained model on the same data set, and stopping the training according to a set termination condition (taking a set number of iterations as the stopping condition until the model converges), and obtaining a trained lithium battery life prediction model; The validation set is input into the trained lithium battery life prediction model for verification, so as to obtain a verified lithium battery life prediction model; The test set is input into the verified lithium battery life prediction model to obtain the lithium battery life prediction result.

[0022] Specifically, the specific process of optimizing model parameters includes: The design adopts Loss and Loss joint loss function, its formula is as follows: ; in, Represents the prediction result of the model, represents the true label, S represents the prediction step length, and Represents the weight of Loss. Finally, in order to ensure that the RUL prediction depends only on previous data points, a shielding mechanism is adopted in the self-attention calculation to achieve long-term prediction of battery RUL.

[0023] Specifically, converting the time series data into an original feature vector includes: The time series data is sampled in sections according to a certain sampling interval using the segmented sampling method to obtain multiple subsequences; Concatenate multiple subsequences to generate the original feature vector. Concatenate the feature vectors of multiple subsequences according to the segmented sampling characteristics to generate the original feature vector; Specifically, the parallel attention mechanism and the Transformer network are combined to construct a lithium battery life prediction model, including: the time step variable encoding block stage and the feature fusion stage; The time step variable encoding block stage includes: processing the original feature vector using a parallel attention mechanism to calculate the attention parameters, obtaining a new feature vector based on the attention parameters, and normalizing the new feature vector to obtain the final feature vector; these final feature vectors will then enter the feature fusion stage as input.

[0024] The feature fusion stage includes: using the Transformer network to globally accumulate feature variables to obtain node-level features, fusing the features of all time steps with variable features through an iterative process to form a comprehensive feature vector, and inputting the feature vector into the decoder for inference to generate a prediction sequence.

[0025] In a specific embodiment of the present invention, the variable encoding layer: First, the variable encoding layer inputs the feature Mapping to query matrix , key matrix Sum Matrix , the specific mapping process is as follows: ; in, , and are the trainable parameters of the variable encoding layer, ,in , represents the feature dimension, Represents the input dimension.

[0026] Secondly, according to the mapping process, the attention weight of each feature at time step f is calculated by scaling the dot product and normalization. The specific calculation is as follows: ; in, .

[0027] Third, these attention weights For the pair matrix Weighted, we get the self-attention output of the feature dimension: ; In addition, in order to enhance the representation ability of the neural network, the variable encoding layer adopts a multi-head self-attention mechanism to decompose the input into multiple subspaces and calculate the number of attention output heads for each subspace in parallel: ; in, is the linear transformation matrix, and z is the number of attention heads.

[0028] Time step encoding layer: First, the time step encoding layer takes the input features Mapping to query matrix , key matrix Sum Matrix , as shown below: ; in, , and are the trainable parameters of the variable encoding layer, ,in .

[0029] Secondly, the attention weight is calculated along the time dimension, and the formula is as follows: ; in, .

[0030] Third, using these weights , which produces a self-attention output in the time dimension: ; The formula of its multi-head self-attention can be expressed as: ; in, is the linear transformation matrix, and j is the number of attention heads.

[0031] The extracted features are recorded as , , and its corresponding weight is based on and Then, the fusion layer calculates the new feature vector as follows: ; in, Represents a new feature vector. Finally, the above feature vectors are combined to form a new feature map. Layer normalization is used to standardize and integrate the initial feature representation, thereby enhancing the exploration of time dependencies within the feature vector and correlations between variables.

[0032] Specifically, the characteristics of lithium batteries include: discharge capacity, health index and internal resistance, and each feature is a feature vector composed of the time series variable value of the current time step.

[0033] Specifically, the time series data is sampled in segments according to a certain sampling interval using a segmented sampling method to obtain multiple subsequences, including: Mathematically, segmented sampling is defined as follows: for a time series data of length H, it is divided into C subsequences, each of which has a length of H / C; The original time series is ;Subsequence is defined as follows: ; in, , each subsequence Contains a portion of the original time series data.

[0034] Specifically, the feature vectors of multiple subsequences are concatenated according to the segmented sampling characteristics to generate the original feature vector; including: Concatenate C subsequences together to get the original feature vector , whose dimensions are , expressed as: ; Among them, the original time series , subsequence , the original feature vector .

[0035] Specifically, the visualization process of the parallel attention mechanism Transformer algorithm is as follows Figure 2 As shown, the variable attention in the time step variable encoding block stage processes the feature vector by calculation to generate three matrices (query, key, value): ; in, is a trainable parameter, , , It is the input dimension. The similarity between the query and the key is calculated by dot product, and then this similarity is scaled to ensure numerical stability. Finally, the Softmax function is applied along the variable dimension to convert it into a weight. The specific expression is as follows: ; in, , these weights are used to perform weighted summation on the value to obtain the output of the attention mechanism. The specific expression is as follows: ; Among them, the multi-head self-attention mechanism is adopted to allow the model to pay attention to information from different positions. Its specific expression is as follows: ; Among them, the parameter matrix , h is the number of longs, .

[0036] Specifically, the original feature vector is processed and calculated using a parallel attention mechanism to obtain an attention parameter, a new feature vector is obtained according to the attention parameter, and the new feature vector is normalized to obtain the final feature vector, including: The time-step self-attention in the time-step variable encoding block stage processes the feature vector by calculation to generate three matrices: query, key, and value; the formula is as follows: ; in, is a trainable parameter, , , is the input dimension; Compute the similarity between the query and the key via a dot product, then scale the similarity to ensure numerical stability; Finally, the Softmax function is applied along the time dimension to convert it into weights; its expression is as follows: ; in, , ; These weights are used to perform a weighted sum of the values ​​to obtain the output of the attention mechanism, which is expressed as follows: ; Among them, the multi-head self-attention mechanism is adopted to allow the model to pay attention to information from different positions. Its specific expression is as follows: ; Among them, the parameter matrix , It is a long number. .

[0037] Specifically, in the feature fusion stage, the embodiment of the present invention uses a parallel attention mechanism Transformer network feature variable to perform global accumulation to obtain node-level features, and fuses the features of all time steps and variable features through an iterative process to form a comprehensive feature vector; the feature vector is input into a fully connected network to infer and obtain a prediction sequence, including: The Transformer feature fusion expression is: ; in, and are the extracted features, Make the model capture and characteristic information; Then use the new features As the input of the decoder, the decoder is used to infer the prediction of the time series, and the loss function is used to complete the prediction of the sequence. The loss function expression is as follows: ; in, Y pre is the prediction result of the model, is the real data, N represents the degradation feature number of lithium battery, T represents the prediction time step, Represents the weight of the loss function.

[0038] Specifically, in the model training step, the number of inputs is set to 50 and the number of internal iterations is set to 500.

[0039] In a specific embodiment of the present invention, the validity verification process of the lithium battery life prediction method is as follows: First, the raw lithium battery characterization data was collected. These batteries all adopted the same charging scheme, specifically the standard constant current / constant voltage (CC / CV) scheme; the constant current rate was 0.5C until the voltage reached 4.2V, and then maintained at 4.2V until the charging current dropped below 0.05A. The discharge cut-off voltage of these batteries was set to 2.7V.

[0040] Secondly, in the embodiment, the specific parameter settings are shown in Table 1. The initial learning rate and epoch are 0.001 and 500 respectively. The split ratio of the training data set, the validation data set, and the test data set is 8:1:1. If the accuracy of the validation data set is not improved, the update of the training model will stop after 50 patience values.

[0041] Table 1 Example parameter settings

[0042] Finally, we used the data for a complete experimental verification, obtained an effective feature vector using segmented sampling, applied the attention mechanism to the obtained weighted matrix, and finally used the parallel attention mechanism Transformer network to fuse the global features and achieve sequence prediction.

[0043] In order to illustrate the superiority of the proposed method, the proposed method is compared with the other four basic methods. According to the parameter settings in Table 1, the three models are trained and tested respectively. In order to make a fair comparison in the experiment, the number of hidden layers is set to 32 for testing. The relative errors of different methods are shown in Table 2.

[0044] Table 2 Comparison of different models

[0045] From the results of the comparative experiment, it can be found that MLP is difficult to achieve satisfactory results for time series data, while technologies such as LSTM and GRU can achieve the purpose of learning. However, compared with other technologies, the performance of the ParallelTransformer involved is the best, which shows that the method of the present invention fully mines the characteristic relationship of the time series, is more conducive to predicting the time series, and realizes the life prediction of lithium batteries.

[0046] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0047] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A life prediction method based on lithium battery characteristic relationship and parallel attention, characterized in that: include: Obtain each time node of the lithium battery and the features corresponding to each time node to generate time series data; Converting the time series data into original feature vectors; Divide the original feature vector into training set, validation set and test set according to a certain ratio; Combine the parallel attention mechanism with the Transformer network to build a lithium battery life prediction model; Inputting the training set into the lithium battery life prediction model for training, optimizing the model parameters, and obtaining the model after initial training; then, continuing to train the model on the same data set, and stopping the training according to the set termination condition, to obtain the trained lithium battery life prediction model; The validation set is input into the trained lithium battery life prediction model for verification, so as to obtain a verified lithium battery life prediction model; The test set is input into the verified lithium battery life prediction model to obtain the lithium battery life prediction result.

2. A life prediction method based on lithium battery characteristic relationship and parallel attention according to claim 1, characterized in that: The time series data is converted into an original feature vector, including: The time series data is sampled in sections according to a certain sampling interval using the segmented sampling method to obtain multiple subsequences; Concatenate multiple subsequences to generate the original feature vector.

3. The life prediction method based on lithium battery characteristic relationship and parallel attention according to claim 1 is characterized in that: The parallel attention mechanism and the Transformer network are combined to build a lithium battery life prediction model, including: using the parallel attention mechanism to process the original feature vector to calculate the attention parameter, obtaining a new feature vector based on the attention parameter, and normalizing the new feature vector to obtain the final feature vector; The Transformer network is used to globally accumulate feature variables to obtain node-level features. The features of all time steps are fused with variable features through an iterative process to form a comprehensive feature vector. The feature vector is input into the fully connected network to infer the predicted sequence.

4. The life prediction method based on lithium battery characteristic relationship and parallel attention according to claim 1 is characterized in that: The characteristics of lithium batteries include: discharge capacity, health index and internal resistance, and each feature is a feature vector composed of the time series variable value of the current time step.

5. The life prediction method based on lithium battery characteristic relationship and parallel attention according to claim 2 is characterized in that: The time series data is sampled in segments according to the determined sampling intervals using the segmented sampling method to obtain multiple subsequences, including: For time series data of length H, divide it into C subsequences, and the length of each subsequence is H / C; The original time series is ;Subsequence is defined as follows: ; in, , each subsequence Contains a portion of the original time series data.

6. A life prediction method based on lithium battery characteristic relationship and parallel attention according to claim 5, characterized in that: Concatenate multiple subsequences to generate the original feature vector, including: Concatenate the C subsequences together to get the original feature vector , whose dimensions are , expressed as: ; Among them, the original time series , subsequence , the original feature vector .

7. The life prediction method based on lithium battery characteristic relationship and parallel attention according to claim 3 is characterized in that: The original feature vector is processed using a parallel attention mechanism to calculate the attention parameter, a new feature vector is obtained based on the attention parameter, and the new feature vector is normalized to obtain the final feature vector, including: By calculating and processing the feature vector, three matrices are generated: query, key, and value; the formula is as follows: ; in, is a trainable parameter, , , is the input dimension; Compute the similarity between the query and the key via a dot product and then scale the similarity; Finally, the Softmax function is applied along the time dimension to convert it into weights; These weights are used to perform a weighted sum of the values ​​to get the output of the attention mechanism.

8. The life prediction method based on lithium battery characteristic relationship and parallel attention according to claim 1 is characterized in that: The Transformer network is used to globally accumulate feature variables to obtain node-level features. The features of all time steps and variable features are fused through an iterative process to form a comprehensive feature vector. The feature vector is input into the fully connected network to infer the predicted sequence, including: The Transformer feature fusion expression is: ; in, and are the extracted features, Make the model capture and characteristic information; Then use the new features as the input of the decoder, use the decoder to infer the prediction of the time series, and use the loss function to complete the prediction of the sequence; The loss function expression is as follows: ; in, Y pre is the prediction result of the model, is the real data, N represents the degradation feature number of lithium battery, T represents the prediction time step, Represents the weight of the loss function.

Citation Information

Patent Citations

  • Method and system for predicting real-time remaining service life of multi-rotor unmanned aerial vehicle

    CN114757086A

  • Rapid battery life prediction method based on key interval feature extraction

    CN116540101A

  • Transform-based bidirectional self-attention remaining life prediction method

    CN116578944A

  • LSTM machine remaining service life prediction method based on attention mechanism

    CN118094343A

  • Charging station cluster load prediction method and system based on deep fusion of exogenous variables

    CN118504792A

Cited By

  • Health assessment method and system for retired battery

    CN120254648A