Lithium Battery SOH Prediction Method, Device, Equipment and Medium Based on Fusion Features
By generating dynamic label mappings of adversarial networks and core density estimation, the problem of cross-domain feature distribution offset in lithium battery SOH prediction is solved, and high-precision lithium battery health status evaluation is achieved, which improves the cascade utilization effect of retired batteries.
Patent Information
- Application Number
- CN202510600304.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-05-12
AI Technical Summary
The existing lithium battery SOH prediction methods have feature distribution offset problems in cross-domain application scenarios, which makes it difficult for laboratory models to effectively migrate to actual retired battery data, resulting in prediction deviation and instability, especially when the label acquisition of retired battery data is asymmetry and operating conditions.
A feature alignment mechanism based on the difference between the generative adversarial network and the maximum mean value, combined with the dynamic label mapping method of kernel density estimation, a cross-domain prediction model is built through multi-source domain feature distribution alignment and dynamic label mapping strategies, a multi-source domain advantage feature is fused, and an adversarial training is used to reduce distribution differences and achieve accurate label conversion.
The error of cross-domain prediction is significantly reduced. The root mean square error of the fusion prediction model on the test set is reduced by more than 60%, and the average absolute error is stable within 0.5%, which improves the stability and accuracy of prediction and reduces the full-cycle label acquisition cost of retired batteries.
Smart Images

