Battery remaining life prediction method and equipment based on adaptive multiple scales

By adopting an adaptive multi-scale method in the residual life prediction of lithium batteries, combining the gated network and multi-layer perceptron model of the trend-aware layer and the multi-scale perception layer, the existing prediction methods have low accuracy and poor generalization under complex nonlinear relationships and noise interference, achieving high accuracy and early prediction effects.

CN119667487APending Publication Date: 2025-03-21ZHEJIANG UNIV

Patent Information

Application Number
CN202411754614.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The existing residual life prediction methods of lithium batteries have low accuracy when dealing with complex nonlinear relationships and noise interference, and it is difficult to achieve prediction results with high early life prediction and high generalization.

Method used

Adaptive multi-scale battery residual life prediction method is adopted, and the trend-aware layer and multi-scale perception layer are combined with the gated network and multi-layer perceptron model to extract complex battery life decay trends and multi-scale characteristics, and long-term dependencies and local fluctuations are captured through the blocking mechanism.

Benefits of technology

It improves the accuracy and generalization of the remaining life expectancy of lithium batteries, realizes the prediction of the early life of the battery to be tested, and reduces the impact of noise interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119667487A_ABST
    Figure CN119667487A_ABST
Patent Text Reader

Abstract

The invention discloses a battery remaining life prediction method based on adaptive multi-scale, and the prediction method constructs a data set for training based on the capacity sequence of batteries of the same model, does not use the early data of a to-be-detected battery, can achieve the prediction of the early life of the to-be-detected battery, and is higher in practicality. Besides, sensing of the complex battery life attenuation trend is realized through a gating network in the trend sensing layer and a plurality of parallel multi-layer perceptron models, and self-adaptive multi-scale feature extraction is realized through a gating network in the multi-scale sensing layer and a plurality of parallel partitioned multi-layer perceptron models. In-block and inter-block features are captured and fused through a blocking mechanism to sense the long-term dependency relationship of battery capacity fading and local fluctuation caused by a capacity regeneration phenomenon, so that the accuracy and generalization of a battery residual life prediction model are improved; the invention also provides a battery residual life prediction device based on self-adaptive multi-scale, which is used for predicting the residual life of the battery.
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 in particular to a method and device for predicting remaining battery life based on adaptive multi-scale. Background Art

[0002] Lithium batteries are widely used in energy storage systems, electric vehicles, portable electronic devices, and medical equipment due to their high energy density, long life, and light weight. However, as the number of uses increases, the active substances inside the battery decrease, the impurities increase, and the crystal structure changes, resulting in battery capacity decay and performance degradation. It is generally believed that the battery life ends when the battery capacity decays to 70% to 80% of the nominal capacity. Therefore, accurately predicting the remaining life of the battery is of great significance for correctly estimating the battery status and preventing and reducing the occurrence of battery safety accidents.

[0003] Existing battery remaining life prediction methods are mainly divided into model-driven methods and data-driven methods. Among them, the model-driven method derives the battery performance degradation mechanism by analyzing the physical and chemical reactions inside the battery, and then establishes a mathematical model of battery life degradation to predict the degradation changes of battery performance. However, the model-driven method requires a large number of physical and chemical reaction derivations and has high computational complexity. At the same time, due to the differences in the internal states and reaction mechanisms of different batteries, the model-driven method often requires repeated estimation and calibration of model parameters.

[0004] The data-driven method predicts the battery life by learning the decay law of battery capacity as the number of charge and discharge cycles increases. Therefore, the data-driven method can predict the remaining battery life by relying only on battery aging data, which has better adaptability and flexibility. In recent years, with the continuous development of deep learning technology, various data-driven battery life prediction methods have emerged.

[0005] However, during the use of lithium batteries, due to the capacity regeneration phenomenon and the existence of random interference, the battery capacity attenuation change and the number of charge and discharge cycles show a complex nonlinear relationship, resulting in poor prediction accuracy of the time series prediction model under a single time scale. Some battery life prediction studies have proposed the method of modal decomposition to decompose the battery capacity series into high-frequency components and low-frequency components, thereby reducing noise interference, and capturing the battery capacity attenuation trend and capacity regeneration phenomenon respectively, and finally predicting the battery life through superposition fusion. However, these methods usually use the historical capacity data of the battery to be tested for training to predict the remaining life, making early life prediction difficult to achieve and resulting in low generalization of the model. At the same time, in the process of modal decomposition data reconstruction, the components of different frequencies may influence and interfere with each other, resulting in the reconstruction result not matching the original data, and will amplify the error introduced in the decomposition process, seriously affecting the final prediction result.

