Transform and random process-based battery life prediction method

By using the xLSTM-Transformer-WP model and Bayesian optimization algorithm in the RUL prediction of lithium-ion batteries, the prediction problems of long-term dependence and uncertainty during battery degradation are solved, and higher prediction accuracy and model stability are achieved.

CN119881718AInactive Publication Date: 2025-04-25JILIN UNIVERSITY

Patent Information

Application Number
CN202510356560.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-04-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to accurately capture the long-term dependence and uncertainty in the degradation process of lithium-ion batteries, and there are shortcomings in hyperparameter selection and training stability, affecting the accuracy and reliability of RUL prediction.

Method used

Using a battery life prediction method based on Transformer and stochastic processes, the xLSTM network is embedded in the Transformer architecture by constructing the xLSTM-Transformer-WP model, and combining the Wiener process and Bayesian optimization algorithm to improve the model's expression ability and prediction accuracy.

Benefits of technology

Effectively capture the long-distance dependence and timing characteristics during battery degradation, improve the accuracy and generalization ability of RUL prediction, provide reliable uncertainty evaluation, and enhance the robustness and adaptability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119881718A_ABST
    Figure CN119881718A_ABST
Patent Text Reader

Abstract

The invention discloses a battery life prediction method based on Transform and a random process, belongs to the field of battery prediction and health management, combines an extended long-short term memory (xLSTM) network, Transform and a Wiener process (WP), and aims to solve the long-term dependence and uncertainty of a battery degradation process. Comprising the following steps: S1, preprocessing a lithium ion battery data set; and S2, constructing an xLSTM-Transform-WP model, wherein the xLSTM-Transform-WP model comprises an Encoder and a Decoder of a Transform, and an xLSTM network is fused so as to improve the time sequence feature modeling capability. S3, model training and optimization; and S4, battery RUL prediction and uncertainty quantification: evaluating the model by using the test set, deducing a probability density function of the lithium ion battery RUL, and calculating a drift coefficient and a diffusion coefficient of the model. According to the method, the prediction precision and generalization ability of the model are improved, and a decision maker is helped to better understand the uncertainty of a prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of battery prediction and health management, and in particular to a battery life prediction method based on Transformer and random processes. Background Art

[0002] As an efficient, lightweight and rechargeable energy storage device, lithium-ion batteries are widely used in electric vehicles, portable electronic devices and renewable energy storage systems. As the demand for batteries continues to increase, accurately predicting their remaining useful life (RUL) is of great significance to ensuring the safety of equipment operation and optimizing maintenance decisions. Accurate RUL prediction can effectively reduce the occurrence of unexpected failures, optimize maintenance strategies, and determine the degradation trend of batteries in advance, providing a scientific basis for equipment maintenance, life extension and safety management.

[0003] Important information in the battery degradation process often exists in long time series. Traditional RUL prediction methods are difficult to effectively capture the long-term dependence of the degradation process. In addition, the uncertainty in RUL prediction stems from the complexity of the degradation process and data noise. Traditional methods are difficult to provide reliable uncertainty assessments, and uncertainty is crucial for equipment maintenance decisions. Existing models also have shortcomings in hyperparameter selection and training stability. How to improve model performance and its generalization ability under different data and usage conditions through optimization methods remains a key challenge.

[0004] The data-driven method uses historical data of batteries under different usage conditions to predict RUL, which has good adaptability and universality. Common data-driven methods include regression models and deep learning models, which can mine potential degradation laws and characteristics from large amounts of data. In recent years, random process methods (such as Markov processes, Wiener processes, etc.) have also been applied to battery degradation modeling, which can provide more accurate statistical analysis for RUL prediction and quantify uncertainty.