Figure CN120103200B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lithium battery SOH prediction, and in particular, to a method, device, equipment and medium for predicting lithium battery SOH based on fusion features. Background Art
[0002] The State of Health (SOH) of a lithium battery, as an important indicator for evaluating the performance degradation of the battery, plays a key role in the fields of fault warning and safety assessment. Accurately obtaining the battery health state can provide a basis for real-time monitoring of the battery management system, help to timely identify low-life batteries and formulate maintenance strategies, thereby reducing the risk of equipment failure and extending the battery life. Especially in the scenario of the cascaded utilization of retired power lithium batteries, accurate SOH prediction is of great significance for ensuring the safe operation of the battery pack and improving the resource utilization rate.
[0003] In the prior art, certain progress has been made in SOH prediction methods based on machine learning. Such methods construct health features by analyzing time-series data such as voltage and current during the charging and discharging process of the battery, and use data-driven models to realize the modeling of the capacity degradation trend. Compared with the method based on the electrochemical model, the data-driven solution does not need to rely on the knowledge of the internal aging mechanism of the battery, and can mine the battery degradation law through a large amount of historical data, and gradually becomes the mainstream research direction in this field.
[0004] However, such methods have significant limitations in cross-domain application scenarios. Especially when the model is migrated from the laboratory standard data set to the actual retired battery data, it is difficult to eliminate the problem of feature distribution shift caused by working condition differences.
[0005] Current research generally faces the challenge of inconsistent label distributions between laboratory data and retired battery data. In the laboratory environment, accurate capacity labels for the entire life cycle of the battery can be obtained through complete charge and discharge tests. However, due to the complexity of the operating environment and the constraints of test costs for actual retired batteries, only a small amount of anchor point label data can be obtained. This asymmetry in label acquisition makes it difficult for existing models to effectively fuse multi-source domain data features, and prediction biases will occur when directly migrating laboratory models. In addition, the feature distribution differences caused by different battery types and charge and discharge strategies further exacerbate the instability of cross-domain prediction, restricting the practical application effect of data-driven methods in the retired battery scenario. Summary of the Invention
[0006] The present invention provides a method, device, equipment and medium for predicting lithium battery SOH based on fusion features to improve at least one of the above technical problems.
[0007] First aspect, the present invention provides a method for predicting the SOH of a lithium battery based on fusion features, which includes steps A1 to A5, and steps S1 to S3.
[0008] A1. Obtain a first data set of the target domain and second data sets of source domains. Among them, there are at least two source domains. The data of each source domain is constructed as a second data set.
[0009] A2. Perform data preprocessing and feature extraction on the first data set and the second data sets to obtain a source domain feature data set and a target domain feature data set.
[0010] A3. Construct a cross-domain prediction model. Among them, the cross-domain prediction model includes a predictor. In the training stage, the cross-domain prediction model also includes a generator and a discriminator.
[0011] A4. According to the source domain feature data sets of different source domains and the cross-domain prediction model, train a source domain prediction model for each source domain respectively.
[0012] A5. Fuse the source domain prediction models of each source domain to obtain a fused prediction model.
[0013] S1. Obtain the data to be predicted in the target domain.
[0014] S2. Perform data preprocessing and feature extraction on the data to be predicted to obtain the features to be predicted.
[0015] S3. Input the features to be predicted into the fused prediction model to obtain the SOH prediction value.
[0016] As a further solution of the present invention, the predictor is used to predict the SOH according to the input features. The generator is used to convert the source domain features into aligned features of the target domain. The discriminator is suitable for discriminating whether the features belong to the source domain or the target domain and is used for adversarial training with the generator.
[0017] Predictor The network structure of the predictor includes: a third input layer with n neurons, a first fully connected layer with 512 neurons, a third ReLU activation function layer, a third LSTM layer with 128 neurons, a second self-attention module, a second fully connected layer with 256 neurons, a fourth ReLU activation function layer, a third output layer with 1 neuron, and a second Sigmoid activation function. Among them, the second Sigmoid activation function is used to predict the SOH. During model training, a third dropout layer with a dropout rate of 0.3 is also set after the self-attention module.
[0018] Generator The network structure includes, connected in sequence: a first input layer with n neurons, a first one-dimensional convolutional layer with 64 neurons, a convolutional kernel of 3, and a convolutional stride of 1, a first batch normalization layer, a first ReLU activation function layer, a first hidden layer with 64 neurons and equipped with a LeakyReLU activation function layer and a batch normalization layer, a first residual module with 64 neurons, a first convolutional layer with 128 neurons, a convolutional kernel of 3, and a convolutional stride of 2, a second batch normalization layer, a second ReLU activation function layer, a second residual module with 128 neurons, a first self-attention module, a first LSTM layer with 128 neurons, and a first output layer with n neurons. Among them, the first output layer is used to output the transformed target domain features. The first residual module is used to splice the features input to the first one-dimensional convolutional layer and the features output by the first hidden layer. The second residual module is used to splice the features input to the first convolutional layer and the features output by the second ReLU activation function layer. During model training, a first dropout layer with a dropout rate of 0.3 is also connected after the first LSTM layer.
[0019] Discriminator network The network structure of the discriminator network includes: a second input layer with n neurons, a second convolutional layer with 128 neurons, a convolutional kernel of 3, and a convolutional stride of 1, a third batch normalization layer, a first LeakyReLU layer with a negative slope of 0.2, a second LSTM layer with 128 neurons, a third convolutional layer with 256 neurons, a convolutional kernel of 3, and a convolutional stride of 1, a fourth batch normalization layer, a second LeakyReLU layer with a negative slope of 0.2, a second output layer with 1 neuron, and a first Sigmoid activation function. Among them, the first Sigmoid activation function is used to predict whether the features input to the discriminator belong to the source domain or the target domain. During model training, a second dropout layer with a dropout rate of 0.3 is also set after the second LSTM layer.
[0020] As a further solution of the present invention, according to the source domain feature datasets of different source domains and the cross-domain prediction model, a source domain prediction model is trained for each source domain, specifically including:
[0021] Repeat the following training steps based on the source domain feature datasets of each source domain until the training is completed to obtain the source domain prediction models of each source domain.
[0022] Obtain a preset proportion of the source domain feature dataset as the training set.
[0023] Input the features of the training set into the generator to obtain the aligned features of the target domain.
[0024] According to the aligned features, map the source domain labels of the input features to obtain the source domain mapped labels. The mapping model is: . Wherein, is the mapped label for the th iteration, is the health status extracted for the first time from the source domain data, is the th iteration of the dynamic mapping weight of the th sample, is the set of health statuses of the source domain data, represents the minimum value, represents the maximum value, is the health status extracted for the th time from the source domain data, is the kernel density (KDE) of the feature vector set of the feature within the parentheses with respect to the target domain data is the kernel density (KDE) of the feature vector set of the feature within the parentheses with respect to the source domain data th sample, is the rd source domain sample, is the th iteration of the th sample after being transformed by the generator, is a very small amount to avoid a zero denominator.
[0025] Input the aligned feature, the first data and the last data of the target domain feature dataset into the predictor to obtain the SOH prediction result.
[0026] Update the prediction model through the loss function according to the aligned feature, the source domain mapping label, and the SOH prediction result.
[0027] As a further solution of the present invention, the generator and the discriminator are combined into a feature distribution alignment module. The loss function of the domain alignment module is: . In the formula, is the adversarial training loss between the generator and the discriminator, is the MMD loss between the feature generated by the generator and the feature vector set of the target domain data, is the reconstruction loss, is the trade-off coefficient of the MMD loss, is the trade-off coefficient of the reconstruction loss.
[0028] .
[0029] In the formula, represents the expectation, is the th source domain sample, is the source domain feature dataset, Denote all source domain samples, is the th target domain sample, is the target domain feature dataset, Denote all target domain samples, is the set of feature vectors of the source domain data, is the generator, is the discriminator, is the feature after the source domain feature is transformed by the generator, is the discrimination result of the discriminator on the transformed source domain feature, is the discrimination result of the discriminator on the target domain feature.
[0030] .
[0031] In the formula, is the number of samples in the source domain dataset, is the number of samples in the target domain dataset, is the RBF kernel function, used to calculate the distribution characteristics between two feature vectors, is the th source domain sample, is the th source domain sample, is the th target domain sample, is the th target domain sample.
[0032] .
[0033] In the formula, is the feature after the source domain feature is transformed by the generator, is the set of feature vectors of the source domain data, is the square of the Euclidean distance.
[0034] The loss function of the predictor is: . In the formula, is the source domain mapping label of the th iteration, is the SOH prediction result of the aligned feature of the th iteration, is the health state extracted for the first time in the source domain data, is the SOH prediction result of the first data in the target domain feature dataset, is the health state extracted for the th time in the source domain data, is the SOH prediction result of the last data in the target domain feature dataset, is the square of the Euclidean distance.
[0035] As a further solution of the present invention, source domain prediction models of each source domain are fused to obtain a fused prediction model, which specifically includes:
[0036] Calculate the mean absolute error of the source domain prediction model of each source domain on the validation set.
[0037] According to the mean absolute error of each source domain, an error relative difference elimination strategy is adopted, and a relative difference threshold is introduced to eliminate the source domain prediction models with a relative error ratio exceeding the threshold, and an available model set is obtained. The relative error ratio of all models is: . In the formula, is the number of source domain predictors, is the -th mean absolute error of the source domain predictor, is the -th mean absolute error of the source domain predictor.
[0038] Construct available model weights according to the mean absolute error. . In the formula, is the weight of the -th available model, is the -th mean absolute error of the available model, is the available model set, is the -th mean absolute error of the available model.
[0039] Fuse the source domain prediction models of each source domain according to the available model weights to obtain a fused prediction model. . In the formula, is the fused prediction model, is the available model set, is the -th weight of the available model, is the -th available model.
[0040] Test the fused prediction model with the non-anchor data of the target domain feature dataset. If the test is qualified, the training is completed to obtain the fused prediction model; otherwise, the training is performed again.
[0041] As a further solution of the present invention, data preprocessing and feature extraction are performed on the first dataset and the second dataset to obtain a source domain feature dataset and a target domain feature dataset, which specifically includes:
[0042] Perform data preprocessing on the first data set and the second data set. Among them, the preprocessing includes removing outliers using the 3-sigma rule and performing normalization or standardization processing.
[0043] Extract features from the preprocessed data set to form a multi-dimensional feature vector. Among them, feature extraction includes extracting the mean, standard deviation, kurtosis, skewness, charging time, cumulative power, curve slope, and curve entropy according to the time series curves of voltage and current.
[0044] The multi-dimensional feature vector and the health status label form the source domain feature data set and the target domain feature data set.
[0045] In a second aspect, the present invention provides a lithium battery SOH prediction device based on fused features, which includes a training data acquisition module, a training feature extraction module, a model construction module, a training module, a fusion module, a data to be predicted acquisition module, a feature to be predicted extraction module, and a prediction module.
[0046] The training data acquisition module is used to acquire the first data set of the target domain and the second data set of the source domain. Among them, there are at least two source domains. The data of each source domain is constructed as a second data set.
[0047] The training feature extraction module is used to perform data preprocessing and feature extraction on the first data set and the second data set to obtain the source domain feature data set and the target domain feature data set.
[0048] The model construction module is used to construct a cross-domain prediction model. Among them, the cross-domain prediction model includes a predictor. In the training stage, the cross-domain prediction model also includes a generator and a discriminator.
[0049] The training module is used to train a source domain prediction model for each source domain according to the source domain feature data sets of different source domains and the cross-domain prediction model.
[0050] The fusion module is used to fuse the source domain prediction models of each source domain to obtain a fusion prediction model.
[0051] The data to be predicted acquisition module is used to acquire the data to be predicted in the target domain.
[0052] The feature to be predicted extraction module is used to perform preprocessing and feature extraction on the data to be predicted to obtain the feature to be predicted.
[0053] The prediction module is used to input the feature to be predicted into the fusion prediction model to obtain the SOH prediction value.
[0054] In a third aspect, the present invention provides a lithium battery SOH prediction device based on fusion features, which includes a processor, a memory, and a computer program stored in the memory. The computer program can be executed by the processor to implement a lithium battery SOH prediction method according to any paragraph of the first aspect.
[0055] In a fourth aspect, the present invention provides a computer-readable storage medium, which includes a stored computer program. When the computer program runs, it controls the device where the computer-readable storage medium is located to execute a lithium battery SOH prediction method according to any paragraph of the first aspect.
[0056] By adopting the above technical solutions, the present invention can achieve the following technical effects:
[0057] The lithium battery SOH prediction method based on fusion features of the present invention effectively solves the cross-domain deviation problem between laboratory data and retired battery data through multi-source domain feature distribution alignment and dynamic label mapping strategies. The feature alignment mechanism based on the generative adversarial network and maximum mean discrepancy significantly reduces the distribution differences under different working conditions, and the dynamic label mapping method combined with kernel density estimation realizes the accurate conversion of source domain labels to target domain ranges, thereby improving the adaptability of cross-domain prediction. The error screening and fusion mechanism of the multi-source domain predictor further enhances the generalization ability of the model. Through the verification set relative error threshold control and weighted average strategy, the multi-source domain dominant features are effectively integrated, ensuring the stability and accuracy of the prediction results.
[0058] This scheme realizes the accurate modeling of the degradation trend of the target domain through the limited supervision information of the anchor point labels, greatly reducing the acquisition cost of the full-cycle labels of retired batteries. The root mean square error of the fusion prediction model on the test set is reduced by more than 60% compared with the traditional single-source domain method, and the mean absolute error is stable within 0.5%, which is significantly better than the existing cross-domain prediction methods. This efficient feature engineering and model fusion strategy provides a reliable means for the health state assessment of retired lithium batteries, and has good engineering practicability while ensuring the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions of the present invention, the drawings required for the specific implementation manners of the present invention will be briefly introduced below. It should be understood that the following drawings only show some specific implementation manners of the present invention, and thus should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0060] Figure 1 It is a flowchart of the lithium battery SOH prediction method.
[0061] Figure 2 It is a schematic diagram of the model framework of the SOH prediction method for lithium batteries.
[0062] Figure 3 It is a schematic diagram of the multi-source domain fusion prediction model strategy for the SOH prediction method of lithium batteries. Specific implementation manners
[0063] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present invention.
[0064] Embodiment 1. Please refer to Figures 1 to 3 , the first embodiment of the present invention provides a method for predicting the SOH of a lithium battery based on fused features, which can be executed by a device for predicting the SOH of a lithium battery based on fused features (hereinafter referred to as: prediction device). In particular, it is executed by one or more processors in the prediction device to implement steps A1 to A5, and steps S1 to S3.
[0065] A1. Obtain a first data set of the target domain and a second data set of the source domain. Among them, there are at least two source domains. The data of each source domain is constructed as a second data set.
[0066] In this embodiment, each cycle of the battery can be used as a sample, and the effective features are extracted by observing the law of the change of the battery aging data under different working conditions as the cycle progresses. Among them, one cycle of use of the lithium battery is divided into a charging stage and a discharging stage. The charging stage value is to charge at a constant current until the cut-off voltage, and then charge at the constant voltage until the charging cut-off current. The discharging stage value is to discharge at a constant current until the discharging cut-off voltage. Each sample records the time series data of the current and voltage of one cycle.
[0067] In this embodiment, the laboratory degradation data sets of lithium batteries of different types or different working conditions are used as a second data set of a source domain. The measured degradation data set of retired lithium batteries is collected as the first data set of the target domain. The first data set and the second data set not only contain samples, but also contain the labels (i.e., health status) of the samples. Among them, the health status of the source domain is higher than that of the target domain. For example: the health status of the batteries in the source domain is generally 1 - 0.8. The health status of the batteries in the target domain is 0.9 or below 0.8.
[0068] A2. Perform data preprocessing and feature extraction on the first data set and the second data set to obtain a target domain feature data set and a source domain feature data set. Preferably, step A2 specifically includes steps A21 to A23.
[0069] A21. Perform data preprocessing on the first data set and the second data set. Among them, the preprocessing includes removing outliers using the 3-sigma rule and performing normalization or standardization processing.
[0070] A22. Extract features from the preprocessed data set to form a multi-dimensional feature vector. Among them, feature extraction includes extracting features such as mean, standard deviation, kurtosis, skewness, charging time, cumulative power, curve slope, and curve entropy from the time series curves of voltage and current, and forming these features into a multi-dimensional feature vector. It should be noted that various feature combinations and extraction methods can also be considered, including deep extraction through 1DCNN or extraction methods based on time series features, etc.
[0071] A23. The multi-dimensional feature vector and the health status label form the target domain feature data set and the source domain feature data set.
[0072] The source domain feature data set is expressed as:
[0073] 。
[0074] Among them, is the source domain feature data set, is the set of feature vectors, is the set of health statuses, is the set of feature vectors of the source domain data, is the set of health statuses of the source domain data, is the feature vector extracted once, is the health status extracted once, is the number of samples in the source domain data set, is the extracted feature vector in the source domain data, is the th extracted health status in the source domain data.
[0075] The target domain feature data set is expressed as:
[0076] 。
[0077] Among them, is the target domain feature data set, is the set of feature vectors of the target domain data, is the set of health statuses of the target domain data, is the th extracted feature vector in the source domain data, is the th extracted health status in the source domain data.
[0078] In this embodiment, the first data and the last data in the target domain feature dataset are used for training the model. The remaining data is used for testing the prediction model.
[0079] A3. Construct a cross-domain prediction model. Among them, the cross-domain prediction model includes a predictor . In the training stage, the cross-domain prediction model further includes a generator and a discriminator . The predictor is used to predict the SOH according to the input features. The generator is used to convert the source domain features into aligned features of the target domain. The discriminator is suitable for discriminating whether the features belong to the source domain or the target domain and is used for adversarial training with the generator.
[0080] The predictor is used to predict the SOH of the battery according to the input features. The network structure of the predictor includes: a third input layer with n neurons, a first fully connected layer with 512 neurons, a third ReLU activation function layer, a third LSTM layer with 128 neurons, a second self-attention module, a second fully connected layer with 256 neurons, a fourth ReLU activation function layer, a third output layer with 1 neuron, and a second Sigmoid activation function. Among them, the second Sigmoid activation function is used to predict the SOH. During model training, a third dropout layer with a dropout rate of 0.3 is also set after the self-attention module.
[0081] The generator is used to convert the features of the source domain into the features of the target domain to increase the training data of the predictor and improve the training effect of the predictor. In order to enhance the feature generation ability, a one-dimensional convolutional neural network (Conv1D) is used to capture local features, combined with a residual network (ResNet) to prevent gradient disappearance in the deep network, and the self-attention mechanism (Self-Attention) is used to extract important information of the features.
[0082] The generator The network structure of [model name] includes, connected in sequence: a first input layer with n neurons, a first one-dimensional convolutional layer with 64 neurons, a convolutional kernel of 3, and a convolutional stride of 1, a first batch normalization layer, a first ReLU activation function layer, a first hidden layer with 64 neurons and equipped with a LeakyReLU activation function layer and a batch normalization layer, a first residual module with 64 neurons, a first convolutional layer with 128 neurons, a convolutional kernel of 3, and a convolutional stride of 2, a second batch normalization layer, a second ReLU activation function layer, a second residual module with 128 neurons, a first self-attention module, a first LSTM layer with 128 neurons, and a first output layer with n neurons. Among them, the first output layer is used to output the transformed target domain features. The first residual module is used to splice the features input to the first one-dimensional convolutional layer and the features output by the first hidden layer. The second residual module is used to splice the features input to the first convolutional layer and the features output by the second ReLU activation function layer. During model training, a first dropout layer with a dropout rate of 0.3 is also connected after the first LSTM layer.
[0083] The discriminator is used to determine whether the input features belong to the source domain or the target domain. It combines one-dimensional convolution and LSTM to enhance the discrimination ability for sequence data and local features.
[0084] Discriminator network The network structure of [model name] includes: a second input layer with n neurons, a second convolutional layer with 128 neurons, a convolutional kernel of 3, and a convolutional stride of 1, a third batch normalization layer, a first LeakyReLU layer with a negative slope of 0.2, a second LSTM layer with 128 neurons, a third convolutional layer with 256 neurons, a convolutional kernel of 3, and a convolutional stride of 1, a fourth batch normalization layer, a second LeakyReLU layer with a negative slope of 0.2, a second output layer with 1 neuron, and a first Sigmoid activation function. Among them, the first Sigmoid activation function is used to predict whether the features input to the discriminator belong to the source domain or the target domain. During model training, a second dropout layer with a dropout rate of 0.3 is also set after the second LSTM layer.
[0085] The optimizations of the generator, discriminator, and predictor in this embodiment are carried out by using the Adam optimizer and the CosineAnnealingLR learning rate scheduler. Specifically, the learning rate of the generator is set to 0.0001, the learning rate of the discriminator is 0.0008, and the learning rate of the predictor is 0.0005. L2 regularization (weight decay = 1e-5) is adopted to prevent overfitting. Each optimizer adaptively adjusts the gradient to quickly and stably update the network parameters.
[0086] The LeakyReLU activation function with a slope of 0.2 is added, and Batch Normalization is applied to standardize the output of each layer to accelerate training and improve stability. To avoid overfitting, a Dropout layer is added with a dropout rate set to 20%. In addition, CosineAnnealingLR gradually reduces the learning rate with a period of Tmax = 100, and finally makes the learning rate approach 1e-6 (i.e., ), ensuring the stable convergence of the network.
[0087] A4. Train a source domain prediction model for each source domain according to the cross-domain prediction model and the source domain feature datasets of different source domains. Preferably, step A4 specifically includes steps A41 to A46.
[0088] A41. Repeatedly execute the following training steps based on the source domain feature datasets of each source domain until the training is completed to obtain the source domain prediction models of each source domain. Specifically, when the number of iterations reaches the set maximum number of iterations, the training of the source domain prediction model of a single source domain is completed.
[0089] A42. Obtain a preset proportion of the source domain feature dataset as the training set. Among them, the first preset proportion is 80%.
[0090] A43. Input the features of the training set into the generator to obtain the aligned features of the target domain.
[0091] A44. Map the source domain labels of the input features according to the aligned features to obtain the source domain mapped labels.
[0092] The label mapping model is:
[0093] .
[0094] .
[0095] In the formula, is the source domain mapped label of the th iteration, is the health state extracted for the first time in the source domain data, is the th iteration of the th sample's dynamic mapping weight, is the set of health states of the source domain data, represents the minimum value, represents the maximum value, is the health state extracted for the th time in the source domain data, is the set of feature vectors of the features in the parentheses relative to the target domain data The kernel density (KDE) of is the set of feature vectors of the features in the parentheses with respect to the source domain data The kernel density (KDE) of is the th source domain sample, is the th sample after being transformed by the generator in the th iteration,
[0096] In this embodiment, the dynamic mapping weight is obtained by calculating the ratio of the probability density of the aligned features of the output of the generator with respect to the source domain features and the target domain features. Specifically, using the generator optimized by MMD with the current iteration index output , the probability density distributions of the source domain and the target domain features are calculated through kernel density estimation.
[0097] A45. Input the aligned features, the first data and the last data of the target domain feature dataset into the predictor to obtain the SOH prediction result. In this embodiment, the first data and the last data in the target domain feature dataset are used for the training of the model. The remaining data are used for the test of the fusion prediction model.
[0098] A46. Update the prediction model through the loss function according to the aligned features, the source domain mapping label, and the SOH prediction result. Among them, the generator and the discriminator are combined into a feature distribution alignment module.
[0099] The loss function of the domain alignment module is:
[0100] .
[0101] In the formula, is the adversarial training loss between the generator and the discriminator, is the MMD loss between the features generated by the generator and the set of feature vectors of the target domain data, is the reconstruction loss, is the trade-off coefficient of the MMD loss, is the trade-off coefficient of the reconstruction loss.
[0102] .
[0103] In the formula, represents the expectation, is the th source domain sample, is the source domain feature dataset, Denote all source domain samples, is the th target domain sample, is the target domain feature dataset, Denote all target domain samples, is the set of feature vectors of the source domain data, is the generator, is the discriminator, is the feature after the source domain feature is transformed by the generator, is the discrimination result of the discriminator on the transformed source domain feature, is the discrimination result of the discriminator on the target domain feature.
[0104] .
[0105] In the formula, is the number of samples in the source domain dataset, is the number of samples in the target domain dataset, is the RBF kernel function, used to calculate the distribution characteristics between two feature vectors, is the th source domain sample, is the th source domain sample, is the th target domain sample, is the th target domain sample.
[0106] .
[0107] In the formula, is the feature after the source domain feature is transformed by the generator, is the set of feature vectors of the source domain data, is the square of the Euclidean distance.
[0108] Specifically, according to the distribution difference, data consistency difference, and discriminator output decision label result of the alignment features generated by the generator, the corresponding loss function is calculated and backpropagated. In this embodiment, adversarial training is performed on the features generated by the generator and the output of the discriminator, so an adversarial training loss is set. And, by adding an MMD loss between the generated features (i.e., the source domain features transformed by the generator) and the target domain features, the distribution difference between the generated features and the target domain features is calculated. In addition, the reconstruction loss is used to measure the difference between the two to ensure the consistency between the generated alignment features and the source domain features. Preferably, a heuristic algorithm can be used to initialize the loss function of the domain alignment module, and finally the optimal coefficient combination is determined.
[0109] The loss function of the generator is the source domain alignment feature prediction loss.
[0110] The loss function of the generator is:
[0111] ;
[0112] In the formula, is the source domain mapping label of the th iteration, is the SOH prediction result of the aligned feature of the th iteration, is the health state extracted for the first time in the source domain data, is the SOH prediction result of the first data in the target domain feature dataset, is the health state extracted for the th time in the source domain data, is the SOH prediction result of the last data in the target domain feature dataset, is the square of the Euclidean distance.
[0113] .
[0114] In the formula, is the set of feature vectors of the source domain data, is the feature after being transformed by the generator in the th iteration, is the predictor, is the feature vector extracted for the th time in the source domain data, is the feature vector extracted for the th time in the source domain data.
[0115] A5. The source domain prediction models of each source domain are fused to obtain a fused prediction model.
[0116] In this embodiment, each source domain feature dataset is divided into a training set and a validation set in a ratio of 8:2. And based on steps A1 to A5, the labeled feature training dataset of the source domain and the first data sample data and the last sample data of the target domain are simultaneously input for model training. A domain adaptation network is trained for each source domain dataset to construct a source domain prediction model. Then, based on the validation set, an error screening strategy and weight assignment are used to fuse the source domain prediction models of each source domain to obtain a fused prediction model.
[0117] The source domain prediction model and loss function of each source domain are:
[0118] .
[0119] In the formula, is the SOH prediction result of the th source domain, is the predictor for the th source domain, is the generator for the th source domain, is the th sample of the source domain training dataset, is the alignment feature of the th sample of the th source domain training dataset, is the loss function of the source domain prediction model, is the total number of samples in the source domain training dataset, is the th sample of the th source domain training dataset's SOH prediction result, is the th sample of the th source domain training dataset's source domain mapping label.
[0120] In this embodiment, by minimizing the loss function , each source domain predictor is optimized.
[0121] Preferably, step A5 specifically includes steps A51 to A55.
[0122] A51. Calculate the mean absolute error (MAE) of the source domain prediction model of each source domain on the validation set, that is, the loss function .
[0123] A52. According to the mean absolute error of each source domain, adopt the error relative difference elimination strategy, introduce the relative difference threshold , and eliminate the source domain prediction models with a relative error ratio exceeding the threshold to obtain a set of available models.
[0124] The relative error ratio of all models is:
[0125] .
[0126] In the formula, is the number of source domain predictors, is the th source domain predictor's mean absolute error, is the th source domain predictor's mean absolute error.
[0127] In this embodiment, takes the value of 0.25,
[0128] A53. Construct available model weights according to the mean absolute error.
[0129] 。
[0130] In the formula, is the weight of the th available model, is the mean absolute error of the th available model, is the set of available models, is the th available model's mean absolute error.
[0131] A54. According to the available model weights, fuse the source domain prediction models of each source domain to obtain a fused prediction model.
[0132] 。
[0133] In the formula, is the fused prediction model, is the set of available models, is the weight of the th available model, is the th available model.
[0134] A55. Test the fused prediction model with the non-anchor data of the target domain feature dataset. If the test is qualified, the training is completed and the fused prediction model is obtained; otherwise, the training is performed again.
[0135] In the previous steps, the first data and the last data of the target domain feature dataset are used as anchor data to participate in the training. In step A55, the remaining data of the target domain feature dataset are used as non-anchor data to test the fused prediction model. If the prediction accuracy of the fused prediction model is greater than the preset value, the training is completed and the fused prediction model is obtained. Otherwise, the training is performed again.
[0136] Through the previous steps, the present invention has trained a lithium battery SOH prediction model based on fused features (i.e., the fused prediction model). Next, the processing steps in the application stage of the fused prediction model will be described. The processing steps in the model application stage include step S1 to step S3.
[0137] S1. Obtain the data to be predicted in the target domain. Specifically, the data to be predicted are the time series data of the current and voltage of one cycle of the battery.
[0138] S2. Preprocess and extract features from the data to be predicted to obtain the features to be predicted. Specifically, the steps of preprocessing and feature extraction are the same as those in step A2 of the training stage, and the present invention will not elaborate here.
[0139] S3. Input the to-be-predicted feature into the fusion prediction model to obtain the SOH prediction value.
[0140] The source domain data and the target domain data are collected through different battery types and different charge-discharge conditions, so they have different statistical distributions. Through the training steps from step A1 to step A5 in the embodiments of the present invention, the difference in feature distributions between the source domain and the target domain is reduced, so as to use the predictor obtained by fusion training with the publicly available laboratory degradation data set to perform high-precision capacity estimation on the target domain data.
[0141] It should be noted that the multi-source domain fusion prediction method described in this patent is not limited to a specific combination strategy, but is applicable to all prediction methods based on model integration, including but not limited to the following variants: 1. Weighted average multi-model fusion prediction. 2. Stacked generalization multi-model fusion prediction. Bayesian model fusion method, etc.
[0142] The advantages and disadvantages of different SOH prediction methods will be illustrated with a specific case below.
[0143] As shown in Table 1, this example uses 3 publicly available laboratory data sets with different battery types and different charge-discharge condition strategies, and the SOH range is between [1 - 0.8]. As shown in Table 2, the target domain data set uses 2 retired battery data, and the anchor point label range is selected in SOH [0.8 - 0.7].
[0144] Table 1 Source domain data set
[0145]
[0146] Table 2 Target domain data set
[0147]
[0148] As shown in Table 3, the SOH prediction methods for comparison include domain-free adaptation, single-source domain adaptation, and the lithium battery SOH prediction method based on fusion features in the embodiments of the present invention (i.e., fusion domain adaptation). The evaluation indicators use the root mean square error RMSE and the mean absolute error MAE.
[0149] Table 3 Comparison of different prediction methods
[0150]
[0151] The lithium battery SOH prediction method based on fusion features in the embodiments of the present invention fuses multiple source domains to train a final fusion prediction model, and the effect is better than the domain-free adaptation SOH prediction and the single-source domain adaptation SOH prediction in most cases.
[0152] It is understandable that the prediction device can be an electronic device with computing performance such as a portable laptop computer, a desktop computer, a server, a smart phone, or a tablet computer. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0153] Embodiment 2. The second embodiment of the present invention provides a lithium battery SOH prediction device based on fusion features, which includes a training data acquisition module, a training feature extraction module, a model construction module, a training module, a fusion module, a data to be predicted acquisition module, a feature to be predicted extraction module, and a prediction module.
[0154] The training data acquisition module is used to acquire a first data set of a target domain and a second data set of a source domain. Among them, there are at least two source domains. The data of each source domain is constructed as a second data set.
[0155] The training feature extraction module is used to perform data preprocessing and feature extraction on the first data set and the second data set to obtain a source domain feature data set and a target domain feature data set.
[0156] The model construction module is used to construct a cross-domain prediction model. Among them, the cross-domain prediction model includes a predictor. In the training stage, the cross-domain prediction model further includes a generator and a discriminator.
[0157] The training module is used to train a source domain prediction model for each source domain according to the source domain feature data sets of different source domains and the cross-domain prediction model.
[0158] The fusion module is used to fuse the source domain prediction models of each source domain to obtain a fusion prediction model.
[0159] The data to be predicted acquisition module is used to acquire the data to be predicted in the target domain.
[0160] The feature to be predicted extraction module is used to perform preprocessing and feature extraction on the data to be predicted to obtain the feature to be predicted.
[0161] The prediction module is used to input the feature to be predicted into the fusion prediction model to obtain the SOH prediction value.
[0162] Embodiment 3. The third embodiment of the present invention provides a lithium battery SOH prediction device based on fusion features, which includes a processor, a memory, and a computer program stored in the memory. The computer program can be executed by the processor to implement a lithium battery SOH prediction method according to any paragraph of Embodiment 1.
[0163] Embodiment 4. The fourth embodiment of the present invention provides a computer-readable storage medium, which includes a stored computer program. When the computer program runs, it controls the device where the computer-readable storage medium is located to execute a method for predicting the SOH of a lithium battery based on fusion features as described in any section of Embodiment 1.
[0164] In several embodiments provided by the embodiments of the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device and method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0165] In addition, the functional modules in each embodiment of the present invention can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.
[0166] When the above-mentioned function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media that can store program codes such as USB flash drives, mobile hard disks, read-only memories, random access memories, magnetic disks, or optical discs. It should be noted that in this article, the terms "including", "comprising", or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article, or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article, or device including the said element.
[0167] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the", and "said" used in the embodiments of the present invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0168] It should be understood that the term "and / or" used herein is only a description of the associated relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: the situation where A exists alone, the situation where A and B exist simultaneously, and the situation where B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.
[0169] Depending on the context, the word "if" as used herein can be interpreted as "when", "while", "in response to determining", or "in response to detecting". Similarly, depending on the context, the phrase "if determined" or "if detected (stated condition or event)" can be interpreted as "when determined", "in response to determining", "when detecting (stated condition or event)", or "in response to detecting (stated condition or event)".
[0170] The "first / second" mentioned in the embodiments is only used to distinguish similar objects and does not represent a specific order for the objects. It can be understood that the "first / second" can be interchanged in the specific order or sequence when permitted. It should be understood that the objects distinguished by the "first / second" can be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in an order other than those illustrated or described herein.
[0171] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, various modifications and changes can be made to the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for predicting the SOH of a lithium battery based on fusion features, characterized in that, Comprising: Obtain a first data set of the target domain and second data sets of source domains; wherein, there are at least two source domains; the data of each source domain is constructed as a second data set; Perform data preprocessing and feature extraction on the first data set and the second data sets to obtain a source domain feature data set and a target domain feature data set; Construct a cross-domain prediction model; wherein, the cross-domain prediction model includes a predictor; during the training phase, the cross-domain prediction model further includes a generator and a discriminator; According to the source domain feature data sets of different source domains and the cross-domain prediction model, train a source domain prediction model for each source domain respectively; Fuse the source domain prediction models of each source domain to obtain a fused prediction model; Obtain the data to be predicted in the target domain; Perform preprocessing and feature extraction on the data to be predicted to obtain the features to be predicted; Input the features to be predicted into the fused prediction model to obtain the SOH prediction value; According to the source domain feature data sets of different source domains and the cross-domain prediction model, training a source domain prediction model for each source domain respectively specifically includes: Repeat the following training steps based on the source domain feature data sets of each source domain respectively until the training is completed to obtain the source domain prediction models of each source domain; Obtain a preset proportion of the source domain feature data set as the training set; Input the features of the training set into the generator to obtain the aligned features of the target domain; Map the source domain labels of the input features according to the alignment features to obtain source domain mapped labels; the mapping model is: ; where is the label after mapping in the th iteration, is the health status extracted for the first time in the source domain data, is the th iteration of the th sample's dynamic mapping weight, is the set of health statuses of the source domain data, represents the minimum value, represents the maximum value, is the health status extracted for the th time in the source domain data, is the set of feature vectors of the features in the parentheses relative to the target domain data 's kernel density (KDE), is the set of feature vectors of the features in the parentheses relative to the source domain data 's kernel density (KDE), is the th source domain sample, is the th iteration of the th sample's feature after being transformed by the generator, is a very small amount to avoid a zero denominator; Input the aligned features, as well as the first data and the last data of the target domain feature data set, into the predictor to obtain the SOH prediction result; Update the prediction model through the loss function according to the aligned features, the source domain mapping labels, and the SOH prediction result.
2. The method for predicting the SOH of a lithium battery based on fusion features according to claim 1, wherein, The predictor is used to predict the SOH according to the input features; Predictor The network structure of which includes: a third input layer with n neurons, a first fully connected layer with 512 neurons, a third ReLU activation function layer, a third LSTM layer with 128 neurons, a second self-attention module, a second fully connected layer with 256 neurons, a fourth ReLU activation function layer, a third output layer with 1 neuron, and a second Sigmoid activation function; wherein, the second Sigmoid activation function is used to predict the SOH; during model training, a third dropout layer with a dropout rate of 0.3 is further arranged after the self-attention module.
3. A method for predicting the state of health (SOH) of a lithium battery based on fusion features according to claim 2, characterized in that, The generator is used to convert the source domain features into the aligned features of the target domain; The discriminator is suitable for discriminating whether the features belong to the source domain or the target domain and is used for adversarial training with the generator; Generator The network structure of includes, connected in sequence: a first input layer with n neurons, a first one-dimensional convolutional layer with 64 neurons, a convolutional kernel of 3, and a convolutional stride of 1, a first batch normalization layer, a first ReLU activation function layer, a first hidden layer with 64 neurons and equipped with a LeakyReLU activation function layer and a batch normalization layer, a first residual module with 64 neurons, a first convolutional layer with 128 neurons, a convolutional kernel of 3, and a convolutional stride of 2, a second batch normalization layer, a second ReLU activation function layer, a second residual module with 128 neurons, a first self-attention module, a first LSTM layer with 128 neurons, and a first output layer with n neurons; wherein, the first output layer is used to output the transformed target domain features; the first residual module is used to splice the features input to the first one-dimensional convolutional layer and the features output by the first hidden layer; the second residual module is used to splice the features input to the first convolutional layer and the features output by the second ReLU activation function layer; during model training, a first dropout layer with a dropout rate of 0.3 is further connected after the first LSTM layer; Discriminator network The network structure of which includes: a second input layer with n neurons, a second convolutional layer with 128 neurons, a convolutional kernel of 3, and a convolutional stride of 1, a third batch normalization layer, a first LeakyReLU layer with a negative slope of 0.2, a second LSTM layer with 128 neurons, a third convolutional layer with 256 neurons, a convolutional kernel of 3, and a convolutional stride of 1, a fourth batch normalization layer, a second LeakyReLU layer with a negative slope of 0.2, a second output layer with 1 neuron, and a first Sigmoid activation function; wherein, the first Sigmoid activation function is used to predict whether the features input to the discriminator belong to the source domain or the target domain; during model training, a second dropout layer with a dropout rate of 0.3 is also set after the second LSTM layer.
4. A method for predicting the state of health (SOH) of a lithium battery based on fusion features according to claim 1, characterized in that, The generator and the discriminator are combined into a feature distribution alignment module; The loss function of the domain alignment module is: ; In the formula, is the adversarial training loss between the generator and the discriminator, is the MMD loss between the features generated by the generator and the set of feature vectors of the target domain data, is the reconstruction loss, is the trade-off coefficient of the MMD loss, is the trade-off coefficient of the reconstruction loss; ; Wherein, is expressed as expected, is the th source domain sample, is the source domain feature dataset, represents all source domain samples, is the th target domain sample, is the target domain feature dataset, represents all target domain samples, is the set of feature vectors of the source domain data, is the generator, is the discriminator, is the feature after the source domain feature is transformed by the generator, is the discrimination result of the discriminator on the transformed source domain feature, is the discrimination result of the discriminator on the target domain feature; ; Wherein, is the number of samples in the source domain dataset, is the number of samples in the target domain dataset, is the RBF kernel function used to calculate the distribution characteristics between two feature vectors, is the th source domain sample, is the th source domain sample, is the th target domain sample, is the th target domain sample; ; In the formula, is the feature after the source domain feature is transformed by the generator, is the set of feature vectors of the source domain data, is the square of the Euclidean distance; The loss function of the predictor is: ; In the formula, is the source domain mapping label for the -th iteration, is the SOH prediction result of the aligned feature for the -th iteration, is the health state extracted for the first time from the source domain data, is the SOH prediction result of the first data in the target domain feature dataset, is the health state extracted for the -th time from the source domain data, is the SOH prediction result of the last data in the target domain feature dataset, is the square of the Euclidean distance.
5. A method for predicting the state of health (SOH) of a lithium battery based on fusion features according to any one of claims 1 to 4, characterized in that, Fusing the source domain prediction models of each source domain to obtain a fused prediction model specifically includes: Calculate the mean absolute error of each source domain prediction model on the validation set; According to the mean absolute error of each source domain, an error relative difference elimination strategy is adopted, and a relative difference threshold is introduced , eliminate the source domain prediction models with relative error ratios exceeding the threshold, and obtain a set of available models; the relative error ratios of all models are: ; where is the number of source domain predictors, is the th mean absolute error of the source domain predictor, is the th mean absolute error of the source domain predictor; Construct available model weights according to the mean absolute error; ; where, is the weight of the th available model, is the mean absolute error of the th available model, is the set of available models, is the mean absolute error of the th available model; Fuse the source domain prediction models of each source domain according to the available model weights to obtain a fused prediction model; ; where is the fused prediction model, is the set of available models, is the weight of the th available model, is the th available model; Test the fused prediction model with the non-anchor data of the target domain feature data set; if the test is qualified, the training is completed to obtain the fused prediction model, otherwise, train again.
6. A method for predicting the state of health (SOH) of a lithium battery based on fusion features according to any one of claims 1 to 4, characterized in that Performing data preprocessing and feature extraction on the first data set and the second data sets to obtain a source domain feature data set and a target domain feature data set specifically includes: Perform data preprocessing on the first data set and the second data sets; wherein, the preprocessing includes removing outliers using the 3-sigma rule and performing normalization or standardization processing; Perform feature extraction on the preprocessed data sets to form multi-dimensional feature vectors; wherein, the feature extraction includes extracting the mean, standard deviation, kurtosis, skewness, charging time, cumulative power, curve slope, and curve entropy according to the time series curves of voltage and current; The multi-dimensional feature vectors and the health state labels form the source domain feature data set and the target domain feature data set.
7. A lithium battery SOH prediction device based on fusion features, which is adapted to execute a lithium battery SOH prediction method based on fusion features according to any one of claims 1 to 6, characterized in that Comprising: A training data acquisition module for acquiring a first data set of a target domain and second data sets of source domains; wherein there are at least two source domains; the data of each source domain is constructed as a second data set; A training feature extraction module for performing data preprocessing and feature extraction on the first data set and the second data sets to obtain a source domain feature data set and a target domain feature data set; A model construction module for constructing a cross-domain prediction model; wherein the cross-domain prediction model includes a predictor; in the training phase, the cross-domain prediction model further includes a generator and a discriminator; A training module for training a source domain prediction model for each source domain respectively according to the source domain feature data sets of different source domains and the cross-domain prediction model; A fusion module for fusing the source domain prediction models of each source domain to obtain a fusion prediction model; A data to be predicted acquisition module for acquiring data to be predicted in the target domain; A feature extraction module for the data to be predicted for performing preprocessing and feature extraction on the data to be predicted to obtain features to be predicted; A prediction module for inputting the features to be predicted into the fusion prediction model to obtain an SOH prediction value.
8. A lithium battery SOH prediction device based on fusion features, characterized in that, It includes a processor, a memory, and a computer program stored in the memory; the computer program can be executed by the processor to implement a method for predicting the SOH of a lithium battery based on fusion features according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein when the computer program runs, it controls the device where the computer-readable storage medium is located to execute a method for predicting the SOH of a lithium battery based on fusion features according to any one of claims 1 to 6.
Citation Information
Patent Citations
Charge state prediction model training method, prediction method, equipment and storage medium
CN115859100A
Lithium ion battery capacity estimation method based on multi-source weighted domain self-adaption
CN117169728A