[0006] In addition, some studies have extracted deep multi-scale features through convolutional neural networks (CNNs) with different receptive fields to predict the remaining life of the battery. For example, Reference 1 (Remaining life prediction method for energy storage lithium-ion batteries based on multi-scale features of recursive graphs) proposes a remaining life prediction method for lithium-ion batteries based on multi-scale features of recursive graphs to address the limitations of extracting key degradation features from one-dimensional state signals. By constructing a deep learning multi-scale feature extraction architecture, the time dimension changes of the same voltage region in multiple cycles and the spatiotemporal evolution of the recursive images of the spatial dimension between adjacent voltage regions are identified through a receptive field of variable size, and then deep multi-scale features are extracted to achieve mapping modeling from multi-scale features to remaining life. However, this convolution-based method focuses on intra-block features, lacks perception of global features and long-term dependencies, and has low prediction accuracy.

[0007] The invention application with the publication number CN116381517A discloses a method for predicting the probability of the remaining life of a lithium battery based on a temporal convolutional attention mechanism. The method uses an attention layer as the core and combines multiple convolutional layers and layer normalization to form a basic module. The hierarchical structure of the position encoding layer, the linear connection layer and multiple basic modules stacked together constitute a complete battery capacity decay deep learning framework. The capacity values ​​of multiple future charge and discharge cycles are predicted based on the battery's historical voltage, current, temperature and time data and the battery capacity decay deep learning framework. This method compensates for the problem of the lack of global features in the convolution method through the attention mechanism, but the prediction model based on the battery's historical voltage, current, temperature and time data has limited prediction capabilities for battery life. When the predicted capacity does not reach the end-of-life threshold, it cannot automatically continue to make further predictions. At the same time, recent studies have shown that for data with more noise in the original data, the Multi-Layer Perceptron (MLP) is superior to the attention mechanism in time series prediction. Summary of the invention

[0008] The purpose of the present invention is to provide a method for predicting the remaining battery life based on adaptive multi-scale. Through a gating network based on sequence trends and multiple parallel multi-layer perceptrons in a trend perception layer, the perception of complex battery life attenuation trends is realized. Through a gating network and multiple parallel expert models in the multi-scale perception layer, adaptive multi-scale feature extraction is realized. The features within and between blocks are captured and integrated through a blocking mechanism to perceive the long-term dependency of battery capacity attenuation and the local fluctuations caused by capacity regeneration, thereby improving the accuracy and generalization of battery remaining life prediction.

[0009] To achieve the above-mentioned purpose of the invention, an embodiment provides a method for predicting the remaining battery life based on adaptive multi-scale, comprising the following steps:

[0010] Step 1: Obtain battery capacity data of multiple charge and discharge cycles of the same model of lithium battery from the beginning of use to the end of life and construct a battery capacity dataset;

[0011] Step 2: Construct a battery remaining life prediction model based on adaptive multi-scale, which includes a trend perception layer, a multi-scale perception layer and a prediction layer;

[0012] The trend perception layer is used to embed the input capacity sequence of the past charge and discharge cycles of the battery based on trend perception to obtain the final embedding feature;

[0013] The multi-scale perception layer is used to extract multi-scale features from the final embedded features through multiple multi-scale modules in sequence to obtain multi-scale features;

[0014] The prediction layer predicts and obtains the capacity sequence of future charge and discharge cycles based on multi-scale features;

[0015] Step 3: Use the battery capacity dataset to train an adaptive multi-scale battery remaining life prediction model to predict the battery remaining life.

[0016] In one embodiment, the step 1 of constructing the battery capacity data set includes: dividing the battery capacity data into a sequence X={s1, s2, s3, ..., s t} as the input sequence, and the battery capacity data of the next l charge and discharge cycles Y = {s t+1 ,s t+2 ,…,s t+l} as the expected output sequence, construct a battery capacity data set, then select part of the battery capacity data set as the training set and the rest as the test set, and obtain the capacity threshold of battery life termination according to the battery life termination standard, where X = {s1, s2, s3, ..., s t} t represents the capacity value of the tth charge-discharge cycle input, Y = {s t+1 ,s t+2 ,…,s t+l} t+l Indicates the expected output capacity value of the t+lth charge and discharge cycle.

[0017] In one embodiment, the trend perception layer described in step 2 includes trend extraction, a gating network of the trend perception layer, multiple parallel expert models and a combiner of the trend perception layer, wherein the expert model of the trend perception layer is a multi-layer perceptron;

[0018] The trend extraction is used to input the capacity sequence X of the battery's past charge and discharge cycles into an average pooling layer with convolution kernels of different sizes to calculate moving averages of different window sizes, and then use a fully connected layer to weight these moving averages to obtain the trend feature X trend ;

[0019] The gating network of the trend perception layer is used to transform the trend feature X trend The weights of each multi-layer perceptron are obtained through the gating network of the trend perception layer;

[0020] The multiple parallel expert models are used to obtain each embedding feature by passing the capacity sequence through each multi-layer perceptron;

[0021] The combiner of the trend perception layer is used to perform weighted integration on each embedding feature based on the weights of each multi-layer perceptron to obtain the final embedding feature.

