A lithium battery SOH estimation method based on pre-training fusion of multi-source data
By fusing multi-source data features of lithium batteries through pre-training task 1 and a self-attention mechanism, the problem of insufficient accuracy in existing methods is solved, and higher accuracy SOH estimation is achieved.
Patent Information
- Application Number
- CN202411496744.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2044-10-25
AI Technical Summary
Existing lithium battery SOH estimation methods based on multi-source data fail to fully integrate the interactions between different data, resulting in insufficient estimation accuracy.
By minimizing the cosine similarity loss between constant voltage current feature segments and EIS feature segments through pre-training task 1, the two features are fused using a self-attention mechanism, an encoder and decoder are constructed to reconstruct the mask features, and an SOH estimation model is established to achieve efficient fusion of multi-source data.
The accuracy of SOH estimation for lithium batteries has been improved by enhancing the model's ability to capture aging information through fine-grained alignment and strengthening the synergistic information between features.
Smart Images

Figure CN119397473B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of lithium batteries, and particularly relates to a lithium battery SOH estimation method based on pre-training fusion of multi-source data. BACKGROUND
[0002] Lithium batteries have become the main energy storage system of smart grids, microgrids, intelligent electronic devices and electric vehicles due to their high energy density, low self-discharge rate and long operating life. The state of health (SOH) of a lithium battery intuitively reflects the aging condition of the current battery. The capacity of a lithium ion battery inevitably ages during its life cycle. These complex electrochemical reactions and external performance changes make it difficult to accurately estimate the SOH. Therefore, accurately estimating the SOH is very important for the safety performance evaluation of lithium batteries.
[0003] Today, data-driven lithium battery SOH estimation methods are a research hotspot. Such methods generally construct manual features from different charging operation curves and then input them into a machine learning model to estimate the SOH, or directly input the charging operation curve into a machine learning model to estimate the SOH. Existing data-driven lithium battery SOH estimation methods can be roughly divided into SOH estimation methods based on battery operating data such as current, current and temperature, and SOH estimation methods based on multi-source data. Among them, the SOH estimation method based on multi-source data comprehensively utilizes the battery aging information contained in the operating data and electrochemical impedance spectrum data, avoiding the problem that the SOH estimation is easily disturbed by noise from a single sensor. Existing SOH estimation methods based on multi-source data generally combine or splice the health features of the operating data and the health features of the electrochemical impedance spectrum to obtain new health features and use them to estimate the SOH. However, there is usually heterogeneity and semantic difference between multi-source data, and simple fusion methods cannot capture the interaction between different data. Therefore, the existing methods do not fully fuse the aging information of multi-source data, resulting in limitations in the application of the existing methods and hindering the improvement of the estimation accuracy of the SOH. SUMMARY
[0004] In view of the above deficiencies of the prior art, the present application proposes a lithium battery SOH estimation method based on pre-training fusion of multi-source data, aiming to fully fuse multi-source data and improve the estimation accuracy of the SOH.
[0005] The technical scheme of the present application is as follows:
[0006] S1: lithium battery aging experiment data collection, that is, through the way of constant current-constant voltage charging, constant current discharging, a plurality of lithium batteries are cycled for charging and discharging experiment, in each charging and discharging cycle, the constant voltage charging current data is continuously collected in the constant voltage charging stage, after the end of charging, the electrochemical impedance spectrum data in the frequency range of 0.02Hz-20kHz is collected after the lithium battery is placed for 15 minutes, and the SOH value of the lithium battery in this cycle is calculated after the end of discharging;
[0007] S2: data preprocessing and dataset construction, that is, the constant voltage charging current data and electrochemical impedance spectrum data described in step S1 are data cleaned, the differential current data is calculated according to the constant voltage charging current data, and the specific calculation method is as follows:
[0008] dI n =I n+1 -I n (1)
[0009] Wherein, dI n represents the differential current data of the nth time sampling point, I n represents the constant voltage charging current data of the nth time sampling point;
[0010] According to the constant voltage charging current data and the differential current data, the current matrix X CV is constructed, which is as follows:
[0011]
[0012] Wherein, p is the total number of collected constant voltage charging current data;
[0013] According to the real part and the imaginary part of all impedances in the electrochemical impedance spectrum data, the electrochemical impedance spectrum matrix X EIS is constructed, which is as follows:
[0014]
[0015] Wherein, Re m and Im m respectively represent the real part and the imaginary part of the impedance data corresponding to the mth frequency sampling point, and u is the total number of collected impedance data;
[0016] The current matrix X CV is divided into N sub-matrices in time dimension, and the current matrix X CV can be expressed as:
[0017]
[0018] Wherein, X CV,i represents the ith current sub-matrix, and its dimension is L cv x2, Lcv is the number of sampling points corresponding to the sub-matrix;
[0019] The electrochemical impedance spectroscopy matrix X EIS Divide it into M sub-matrices evenly according to the frequency dimension, then the electrochemical impedance spectroscopy matrix X EIS It can be expressed as:
[0020]
[0021] Among them, X EIS,j Represents the jth electrochemical impedance spectroscopy matrix, whose dimension is L eis ×2, L eis is the number of sampling points corresponding to the sub-matrix;
[0022] The current matrix and electrochemical impedance spectrum matrix divided by the submatrices are defined as and Will and Constructing an unlabeled dataset Combined with the SOH described in step S1 to form a labeled data set
[0023] S3: Construct pre-training task 1, that is, build encoder 1 and encoder 2, and convert the Input to encoder 1, encoder 1 outputs constant voltage current characteristic HF CV , the step S2 described Input to encoder 2, encoder 2 outputs EIS characteristic HF EIS , calculate HF CV Each characteristic fragment and HF EIS The cosine similarity between each feature segment in the training task is calculated, and a loss loss1 that takes into account all cosine similarities is constructed as the loss function of the pre-training task 1. The unlabeled dataset D1 described in step S2 is used to train encoder 1 and encoder 2. After the training is completed, the weight parameters of encoder 1 and encoder 2 are saved, and the unlabeled dataset D1 is input into the trained encoder 1 and encoder 2 to obtain the feature set.
[0024] S4: Construct pre-training task 2, that is, the feature HF described in step S3 CV and HF EIS In the example, a feature segment is randomly selected for masking, and the two masked features are spliced and then input into the encoder 3 based on the self-attention mechanism. The encoder 3 outputs and The fusion feature matrix of is a constant voltage current feature fused with EIS feature aging information, is an EIS feature fused with constant voltage current feature aging information, decoder 1 and decoder 2 are built, input into decoder 1, and the HF CV masked segments are reconstructed, input into decoder 2, and the HF EIS masked segments are reconstructed, thereby constructing a masked reconstruction loss loss2 of the constant voltage current feature and a masked reconstruction loss loss3 of the EIS feature, loss2 and loss3 are weighted calculated according to the correlation score of the constant voltage charging current data and the electrochemical impedance spectrum data with the SOH after the data cleaning in step S2, loss4 is obtained by taking loss2 and loss3 as a loss function of the pre-training task 2, and the encoder 3, the decoder 1 and the decoder 2 are trained using the feature set F in step S3, and the weight parameters of the encoder 3, the decoder 1 and the decoder 2 are saved after the training is completed;
[0025] S5: build and train the SOH estimation model, which includes an encoder module and an estimator, that is, the encoder 1 in step S3, the encoder 2 in step S3 and the encoder 3 in step S4 constitute the encoder module together, and the weight parameters of the encoder 1, the encoder 2 and the encoder 3 obtained in steps S3 and S4 are frozen, and the to-be-trained estimator is built behind the encoder module, which is used to establish the mapping relationship between the fusion feature matrix composed of the HF and and the SOH value, the labeled data set D2 in step S2 is divided into a training set and a test set, and the SOH estimation model including the encoder module and the estimator is trained and tested, and the SOH estimation model is saved if the test result meets the accuracy requirement;
[0026] S6: online estimate the SOH of the lithium battery, that is, the constant voltage charging current data and the electrochemical impedance spectrum data are collected in the actual charging and discharging cycle of the lithium battery, the constant voltage charging current data and the electrochemical impedance spectrum data are preprocessed according to the method in step S2, and then input into the SOH estimation model in step S5 to output the SOH estimation value.
[0027] In this scheme, the pre-training task 1 in step S3 is built, and the specific steps are as follows:
[0028] S301: build the encoder 1, and input the HF in step S2 into the encoder 1, and output the constant voltage current feature HF CV from the encoder 1, the encoder 1 linearly projects the N sub-matrices in the HF to obtain N constant voltage current feature segments with a dimension of 1×c, and the specific steps are as follows:
[0029]
[0030] where Encoder1(·) denotes the encoder 1, HF CV,i represents the i-th constant-voltage current feature segment, whose dimension is 1 x c, HF CV The dimension of HF
[0031] S302: Build an encoder 2, and input HF outputted by the encoder 2, HF EIS The encoder 2 linearly projects M sub-matrices in HF to obtain M EIS feature segments with the dimension of 1 x c, which is specifically as follows:
[0032]
[0033] where Encoder2(·) denotes the encoder 2, HF EIS,j represents the j-th EIS feature segment, whose dimension is 1 x c, HF EIS The dimension of HF
[0034] S303: Calculate the cosine similarity between each feature segment in HF CV and each feature segment in HF EIS , which is specifically as follows:
[0035]
[0036] where CS ij represents the cosine similarity between HF CV,i and HF EIS,j , HF CV,i · HF EIS,j represents the dot product of two feature segments, and ‖·‖ represents the modulus of a vector;
[0037] S304: Construct a loss loss1 that takes into account all cosine similarities, which is specifically as follows:
[0038] CL ij = 1-CS ij (9)
[0039] Q = Var({CL ij |i = 1, 2, …, N, j = 1, 2, …, M}) (10)
[0040]
[0041] where CLij represents the cosine similarity loss between HF CV,i and HF EIS,j , Var(·) represents the variance calculation function, Q represents the variance of all cosine similarity losses, λ1 is the regularization term coefficient of loss1;
[0042] S305: Train the encoder 1 and the encoder 2 using the unlabeled data set D1 described in step S2, take loss1 as the loss function of training, and update the weight parameters of the encoder 1 and the encoder 2 through the back propagation algorithm iteration, so as to complete the training of the encoder 1 and the encoder 2, save the weight parameters after the training is completed, and input the unlabeled data set D1 into the trained encoder 1 and the encoder 2 to obtain the feature set
[0043] In this scheme, the pre-training task 2 described in step S4 is constructed, and the specific steps are as follows:
[0044] S401: In the constant voltage current feature HF CV described in step S3, a feature segment is randomly selected for mask operation, that is, for each charging cycle sample, all c elements in the kth constant voltage current feature segment HF CV,k are randomly set to 0 to obtain the masked constant voltage current feature The dimension of the constant voltage current feature is N×c.
[0045] S402: In the EIS feature HF EIS described in step S3, a feature segment is randomly selected for mask operation, that is, for each charging cycle sample, all c elements in the hth EIS feature segment HF EIS,h are randomly set to 0 to obtain the masked EIS feature The dimension of the constant voltage current feature is M×c.
[0046] S403: Build an encoder 3 based on a self-attention mechanism, concatenate and into a matrix with a dimension of (N+M)×c, and input it into the encoder 3, learn the relationship between all feature segments through the self-attention mechanism, and output a fusion feature matrix, which is composed of and , wherein is the constant voltage current feature fused with the EIS feature aging information, is the EIS feature fused with the constant voltage current feature aging information, and is specifically represented as follows:
[0047]
[0048] where concat(·) denotes a concatenation function, Encoder3(·) denotes an encoder 3 based on a self-attention mechanism, and the output of Encoder3(·) is and have dimensions of Nxcand Mxc, respectively;
[0049] S404: Building a decoder 1, inputting the feature segment HF described in step S403 into the decoder 1 to reconstruct the feature segment HF CV,k described in step S401, and obtaining the output reconstruction result as The specific representation is as follows:
[0050]
[0051] where Decoder1(·) denotes the decoder 1;
[0052] According to the original value y CV,k of the a-th element in HF cv,a and the reconstructed value of the a-th element in HF , the mask reconstruction error l CV,k of the a-th element in HF cv,a is calculated, and the specific representation is as follows:
[0053]
[0054] The mask reconstruction loss loss2 of the constant-voltage current feature is constructed to describe the mask reconstruction error and error stability of all elements in the feature segment HF CV,k , and the specific representation is as follows:
[0055]
[0056] where Var(l cv,1 , l cv,2 , …, l cv,c ) denotes the calculation of the variance of the mask reconstruction error of all elements in HF CV,k , and λ2 is the regularization term coefficient of loss2;
[0057] S405: Building a decoder 2, inputting the feature segment HF described in step S403 into the decoder 2 to reconstruct the feature segment HF EIS,h described in step S402, and obtaining the output reconstruction result as The specific representation is as follows:
[0058]
[0059] where Decoder2(·) denotes the decoder 2;
[0060] According to HF EIS,h The original value y of the bth element in eis,b and The b-th reconstruction value in Calculate HF EIS,h The mask reconstruction error l of the bth element in eis,b , specifically expressed as follows:
[0061]
[0062] Construct the mask reconstruction loss loss3 of EIS feature to describe the feature fragment HF EIS,h The mask reconstruction error and error stability of all elements in are specifically expressed as follows:
[0063]
[0064] Among them, Var(l eis,1 ,l eis,2 ,…,l eis,c ) indicates the calculation of HF EIS,h The variance of the mask reconstruction error of all elements in , λ3 is the regularization coefficient of loss3;
[0065] S406: For the constant-voltage charging current data that has undergone data cleaning in step S2, calculate the mean, standard deviation, kurtosis, and skewness of the constant-voltage charging current data in each cycle; for the electrochemical impedance spectroscopy data that has undergone data cleaning in step S2, calculate the real part mean, imaginary part mean, covariance between the real part and imaginary part, and dot product between the real part and imaginary part of the electrochemical impedance spectroscopy data corresponding to each cycle to form 8 artificial features;
[0066] S407: Calculate the Pearson correlation coefficient and the Spearman correlation coefficient between the eight artificial features described in step S406 and the battery SOH, and calculate the aging correlation score Z of the vth artificial feature by combining the Softmax function. v , the specific calculation process is as follows:
[0067]
[0068] Among them, Softmax(·) is the Softmax function, γ v represents the Pearson correlation coefficient between the vth artificial feature and SOH, ρ v represents the Spearman correlation coefficient between the vth artificial feature and SOH;
[0069] S408: Add Z1-Z4 calculated in step S407 to obtain the weight a of loss2 described in S404, add Z5-Z8 calculated in step S407 to obtain the weight b of loss3 described in S405, linearly weight loss2 and loss3 according to the respective weights to obtain the joint loss loss4, as follows:
[0070] loss4 = aloss2 + bloss3 (20)
[0071] S409: Train the encoder 3, decoder 1 and decoder 2 using the feature set F described in step S3, take loss4 as the loss function of training, and update the weight parameters of the encoder 3, decoder 1 and decoder 2 through the back propagation algorithm, so as to complete the training of the encoder 3, decoder 1 and decoder 2, and save the weight parameters after the training is completed.
[0072] Compared with the prior art, the beneficial effects of the technical scheme of the present application are:
[0073] The present application designs two pre-training tasks to fuse multi-source data. By minimizing the cosine similarity loss between the constant voltage current feature segments and the EIS feature segments through pre-training task 1, the similarity of the two kinds of data in the feature space can be effectively improved, and the local aging information between the two kinds of features can be more finely aligned to obtain the corresponding and matching aging features between the constant voltage charging current and EIS; through pre-training task 2, the two kinds of features are fused by self-attention mechanism, the masked EIS feature segments are reconstructed by using the fused constant voltage current features, and the masked constant voltage current feature segments are reconstructed by using the fused EIS features. This design helps the model to learn the complementarity of the two kinds of features and to strengthen the collaborative information between the two kinds of features; the above two pre-training tasks enable the encoder module to fully fuse the aging information from the constant voltage charging current data and the EIS data, thereby improving the estimation accuracy of SOH. BRIEF DESCRIPTION OF DRAWINGS
[0074] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments described in the present application, and other drawings can also be obtained by those skilled in the art according to these drawings.
[0075] Figure 1 It is a lithium battery SOH estimation method based on pre-training fusion of multi-source data schematic diagram;
[0076] Figure 2 It is a matrix construction and division schematic diagram of electrochemical impedance spectroscopy data (taking division of 5 sub-matrices as an example);
[0077] Figure 3 Matrix construction and division diagram for constant voltage charging current data (take division of 5 sub-matrices as an example); DETAILED DESCRIPTION
[0078] In order to enable the above-mentioned objects, features and advantages of the present application to be more clearly understood, the present application will be further described below with reference to the drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0079] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application, however, the present application can also be implemented in other ways different from those described herein, therefore, the scope of protection of the present application is not limited by the specific embodiments disclosed below.
[0080] In one specific embodiment, as shown in Figure 1 A lithium battery SOH estimation method based on pre-training fusion of multi-source data, comprising the following steps:
[0081] S1: lithium battery aging experiment data acquisition, that is, through the way of constant current-constant voltage charging and constant current discharging, a plurality of lithium batteries are subjected to cyclic charging and discharging experiments, in each charging and discharging cycle, the constant voltage charging current data is continuously collected in the constant voltage charging stage, after the end of charging, the lithium battery is left for 15 minutes, and then the electrochemical impedance spectrum data in the frequency range of 0.02Hz-20kHz is collected, and the SOH value of the lithium battery in the current cycle is calculated after the end of discharging;
[0082] S2: data preprocessing and dataset construction, that is, the constant voltage charging current data and the electrochemical impedance spectrum data described in step S1 are subjected to data cleaning, the differential current data is calculated according to the constant voltage charging current data, and the specific calculation method is as follows:
[0083] dI n =I n+1 -I n (1)
[0084] Wherein, dI n represents the differential current data of the nth time sampling point, I n represents the constant voltage charging current data of the nth time sampling point;
[0085] According to the constant voltage charging current data and the differential current data, a current matrix X CV is constructed, specifically as follows:
[0086]
[0087] Wherein, p is the total number of collected constant voltage charging current data;
[0088] According to the real part and the imaginary part of all impedances in the electrochemical impedance spectrum data, an electrochemical impedance spectrum matrix X is constructed EIS , specifically as follows:
[0089]
[0090] Wherein, Re m and Im m respectively represent the real part and the imaginary part of the impedance data corresponding to the mth frequency sampling point, and u is the total number of collected impedance data;
[0091] The current matrix X CV is divided into N sub-matrices in the time dimension, and the current matrix X CV can be expressed as:
[0092]
[0093] Wherein, X CV,i represents the ith current sub-matrix, the dimension of which is L cv x 2, and L cv is the number of sampling points corresponding to the sub-matrix;
[0094] The electrochemical impedance spectrum matrix X EIS is divided into M sub-matrices in the frequency dimension, and the electrochemical impedance spectrum matrix X EIS can be expressed as:
[0095]
[0096] Wherein, X EIS,j represents the jth electrochemical impedance spectrum sub-matrix, the dimension of which is L eis x 2, and L eis is the number of sampling points corresponding to the sub-matrix;
[0097] The current matrix and the electrochemical impedance spectrum matrix divided by the sub-matrices are defined as and respectively. and are combined to form a no-label data set and a labeled data set
[0098] S3: Constructing a pre-training task 1, i.e. building an encoder 1 and an encoder 2, inputting the described in step S2 into the encoder 1, outputting the constant voltage current feature HF CV from the encoder 1, inputting the described in step S2 into the encoder 2, and outputting the EIS feature HFEIS , calculate HF CV Each characteristic fragment and HF EIS The cosine similarity between each feature segment in the training task is calculated, and a loss loss1 that takes into account all cosine similarities is constructed as the loss function of the pre-training task 1. The unlabeled dataset D1 described in step S2 is used to train encoder 1 and encoder 2. After the training is completed, the weight parameters of encoder 1 and encoder 2 are saved, and the unlabeled dataset D1 is input into the trained encoder 1 and encoder 2 to obtain the feature set.
[0099] S4: Construct pre-training task 2, that is, the feature HF described in step S3 CV and HF ESI In the example, a feature segment is randomly selected for masking, and the two masked features are spliced and then input into the encoder 3 based on the self-attention mechanism. The encoder 3 outputs and The fusion feature matrix of It is a constant voltage current feature that integrates the EIS characteristic aging information. It is an EIS feature that combines the aging information of the constant voltage and current characteristics. Decoder 1 and decoder 2 are built to Input to decoder 1, HG CV The masked fragments are reconstructed. Input to decoder 2, HF EIS The masked segments are reconstructed to construct the masked reconstruction loss loss2 of the constant voltage current feature and the masked reconstruction loss loss3 of the EIS feature. According to the correlation score between the constant voltage charging current data and the electrochemical impedance spectroscopy data after data cleaning in step S2 and the SOH, loss2 and loss3 are weighted to obtain loss4. Loss4 is used as the loss function of pre-training task 2. The feature set F described in step S3 is used to train encoder 3, decoder 1, and decoder 2. After the training is completed, the weight parameters of encoder 3, decoder 1, and decoder 2 are saved.
[0100] S5: Construct and train the SOH estimation model, which includes an encoder module and an estimator. The encoder 1 and encoder 2 described in step S3 and the encoder 3 described in step S4 together constitute the encoder module, and the weight parameters of the encoder 1, encoder 2 and encoder 3 obtained in step S3 and step S4 are frozen. The estimator to be trained is built behind the encoder module to establish the SOH estimation model described in step S4. and The mapping relationship between the fusion feature matrix and the SOH value is divided into a training set and a test set by the labeled data set D2 described in step S2, and the SOH estimation model containing the encoder module and the estimator is trained and tested, and if the test result meets the accuracy requirement, the SOH estimation model is saved;
[0101] S6: Online estimation of lithium battery SOH, that is, in the actual charging and discharging cycle of the lithium battery, the constant voltage charging current data and the electrochemical impedance spectrum data are collected, the constant voltage charging current data and the electrochemical impedance spectrum data are preprocessed according to the method of step S2, and then input into the SOH estimation model described in step S5 to output the SOH estimation value.
[0102] The pre-training task 1 described in step S3 is built as follows:
[0103] S301: Building an encoder 1, the constant voltage current feature HF described in step S2 is input into the encoder 1, and the constant voltage current feature HF CV is output by the encoder 1, the encoder 1 performs linear projection on N sub-matrices in HF to obtain N constant voltage current feature segments with a dimension of 1×c, specifically as follows:
[0104]
[0105] Wherein, Encoder1(·) represents the encoder 1, HF CV ,i represents the i-th constant voltage current feature segment, and the dimension is 1×c, and the dimension of HF CV is N×c;
[0106] S302: Building an encoder 2, the EIS feature HF described in step S2 is input into the encoder 2, and the EIS feature HF EIS is output by the encoder 2, the encoder 2 performs linear projection on M sub-matrices in HF to obtain M EIS feature segments with a dimension of 1×c, specifically as follows:
[0107]
[0108] Wherein, Encoder2(·) represents the encoder 2, HF EIS,j represents the j-th EIS feature segment, and the dimension is 1×c, and the dimension of HF EIS is M×c;
[0109] S303: Calculate the cosine similarity between each feature segment in HF CV described in step S301 and each feature segment in HF EIS described in step S302, specifically as follows:
[0110]
[0111] where CS ij represents the cosine similarity between HF CV,i and HF EIS,j , HF CV,i · HF EIS,j represents the dot product of two feature segments, and ‖·‖ represents the modulus of a vector;
[0112] S304: A loss loss1 that takes into account all cosine similarities is constructed, as follows:
[0113] CL ij = 1-CS ij (9)
[0114] Q = Var({CL ij |i = 1, 2, …, N, j = 1, 2, …, M}) (10)
[0115]
[0116] where CL ij represents the cosine similarity loss between HF CV,i and HF EIS,j , Var(·) represents a variance calculation function, Q represents the variance of all cosine similarity losses, and λ1 is the regularization term coefficient of loss1;
[0117] S305: The encoder 1 and the encoder 2 are trained using the unlabeled data set D1 described in step S2, loss1 is used as the loss function for training, and the weight parameters of the encoder 1 and the encoder 2 are iteratively updated through a backpropagation algorithm, thereby completing the training of the encoder 1 and the encoder 2. After the training is completed, the weight parameters are saved, and the unlabeled data set D1 is input into the trained encoder 1 and encoder 2 to obtain a feature set
[0118] The pre-training task 2 described in step S4 is constructed, and the specific steps are as follows:
[0119] S401: In the constant-voltage current feature GF CV described in step S3, a feature segment is randomly selected for masking operation, that is, for each charging cycle sample, all c elements in the kth constant-voltage current feature segment HF CV,k are randomly set to 0 to obtain the masked constant-voltage current feature The dimension of the masked constant-voltage current feature is N x c.
[0120] S402: In the EIS feature HF EIS described in step S3, a feature segment is randomly selected for masking operation, that is, for each charging cycle sample, all c elements in the hth EIS feature segment HF EIS,h are randomly set to 0 to obtain the masked EIS feature The dimension of is M×c.
[0121] S403: Build an encoder 3 based on the self-attention mechanism, concatenate and to form a matrix with a dimension of (N+M)×c, and then input it into the encoder 3 to learn the relationship between all feature segments through the self-attention mechanism, thereby outputting a fusion feature matrix composed of and , wherein is the constant-voltage current feature fused with the EIS feature aging information, is the EIS feature fused with the constant-voltage current feature aging information, and is specifically expressed as follows:
[0122]
[0123] wherein, concat(·) represents a concatenation function, and Encoder3(·) represents an encoder 3 based on the self-attention mechanism, and the dimensions of and output by the encoder 3 are N×c and M×c, respectively.
[0124] S404: Build a decoder 1, input described in step S403 into the decoder 1 to reconstruct the feature segment HF CV,k described in step S401, and obtain the output reconstruction result as which is specifically expressed as follows:
[0125]
[0126] wherein, Decoder1(·) represents a decoder 1.
[0127] According to the original value y cv,a of the a th element in HF CV,k and the a th reconstructed value in , the masking reconstruction error l cv,a of the a th element in HF CV,k is calculated, and is specifically expressed as follows:
[0128]
[0129] A mask reconstruction loss loss2 is constructed for the constant voltage current feature to describe the feature segment HF CV,k The mask reconstruction error and error stability of all elements in HF
[0130]
[0131] Var(l cv,1 ,l cv,2 ,…,l cv,c ) represents the variance of the mask reconstruction error of all elements in HF CV,k , and λ2 is the regularization term coefficient of loss2.
[0132] S405: Build a decoder 2, input the feature segment HF described in step S403 into the decoder 2 to reconstruct the feature segment HF EIS,h described in step S402, and obtain the output reconstruction result as The specific representation is as follows:
[0133]
[0134] Where Decoder2(·) represents the decoder 2.
[0135] According to the original value y EIS,h of the bth element in HF eis,b and the reconstructed value of the bth element in HF , the mask reconstruction error l EIS,h of the bth element in HF eis,b is calculated, and the specific representation is as follows:
[0136]
[0137] A mask reconstruction loss loss3 is constructed for the EIS feature to describe the feature segment HF EIS,h The mask reconstruction error and error stability of all elements in HF
[0138]
[0139] Var(l eis,1 ,l eis,2 ,…,l eis,c ) represents the variance of the mask reconstruction error of all elements in HF EIS,h , and λ3 is the regularization term coefficient of loss3.
[0140] S406: For the constant-voltage charging current data that has undergone data cleaning in step S2, calculate the mean, standard deviation, kurtosis, and skewness of the constant-voltage charging current data in each cycle; for the electrochemical impedance spectroscopy data that has undergone data cleaning in step S2, calculate the real part mean, imaginary part mean, covariance between the real part and imaginary part, and dot product between the real part and imaginary part of the electrochemical impedance spectroscopy data corresponding to each cycle to form 8 artificial features;
[0141] S407: Calculate the Pearson correlation coefficient and the Spearman correlation coefficient between the eight artificial features described in step S406 and the battery SOH, and calculate the aging correlation score Z of the vth artificial feature by combining the Softmax function. v , the specific calculation process is as follows:
[0142]
[0143] Among them, Softmax(·) is the Softmax function, γ v represents the Pearson correlation coefficient between the vth artificial feature and SOH, ρ v represents the Spearman correlation coefficient between the vth artificial feature and SOH;
[0144] S408: Add Z1 to Z4 calculated in step S407 to obtain the weight α of loss2 described in S404, add Z5 to Z8 calculated in step S407 to obtain the weight β of loss3 described in S405, and linearly weight loss2 and loss3 according to their respective weights to obtain the joint loss loss4, as follows:
[0145] loss4=αloss2+βloss3 (20)
[0146] S409: Use the feature set F described in step S3 to train the encoder 3, decoder 1 and decoder 2, use loss4 as the loss function of the training, iteratively update the weight parameters of the encoder 3, decoder 1 and decoder 2 through the back propagation algorithm, thereby completing the training of the encoder 3, decoder 1 and decoder 2, and save the weight parameters after the training is completed.
Claims
1. A lithium battery SOH estimation method based on pre-training fusion of multi-source data, characterized in that, The specific steps are as follows: S1: lithium battery aging experiment data collection, that is, through the way of constant current-constant voltage charging, constant current discharging, a plurality of lithium batteries are cyclically charged and discharged, in each charge and discharge cycle, the constant voltage charging current data is continuously collected in the constant voltage charging stage, after the end of charging, the lithium battery is left for 15 minutes, and then the electrochemical impedance spectrum data in the frequency range of 0.02Hz-20kHz is collected, and the SOH value of the lithium battery in the cycle is calculated after the end of discharging; S2: data preprocessing and dataset construction, that is, the constant voltage charging current data and the electrochemical impedance spectrum data described in step S1 are data cleaned, the differential current data is calculated according to the constant voltage charging current data, and the specific calculation method is as follows: dI n =I n+1 -I n wherein dI n denotes the differential current data at the n-th time sampling point, I n denotes the constant-voltage charging current data at the n-th time sampling point; According to the constant voltage charging current data and the differential current data, a current matrix X is constructed CV Specifically as follows: Wherein, p is the total number of collected constant voltage charging current data; Based on the real and imaginary parts of all impedances in the electrochemical impedance spectroscopy data, an electrochemical impedance spectroscopy matrix X is constructed EIS , as follows: where Re m and Im m respectively represent the real part and the imaginary part of the impedance data corresponding to the mth frequency sampling point, and u is the total number of the collected impedance data. The current matrix X CV is divided into N sub-matrices in the time dimension, then the current matrix X CV can be expressed as: wherein X CV,i represents the i-th current sub-matrix, whose dimension is L cv x 2, L cv is the number of sampling points corresponding to the sub-matrix; The electrochemical impedance spectroscopy matrix X EIS The electrochemical impedance spectroscopy matrix X EIS Can be expressed as: wherein X EIS,j represents the jth electrochemical impedance spectroscopy sub-matrix, whose dimension is L eis × 2, L eis is the number of sampling points corresponding to the sub-matrix; The current matrix and the electrochemical impedance spectroscopy matrix divided by the sub-matrix are defined as and and to constitute a no-label data set and the SOH described in step S1 constitute a labeled data set S3: constructing a pre-training task 1, i.e. building an encoder 1 and an encoder 2, inputting the feature set HF outputted by the encoder 1 into the encoder 2, outputting an EIS feature set HF CV from the encoder 2 inputting the feature set HF EIS outputted by the encoder 2 into the encoder 1, outputting a constant voltage current feature set HF CV , calculating the cosine similarity between each feature segment in HF EIS and each feature segment in HF EIS , constructing a loss loss1 considering all the cosine similarities as the loss function of the pre-training task 1, training the encoder 1 and the encoder 2 using the unlabeled data set D1 described in step S2, saving the weight parameters of the trained encoder 1 and the encoder 2, inputting the unlabeled data set D1 into the trained encoder 1 and the encoder 2, and obtaining a feature set HF S4: constructing a pre-training task 2, that is, from the features HF CV and HF EIS , a feature segment is randomly selected respectively to mask, the two features after masking are spliced, and then input to an encoder 3 based on a self-attention mechanism, and the encoder 3 outputs a fusion feature matrix including and , wherein is a constant voltage current feature fused with EIS feature aging information, is an EIS feature fused with constant voltage current feature aging information, a decoder 1 and a decoder 2 are built, and is input to the decoder 1 to reconstruct the masked segment of HF CV , and is input to the decoder 2 to reconstruct the masked segment of HF EIS , thereby constructing a constant voltage current feature mask reconstruction loss loss2 and an EIS feature mask reconstruction loss loss3, according to the correlation score of the constant voltage charging current data and the electrochemical impedance spectrum data after data cleaning in step S2 and the SOH, loss2 and loss3 are weighted to obtain loss4, loss4 is used as the loss function of the pre-training task 2, the encoder 3, the decoder 1 and the decoder 2 are trained using the feature set F in step S3, and the weight parameters of the encoder 3, the decoder 1 and the decoder 2 are saved after training. S5: build and train the SOH estimation model, which includes an encoder module and an estimator, i.e. the encoders 1, 2 and 3 described in steps S3 and S4 constitute the encoder module, and the weight parameters of the encoders 1, 2 and 3 obtained in steps S3 and S4 are frozen, and the to-be-trained estimator is built behind the encoder module, which is used to establish the mapping relationship between the fusion feature matrix composed of the features described in steps S3 and S4 and the SOH value, and the labeled data set D2 described in step S2 is divided into a training set and a test set, the SOH estimation model containing the encoder module and the estimator is trained and tested, and if the test result meets the accuracy requirement, the SOH estimation model is saved. and the fusion feature matrix composed of the features described in steps S3 and S4 and the SOH value, and the labeled data set D2 described in step S2 is divided into a training set and a test set, the SOH estimation model containing the encoder module and the estimator is trained and tested, and if the test result meets the accuracy requirement, the SOH estimation model is saved. S6: online estimation of lithium battery SOH, that is, in the actual charge and discharge cycle of the lithium battery, the constant voltage charging current data and the electrochemical impedance spectrum data are collected, the constant voltage charging current data and the electrochemical impedance spectrum data are preprocessed according to the method of step S2, and then input into the SOH estimation model described in step S5 to output the SOH estimation value.
2. The lithium battery SOH estimation method based on pre-training fusion of multi-source data according to claim 1, characterized in that, The specific steps of constructing the pre-training task 1 described in step S3 are as follows: S301: build an encoder 1, input the data described in step S2 to the encoder 1, and output a constant voltage current feature HF by the encoder 1 CV , the encoder 1 will linearly project N sub-matrices in the matrix to obtain N constant voltage current feature segments with a dimension of 1x c, specifically as follows: wherein Encoder1(·) denotes the encoder 1, HF CV,i represents the i-th constant-voltage current characteristic segment, whose dimension is 1 x c, HF CV whose dimension is N x c; S302: Build encoder 2, and convert the encoder described in step S2 Input to encoder 2, encoder 2 outputs EIS characteristic HF EIS , the encoder 2 will Linear projection is performed on the M sub-matrices in to obtain the corresponding M EIS feature fragments with a dimension of 1×c, as follows: wherein Encoder2(·) denotes the encoder 2, HF EIS,j denotes the j-th EIS feature segment, which has dimension 1 x c, HF EIS has dimension M x c; S303: Calculate the cosine similarity between each feature segment in the HF CV in step S301 and each feature segment in the HF EIS in step S302, specifically as follows: Among them, CS ij Indicates HF CV,i and HF EIS,j The cosine similarity between HF CV,i ·HF EIS,j represents the dot product of two feature segments, ‖·‖ represents the modulus of the vector; S304: a loss loss1 considering all cosine similarities is constructed, which is as follows: CL ij = 1 - CS ij Q = Var({CL ij i = 1,2,...,N, j = 1,2,...,M} where CL ij represents the cosine similarity loss between HF CV,i and HF EIS,j , Var(·) represents a variance calculation function, Q represents the variance of all cosine similarity losses, and λ1 is a regularization term coefficient of loss1. S305: Train the encoder 1 and the encoder 2 using the unlabeled data set D1 described in step S2, take loss1 as the loss function of training, and update the weight parameters of the encoder 1 and the encoder 2 through the back propagation algorithm, so as to complete the training of the encoder 1 and the encoder 2, save the weight parameters after the training is completed, and input the unlabeled data set D1 into the trained encoder 1 and the encoder 2 to obtain the feature set 3. The lithium battery SOH estimation method based on pre-training fusion of multi-source data according to claim 1, characterized in that, The specific steps of constructing the pre-training task 2 described in step S4 are as follows: S401: In the constant voltage current characteristic HF described in step S3 CV , a feature segment is randomly selected for mask operation, that is, for each charging cycle sample, all c elements in the kth constant voltage current characteristic segment HF CV,k are randomly set to 0 to obtain the masked constant voltage current characteristic The dimension of the constant voltage current characteristic is N×c. S402: In the EIS feature HF EIS described in step S3, a feature segment is randomly selected for masking operation, that is, for each charging cycle sample, all c elements in the hth EIS feature segment HF EIS,h are randomly set to 0 to obtain the masked EIS feature The dimension of the masked EIS feature is M x c. S403: build an encoder 3 based on a self-attention mechanism, and input the matrix of the same dimension (N+M)×c to the encoder 3 to learn the relationship between all feature fragments through the self-attention mechanism, thereby outputting a fusion feature matrix composed of and After splicing into a matrix of dimension (N+M)×c, input into the encoder 3, learn the relationship between all feature fragments through the self-attention mechanism, thereby outputting a fusion feature matrix composed of and , wherein is a constant voltage current feature fused with EIS feature aging information, is an EIS feature fused with constant voltage current feature aging information, and is specifically represented as follows: where concat(·) denotes a concatenation function, Encoder3(·) denotes an encoder 3 based on a self-attention mechanism, and the dimensions of the outputs of the encoder 3 and the decoder 3 are N x c and M x c, respectively. and the dimensions of the outputs of the encoder 3 and the decoder 3 are N x c and M x c, respectively. S404: build decoder 1, input the feature segment HF described in step S403 into the decoder 1 to reconstruct the feature segment HF Input the decoder 1 to reconstruct the feature segment HF described in step S401 CV,k The output reconstruction result is The specific expression is as follows: Wherein, Decoder1(·) represents the decoder 1; According to the original value y of the a-th element in HF CV,k cv,a and According to the reconstructed value of the a-th element in HF Calculate the mask reconstruction error l of the a-th element in HF CV,k cv,a , which is specifically represented as follows: A mask reconstruction loss loss2 is constructed for constant voltage current characteristics, which is used to describe the feature fragments HF CV,k The mask reconstruction error of all elements in the innermost element and the error stability are specifically represented as follows: where Var (l cv,1 ,l cv,2 ,…,l cv,c ) denotes the variance of the mask reconstruction error of all elements in HF CV,k , and λ2is the regularization term coefficient of loss2. S405: build decoder 2, input the feature segment HF described in step S403 into the decoder 2 to reconstruct the feature segment HF Input the decoder 2 to reconstruct the feature segment HF described in step S402 EIS,h The output reconstruction result is The specific expression is as follows: Wherein, Decoder2(·) represents the decoder 2; According to the original value y of the bth element in HF EIS,h eis,b and According to the bth reconstructed value in HF Calculate the mask reconstruction error l of the bth element in HF EIS,h eis,b , which is specifically represented as follows: The mask reconstruction loss loss3 is constructed for the EIS feature, which is used to describe the feature segment HF EIS,h The mask reconstruction error and error stability of all elements inside are specifically represented as follows: where Var (l eis,1 ,l eis,2 ,…,l eis,c ) denotes the variance of the mask reconstruction error of all elements in HF EIS,h , and λ3is the regularization term coefficient of loss3. S406: for the constant voltage charging current data cleaned in step S2, the mean, standard deviation, kurtosis and skewness of the constant voltage charging current data in each cycle are calculated, and for the electrochemical impedance spectrum data cleaned in step S2, the real part mean, imaginary part mean, covariance between the real part and the imaginary part, and dot product of the real part and the imaginary part of the electrochemical impedance spectrum data corresponding to each cycle are calculated, forming 8 artificial features; S407: Calculate the Pearson correlation coefficient and the Spearman correlation coefficient between the eight artificial features and the battery SOH described in step S406, and calculate the aging correlation score Z of the vth artificial feature combined with the Softmax function v The specific calculation process is as follows: where Softmax(·) is a Softmax function, γ v denotes the Pearson correlation coefficient between the v-th artificial feature and SOH, ρ v denotes the Spearman correlation coefficient between the v-th artificial feature and SOH; S408: adding Z1-Z4 calculated in step S407 to obtain the weight a of loss2 described in S404, adding Z5-Z8 calculated in step S407 to obtain the weight b of loss3 described in S405, linearly weighting loss2 and loss3 according to their respective weights to obtain the joint loss loss4, which is as follows: loss4=αloss2+βloss3 S409: using the feature set F described in step S3 to train the encoder 3, the decoder 1 and the decoder 2, taking loss4 as the loss function of training, and updating the weight parameters of the encoder 3, the decoder 1 and the decoder 2 through the back propagation algorithm, so as to complete the training of the encoder 3, the decoder 1 and the decoder 2, and save the weight parameters after the training is completed.
Citation Information
Patent Citations
Lithium battery SOH estimation method based on constant-voltage charging current
CN115598557A
Lithium ion battery health state estimation method based on feature extraction of auto-encoder
CN115980588A