Method for predicting RUL based on MOE model and current resistance impedance of battery
By using the MOE model in battery RUL prediction, combined with the multi-layer perceptron expert sub-model and gating network, the problem of insufficient generalization ability and over-fitting of traditional models in complex data processing is solved, and a more efficient battery RUL is achieved. predict.
Patent Information
- Application Number
- CN202411054192.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-09-10
AI Technical Summary
Traditional machine learning models have limited generalization capabilities when processing complex and heterogeneous battery data, easily lead to overfitting, and have low processing efficiency, making it difficult to effectively predict the remaining service life (RUL) of the battery.
The current resistance and impedance prediction method based on the MOE model is used to improve the expression ability and robustness of the model and reduce the risk of over-fitting through the combination of multiple expert sub-models and gated networks. The multi-layer perceptron (MLP) model is used as the expert sub-model that combines current, resistance and impedance data for RUL prediction.
It improves the prediction accuracy and generalization ability of the model, reduces the risk of overfitting, and improves the accuracy and efficiency of battery RUL prediction.
Smart Images

Figure CN118625152A
Abstract
Description
Technical Field
[0001] The invention belongs to the field of electrochemical technology, and in particular to a method for predicting RUL based on an MOE model and the current resistance impedance of a battery. Background Art
[0002] Battery RUL (Remaining Useful Life) is the remaining life of the battery, which is an important indicator for evaluating the health status of the battery. Common battery RULs include the number of remaining battery cycles. Battery RUL is an important indicator of the battery, which is mainly reflected in several aspects: evaluating the health status of the battery, guiding the use and maintenance of the battery, warning of battery failure, evaluating the battery capacity reduction, optimizing the battery management strategy and evaluating the secondary utilization value of the battery. Predicting battery RUL has high application value.
[0003] The remaining useful life (RUL) of a battery is closely related to operating data such as current, resistance, and impedance, making it a hot research area to use these parameters to estimate the RUL of a battery. Researchers usually use data on current, resistance, and impedance to train machine learning algorithms, such as neural networks or support vector machines, to capture the changing trends of battery RUL and make predictions.
[0004] However, traditional machine learning models often rely on a single model to process all data, which is inadequate when faced with complex and highly heterogeneous data sets. The generalization ability of such a single model is limited, which can easily lead to overfitting. At the same time, when processing large amounts of data, the processing efficiency of a single model is relatively low.
[0005] Mixture of Experts (MOE) is a machine learning architecture that integrates multiple specialized models, where each sub-model exhibits strong predictive power on a different subset of the dataset.
[0006] The core concept of MOE is to use a gating network to distribute input data to various expert models, each of which learns a specific aspect of the data set. Subsequently, the predictions of these expert models are aggregated to generate the final prediction.
[0007] By integrating multiple expert models that focus on different aspects of the data, MOE can more effectively capture the diversity and complexity of the data, thereby enhancing the overall expressiveness of the model. Using this approach, MOE reduces the risk of overfitting that may result from relying on a single model and improves the generalization and robustness of the model. In addition, the expert model can be trained and predicted at the same time, which improves computational efficiency, especially when faced with large-scale data and complex tasks, this model shows its unique advantages. Summary of the invention
[0008] In order to solve the above technical problems, the present invention proposes a battery RUL prediction method based on the MOE model, which uses battery current, resistance and impedance to predict battery RUL, can improve the expression ability and prediction accuracy of the model, improve the robustness and generalization ability of the overall model, and reduce the risk of overfitting.
[0009] The technical solution adopted by the present invention to solve the technical problem is: A method for predicting RUL based on MOE model and current resistance impedance of a battery includes the following implementation steps: Step S1. Testing and collecting battery current, resistance, impedance and RUL data; when collecting data, recording battery current, resistance and impedance data, as well as target values to be predicted; Specifically, S11 prepares equipment and materials: prepares data acquisition equipment, such as current sensors, AC impedance testers, signal recorders, etc., prepares data storage media and battery samples; S12 current data acquisition: insert a collection resistor into the battery charging and discharging circuit, and use a current sensor to measure and record the current value in real time; S13 resistance data collection: Under different charge and discharge conditions, measure the voltage across the battery and the current passing through, and calculate the resistance according to the resistance formula R = U / I; S14 Impedance data acquisition: Use an impedance tester to test the impedance value of the battery at different frequencies to obtain an impedance frequency spectrum; S15RUL data collection: statistics of historical battery cycle data.
[0010] Step S2. Construct the MOE model: The MOE model includes multiple expert sub-models and a gating network model; use 3 expert sub-models, each sub-model is an MLP model, each sub-model 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 feature representation of the input data, all of which are 32-dimensional vectors; the output of each expert sub-model is denoted as output1, output2 and output3 respectively.
[0011] Furthermore, the expert sub-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 32-dimensional vector. The activation function is relu, and the output layer is the feature expression of the input data.
[0012] Furthermore, 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 respectively, and the sum of the three weights is 1.
[0013] Furthermore, the outputs of the three expert sub-models are output1, output2 and output3. These three outputs are all high-dimensional vectors, taking 32 dimensions as an example, which respectively represent the feature representation of each sub-expert model for the input data; the feature representation output by the three expert sub-models is weightedly summed with the expert weight output by the gating network to obtain the comprehensive feature.
[0014] Step S3. Training and verifying the MOE model: Implement the 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.
[0015] Furthermore, during training, the number of epochs is 100, 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.
[0016] Step S4. Predicting the battery RUL: After the MOE model is trained, if the model effect is good, the MOE model can be deployed and the battery RUL can be predicted using MOE.
[0017] Furthermore, after the comprehensive features, there is a fully connected layer with a linear activation function. The output value of the fully connected layer is the battery RUL. The loss function of the model is the mean square error; the optimizer is adam; and the evaluation metric is the mean absolute error, which is the sum of the absolute values of the difference between the target value and the predicted value.
[0018] The beneficial effects of the present invention are: 1. Combination of multiple expert models: The MOE model improves the expressiveness and prediction accuracy of the overall model by combining multiple expert models, each of which focuses on different aspects of the data.
[0019] 2. Improve model robustness and generalization ability: The MOE model reduces the overfitting risk of a single model and improves the robustness and generalization ability of the overall model through the combination and dynamic adjustment of multiple expert models.
[0020] 3. Use the multi-layer perceptron MLP expert model: The MLP model has low computational complexity and is conducive to model training.
[0021] In summary, the MLP-based hybrid expert model MOE of the present invention can improve the expression ability and prediction accuracy of the model when predicting battery RUL, improve the robustness and generalization ability of the overall model, and reduce the risk of overfitting. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a structural diagram of the battery RUL prediction model based on the MOE model of the present invention.
[0023] Figure 2 It is the overall flow chart of battery RUL prediction based on MOE model of the present invention.
[0024] Figure 3 This is the MLP sub-model structure diagram.
[0025] Figure 4 It is a structural diagram of the gated network model.
[0026] Figure 5 The present invention predicts the battery RUL prediction result sample diagram based on the MOE model. DETAILED DESCRIPTION
[0027] refer to Figure 1 ,The input data are the current, resistance and impedance data of the battery, specifically the sensor branch current, the battery branch current, the ratio of the sensor branch current to the battery branch current, the battery impedance calculated from the raw data, the calibrated and smoothed battery impedance, the estimated electrolyte resistance, and the estimated charge transfer resistance.
[0028] Next is the expert layer and the gated network layer. This invention takes three CNN-LSTM expert sub-models as examples and a gated network based on a multi-layer perceptron (MLP) as an example.
[0029] The input data is input into three expert sub-models respectively, and the corresponding features are extracted from different angles. The outputs of the three expert sub-models 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.
[0030] The input data is input into the gating network to calculate the weight of each expert sub-model. The output of the gating network is a vector containing 3 values, corresponding to the weights of the 3 expert sub-models, and the sum of the 3 weights is 1.
[0031] Then, the feature representations output by the three expert sub-models are weighted and summed with the expert weights output by the gating network to obtain the comprehensive features. After that, the comprehensive features are connected to a fully connected layer. Finally, the RUL is output through a linear regression layer.
[0032] refer to Figure 2 The implementation process of the present invention includes the following steps: Step S1: Test and collect battery current, resistance, impedance and RUL data. When collecting data, it is necessary to record the battery current, resistance and impedance data, as well as the target value to be predicted, which is the corresponding battery RUL.
[0033] Specifically include: S11 Prepare equipment and materials: Prepare data acquisition equipment, such as current sensor, AC impedance tester, signal recorder, etc. Prepare data storage media and battery samples.
[0034] S12 current data acquisition: insert a collection resistor into the battery's charge and discharge circuit, and use a current sensor to measure and record the current value in real time.
[0035] S13 resistance data collection: Under different charge and discharge conditions, measure the voltage across the battery and the current passing through, and calculate the resistance according to the resistance formula R = U / I.
[0036] S14 Impedance data acquisition: Use an impedance tester to test the impedance value of the battery at different frequencies to obtain an impedance frequency spectrum.
[0037] S15RUL data collection: statistics of historical battery cycle data.
[0038] Step S2. Constructing MOE model: The MOE model includes multiple expert sub-models and a gated network model. The present invention uses three expert sub-models, each of which is an MLP model. Each sub-model is a three-layer network structure, the input layer receives input data, the middle layer is a 32-dimensional vector, and the output layer is a feature representation of the input data, which is a 32-dimensional vector. The output of each expert sub-model is recorded as output1, output2 and output3.
[0039] Furthermore, the expert sub-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 32-dimensional vector. The activation function is relu, and the output layer is the feature expression of the input data.
[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, 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 sum of the three weights is 1.
[0041] Furthermore, weighted summation is performed: the outputs of the three expert sub-models 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.
[0042] The feature representations output by the three expert sub-models are weighted summed with the expert weights output by the gating network to obtain the comprehensive features.
[0043] Step S3. Training and verifying the MOE model: The present invention implements the 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.
[0044] 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 mean square error (mse).
[0045] Step S4. Predicting the battery RUL: After the MOE model is trained, if the model effect is good, the MOE model can be deployed and the battery RUL can be predicted using MOE.
[0046] Furthermore, after the comprehensive features, there is a fully connected layer with a linear activation function. The output value of the fully connected layer is the battery RUL. The loss function of the model is the mean square error (MSE); the optimizer is adam; the evaluation metric is the mean absolute error (MAE), which is the sum of the absolute values of the difference between the target value and the predicted value. Example
[0047] 1. Prediction data display The present invention tests the effect on the impedance state (type=impedance) data of the B0018 battery in the NASA battery data set, and uses the battery current, resistance and impedance data therein to predict the battery RUL. The data set is divided into a training set and a test set in a ratio of 8:2, and the MOE model is trained on the training set, and the effect is tested on the test set. The test data has a total of 7 features, and the names and meanings of the features are shown in Table 1 below:
[0048] The specific data sample is shown in Table 2 below:
[0049] Among them, the features such as Sense_current, Battery_current, Current_ratio, Battery_impedance and Rectified_impedance are divided into real data and imaginary data.
[0050] The mean of the test set is 139.7838, the standard deviation is 96.9046, and the mean of the prediction set is 136.4789, the standard deviation is 96.972, which shows that the data distribution of the prediction results is basically consistent with the data distribution of the real data.
[0051] The root mean square error between the prediction set and the test set is 7.7774, and there is still room for further optimization of the model.
[0052] The prediction results are shown in Table 3 below:
[0053] The prediction results are as follows: Figure 5 As shown, in Figure 5 The dotted line in the upper middle represents the true value, the solid line represents the predicted value, and the solid square represents the error value. The numbers represent the true values. Figure 5 It can be seen that the prediction effect is acceptable and can be further optimized.
Claims
1. A method for predicting RUL based on MOE model and current resistance impedance of battery, characterized in that: The implementation steps include: Step S1. Testing and collecting battery current, resistance, impedance and RUL data; when collecting data, recording battery current, resistance and impedance data, as well as target values to be predicted; Step S2. Constructing the MOE model: The MOE model includes multiple expert sub-models and a gated network model; using three expert sub-models, each sub-model is an MLP model, each sub-model 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 feature representation of the input data, all of which are 32-dimensional vectors; the output of each expert sub-model is recorded as output1, output2 and output3 respectively; Step S3. Training and verifying the MOE model: Implement the 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 RUL: After the MOE model is trained, if the model effect is good, the MOE model can be deployed and the battery RUL can be predicted using MOE.
2. A method for predicting RUL based on MOE model and current resistance impedance of battery according to claim 1, characterized in that: The step S1 specifically includes: S11 preparing equipment and materials: preparing data acquisition equipment, such as a current sensor, an AC impedance tester, a signal recorder, etc., preparing data storage media and battery samples; S12 current data acquisition: insert a collection resistor into the battery charging and discharging circuit, and use a current sensor to measure and record the current value in real time; S13 resistance data collection: Under different charge and discharge conditions, measure the voltage across the battery and the current passing through, and calculate the resistance according to the resistance formula R = U / I; S14 Impedance data acquisition: Use an impedance tester to test the impedance value of the battery at different frequencies to obtain an impedance frequency spectrum; S15RUL data collection: statistics of historical battery cycle data.
3. The method for predicting RUL based on MOE model and current resistance impedance of battery according to claim 1, characterized in that: In step S2, the expert sub-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 32-dimensional vector. The activation function is relu, and the output layer is the feature expression of the input data.
4. The method for predicting RUL based on MOE model and current resistance impedance of battery according to claim 1, characterized in that: In step S2, 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 respectively, and the sum of the three weights is 1.
5. The method for predicting RUL based on MOE model and current resistance impedance of battery according to claim 4, characterized in that: In step S2, the outputs of the three expert sub-models are output1, output2 and output3, respectively. These three outputs are all high-dimensional vectors, taking 32 dimensions as an example, which respectively represent the feature representation of each sub-expert model for the input data; the feature representation output by the three expert sub-models is weighted and summed with the expert weight output by the gated network to obtain a comprehensive feature.
6. The method for predicting RUL based on MOE model and current resistance impedance of battery 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.
7. The method for predicting RUL based on MOE model and current resistance impedance of battery according to claim 5, characterized in that: In step S4, after the comprehensive features, there is a fully connected layer, the activation function is a linear function, and the output value of the fully connected layer is the battery RUL. The loss function of the model is the mean square error; the optimizer is adam; the evaluation indicator metrics is the mean absolute error, that is, the sum of the absolute values of the difference between the target value and the predicted value.
Citation Information
Cited By
Battery SOC and RUL prediction method based on HS-MoE model
CN118914864A
Battery SOH prediction method based on attention mechanism MOE model
CN118914906A
Battery SOH prediction method based on MH-MOE and EIS
CN118914907A
Battery SOH prediction method based on MH-MOE and EIS
CN118914907B
Battery RUL prediction method based on attention mechanism SMOE model
CN118914908A