[0005] Among data-driven methods, deep learning, especially neural network-based models, has gradually become a research hotspot for RUL prediction. As classic architectures in deep learning, Transformer and Long Short-Term Memory (LSTM) networks have powerful time series data modeling capabilities. As an improved version of LSTM, Extended Long and Short-Term Memory (xLSTM) can better capture the long-term trends in the battery degradation process by enhancing the modeling capabilities of long-term dependencies; while the Transformer model effectively handles the long-range dependency problems in the battery degradation process through the self-attention mechanism. Therefore, the combination of xLSTM and Transformer can give full play to their respective advantages and improve the accuracy and generalization ability of RUL prediction.

[0006] Bayesian optimization is a global optimization algorithm that approximates the objective function by constructing a proxy model (such as a Gaussian process) and iteratively optimizes based on prior distribution and observed data. It is particularly suitable for complex and computationally expensive function optimization problems, such as hyperparameter tuning.

[0007] The First Hitting Time (FHT) refers to the time when the system degradation state first reaches the failure threshold. Combined with the drift and diffusion characteristics of random processes (such as the Wiener process), the probability density function (PDF) of the remaining life of the lithium-ion battery can be obtained through mathematical derivation, thereby quantifying the uncertainty of the prediction.

[0008] Maximum Likelihood Estimation (MLE) calculates the drift coefficient and diffusion parameter in the random process model by maximizing the likelihood function of the observed data to ensure that the model parameters can accurately characterize the battery degradation process. Summary of the invention

[0009] The purpose of the present invention is to solve the above technical problems and to propose a battery life prediction method based on Transformer and random process, which uses the constant current charging curve data of the battery cycle to predict the battery RUL.

[0010] A battery life prediction method based on Transformer and random process, the steps are as follows:

[0011] S1. Data preprocessing and loading:

[0012] Read a data set containing constant current charging curves of lithium-ion batteries, cycle the batteries using a battery testing system, and perform voltage window sampling on the constant current charging curve data of the batteries in the read data set;

[0013] Normalize the input battery constant current charging curve data;

[0014] S2. Constructing the xLSTM-Transformer-WP model: The model is composed of the Transformer Encoder and Decoder. The xLSTM network is embedded into the Transformer Encoder. The input data processing process is as follows:

[0015] The input lithium-ion battery voltage window sampling data is first linearly mapped through the input embedding layer Input Embedding and converted into a high-dimensional embedding space embed_dim;

[0016] The embedded data is input into the Encoder module of Transformer. The Encoder module models the long-distance dependencies in the data through the Multi-Head Attention mechanism.

[0017] The Encoder module consists of multiple stacked Encoder blocks num_blocks, each of which includes a multi-head self-attention mechanism and an xLSTM layer;

[0018] In the Encoder module, the data is first normalized by LayerNorm; then, the data is nonlinearly transformed through multiple fully connected layers;

[0019] The data output by the Encoder enters the Decoder. The Decoder first processes the features of the Encoder output through multiple multi-head attention mechanism layers, focusing on key time series features and generating the final output sequence.

[0020] Step S3. Model training and optimization: Batch load the normalized battery constant current charging curve data described in step S1 for training and testing.

[0021] Step S4. Battery RUL prediction and uncertainty quantification: The xLSTM-Transformer neural network is used as the Wiener process drift function to model the dynamic behavior of battery degradation. The formula is as follows:

[0022] definition is the degradation index value of the battery at time t, and its mathematical expression that satisfies WP is as follows:

[0023] ;

[0024] in, is the degraded initial value of WP, It is the drift function of WP, i.e., the xLSTM-Transformer model, which is used to fit the degradation trend of the battery components; is the drift coefficient, which is used to describe the degradation differences between different batteries and is subject to the distribution , and represent mean and variance respectively; is the standard Brownian motion, used to describe the random fluctuations of the degradation process; is the diffusion coefficient, which is used to describe the degree of random fluctuation. The fminsearch function in MATLAB can be used to optimize the profile likelihood function and obtain the estimated value of the parameter. The drift coefficient and diffusion coefficient of the model can be calculated by the maximum likelihood estimation method.

