Lithium-ion battery state of health estimation method and device based on transformer model

By combining a multi-head separable log-sparse self-attention layer and an dilated causal convolutional layer to create a lithium-ion battery health state estimation model, the problem of low computational efficiency of the traditional Transformer model for long sequences is solved, and efficient and accurate lithium-ion battery health state estimation is achieved.

CN119902111BActive Publication Date: 2026-03-17XIAMEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Traditional Transformer models are computationally inefficient and complex when dealing with long sequences, and they struggle to capture global information effectively, resulting in insufficient long-term prediction accuracy and generalization ability for lithium-ion battery health state estimation.

Method used

A lithium-ion battery health state estimation model combining a multi-head separable log-sparse self-attention layer and an dilated causal convolutional layer is adopted. The input data is downsampled through a multi-dimensional separation mechanism and processed by the multi-head log-sparse self-attention layer to retain sufficient information content and improve computational efficiency and accuracy.

Benefits of technology

It reduces computational complexity, improves the accuracy of long-sequence prediction and global feature capture capabilities, enhances the model's generalization ability, and achieves accurate lithium-ion battery health state estimation under complex time-series conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902111B_ABST
    Figure CN119902111B_ABST
Patent Text Reader

Abstract

The application discloses a lithium ion battery health state estimation method and device based on a Transformer model, and relates to the technical field of battery health state estimation, and aims to improve the prediction accuracy and reduce the calculation complexity. The application discloses a lithium ion battery health state estimation method and device based on a Transformer model, and relates to the technical field of battery health state estimation, and aims to improve the prediction accuracy and reduce the calculation complexity. The application discloses a lithium ion battery health state estimation method and device based on a Transformer model, and relates to the technical field of battery health state estimation, and aims to improve the prediction accuracy and reduce the calculation complexity. The application discloses a lithium ion battery health state estimation method and device based on a Transformer model, and relates to the technical field of battery health state estimation, and aims to improve the prediction accuracy and reduce the calculation complexity. The application discloses a lithium ion battery health state estimation method and device based on a Transformer model, and relates to the technical field of battery health state estimation, and aims to improve the prediction accuracy and reduce the calculation complexity. The application discloses a lithium ion battery health state estimation method and device based on a Transformer model, and relates to the technical field of battery health state estimation, and aims to improve the prediction accuracy and reduce the calculation complexity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of battery health state estimation, and specifically to a method and apparatus for estimating the health state of lithium-ion batteries based on the Transformer model. Background Technology

[0002] With the continuous growth of global energy demand, especially the rapid development of mobile communications, electric vehicles, aircraft, and electrochemical energy storage, higher demands are being placed on efficient and environmentally friendly energy storage solutions. As a key energy storage component, lithium-ion batteries are well-suited to meet these requirements due to their high energy density, lack of memory effect, low self-discharge rate, and environmental friendliness. However, with increasing usage time, the performance of lithium-ion batteries degrades, including reduced capacity and increased internal resistance. This can lead to internal short circuits or even thermal runaway, resulting in significant safety hazards such as equipment failure or fires. Therefore, accurately estimating the battery's state of health is crucial for ensuring safe battery use.

[0003] Data-driven methods have gained increasing attention due to their lack of involvement in internal mechanisms and their scalability. These methods achieve high accuracy in estimating the state of health (SQH) of lithium-ion batteries by extracting various characteristic parameters from the battery and combining them with machine learning techniques. While data-driven methods are more adaptable than measurement-based and model-based methods, providing accurate estimates under different conditions, they still suffer from low long-term prediction accuracy and poor ability to capture global information. In recent years, the Transformer model has been widely used in lithium-ion battery SQH estimation due to its superior global feature capture ability, efficient parallel computing performance, and sensitivity to long-range dependencies in long-sequence data. However, traditional self-attention is computationally inefficient when processing long sequences; the computational complexity increases quadratically with increasing sequence length, limiting its ability to effectively capture information. Summary of the Invention

[0004] The purpose of this application is to propose a method and apparatus for estimating the state of health of lithium-ion batteries based on the Transformer model, which addresses the aforementioned technical problems.

[0005] In a first aspect, the present invention provides a method for estimating the state of health of lithium-ion batteries based on the Transformer model, comprising the following steps:

[0006] A lithium-ion battery health state estimation model based on the Transformer model is constructed and trained to obtain the trained lithium-ion battery health state estimation model. The lithium-ion battery health state estimation model includes a multi-channel fusion adaptive embedding module, an encoder module, a decoder module, a flattening layer, and a fully connected layer.

[0007] The capacity degradation data of the lithium-ion battery to be predicted is obtained and preprocessed to obtain the preprocessed capacity degradation data.

[0008] The preprocessed capacity degradation data is input into the trained lithium-ion battery health state estimation model. The preprocessed capacity degradation data is divided into first input data and second input data. The first input data is processed by a multi-channel fusion adaptive embedding module to obtain multi-channel features. The multi-channel features are processed by an encoder module to obtain encoded features. The encoded features and the second input data are processed by a decoder module to obtain decoded features. The decoded features are processed by a flattening layer and a fully connected layer to obtain the estimated health state of the lithium-ion battery to be predicted.

[0009] Preferably, the encoder module includes three encoders connected in sequence. Each encoder includes a multi-head separable log-sparse self-attention layer, a dilated causal convolutional layer, and a max-pooling layer connected in sequence. The multi-head separable log-sparse self-attention layer includes a depthwise separable convolutional layer and a log-sparse attention module. The multi-channel fusion adaptive embedding module includes an adaptive embedding layer, a positional embedding layer, a value embedding layer, and a temporal embedding layer. The first input data passes through the adaptive embedding layer to obtain embedded features. The embedded features pass through the positional embedding layer, the value embedding layer, and the temporal embedding layer respectively to obtain positional embedding features, value embedding features, and temporal embedding features, which are then added together to obtain multi-channel features. The multi-channel features are divided into a first input sequence and a second input sequence according to their dimensions. The first input sequence passes through the depthwise separable convolutional layer in the multi-head separable log-sparse self-attention layer of the first encoder, and the second input sequence passes through the log-sparse attention module in the multi-head separable log-sparse self-attention layer of the first encoder.

[0010] As a preferred embodiment, the calculation process for depthwise separable convolutional layers is as follows:

[0011] Θ1=P1×R dep +B dep ×R poi +B poi ;

[0012] Where Θ1 represents the output features of the depthwise separable convolutional layer, P1 represents the first input sequence, and R dep R represents the depthwise convolution kernel matrix. poi B represents the pointwise convolution kernel matrix. dep and B poi These represent the bias matrices for depthwise convolution and pointwise convolution, respectively.

[0013] Preferably, the query matrix Q, key matrix K, and value matrix V of the logarithmic sparse attention module are constructed as shown in the following equation:

[0014] Q = P2W q+PE q ;

[0015] K = P2W k +PE k ;

[0016] V = P2W v +PE v ;

[0017] Where P2 represents the second input sequence, W q W k and W v These are the weight matrices for the query matrix Q, key matrix K, and value matrix V of the log-sparse attention module, respectively, PE. q PE k PE v These are the positional embedding features of the query matrix Q, key matrix K, and value matrix V of the log-sparse attention module, respectively.

[0018] After normalization using the Softmax function, the attention weight matrix A is obtained. ij As shown in the following formula:

[0019]

[0020] Where, d k Let Q be the dimension of the key matrix K. i K represents the vector in the i-th row of the query matrix Q of the log-sparse attention module. j Let J represent the j-th column vector of the key matrix K of the log-sparse attention module;

[0021] The output feature Θ2 of the logarithmic sparse attention module is calculated using the following formula:

[0022]

[0023] Where L is the length of the multi-channel feature, V j This represents the j-th column vector of the value matrix V of the log-sparse attention module;

[0024] The output features of the depthwise separable convolutional layer and the output features of the log-sparse attention module are concatenated to obtain the output features of the multi-head separable log-sparse self-attention layer, as shown in the following equation:

[0025] Θ = Concat[Θ1,Θ2];

[0026] Where Θ represents the output feature of the multi-head separable log-sparse self-attention layer, and Concat represents the concatenation operation.