[0022] In one embodiment, the multi-scale module in step 2 includes a gating network of the multi-scale module, a plurality of parallel expert models and a combiner of the multi-scale module, wherein the expert model of the multi-scale module is a block-based multi-layer perceptron, expressed as a block-based multi-layer perceptron n, where n represents the nth block-based multi-layer perceptron;

[0023] The gating network of the multi-scale module is used to calculate the weights of each block-based multi-layer perceptron based on the input of the multi-scale module, wherein the input of the initial multi-scale module is the final embedded feature, and the input of the subsequent multi-scale module is the multi-scale feature output by the previous multi-scale module;

[0024] The multiple parallel expert models are used to calculate features of different scales respectively through multiple block-based multilayer perceptrons, wherein in the block-based multilayer perceptron n, according to the block size p of the block-based multilayer perceptron n The input of the multi-scale module is divided into blocks to obtain N×p n The feature matrix X of n , then extract local features based on the intra-block multilayer perceptron and global features based on the inter-block multilayer perceptron, and then directly add and fuse the local features and global features to obtain the sequence features at the current time scale;

[0025] The combiner of the multi-scale module is used to weight the sequence features at different scales obtained by each block-based multi-layer perceptron based on the weight of each block-based multi-layer perceptron to obtain sequence features at multiple time scales, where N is the number of blocks after the input of the block-based multi-layer perceptron n is divided into blocks, and N is equal to the input length divided by the block size p n .

[0026] In one embodiment, the method of extracting local features based on intra-block multilayer perceptron and extracting global features based on inter-block multilayer perceptron includes:

[0027] In the multilayer perceptron within the block, the feature matrix X n Each row of is input into the multi-layer perceptron in turn to obtain the intra-block features, and then the intra-block features of each block are concatenated to obtain the local features;

[0028] In the inter-block multilayer perceptron, the feature matrix X n After transposition, the data is input into a multi-layer perceptron to obtain inter-block features, and then the inter-block features are transposed and flattened into a one-dimensional vector to obtain global features.

[0029] In one embodiment, the training described in step 3 is based on an adaptive multi-scale battery remaining life prediction model, including: initializing model parameters, converting the input sequence X in the training set into {s1, s2, s3, ..., s t}Input into the battery remaining life prediction model and obtain the output Based on the input X={s1, s2, s3, ..., s t}、Output and the expected output Y = {s t+1 ,s t+2 , ..., s t+l} Calculate the loss function, back propagate, and update the parameters until the training round is reached to complete the training of the adaptive multi-scale battery remaining life prediction model, where t represents the capacity sequence length of the input battery's past charge and discharge cycles, X = {s1, s2, s3, ..., s t} t represents the capacity value of the input tth charge and discharge cycle; l represents the predicted capacity sequence length of the battery's future charge and discharge cycles, In represents the capacity value of the t+lth charge and discharge cycle output by the battery remaining life prediction model; Y = {s t+1 ,s t+2 ,…,s t+l} t+l Represents the capacity value of the t+lth charge and discharge cycle as the expected output of the tag.

[0030] In one embodiment, the initialization model parameters include: the input capacity sequence length t of the battery's past charge and discharge cycles, the output capacity sequence length l of the battery's future charge and discharge cycles, the convolution kernel size of the average pooling layer, the number of multi-layer perceptrons in the trend perception layer, the number of hidden layers of the multi-layer perceptrons in the trend perception layer, the number of hidden neurons of the multi-layer perceptrons in the trend perception layer, the number of block-based multi-layer perceptrons in the multi-scale perception layer, and the block size p of each block-based multi-layer perceptron. n , the number of hidden layers of the multilayer perceptron within a block, the number of hidden neurons of the multilayer perceptron within a block, the number of hidden layers of the multilayer perceptron between blocks, the number of hidden neurons of the multilayer perceptron between blocks, the number of training rounds, the learning rate, and the training batch size.

[0031] In one embodiment, the remaining battery life prediction in step 3 includes:

[0032] The input sequence of the test set is input into the trained adaptive multi-scale battery remaining life prediction model to predict the battery remaining life. If the output of the battery remaining life prediction model is If a capacity value in reaches the end-of-life threshold, the battery life is determined to be over. If the output of the battery remaining life prediction model If all capacity values ​​in are above the end-of-life threshold, the input of the battery remaining life prediction model is updated based on the model output, and the prediction is continued based on the updated input until a capacity value in the output of the battery remaining life prediction model reaches the end-of-life threshold, where t represents the capacity sequence length of the input battery's past charge and discharge cycles, and l represents the capacity sequence length of the output battery's future charge and discharge cycles. It represents the capacity value of the t+lth charge and discharge cycle output by the battery remaining life prediction model.

[0033] The present invention also provides a device for predicting the remaining battery life based on adaptive multi-scale, comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to implement a method for predicting the remaining battery life based on adaptive multi-scale when executing the computer program.

[0034] Compared with the prior art, the present invention has the following beneficial effects:

[0035] The method for predicting the remaining battery life based on adaptive multi-scale provided by the present invention, compared with the existing method, constructs a data set based on the capacity sequence of batteries of the same model for model training, instead of using the early data of the battery to be tested for training, which can realize the prediction of the early life of the battery to be tested, and is more practical; in addition, the battery remaining life prediction model realizes the perception of the complex battery life decay trend through the gating network based on the sequence trend in the trend perception layer and multiple parallel multi-layer perceptron models, realizes the extraction of adaptive multi-scale features through the gating network and multiple parallel block multi-layer perceptron models in the multi-scale perception layer, and captures and fuses the features within and between blocks through the blocking mechanism to perceive the long-term dependence of the battery capacity decay and the local fluctuations caused by the capacity regeneration phenomenon, thereby improving the accuracy and generalization of the battery remaining life prediction model; the present invention also provides a battery remaining life prediction device based on adaptive multi-scale, which realizes the battery remaining life prediction method based on adaptive multi-scale. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] 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 are briefly introduced below.

[0037] Figure 1 A flowchart of a battery remaining life prediction method based on adaptive multi-scale;

[0038] Figure 2 It is a structural diagram of a battery remaining life prediction model based on adaptive multi-scale;

[0039] Figure 3 It is a schematic diagram of the structure of a multi-layer perceptron;

[0040] Figure 4 It is a schematic diagram of the structure of the multi-scale module;

[0041] Figure 5 The capacity decay curves of the B0005, B0006, B0007 and B0018 battery groups in the NASA data set;

[0042] Figure 6 Actual and predicted capacity decay curves for the B0018 battery in the NASA dataset. DETAILED DESCRIPTION

[0043] To make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation methods described herein are only used to explain the present invention and do not limit the scope of protection of the present invention.

[0044] In order to improve the accuracy of lithium-ion battery remaining life prediction and the generalization of the prediction model, an embodiment provides a battery remaining life prediction method based on adaptive multi-scale, which realizes the perception of complex battery life decay trends through a gating network based on sequence trends and multiple parallel expert models (i.e., multiple MLP models) in the trend perception layer, realizes the extraction of adaptive multi-scale features through a gating network and multiple parallel expert models (i.e., multiple block-based MLP models) in the multi-scale perception layer, and captures and fuses the features within and between blocks through a block mechanism to perceive the long-term dependence of battery capacity decay and the local fluctuations caused by the capacity regeneration phenomenon. Figure 1 As shown, the method for predicting the remaining battery life based on adaptive multi-scale provided in the embodiment includes the following steps:

[0045] S1. Obtain battery capacity data of multiple charge and discharge cycles of the same model of lithium battery from the beginning of use to the end of life and construct a battery capacity data set.

[0046] In the embodiment, the battery capacity data of multiple charge and discharge cycles of the same type of lithium battery from the beginning of use to the end of life are obtained, and the battery capacity data are divided into a sequence X={s1, s2, s3, ..., s t} as the input capacity sequence, and save the battery capacity data Y={s t+1 ,s t+2 , ..., s t+l}, as the expected output capacity sequence, construct a battery capacity data set, then select part of the battery capacity data set as the training set, and the rest as the test set. At the same time, the capacity threshold of the battery end of life is obtained according to the battery end of life standard; where t represents the capacity sequence length of the input battery's past charge and discharge cycles, X = {s1, s2, s3, ..., s t} t represents the capacity value of the tth charge-discharge cycle; l represents the predicted capacity sequence length of the battery's future charge-discharge cycles, Y = {s t+1 ,s t+2 , ..., s t+l} t+l Indicates the expected output capacity value of the t+lth charge and discharge cycle.

[0047] S2. Construct a battery remaining life prediction model based on adaptive multi-scale, the battery remaining life prediction model includes a trend perception layer, a multi-scale perception layer and a prediction layer;

[0048] The trend perception layer is used to embed the input capacity sequence of the past charge and discharge cycles of the battery based on trend perception to obtain the final embedding feature;

[0049] The multi-scale perception layer is used to extract multi-scale features from the final embedded features through multiple multi-scale modules in sequence to obtain multi-scale features;

[0050] The prediction layer predicts and obtains the capacity sequence of future charge and discharge cycles based on multi-scale features;

[0051] In the embodiment, Figure 2 As shown, an adaptive multi-scale battery remaining life prediction model is constructed, including a trend perception layer, a multi-scale perception layer and a prediction layer.

