Method for predicting SOH of battery based on HS-MOE model and EIS data

By adopting the HS-MOE model in battery SOH prediction and combining CNN and Transformer models to build a multi-level expert network, the problems of insufficient generalization capabilities and overfitting of traditional models are solved, and more efficient and accurate battery state health is achieved. predict.

CN118980935APending Publication Date: 2024-11-19NANTONG LE CHUANGXIN ENERGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411089357.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

Traditional machine learning models have limited generalization capabilities when predicting battery state health (SOH), which can easily lead to overfitting, and are not efficient when processing complex and large-scale data, making it difficult to effectively capture the changes in battery SOH.

Method used

Using prediction methods based on HS-MOE model and EIS data, combined with CNN and Transformer models, a multi-level expert network structure is constructed. Through sparse activation mechanism and multi-layer perceptron gated network, the spatial and temporal related characteristics of battery EIS data are extracted. , realize accurate prediction of battery SOH.

Benefits of technology

It improves the expression ability and prediction accuracy of the model, reduces the risk of overfitting, significantly improves the computing efficiency and robustness, can more accurately capture the changing characteristics of the battery SOH, and provide more reliable predictions of battery health status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118980935A_ABST
    Figure CN118980935A_ABST
Patent Text Reader

Abstract

The invention discloses a battery SOH prediction method based on an HS-MOE model and EIS data. The method comprises the following steps: S1, testing and collecting battery EIS and SOH data; s2, constructing an HS-MOE model, wherein the HS-MOE model comprises two layers of multi-expert models and a gating network model, and each layer comprises a plurality of expert sub-models and one gating network model; and in each expert hierarchy, each sub model is a CNN (Content Next Network)-Transform model. And S3, training and verifying the HS-MOE model: realizing and training a model code on a Keras platform, and dividing training data into a training set and a test set according to a proportion of 8: 2. And S4, predicting the SOH of the battery: deploying after model training is completed, and predicting the SOH of the battery. According to the method, the SOH of the battery is predicted by using the EIS data of the battery based on the HS-MOE model, the expression ability and prediction precision of the model are improved, and the robustness and generalization ability of the model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of electrochemical technology, in particular to a method for predicting battery SOH based on a HS-MOE model and EIS data. Background Art

[0002] The health of the battery, namely the "State of Health" (SOH), is a key indicator to measure the performance degradation and remaining service life of the battery. The importance of SOH is mainly reflected in the following aspects: it reveals the degree of battery aging, provides a basis for judging when to replace the battery, and helps to evaluate the remaining capacity of the battery. In addition, SOH plays a vital role in optimizing battery management strategies, analyzing potential battery failures, evaluating battery safety, and predicting the remaining service life of the battery. Predicting the state of health (SOH) of the battery is of great importance in practical applications.

[0003] Electrochemical impedance spectroscopy (EIS) is an effective method for analyzing the electrochemical reactions inside batteries. When the active substances in the battery decrease and the performance declines, the EIS curve will also change. Therefore, using EIS data to predict SOH is a feasible method.

[0004] Typically, we use EIS data to train machine learning algorithms, such as neural networks or support vector machines, to capture the changing patterns of battery SOH and make predictions.

[0005] Traditional machine learning models often use a single model to fit the entire data set, which is inadequate when faced with complex and highly heterogeneous data. Such models have limited generalization capabilities, are prone to overfitting problems, and are inefficient when processing large-scale data.

[0006] The Sparse Mixture of Experts (SMOE) model is a machine learning architecture designed for complex prediction and classification problems. The core of the model is to use multiple "expert" sub-models, each of which specializes in processing a specific part of the dataset or a specific type of input. The prediction results of these sub-models are weighted and aggregated through a gating network to obtain the final prediction.

[0007] The "sparse" nature of SMOE is reflected in that, in each prediction, not all expert sub-models are activated, but only a part of them are selected to participate in the calculation. This selective activation mechanism greatly reduces the computing cost and improves the operational efficiency of the model.

[0008] Usually, this selection is achieved through the Top-K strategy, that is, only the K sub-models with the highest weights are selected to participate in the prediction process.

[0009] The Hierarchical Sparse Mixture of Experts (HS-MOE) is an extension of the Sparse Mixture of Experts (SMOE). By introducing multiple levels of experts and gating networks, the model can better handle complex, multi-level tasks. The structure of this model is similar to a tree-like hierarchy, in which each layer contains multiple expert networks and gating networks.