[0025] Based on the concept of first-reach time FHT, the approximate expression of the probability density function of the remaining life of lithium-ion batteries is derived. Set w as the failure threshold of the battery, and use the FHT concept to determine the remaining life probability distribution expression; FHT specifically refers to the time taken for the degradation index to reach the failure threshold for the first time, and its mathematical expression is as follows:

[0026] ;

[0027] Among them, inf means that the remaining service life of the battery is the minimum time interval from the current moment to the battery failure;

[0028] The uncertainty quantification results of RUL prediction are further given.

[0029] After training, the model is evaluated using the test set and RMSE and MAPE are calculated.

[0030] The xLSTM described in step S2 is a serially connected mLSTM-sLSTM-mLSTM;

[0031] The mLSTM includes: a memory unit in matrix form, an input gate, a forget gate, an output gate and a state update module;

[0032] The sLSTM includes: an exponential gate mechanism, a normalization layer, an input gate, a forget gate and an output gate.

[0033] The Decoder stacks 2 layers of multi-head attention mechanism and 3 layers of normalization layer. After 3 layers of Dropout, 2 fully connected layers are used to convert the processed sequence output into predicted RUL value.

[0034] Optimizing the hyperparameters of the model described in step S2 using a Bayesian optimization algorithm;

[0035] The Bayesian hyperparameter optimization algorithm comprises the following steps:

[0036] Step 1: Determine the hyperparameters that need to be optimized and their value ranges: for the xLSTM-transformer model, the optimization range of embed_dim is [16, 64], dense_dim is [16, 64], num_heads is [2, 8], dropout_rate is [0.001, 0.3], learning_rate is [0.0001, 0.01], and num_blocks is [2, 4, 6]. The maximum number of optimizations for Bayesian optimization is set to 50;

[0037] Step 2: Define the validation error after model training as the objective function; run the xLSTM-transformer model in each hyperparameter combination, train the model at each hyperparameter sampling point, and calculate the validation error;

[0038] Step 3: Evaluate the xLSTM-transformer model: Test the model performance for each set of hyperparameters and determine the current best parameters. Repeat the optimization process and when the maximum number of optimizations is reached, end the optimization and output the best hyperparameter combination.

[0039] The training and testing are performed in a ratio of 9:1, with a specified look_back value of 64 and a T value of 1 for training and testing; the mean square error is used as the loss function, and the Adam optimizer is used as the optimizer; the number of training epochs=50, the number of batch samples batch_size=64; the optimizer for model training is the Adam algorithm, and the loss function is the mean square error.

[0040] The present invention provides a battery life prediction method based on Transformer and random process. By loading and preprocessing lithium ion constant current charging curve data, an xLSTM-Transformer-WP model is constructed, the xLSTM network is embedded in the Transformer architecture, and the RUL prediction results are generated through the Encoder and Decoder of the Transformer. Then, hyperparameters are tuned through model training and Bayesian optimization, and finally, the prediction uncertainty is quantified based on the WP and FHT concepts, and the probability density function of the remaining life of the lithium battery is output.

[0041] The beneficial effects of the present invention are:

[0042] The present invention improves Transformer based on xLSTM and combines the WP process to build the model xLSTM-Transformer-WP. When predicting the RUL of lithium-ion batteries, the long-distance dependence and uncertainty quantification problems of the RUL prediction process are solved, and the expression ability and prediction accuracy of the model are improved, and the robustness and generalization ability of the overall model are improved. The specific technical advantages are as follows:

[0043] 1. Capturing long-distance dependencies: The xLSTM-Transformer-WP model integrates xLSTM as an encoder based on the Transformer architecture, which can effectively capture the long-distance dependencies and timing characteristics of lithium-ion battery degradation, thereby improving the ability to model complex degradation behaviors.

[0044] 2. Dynamic behavior modeling capability: Using the xLSTM-Transformer network as the drift function can accurately characterize the dynamic behavior of the battery degradation process, significantly improving the prediction accuracy of the model under different working conditions.