[0052] In the battery remaining life prediction, firstly, based on the trend perception layer, the capacity sequence X of the past t charge and discharge cycles is calculated as follows: t} as input, where t represents the capacity sequence length of the input battery’s past charge and discharge cycles, X = {s1, s2, s3, ..., s t} t represents the capacity value of the tth charge-discharge cycle; X is input into the trend perception layer, and the average pooling layer with convolution kernels of different sizes is used to calculate the moving averages of different window sizes, and then the fully connected layer is used to weight these moving averages to flexibly extract the trend X in the time series trend , to capture the trend characteristics of different time periods; then the extracted trend X trend The weights of each expert model are calculated by inputting them into the gating network. The expert model in the trend perception layer refers to the multi-layer perceptron model, and the gating network is implemented by the fully connected layer. The capacity sequence is input into each embedded feature obtained from each expert model. Finally, the embedded features are weighted and integrated in the combiner according to the weights of each expert model to obtain the final embedded feature X. emb .like Figure 3 As shown in the figure, the MLP model structure includes two fully connected layers and a ReLU activation function.

[0053] Then X emb Input to the multi-scale perception layer. In this embodiment, the multi-scale perception layer is composed of two layers of multi-scale modules. The multi-scale perception module is composed of a gating network, multiple parallel expert models and a combiner, where the expert model refers to a block-based MLP model. The input of the initial multi-scale module is the final embedded feature, and the input of the subsequent multi-scale module is the multi-scale feature output by the previous multi-scale module.

[0054] like Figure 4As shown in Figure 1, in the multi-scale module, the input is first passed through the gating network of the multi-scale module to calculate the weights of each expert model, and then the features of different scales are calculated respectively through multiple block-based MLP models, and the block-based MLP models have different block sizes. When performing the feature extraction process in the nth block-based MLP model, according to its block size p n Divide the input into blocks and get N×p n The feature matrix X of n , where N is the number of blocks after the input is partitioned in the block-based MLP model n, and N is equal to the input sequence length divided by the block size p n Then, local features are extracted based on the intra-block MLP model and global features are extracted based on the inter-block MLP model. The local features and global features are directly added and fused to obtain the current time scale p n Finally, the sequence features at different scales obtained by each expert model are weighted and integrated based on the weights of each expert through the combiner in the multi-scale module to obtain the sequence features at multiple time scales;

[0055] Among them, local features are extracted based on the intra-block MLP model. Specifically, in the intra-block MLP model, the feature matrix X n Each row of is input into the MLP model in turn to obtain the intra-block features of each block, and then the intra-block features of all blocks are concatenated to obtain the local features of the time series at the current scale; the global features are extracted based on the inter-block MLP model. Specifically, in the inter-block MLP model, the feature matrix X n After transposition, it is input into the MLP model to obtain the inter-block features, and then the inter-block features are transposed and flattened into a one-dimensional vector to obtain the global dependency of the time series.

[0056] The multi-scale features are then input into the prediction layer constructed by the fully connected layer to predict the capacity sequence of future charge and discharge cycles, completing the construction of an adaptive multi-scale battery remaining life prediction model.

[0057] S3. Use the battery capacity dataset to train an adaptive multi-scale battery remaining life prediction model to predict the battery remaining life.

[0058] In the embodiment, the model parameters of the constructed adaptive multi-scale based battery remaining life prediction model are first initialized, wherein the initialized parameters include: the capacity sequence length t of the input battery's past charge and discharge cycles, the capacity sequence length l of the output battery's future charge and discharge cycles, the convolution kernel size of the average pooling layer, the number of multi-layer perceptrons in the trend perception layer, the number of hidden layers of the multi-layer perceptron in the trend perception layer, the number of hidden neurons of the multi-layer perceptron in the trend perception layer, the number of block-based multi-layer perceptrons in the multi-scale perception layer, and the block size p of each block-based multi-layer perceptron.n , the number of hidden layers of the multilayer perceptron within a block, the number of hidden neurons of the multilayer perceptron within a block, the number of hidden layers of the multilayer perceptron between blocks, the number of hidden neurons of the multilayer perceptron between blocks, the number of training rounds, the learning rate and the training batch size;

[0059] After initializing the model parameters, the input sequence X in the training set of the battery capacity dataset is t}Input into the battery remaining life prediction model and obtain the output Based on the input X={s1, s2, s3, ..., s t}、Output and the expected output Y = {s t+1 ,s t+2 , ..., s t+l}Calculate the loss function, back propagate, and update the parameters until the training round is reached to complete the training of the adaptive multi-scale battery remaining life prediction model. The loss function calculation formula is:

[0060]

[0061] Among them, s t+i represents the actual capacity value of the t+ith charge and discharge cycle, It represents the capacity value of the t+ith charge and discharge cycle output by the battery remaining life prediction model, t represents the capacity sequence length of the input battery's past charge and discharge cycles, and l represents the capacity sequence length of the output battery's future charge and discharge cycles.

[0062] The input sequence of the test set is input into the trained adaptive multi-scale battery remaining life prediction model to predict the battery remaining life. If the output of the battery remaining life prediction model is A capacity value in When the end-of-life threshold is reached, the battery life is determined to be over, and the predicted remaining battery life N RUL The battery capacity is s t Decay to capacity value The number of charge and discharge cycles experienced at the end of life.

