Lithium ion battery full-year real-time operation data SOC estimation method based on CNN-BiLSTM-Attention neural network
By using CNN-BiLSTM-Attention neural network in SOC estimation of lithium-ion batteries, combined with correlation analysis and SOC correction, the existing SOC estimation methods have been solved, and higher SOC prediction accuracy and model interpretability are achieved.
Patent Information
- Application Number
- CN202510183339.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-06-06
AI Technical Summary
The existing SOC estimation methods for lithium-ion batteries have problems such as low accuracy, strong data dependence, and complex calculations, making it difficult to accurately estimate SOC in real-time operation.
The SOC estimation method of the lithium-ion battery's annual real-time running data of Li-ion batteries is adopted based on the CNN-BiLSTM-Attention neural network, combined with the convolutional neural network, a bidirectional long and short memory model and attention mechanism, and the accuracy of SOC prediction is improved through correlation analysis, SOC correction and hyperparameter optimization.
It realizes that without the need for cumbersome parameter calculations and accurate electrochemical state considerations, improves the accuracy of SOC estimation, reduces the dimension of feature space, and enhances the interpretability and prediction accuracy of the model.
Smart Images

Figure CN120103153A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of lithium-ion battery SOC estimation, and in particular to a method for estimating the SOC of a lithium-ion battery based on real-time operating data throughout the year based on a CNN-BiLSTM-Attention neural network. Background Art
[0002] Lithium-ion batteries are the fastest growing and most promising battery technology. Compared with traditional batteries, they have advantages such as light weight, fast charging, high energy density, low self-discharge, and long life, making them widely used in electric vehicles, energy storage systems, and home electronics industries. Accurately estimating the state of charge (SOC) of lithium batteries is crucial to ensure safe operation of the battery.
[0003] At present, researchers have proposed many SOC estimation methods, including ampere-hour integration method, open circuit voltage method, model-based method and data-driven method. Among them, the ampere-hour integration method has the advantages of simple calculation and strong adaptability, but as an open-loop algorithm, due to the continuous accumulation of errors in the integration process, its accuracy is also reduced.
[0004] The open circuit voltage method requires the battery to be left at rest for a long time and is limited in real-time estimation. It is usually used in conjunction with the ampere-hour integration method to provide an initial value for the integration.
[0005] The model-based approach can estimate SOC more accurately through precise battery models and parameter optimization. This method can take into account the internal dynamic and nonlinear characteristics of the battery, but it also has disadvantages such as high complexity and limited accuracy.
[0006] The data-driven approach can comprehensively consider the various complex characteristics of the battery to provide a more accurate SOC prediction, but its accuracy depends largely on the accuracy and completeness of the data samples, and the acquisition and processing of data also requires a lot of time and resources.
[0007] CNN (convolutional neural network) is a type of feedforward neural network with deep structure and convolution operation. It extracts local features of input data through convolution operation and forms complex feature representation through multi-layer convolution and pooling operation. It can effectively explore the relationship between multiple energy loads, extract more important features and improve the quality of data features.
[0008] LSTM (Long Short-Term Memory) is a variant of recurrent neural network. Replacing elementary hidden neurons with LSTM units can effectively solve the gradient problem in recurrent neural network while maintaining the advantages of recurrent neural network in dealing with time series problems. BILSTM is an extension of standard LSTM, which can capture time features from both positive and negative directions.
[0009] The attention mechanism is used to perform weighted fusion on the output of the BiLSTM layer in order to focus more on important information. By calculating the weighted sum between the output of each time step and a learnable attention weight, the Attention layer can dynamically adjust the weights of different time steps to highlight important information.
[0010] PSO is an optimization algorithm based on swarm intelligence. It simulates the interaction and learning process of particles in a swarm to find the global optimal solution. It uses the concept of social behavior of animals such as fish and bird flocks. Each potential solution to a given problem is regarded as a particle that flies in the problem space at a certain speed. Then, each particle combines some random interference, combines its record of its best historical position and some aspects of its current position with the records of one or more agents in the group to determine its next movement in the search space. Summary of the invention
[0011] In view of the shortcomings of the existing lithium-ion battery SOC estimation method, the present invention provides a SOC estimation method for lithium-ion batteries based on real-time operating data of the whole year based on a CNN-BiLSTM-Attention neural network. The method combines a convolutional neural network, a bidirectional long short-term memory model and an attention mechanism, and finally obtains the best SOC prediction method by comparing the effects of multiple correlation analysis methods, SOC correction methods and parameter optimization methods.
[0012] The present invention provides a method for estimating SOC of real-time operating data of a lithium-ion battery throughout the year based on a CNN-BiLSTM-Attention neural network, comprising the following steps:
[0013] Step 1: Collect historical operating data of lithium-ion batteries to obtain data such as voltage, current and temperature;
[0014] Step 2: Preprocess the collected data, including deleting duplicate values, supplementing missing data, standardizing and normalizing the data, and analyzing the battery usage characteristics;
[0015] Step 3: Use the Pearson correlation coefficient method to analyze the characteristics of the battery for the preprocessed data, and extract the input features of the model based on the correlation analysis results;
[0016] Step 4: Select a correction method based on the ampere-hour integration method to correct the maximum available capacity of the battery and obtain the corrected SOC at different temperatures;
[0017] Step 5: Use the PSO algorithm to optimize the hyperparameters of the CNN-BiLSTM-Attention neural network, and bring the optimized parameters into the CNN-BiLSTM-Attention neural network model;
[0018] Step 6: Divide the preprocessed battery data into a training set and a test set, and use the optimized neural network model to predict SOC;
[0019] Step 7: Analyze the prediction results, calculate the error, evaluate the prediction accuracy of the model, and obtain the final result.
[0020] Furthermore, step one is specifically as follows: historical operation data of the lithium-ion battery is collected through the cloud or battery management system, and the data collection frequency is 30s. The calculation formula of the original SOC is as follows:
[0021]
[0022] In the formula, SOC t is the SOC value at time t, SOC t0 is the SOC value of the battery at the initial moment, I is the charging and discharging current, and C is the maximum available capacity of the battery.
[0023] Furthermore, step three is specifically as follows: the Pearson correlation coefficient method is selected for the preprocessed data to analyze the characteristics of the battery, and according to the analysis results, the charging time, the average voltage of the single cell, the current and the maximum temperature are selected as the characteristic input;
[0024] The analysis and calculation formula is:
[0025]
[0026] Where cov(X,Y) represents the covariance between X and Y, σ X represents the standard deviation of X, σ Y represents the standard deviation of Y.
[0027] Furthermore, step 4 is as follows: use the following formula to calculate the maximum available capacity of the battery at each temperature, then substitute it into the SOC calculation formula of step 1, perform temperature correction on each charging segment, and obtain the corrected SOC value by calculation:
[0028]
[0029] Where C is the maximum available capacity of the battery at this temperature, Iave is the average current in the current charging segment.
[0030] Furthermore, step five is as follows: use the PSO algorithm to tune the learning rate, the number of BiLSTM neurons, the key value of the attention mechanism, and the regularization parameter in the CNN-BiLSTM-Attention network, find the optimal hyperparameters, and bring them back to the CNN-BiLSTM-Attention network. The input features are determined by the analysis results of the correlation coefficient in step three. The charging time, the average voltage, current, and maximum temperature of the battery cell are selected as inputs, and the SOC is used as the output.
[0031] Select MSE as the fitness function of the PSO algorithm, and the calculation formula of the fitness function is:
[0032]
[0033] In the formula, x is the actual value, x i is the estimated value of SOC, N is the number of samples in the test set, and the smaller the MSE value is, the higher the accuracy of the model is and the better the fit is.
[0034] Furthermore, step seven is as follows: select mean absolute error (MAE), mean squared error (MSE), root mean squared error (RMSE) and mean absolute percentage error (MAPE) as evaluation indicators. The formulas of each indicator are as follows:
[0035]
[0036] In the formula, yi represents the actual value, represents the SOC prediction value, and N represents the number of samples in the test set.
[0037] The present invention proposes a SOC estimation method based on the real-time operating data of the battery throughout the year based on the CNN-BiLSTM-Attention neural network. The SOC can be estimated without tedious parameter calculation process or accurate consideration of the electrochemical state inside the battery.
[0038] The Attention mechanism can make the CNN-BiLSTM network pay more attention to more useful information; the method of the present invention improves the accuracy of SOC estimation.
[0039] The SOC estimation method of the present invention uses a correlation coefficient analysis method to extract input features, reduces the dimension of the feature space, improves the prediction accuracy of the neural network model, and also enhances the interpretability of the model.
[0040] The SOC estimation method of the present invention uses a correction method to correct the SOC of the battery, which can reduce the influence of factors such as temperature and aging on the estimation result and improve the estimation accuracy of the neural network.
[0041] The SOC estimation method of the present invention uses a parameter optimization method to find the hyperparameters of the neural network, which can reduce manual resources and avoid the phenomenon of missing the optimal hyperparameters caused by manual search. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 Schematic diagram of the process of the lithium-ion battery SOC estimation method of the present invention;
[0043] Figure 2 The maximum and minimum temperature distribution diagrams of each charging segment of the lithium-ion battery of the embodiment;
[0044] Figure 3 The distribution diagram of the starting SOC and the ending SOC of each charging segment of the lithium-ion battery of the embodiment;
[0045] Figure 4 The result diagram of the correlation analysis of various characteristics of the lithium-ion battery of the embodiment;
[0046] Figure 5 This is a diagram of the CNN-BiLSTM-Attention neural network structure in the embodiment;
[0047] Figure 6 This is a graph showing the SOC estimation results using the optimized CNN-BiLSTM-Attention neural network in the embodiment;
[0048] Figure 7 It is a schematic diagram of the results of four evaluation indicators after using the correction method and the hyperparameter optimization method in the embodiment. DETAILED DESCRIPTION
[0049] The present invention is further described below with reference to the embodiments and drawings, but is not intended to limit the present invention.
[0050] Example
[0051] Lithium-ion battery SOC estimation method based on CNN-BiLSTM-M-Attention neural network, refer to Figure 1 , including the following steps:
[0052] Step 1: Collect historical operating data of lithium-ion batteries through the cloud or battery management system to obtain data such as voltage, current and temperature;
[0053] The data collection frequency is 30s, and the calculation formula of the original SOC is as follows:
[0054]
[0055] In the formula, SOC t0 is the SOC value of the battery at the initial moment, SOC t is the SOC value at time t, I is the charging and discharging current, and C is the maximum available capacity of the battery;
[0056] Taking the charging stage as a reference, the maximum and minimum temperature distributions of each charging segment of the lithium-ion battery in the embodiment are as follows: Figure 2 As shown in the figure, the battery temperature range is basically distributed between 6°C and 43°C, and there is no case below 6°C. The number of temperature ranges from 15°C to 40°C accounts for 80% of the total. In addition, more than 90% of the charging units have a temperature difference of 4 to 7°C.
[0057] The starting SOC and ending SOC distribution of each charging segment of the lithium-ion battery are as follows: Figure 3 The battery's SOC usage range is basically between 20% and 1, of which 60% of the charging units have a starting SOC above 0.3, accounting for 70% of the total number of units.
[0058] Step 2: Using the charging segment as a reference, pre-process the collected data, including deleting duplicate values, supplementing missing data, standardizing and normalizing the data, and analyzing the battery usage characteristics.
[0059] Step 3: Use the Pearson correlation coefficient method to analyze the characteristics of the battery after preprocessing. The analysis formula is:
[0060]
[0061] Where cov(X,Y) represents the covariance between X and Y, σ X represents the standard deviation of X, σ Y represents the standard deviation of Y. The correlation analysis results are as follows Figure 4 As shown, according to the analysis results, charging time, single cell average voltage, current and maximum temperature are selected as characteristic inputs.
[0062] Step 4: Select a correction method based on the ampere-hour integration method to correct the maximum available capacity of the battery to obtain a corrected SOC;
[0063] Specifically, the maximum available capacity of the battery at each temperature is calculated using the following formula, which is then substituted into the SOC calculation formula in step 1. Temperature correction is performed on each charging segment, and the corrected SOC value is obtained by calculation:
[0064]
[0065] In the formula, C is the maximum available capacity of the battery, I ave is the average current in the current charging segment.
[0066] Step 5: Use the PSO algorithm to tune the learning rate, number of BiLSTM neurons, key value of the attention mechanism, and regularization parameters in the CNN-BiLSTM-Attention neural network to find the optimal hyperparameters; bring them back to the CNN-BiLSTM-Attention neural network. The input features are determined by the analysis results of the correlation coefficient in step 3. Select charging time, average voltage, current, and maximum temperature of battery cells as inputs, and SOC as output. The structure diagram of the CNN-BiLSTM-Attention neural network is shown in the figure below. Figure 5 As shown;
[0067] Select MSE as the fitness function of the PSO algorithm, and the calculation formula of the fitness function is:
[0068]
[0069] In the formula, x is the actual value, x i is the estimated value of SOC, and N is the number of samples in the test set.
[0070] Step 6: Divide the preprocessed battery data into training sets and test sets, and use the optimized neural network model to predict SOC.
[0071] Step 7: Analyze the prediction results, calculate the error, evaluate the prediction accuracy of the model, and select mean absolute error MAE, mean square error MSE, root mean square error RMSE and mean percentage error MAPE as evaluation indicators. The formulas of each indicator are as follows:
[0072]
[0073] In the formula, y i represents the actual value, represents the SOC prediction value, and N represents the number of samples in the test set.
[0074] The embodiment uses the CNN-BiLSTM-Attention neural network to estimate the SOC. The comparison of the estimation results before and after using the correction method is shown in Table 1 below. It can be seen that after adding the correction method, the four evaluation indicators have decreased, indicating that the correction method is effective.
[0075] Table 1:
[0076]
[0077] The embodiment selects PSO to optimize the target neural network and uses the optimized CNN-BiLSTM-Attention neural network to estimate SOC. The estimation results are as follows: Figure 6 As shown in Table 2 below: After adding the optimization method, the SOC estimation result error of the CNN-BiLSTM-Attention neural network model is smaller. The four evaluation indicators (MAE, MSE, RMSE and MAPE) in the combined table have all decreased, and RMSE has decreased from 2.72% to 2.36%, indicating that the optimization method is effective.
[0078] Table 2
[0079]
[0080] The embodiment analyzes the prediction results, such as Figure 7 As shown in the figure, after using the correction method and hyperparameter optimization method, the four evaluation indicators: MAE, MSE, RMSE and MAPE all decreased, indicating that the method is effective.
Claims
1. A lithium-ion battery SOC estimation method based on CNN-BiLSTM-M-Attention neural network, characterized in that: The following steps are involved: Step 1: Collect historical operating data of lithium-ion batteries to obtain data such as voltage, current and temperature; Step 2: Preprocess the collected data, including deleting duplicate values, supplementing missing data, standardizing and normalizing the data, and analyzing the battery usage characteristics; Step 3: Use the Pearson correlation coefficient method to analyze the characteristics of the battery for the preprocessed data, and extract the input features of the model based on the correlation analysis results; Step 4: Select a correction method based on the ampere-hour integration method to correct the maximum available capacity of the battery and obtain the corrected SOC at different temperatures; Step 5: Use the PSO algorithm to optimize the hyperparameters of the CNN-BiLSTM-Attention neural network, and bring the optimized parameters into the CNN-BiLSTM-Attention neural network model; Step 6: Divide the preprocessed battery data into a training set and a test set, and use the optimized neural network model to predict SOC; Step 7: Analyze the prediction results, calculate the error, evaluate the prediction accuracy of the model, and obtain the final result.
2. The lithium-ion battery SOC estimation method according to claim 1, characterized in that: Step 1 is as follows: collect the historical operation data of the lithium-ion battery through the cloud or battery management system. The data collection frequency is 30s. The calculation formula of the original SOC is as follows: In the formula, SOC t0 is the SOC value of the battery at the initial moment, SOC t is the SOC value at time t, I is the charging and discharging current, and C is the maximum available capacity of the battery.
3. The lithium-ion battery SOC estimation method according to claim 1, characterized in that: Step three is as follows: the Pearson correlation coefficient method is used to analyze the characteristics of the battery for the preprocessed data, and according to the analysis results, the charging time, the average voltage of the single cell, the current and the maximum temperature are selected as the characteristic inputs; The analysis and calculation formula is: Where cov(X,Y) represents the covariance between X and Y, σ X represents the standard deviation of X, σ Y represents the standard deviation of Y.
4. The lithium-ion battery SOC estimation method according to claim 1, characterized in that: Step 4 is as follows: Use the following formula to calculate the maximum available capacity of the battery at each temperature, then substitute it into the SOC calculation formula in step 1, perform temperature correction on each charging segment, and calculate the corrected SOC value: Where C is the maximum available capacity of the battery at this temperature, I ave is the average current in the current charging segment.
5. The lithium-ion battery SOC estimation method according to claim 1, characterized in that: Step 5 is as follows: Use the PSO algorithm to tune the learning rate, number of BiLSTM neurons, key value of the attention mechanism, and regularization parameters in the CNN-BiLSTM-Attention neural network to find the optimal hyperparameters; bring them back to the CNN-BiLSTM-Attention neural network, and use the analysis results of the correlation coefficient in step 3 to determine the input features. Select the charging time, average voltage, current, and maximum temperature of the battery cell as input, and SOC as output; Select MSE as the fitness function of the PSO algorithm, and the calculation formula of the fitness function is: In the formula, x is the actual value, x i is the estimated value of SOC, N is the number of samples in the test set, and the smaller the MSE value is, the higher the accuracy of the model is and the better the fit is.
6. The lithium-ion battery SOC estimation method according to claim 1, characterized in that: Step 7 is as follows: select mean absolute error MAE, mean square error MSE, root mean square error RMSE and mean percentage error MAPE as evaluation indicators. The formulas of each indicator are as follows: In the formula, yi represents the actual value, represents the SOC prediction value, and N represents the number of samples in the test set.