[0045] 3. Provide reliable uncertainty assessment: Based on the Wiener process and using the FHT concept, the probability density function approximate expression of the remaining life of lithium-ion batteries is derived, and the uncertainty of the prediction results is quantified, providing a more reliable reference for equipment maintenance decisions.

[0046] 4. Hyperparameter optimization: The model hyperparameters are optimized through the Bayesian optimization algorithm, which effectively improves the performance of the xLSTM-Transformer-WP model and enhances its generalization ability under different lithium-ion battery data sets and usage conditions.

[0047] 5. Strong model stability: The drift coefficient and diffusion coefficient are calculated with the help of the MLE method, which ensures the robustness of the model parameters and further improves the stability and accuracy of the prediction.

[0048] 6. Flexible adaptation to multiple data sets: The xLSTM-Transformer-WP model is highly flexible in design and can adapt to battery degradation data of different types and sizes, providing support for multi-scenario RUL prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is a RUL model structure diagram of a battery life prediction method based on Transformer and random process of the present invention.

[0050] Figure 2 It is an overall flow chart of RUL prediction of a battery life prediction method based on Transformer and random process of the present invention.

[0051] Figure 3 This is the Transformer model structure diagram.

[0052] Figure 4 This is the structure diagram of the multi-head attention mechanism of the Transformer model.

[0053] Figure 5 This is a diagram of the xLSTM and its components.

[0054] Figure 6 It is a Bayesian optimization flowchart.

[0055] Figure 7 It is the charging voltage-capacity curve of lithium-ion battery.

[0056] Figure 8 This is a schematic diagram of the RUL prediction of lithium-ion batteries. DETAILED DESCRIPTION

[0057] Embodiment 1:

[0058] refer to Figure 1 ,The present invention builds a model based on Transformer, the input data is the constant current charging curve data of the battery cycle, data processing is performed by setting voltage window sampling, and batch loading of training data.

[0059] First, the data after voltage window sampling is preprocessed and input into the embedding layer, combined with positional encoding as input, and enters the Transformer encoder part. In the Transformer encoder, the input data is feature extracted through the Multi-head Self-Attention (MHSA) mechanism and the xLSTM layer.

[0060] The xLSTM layer contains mLSTM and sLSTM units, which respectively improve the model's temporal feature capture capability and training stability through residual connections and normalization layers (LayerNorm, LN). mLSTM captures long-term dependencies through a matrix memory structure, and sLSTM extracts local features through a scalar memory structure. The output feature dimension of each xLSTM module is further processed through a feedforward network (PF) and passed to the next layer in turn.

[0061] The high-dimensional feature vector output by the encoder is passed to the Transformer decoder. The decoder includes multiple self-attention layers (MHSA), fully connected layers (Linear), normalization layers (LayerNorm), and Dropout layers, which decode the output features of the encoder in a cascaded manner. The output features generated by the decoder are finally transformed into the predicted value RUL through linear transformation.

[0062] refer to Figure 2 The present invention provides a battery life prediction method based on Transformer and random process, comprising the following steps:

[0063] Step S1. Data preprocessing and loading: First, read the constant current charging curve data set containing lithium-ion batteries, and perform data processing from the constant current charging curve data set through voltage window sampling. Normalize the input battery constant current charging curve data and convert the constant current charging curve data into a format suitable for model input.

[0064] Step S2. Construct the xLSTM-Transformer-WP model: It consists of two main parts: Transformer Encoder and Decoder. The xLSTM network is integrated into the Transformer Encoder to improve the time series feature modeling capability. The model first maps the original features to a higher-dimensional embedding space (embed_dim) through the input embedding layer. The RUL prediction results are generated through the Transformer Encoder and Transformer Decoder.