[0010] Common deep learning models and their functions are: Convolution neural network (CNN): CNN can be used to extract the spatial features of EIS. Transformer model: Transformer can use multi-head attention mechanism and feedforward network to learn the feature representation of input data. Summary of the invention

[0011] In order to solve the above technical problems, the present invention provides a method for predicting battery SOH based on HS-MOE model and EIS data, and uses battery EIS data to predict battery SOH. In order to improve the prediction accuracy of the model, the present invention uses a combination of CNN and Transformer to construct a HS-MOE model, and uses battery EIS data to predict battery SOH, which can automatically predict the complex mapping relationship between EIS and SOH.

[0012] The technical solution adopted by the present invention to solve its technical problem is: A method for predicting battery SOH based on HS-MOE model and EIS data mainly includes the following steps: Step S1. Test and collect battery EIS and SOH data: Use professional impedance spectrum test instrument, covering the frequency range of 10 -2 HZ to 10 5 HZ, select 5 to 60 frequency values ​​at a certain interval in the middle of the frequency range, preferably 60 as samples. Record the real and imaginary data of the impedance corresponding to each frequency, as well as the target value to be predicted.

[0013] Step S2. Construct HS-MOE model: The HS-MOE model contains 2 layers of multi-expert models and a gated network model. Each layer contains multiple expert sub-models and a gated network model. In each expert layer, each sub-model is a CNN-Transformer model. CNN automatically learns the spatial correlation of input data and extracts high-level abstract features. The CNN model extracts the spatial features of the input data, and the Transformer model models the time-related patterns of the battery EIS data.

[0014] Furthermore, the CNN model includes a convolution layer and a maximum pooling layer, the activation function is the relu function, the number of filters is set to 32, and the kernel size is 1.

[0015] Furthermore, the gated network model adopts a multilayer perceptron model, which is a 3-layer network structure. The input layer receives input data, the middle layer is a 32-dimensional vector, and the output layer is a 3-dimensional vector, which corresponds to the weights of the three expert sub-models, and is weighted and summed. The sum of the three weights is 1.

[0016] Furthermore, the weighted summation comprises the following steps: Step 1: The outputs of the three expert sub-models of the first level are output1, output2 and output3 respectively. These three outputs are all high-dimensional vectors. The present invention takes 32 dimensions as an example to represent the feature representation of each sub-expert model for the input data; The output of the gating network at the first level is a 3D vector, which corresponds to the weights of the three expert sub-models, and the sum of the three weights is 1; Select the outputs of the two experts with the highest probability and perform weighted summation with the corresponding weights to obtain the comprehensive feature representation of the first-level expert layer; Step 2: The comprehensive feature representation of the first-level expert layer is input into the second-level expert model and the gating network model as input data; The outputs of the three expert sub-models at the second level are SOH_1, SOH_2, and SOH_3. These three outputs are all continuous variables, representing the results of each expert's prediction of SOH; The output of the second-level gating network is a 3D vector, which corresponds to the weights of the three expert sub-models, and the sum of the three weights is 1; The outputs of the two experts with the highest probability are selected and weighted summed with the corresponding weights to obtain the final predicted value SOH.

[0017] Step S3. Training and verifying the HS-MOE model: The present invention implements the HS-MOE model code and trains it on the Keras platform. The training data is divided into a training set and a test set in a ratio of 8:2. The model is trained on the training set, and the model is verified on the test set.

[0018] Furthermore, the number of training epochs is 100, and the number of batch samples is batch_size=32. The optimizer for model training is the adam algorithm, and the loss function is the mean square error.

[0019] Step S4. Predicting battery SOH: After the HS-MOE model is trained, if the model effect is good, the HS-MOE model can be deployed and the battery SOH can be predicted using HS-MOE.

[0020] Furthermore, the weighted sum of the two sub-expert models with the highest probability in the second expert layer is the SOH prediction value.

[0021] The beneficial effects of the present invention are The hybrid expert model HS-MOE based on CNN-Transformer in this invention can improve the model's expressiveness and prediction accuracy when predicting battery SOH, improve the robustness and generalization ability of the overall model, and reduce the risk of overfitting. The specific technical advantages are as follows: 1. Multi-level feature extraction: The HS-MoE model can extract and combine complex EIS data features layer by layer through a multi-level structure, enabling the model to better understand and process the multi-level characteristics of the data.

[0022] 2. Enhanced model expression ability: The multi-level structure makes the model more expressive and can more accurately capture the changing characteristics of battery SOH.

[0023] 3. High computational efficiency: Through the sparse selection mechanism, only part of the expert network is activated in each layer, which significantly reduces the amount of calculation and improves the training and prediction efficiency of the model.