[0027] Preferably, the output features of the multi-head separable log-sparse self-attention layer are input into the dilated causal convolutional layer, and the convolution operator of the dilated causal convolutional layer is expressed as:

[0028]

[0029] Where Θ is the output feature of the multi-head separable log-sparse self-attention layer, W is the convolution kernel, t is the current time point, k is the size of the convolution kernel, and D is the expansion rate of the convolution kernel.

[0030] The feature map obtained by convolution through the dilated causal convolutional layer is input into the max pooling layer to obtain the output features of the first encoder. The output features of the first encoder are used as the input features of the next encoder. After being processed by two more encoders, the encoded features are obtained.

[0031] Preferably, the decoder module includes a masking layer and a cross-attention layer. The second input data is input to the masking layer to obtain the query matrix of the cross-attention layer. The encoded features are used as the key matrix and value matrix of the cross-attention layer. Through the processing of the cross-attention layer, the decoded features are obtained, as shown in the following formula:

[0032]

[0033] Among them, V de K represents the value matrix of the cross-attention layer. de Q represents the key matrix of the cross-attention layer. de d represents the query matrix of the cross-attention layer. k Y represents the dimension of the key matrix of the cross-attention layer. de This indicates the decoding features.

[0034] Secondly, the present invention provides a lithium-ion battery health state estimation device based on the Transformer model, comprising:

[0035] The model building module is configured to build and train a lithium-ion battery health state estimation model based on the Transformer model, resulting in a trained lithium-ion battery health state estimation model. The lithium-ion battery health state estimation model includes a multi-channel fusion adaptive embedding module, an encoder module, a decoder module, a flattening layer, and a fully connected layer.

[0036] The preprocessing module is configured to acquire the capacity degradation data of the lithium-ion battery to be predicted and perform preprocessing to obtain preprocessed capacity degradation data.

[0037] The prediction module is configured to input preprocessed capacity degradation data into a trained lithium-ion battery health state estimation model. The preprocessed capacity degradation data is divided into first input data and second input data. The first input data is processed by a multi-channel fusion adaptive embedding module to obtain multi-channel features. The multi-channel features are processed by an encoder module to obtain encoded features. The encoded features and the second input data are processed by a decoder module to obtain decoded features. The decoded features are processed by a flattening layer and a fully connected layer to obtain the estimated health state of the lithium-ion battery to be predicted.

[0038] Thirdly, the present invention provides an electronic device including one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any implementation of the first aspect.

[0039] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the implementations of the first aspect.

[0040] Fifthly, the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the method as described in any of the implementations in the first aspect.

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

[0042] (1) The lithium-ion battery health state estimation method based on the Transformer model proposed in this invention combines a multi-head separable log-sparse self-attention layer and an dilated causal convolutional layer, which can reduce the computational complexity and improve the accuracy of long sequence prediction.

[0043] (2) The lithium-ion battery health state estimation method based on the Transformer model proposed in this invention first downsamples the input data through a multi-dimensional separation mechanism, and then processes it through a multi-head logarithmic sparse self-attention layer, thereby retaining sufficient information content, enabling the model to process long sequence inputs and perform accurate lithium-ion battery health state estimation, and can capture global features well under complex time-series conditions, improve computational efficiency, and enhance the generalization ability of the model. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 This is a flowchart illustrating the lithium-ion battery health state estimation method based on the Transformer model, as an embodiment of this application.

[0046] Figure 2 This is a schematic diagram of the structure of the lithium-ion battery health state estimation model, which is an embodiment of the lithium-ion battery health state estimation method based on the Transformer model in this application.

[0047] Figure 3 This is a comparison chart showing the lithium-ion battery health state estimation results based on the Transformer model in this application, with the actual values ​​and estimation results from seven other models, on the CALCE dataset.

[0048] Figure 4 This is a schematic diagram of a lithium-ion battery health state estimation device based on the Transformer model, as an embodiment of this application.

[0049] Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0051] Figure 1 This application illustrates an embodiment of a lithium-ion battery health state estimation method based on the Transformer model, comprising the following steps:

[0052] S1. Construct and train a lithium-ion battery health state estimation model based on the Transformer model to obtain the trained lithium-ion battery health state estimation model. The lithium-ion battery health state estimation model includes a multi-channel fusion adaptive embedding module, an encoder module, a decoder module, a flattening layer, and a fully connected layer.