[0065] refer to Figure 3 The xLSTM-Transformer-WP model uses the Transformer network as the overall architecture. The Transformer model includes Encoder and Decoder. The entire Transformer module linearly maps the input features through Input Embedding and converts them into embedding space (embed_dim). Among them, Multi-HeadAttention in the Encoder module helps the model capture long-distance dependencies. Reference Figure 4 , each multi-head self-attention mechanism consists of multiple scaled dot-product attention units. The input data is first mapped into a query vector (Q), a key vector (K), and a value vector (V). In each scaled dot-product attention unit, the query vector is dot-producted with the key vector, and the attention weight is obtained after scaling and Softmax normalization. The attention weight is multiplied by the value vector and the attention output is generated through matrix operations. The outputs of multiple attention heads are concatenated and linearly mapped to generate the final multi-head self-attention mechanism output. The feature expression ability and computational efficiency of the Transformer model are improved.

[0066] The output of the multi-head attention mechanism is input into the xLSTM network, see Figure 5The xLSTM-Transformer model uses xLSTM as the encoder of the Transformer network. The xLSTM layer is used to further model the time series of the output after multi-head attention processing in order to better capture the time series features. The xLSTM architecture includes mLSTM-sLSTM-mLSTM connected in series. The residual connection and layer normalization stabilize the model training process and improve the representation ability of the model. The sLSTM structure introduces exponential gates, normalization, and stabilization; the mLSTM structure increases the storage capacity of the LSTM and converts the storage unit of the LSTM from a scalar Add to Matrix . Finally, the output of the encoder is normalized and passed to two fully connected layers for transformation. Each Encoder module stacks multiple num_blocks, and each encoder has a multi-head self-attention mechanism and an xLSTM layer. The Decoder module generates a target sequence based on the output of the encoder, stacks 2 layers of multi-head attention mechanisms and 3 layers of normalization layers, and after 3 layers of Dropout, uses 2 fully connected layers to convert the processed sequence output into a predicted RUL value.

[0067] Step S3. Model training and optimization: The constant current charging curve data of the battery is processed by setting the voltage window sampling. The training data is loaded in batches, and the first two batteries in the data set are used as the training set, and the last battery is used as the test set. The training and testing are carried out at a ratio of 9:1. The training and testing are carried out according to the specified look_back value of 64 (i.e., the 64 time step data before the current prediction point) and the T value of 1 (i.e., the time point of the next prediction). The mean square error is used as the loss function, and the optimizer uses the Adam optimizer to gradually adjust the model weights and reduce the prediction error. During training, the number of training epochs=50, the number of batch samples batch_size=64; the optimizer optimizer for model training is the adam algorithm, and the loss function is the mean square error. The training set data is input into the proposed model for training. The data flow process is as described in step S2, and the Bayesian optimization algorithm is used to optimize the hyperparameters of the model.

[0068] refer to Figure 6 , the Bayesian hyperparameter optimization algorithm comprises the following steps:

[0069] Step 1: Determine the hyperparameters to be optimized and their value ranges: for the xLSTM-transformer model, the optimization range of embed_dim is [16, 64], dense_dim is [16, 64], num_heads is [2, 8], dropout_rate is [0.001, 0.3], learning_rate is [0.0001, 0.01], batch_size is [16, 32, 64], look_back is [16, 32, 64], and num_blocks is [2, 4, 6]. The maximum number of optimizations for Bayesian optimization is set to 50.

[0070] Step 2: Define the validation error after model training as the objective function. Run the xLSTM-transformer model in each hyperparameter combination, train the model at each hyperparameter sampling point, and calculate the validation error.

[0071] Step 3: Evaluate the xLSTM-transformer model: Test the model performance for each set of hyperparameters and determine the current best parameters. Repeat the optimization process and when the maximum number of optimizations is reached, end the optimization and output the best hyperparameter combination.

[0072] Step S4. Battery RUL prediction and uncertainty quantification: After training, the model is evaluated using the test set and RMSE and MAPE are calculated. Based on WP and combined with the concept of FHT, the probability density function of the RUL of lithium-ion batteries is derived. This part calculates the drift coefficient and diffusion coefficient and quantifies the uncertainty in the prediction process.

[0073] Furthermore, the xLSTM-Transformer neural network is used as the Wiener process drift function to model the dynamic behavior of battery degradation, as follows:

[0074] definition is the degradation index value of the battery at time t, and its mathematical expression that satisfies WP is as follows:

[0075]

[0076] in, is the degraded initial value of WP, It is the drift function of WP, i.e., the xLSTM-Transformer model, which is used to fit the degradation trend of the battery; is the drift coefficient, which is used to describe the degradation differences between different batteries and is subject to the distribution , and represent mean and variance respectively; is the standard Brownian motion, used to describe the random fluctuations of the degradation process; is the diffusion coefficient, which is used to describe the degree of random fluctuation. The fminsearch function in MATLAB can be used to optimize the profile likelihood function to obtain the estimated value of the parameter. The drift coefficient and diffusion coefficient of the model are calculated by the maximum likelihood estimation method.

[0077] In addition, based on the concept of first-reach time (FHT), the approximate expression of the probability density function of the remaining life of lithium-ion batteries is derived, w is set as the failure threshold of the battery, and the remaining life probability distribution expression is determined using the FHT concept. FHT specifically refers to the time taken for the degradation index to reach the failure threshold for the first time, and its mathematical expression is as follows:

[0078]

[0079] Among them, inf means that the remaining service life of the battery is the minimum time interval from the current moment to the battery failure.

[0080] The uncertainty quantification results of RUL prediction are further given.

[0081] The present invention extracts multidimensional features through a multi-layer structure and combines the capabilities of Transformer and xLSTM to accurately capture the long-distance dependence and timing characteristics in the battery degradation process, effectively improving the prediction performance of the RUL of lithium-ion batteries.

[0082] Embodiment 2:

[0083] 1. Prediction data display

[0084] The present invention is experimentally verified on a public dataset (Lu, Jiahuan; Xiong, Rui; Tian, ​​Jinpeng; Wang, Chenxu; Sun, Fengchun (2023), “Battery Degradation Datasets (Two Types of Lithium-ion Batteries)”, Mendeley Data, V1, doi: 10.17632 / v8k6bsr6tf.1). Reference Figure 7, using the #5 dataset, the lithium-ion battery type is GOTION IFP20100140A (nominal capacity 27 Ah, 3 cells). The battery was tested in a 45°C hot chamber and cycled using the ARBIN BT2000 battery test system. In each cycle of the battery, the charging strategy is to charge at a constant current of 1C until the voltage reaches 3.6V, and then maintain at 3.6V until the charging current drops below 1.35A; the discharging strategy is to discharge at a constant current of 1C. Refer to Table 1 for partial charging data of the Cell01 battery in the #5 dataset.

[0085] ;

[0086] In Table 1, Capacity_3.10V-Capacity_3.6V represents the battery charging voltage, Cycle is the number of battery charging cycles, and SOH is the battery health status.

[0087] The constant current charging curve data of the battery is obtained by setting the voltage sampling window and used as the input of the xLSTM-Transformer network for RUL prediction. The formula is as follows:

[0088]

[0089] Where C is the nominal capacity of the battery, is the comprehensive charging capacity of the i-th sampling point, The current and voltage sampling window is from V min Start each time with Sampling step size .

[0090] 2. Display of RUL prediction results

[0091] As shown in Table 2, the results of Bayesian optimization for the #5 dataset are shown. Some network hyperparameters are selected for optimization to obtain better RUL prediction results.

[0092] ;

[0093] The processed data is input into the pre-trained xLSTM-Transformer-WP model after Bayesian optimization according to the prediction process to predict the RUL of lithium-ion batteries. The prediction results are shown in Table 3.

[0094] ;

[0095] It can be seen from Table 3 that the data distribution of the prediction results is basically consistent with the data distribution of the real data. Figure 8As shown, it can be further seen that the xLSTM-Transformer-WP model of the present invention can accurately predict the battery RUL, and the predicted curve is very consistent with the actual curve.