[0024] 4. Avoid overfitting: The sparse selection mechanism helps avoid overfitting because the model does not rely on the output of all experts, but instead selects the most relevant experts for combination.

[0025] 5. Expert model combining CNN and Transformer: In this combined model, CNN is responsible for extracting the spatial features of EIS data, while Transformer is used to capture the time series pattern of battery EIS data. This CNN-Transformer fusion model performs better in feature extraction and robustness. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a structural diagram of the battery SOH prediction model based on the HS-MOE model and EIS of the present invention.

[0027] Figure 2 It is the overall flow chart of battery SOH prediction based on HS-MOE model and EIS of the present invention.

[0028] Figure 3 It is a schematic diagram of convolution calculation.

[0029] Figure 4 It is a schematic diagram of pooling calculation.

[0030] Figure 5 This is the Transformer model structure diagram.

[0031] Figure 6 It is a structural diagram of the gated network model.

[0032] Figure 7 This is a sample diagram of battery SOH prediction results based on the HS-MOE model and EIS. DETAILED DESCRIPTION

[0033] refer to Figure 1 , the input data is the EIS data of the battery. EIS consists of real and imaginary parts. real_1 to real_m represent the real data of EIS, imaginary_1 to imaginary_m represent the imaginary data of EIS, and m represents the number of frequencies of EIS; Next are the multi-level expert layers and gated network layers. The present invention takes a two-level expert layer and a gated network layer as an example; each level takes three CNN-Transformer expert sub-models and a gated network based on a multi-layer perceptron (MLP) as an example; each level selects the two expert sub-models with the highest probability to participate in the calculation; the input data is input into the three expert sub-models respectively, and the corresponding features are extracted from different angles.

[0034] The outputs of the three expert sub-models of the first level are output1, output2 and output3, and these three outputs are all high-dimensional vectors. The present invention takes 32 dimensions as an example, which respectively represent the feature representation of each sub-expert model for the input data; the output of the gated network of the first level is a 3-dimensional vector, which corresponds to the weights of the three expert sub-models, and the sum of the three weights is 1. The outputs of the two experts with the highest probability are selected and weighted summed with the corresponding weights to obtain the comprehensive feature representation of the first level of the expert layer.

[0035] Then the comprehensive feature representation of the first-level expert layer is used as input data and input into the expert model and gated network model of the second level; the outputs of the three expert sub-models of the second level are SOH_1, SOH_2 and SOH_3, and these three outputs are all continuous variables, representing the results of each expert's prediction of SOH; the output of the gated network of the second level is a 3D vector, corresponding to the weights of the three expert sub-models, and the sum of the three weights is 1. The outputs of the two experts with the highest probability are selected and weighted summed with the corresponding weights to obtain the final predicted value SOH.

[0036] refer to Figure 2 The specific implementation process of the present invention is as follows: Step S1. Test and collect battery EIS and SOH data: Testing and collecting battery EIS data requires professional impedance spectrum test instruments and needs to cover a certain frequency range. The frequency range can be set to 10 -2 HZ to 10 5 HZ, multiple frequency values ​​are selected at a certain interval in the middle of the frequency range, and the frequency values ​​are generally selected from 5 to 60. The present invention selects 60 as a sample.

[0037] When collecting data, it is necessary to record the real and imaginary data of the impedance corresponding to each frequency, as well as the target value to be predicted, which is the corresponding battery SOH.

[0038] Step S2. Constructing HS-MOE model: The HS-MOE model includes 2 layers of multi-expert models and a gated network model, each of which includes multiple expert sub-models and a gated network model. In each expert level, each sub-model is a CNN-Transformer model. CNN can automatically learn the spatial correlation of input data and extract high-level abstract features. The present invention uses 3 expert sub-models, each of which is a CNN-Transformer model. The CNN model extracts the spatial features of the input data, and the Transformer model models the time-correlated pattern of the battery EIS data.

[0039] The CNN model used in the present invention includes a convolution layer and a maximum pooling layer, the activation function is the relu function, the number of filters is set to 32, and the kernel size is 1; the present invention adopts a 1-layer Transformer structure, the parameters d_model is 32, num_heads is 4, and dff is 1. d_model represents the dimension of feature embedding; num_heads represents the number of heads of the multi-head attention mechanism; dff represents the step size of the residual connection.

[0040] The gated network model adopts a multi-layer perceptron model, which is a 3-layer network structure. The input layer receives input data, the middle layer is a 32-dimensional vector, and the output layer is a 3-dimensional vector, which corresponds to the weights of the three expert sub-models, and the sum of the three weights is 1.

