Lithium ion battery charge state prediction method

By constructing the TCN-LSTM weight allocation model and optimizing hyperparameters using Ivy Optimization algorithm, combined with the error compensation module, the problems of high computing resources, low training efficiency and insufficient prediction accuracy in lithium-ion battery state of charge prediction are solved, and more efficient and more accurate prediction is achieved.

CN120277392APending Publication Date: 2025-07-08YANCHENG INST OF TECH +1

Patent Information

Application Number
CN202510425897.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

The existing lithium-ion battery state-of-charge prediction methods have problems such as high computing resource requirements, low model training efficiency, difficulty in selecting hyperparameters, and insufficient prediction accuracy.

Method used

A TCN-LSTM weight allocation model is constructed, combined with the Ivy Optimization Algorithm to optimize hyperparameters, and an error compensation module is added after prediction to improve the prediction capability of the model.

Benefits of technology

It improves the accuracy and accuracy of state-of-charge prediction of lithium-ion batteries, reduces the computing resource requirements, and enhances the training efficiency and prediction accuracy of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120277392A_ABST
    Figure CN120277392A_ABST
Patent Text Reader

Abstract

The invention provides a lithium ion battery charge state prediction method. The method comprises the following steps: firstly, acquiring battery experiment data, extracting characteristic data reflecting a state of charge (SOC), and performing standardization processing on the characteristic data; performing dimensionality reduction on the feature data by using a principal component analysis method, and dividing the feature data into a training set, a verification set and a test set; and a TCN-LSTM weight distribution model is constructed. Hyper-parameters of the TCN-LSTM weight distribution model are optimized through a hedera helix optimization algorithm (IVY), training set data are used for training, and an IVY-TCN-LSTM weight distribution model is constructed. And inputting test set data into the model to obtain a test set prediction value. In order to further improve the prediction precision, an error compensation module is added. And an error correction value obtained by the module is added with a test set prediction value to obtain an SOC prediction value. And finally, judging whether the SOC predicted value meets a prediction requirement or not, if not, reconstructing the model, and if yes, outputting the battery SOC predicted value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of applying artificial intelligence technology to the prediction of the state of charge of a battery, and relates to a method for predicting the state of charge of a lithium-ion battery. Background Art

[0002] Electric vehicles (EVs), including pure electric vehicles and hybrid electric vehicles, are generally considered as solutions to global energy crisis and environmental deterioration problems. To meet the requirements of electric vehicles, the battery as an alternative power source must have a higher voltage and a larger capacity, which requires the battery management system (BMS) to be multifunctional, reliable, intelligent and safe. The state of charge (SOC) refers to the relative amount of charge currently contained in the battery, usually expressed as a percentage (%). It reflects the current charging level of the battery. Compared with the maximum charging capacity of the battery, SOC represents the percentage of the remaining battery power. Battery management is crucial for the operating efficiency, safety, reliability and cost-effectiveness of general battery-powered energy systems, such as electric vehicles and renewable energy smart grids. Due to the complex electrochemical kinetics and multi-physical field coupling characteristics, a simple battery black-box simulation that only senses external characteristics such as voltage, current and surface temperature obviously cannot achieve the functions of a high-performance battery management system. How to accurately and reliably estimate and monitor key internal states is the key technology for realizing advanced battery management. Having a reliable understanding of the state of charge (SOC) of the battery is a prerequisite for effective charging, thermal management and health management of the battery. Therefore, accurately estimating SOC is of great significance.

[0003] Currently, there are mainly three methods for predicting the SOC of lithium-ion batteries: model-based methods, data-driven methods and fusion methods. With the booming development of big data and artificial intelligence, data-driven methods have shown superiority in battery prediction and have become the mainstream method for current SOC prediction.

