Lithium ion battery health state estimation method and device based on Transform model

By introducing a multi-head separable logarithmic sparse self-attention layer and an expanded causal convolutional layer in the Transformer model, the problem of inefficient calculation when processing long sequences is solved, and a more efficient and accurate estimation of the health status of lithium-ion batteries is achieved.

CN119902111AActive Publication Date: 2025-04-29XIAMEN UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411990476.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-29
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

Traditional self-attention is inefficient in computing when processing long sequences, resulting in limited accuracy of long sequence prediction and global information capture capabilities, making it difficult to effectively estimate the health status of lithium-ion batteries.

Method used

The health status estimation method of lithium-ion battery based on the Transformer model is adopted, and the logarithmic sparse self-attention layer and the expanded causal convolution layer are separated by a multi-head to reduce the computational complexity and improve the accuracy of long-sequence prediction.

Benefits of technology

Through the multi-dimensional separation mechanism and the processing of the multi-logarithmic sparse self-attention layer, global features can be captured well under complex timing conditions, improved computing efficiency, enhanced model generalization capabilities, and achieved more accurate estimation of the health status of lithium-ion batteries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902111A_ABST
    Figure CN119902111A_ABST
Patent Text Reader

Abstract

The invention discloses a lithium ion battery health state estimation method and device based on a Transform model, and the method comprises the steps: constructing and training a lithium ion battery health state estimation model based on the Transform model, and obtaining a trained lithium ion battery health state estimation model; the capacity degradation data of the lithium ion battery to be predicted are obtained and preprocessed, the preprocessed capacity degradation data are obtained and input into the trained lithium ion battery health state estimation model, and the preprocessed capacity degradation data are divided into first input data and second input data; first input data passes through the multi-channel fusion self-adaptive embedding module to obtain multi-channel features; the multi-channel features pass through the encoder module to obtain encoding features, the encoding features and the second input data pass through the decoder module to obtain decoding features, and the decoding features pass through the flattening layer and the full connection layer in sequence to obtain the health state estimation value of the lithium ion battery to be predicted. The method can improve the prediction accuracy and reduce the calculation complexity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of battery health state estimation, and in particular to a method and device for estimating the health state of a lithium-ion battery based on a Transformer model. Background Art

[0002] With the continuous growth of global energy demand, especially the rapid development of mobile communications, electric vehicles, aerospace vehicles and electrochemical energy storage, higher requirements are placed on efficient and environmentally friendly energy storage solutions. As a key energy storage component, lithium-ion batteries are very suitable for meeting these requirements due to their high energy density, no memory effect, low self-discharge rate and environmental friendliness. However, with the increase of usage time, the performance of lithium-ion batteries will also decline, including reduced capacity and increased internal resistance, which may cause internal short circuits or even thermal runaway, resulting in major safety hazards such as equipment failure or fire. Therefore, accurate estimation of battery health status is crucial to ensure the safe use of batteries.

[0003] Data-driven methods have attracted increasing attention because they do not involve internal mechanisms and can be adopted in scalable situations. These methods achieve high accuracy in health state estimation of lithium-ion batteries by extracting various characteristic parameters from the battery and combining them with machine learning techniques. Although data-driven methods are more adaptable than measurement and model-based methods and can provide accurate estimates under different conditions, they still have problems such as low long-term prediction accuracy and poor ability to capture global information. In recent years, the Transformer model has been widely used in the field of health state estimation of lithium-ion batteries due to its excellent global feature capture ability, efficient parallel computing performance, and sensitivity to long-distance dependencies in long sequence data. However, traditional self-attention is computationally inefficient when processing long sequences. When the sequence length increases, the computational complexity increases quadratically, and the ability to capture effective information is limited. Summary of the invention

[0004] The purpose of this application is to propose a method and device for estimating the health status of a lithium-ion battery based on a Transformer model in response to the above-mentioned technical problems.

[0005] In a first aspect, the present invention provides a method for estimating the health status of a lithium-ion battery based on a 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 a trained lithium-ion battery health state estimation model, wherein 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] Acquiring capacity degradation data of a lithium-ion battery to be predicted and performing preprocessing to obtain 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 passes through a multi-channel fusion adaptive embedding module to obtain multi-channel features; the multi-channel features pass through an encoder module to obtain encoded features, and the encoded features and the second input data pass through a decoder module to obtain decoded features. The decoded features pass through a flattening layer and a fully connected layer in sequence to obtain an estimated value of the health state of the lithium-ion battery to be predicted.