[0063] If the current output If all capacity values ​​in the sequence are above the end-of-life threshold, the predicted capacity data of l charge-discharge cycles are added to the original input sequence to obtain updated capacity data. The capacity data of the last t charge and discharge cycles As the input of the model update, the prediction is continued based on the updated input until a certain capacity data in the model output reaches the end-of-life threshold, that is, the battery life is considered to have ended, and the prediction is stopped. Among them, t represents the capacity sequence length of the input battery's past charge and discharge cycles, and l represents the capacity sequence length of the output battery's future charge and discharge cycles. In It represents the capacity value of the t+lth charge and discharge cycle output by the battery remaining life prediction model.

[0064] An embodiment also provides a device for predicting remaining battery life based on adaptive multi-scale, comprising a memory and a processor, wherein the memory is used to store a computer program and the processor is used to implement a method for predicting remaining battery life based on adaptive multi-scale when executing the computer program.

[0065] In order to better illustrate the technical effect of the present invention, the remaining life of the lithium battery is predicted.

[0066] In the battery remaining life prediction method, the capacity sequence X={s1, s2, s3, ..., s t} as input, the battery remaining life prediction model outputs the battery capacity sequence of the next l charge and discharge cycles In this embodiment, the input capacity sequence length is set to t==64, and the predicted output capacity sequence length is l==64.

[0067] The architecture of the adaptive multi-scale battery remaining life prediction model is as follows: Figure 2 As shown in the figure, the trend perception layer uses a gating network based on sequence trends and multiple parallel expert models (i.e., MLP models) to achieve embedded representation of the original historical capacity sequence X, thereby flexibly adapting to the complex trend of battery capacity changes and improving the generalization of the model. The number of expert models in the trend perception layer, i.e., the number of MLP models, is set to 4, the number of hidden layers of each MLP is 2, and the number of neurons in each hidden layer is 256.

[0068] First, X is input into the average pooling layer with convolution kernel sizes of 4, 8, and 12 to calculate the moving averages of different window sizes, and then these moving averages are weighted using a fully connected layer to flexibly extract the trend features X in the time series. trend Then the extracted trend feature X trend Input into the gating network to calculate the weights of the four MLP models. Then input X into the four MLP models to obtain the corresponding embedded features. Finally, in the combiner in the trend perception layer, the embedded features are weighted and integrated according to the weights of the four MLP models to obtain the final embedded feature represented as X emb .

[0069] In the multi-scale perception layer, adaptive multi-scale feature extraction is achieved through a gating network and multiple parallel expert models (i.e., a block-based MLP model). The features within and between blocks are captured and fused through a blocking mechanism, thereby realizing the perception of the long-term dependence of battery capacity attenuation and the local fluctuations caused by the capacity regeneration phenomenon.

[0070] The expert model in the two-layer multi-scale perception module is set, that is, the number of block-based MLP models is 4, the number of hidden layers of the intra-block MLP model and the inter-block MLP model is 2, and the number of neurons in the hidden layer is 256.

[0071] The final embedding feature X is emb The data is input into a two-layer multi-scale module for multi-scale perception. Specifically, in the multi-scale perception module, the weights of four block-based MLP models are first calculated through a gating network, and then sequence features of different scales are extracted through four block-based MLP models. Finally, the sequence features of different scales obtained by each expert model are weighted and integrated in the combiner according to the weight of each expert model to obtain multi-scale features.

[0072] The block sizes of the four block-based MLP models in multi-scale module 1 are 2, 4, 8, and 16, respectively, and the block sizes of the four block-based MLP models in multi-scale module 2 are 4, 8, 16, and 32, respectively. Specifically, when performing feature extraction in the nth block-based MLP model, first, according to the block size p of the model, n Divide the input into blocks and get N×p n The feature matrix X of n , where N is the number of blocks, equal to the length of the input sequence of the block-based MLP model n divided by the block size p n Then, the local features are extracted based on the intra-block MLP model and the global features are extracted based on the inter-block MLP model. The local features and the global features are then directly added and fused to obtain the current scale p n The following sequence characteristics.

[0073] The local features are extracted based on the intra-block MLP model. Specifically, in the intra-block MLP model, X n Each row of is input into the MLP model in turn to obtain the intra-block features of each block, and then the intra-block features of all blocks are concatenated to obtain the current scale p n The local features of the time series are extracted based on the inter-block MLP model. Specifically, in the inter-block MLP model, X n After transposition, it is input into the MLP model to obtain the inter-block features of each block, which is then transposed and flattened into a one-dimensional vector to obtain the global dependency of the time series.

[0074] Finally, the multi-scale features are input into the prediction layer constructed by the fully connected layer to obtain the capacity sequence of future charge and discharge cycles, completing the construction of an adaptive multi-scale battery remaining life prediction model.

[0075] After completing the above-mentioned task of building a battery remaining life prediction model based on adaptive multi-scale, the training parameters are initialized: the number of training rounds is 100, the learning rate is 0.001, and the training batch size is 32.