[0053] In a specific embodiment, the encoder module includes three encoders connected in sequence. Each encoder includes a multi-head separable log-sparse self-attention layer, a dilated causal convolutional layer, and a max-pooling layer connected in sequence. The multi-head separable log-sparse self-attention layer includes a depthwise separable convolutional layer and a log-sparse attention module. The multi-channel fusion adaptive embedding module includes an adaptive embedding layer, a positional embedding layer, a value embedding layer, and a temporal embedding layer. The first input data passes through the adaptive embedding layer to obtain embedded features. The embedded features pass through the positional embedding layer, the value embedding layer, and the temporal embedding layer respectively to obtain positional embedding features, value embedding features, and temporal embedding features, which are then added together to obtain multi-channel features. The multi-channel features are divided into a first input sequence and a second input sequence according to their dimensions. The first input sequence passes through the depthwise separable convolutional layer in the multi-head separable log-sparse self-attention layer of the first encoder, and the second input sequence passes through the log-sparse attention module in the multi-head separable log-sparse self-attention layer of the first encoder.

[0054] For details, please refer to Figure 2 The structure of the lithium-ion battery health state estimation model is based on the Transformer model. This model includes a multi-channel fusion adaptive embedding module, an encoder module, a decoder module, a flattening layer, and a fully connected layer. The structure of each module is described below.

[0055] S2, acquire the capacity degradation data of the lithium-ion battery to be predicted and preprocess it to obtain the preprocessed capacity degradation data.

[0056] Specifically, the preprocessing method employs normalization, limiting the preprocessed capacity degradation data to the range of 0 to 1, as expressed by the formula:

[0057]

[0058] in, Let X be one of the values ​​in the preprocessed capacity degradation data. max and X min These are the maximum and minimum values ​​in the capacity degradation data.

[0059] During training, data from four lithium cobalt oxide batteries (CS2_35, CS2_36, CS2_37, and CS2_38) were first selected from the CALCE lithium battery dataset. CS2_35, CS2_37, and CS2_38 were merged into the training set, while CS2_36 was used as the test set to obtain more features and improve the model's prediction accuracy. The data from these four lithium cobalt oxide batteries were preprocessed using the same preprocessing method described above, and the model was trained using the preprocessed dataset. The training set was sequentially passed through a multi-channel fusion adaptive embedding module, an encoder module, a decoder module, a flattening layer, and a fully connected layer to obtain the trained lithium-ion battery health state estimation model Trans(·). The test set was then input into the trained lithium-ion battery health state estimation model Trans(·) to obtain the final predicted lithium-ion battery health state estimate O. p .

[0060] The state of health of a lithium-ion battery is typically based on the capacity definition, which is the ratio of maximum capacity to rated capacity. The following formula is used to calculate the estimated state of health of an actual lithium-ion battery:

[0061]

[0062] Among them, C max C represents the maximum capacity that a lithium battery can release. norm This indicates the rated capacity of the lithium battery.

[0063] Finally, the mean absolute error (MAE) was chosen as the loss function, and the predicted state of health estimate of the lithium-ion battery was calculated. p The model's state of health (SOH) was compared with the actual estimated SOH of lithium-ion batteries to demonstrate its effectiveness in estimating the battery's health. The model's mean squared energy (MAE) was 0.01873. (Reference) Figure 3 The SLATrans curve represents the estimation result of the trained lithium-ion battery health state estimation model of the embodiment of this application. The results show that the estimation result of the trained lithium-ion battery health state estimation model of the embodiment of this application is closer to the true value and has higher estimation accuracy than other models.

[0064] S3. The preprocessed capacity degradation data is input into the trained lithium-ion battery health state estimation model. The preprocessed capacity degradation data is divided into first input data and second input data. The first input data is processed by a multi-channel fusion adaptive embedding module to obtain multi-channel features. The multi-channel features are processed by an encoder module to obtain encoded features. The encoded features and the second input data are processed by a decoder module to obtain decoded features. The decoded features are processed by a flattening layer and a fully connected layer to obtain the estimated health state of the lithium-ion battery to be predicted.