[0009] Preferably, the encoder module includes three encoders connected in sequence, the encoder includes a multi-head separable log-sparse self-attention layer, an expanded causal convolution layer and a maximum pooling layer connected in sequence, the multi-head separable log-sparse self-attention layer includes a depth-separable convolution layer and a log-sparse attention module; the multi-channel fusion adaptive embedding module includes an adaptive embedding layer, a position embedding layer, a value embedding layer and a time embedding layer, the first input data passes through the adaptive embedding layer to obtain embedded features, the embedded features pass 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 add them to obtain multi-channel features, the multi-channel features are equally divided into a first input sequence and a second input sequence according to the dimension, the first input sequence passes through the depth-separable convolution 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] Preferably, the depthwise separable convolutional layer is calculated as follows:

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

[0012] Among them, Θ1 represents the output feature of the depth-wise separable convolutional layer, P1 represents the first input sequence, and R dep represents the deep convolution kernel matrix, R poi represents the point-by-point convolution kernel matrix, B dep and B poi Represent the bias matrices of 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 formula:

[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 are the weight matrices of the query matrix Q, key matrix K and value matrix V of the logarithmic sparse attention module, PE q PE k PE v They are the positional embedding features of the query matrix Q, key matrix K, and value matrix V of the logarithmic sparse attention module respectively;

[0018] After normalization by the Softmax function, we get the attention weight matrix A ij , as shown below:

[0019]

[0020] Among them, d k is the dimension of the key matrix K, Q i represents the i-th row vector in the query matrix Q of the logarithmic sparse attention module, K j The j-th column vector of the key matrix K representing 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 The j-th column vector of the value matrix V representing the logarithmic sparse attention module;

[0024] The output features of the depth-wise 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 formula:

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

[0026] Among them, Θ represents the output features 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 logarithmic sparse self-attention layer are input into the dilated causal convolution layer, and the convolution operator of the dilated causal convolution layer is expressed as:

[0028]

[0029] Among them, Θ is the output feature of the multi-head separable logarithmic 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 of the dilated causal convolution layer is input into the maximum 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, and are processed by the two encoders in sequence to obtain the encoded features.

[0031] Preferably, the decoder module includes a mask layer and a cross attention layer, the second input data is input into the mask layer, a query matrix of the cross attention layer is obtained, the encoded features are used as the key matrix and value matrix of the cross attention layer, and the decoded features are obtained through the processing of the cross attention layer, as shown in the following formula:

[0032]

[0033] Among them, V de Represents the value matrix of the cross attention layer, K de represents the key matrix of the cross-attention layer, Q de represents the query matrix of the cross-attention layer, d k Denotes the dimension of the key matrix of the criss-cross attention layer, Y de Represents the decoding feature.

[0034] In a second aspect, the present invention provides a lithium-ion battery health status estimation device based on a Transformer model, comprising:

[0035] A model building module is configured to build and train a lithium-ion battery health state estimation model based on a Transformer model to obtain a trained lithium-ion battery health state estimation model, wherein 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] A preprocessing module is configured to obtain the capacity degradation data of the lithium-ion battery to be predicted and perform preprocessing to obtain the preprocessed capacity degradation data;

[0037] The prediction module is configured to input the 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 passes through a multi-channel fusion adaptive embedding module to obtain multi-channel features; the multi-channel features pass through an encoder module to obtain encoding features, the encoding features and the second input data pass through a decoder module to obtain decoding features, and the decoding features pass through a flattening layer and a fully connected layer in sequence to obtain an estimated value of the health state of the lithium-ion battery to be predicted.

[0038] In a third aspect, the present invention provides an electronic device comprising one or more processors; 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 described in any implementation manner in the first aspect.

[0039] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.

