ACO-GRU-LSTM Based Lithium Battery SOC Estimation Method
By using ant colony optimization algorithm (ACO) to optimize the hyperparameters of GRU-LSTM, the problem of low efficiency and easy to fall into local optimality in the existing technology is solved, and a more accurate and stable SOC estimation of lithium batteries is achieved.
Patent Information
- Application Number
- CN202510420906.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-04-07
AI Technical Summary
The existing GRU-LSTM hyperparameter optimization method has the problem of low optimization efficiency and easy to fall into local optimality, resulting in large errors in SOC estimation and affecting the performance of the battery management system.
The ant colony optimization algorithm (ACO) is used to automatically optimize the hyperparameters of GRU-LSTM. Through the exploration and convergence of the ant colony in the search space, the optimal hyperparameter combination is dynamically searched to reduce the SOC estimation error.
Optimizing the hyperparameters of GRU-LSTM through ACO significantly reduces the error of SOC estimation, improves the generalization ability of the model, and enhances the adaptability under complex operating conditions.
Smart Images

Figure CN119936683B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of SOC estimation methods for ternary lithium power batteries, specifically a lithium battery SOC estimation method based on ACO-GRU-LSTM. Background Art
[0002] With the rapid development of the electric vehicle industry, lithium-ion batteries have become the main power source for electric vehicles due to their high energy density, long cycle life, and excellent charge and discharge characteristics. The SOC of the battery is an important indicator for measuring the remaining battery capacity and health status, directly affecting the endurance and safety of electric vehicles. Accurate SOC estimation is crucial for improving the performance of the battery management system, optimizing the battery service life, and ensuring the safe operation of electric vehicles.
[0003] Currently, SOC estimation methods mainly include: model-based methods (such as Kalman filtering, sliding mode observers), data-driven methods (such as neural networks, deep learning), and fusion methods. Among them, data-driven methods, especially the recurrent neural network RNN structure, such as long short-term memory network LSTM and gated recurrent unit GRU, have gradually become a research hotspot in SOC estimation due to their advantages in processing time series data. LSTM regulates the information flow through forget gates, input gates, and output gates, and is suitable for long-term dependence relationship modeling. GRU uses update gates and reset gates, which can reduce the computational complexity and accelerate the training speed. Therefore, combining the advantages of GRU and LSTM is expected to further improve the accuracy and stability of SOC estimation.
[0004] However, the performance of GRU-LSTM highly depends on the optimization of hyperparameters, such as the number of neurons in the hidden layer, learning rate, batch size, and Dropout rate. Existing hyperparameter optimization methods, such as manual empirical adjustment or grid search, have problems such as low optimization efficiency and being easily trapped in local optima.
[0005] To address this problem, it is necessary to develop an algorithm for automatically optimizing the key hyperparameters of GRU-LSTM, improve the generalization ability of the model, reduce the SOC estimation error, and enhance the adaptability of the battery management system under complex working conditions. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to provide a lithium battery SOC estimation method based on ACO-GRU-LSTM for automatically optimizing the hyperparameters of GRU-LSTM, improving the generalization ability of the model, and reducing the SOC estimation error.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] ACO-GRU-LSTM Based Lithium Battery SOC Estimation Method, the method comprising the following steps:
[0009] S1. Data preprocessing and feature extraction. According to the charge and discharge experimental data of the lithium battery, use the methods of moving average, moving variance, moving root mean square and singular value decomposition to extract the key features of the moving average, moving variance, moving root mean square and left singular vector of the current and voltage data, and perform normalization processing to enhance the correlation of the features for SOC estimation. The data includes the battery terminal voltage and current;
[0010] S2. Optimize the hyperparameters of GRU-LSTM using the Ant Colony Optimization (ACO) algorithm. Use the Ant Colony Optimization (ACO) algorithm to optimize the hyperparameters of GRU-LSTM. The ant colony explores the search space and gradually converges to the optimal hyperparameter combination to minimize the SOC estimation error of the model;
[0011] S3. Train the GRU-LSTM optimized by the Ant Colony Optimization (ACO) algorithm. Use the features extracted from the current and voltage of the charge and discharge experiment of the lithium battery as the input and SOC as the output to construct a training dataset; use the GRU-LSTM optimized by the Ant Colony Optimization (ACO) algorithm for SOC estimation, and use the root mean square error (RMSE) as the loss function to adjust the network weights to improve the SOC prediction accuracy;
[0012] S4. Optimize and output the SOC estimation result. Apply moving average filtering to the SOC estimation value output by GRU-LSTM for smoothing processing to reduce the error caused by short-term fluctuations; compare with the real SOC data to evaluate the estimation accuracy and stability, and finally output the optimized SOC estimation result;
[0013] As a further technical solution of the present invention, in step S1, the steps of using the methods of moving average, moving variance, moving root mean square and singular value decomposition to extract the key features of the moving average, moving variance, moving root mean square and left singular vector of the current and voltage data and performing normalization processing include:
[0014] S11. Use the methods of moving average, moving variance, moving root mean square and singular value decomposition to extract key features. The calculation formulas are as follows:
[0015] ;
[0016] In the formula, is the sliding window size, is the time series voltage and current data, is the current moment, is the time series within the window, is the moving average of the voltage and current at the current moment;
[0017] ;
[0018] In the formula, is the sliding window size, is the time series voltage and current data, is the current moment, is the time series within the window, is the moving average value of the voltage and current at the current moment, is the moving variance of the voltage and current at the current moment;
[0019] ;
[0020] In the formula, is the sliding window size, is the time series voltage and current data, is the current moment, is the time series within the window, is the root mean square value of the voltage and current at the current moment;
[0021] ;
[0022] In the formula, is the left singular vector matrix, is the singular value matrix, is the right singular vector matrix, is the time series voltage and current data;
[0023] S12. Use the zero-mean normalization method to normalize the extracted key data features. The calculation formula is as follows:
[0024] ;
[0025] In the formula, is the key data feature extracted from the current and voltage data, is the sample mean of the data feature, is the sample standard deviation of the data feature, is the data after normalization processing.
[0026] As a further technical solution of the present invention, in step 2), the steps of using the ant colony optimization algorithm (ACO) to optimize the hyperparameters of GRU-LSTM include:
[0027] S21. Set the objective function:
[0028] ;
[0029] ;
[0030] Among them, is the root mean square error, is the number of samples, is the th value of the prediction, is the th value of the actual, is the hyperparameter of GRU-LSTM, including the number of neurons in the hidden layer (numHiddenUnits), the learning rate (InitialLearnRate), the batch size (MiniBatchSize), and the Dropout rate (Dropout Rate);
[0031] S22. Generate the hyperparameter solution vector:
[0032] Ants generate candidate solutions in the search space. The hyperparameter vector of the th ant is:
[0033] ;
[0034] In the formula, is the hyperparameter of GRU-LSTM, is the number of neurons in the hidden layer, is the learning rate, is the batch size, is the dropout rate;
[0035] The ant at the th iteration selects probabilities determined by the pheromone concentration:
[0036] ;
[0037] In the formula, is the specific value of a certain hyperparameter, is the current iteration number, is all possible hyperparameter combinations, is the index of all possible hyperparameters, is the probability that the ant selects the hyperparameter , is the pheromone concentration, is the heuristic information, and respectively control the influence degrees of the pheromone and the heuristic information;
[0038] S23. The ant colony optimization algorithm (ACO) adopts the global update rule, and the pheromone is updated after each iteration:
[0039] ;
[0040] ;
[0041] In the formula, is the current pheromone concentration, is the updated pheromone concentration, is the pheromone evaporation coefficient, is the number of ants, is the ant contributed pheromone increment, is a constant, is the ant error of the GRU-LSTM trained;
[0042] S24. Repeat the loop calculation of steps S22 - S22, stop the optimization after reaching the maximum number of iterations, and output the optimal hyperparameter combination.
[0043] As a further technical solution of the present invention, in step 3), the steps of obtaining the SOC estimation value using the GRU-LSTM optimized by the ant colony optimization algorithm (ACO) include:
[0044] S31. The GRU-LSTM models the time series data through a gating mechanism, where the GRU adjusts the influence of historical information through an update gate and a reset gate, and the LSTM dynamically regulates the information flow through a forget gate, an input gate, and an output gate, so that the weights of the recurrent network change dynamically over time steps, thereby adapting to the integration scale of different time steps;
[0045] In the process of information transmission, the GRU controls the dependence of the current moment state on the historical state through the update gate, and the calculation formula is as follows:
[0046] ;
[0047] S32. The GRU selectively forgets part of the historical information through the reset gate to extract the key information at the current moment, and its calculation formula is as follows:
[0048] ;
[0049] S33. Calculate the new candidate hidden state, combine the current input and past information, and update the GRU hidden state at the current moment. The formula is as follows:
[0050] ;
[0051] In the formula, is the update gate to control the current hidden state to retain the past state , is the activation function, is the input at the current moment, is the weight matrix of the update gate, is the weight matrix of the candidate hidden state, is the bias of the update gate, is the bias of the reset gate, is the bias of the candidate hidden state, is the reset gate, is the candidate hidden state, is the hyperbolic tangent activation function;
[0052] S34. The LSTM selects the historical information to be retained or forgotten through the forget gate, and this process is controlled by the function, and the calculation formula is as follows:
[0053] ;
[0054] In the formula, is the output of the forget gate, is the activation function, is the weight matrix of the forget gate, is the bias of the forget gate, is the hidden state at the previous moment, is the input at the current moment;
[0055] S35. The LSTM selects the information to be updated at the current moment through the input gate, and calculates the control variable of the input gate and the new candidate cell state as shown in the following formula:
[0056] ;
[0057] ;
[0058] In the formula, is the output of the input gate, is the weight matrix of the input gate, is the bias of the input gate, is the candidate cell state, is the weight matrix of the candidate cell, is the bias of the candidate cell;
[0059] S36. Calculate the cell state at the current moment:
[0060] ;
[0061] In the formula, is the cell state at the current moment, is the cell state at the previous moment;
[0062] S37. The LSTM determines the final output at the current moment through the output gate and updates the hidden state:
[0063] ;
[0064] ;
[0065] In the formula, is the output gate, is the weight matrix of the output gate, is the bias of the output gate, is the hidden state at the current moment.
[0066] As a further technical solution of the present invention, in step S4, the steps of smoothing the SOC estimated value output by GRU-LSTM using moving average filtering include:
[0067] ;
[0068] In the formula, is the smoothed output of the SOC at the current moment, is the current moment, is the offset of the time index, is the size of the sliding window, is the current moment and the previous SOC estimated values. After being smoothed by moving average filtering, the final estimated SOC value is output.
[0069] Compared with the prior art, the beneficial effects of the present invention are:
[0070] 1. The method of the present invention uses moving mean, moving variance, moving root mean square, and singular value decomposition to extract the key features of current and voltage data, retains the key information of experimental data, reduces the influence of noise, improves the stability of data, enhances the learning ability of the neural network, and improves the SOC estimation accuracy.
[0071] 2. The method of the present invention combines the advantages of GRU and LSTM. GRU is used to efficiently process short-term dependence relationships, and LSTM is good at capturing long-term dependence information, making the SOC estimation more accurate and stable.
[0072] 3. The method of the present invention uses the ant colony optimization algorithm (ACO) to adaptively optimize the hyperparameters of GRU-LSTM, dynamically search for the optimal hyperparameter combination, and effectively reduce the estimation error of SOC.
[0073] 4. The method of the present invention uses moving average filtering to improve the robustness of SOC prediction. After predicting SOC using GRU-LSTM, moving average filtering is used to smooth the prediction results to reduce short-term fluctuations and improve the smoothness of SOC prediction. Description of the Drawings
[0074] Figure 1 It is a flowchart of the current-voltage data feature extraction of the present invention.
[0075] Figure 2 It is a flowchart of the combination of the ant colony optimization algorithm (ACO) and GRU-LSTM of the present invention.
[0076] Figure 3 It is a structural diagram of a single GRU unit of the present invention.
[0077] Figure 4 It is a structural diagram of a single LSTM unit of the present invention.
[0078] Figure 5 It is a structural diagram of the GRU-LSTM model of the present invention.
[0079] Figure 6 It is a comparison chart of the SOC estimation results of ACO-GRU-LSTM and the LSTM model in the example.
[0080] Figure 7 It is a comparison chart of the SOC estimation results under hybrid working conditions in the example.
[0081] Figure 8 It is a comparison chart of the moving filtering processing results in the example. Detailed Embodiments
[0082] The technical solutions of this patent will be further described in detail below in conjunction with the specific embodiments.
[0083] The embodiment of the present invention provides a method for estimating the SOC of a lithium battery based on ACO-GRU-LSTM, including the following steps:
[0084] S1. Data preprocessing and feature extraction. According to the charge and discharge experimental data of the lithium battery, the data includes the battery terminal voltage and current. The moving average, moving variance, moving root mean square, and singular value decomposition methods are used to extract the key features of the moving average, moving variance, moving root mean square, and left singular vector of the current-voltage data, and normalization processing is performed to enhance the correlation of the features to SOC estimation;
[0085] The steps of extracting key features by moving average, moving variance, moving root mean square, and singular value decomposition and performing normalization processing include:
[0086] S11. Extract key features using the methods of moving average, moving variance, moving root mean square, and singular value decomposition. The process is as follows Figure 1 shown.
[0087] ;
[0088] In the formula, is the sliding window size, is the time series voltage and current data, is the current moment, is the time series within the window, is the moving average of the voltage and current at the current moment;
[0089] ;
[0090] In the formula, is the sliding window size, is the time series voltage and current data, is the current moment, is the time series within the window, is the moving average of the voltage and current at the current moment, is the moving variance of the voltage and current at the current moment;
[0091] ;
[0092] In the formula, is the sliding window size, is the time series voltage and current data, is the current moment, is the time series within the window, is the moving root mean square value of the voltage and current at the current moment;
[0093] ;
[0094] In the formula, is the left singular vector matrix, is the singular value matrix, is the right singular vector matrix, is the time series voltage and current data;
[0095] S12. Normalize the extracted key data features using the zero-mean normalization method. The calculation formula is as follows:
[0096] ;
[0097] In the formula, is the key data feature extracted from the current and voltage data, is the sample mean of the data feature, is the sample standard deviation of the data feature, is the data after normalization.
[0098] S2. The ant colony optimization (ACO) algorithm is used to optimize the hyperparameters of GRU-LSTM. The ant colony optimization (ACO) algorithm is adopted to optimize the hyperparameters of GRU-LSTM. The ants explore the search space and gradually converge to the optimal hyperparameter combination to minimize the SOC estimation error of GRU-LSTM. The optimization process of the ant colony optimization (ACO) algorithm is as Figure 2 shown;
[0099] The steps of using the ant colony optimization (ACO) algorithm to optimize the hyperparameters of GRU-LSTM include:
[0100] S21. Set the objective function:
[0101] ;
[0102] ;
[0103] where, is the root mean square error, is the number of samples, is the predicted th value, is the actual th value, are the hyperparameters of GRU-LSTM, including the number of neurons in the hidden layer (numHiddenUnits), the learning rate (InitialLearnRate), the batch size (MiniBatchSize), and the Dropout rate (Dropout Rate);
[0104] S22. Generate the hyperparameter solution vector:
[0105] The ants generate candidate solutions in the search space. The hyperparameter vector of the th ant is:
[0106] ;
[0107] In the formula, are the hyperparameters of GRU-LSTM, is the number of neurons in the hidden layer, is the learning rate, is the batch size, is the dropout rate;
[0108] The ant at the The selection probability during the t-th iteration is determined by the pheromone concentration:
[0109] ;
[0110] where, is the specific value of a certain hyperparameter, is the current iteration number, is all possible hyperparameter combinations, is the index of all possible hyperparameters, is the ant selecting the hyperparameter with probability, is the pheromone concentration, is the heuristic information, and control the influence degrees of pheromone and heuristic information respectively;
[0111] S23. The ant colony optimization algorithm (ACO) adopts a global update rule, and the pheromone is updated after each iteration:
[0112] ;
[0113] ;
[0114] where, is the current pheromone concentration, is the updated pheromone concentration, is the pheromone evaporation coefficient, is the number of ants, is the ant contributing the pheromone increment, is a constant, is the error of the GRU-LSTM trained by the ant ;
[0115] S24. Repeat steps S22 - S23 for cyclic calculation, stop the optimization after reaching the maximum number of iterations, and output the optimal hyperparameter combination.
[0116] S3. Train the GRU-LSTM network optimized by the ant colony optimization algorithm (ACO), use the features extracted from the current and voltage of the charge and discharge experiments of the lithium battery as the input, and the SOC as the output to construct a training dataset; use the GRU-LSTM optimized by the ant colony optimization algorithm (ACO) for SOC estimation, and adopt the root mean square error (RMSE) as the loss function to adjust the network weights to improve the SOC prediction accuracy;
[0117] The steps to obtain the SOC estimation value using the GRU-LSTM optimized by the ant colony optimization algorithm (ACO) include:
[0118] S31. The GRU-LSTM models time series data through a gating mechanism. In the GRU, the influence of historical information is adjusted by an update gate and a reset gate. In the LSTM, the information flow is dynamically regulated by a forget gate, an input gate, and an output gate, enabling the weights of the recurrent network to vary dynamically over time steps to adapt to the integration scales at different time steps. The structure of a single GRU cell is as shown in Figure 3 shown;
[0119] During the information transmission process, the GRU controls the degree of dependence of the current moment state on the historical state through the update gate. The calculation formula is as follows:
[0120] ;
[0121] S32. The GRU selectively forgets some historical information through the reset gate to extract the key information at the current moment. The calculation formula is as follows:
[0122] ;
[0123] S33. Calculate the new candidate hidden state, combine the current input and past information, and update the GRU hidden state at the current moment. The formula is as follows:
[0124] ;
[0125] In the formula, is the update gate that controls the current hidden state to retain the past state , is the activation function, is the input at the current moment, is the weight matrix of the update gate, is the weight matrix of the candidate hidden state, is the bias of the update gate, is the bias of the reset gate, is the bias of the candidate hidden state, is the reset gate, is the candidate hidden state, is the hyperbolic tangent activation function;
[0126] S34. The LSTM selects the historical information to be retained or forgotten through the forget gate, and this process is controlled by the sigmoid function. The calculation formula is as follows:
[0127] ;
[0128] In the formula, is the output of the forget gate, is the activation function, is the weight matrix of the forget gate, is the bias of the forget gate, is the hidden state at the previous moment, is the input at the current moment;
[0129] S35. The LSTM selects the information to be updated at the current moment through the input gate, and calculates the control variable of the input gate and the new candidate cell state, as shown in the following formula:
[0130] ;
[0131] ;
[0132] In the formula, is the output of the input gate, is the weight matrix of the input gate, is the bias of the input gate, is the candidate cell state, is the weight matrix of the candidate cell, is the bias of the candidate cell;
[0133] S36. Calculate the cell state at the current moment:
[0134] ;
[0135] In the formula, is the cell state at the current moment, is the cell state at the previous moment;
[0136] S37. The LSTM determines the final output at the current moment through the output gate and updates the hidden state:
[0137] ;
[0138] ;
[0139] In the formula, is the output gate, is the weight matrix of the output gate, is the bias of the output gate, is the hidden state at the current moment. The structure of a single LSTM unit is as shown in Figure 4 , and the structure of the GRU-LSTM model is as shown in Figure 5 ;
[0140] S4. Optimize and output the SOC estimation result. Apply moving average filtering to the SOC estimation value output by the GRU-LSTM for smoothing to reduce the error caused by short-term fluctuations; compare with the real SOC data to evaluate the estimation accuracy and stability, and finally output the optimized SOC estimation result.
[0141] The steps of smoothing the SOC estimation value output by GRU-LSTM using moving average filtering include:
[0142] ;
[0143] In the formula, is the smoothed output of the SOC at the current moment, is the current moment, is the offset of the time index, is the moving window size, is the current moment and the previous SOC estimation values. After being smoothed by moving average filtering, the final estimated SOC value is output.
[0144] The lithium battery SOC estimation method based on ACO-GRU-LSTM of the present invention takes a single-cell INR 18650-20R lithium battery as an example. At an ambient temperature of 25°C, DST and FUDS working condition experimental data are used for feature extraction. The DST working condition data is used for training, and the complete FUDS working condition is used for prediction. Compared with LSTM, the MAE and RMSE of the ant colony optimization algorithm (ACO) for optimizing GRU-LSTM to estimate SOC are reduced by 20.35% and 20.33% respectively, and the estimation results are as shown in Figure 6 shown. Under the DST+FUDS hybrid working condition, compared with LSTM, the MAE and RMSE of the ant colony optimization algorithm (ACO) for optimizing GRU-LSTM to estimate SOC are reduced by 34.33% and 30.38% respectively, and the estimation results are as shown in Figure 7 shown. After the SOC prediction result is processed by moving filtering, the error caused by short-term fluctuations can be reduced, and the estimation curve is smoother, as shown in Figure 8 shown. Therefore, the lithium battery SOC estimation method based on ACO-GRU-LSTM of the present invention improves the generalization ability of the model, reduces the SOC estimation error, and enhances the adaptability under complex working conditions.
[0145] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present invention.
[0146] In addition, it should be understood that although this specification is described in terms of embodiments, not every embodiment contains only one independent technical solution. This narrative manner of the specification is only for clarity. Those skilled in the art should regard the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A lithium battery SOC estimation method based on ACO-GRU-LSTM, characterized in that: The method comprises the following steps: S1. Data preprocessing and feature extraction. According to the charging and discharging experimental data of lithium batteries, the moving mean, moving variance, moving root mean square and singular value decomposition methods are used to extract the key features of the current and voltage data, such as the moving mean, moving variance, moving root mean square and left singular vector, and normalization is performed to enhance the relevance of the features to SOC estimation. The charging and discharging experimental data include the battery terminal voltage and current. S2. Ant colony optimization algorithm is used to optimize the hyperparameters of GRU-LSTM. The ant colony optimization algorithm is used to optimize the hyperparameters of GRU-LSTM. The ant colony explores the search space and gradually converges to the optimal hyperparameter combination to minimize the SOC estimation error of GRU-LSTM. S3. Train the GRU-LSTM optimized by the ant colony optimization algorithm, take the features extracted from the current and voltage of the lithium battery charge and discharge experiment as input, and SOC as output to construct a training data set; use the GRU-LSTM optimized by the ant colony optimization algorithm to estimate SOC, and use the root mean square error as the loss function to adjust the network weights and improve the SOC prediction accuracy; S4. Optimize and output the SOC estimation results. Apply sliding average filtering to smooth the SOC estimation value output by GRU-LSTM to reduce the error caused by short-term fluctuations. Compare it with the actual SOC data to evaluate the estimation accuracy and stability, and finally output the optimized SOC estimation result.
2. The lithium battery SOC estimation method based on ACO-GRU-LSTM according to claim 1, characterized in that: In step S1, the steps of extracting the key features of the moving mean, moving variance, moving root mean square, and left singular vector of the current and voltage data by using the moving mean, moving variance, moving root mean square, and singular value decomposition method, and performing normalization processing include: S11. Use the moving mean, moving variance, moving root mean square and singular value decomposition methods to extract key features. The calculation formula is as follows: ; In the formula, is the sliding window size, is the time series voltage and current data, For the current moment, is the time series within the window, is the moving average value of voltage and current at the current moment; ; In the formula, is the sliding window size, is the time series voltage and current data, For the current moment, is the time series within the window, is the moving average value of voltage and current at the current moment, is the moving variance of voltage and current at the current moment; ; In the formula, is the sliding window size, is the time series voltage and current data, For the current moment, is the time series within the window, is the moving RMS value of voltage and current at the current moment; ; In the formula, is the left singular vector matrix, is the singular value matrix, is the right singular vector matrix, is the time series voltage and current data; S12. Use the zero mean normalization method to normalize the moving mean, moving variance, moving root mean square, and left singular vector of the extracted current and voltage data. The calculation formula is as follows: ; In the formula, To extract the key data features from the current and voltage data, is the sample mean of the data feature, is the sample standard deviation of the data feature, The data are normalized.
3. The lithium battery SOC estimation method based on ACO-GRU-LSTM according to claim 1, characterized in that: In step S2, the steps of optimizing the hyperparameters of the GRU-LSTM using the ant colony optimization algorithm include: S21. Set the objective function: ; ; in, is the root mean square error, is the sample size, For the predicted indivual value, For the actual indivual value, are the hyperparameters of GRU-LSTM, including the number of hidden layer neurons, learning rate, batch size, and Dropout rate; S22. Generate hyperparameter solution vector: Ants generate candidate solutions in the search space. The hyperparameter vector for ants is: ; In the formula, is the hyperparameter of GRU-LSTM, is the number of neurons in the hidden layer, is the learning rate, is the batch size, is the random dropout rate; Ant In the The selection probability during the round iteration is determined by the pheromone concentration: ; In the formula, is the specific value of a hyperparameter, is the current iteration number, For all possible hyperparameter combinations, is the index of all possible hyperparameters, For Ants Choosing Hyperparameters The probability of is the pheromone concentration, is the heuristic information, and Separately control the influence of pheromones and heuristic information; S23, the ant colony optimization algorithm adopts a global update rule, and the pheromone is updated after each iteration: ; ; In the formula, is the current pheromone concentration, is the updated pheromone concentration, is the pheromone volatility coefficient, is the number of ants, For Ants Contribution to pheromone increment, is a constant, For Ants The error of the trained GRU-LSTM; S24, repeat steps S22-S23 to perform calculations in a loop, stop optimization after reaching the maximum number of iterations, and output the optimal hyperparameter combination.
4. The lithium battery SOC estimation method based on ACO-GRU-LSTM according to claim 1, characterized in that: In step S3, the steps of obtaining the SOC estimation value using the GRU-LSTM optimized by the ant colony optimization algorithm include: S31, GRU-LSTM models time series data through a gating mechanism, where GRU adjusts the influence of historical information through update gates and reset gates, and LSTM dynamically adjusts the information flow through forget gates, input gates, and output gates, so that the weights of the recurrent network change dynamically in time steps, thereby adapting to the integration scale of different time steps; In the process of information transmission, GRU controls the degree of dependence of the current state on the historical state through the update gate. The calculation formula is as follows: ; S32, GRU selectively forgets some historical information by resetting the gate to extract the key information at the current moment. The calculation formula is as follows: ; S33. Calculate the new candidate hidden state, combine the current input and past information, and update the GRU hidden state at the current moment. The formula is as follows: ; In the formula, Controls the current hidden state for the update gate Preserve past state , for Activation function, is the input at the current moment, is the weight matrix of the update gate, is the weight matrix of the candidate hidden state, is the bias of the update gate, To reset the gate bias, is the bias of the candidate hidden state, To reset the gate, is a candidate hidden state, is the hyperbolic tangent activation function; S34, LSTM selects historical information to be retained or forgotten through the forget gate. This process is composed of Function control, the calculation formula is as follows: ; In the formula, is the output of the forget gate, for Activation function, is the weight matrix of the forget gate, is the bias of the forget gate, is the hidden state at the previous moment, is the input at the current moment; S35, LSTM selects the information to be updated at the current moment through the input gate, and calculates the control variable of the input gate and the new candidate cell state, as shown in the following formula: ; ; In the formula, is the output of the input gate, is the weight matrix of the input gate, is the bias of the input gate, is the candidate cell state, is the weight matrix of candidate cells, Bias for candidate cells; S36. Calculate the cell state at the current moment: ; In the formula, is the cell state at the current moment, is the cell state at the previous moment; S37, LSTM determines the final output at the current moment through the output gate and updates the hidden state: ; ; In the formula, is the output gate, is the weight matrix of the output gate, is the bias of the output gate, is the hidden state at the current moment.
5. The lithium battery SOC estimation method based on ACO-GRU-LSTM according to claim 1, characterized in that: In step S4, the step of applying a sliding average filter to smooth the SOC estimation value output by the GRU-LSTM includes: ; In the formula, is the smooth output of SOC at the current moment, For the current moment, is the offset of the time index, is the sliding window size, is the current moment and its previous The SOC estimation value is processed by sliding average filtering and smoothing to output the final estimated SOC value.
Citation Information
Patent Citations
SOC prediction method and system for lithium ion battery of electric forklift
CN119224587A
KR20240160806A