[0076] The B0005, B0006, B0007 and B0018 data sets in the public NASA data set are used as lithium battery data sets. The battery capacity decay curves are as follows: Figure 5 As shown. According to the battery standard given in the data set, the nominal capacity of this type of battery is 2.0Ahr, and the capacity threshold for battery life termination is 1.4Ahr. The battery capacity data is divided into sequences of length t by the moving window method as the input capacity sequence, and the capacity data of the next l charge and discharge cycles corresponding to each input capacity sequence is saved as the expected output capacity sequence to obtain the data set. The data sets B0005, B0006 and B0007 are selected as the training set, and the data set B0018 is selected as the test set.

[0077] The adaptive multi-scale battery remaining life prediction model constructed by training had a loss function of 0.029788, indicating that the model can achieve a high battery capacity prediction accuracy.

[0078] The capacity data of the B0018 battery in the past t charge and discharge cycles are used as the input capacity sequence X = {s1, s2, s3, ..., s t} Input the trained model and get the battery capacity predicted by the model for the next l charge and discharge cycles. The predicted capacity change of B0018 battery is as follows: Figure 6 As shown. From the prediction results, it can be seen that starting from the battery charge and discharge cycle number t = 64, the predicted remaining battery life is 32, the actual remaining battery life is 32, and the absolute error of the remaining battery life obtained by the test is 0, and the prediction error is low. At the same time, the model is trained using the capacity data of the same type of battery instead of the battery to be tested, but it shows high accuracy during testing, which proves that the proposed model has high generalization and can achieve early prediction of the remaining battery life.

[0079] The specific implementation methods described above provide a detailed description of the technical solutions and beneficial effects of the present invention. It should be understood that the above is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, supplements and equivalent substitutions made within the scope of the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for predicting remaining battery life based on adaptive multi-scale, characterized in that: The following steps are involved: Step 1: Obtain battery capacity data of multiple charge and discharge cycles of the same model of lithium battery from the beginning of use to the end of life and construct a battery capacity dataset; Step 2: Construct a battery remaining life prediction model based on adaptive multi-scale, which includes a trend perception layer, a multi-scale perception layer and a prediction layer; The trend perception layer is used to embed the input capacity sequence of the past charge and discharge cycles of the battery based on trend perception to obtain the final embedding feature; The multi-scale perception layer is used to extract multi-scale features from the final embedded features through multiple multi-scale modules in sequence to obtain multi-scale features; The prediction layer predicts and obtains the capacity sequence of future charge and discharge cycles based on multi-scale features; Step 3: Use the battery capacity dataset to train an adaptive multi-scale battery remaining life prediction model to predict the battery remaining life.

2. The method for predicting remaining battery life according to claim 1, characterized in that: The step of constructing the battery capacity data set in step 1 includes: dividing the battery capacity data into a sequence X of length t by a moving window method = {s1, s2, s3, ..., s t } as the input sequence, and the battery capacity data of the next l charge and discharge cycles Y = {s t+1 ,s t+2 , ..., s t+l } as the expected output sequence, construct a battery capacity data set, then select part of the battery capacity data set as the training set and the rest as the test set, and obtain the capacity threshold of battery life termination according to the battery life termination standard, where X = {s1, s2, s3, ..., s t } t represents the capacity value of the tth charge-discharge cycle input, Y = {s t+1 ,s t+2 , ..., s t+l } t+l Indicates the expected output capacity value of the t+lth charge and discharge cycle.

3. The method for predicting remaining battery life according to claim 1, characterized in that: The trend perception layer described in step 2 includes trend extraction, a gating network of the trend perception layer, multiple parallel expert models and a combiner of the trend perception layer, wherein the expert model of the trend perception layer is a multi-layer perceptron; The trend extraction is used to input the capacity sequence X of the battery's past charge and discharge cycles into an average pooling layer with convolution kernels of different sizes to calculate moving averages of different window sizes, and then use a fully connected layer to weight these moving averages to obtain the trend feature X trend The gating network of the trend perception layer is used to transform the trend feature X trend The weights of each multi-layer perceptron are obtained through the gating network of the trend perception layer; The multiple parallel expert models are used to obtain each embedding feature by passing the capacity sequence through each multi-layer perceptron; The combiner of the trend perception layer is used to perform weighted integration on each embedding feature based on the weights of each multi-layer perceptron to obtain the final embedding feature.