[0040] In a fifth aspect, the present invention provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method described in any implementation manner 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 model in the lithium-ion battery health state estimation method based on the Transformer model proposed in the present invention combines a multi-head separable logarithmic sparse self-attention layer and an expanded causal convolution layer, which can reduce the complexity of calculation 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 the present 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 well capture global features under complex time series conditions, improve computational efficiency, and enhance the generalization ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0045] Figure 1 A schematic diagram of a flow chart of a method for estimating the health status of a lithium-ion battery based on a Transformer model according to an embodiment of the present application;

[0046] Figure 2 A schematic diagram of the structure of a lithium-ion battery health state estimation model of a lithium-ion battery health state estimation method based on a Transformer model according to an embodiment of the present application;

[0047] Figure 3 A comparison chart of the lithium-ion battery health state estimation results of the lithium-ion battery health state estimation method based on the Transformer model in an embodiment of the present application under the CALCE data set with the true value and the estimation results of seven other models;

[0048] Figure 4 A schematic diagram of a lithium-ion battery health status estimation device based on a Transformer model according to an embodiment of the present application;

[0049] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] Figure 1 A method for estimating the health status of a lithium-ion battery based on a Transformer model provided in an embodiment of the present application is shown, comprising the following steps:

[0052] S1, construct 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, where 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, the encoder includes a multi-head separable log-sparse self-attention layer, an expanded causal convolution layer and a maximum pooling layer connected in sequence, the multi-head separable log-sparse self-attention layer includes a depth-separable convolution layer and a log-sparse attention module; the multi-channel fusion adaptive embedding module includes an adaptive embedding layer, a position embedding layer, a value embedding layer and a time embedding layer, the first input data passes through the adaptive embedding layer to obtain embedded features, the embedded features pass 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 add them to obtain multi-channel features, the multi-channel features are equally divided into a first input sequence and a second input sequence according to the dimension, the first input sequence passes through the depth-separable convolution 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] Specifically, refer to Figure 2 The structure of the lithium-ion battery health state estimation model is based on the Transformer 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. The following describes the structure of each module.

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

[0056] Specifically, the preprocessing method uses normalization processing to limit the preprocessed capacity degradation data to the range of 0 to 1. The formula is expressed as:

[0057]

[0058] in, is one of the values ​​of the capacity degradation data after preprocessing, X is one of the values ​​in the capacity degradation data, X max and X min are the maximum and minimum values ​​in the capacity degradation data.

[0059] During the training process, the data of four lithium cobalt oxide batteries, CS2_35, CS2_36, CS2_37 and CS2_38, are first selected from the CALCE lithium battery data set. CS2_35, CS2_37 and CS2_38 in the CALCE lithium battery data set are merged as the training set, and CS2_36 is used as the test set to obtain more features and improve the accuracy of model prediction. The data of the four lithium cobalt oxide batteries are preprocessed in the same way as above, and the model is trained using the preprocessed data set. The training set is trained in turn through a multi-channel fusion adaptive embedding module, an encoder module, a decoder module, a flattening layer and a fully connected layer to obtain a trained lithium-ion battery health state estimation model Trans(·), and then the test set is input into the trained lithium-ion battery health state estimation model Trans(·) to obtain the final predicted lithium-ion battery health state estimation value O p .

[0060] The health status of lithium-ion batteries is usually defined based on capacity, that is, the ratio of maximum capacity to rated capacity. The following formula is used to calculate the actual health status estimate of lithium-ion batteries:

[0061]

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

[0063] Finally, the mean absolute error (MAE) is selected as the loss function, and the predicted health status estimate of the lithium-ion battery O p Compared with the actual estimated value SOH of the lithium-ion battery's health state, the estimated effect of the lithium-ion battery's health state is obtained, and the MAE of the model is 0.01873. Figure 3 The SLATrans curve represents the estimation result of the trained lithium-ion battery health state estimation model of the embodiment of the present application. The results show that the estimation result of the trained lithium-ion battery health state estimation model using the embodiment of the present application is closer to the true value than other models and has higher estimation accuracy.

[0064] S3, input the preprocessed capacity degradation data 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 passes through a multi-channel fusion adaptive embedding module to obtain multi-channel features; the multi-channel features pass through an encoder module to obtain encoding features, the encoding features and the second input data pass through a decoder module to obtain decoding features, the decoding features pass through a flattening layer and a fully connected layer in turn to obtain an estimated value of the health state of the lithium-ion battery to be predicted.