[0096] In order to further demonstrate the effectiveness of the prediction of the present invention, it is compared and analyzed with the LSTM-WP model (long short-term memory network combined with the Wiener process), the bidirectional long short-term memory network (BiLSTM), the Transformer and the xLSTM-Transformer models. For the convenience of comparison, the root mean square error (RMSE) and the mean absolute percentage error (MAPE) are selected as the life prediction performance indicators, and the expressions are as follows:

[0097]

[0098]

[0099] Where n is the number of observation points, is the actual life value of the i-th observation point, is the predicted lifespan value of the ith observation point. The prediction evaluation index results are shown in Table 4.

[0100] ;

[0101] By comparing with other models, the xLSTM-Transformer-WP model shows significant advantages in the task of predicting the remaining useful life of lithium-ion batteries. From the results of the evaluation indicators in the table, the xLSTM-Transformer-WP model outperforms other models in both RMSE and MAPE, especially in the RMSE value of 0.3693, which is significantly lower than the values ​​of other models (such as BiLSTM is 0.6298 and Transformer is 2.7740), showing strong prediction accuracy. In addition, the xLSTM-Transformer-WP also achieved good results in MAPE value (0.3704), which greatly reduced the prediction error compared with BiLSTM (0.5940) and Transformer (2.7887), further indicating that the model has stronger generalization ability and higher accuracy when processing complex time series data.

[0102] These results show that the xLSTM-Transformer-WP model fully combines the advantages of xLSTM and Transformer, can better handle long-term and short-term dependencies while capturing time series features, and effectively solves the uncertainty problem of RUL prediction by combining the Wiener process, so it has better performance in lithium-ion battery RUL prediction. Its advantage is that it can effectively improve the accuracy of the model's prediction of the remaining life of the battery, especially suitable for complex industrial prediction tasks.

Claims

1. A battery life prediction method based on Transformer and random process, characterized by: The steps include: S1. Data preprocessing and loading: Read a data set containing constant current charging curves of lithium-ion batteries, cycle the batteries using a battery testing system, and perform voltage window sampling on the constant current charging curve data of the batteries in the read data set; Normalize the input battery constant current charging curve data; S2. Constructing the xLSTM-Transformer-WP model: The model is composed of the Transformer Encoder and Decoder. The xLSTM network is embedded into the Transformer Encoder. The input data processing process is as follows: The input lithium-ion battery voltage window sampling data is first linearly mapped through the input embedding layer Input Embedding and converted into a high-dimensional embedding space embed_dim; The embedded data is input into the Encoder module of Transformer. The Encoder module models the long-distance dependencies in the data through the Multi-Head Attention mechanism. The Encoder module consists of multiple stacked Encoder blocks num_blocks, each of which includes a multi-head self-attention mechanism and an xLSTM layer; In the Encoder module, the data is first normalized by LayerNorm; then, the data is nonlinearly transformed through multiple fully connected layers; The data output by the Encoder enters the Decoder. The Decoder first processes the features of the Encoder output through multiple multi-head attention mechanism layers, focusing on key time series features and generating the final output sequence. Step S3. Model training and optimization: Batch loading the normalized battery constant current charging curve data described in step S1 for training and testing; Step S4. Battery RUL prediction and uncertainty quantification: The xLSTM-Transformer neural network is used as the Wiener process drift function to model the dynamic behavior of battery degradation. The formula is as follows: definition is the degradation index value of the battery at time t, and its mathematical expression that satisfies WP is as follows: ; in, is the degraded initial value of WP, It is the drift function of WP, i.e., the xLSTM-Transformer model, which is used to fit the degradation trend of the battery components; is the drift coefficient, which is used to describe the degradation differences between different batteries and is subject to the distribution , and represent mean and variance respectively; is the standard Brownian motion, used to describe the random fluctuations of the degradation process; is the diffusion coefficient, which is used to describe the degree of random fluctuation. The fminsearch function in MATLAB is used to optimize the profile likelihood function to obtain the estimated value of the parameter. The drift coefficient and diffusion coefficient of the model are calculated by the maximum likelihood estimation method.

