Lithium battery health state estimation method based on ResAttention-Transform
Through the ResAttention-Transformer-based lithium battery health status estimation method, the problem of insufficient temporal and spatial correlation fusion capability in the existing technology is solved by using Gram hybrid field coding and multi-head attention mechanism, and more accurate lithium battery health status estimation and long-term degradation trend modeling are achieved.
Patent Information
- Application Number
- CN202510468198.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-06-13
AI Technical Summary
The prior art is difficult to effectively integrate the spatiotemporal correlation in the timing data of lithium batteries, resulting in insufficient generalization capabilities under complex operating conditions, and the deep learning model has limited ability to model long-term degradation trends.
The long-term dependence relationship of multivariate time series data is modeled using the ResAttention-Transformer-based lithium battery health status estimation method, and the Gram hybrid field encoding is generated, combining the multi-head attention mechanism of the ResAttention-Transformer model and the Query adaptive masking technology.
The error rate of estimation of the health status of lithium batteries is reduced, the ability to estimate the health status of lithium batteries under complex operating conditions is improved, and the ability to model long-term degradation trends is enhanced.
Smart Images

Figure CN120142985A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of lithium battery management systems, and specifically belongs to a method for estimating the health state of lithium batteries. Background Art
[0002] In recent years, with the continuous growth of the global demand for clean energy and the rapid development of new energy technologies, lithium batteries have been increasingly widely used in many fields such as electric vehicles and energy storage systems. For example, in the field of electric vehicles, lithium batteries have become the main power source, promoting the rapid development of the electric vehicle market; in the energy storage system, they provide important support for balancing energy supply and demand. However, during the use of lithium batteries, their performance will inevitably gradually decline with charge-discharge cycles and the passage of time, which will not only reduce the operating efficiency of the equipment but also may cause safety hazards. In electric vehicles, battery performance degradation may lead to problems such as shortened driving range, weakened power output, and even thermal runaway. Therefore, accurately estimating the health state of the battery is of great importance.
[0003] Estimating the health state of lithium batteries is the core task of the battery management system, and its accuracy directly affects the safety and service life of the equipment. Traditional methods such as electrochemical models and single LSTM / CNN face significant challenges. Time-series data such as current, voltage, and temperature have different physical meanings and change scales, and it is difficult for traditional models to effectively integrate spatio-temporal correlations. Temperature, as a key aging driving factor, is often simplified as a static parameter, resulting in insufficient generalization ability under complex working conditions. The physical model-based method has a high calculation cost and is difficult to meet the requirements of real-time monitoring. The existing deep learning models have limited ability to model the long-term degradation trend. For the existing traditional time-series analysis methods, LSTM and its variants rely on the gating mechanism to capture short-term dependencies but have insufficient ability to model the long-term slow-changing trend of battery degradation. The CNN model extracts local features through the convolutional layer but ignores the global association between multiple variables and is sensitive to mutation behaviors such as sudden temperature rises. The lithium battery health state estimation based on ResAttention-Transformer shows advantages. It operates using excellent deep learning models in the field of image recognition, connects the Transformer encoder, and uses the multi-head attention mechanism to model the long-term dependencies of multi-variable time-series data. At the same time, the calculation complexity is reduced through the Query adaptive masking technology, providing a new idea for lithium battery health state estimation. Summary of the Invention
[0004] The purpose of the present invention is to provide a method for estimating the health state of a lithium battery based on ResAttention-Transformer. By combining the charging current, voltage, and temperature information in a lithium battery pack with different charging strategies, performing Gram mixed field encoding on them to generate image data, importing the data into the ResAttention-Transformer model for training and estimating the health state, and leveraging the estimation advantage of the attention mechanism of Attention in the model to reduce the error rate of estimating the health state of the lithium battery.
[0005] To achieve the above object, the present invention provides a method for estimating the health state of a lithium battery, including:
[0006] Step 1. Generate an image data set by performing Gram mixed field encoding on the current, voltage, and temperature time series data in the publicly available lithium battery charging data.
[0007] Step 2. Divide the generated image data set into a training set and a test set.
[0008] Step 3. Build the backbone network ResAttention-Transformer, set the pre-training parameters, and perform iterative training on the ResAttention-Transformer network model.
[0009] Step 4. Input the image data set of the lithium battery to be measured into the trained ResAttention-Transformer network model and output the estimated result of its health state.
[0010] In Step 1, generate a matrix by calculating the Gram addition field and the Gram subtraction field for the lithium battery time series data, then perform weighted averaging, convert the obtained result into a grayscale image, and generate image data through channel superposition.
[0011] In Step 2, for the image data set generated after preprocessing the lithium battery time series data, divide it into a training set and a test set. The division ratio is in a group of batteries with the same charging strategy. To avoid experimental contingency, perform cross-experiments and use the leave-one-out method for division.
[0012] In Step 3, build the backbone network ResAttention-Transformer, where ResAttentionBlock is different from the traditional ResBlock. The difference lies in that a self-attention mechanism is newly added to the two branches of the ResBlock. By dynamically calculating the internal correlation of the feature map, and then connecting the Transformer encoder to model the temporal dependence relationship, the performance of the model is improved.
[0013] In step 4, the image data test set is input into the trained ResAttention-Transformer model, and the estimated result of its corresponding health state is output. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 FIG. is a schematic flowchart of a method for estimating the health state of a lithium battery based on ResAttention-Transformer proposed by the present invention;
[0015] Figure 2 FIG. is a schematic diagram of the structure of the backbone network model ResAttention-Transformer proposed by the present invention;
[0016] Figure 3 FIG. is a schematic diagram of the internal structure of the core module ResAttentionBlock in ResAttention of the backbone network model proposed by the present invention;
[0017] Figure 4 FIG. is a schematic diagram of the overall process of a method for estimating the health state of a lithium battery based on ResAttention-Transformer of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] The following specific examples are used to illustrate the implementation manners of the present invention.
[0019] Please refer to Figure 1 , a schematic flowchart of a method for estimating the health state of a lithium battery based on ResAttention-Transformer proposed by the present invention.
[0020] As Figure 2 shown, the built backbone network based on ResAttention-Transformer includes three parts, namely the ResAttention network, the Transformer module connected thereto, and the MLP multi-layer perceptron finally connected for estimating the health state of the lithium battery.
[0021] As Figure 3As shown, the constructed backbone network based on ResAttention-Transformer, where ResAttentionBlock is different from the traditional ResBlock. The difference lies in that a self-attention mechanism is newly added to the two branches of ResBlock, and the parameters of Attention in different ResAttentionBlocks are all different. In Attention, Q, K, and V represent query, key, and matching value respectively. By calculating the dot product of Q and K, the similarity is obtained, and based on the similarity, V is weighted and summed to obtain the output result of the adaptive information of the image.
[0022] As Figure 4 shown, the evaluation metrics in the model evaluation include Root Mean Square Error (RMSE), Mean Absolute Percentage Error (MAPE), Mean Absolute Error (MAE), and Coefficient of Determination R 2 as the judgment metrics. The calculation formulas for the above evaluation metrics are as follows:
[0023]
[0024] In the formula, n represents the number of test samples of the lithium battery health state data, y i represents the true value of the health state of the lithium battery in the i-th cycle, represents the health state value estimated by the model, represents the average value of y i .
Claims
1. A lithium battery health state estimation method based on ResAttention-Transformer, characterized in that: The steps include: Step 1. Perform a Grammar Mixture Field Coding process on the time series features of voltage, current, and temperature of the time series data of each lithium battery's charging cycle and convert them into an image dataset. Step 2. Divide the converted image dataset into a test set and a training set according to the leave-one-out-of-each-cell method. Step 3. Build the backbone network ResAttention-Transformer, import the preprocessed lithium battery training set, and perform iterative training on it. Step 4. Input the preprocessed lithium battery test set into the trained ResAttention-Transformer network model and output the estimated results.
2. A lithium battery health status estimation method based on ResAttention-Transformer according to claim 1, characterized in that: The format of lithium battery time series data is [1,128].
3. A lithium battery health status estimation method based on ResAttention-Transformer according to claim 1, characterized in that: The image dataset is generated by Gram mixture field encoding of lithium battery time series data.
4. According to claim 1, a lithium battery health state estimation method based on ResAttention-Transformer is characterized in that: In the deep learning model ResAttention-Transformer, ResAttentionBlock is different from the traditional ResBlock in that a self-attention mechanism is newly added to the binary path of ResBlock to form a three-path process.
5. According to claim 1, a lithium battery health state estimation method based on ResAttention-Transformer is characterized in that: The Transformer network in the model structure is connected to the ResAttention network, and the generated image training set is trained. The test set is input into the trained model to output the estimated result of the health status of the lithium battery.
6. The method for estimating the health status of a lithium battery based on ResAttention-Transformer according to claim 1, characterized in that: The time series characteristics of voltage, current and temperature of the time series data of the charging cycle of the lithium battery include 9 groups of battery sequence data with different charging strategies.