[0065] Specifically, the pre-processed capacity degradation data is first divided into the first input data X en and the second input data X de Two parts, the first input data X en Input to the multi-channel fusion adaptive embedding module, and the second input data X de The first input data is the input sequence length sequence_length of the encoder module, and 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 includes a portion of the first input data. In one embodiment, it can be set to: sequence_length = 96, label_length = 48, prediction_length = 24. In the multi-channel fusion adaptive embedding module, the first input data X is first en Input into the GRU-based adaptive embedding layer to learn the features of each time step and the periodicity and trend contained in the information. Then the embedded features processed by the adaptive embedding layer are input into the position embedding layer, value embedding layer and time embedding layer respectively. The position embedding layer maps the position information in the embedded features to the position embedding features, as shown in the following formula:

[0066]

[0067] Among them, p represents the position of the embedded feature at a certain time step, d model is the dimension of position embedding, i represents a certain dimension, 2i≤d model , 2i+1≤d model , PE (p,2i) represents the position embedding feature of the 2ith dimension, PE (p,2i+1) Represents the position embedding feature in the 2i+1th dimension.

[0068] The value embedding layer maps each element in the embedding feature from a low dimension to a dimension d model The temporal embedding layer converts each channel into d through one-dimensional convolution. model Channels, thereby capturing the time dependency in time series data and enhancing the time correlation of the input sequence at different moments. Finally, the position embedding feature, value embedding feature and time embedding feature are added together 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] Among them, Θ1 represents the output feature of the depth-wise separable convolutional layer, P1 represents the first input sequence, and R dep represents the deep convolution kernel matrix, R poi represents the point-by-point convolution kernel matrix, B dep and B poi Represent the bias matrices of 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 formula:

[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 are the weight matrices of the query matrix Q, key matrix K and value matrix V of the logarithmic sparse attention module, PE q PE k PE v They are the positional embedding features of the query matrix Q, key matrix K, and value matrix V of the logarithmic sparse attention module respectively;

[0077] After normalization by the Softmax function, we get the attention weight matrix A ij , as shown below:

[0078]

[0079] Among them, d k is the dimension of the key matrix K, Q i represents the i-th row vector in the query matrix Q of the logarithmic sparse attention module, K j The j-th column vector of the key matrix K representing 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 The j-th column vector of the value matrix V representing the logarithmic sparse attention module;

[0083] The output features of the depth-wise 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 formula:

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

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

[0086] Specifically, the input multi-channel feature P∈R L×d According to the dimension, it is equally divided into two parts: the first input sequence P1 and the second input sequence P2, 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 logarithmic sparse self-attention layer, P1 passes through the depthwise separable convolution layer and P2 passes through the logarithmic sparse attention module. In the depthwise separable convolution layer, the convolution kernel is applied independently to each input channel, and the pointwise convolution uses a convolution kernel of size 1×1 to convolve the output of the depthwise convolution. In the logarithmic sparse attention module, the position embedding layer PE is introduced to construct the query matrix Q, key matrix K and value matrix V of the logarithmic sparse attention module. After being processed by the logarithmic sparse attention module, the output features of the logarithmic sparse attention module are obtained. Finally, the output features of the depthwise separable convolution layer and the output features of the logarithmic sparse attention module are spliced ​​together to obtain the output features of the multi-head separable logarithmic sparse self-attention layer.

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

[0088]

[0089] Among them, Θ is the output feature of the multi-head separable logarithmic 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 of the dilated causal convolution layer is input into the maximum 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, and are processed by the two encoders in sequence to obtain the encoded features.

[0091] Specifically, the dilated causal convolution is used to replace the one-dimensional convolution to expand the receptive field, so that the model can capture a wider range of contextual information. The feature map obtained after the dilated causal convolution layer is convolved through the maximum pooling layer to halve the original feature length and used as the input feature of the next encoder. After the structure of the 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 into the mask layer to obtain a query matrix of the cross attention layer. The encoded features are used as the key matrix and value matrix of the cross attention layer. The decoded features are obtained through processing of the cross attention layer, as shown in the following formula:

[0093]

[0094] Among them, V de Represents the value matrix of the cross attention layer, K de represents the key matrix of the cross-attention layer, Q de represents the query matrix of the cross-attention layer, d k Denotes the dimension of the key matrix of the criss-cross attention layer, Y de Represents the decoding feature.

[0095] Specifically, in the decoder module, the encoded feature Y output by the encoder module is first en As the key matrix K de Sum value matrix V de Input into the cross attention layer, and then the second input data X de Input to the mask layer, mask the value of the target prediction sequence with 0, and output as the query matrix Q of the cross attention layer de , thus obtaining the decoded feature Y output by the cross attention layer de Then Y de The health status estimate of the lithium-ion battery to be predicted is obtained through the flattening layer and the fully connected layer.

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

[0097] The embodiment of the present application provides a lithium-ion battery health status estimation device based on a Transformer model, comprising:

[0098] A model building module 1 is configured to build and train a lithium-ion battery health state estimation model based on a Transformer model to obtain a trained lithium-ion battery health state estimation model, wherein 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] A preprocessing module 2 is configured to obtain the capacity degradation data of the lithium-ion battery to be predicted and perform preprocessing to obtain the preprocessed capacity degradation data;