[0065] Specifically, the preprocessed capacity degradation data is first divided into the first input data X en Second input data X de Two parts, where the first input data X en The input is fed into the multi-channel fusion adaptive embedding module, while the second input data X de The data is then input into the decoding layer module. The length of the first input data is the input sequence length (sequence_length) of the encoder module, and the length of the second input data is the length of the decoder module, including a portion of the prior data length (label_length) and the prediction sequence length (prediction_length). The prior data length contains a portion of the first input data. In one embodiment, this can be set as follows: sequence_length = 96, label_length = 48, and prediction_length = 24. In the multi-channel fusion adaptive embedding module, the first input data X is first... en The input is fed into an adaptive embedding layer based on GRU to learn the periodicity and trend contained in the features and information at each time step. The embedded features processed by the adaptive embedding layer are then input into the location embedding layer, value embedding layer, and time embedding layer, respectively. The location embedding layer maps the location information in the embedded features to location embedded features, as shown in the following equation:

[0066]

[0067] Where p represents the position of the embedded feature at a certain time step, d model It is the dimension of position embedding, where i represents a certain dimension, and 2i≤d model ,2i+1≤d model PE (p,2i) PE represents the positional embedding feature of the 2i-th dimension. (p,2i+1) This represents the positional embedding feature in the (2i+1)th dimension.

[0068] The value embedding layer maps each element in the embedded features from a low dimension to a dimension of d. model The process of embedding features into values. The temporal embedding layer converts each channel into d values ​​through one-dimensional convolution. model Multi-channel features are obtained by capturing temporal dependencies in time series data and enhancing the temporal correlation of the input sequence at different times. Finally, the positional embedding features, value embedding features, and temporal embedding features are added to obtain the multi-channel feature P∈R. L×d .

[0069] In a specific embodiment, the calculation process of the depthwise separable convolutional layer is as follows:

[0070] Θ1=P1×Rdep +B dep ×R poi +B poi ;

[0071] Where Θ1 represents the output features of the depthwise separable convolutional layer, P1 represents the first input sequence, and R dep R represents the depthwise convolution kernel matrix. poi B represents the pointwise convolution kernel matrix. dep and B poi These represent the bias matrices for depthwise convolution and pointwise convolution, respectively.

[0072] In a specific embodiment, the query matrix Q, the key matrix K, and the value matrix V are constructed as shown in the following equation:

[0073] Q = P2W q +PE q ;

[0074] K = P2W k +PE k ;

[0075] V = P2W v +PE v ;

[0076] Where P2 represents the second input sequence, W q W k and W v These are the weight matrices for the query matrix Q, key matrix K, and value matrix V of the log-sparse attention module, respectively, PE. q PE k PE v These are the positional embedding features of the query matrix Q, key matrix K, and value matrix V of the log-sparse attention module, respectively.

[0077] After normalization using the Softmax function, the attention weight matrix A is obtained. ij As shown in the following formula:

[0078]

[0079] Where, d k Let Q be the dimension of the key matrix K. i K represents the vector in the i-th row of the query matrix Q of the log-sparse attention module. j Let J represent the j-th column vector of the key matrix K of the log-sparse attention module;

[0080] The output feature Θ2 of the logarithmic sparse attention module is calculated using the following formula:

[0081]

[0082] Where L is the length of the multi-channel feature, V j This represents the j-th column vector of the value matrix V of the log-sparse attention module;

[0083] The output features of the depthwise separable convolutional layer and the output features of the log-sparse attention module are concatenated to obtain the output features of the multi-head separable log-sparse self-attention layer, as shown in the following equation:

[0084] Θ = Concat[Θ1,Θ2];

[0085] Where Θ represents the output feature of the multi-head separable log-sparse self-attention layer, and Concat represents the concatenation operation.