2. The method for predicting battery life based on Transformer and random process according to claim 1, characterized in that: Based on the concept of first-reach time FHT, the approximate expression of the probability density function of the remaining life of lithium-ion batteries is derived. Set w as the failure threshold of the battery, and use the FHT concept to determine the remaining life probability distribution expression; FHT specifically refers to the time taken for the degradation index to reach the failure threshold for the first time, and its mathematical expression is as follows: ; Among them, inf means that the remaining service life of the battery is the minimum time interval from the current moment to the battery failure; The uncertainty quantification results of RUL prediction are further given.

3. A battery life prediction method based on Transformer and random process according to claim 1 or 2, characterized in that: The xLSTM described in step S2 is a serially connected mLSTM-sLSTM-mLSTM; The mLSTM includes: a memory unit in matrix form, an input gate, a forget gate, an output gate and a state update module; The sLSTM includes: an exponential gate mechanism, a normalization layer, an input gate, a forget gate and an output gate.

4. The method for predicting battery life based on Transformer and random process according to claim 3, characterized in that: The Decoder stacks 2 layers of multi-head attention mechanisms and 3 layers of normalization layers; after 3 layers of Dropout, 2 fully connected layers are used to convert the processed sequence output into a predicted RUL value.

5. The method for predicting battery life based on Transformer and random process according to claim 4, characterized in that: Optimizing the hyperparameters of the model described in step S2 using a Bayesian optimization algorithm; The Bayesian hyperparameter optimization algorithm comprises the following steps: Step 1: Determine the hyperparameters that need to be optimized and their value ranges: the optimization range of embed_dim for the xLSTM-transformer model is [16, 64], dense_dim is [16, 64], num_heads is [2, 8], dropout_rate is [0.001, 0.3], learning_rate is [0.0001, 0.01], and num_blocks is [2, 4, 6]; the maximum number of optimizations for Bayesian optimization is set to 50; Step 2: Define the validation error after model training as the objective function; run the xLSTM-transformer model in each hyperparameter combination, train the model at each hyperparameter sampling point, and calculate the validation error; Step 3: Evaluate the xLSTM-transformer model: Test the model performance for each set of hyperparameters and determine the current best parameters; repeat the optimization process, and when the maximum number of optimizations is reached, end the optimization and output the optimal hyperparameter combination.

6. A battery life prediction method based on Transformer and random process according to claim 4 or 5, characterized in that: The training and testing are performed in a ratio of 9:1, with a specified look_back value of 64 and a T value of 1 for training and testing; the mean square error is used as the loss function, and the Adam optimizer is used as the optimizer; the number of training epochs=50, the number of batch samples batch_size=64; the optimizer for model training is the Adam algorithm, and the loss function is the mean square error.

7. The method for predicting battery life based on Transformer and random process according to claim 6, characterized in that: After training, the model is evaluated using the test set and RMSE and MAPE are calculated.

Citation Information

Patent Citations

  • Lithium ion battery residual life prediction method and system based on temperature acceleration factor

    CN113761751A

  • Lithium battery residual life prediction method based on cubic polynomial function

    CN116804712A

  • Power battery pack RUL estimation method based on extensible long short-term memory network

    CN118731703A

  • Lithium battery life prediction method based on SVMD-Transform-LSTM fusion algorithm

    CN119128483A

  • Lithium battery residual life prediction method fusing physical mechanism and uncertainty characterization

    CN119167751A

Cited By

  • Lithium battery residual life real-time prediction method based on dynamic uncertainty modeling

    CN120254651A

  • Real-time prediction method of remaining life of lithium batteries based on dynamic uncertainty modeling

    CN120254651B

  • Method for predicting residual life of lithium battery of electric vehicle based on variational mode decomposition hybrid model

    CN120468696A

  • Fatigue performance analysis system for friction stir welding head

    CN120509329A

  • A fatigue performance analysis system for friction stir welding joints

    CN120509329B