[0041] The CNN structure of the present invention includes 1 convolution layer and a maximum pooling layer, the activation function of the convolution layer is the relu function, the number of filters is set to 32, and the kernel size is 1.

[0042] refer to Figure 3 In the convolution layer, there is a 1×6×6 rectangle as input data, called the input feature map. It is convolved through a 3×3 filter (also called a convolution kernel), that is, the tensor product is calculated starting from the 3×3 field area in the upper left corner of the input, and each time the calculation is completed, it moves to the right with a stride of 1. After completing this calculation, a 1×4×4 output feature map, namely Result, is obtained.

[0043] refer to Figure 4 The pooling layer performs nonlinear downsampling on the input and takes the maximum value (Max Pooling) or the average value (Avg Pooling) in the local neighborhood as the output. The size of the pooling input feature map is 4×4, the size of the maximum pooling and average pooling convolution kernels are both 2×2, and the size of the pooling output feature map is 2×2.

[0044] Each convolution layer can extract high-level features of input data, and the pooling layer can downsample and reduce the data dimension. The present invention adopts the maximum pooling method.

[0045] refer to Figure 5 The main structure and functions of the Transformer model are as follows: (1) Positional Encoding: Provides sequential information for the input sequence to help Attention learn sequence order features.

[0046] (2) Multi-Head Attention Mechanism: This module is used to learn the correlation between different positions of the input sequence and obtain the feature representation of the input.

[0047] (3) Feed Forward Network: This module performs nonlinear transformation on the output of the attention module to learn more complex feature representations.

[0048] (4) Residual connection and Layer Norm layer (Add & Norm): Residual connection Add is used to avoid the gradient vanishing problem in deep networks; Layer Norm is used to regularize the model, speed up training, and increase model stability.

[0049] refer to Figure 6 The gated network model adopts a multi-layer perceptron model, which is a 3-layer network structure. The input layer receives input data, the middle layer is a 32-dimensional vector, the activation function is the relu function, and the output layer is a 3-dimensional vector. The activation function is softmax, which corresponds to the weights of the three expert sub-models, and the weighted summation is performed. The sum of the three weights is 1.

[0050] Furthermore, the weighted summation comprises the following steps: Step 1: The outputs of the three expert sub-models of the first level are output1, output2 and output3 respectively. These three outputs are all high-dimensional vectors. The present invention takes 32 dimensions as an example to represent the feature representation of each sub-expert model for the input data; The output of the gating network at the first level is a 3D vector, which corresponds to the weights of the three expert sub-models, and the sum of the three weights is 1; Select the outputs of the two experts with the highest probability and perform weighted summation with the corresponding weights to obtain the comprehensive feature representation of the first-level expert layer; Step 2: The comprehensive feature representation of the first-level expert layer is input into the second-level expert model and the gating network model as input data; The outputs of the three expert sub-models at the second level are SOH_1, SOH_2, and SOH_3. These three outputs are all continuous variables, representing the results of each expert's prediction of SOH; The output of the second-level gating network is a 3D vector, which corresponds to the weights of the three expert sub-models, and the sum of the three weights is 1; The outputs of the two experts with the highest probability are selected and weighted summed with the corresponding weights to obtain the final predicted value SOH.

[0051] Step S3. Training and verifying the HS-MOE model: The present invention implements the HS-MOE model code and trains it on the Keras platform. The training data is divided into a training set and a test set in a ratio of 8:2. The model is trained on the training set, and the model is verified on the test set.

[0052] Furthermore, the number of training epochs is 100, and the number of batch samples is batch_size=32. The optimizer for model training is the adam algorithm, and the loss function is the mean square error.

[0053] Step S4. Predicting battery SOH: After the HS-MOE model is trained, if the model effect is good, the HS-MOE model can be deployed and the battery SOH can be predicted using HS-MOE.

[0054] Furthermore, the weighted sum of the two sub-expert models with the highest probability in the second expert layer is the SOH prediction value. Example

[0055] 1. Prediction data display The present invention tests the effect on a public data set (https: / / github.com / YunweiZhang / ML-identify-battery-degradation) and uses the impedance data therein to predict the battery SOH. Referring to Table 1, there are 1358 battery EIS and SOH data. EIS has 120 features, and the feature numbers are 1 to 120. The first 60 features are the real part data of the impedance data corresponding to the frequency from high to low, and the last 60 features are the imaginary part data of the impedance data corresponding to the frequency from high to low.