[0086] Specifically, the input multi-channel features P∈R L×d The input sequence is divided into two parts, P1 and P2, with equal dimensions, where L is the length of the multi-channel feature and d is the dimension of the multi-channel feature. In the multi-head separable log-sparse self-attention layer, P1 passes through a depthwise separable convolutional layer, and P2 passes through a log-sparse attention module. In the depthwise separable convolutional layer, the convolutional kernel is applied independently to each input channel, while the pointwise convolution uses a 1×1 kernel to convolve the output of the depthwise convolution. In the log-sparse attention module, a positional embedding layer PE is introduced to construct the query matrix Q, key matrix K, and value matrix V of the log-sparse attention module. After processing by the log-sparse attention module, the output features of the log-sparse attention module are obtained. Finally, the output features of the depthwise separable convolutional layer and the output features of the log-sparse attention module are concatenated to obtain the output features of the multi-head separable log-sparse self-attention layer.

[0087] In a specific embodiment, the output features of the multi-head separable log-sparse self-attention layer are input into the dilated causal convolutional layer, and the convolution operator of the dilated causal convolutional layer is expressed as:

[0088]

[0089] Where Θ is the output feature of the multi-head separable log-sparse self-attention layer, W is the convolution kernel, t is the current time point, k is the size of the convolution kernel, and D is the expansion rate of the convolution kernel.

[0090] The feature map obtained by convolution through the dilated causal convolutional layer is input into the max pooling layer to obtain the output features of the first encoder. The output features of the first encoder are used as the input features of the next encoder. After being processed by two more encoders, the encoded features are obtained.

[0091] Specifically, dilated causal convolution is used instead of one-dimensional convolution to expand the receptive field, enabling the model to capture a wider range of contextual information. The feature map obtained after convolution through the dilated causal convolution layer has its original feature length halved by a max pooling layer and is used as the input feature for the next encoder. After passing through the structure of three encoders, the encoded feature Y output by the encoder module is obtained. en .

[0092] In a specific embodiment, the decoder module includes a mask layer and a cross-attention layer. The second input data is input to the mask layer to obtain the query matrix of the cross-attention layer. The encoded features are used as the key matrix and value matrix of the cross-attention layer. Through the processing of the cross-attention layer, the decoded features are obtained, as shown in the following formula:

[0093]

[0094] Among them, V de K represents the value matrix of the cross-attention layer. de Q represents the key matrix of the cross-attention layer. de d represents the query matrix of the cross-attention layer. k Y represents the dimension of the key matrix of the cross-attention layer. de This indicates the decoding features.

[0095] Specifically, in the decoder module, the encoded features Y output by the encoder module are first processed... en As the bond matrix K de Sum matrix V de The data is input into the cross-attention layer, and then the second input data X is... de The input is fed into a masking layer, which masks the values ​​of the target prediction sequence with 0. The output is the query matrix Q of the cross-attention layer. de Thus, the decoded features Y output by the cross-attention layer are obtained. de Then Y de The state of health of the lithium-ion battery to be predicted is obtained by using a flattened layer and a fully connected layer.

[0096] Further reference Figure 4 As an implementation of the methods shown in the above figures, this application provides an embodiment of a lithium-ion battery health state estimation device based on the Transformer model. This device embodiment is similar to... Figure 1 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0097] This application provides a lithium-ion battery health state estimation device based on the Transformer model, including:

[0098] Model building module 1 is configured to build and train a lithium-ion battery health state estimation model based on the Transformer model to obtain a trained lithium-ion battery health state estimation model. The lithium-ion battery health state estimation model includes a multi-channel fusion adaptive embedding module, an encoder module, a decoder module, a flattening layer, and a fully connected layer.

[0099] Preprocessing module 2 is configured to acquire the capacity degradation data of the lithium-ion battery to be predicted and perform preprocessing to obtain preprocessed capacity degradation data.

[0100] Prediction module 3 is configured to input preprocessed capacity degradation data into a trained lithium-ion battery health state estimation model. The preprocessed capacity degradation data is divided into first input data and second input data. The first input data is processed by a multi-channel fusion adaptive embedding module to obtain multi-channel features. The multi-channel features are processed by an encoder module to obtain encoded features. The encoded features and the second input data are processed by a decoder module to obtain decoded features. The decoded features are processed by a flattening layer and a fully connected layer to obtain the estimated health state of the lithium-ion battery to be predicted.

[0101] Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. For example... Figure 5 As shown, the electronic device of this embodiment includes a processor 501 and a memory 502; wherein the memory 502 is used to store computer execution instructions; and the processor 501 is used to execute the computer execution instructions stored in the memory to implement the various steps performed by the electronic device in the above embodiment. For details, please refer to the relevant descriptions in the foregoing method embodiments.