4. The method for predicting remaining battery life according to claim 1, characterized in that: The multi-scale module described in step 2 includes a gating network of the multi-scale module, a plurality of parallel expert models and a combiner of the multi-scale module, wherein the expert model of the multi-scale module is a block-based multi-layer perceptron, expressed as a block-based multi-layer perceptron n, where n represents the nth block-based multi-layer perceptron; The gating network of the multi-scale module is used to calculate the weights of each block-based multi-layer perceptron based on the input of the multi-scale module, wherein the input of the initial multi-scale module is the final embedded feature, and the input of the subsequent multi-scale module is the multi-scale feature output by the previous multi-scale module; The multiple parallel expert models are used to calculate features of different scales respectively through multiple block-based multilayer perceptrons, wherein in the block-based multilayer perceptron n, according to the block size p of the block-based multilayer perceptron n The input of the multi-scale module is divided into blocks to obtain N×p n The feature matrix X of n , then extract local features based on the intra-block multilayer perceptron and global features based on the inter-block multilayer perceptron, and then directly add and fuse the local features and global features to obtain the sequence features at the current time scale; The combiner of the multi-scale module is used to weight the sequence features at different scales obtained by each block-based multi-layer perceptron based on the weight of each block-based multi-layer perceptron to obtain sequence features at multiple time scales, where N is the number of blocks after the input of the block-based multi-layer perceptron n is divided into blocks, and N is equal to the input length divided by the block size p n .

5. The method for predicting remaining battery life according to claim 4, characterized in that: The method of extracting local features based on the intra-block multilayer perceptron and extracting global features based on the inter-block multilayer perceptron includes: In the multilayer perceptron within the block, the feature matrix X n Each row of is input into the multi-layer perceptron in turn to obtain the intra-block features, and then the intra-block features of each block are concatenated to obtain the local features; In the inter-block multilayer perceptron, the feature matrix X n After transposition, the data is input into a multi-layer perceptron to obtain inter-block features, and then the inter-block features are transposed and flattened into a one-dimensional vector to obtain global features.

6. The method for predicting remaining battery life according to claim 1, characterized in that: The training described in step 3 is based on an adaptive multi-scale battery remaining life prediction model, including: initializing model parameters, converting the input sequence X in the training set into {s1, s2, s3, ..., s t }Input into the battery remaining life prediction model and obtain the output Based on the input X={s1, s2, s3, ..., s t }、Output and the expected output Y = {s t+1 ,s t+2 , ..., s t+l } Calculate the loss function, back propagate, and update the parameters until the training round is reached to complete the training of the adaptive multi-scale battery remaining life prediction model, where t represents the capacity sequence length of the input battery's past charge and discharge cycles, X = {s1, s2, s3, ..., s t } t represents the capacity value of the input tth charge and discharge cycle; l represents the predicted capacity sequence length of the battery's future charge and discharge cycles, In represents the capacity value of the t+lth charge and discharge cycle output by the battery remaining life prediction model; Y = {s t+1 ,s t+2 , ..., s t+l } t+l Represents the capacity value of the t+lth charge and discharge cycle as the expected output of the tag.

7. The method for predicting remaining battery life according to claim 6, characterized in that: The initialization model parameters include: the input capacity sequence length t of the battery's past charge and discharge cycles, the output capacity sequence length l of the battery's future charge and discharge cycles, the convolution kernel size of the average pooling layer, the number of multi-layer perceptrons in the trend perception layer, the number of hidden layers of the multi-layer perceptrons in the trend perception layer, the number of hidden neurons of the multi-layer perceptrons in the trend perception layer, the number of block-based multi-layer perceptrons in the multi-scale perception layer, and the block size p of each block-based multi-layer perceptron. n , the number of hidden layers of the multilayer perceptron within a block, the number of hidden neurons of the multilayer perceptron within a block, the number of hidden layers of the multilayer perceptron between blocks, the number of hidden neurons of the multilayer perceptron between blocks, the number of training rounds, the learning rate, and the training batch size.

8. The method for predicting remaining battery life according to claim 1, characterized in that: The remaining battery life prediction described in step 3 includes: The input sequence of the test set is input into the trained adaptive multi-scale battery remaining life prediction model to predict the battery remaining life. If the output of the battery remaining life prediction model is If a capacity value in reaches the end-of-life threshold, the battery life is determined to be over. If the output of the battery remaining life prediction model If all capacity values ​​in are above the end-of-life threshold, the input of the battery remaining life prediction model is updated based on the model output, and the prediction is continued based on the updated input until a capacity value in the output of the battery remaining life prediction model reaches the end-of-life threshold, where t represents the capacity sequence length of the input battery's past charge and discharge cycles, and l represents the capacity sequence length of the output battery's future charge and discharge cycles. It represents the capacity value of the t+lth charge and discharge cycle output by the battery remaining life prediction model.

9. A device for predicting remaining battery life based on adaptive multi-scale, comprising a memory and a processor, wherein the memory is used to store a computer program, characterized in that: The processor is used to implement the adaptive multi-scale based battery remaining life prediction method according to any one of claims 1 to 8 when executing the computer program.

Citation Information

Patent Citations

  • Lithium battery residual life probability prediction method based on time convolution attention mechanism

    CN116381517A

Cited By

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

    CN120468696A

  • Lithium battery residual life prediction method and system and terminal equipment

    CN121454336A

  • Lithium battery remaining life prediction method, system and terminal device

    CN121454336B