[0056]

[0057] In Table 1, f1 to f120 represent EIS frequency characteristics, and Capacity here represents the maximum capacity of the battery, namely SOH.

[0058] 2.SOH prediction results display The mean of the test set of battery capacity is 30.6249, the standard deviation is 4.1309, and the mean of the prediction set is 30.5591, the standard deviation is 4.1516, which shows that the data distribution of the prediction results is basically consistent with the data distribution of the real data.

[0059] The root mean square error between the prediction set and the test set of battery SOH is only 0.296, indicating that the prediction effect of the model is good.

[0060] The prediction results are shown in Table 2 below.

[0061] The prediction results are as follows: Figure 7 As shown, Figure 7 The solid line in the upper middle represents the true value, the dotted line represents the predicted value, and the solid square represents the error value. The numbers represent the true values. Figure 7 It can be seen that the prediction effect is good.

Claims

1. A method for predicting battery SOH based on HS-MOE model and EIS data, characterized in that: The steps include: Step S1. Test and collect battery EIS and SOH data: Use professional impedance spectrum test instrument, covering the frequency range of 10 -2 HZ to 10 5 HZ, select 5 to 60 frequency values ​​at a certain interval in the middle of the frequency range, preferably 60 as samples; record the real and imaginary data of the impedance corresponding to each frequency, as well as the target value to be predicted; Step S2. Constructing the HS-MOE model: The HS-MOE model includes a 2-layer multi-expert model and a gated network model, each layer includes multiple expert sub-models and a gated network model; in each expert layer, each sub-model is a CNN-Transformer model; CNN automatically learns the spatial correlation of input data and extracts high-level abstract features; the CNN model extracts the spatial features of the input data, and the Transformer model models the time-correlated pattern of the battery EIS data; Step S3. Training and verifying the HS-MOE model: Implement the HS-MOE model code and train it on the Keras platform. The training data is divided into a training set and a test set in a ratio of 8:

2. The model is trained on the training set and verified on the test set. Step S4. Predicting the battery SOH: After the HS-MOE model is trained, and on the premise that the model effect is good, deploy the HS-MOE model and use HS-MOE to predict the battery SOH.

2. A method for predicting battery SOH based on HS-MOE model and EIS data according to claim 1, characterized in that: The CNN model includes a convolution layer and a maximum pooling layer, the activation function is the relu function, the number of filters is set to 32, and the kernel size is 1.

3. A method for predicting battery SOH based on HS-MOE model and EIS data according to claim 1, characterized in that: The gated network model adopts a multi-layer perceptron model, which is a 3-layer network structure. The input layer receives input data, the middle layer is a 32-dimensional vector, and the output layer is a 3-dimensional vector, which corresponds to the weights of the three expert sub-models, and is weighted and summed. The sum of the three weights is 1.

4. A method for predicting battery SOH based on HS-MOE model and EIS data according to claim 3, characterized in that: The weighted summation comprises the following steps: Step 1: The outputs of the three expert sub-models of the first level are output1, output2 and output3 respectively. These three outputs are all high-dimensional vectors. The present invention takes 32 dimensions as an example to represent the feature representation of each sub-expert model for the input data; The output of the gating network at the first level is a 3D vector, which corresponds to the weights of the three expert sub-models, and the sum of the three weights is 1; Select the outputs of the two experts with the highest probability and perform weighted summation with the corresponding weights to obtain the comprehensive feature representation of the first-level expert layer; Step 2: The comprehensive feature representation of the first-level expert layer is input into the second-level expert model and the gating network model as input data; The outputs of the three expert sub-models at the second level are SOH_1, SOH_2, and SOH_3. These three outputs are all continuous variables, representing the results of each expert's prediction of SOH; The output of the second-level gating network is a 3D vector, which corresponds to the weights of the three expert sub-models, and the sum of the three weights is 1; The outputs of the two experts with the highest probability are selected and weighted summed with the corresponding weights to obtain the final predicted value SOH.

5. The method for predicting battery SOH based on HS-MOE model and EIS data according to claim 1, characterized in that: In step S3, the number of training epochs is 100, the number of batch samples is batch_size is 32; the optimizer for model training is the adam algorithm, and the loss function is the mean square error.

6. A method for predicting battery SOH based on HS-MOE model and EIS data according to claim 1, characterized in that: In step S4, the weighted sum of the two sub-expert models with the highest probability in the second expert layer is the SOH prediction value.

Citation Information

Cited By

  • Security gateway efficient data transmission method and system based on sensitive data identification

    CN119299235A