[0102] Alternatively, the memory 502 can be either standalone or integrated with the processor 501.

[0103] When the memory 502 is set up independently, the electronic device also includes a bus 503 for connecting the memory 502 and the processor 501.

[0104] This invention also provides a computer storage medium storing computer execution instructions, which, when executed by processor 501, implement the above method.

[0105] This invention also provides a computer program product, including a computer program that, when executed by a processor 501, implements the above-described method.

[0106] In the embodiments provided by this invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.

[0107] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.

[0108] Furthermore, the functional modules in the various embodiments of this invention can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit formed by the above modules can be implemented in hardware or in the form of hardware plus software functional units.

[0109] The integrated modules implemented as software functional modules described above can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor 501 to execute some steps of the methods of the various embodiments of this application.

[0110] It should be understood that the processor 501 described above can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor, or the processor 501 can be any conventional processor 501. The steps of the method disclosed in this invention can be directly manifested as the hardware processor 501 executing the steps, or as a combination of hardware and software modules within the processor 501 executing the steps.

[0111] The memory 502 may include high-speed RAM memory, and may also include non-volatile memory NVM, such as at least one disk storage device, and may also be a USB flash drive, portable hard drive, read-only memory, disk or optical disc, etc.

[0112] Bus 503 can be an Industry Standard Architecture (ISA), a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Bus 503 can be divided into address bus, data bus, control bus, etc. For ease of illustration, the bus 503 in the accompanying drawings of this application is not limited to only one bus 503 or one type of bus 503.

[0113] The aforementioned storage medium can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium accessible to general-purpose or special-purpose computers.

[0114] An exemplary storage medium is coupled to processor 501, enabling processor 501 to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of processor 501. Processor 501 and storage medium can reside in application-specific integrated circuits (ASICs). Alternatively, processor 501 and storage medium can exist as discrete components in an electronic device or host device.

[0115] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for estimating the state of health of a lithium-ion battery based on a Transformer model, characterized in that, The method comprises the following steps: A lithium-ion battery health state estimation model based on a Transformer model is constructed and trained to obtain a trained lithium-ion battery health state estimation model, the lithium-ion battery health state estimation model comprising a multi-channel fusion adaptive embedding module, an encoder module, a decoder module, a flattening layer and a full connection layer, the encoder module comprising three encoders connected in sequence, the encoder comprising a multi-head separable logarithmic sparse self-attention layer, an inflation causal convolution layer and a maximum pooling layer connected in sequence, the multi-head separable logarithmic sparse self-attention layer comprising a deep separable convolution layer and a logarithmic sparse attention module; The multi-channel fusion adaptive embedding module comprises an adaptive embedding layer, a position embedding layer, a value embedding layer and a time embedding layer, first input data passing through the adaptive embedding layer to obtain embedding features, the embedding features passing through the position embedding layer, the value embedding layer and the time embedding layer respectively to obtain position embedding features, value embedding features and time embedding features and adding them to obtain multi-channel features, the multi-channel features being equally divided into a first input sequence and a second input sequence according to the dimension, the first input sequence passing through the deep separable convolution layer in the multi-head separable logarithmic sparse self-attention layer of the first encoder, and the second input sequence passing through the logarithmic sparse attention module in the multi-head separable logarithmic sparse self-attention layer of the first encoder; Capacity degradation data of a lithium-ion battery to be predicted are obtained and preprocessed to obtain preprocessed capacity degradation data; The preprocessed capacity degradation data are input into the trained lithium-ion battery health state estimation model, the preprocessed capacity degradation data being divided into first input data and second input data, the first input data passing through the multi-channel fusion adaptive embedding module to obtain multi-channel features; the multi-channel features passing through the encoder module to obtain encoding features, the encoding features and the second input data passing through the decoder module to obtain decoding features, the decoding features sequentially passing through the flattening layer and the full connection layer to obtain a health state estimation value of the lithium-ion battery to be predicted.