[0004] However, there are still some deficiencies in the current data-driven SOC prediction methods. Data-driven models require more computing resources and efficiency to process large amounts of data and complex model structures, and the selection of hyperparameters for most models is also a difficult problem. Patent (CN114966436A) discloses a method, device, equipment and readable storage medium for predicting the state of charge of a lithium battery. The method for predicting the state of charge of a lithium battery first obtains online data during the operation of the lithium-ion battery; obtains a state-of-charge prediction neural network model including a convolutional neural network for extracting spatial feature information, a bidirectional long short-term memory network for extracting temporal feature information, and a fully connected layer after training; determines the real-time prediction result of the state of charge of the lithium battery according to the online data and the state-of-charge prediction neural network model. However, the hyperparameters of the model need to be selected and tuned, which reduces the training efficiency of the model. The present invention uses the ivy optimization algorithm to optimize the hyperparameters of the model, improving the training efficiency of the model. Patent (CN119199558A) discloses a method for predicting the state of charge of a battery based on a convolutional neural network. The method uses a bidirectional Kalman filter algorithm and power consumption data to obtain a first predicted SOC, and then forms a data set with the first predicted SOC and the power consumption data and passes it through a convolutional neural network again to obtain a second predicted SOC, improving the accuracy and robustness of the algorithm. However, the convolutional neural network has low computational efficiency in the estimation of time series data, poor flexibility in expanding the receptive field, and cannot effectively handle long-distance dependencies. Therefore, the present invention uses a TCN-LSTM weight allocation model to replace the convolutional neural network, and adds error compensation after the obtained prediction result, improving the estimation accuracy and computational efficiency of the state of charge of the battery. Summary of the Invention

[0005] (1) Construct a TCN-LSTM weight allocation model, automatically allocate prediction weights according to the model prediction error, and improve the prediction ability of the model;

[0006] (2) Use the ivy optimization algorithm (IVY) to optimize the hyperparameters of the TCN-LSTM weight allocation model, solving the problem that the manual hyperparameter tuning affects the SOC prediction effect and accuracy;

[0007] (3) Add error compensation (Error compensation, EC) after the IVY-TCN-LSTM prediction, making the estimated result of the model prediction more accurate and improving the prediction ability of the model;

[0008] To achieve the above object, the present invention provides the following technical solution: A method for predicting the state of charge of a lithium-ion battery, the specific steps are as follows:

[0009] S1: Obtain a battery experiment dataset, including battery voltage, battery current, and charge-discharge time data during the aging cycle charge-discharge process, and extract characteristic data reflecting the state of charge of the battery in intervals. The characteristic data includes the charging time and charging energy within the charging voltage interval in the constant current stage and the charging current interval in the constant voltage stage;

[0010] S2: For the extracted characteristic data: the charging time and charging energy within the charging voltage interval in the constant current stage and the charging current interval in the constant voltage stage, perform standardization processing using the min-max normalization method, and divide the characteristic data into training set data, validation set data, and test set data according to a certain ratio;

[0011] S3: Combine two models, the Temporal Convolutional Network (TCN) and the Long Short-Term Memory Neural Network (LSTM), to construct a TCN-LSTM weight allocation model. The TCN-LSTM weight allocation model is designed as follows: First step, use the training set data to train the TCN model and the LSTM model respectively, and verify the trained TCN model and LSTM model with the validation set data; Second step, judge the size of the Mean Absolute Error (MAE). MAE is the absolute error between the predicted value of the validation set and the true value of the validation set. Third step, perform model weight allocation. If the difference between the MAE of the TCN model and the MAE of the LSTM model is greater than the set threshold, select the model with the smaller MAE as the actual prediction model. If the difference between the MAE of the TCN model and the MAE of the LSTM model is less than or equal to a certain threshold, perform weight combination on the TCN model and the LSTM model. Fourth step, weight-combine the predicted values of the TCN model and the LSTM model, that is, the TCN-LSTM weight allocation model;

[0012] S4: Use the Ivy League Optimization Algorithm (IVY) to optimize the hyperparameters in the TCN-LSTM weight allocation model. Define the initial dropout parameter as α, the initial number of TCN network channels as β, the initial learning rate as δ, and the initial number of neurons as γ. Combine the TCN-LSTM weight allocation model to construct an IVY-TCN-LSTM weight allocation model. The hyperparameter optimization steps are as follows:

[0013] (1) Initialize the Ivy League population and parameters, determine the hyperparameters to be optimized: dropout parameter and the number of TCN network channels, learning rate, number of neurons, randomly generate multiple groups of hyperparameter combinations, and each combination corresponds to an Ivy League individual. The formula for initializing the Ivy League population is I i =I min +rand(1,D)⊙(I max -I min ),i=1,...,Npop, where I max and I minare the upper and lower bounds of the search space, rand(1, D) is a vector of uniformly distributed random dimension D within the interval (0, 1), the product of the two vectors is denoted by ⊙, and Npop represents the total number of individuals in the population;