[0100] The prediction module 3 is configured to input the 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 passes through a multi-channel fusion adaptive embedding module to obtain multi-channel features; the multi-channel features pass through an encoder module to obtain encoding features, and the encoding features and the second input data pass through a decoder module to obtain decoding features. The decoding features pass through a flattening layer and a fully connected layer in sequence to obtain an estimated value of the health state of the lithium-ion battery to be predicted.

[0101] Figure 5 Schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present invention. 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-executable instructions; the processor 501 is used to execute the computer-executable 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 description in the above method embodiment.

[0102] Optionally, the memory 502 may be independent or integrated with the processor 501 .

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

[0104] The embodiment of the present invention further provides a computer storage medium, in which computer execution instructions are stored. When the processor 501 executes the computer execution instructions, the above method is implemented.

[0105] The embodiment of the present invention further provides a computer program product, including a computer program. When the computer program is executed by the processor 501, the above method is implemented.

[0106] In the embodiments provided by the present 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 only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

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

[0108] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each module may exist physically separately, or two or more modules may be integrated into one unit. The unit formed by the above modules may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0109] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor 501 to perform some steps of the methods of various embodiments of the present application.

[0110] It should be understood that the processor 501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or the processor 501 may be any conventional processor 501, etc. The steps of the method disclosed in the invention may be directly embodied in the execution of the hardware processor 501, or may be executed by a combination of hardware and software modules in the processor 501.

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

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

[0113] The above storage medium can be implemented by 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 memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0114] An exemplary storage medium is coupled to the processor 501, so that the processor 501 can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor 501. The processor 501 and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor 501 and the storage medium can also exist as discrete components in an electronic device or a main control device.

[0115] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements 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 health status of a lithium-ion battery based on a Transformer model, characterized in that: The following steps are involved: 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, wherein 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; Acquiring capacity degradation data of a lithium-ion battery to be predicted and performing preprocessing to obtain preprocessed capacity degradation data; 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 passes through the multi-channel fusion adaptive embedding module to obtain multi-channel features; the multi-channel features pass through the encoder module to obtain encoding features, the encoding features and the second input data pass through the decoder module to obtain decoding features, the decoding features pass through the flattening layer and the fully connected layer in sequence to obtain the health state estimation value of the lithium-ion battery to be predicted.

2. The method for estimating the health status of a lithium-ion battery based on a Transformer model according to claim 1, characterized in that: The encoder module includes three encoders connected in sequence, the encoder includes a multi-head separable logarithmic sparse self-attention layer, a dilated causal convolution layer and a maximum pooling layer connected in sequence, and the multi-head separable logarithmic sparse self-attention layer includes a depth separable convolution layer and a logarithmic sparse attention module; The multi-channel fusion adaptive embedding module includes an adaptive embedding layer, a position embedding layer, a value embedding layer and a time embedding layer. The first input data passes through the adaptive embedding layer to obtain embedded features. The embedded features pass 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 add them to obtain multi-channel features. The multi-channel features are equally divided into a first input sequence and a second input sequence according to the dimension. The first input sequence passes through the depth-separable convolution 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.

