Battery soc prediction algorithm based on e3d-lstm and cell position structural features
By using E3D-LSTM and a battery SOC prediction algorithm based on cell location and structural features, the problems of accumulated SOC calculation errors and lack of spatial structure analysis in existing technologies are solved, achieving highly accurate battery SOC prediction.
Patent Information
- Application Number
- CN202511013352.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2026-03-17
- Estimated Expiration
- 2045-07-23
AI Technical Summary
Existing SOC calculation methods suffer from low accuracy, including error accumulation, inability to obtain open-circuit voltage, and lack of spatial structure analysis, leading to inaccurate battery SOC estimation.
A battery SOC prediction algorithm based on E3D-LSTM and cell location and structure features is adopted. By constructing a three-dimensional matrix input data, the E3D-LSTM model is used for training and prediction, and the SOC prediction is performed by combining the battery location and structure features.
It achieves highly accurate SOC prediction without requiring an open circuit, and improves the accuracy and comprehensiveness of the prediction by incorporating cell structure information.
Smart Images

Figure CN120831578B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of anomaly analysis technology, and in particular to a battery SOC prediction algorithm based on E3D-LSTM and cell location structural features. Background Technology
[0002] The State of Charge (SOC) of a battery refers to the remaining capacity of the battery. It represents the ratio of the remaining dischargeable capacity of the battery after a period of use or long-term storage to its fully charged capacity, and is usually expressed as a percentage.
[0003] Currently, there are three commonly used SOC calculation methods: the ampere-hour integration method, the open-circuit voltage method, and machine learning algorithms. The ampere-hour integration method calculates SOC by accumulating the battery's charging and discharging current; its formula is... In the formula The initial state of charge (SOC) is defined as follows: I represents the battery charging / discharging current (a positive I indicates charging, a negative I indicates discharging); t represents time; and C represents the total battery capacity, the value of which needs to account for factors such as battery aging and temperature. The open-circuit voltage method involves measuring the open-circuit voltage (OCV) and its corresponding SOC data, fitting a curve to the OCV-SOC relationship, and determining the SOC based on the battery's OCV. Machine learning algorithms can be traditional algorithms such as Kalman filtering, or deep learning algorithms such as LSTM.
[0004] The above method for calculating SOC has issues such as low accuracy. These issues include:
[0005] There is a problem of accumulated errors. Over time, these errors will gradually accumulate, leading to inaccurate battery SOC estimation.
[0006] The open-circuit voltage can only be obtained by disconnecting the circuit. However, this condition cannot be met in some scenarios. Furthermore, the relationship between the OCV and SOC of the battery will change as the battery is used, which will lead to a deviation in the estimation of SOC as the battery ages.
[0007] Typically, only simple time series algorithms are applied, which only consider the relationship in the time of SOC and lack analysis of the spatial structure of the battery system, so the accuracy is relatively average. Summary of the Invention
[0008] The purpose of this invention is to provide a battery SOC prediction algorithm based on E3D-LSTM and cell location structure features to solve one or more of the problems mentioned in the background art.
[0009] To achieve the above objectives, the present invention provides the following technical solution:
[0010] A battery SOC prediction algorithm based on E3D-LSTM and cell location structure features, comprising:
[0011] Step 1. Construct a three-dimensional matrix as input data based on the positional structure and battery parameters of the batteries within the battery pack;
[0012] Step 2. Standardize the input data and use the standardized input data to construct training, validation, and test sets;
[0013] Step 3. Construct a battery SOC prediction model based on E3D-LSTM and determine the basic structural parameters of the model;
[0014] Step 4. Use the training set, validation set, and test set to train, validate, and test the battery SOC prediction model based on E3D-LSTM.
[0015] In some implementations, the battery position structure within the battery pack includes the number of cells in each row and the number of cells in each column of the battery pack.
[0016] The three-dimensional matrix constructed in step 1 at time t is the battery matrix. The three-dimensional matrix has a size of M*N*R, where M is the number of cells in each row of the battery pack, N is the number of cells in each column of the battery pack, and R is the number of types of parameters included in the battery parameters. The battery parameters include at least historical SOC and voltage.
[0017] In some implementations, step 2 uses the z-score normalization method to standardize the input data.
[0018] In some implementations, the standardization process is calculated using the following formula.
[0019] ,
[0020] in The normalized battery matrix at time t The data in the m-th row and n-th column of r dimension, Battery matrix at time t The original data in the m-th row and n-th column of the r-th dimension. Let be the standard deviation of all data in the r-th dimension matrix. Let be the mean of all data in the r-th dimension matrix.
[0021] In some implementations, the processed input data in step 2 is divided into a training set, a validation set, and a test set in a 3:1:1 ratio.
[0022] In some implementations, the battery SOC prediction model based on E3D-LSTM constructed in step 3 includes a two-layer E3D-LSTM model and a prediction layer, wherein the E3D-LSTM model includes a memory gate and an output gate, and the prediction layer employs a perceptron.
[0023] In some implementations...
[0024] The formula for calculating the memory gate is as follows:
[0025]
[0026]
[0027]
[0028]
[0029]
[0030] In the formula For system input, and For the activation function of the neural network, , , , , , Here is the system's weight matrix. , , This represents the system bias; * indicates a 3D convolution operation. Representing Hadamaji, and These are two normalization methods for neural networks;
[0031] The formula for calculating the output gate is as follows:
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038] In the formula It is used for channel data transformation. Convolution operation, The output of the E3D-LSTM model;
[0039] The formula used in the prediction layer is as follows:
[0040]
[0041] In the formula For neural network activation functions, and For the parameter matrix and bias, This outputs the gate results for the second-layer E3D-LSTM model.
[0042] In some implementations, step 4 specifically includes the following steps:
[0043] Step 4-1. Select the soc value at a target time point in the training set. Using the sequence of τ time periods before the target time point as input, the battery SOC prediction model based on E3D-LSTM described in step 3 is used to predict the output value. ;
[0044] Step 4-2. Calculate the error between the actual output value and the predicted output value of the traffic flow using the mean square error, and adjust the weight matrix according to the error.
[0045] Step 4-3. Set the number of iterations, repeat steps 4-1 and 4-2, continuously update the weight matrix, and use the validation set to verify the prediction effect of the battery SOC prediction model based on E3D-LSTM during the iteration process;
[0046] Step 4-4. Select the parameters that perform best on the validation set during the iteration process and save them as the final parameters of the battery SOC prediction model based on E3D-LSTM.
[0047] Steps 4-5. Test the battery SOC prediction model based on E3D-LSTM using a test set to determine the model's prediction accuracy.
[0048] In some implementations, step 4-2 uses a backpropagation algorithm to adjust the weight matrix in reverse based on the error.
[0049] In some implementations, the mean square error formula in step 4-2 is: .
[0050] Compared with the prior art, the beneficial effects of the present invention are:
[0051] The algorithm described in this invention does not require consideration of cumulative error or additional conditions such as the system being in an open circuit state;
[0052] By incorporating the structural information of the battery cell into the input data, the original information is more comprehensively incorporated.
[0053] An E3D-LSTM model is constructed based on the advanced E3D-LSTM network structure in the image domain. While analyzing the cell data, it also extracts the structural information of the cell, making more comprehensive use of the original data and thus achieving more accurate prediction results. Attached Figure Description
[0054] Figure 1 The flowchart is provided in some embodiments of the present invention for a battery SOC prediction algorithm based on E3D-LSTM and cell location structure features.
[0055] Figure 2 This is the overall architecture of the SOC prediction model based on E3D-LSTM in some embodiments of the present invention;
[0056] Figure 3 This describes the specific architecture of E3D-LSTM in the model in some embodiments of the present invention;
[0057] Figure 4 This is a schematic diagram illustrating an example of constructing an input matrix that incorporates post-cell battery location information in some embodiments of the present invention;
[0058] Figure 5 This is the prediction result corresponding to one embodiment of the present invention. Detailed Implementation
[0059] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0060] Figure 1 This invention illustrates the implementation flow of a battery SOC prediction algorithm based on E3D-LSTM and cell location structural features, as provided in an embodiment of the present invention. The details are as follows:
[0061] Step 1. Based on the positional structure and battery parameters within the battery pack, construct a three-dimensional matrix as input data. The positional structure of the batteries within the battery pack includes the number of cells in each row and the number of cells in each column. Here, the three-dimensional matrix at time t is the battery matrix. The three-dimensional matrix has a size of M*N*R, where M is the number of cells in each row of the battery pack, N is the number of cells in each column of the battery pack, and R is the number of types of battery parameters. The types of battery parameters must include at least historical SOC and voltage. Example: Figure 4As shown, M is 2, N is 6, and R is 4. At this time, the battery parameters can include the SOC (historical SOC), voltage, current, and temperature of the cell at the previous time point.
[0062] Step 2. Standardize the input data and use the standardized input data to construct training, validation, and test sets.
[0063] In step 2, the z-score standardization method can be used to standardize the input data. The specific standardization process can be calculated using the following formula.
[0064] ,
[0065] in The normalized battery matrix at time t The data in the m-th row and n-th column of r dimension, Battery matrix at time t The original data in the m-th row and n-th column of the r-th dimension. Let be the standard deviation of all data in the r-th dimension matrix. Let be the mean of all data in the r-th dimension matrix.
[0066] The processed input data in step 2 above is divided into training set, validation set and test set in a ratio of 3:1:1.
[0067] Step 3. Construct a battery SOC prediction model based on E3D-LSTM and determine the basic structural parameters of the model.
[0068] The battery SOC prediction model based on E3D-LSTM constructed in step 3 consists of a two-layer E3D-LSTM model and a prediction layer, as detailed below. Figure 2 As shown, the E3D-LSTM model consists of two parts: a memory gate and an output gate. Figure 3 The content shown includes
[0069] The formula for calculating the memory gate is as follows:
[0070]
[0071]
[0072]
[0073]
[0074]
[0075] In the formula The input to the system at time t (the input data at time t after being processed in step 2). and For the activation function of the neural network, , , , , , Here is the weight matrix for the memory gate. , , The bias is for the memory gate; * represents a 3D convolution operation. Representing Hadamaji, and These are two normalization methods for neural networks. This represents the input time series data set.
[0076] The formula for calculating the output gate is as follows:
[0077]
[0078]
[0079]
[0080]
[0081]
[0082]
[0083] In the formula , , , , , , , , , Here is the weight matrix of the output gate. , , , This is the bias for the output gate. It is used for channel data transformation. Convolution operation, This represents the output of the E3D-LSTM model at time t. This represents the output of the E3D-LSTM model corresponding to the time preceding time t.
[0084] The prediction layer described above can be a single-layer neural network, and the formula used in the prediction layer can be as follows:
[0085]
[0086] In the formula For neural network activation functions, and For the parameter matrix and bias, This outputs the gate results for the second-layer E3D-LSTM model.
[0087] Step 4. Train, validate, and test the battery SOC prediction model based on E3D-LSTM using the training set, validation set, and test set. The specific process is as follows:
[0088] Step 4-1. Select the soc value at a target time point in the training set. The sequence of time intervals τ before the target time point is used as input, where τ represents the length of the input sequence. The battery SOC prediction model based on E3D-LSTM described in step 3 is used to make a prediction, and the predicted output value is obtained. For example, τ can be 6.
[0089] Step 4-2. Use mean squared error The error between the actual output value of traffic flow and its predicted output value is calculated, and the weight matrix is adjusted in reverse according to the error using the backpropagation algorithm.
[0090] Step 4-3. Set the number of iterations, repeat steps 4-1 and 4-2, continuously update the weight matrix in reverse, and use the validation set to verify the prediction effect of the battery SOC prediction model based on E3D-LSTM during the iteration process. For example, the number of iterations is set to 1000.
[0091] Step 4-4. Select the parameters that perform best on the validation set during the iteration process and save them as the final parameters of the battery SOC prediction model based on E3D-LSTM.
[0092] Steps 4-5. Test the battery SOC prediction model based on E3D-LSTM using a test set to determine the prediction accuracy of the model and whether the prediction accuracy meets the requirements.
[0093] The final battery SOC prediction model based on E3D-LSTM, formed using the above data, has an RMSE of 0.073, demonstrating good performance. Specific prediction results are as follows: Figure 5 As shown.
[0094] All of the above-mentioned undisclosed matters can be implemented using existing technologies, so they will not be elaborated here.
[0095] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0096] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
[0097] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A battery SOC prediction algorithm based on E3D-LSTM and cell position structural features, characterized in that, The method comprises the following steps: Step 1. Constructing a three-dimensional matrix as input data according to the position structure and parameters of the batteries in the battery pack; Step 2. Standardizing the input data, and using the processed input data to construct a training set, a verification set and a test set; Step 3. Constructing an E3D-LSTM-based battery SOC prediction model, and determining the basic structure parameters of the model; Step 4. Training, verifying and testing the E3D-LSTM-based battery SOC prediction model by using the training set, the verification set and the test set.
2. The battery SOC prediction algorithm based on E3D-LSTM and cell position structure characteristics according to claim 1, wherein the position structure of the batteries in the battery pack comprises the number of cells in each row of the battery pack and the number of cells in each column of the battery pack. In step 2, the input data is standardized by using a z-score standardization method. The three-dimensional matrix of time t constructed in step 1 is a battery matrix The three-dimensional matrix has a size of M*N*R, where M is the number of cells in each row in the battery pack, N is the number of cells in each column in the battery pack, and R is the number of parameter types included in the battery parameters, which at least include historical SOC and voltage.
3. The battery SOC prediction algorithm based on E3D-LSTM and cell position structural features according to claim 2, characterized in that, In the standardization process, the calculation is performed by the following formula 4. The battery SOC prediction algorithm based on E3D-LSTM and cell position structural features according to claim 3, characterized in that, In step 2, the processed input data is divided into the training set, the verification set and the test set according to a ratio of 3:1:
1. , in This represents the data in the m-th row and n-th column (r-dimensional) of the normalized battery matrix X. The original data is in row m, column n, and r dimensions. Let be the standard deviation of all data in the r-th dimension matrix. Let be the mean of all data in the r-th dimension matrix.
5. The battery SOC prediction algorithm based on E3D-LSTM and cell position structural features according to claim 1, characterized in that, In step 3, the E3D-LSTM-based battery SOC prediction model comprises a double-layer E3D-LSTM model and a prediction layer, wherein the E3D-LSTM model comprises a recall gate and an output gate, and the prediction layer adopts a perception machine.
6. The battery SOC prediction algorithm based on E3D-LSTM and cell position structural features according to claim 4, characterized in that, 7. The battery SOC prediction algorithm based on E3D-LSTM and cell position structure characteristics according to claim 6, wherein the calculation formula of the recall gate is as follows: The calculation formula of the output gate is as follows: The formula applied to the prediction layer is as follows: where is the input to the system, and is the activation function of the neural network, , , , , , is the weight matrix of the system, , , is the bias of the system, * represents a 3D convolution operation, represents a Hadamard product, and are two normalization methods of the neural network; The specific process of step 4 comprises the following steps: In the formula is used for channel data transformation convolution operation, is the output result of the E3D-LSTM model; Step 4-2. Using the mean square error to calculate the error between the actual output value and the predicted output value of the traffic flow, and adjusting the weight matrix according to the error; In the formula is a neural network activation function, and is a parameter matrix and bias, is the result of the output gate of the second layer E3D-LSTM model.
8. The E3D-LSTM and cell location structural feature based battery SOC prediction algorithm according to any one of claims 1-7, characterized in that, Step 4-3. Setting the number of iterations, repeating step 4-1 and step 4-2, constantly updating the weight matrix, and verifying the prediction effect of the E3D-LSTM-based battery SOC prediction model by using the verification set in the iteration process; Step 4-1. Select the soc value of a target time point in the training set , the sequence of the target time point and the previous τ time periods as input, and the predicted output value is obtained by the E3D-LSTM-based battery SOC prediction model described in step 3 ; Step 4-4. Selecting the best parameters in the verification set in the iteration process as the final parameters of the E3D-LSTM-based battery SOC prediction model for saving; Step 4-5. Testing the E3D-LSTM-based battery SOC prediction model by using the test set to judge the prediction accuracy of the model. In step 4-2, the weight matrix is adjusted in the reverse direction by using a back propagation algorithm according to the error. 9. The battery SOC prediction algorithm based on E3D-LSTM and cell location structural features according to claim 8, characterized in that, 10. The battery SOC prediction algorithm based on E3D-LSTM and cell location structural features according to claim 8, characterized in that, The mean square error formula in step 4-2 is .
Citation Information
Patent Citations
Hybrid electric vehicle battery SOC prediction method
CN103487759A
Battery charge state prediction method and system based on convolutional neural network
CN119199558A