[0014] (2) Climbing towards the sun. In each iteration, for each ivy individual, according to the ivy climbing growth mechanism towards the sun, randomly update the new search position in the new population. The formula for the ivy individual climbing and growing towards the sun is where |N(1, D)| is a vector, I ter is the number of iterations;

[0015] (3) Propagation and evolution. Calculate the objective function value according to the new search position, and decide whether to accept the neighbor position as the new position of the individual according to the propagation and evolution mechanism, so as to select the optimal individual position in the whole population, and the algorithm searches the solution space efficiently and improves the convergence. The formula for the ivy individual to communicate and spread to the surrounding neighbors to find a new optimal solution is where I Best is the optimal solution of the individual in the population;

[0016] (4) Survivor selection. After the fitness of the individual is evaluated, the excellent individuals will be retained in the next generation, while the individuals with poor performance will be eliminated, so as to obtain the global optimal solution, that is, retain the hyperparameter combination with the highest verification accuracy;

[0017] (5) Judge the termination condition. Whether the number of population iterations reaches the maximum or the fitness value is less than the error limit. If satisfied, stop the iteration and output the optimal solution, that is, output the optimized dropout parameter α * and the number of channels β of the TCN network * , learning rate δ * , the number of neurons γ * , replace the initial hyperparameters with the optimized hyperparameters, let α = α * , β = β * , δ = δ * , γ = γ * , if not satisfied, return to step (2);

[0018] S5: Input the test set data into the IVY-TCN-LSTM weight allocation model to obtain the test set prediction value, and perform error compensation on the test set prediction value to obtain the SOC prediction value;

[0019] S6: Judge whether the verification accuracy of the obtained SOC prediction value meets the design requirements. If not satisfied, repeat S4 - S5. If satisfied, the method can achieve accurate prediction of the SOC of the lithium battery.

[0020] The characteristic data described in step S1 includes the charging time and charging energy within the charging voltage range in the constant current stage and within the charging current range in the constant voltage stage; in the constant current stage, the charging voltage range is divided into different voltage sub-ranges at an interval of 0.05V, and the charging time and charging energy within each voltage sub-range are extracted as characteristic data; in the constant voltage stage, the charging current range is divided into different current sub-ranges at an interval of 0.02A, and the charging time and charging energy within each current sub-range are extracted as characteristic data.

[0021] In step S2, for the normalization processing of the characteristic data, the min-max normalization method is adopted, and the calculation formula is In the formula, x i is the characteristic data, y i is the normalized characteristic data, and max(x) and min(x) are the maximum and minimum values in the corresponding characteristic data.

[0022] The specific working steps of the TCN-LSTM weight allocation model described in step S3 are as follows:

[0023] (1) Establish a TCN model: The TCN model is stacked by multiple residual blocks. First, local temporal features are extracted through dilated causal convolution, and the calculation formula is Among them is the convolution kernel weight, k is the kernel size, d is the dilation factor, C in is the number of input channels, C out is the number of output channels, and only t - d·k ≤ t is allowed to avoid leakage of future information; Second, the feature transmission is enhanced through residual connection, and the calculation formula is Output = ReLU(H (l) + Conv1D(H (L-1) )), when C in ≠ C out , a 1×1 convolution is used to adjust the number of channels; Third, the residual blocks combined by the convolutional layer and the residual connection are stacked, and then the output is mapped to the final output result through a 1×1 convolution;