3. The method for estimating the health status of a lithium-ion battery based on a Transformer model according to claim 2, characterized in that: The calculation process of the depth-wise separable convolutional layer is as follows: Θ1=P1×R dep +B dep ×R poi +B poi ; Among them, Θ1 represents the output feature of the depth-wise separable convolutional layer, P1 represents the first input sequence, and R dep represents the deep convolution kernel matrix, R poi represents the point-by-point convolution kernel matrix, B dep and B poi Represent the bias matrices of depthwise convolution and pointwise convolution respectively.

4. The method for estimating the health status of a lithium-ion battery based on a Transformer model according to claim 3, characterized in that: The query matrix Q, key matrix K and value matrix V of the logarithmic sparse attention module are constructed as shown below: Q=P2W q +PE q ; K=P2W k +PE k 4 V=P2W v +PE v ; Where P2 represents the second input sequence, W q , W k and W v are the weight matrices of the query matrix Q, key matrix K, and value matrix V of the logarithmic sparse attention module, PE q PE k PE v They are the positional embedding features of the query matrix Q, key matrix K, and value matrix V of the logarithmic sparse attention module respectively; After normalization by the Softmax function, we get the attention weight matrix A ij , as shown below: Among them, d k is the dimension of the key matrix K, Q i represents the i-th row vector in the query matrix Q of the logarithmic sparse attention module, K j The j-th column vector of the key matrix K representing the log-sparse attention module; The output feature θ2 of the logarithmic sparse attention module is calculated using the following formula: Where L is the length of the multi-channel feature, V j The j-th column vector of the value matrix V representing the logarithmic sparse attention module; The output features of the depth-wise separable convolutional layer and the output features of the logarithmic sparse attention module are concatenated to obtain the output features of the multi-head separable logarithmic sparse self-attention layer, as shown in the following formula: Θ=Concat[Θ1,Θ2]; Among them, Θ represents the output features of the multi-head separable log-sparse self-attention layer, and Concat represents the concatenation operation.

5. The method for estimating the health status of a lithium-ion battery based on a Transformer model according to claim 2, characterized in that: The output features of the multi-head separable logarithmic sparse self-attention layer are input into the dilated causal convolution layer, and the convolution operator of the dilated causal convolution layer is expressed as: Wherein, Θ is the output feature of the multi-head separable logarithmic 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; The feature map obtained by convolution of the dilated causal convolution layer is input into the maximum 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, and are processed by the two encoders in sequence to obtain the encoded features.

6. The method for estimating the health status of a lithium-ion battery based on a Transformer model according to claim 1, characterized in that: The decoder module includes a mask layer and a cross attention layer, the second input data is input into the mask layer, a query matrix of the cross attention layer is obtained, the encoding feature is used 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: Among them, V de Represents the value matrix of the cross attention layer, K de represents the key matrix of the cross-attention layer, Q de represents the query matrix of the criss-cross attention layer, d k represents the dimension of the key matrix of the criss-cross attention layer, Y de Represents the decoding feature.

7. A lithium-ion battery health status estimation device based on a Transformer model, characterized in that: include: A model building module is configured to build and train a lithium-ion battery health state estimation model based on a Transformer model to obtain a trained lithium-ion battery health state estimation model, wherein 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; A preprocessing module is configured to obtain the capacity degradation data of the lithium-ion battery to be predicted and perform preprocessing to obtain the preprocessed capacity degradation data; The prediction module is configured to input the preprocessed capacity degradation data 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 passes through the multi-channel fusion adaptive embedding module to obtain multi-channel features; the multi-channel features pass through the encoder module to obtain encoding features, the encoding features and the second input data pass through the decoder module to obtain decoding features, the decoding features pass through the flattening layer and the fully connected layer in sequence to obtain the health state estimation value of the lithium-ion battery to be predicted.

8. 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 according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

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

  • Lithium ion battery health state estimation method and system based on charging data fragments

    CN118641967A

  • Lithium ion battery health state estimation method based on trend perception attention and Transform encoder

    CN118731717A

  • Lithium ion battery SOH estimation method, system and device and storage medium

    CN118759393A