2. The method of claim 1, wherein the Transformer model-based lithium-ion battery state-of-health estimation method is characterized by, constructing a query matrix of the logarithmic sparse attention module , a key matrix , and a value matrix as follows: ; ; ; wherein, represents a second input sequence, , and are weight matrices of the query matrix , the key matrix and the value matrix of the logarithmic sparse attention module, respectively, , , are positional embedding features of the query matrix , the key matrix and the value matrix of the logarithmic sparse attention module, respectively. After the Softmax function normalization, the attention weight matrix is obtained As shown in the following formula: ; wherein, is a key matrix of dimension, denotes the i-th row vector of the query matrix of the logarithmic sparse attention module, denotes the j-th column vector of the key matrix of the logarithmic sparse attention module. The output features of the log-sparse attention module are calculated using the following formula : ; wherein L is a length of the multi-channel feature, a value matrix representing the log-sparse attention module a jthcolumn vector of the value matrix The output features of the deep separable convolution layer and the output features of the logarithmic sparse attention module are spliced to obtain the output features of the multi-head separable logarithmic sparse self-attention layer, as shown in the following formula: ; wherein, denotes the output feature of the deep separable convolution layer, denotes the output feature of the multi-head separable log-sparse self-attention layer, denotes a concatenation operation.

3. The method of claim 1, wherein the Transformer model-based lithium-ion battery state-of-health estimation method is characterized by, The output features of the multi-head separable logarithmic sparse self-attention layer are input into the inflation causal convolution layer, and the convolution operator of the inflation causal convolution layer is represented as: ; wherein, is an output feature of the multi-head separable logarithmic sparse self-attention layer, is a convolution kernel, is a current time point, is a size of the convolution kernel, is an expansion rate of the convolution kernel; The feature map obtained by convolution of the inflation causal convolution layer is input into the maximum pooling layer to obtain the output features of the first encoder, and the output features of the first encoder are taken as the input features of the next encoder and sequentially processed by two encoders to obtain the encoding features.

4. The method of claim 1, wherein the Transformer model-based lithium-ion battery state-of-health estimation method is characterized by, The decoder module comprises a mask layer and a cross-attention layer, the second input data is input into the mask layer to obtain a query matrix of the cross-attention layer, the encoding feature is taken as a key matrix and a value matrix of the cross-attention layer, and a decoding feature is obtained through processing of the cross-attention layer, as shown in the following formula: ; wherein, denotes a value matrix of the cross-attention layer, denotes a key matrix of the cross-attention layer, denotes a query matrix of the cross-attention layer, denotes a dimension of the key matrix of the cross-attention layer, denotes a decoded feature.

5. A lithium-ion battery state-of-health estimation apparatus based on a Transformer model, employing the lithium-ion battery state-of-health estimation method based on a Transformer model according to any one of claims 1-4, characterized in that, Comprise: A model construction module configured to construct a lithium-ion battery state of health estimation model based on a Transformer model and train the lithium-ion battery state of health estimation model to obtain a trained lithium-ion battery state of health estimation model, the lithium-ion battery state of health estimation model comprising a multi-channel fusion adaptive embedding module, an encoder module, a decoder module, a flattening layer, and a fully connected layer; A preprocessing module configured to obtain capacity degradation data of a lithium-ion battery to be predicted and preprocess the capacity degradation data to obtain preprocessed capacity degradation data; A prediction module configured to input the preprocessed capacity degradation data into the trained lithium-ion battery state of health estimation model, the preprocessed capacity degradation data being divided into first input data and second input data, the first input data being input into the multi-channel fusion adaptive embedding module to obtain multi-channel features, the multi-channel features being input into the encoder module to obtain encoding features, the encoding features and the second input data being input into the decoder module to obtain decoding features, and the decoding features being sequentially input into the flattening layer and the fully connected layer to obtain an estimated value of the state of health of the lithium-ion battery to be predicted. 6.An electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1-4.

7. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method of any one of claims 1-4.

8. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the method of any one of claims 1-4. The computer program is executed by the processor to implement the method of any one of claims 1-4.

Citation Information

Patent Citations

  • Power battery state-of-health estimation method and system based on multi-channel technology

    CN112051511A

  • Deep learning lithium battery SOH prediction method based on transformer architecture

    CN118131044A