[0024] (2) Establish an LSTM model: The LSTM captures long-term temporal dependencies and realizes long-term memory and selective forgetting of information through three key gating structures. Among them, the calculation formula of the forgetting gate is f t = σ(W f ·[h t-1 , x t + b f ), h t-1 is the hidden state at the previous moment, x t is the input at the current moment, σ is the Sigmoid function, and the forgetting gate determines which information to discard from the cell state. The calculation formula of the input gate is it = σ(W i · [h t-1 , x t + b i ), the input gate determines which new information needs to be stored in the cell state and generates a candidate cell state Then update the cell state The calculation formula for the output gate is o t = σ(W o · [h t-1 , x t + b o ), h t = o t ⊙ tanh(C t ), the output gate determines the output value at the current moment; the hidden state sequence output from the LSTM is input into the fully connected layer, and linear and non - linear transformations are performed through weights and biases; the output of the fully connected layer is mapped to the final output result;

[0025] (3) Input the training set data into the TCN model and the LSTM model for training respectively to obtain the trained models f TCN and model f LSTM , let the features of the validation set be X v , and the true value be y v . After passing through the validation set, the model prediction values can be obtained as and The absolute mean errors of the model prediction values are and where Calculate the weights for combining the two models as S3 determines whether the relative difference ratio satisfies the discriminant for weight allocation as:

[0026] (4) After passing through the test set, the prediction values on the test set are obtained as and The prediction result after model integration is

[0027] In step S4, the hyperparameter optimization algorithm is as follows. Initialize the ivy population I i = I min + rand(1, D) ⊙ (I max - I min ), i = 1,..., Npop. The ivy population growth calculation formula is ΔGvi(t + 1) = rand 2 ⊙ (N(1, D) ⊙ ΔGv i(t)), where the vector ΔGvi(t) is the growth rate of the discrete-time system at time t; the calculation formula for the growth of ivy individuals climbing towards the sun is where |N(1,D)| is a vector; the calculation formula for ivy individuals to communicate and spread to their surrounding neighbors to find the optimal solution is

[0028] In step S5, the error compensation module is designed as follows: First, subtract the actual value of the training set from the predicted value of the training set to obtain the error prediction value. Keep the input features of the original training set unchanged and construct a new data set from the error prediction value, which is called the error training set. Second, use the data of the error training set to update the IVY-TCN-LSTM weight allocation model, input the test set data into the updated IVY-TCN-LSTM weight allocation model to obtain the SOC error correction value. This SOC error correction value is the error correction of the test set prediction value; add the test set prediction value and the SOC error correction value to obtain the SOC prediction value;

[0029] In step S6, select the mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) as evaluation indicators to evaluate the prediction accuracy of the IVY-TCN-LSTM weight allocation model after error correction, so as to judge whether the expected result is satisfied. The specific formula is: In the formula, N is the number of experimental estimates, y n is the actual value of SOC, is the predicted value of SOC.

[0030] Compared with the prior art, the present invention has the following technical effects: First, construct a TCN-LSTM weight allocation model, automatically allocate prediction weights according to the model prediction error, and improve the accuracy of SOC prediction; Second, add an error compensation module after the TCN-LSTM weight optimization model to make the estimated result of the model prediction more accurate and improve the prediction accuracy of SOC; Third, use the IVY optimization algorithm to optimize the hyperparameters of the TCN-LSTM weight allocation model, reduce the influence of randomly selected parameters on the model estimation result, and improve the prediction accuracy of SOC. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation to the present invention.

[0032] In the drawings:

[0033] Figure 1 is the flowchart of the method for predicting the state of charge of a lithium-ion battery according to the present invention;

[0034] Figure 2 It is a schematic diagram of the error compensation module in the present invention;

[0035] Figure 3 It is a schematic diagram of the TCN module in the present invention;

[0036] Figure 4 It is a schematic diagram of the LSTM module in the present invention;

[0037] Figure 5 It is a schematic diagram of the IVY-TCN-LSTM weight allocation model in the present invention Specific implementation manners

[0038] The following describes the preferred embodiments of the present invention with reference to the accompanying drawings. It should be understood that the embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0039] Embodiment: As Figure 1 shown, a method for predicting the state of charge of a lithium-ion battery includes the following specific steps:

[0040] Step 1: Obtain the voltage, current, and time data of the battery experimental data set during the aging cycle charge and discharge process, and extract the characteristic data reflecting the state of charge of the battery in intervals. The battery charge and discharge experiment process is as follows: First, charge at a constant current (CC) of 1.5 A until the voltage rises to 4.2 V, and then perform constant voltage (CV) charging until the current drops to 20 mA. During the discharge process, keep the current constant at 2 A. When the voltage of the battery drops from 4.2 V to the cut-off voltage, the discharge ends; the extracted characteristic data are the charging time and charging energy within the charging voltage range of 3.9 V to 4.2 V in the CC stage, and the charging time and charging energy within the charging current range of 1.5 A to 0.5 A in the CV stage; divide the charging voltage range in the CC stage into different voltage sub-ranges with a change interval of 0.05 V, and divide the charging current range in the CV stage into different current sub-ranges with a change interval of 0.02 A, and extract the charging time and charging energy within each voltage sub-range and current sub-range as the state of charge characteristic data;

[0041] Step 2: Use the min-max normalization method to normalize the characteristic data. The calculation formula is In the formula, x i is the characteristic data, y i is the normalized characteristic data, and max(x) and min(x) are the maximum and minimum values of the corresponding characteristic data. The characteristic data are divided into training set data, validation set data, and test set data according to a certain ratio of 7:2:1;

[0042] Step 3: The specific working steps of the TCN-LSTM weight allocation model are as follows:

[0043] (1) Establish the TCN model: The TCN model is stacked by multiple residual blocks. In the first step, local temporal features are extracted through dilated causal convolution, and the calculation formula is Where is the convolution kernel weight, k is the kernel size, d is the dilation factor, C in is the number of input channels, C out is the number of output channels. Only t - d·k ≤ t is allowed to avoid future information leakage. In the second step, the feature transfer is enhanced through residual connection, and the calculation formula is Output = ReLU(H (l) +Conv1D(H (L-1) )). When C in ≠C out , a 1×1 convolution is used to adjust the number of channels. In the third step, the residual blocks combined by the convolutional layer and the residual connection are stacked, and then the output is mapped to the final output result through a 1×1 convolution.

[0044] (2) Establish the LSTM model: The LSTM captures long-term temporal dependencies and realizes long-term memory and selective forgetting of information through three key gating structures. The calculation formula of the forget gate is f t =σ(W f ·[h t-1 ,x t +b f ), h t-1 is the hidden state of the previous moment, x t is the input of the current moment, σ is the Sigmoid function, and the forget gate determines which information to discard from the cell state. The calculation formula of the input gate is i t =σ(W i ·[h t-1 ,x t +b i ), and the input gate determines which new information needs to be stored in the cell state and generates a candidate cell state Then update the cell state The calculation formula of the output gate is o t =σ(W o ·[h t-1 ,x t +b o ), h t =o t ⊙tanh(C t ), and the output gate determines the output value of the current moment. The hidden state sequence output from the LSTM is input to the fully connected layer, and linear transformation and nonlinear transformation are performed through weights and biases. The output of the fully connected layer is mapped to the final output result;

[0045] (3) Input the training set data into the TCN model and the LSTM model for training respectively to obtain the trained models \(f\) TCN and model \(f\) LSTM , let the features of the validation set be \(X\) v , the true value be \(y\) v . After passing through the validation set, the model prediction values can be obtained as and Define the absolute average errors between the validation set prediction values and the validation set true values as and where Calculate the weights for combining the two models as Define the threshold \(\theta = 0.5\). If i.e., the relative difference ratio of the two algorithms is greater than the threshold, then no combination is performed. Then \(Q\) TCN = 0, \(Q\) TCN = 1. Then \(Q\) TCN = 1, \(Q\) LSTM = 0;

[0046] (4) After passing through the test set, the prediction values on the test set are obtained as and The prediction result after model integration is

[0047] Step 4: Use the Ivy optimization algorithm (IVY) to optimize the hyperparameters in the TCN-LSTM weight allocation model. Define the initial dropout parameter as \(\alpha = 0.5\), the initial number of TCN network channels as \(\beta = 2\), the initial learning rate as \(\delta = 0.001\), and the initial number of neurons as \(\gamma = 16\). Combine the TCN-LSTM weight allocation model to construct the IVY-TCN-LSTM weight allocation model. The hyperparameter optimization steps are as follows:

[0048] (1) Initialize the Ivy population and parameters, determine the hyperparameters to be optimized: dropout parameter, number of TCN network channels, learning rate, and number of neurons. Randomly generate multiple groups of hyperparameter combinations, and each combination corresponds to an Ivy individual. The formula for initializing the Ivy population is \(I\) i = \(I\) min + rand(1, D) \(\odot\) (\(I\) max -\(I\) min ), \(i = 1,..., N_{pop}\), where \(I\) max The upper bound of the population is set to 6, \(I\) min The lower bound of the population is set to 2, rand(1, D) is a vector of random dimension D uniformly distributed in the interval (0, 1), the product of two vectors is represented by \(\odot\), and \(N_{pop}=6\);

[0049] (2) Climb towards the sun. In each iteration, for each ivy individual, according to the ivy's mechanism of climbing and growing towards the sun, randomly update the new search position in the new population. The calculation formula for the ivy individual to climb and grow towards the sun is where |N(1,D)| is a vector, I ter The number of iterations is set to 3;

[0050] (3) Propagation and evolution. Calculate the objective function value according to the new search position, and determine whether to accept the neighbor position as the individual's new position according to the propagation and evolution mechanism, so as to select the optimal individual position in the whole population. The algorithm searches the solution space efficiently and improves the convergence. The calculation formula for the ivy individual to communicate and spread to the surrounding neighbors to find a new optimal solution is where I Best is the optimal solution of the individual in the population;

[0051] (4) Survivor selection. After the fitness of the individuals is evaluated, the excellent individuals will be retained in the next generation, while the individuals with poor performance will be eliminated, so as to obtain the global optimal solution, that is, retain the hyperparameter combination with the highest verification accuracy;

[0052] (5) Judge the termination condition. Whether the number of population iterations reaches the maximum or the fitness value is less than the error limit. If satisfied, stop the iteration and output the optimal solution, that is, output the optimized dropout parameter α * and the number of channels β of the TCN network * 、learning rate δ * 、the number of neurons γ * , replace the initial hyperparameters with the optimized hyperparameters, let α = α * , β = β * , δ = δ * , γ = γ * , if not satisfied, return to step (2);

[0053] Step 5: According to the method for predicting the state of charge of a lithium-ion battery described in claim 1, characterized in that, in step S5, input the training set, validation set and test set into the LVY-TCN-LSTM weight allocation model to verify and obtain the training set prediction value and the test set prediction value. Subtract the actual value of the training set from the preliminary prediction value to obtain the error value. Keep the input features of the original training set unchanged, and construct a new data set with the error prediction value as the output quantity, which is called the error training set. Use the data of the error training set to update the IVY-TCN-LSTM weight allocation model. Input the test set data into the updated IVY-TCN-LSTM weight allocation model to verify and obtain the error correction value. This error correction value is the error correction for the test set prediction value. Add the test set prediction value and the error correction value to obtain the SOC prediction value;

[0054] Step 6: Input the test set data into the error-corrected IVY-TCN-LSTM weight allocation model to verify whether the model accuracy reaches the expected requirements. Select the mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) as evaluation indicators to evaluate the prediction accuracy of the error-corrected IVY-TCN-LSTM weight allocation model, and judge whether the expected results are met. The specific formulas are as follows: In the formula, N is the number of experimental estimations, y n is the actual value of SOC, is the predicted value of SOC. If the requirements are met, output the predicted value of SOC; if not, return to step S3 to reconstruct the model.

[0055] Finally, it should be noted that the above are only examples of the present invention and are not used to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for predicting the state of charge of a lithium-ion battery, characterized in that, Based on the weight allocation model after hyperparameter optimization and the prediction value error compensation, the state of charge (SOC) of a lithium-ion battery is predicted. The method includes the following steps: S1: Obtain a battery experiment data set, including battery voltage, battery current, and charge and discharge time data during the aging cycle charge and discharge process. Extract characteristic data reflecting the state of charge of the battery in intervals. The characteristic data includes the charging time and charging energy within the charging voltage interval in the constant current stage and the charging current interval in the constant voltage stage; S2: For the extracted characteristic data: the charging time and charging energy within the charging voltage interval in the constant current stage and the charging current interval in the constant voltage stage, perform normalization processing using the min-max normalization method; the processed characteristic data is divided into training set data, validation set data, and test set data according to a certain ratio; S3: Combine two models, the time convolutional network (TCN) and the long short-term memory neural network (LSTM), to construct a TCN-LSTM weight allocation model. The TCN-LSTM weight allocation model is designed as follows: First step, use the training set data to train the TCN model and the LSTM model respectively, and verify the trained TCN model and LSTM model with the validation set data and obtain the mean absolute error (MAE); Second step, judge the size of the MAE. The MAE is the absolute error between the predicted value of the validation set and the true value of the validation set. Third step, perform model weight allocation. If the relative difference ratio between the MAE of the TCN model and the MAE of the LSTM model is greater than the set threshold, select the model with the smaller MAE as the actual prediction model. If the relative difference ratio between the MAE of the TCN model and the MAE of the LSTM model is less than or equal to a certain threshold, perform weight combination on the TCN model and the LSTM model. Fourth step, perform weighted combination on the predicted values of the TCN model and the LSTM model, that is, the TCN-LSTM weight allocation model; S4: Use the ivy optimization algorithm (IVY) to optimize the hyperparameters in the TCN-LSTM weight allocation model. The hyperparameters include the initial dropout parameter α, the initial TCN network channel number β, the initial learning rate δ, and the initial number of neurons γ. Combine the optimized hyperparameters with the TCN-LSTM weight allocation model to construct an IVY-TCN-LSTM weight allocation model. The hyperparameter optimization steps are as follows: (1) Initialize the ivy population and parameters, determine the hyperparameters to be optimized: the dropout parameter, the TCN network channel number, the learning rate, and the number of neurons. Randomly generate multiple groups of hyperparameter combinations, and each combination corresponds to an ivy individual; (2) Climb towards the sun. The ivy individuals grow towards the direction with better fitness, and adjust the hyperparameters of the ivy individuals to approach the optimal solution; (3) Propagation and evolution. Information exchange and cooperation occur among the ivy individuals, influencing each other's decisions, enabling the algorithm to efficiently search the solution space and improve convergence; (4) Survivor selection: After the fitness of individuals is evaluated, the excellent individuals are retained in the next generation, while the poorly performing individuals are eliminated, so as to obtain the global optimal solution, that is, the hyperparameter combination with the highest verification accuracy is retained; (5) Determine the termination condition, whether the population iteration count has reached the maximum or the fitness value is less than the error limit. If satisfied, stop the iteration and output the optimal solution, that is, output the optimized dropout parameter α * and the number of channels β of the TCN network * , the learning rate δ * , the number of neurons γ * . Replace the initial hyperparameters with the optimized hyperparameters, that is, let α = α * , β = β * , δ = δ * , γ = γ * . If not satisfied, return to step (2); S5: Input the training set data, validation set data, and test set data into the LVY-TCN-LSTM weight allocation model respectively to obtain the training set prediction value and the test set prediction value. Use the training set data, the training set prediction value, and the test set data as inputs, and obtain the SOC error correction value through the error compensation module. The error compensation module is designed as follows: First step, subtract the training set prediction value from the actual value of the training set to obtain the error prediction value. Keep the original training set input features unchanged, and construct a new data set from the error prediction value, which is called the error training set. Second step, use the data of the error training set to update the IVY-TCN-LSTM weight allocation model. Input the test set data into the updated IVY-TCN-LSTM weight allocation model to obtain the SOC error correction value. This SOC error correction value is the error correction of the test set prediction value. Add the test set prediction value and the SOC error correction value to obtain the SOC prediction value; S6: Judge whether the verification accuracy of the SOC prediction value meets the design requirements. If not, repeat S4 - S5. If it meets the requirements, output the prediction value of the lithium battery SOC.

2. The method for predicting the state of charge of a lithium-ion battery according to claim 1, wherein, In step S1, the feature data includes the charging time and charging energy within the charging voltage interval in the constant current stage and within the charging current interval in the constant voltage stage. The specific acquisition method is as follows: In the constant current stage, with 0.05V as the change interval, divide the charging voltage interval into different voltage sub-intervals, and extract the charging time and charging energy within each voltage sub-interval as feature data. In the constant voltage stage, with 0.02A as the change interval, divide the charging current interval into different current sub-intervals, and extract the charging time and charging energy within each current sub-interval as feature data.

3. A method for predicting the state of charge of a lithium-ion battery according to claim 1, wherein In step S2, the feature data is normalized as follows: The min-max normalization method is adopted, and the calculation formula is where x i is the feature data, y i is the normalized feature data, and max(x) and min(x) are the maximum and minimum values in the corresponding feature data.

4. A method for predicting the state of charge of a lithium-ion battery according to claim 1, characterized in that In step S3, the specific construction steps of the TCN-LSTM weight optimization model are as follows: (1) Establish the TCN model: The TCN model is stacked by multiple residual blocks. In the first step, local temporal features are extracted through dilated causal convolution, and the calculation formula is where is the convolutional kernel weight, k is the kernel size, d is the dilation factor, C in is the number of input channels, C out is the number of output channels. Only t - d·k ≤ t is allowed to avoid future information leakage. In the second step, the feature transmission is enhanced through residual connection, and the calculation formula is Output = ReLU(H (l) + Conv1D(H (L-1) )). When C in ≠ C out , a 1×1 convolution is used to adjust the number of channels. In the third step, the residual blocks combined by the convolutional layer and the residual connection are stacked, and then the output is mapped to the final output result through a 1×1 convolution; (2) Establish the LSTM model: LSTM captures long-term temporal dependencies and realizes long-term memory and selective forgetting of information through three key gating structures. The calculation formula of the forgetting gate is f t =σ(W f ·[h t-1 , x t +b f ), h t-1 is the hidden state at the previous moment, x t is the input at the current moment, σ is the Sigmoid function, and the forgetting gate determines which information to discard from the cell state. The calculation formula of the input gate is i t =σ(W i ·[h t-1 , x t +b i ), and the input gate determines which new information needs to be stored in the cell state and generates a candidate cell state and then updates the cell state The calculation formula of the output gate is o t =σ(W o ·[h t-1 , x t +b o ), h t =o t ⊙tanh(C t ), and the output gate determines the output value at the current moment; the hidden state sequence output from the LSTM is input to the fully connected layer, and linear transformation and nonlinear transformation are performed through weights and biases; Map the output of the fully connected layer to the final output result; (3) Input the training set data into the TCN model and the LSTM model respectively for training to obtain the trained models \(f\) TCN and the model \(f\) LSTM , let the features of the validation set be \(X\) v , and the true value be \(y\) v . After passing through the validation set, the model prediction values can be obtained as and Define the absolute average errors between the validation set prediction values and the validation set true values as and where Calculate the weights for combining the two models as The discriminant for determining whether the relative difference ratio satisfies the weight allocation in the S3 judgment is: (4) After passing through the test set, the predicted values on the test set are and The predicted results after model integration are 5. A method for predicting the state of charge of a lithium-ion battery according to claim 1, wherein In step S4, the method for initializing the ivy population and determining parameters is as follows: the dropout parameter, the number of channels in the TCN network, the learning rate, and the number of neurons. Multiple groups of hyperparameter combinations are randomly generated, and each combination corresponds to an ivy individual. The formula for initializing the ivy population is I i = I min + rand(1, D) ⊙ (I max - I min ), i = 1, ..., Npop, where I max and I min are the upper and lower bounds of the search space respectively, rand(1, D) is a vector of dimension D uniformly distributed in the interval (0, 1), the product of the two vectors is denoted by ⊙, and Npop represents the total number of individuals in the population; In the (2) climbing towards the sun, in each iteration, for each ivy individual, according to the ivy climbing growth mechanism towards the sun, a new search position is randomly updated in the new population. The calculation formula for the ivy individual to climb and grow towards the sun is where |N(1,D)| is a vector, I ter is the number of iterations; In the aforementioned (3) Propagation and Evolution, the objective function value is calculated based on the new search position, and according to the propagation and evolution mechanism, it is determined whether to accept the neighbor position as the new position of the individual, so as to select the optimal individual position in the entire population. The algorithm efficiently searches the solution space and improves the convergence. The calculation formula for the ivy individuals to communicate and spread to the surrounding neighbors to find new optimal solutions is where I Best is the optimal solution of the individual in the population.

6. A method for predicting the state of charge of a lithium-ion battery according to claim 1, wherein In step S6, the mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) are selected as evaluation indicators to evaluate the prediction accuracy of the error-corrected IVY-TCN-LSTM weight allocation model, so as to judge whether the expected results are met. The specific formula is as follows: where N is the number of experimental estimations, y n is the actual value of SOC, is the predicted value of SOC.

Citation Information

Patent Citations

  • Lithium battery charge state prediction method, apparatus and device, and readable storage medium

    CN114966436A

  • Battery charge state prediction method and system based on convolutional neural network

    CN119199558A

Cited By

  • Lithium battery charge state estimation method and system based on TLM model

    CN121656850A