Lithium ion battery health state prediction method based on IWOA optimization LSTM network

By improving the whale optimization algorithm to optimize the LSTM network and combining multi-source health features and grey relational analysis, the problems of capturing long-term time-series features and tuning hyperparameters in the SOH prediction of lithium-ion batteries are solved, achieving high-precision prediction of battery capacity degradation trajectory, which is suitable for battery management systems.

CN121805862APending Publication Date: 2026-04-07SOUTHWEST JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing methods for predicting state of harm (SOH) in lithium-ion batteries are difficult to effectively capture long-term time-series characteristics, and the hyperparameters of LSTM models are difficult to tune, resulting in insufficient generalization ability and unstable predictions.

Method used

An improved whale optimization algorithm (IWOA) is used to optimize the LSTM network. By constructing multi-source health features, grey relational weighted fusion, and an improved hyperparameter search mechanism, combined with grey relational analysis, dynamic inertia weights, and a global memory pool, the hyperparameters of the LSTM are optimized to improve prediction accuracy.

Benefits of technology

It achieves high-precision prediction of lithium-ion battery capacity degradation trajectory, improves model stability and prediction accuracy, and is suitable for online health assessment in battery management systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121805862A_ABST
    Figure CN121805862A_ABST
Patent Text Reader

Abstract

The invention discloses a lithium ion battery health state prediction method based on an IWOA optimized LSTM network, and the method comprises the steps: extracting three health features, namely discharge temperature peak time, average discharge voltage and constant-current charge time, from the charge and discharge data of a battery, carrying out the normalization, determining the correlation degree between each feature and SOH through gray correlation analysis, and calculating the weight; constructing an indirect health feature sequence; establishing an LSTM time sequence prediction model, and performing global optimization on hyper-parameters of the LSTM network by adopting an improved whale optimization algorithm which introduces a dynamic inertia weight and a global memory pool mechanism; and predicting the SOH of the battery by using the optimized IWOA-LSTM model. According to the method, on the premise that an original SOH measurement sequence is not changed, the feature representation capacity and the model hyper-parameter search efficiency can be remarkably improved, prediction errors and over-fitting risks are reduced, and the method is suitable for SOH online estimation and life management in an electric vehicle and an energy storage system battery management system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of health management technology for new energy storage systems, specifically relating to a method for predicting the health status of lithium-ion batteries based on an IWOA-optimized LSTM network. Background Technology

[0002] Lithium-ion batteries are widely used in energy storage, electric vehicles, and portable devices. However, during cycling, they exhibit significant nonlinear degradation characteristics due to factors such as solid electrolyte interphase (SEI) growth, polarization, and active material loss. When the battery capacity drops to a threshold, it can easily lead to performance degradation or even safety accidents. Therefore, high-precision prediction of SOH (Sodium Electrolyte Halide) is crucial. Existing SOH prediction methods mainly include: 1. Mechanistic model methods, which rely on electrochemical parameter identification, but the models are complex and difficult to update in real time; 2. Data-driven methods, including Support Vector Regression (SVR), Extreme Learning Machine (ELM), and deep neural networks, which can directly learn degradation patterns from historical data.

[0003] However, traditional shallow models such as SVR are unable to fully characterize the long-term dependencies of time series, while LSTM networks can capture long-term time series features through gating mechanisms, showing significant advantages in battery degradation prediction. However, the performance of LSTM models is greatly affected by network structure and hyperparameters (number of hidden layer units, learning rate, dropout, etc.), and manual parameter tuning is prone to getting stuck in local optima, resulting in insufficient generalization ability.

[0004] Whale Optimization (WOA) is an intelligent optimization algorithm based on the hunting behavior of humpback whales. It possesses global search and local exploitation capabilities, and can adaptively optimize LSTM hyperparameters in a continuous parameter space. However, it suffers from premature convergence, leading to unstable optimized hyperparameters. Summary of the Invention

[0005] The purpose of this invention is to provide a method for predicting the State of Health (SOH) of lithium-ion batteries based on an improved Whale Optimization Algorithm (IWOA) optimized Long Short-Term Memory (LSTM) neural network. By constructing multi-source health features, using grey relational weighted fusion, improving the hyperparameters of the Whale Optimization Algorithm, and employing LSTM time-series modeling, this method achieves high-precision prediction of battery capacity degradation trajectories and is suitable for online health assessment in battery management systems.

[0006] The present invention provides a method for predicting the health status of lithium-ion batteries based on an IWOA-optimized LSTM network, which specifically includes the following steps:

[0007] Step 1: Definition of State of Health (SOH) and Data Preprocessing.

[0008] Step 1.1: Define SOH, assuming the battery's current maximum capacity is... Rated capacity is Then SOH is defined as:

[0009]

[0010] Step 1.2: Outlier removal and time alignment are performed on the collected voltage V, current I, temperature T, capacity Q, and timestamps, and extreme value normalization is applied.

[0011]

[0012] in, Represents any primitive quantity. For sample index.

[0013] Step 2: Construct and normalize multi-source health features.

[0014] Three types of health characteristics (HF) that best reflect battery degradation were selected from the charge-discharge curves.

[0015] The peak discharge temperature time HF1 is:

[0016]

[0017] Where T(k) is the temperature at the k-th time point, and argmaxT(k) is the index of the time point where the temperature peak occurs. The values ​​correspond to actual time, expressed in seconds. An earlier temperature peak typically indicates increased polarization, signifying internal decay.

[0018] Assume the voltage during the constant current stage starts from... Rise to The two moments are , The average discharge voltage HF2 is then expressed as:

[0019]

[0020] This is the instantaneous voltage during the discharge phase, measured in volts.

[0021] Let the start time of the constant current phase be . The end time of the constant current phase is The constant current charging time HF3 is:

[0022]

[0023] The unit is seconds, for each of the above features , Perform linear normalization:

[0024]

[0025] Obtain the normalized feature sequence .

[0026] Step 3: Grey relational analysis and construction of indirect health features.

[0027] Step 3.1: Using the SOH sequence Using the reference sequence, with each normalized feature To compare the sequences, calculate the grey relational coefficient:

[0028]

[0029] in, The resolution coefficient is set to 0.5.

[0030] Step 3.2: Calculate the first... Grey relational degree of each feature relative to SOH:

[0031]

[0032] Where N is the total number of cyclic samples participating in the grey relational analysis. These are the health characteristic serial numbers, corresponding to three types of characteristics: peak discharge temperature time, average discharge voltage, and constant current charging time. This is a circular index. For the first The feature in the first The grey relational coefficients corresponding to each cycle. For the first Grey relational degree of each feature relative to SOH.

[0033] Step 3.3: Calculate the weights based on the correlation of each feature.

[0034]

[0035] in, The first one obtained by grey relational normalization Each feature weight, .

[0036] In a preferred embodiment of the present invention, the resolution coefficient λ of the grey relational coefficient is set to 0.5 to balance the resolution and numerical stability of the relational coefficient. When the grey relational degree γᵢ of a certain health feature relative to SOH is lower than a preset threshold of 0.6, the feature is downweighted in the subsequent model training stage to reduce the impact of weakly correlated features on the prediction accuracy of SOH. The threshold of 0.6 can be appropriately adjusted according to different battery types and application scenarios.

[0037] Step 3.4: Construct indirect health feature sequences :

[0038]

[0039] in, For the first The feature in the first Normalized eigenvalues ​​at each loop. For the first The indirect health feature values ​​corresponding to each cycle are used as the input sequence for the LSTM network, while The true health state of the same cycle is used as the target for the network's output prediction.

[0040] Step 4: Construct the IWOA-LSTM prediction model.

[0041] Step 4.1: LSTM network structure.

[0042] Continuous A cycle As an input sample:

[0043]

[0044] The corresponding target is the SOH value per cycle .

[0045] The LSTM calculation is as follows:

[0046] (1) Input gate:

[0047] in, The input gate activation vector controls the degree to which new information is written. For the Sigmoid function, compressed to , The input gate weight matrix maps the previous hidden state to the current input. This is a vector concatenated from the hidden state and the input features. This is the input gate bias vector.

[0048] (2) Gate of Oblivion:

[0049] in, The forget gate activation value determines how much of the memory from the previous moment is retained. This is the forget gate weight matrix. Offset the forget gate.

[0050] (3) Candidate memories:

[0051] in, Candidate memory information refers to new memory content that is prepared to be written. This is the candidate memory weight matrix. This is the candidate memory bias. Given the hyperbolic tangent function, the output is... .

[0052] (4) Output gate:

[0053] in, The output gate activation value determines the current cell state exposure level. This is the output gate weight matrix. This is used to bias the output gate.

[0054] Memory status update:

[0055] This represents the current state of the memory cells. This is the state of memory from the previous moment. This is for Hadamard element-wise multiplication. For the forgetting module: retain part of the memory from the previous moment. For the input module: Write new candidate memories.

[0056] Hidden state:

[0057] This is the output of the current hidden layer, used as the input for the next time step. To perform non-linear compression of memory states. The exposure level is controlled by the output gate.

[0058] Step 4.2: IWOA optimizes the objective function.

[0059] Hyperparameter set to be optimized:

[0060]

[0061] Where H is the number of hidden layer units in the LSTM. d is the initial learning rate. d is the dropout ratio. E is the number of training epochs.

[0062] Given a training set and a validation set, define an individual The fitness function is the root mean square error of the validation set:

[0063]

[0064] in, For the validation set index set, To determine the number of samples in the validation set, To use hyperparameters The trained model is effective for samples The predicted value.

[0065] Step 4.3: Improve the whale optimization algorithm IWOA.

[0066] Within a given search range, N search agents (individual whales) are randomly generated, and their fitness values ​​are calculated. The individual with the lowest fitness is selected as the current global optimum. To improve the algorithm's global search capability and convergence stability, this invention makes the following improvements to the standard WOA:

[0067] (1) Improve the prey encirclement mechanism: When the number of iterations t, a dynamic inertia weight w(t) is introduced. The inertia weight decreases linearly or nonlinearly with the iteration, which is used to enhance the global exploration capability in the early stage of the algorithm and enhance the local development capability in the later stage of the algorithm.

[0068] (2) Improve the spiral update mechanism: Add an adaptive shrinkage factor to the spiral search formula so that the spiral radius gradually decreases with the number of iterations, thereby achieving a more refined local search when approaching the optimal solution.

[0069] (3) Random search and global memory pool mechanism: When |A| ≥ 1, the individual searches with a preset probability p m To avoid premature convergence, historically excellent individuals are randomly selected from the global memory pool as reference positions for updates. The global memory pool has a capacity of M. After each generation iteration, the M individuals with the lowest fitness in the current population are stored in the memory pool, and an "in-first-out" strategy is used for updates.

[0070] In each position update, when the random number p < 0.5 and |A| < 1, the individual performs a shrinking encirclement update around the current global optimum; when p < 0.5 and |A| ≥ 1, the individual explores a long distance around a randomly selected individual in the population; when p ≥ 0.5, a spiral search update is used. Finally, iteration stops when the number of iterations reaches the preset maximum number of iterations T or the fitness improvement is less than a threshold for several consecutive generations, and the optimal hyperparameter vector is output.

[0071] Step 5: SOH prediction and performance evaluation based on IWOA-LSTM.

[0072] It consists of four parts: training set construction, model training, test set prediction, and performance evaluation.

[0073] Step 5.1: Divide the health feature sequence {HF(k)} and its corresponding SOH(k) after processing in Step 1 and Step 2 into a training set and a test set in chronological order to meet the temporal continuity requirements of battery aging. Let the total sample sequence length be N, and the following division method be adopted: (1) The first 100 cycles are used as the training set. (2) The last 68 cycles are used as the test set.

[0074]

[0075]

[0076] Step 5.2: LSTM training based on optimal IWOA hyperparameters.

[0077] Step 4 yields the optimal hyperparameter combination after IWOA optimization:

[0078]

[0079] Where H* represents the optimal number of hidden layer units. Optimal learning rate The optimal dropout ratio is given, and epoch* represents the optimal number of training epochs.

[0080] The optimal hyperparameters are then incorporated into the LSTM network structure to construct the final prediction model:

[0081]

[0082] In the training set Full training is performed on the dataset, with the training objective being to minimize the mean squared error loss.

[0083]

[0084] in, These are the weights of the LSTM network.

[0085] Step 5.3: Test set prediction and performance evaluation.

[0086] After training, input the test set into the LSTM model to obtain the predicted sequence:

[0087]

[0088] The accuracy of the prediction is evaluated based on the following two categories of indicators.

[0089] (1) Root Mean Square Error (RMSE):

[0090]

[0091] RMSE reflects the absolute deviation between the predicted curve and the actual degradation trajectory; the smaller the better.

[0092] (2) Mean Absolute Percentage Error (MAPE):

[0093]

[0094] MAPE focuses more on the magnitude of relative error and is suitable for scenarios where the state of harmonics (SOH) fluctuates slightly in the later stages of battery life.

[0095] Furthermore, the resolution coefficient of the grey relational analysis described in step 3 is set to λ=0.5, which is used to measure the correlation between the feature and the SOH degenerate sequence. When the grey relational degree is lower than the threshold of 0.6, the feature is downweighted during the training phase.

[0096] Furthermore, in step 4, IWOA employs the following three types of search mechanisms:

[0097] (1) Improve the prey encirclement mechanism: introduce dynamic inertial weight w(t) to enhance global search.

[0098] (2) Improved spiral update mechanism: Adaptive shrinkage factor is used to control the spiral radius to decrease with iteration.

[0099] (3) Random search mechanism: When |A| ≥ 1, a random walk is performed, and a global memory pool is used to save the historical best solution to prevent forgetting.

[0100] IWOA performs joint optimization on the LSTM hyperparameter set {H, lr, dropout, epochs}.

[0101] Furthermore, the optimization scope of IWOA includes:

[0102] Number of hidden layer units H∈[20, 300]. Learning rate lr∈[1e-5, 1e-2]. Dropout∈[0, 0.5]. Number of training epochs∈[50, 300]. Whale population size N∈[20, 60]. Maximum number of iterations T∈[30, 100].

[0103] Furthermore, in step 5, the LSTM model training and prediction follow the principle of temporal sequence: the first phase of cyclic data is used for training, and the second phase of continuous cyclic data is used for testing, to ensure the temporal consistency of the battery degradation process. The predicted sequence must meet the following requirements: (1) a monotonically or approximately monotonically decreasing trend. (2) consistency with the shape of the actual SOH trajectory. (3) lower RMSE and MAPE in the later degradation phase.

[0104] A lithium battery health status prediction system for implementing the above method includes:

[0105] (1) Data acquisition module: collects voltage, current, temperature and capacity data during the charging and discharging process.

[0106] (2) Feature extraction module: Calculate the peak discharge temperature time, average discharge voltage and constant current charging time from the original curve.

[0107] (3) Feature normalization module: Performs Z-score processing and generates time-series feature sequences.

[0108] (4) Model optimization module: Run IWOA to optimize the hyperparameters H, lr, dropout, and epochs of LSTM.

[0109] (5) SOH prediction module: The optimal IWOA-LSTM model is used to output the predicted SOH value of the battery.

[0110] A computer-readable storage medium storing a computer program that, when executed by a processor, causes the computer to perform the above-described method.

[0111] The beneficial technical effects of this invention compared to the prior art are as follows:

[0112] This invention utilizes three health features—peak discharge temperature time, average discharge voltage, and constant current charging time—and obtains the indirect health feature IHF through grey relational weighting. This allows the input variables to simultaneously reflect degradation information across the thermal-voltage-time dimensions, improving the feature's representation of state of health (SOH). By improving the whale optimization algorithm with dynamic inertia weighting and a global memory pool, the hyperparameter search process balances early global exploration with later convergence, reducing the risk of premature convergence and improving hyperparameter search efficiency and stability. The optimal LSTM hyperparameters obtained based on IWOA achieve low RMSE and MAPE on publicly available lithium-ion battery datasets. The predicted SOH curve maintains good consistency with the actual capacity degradation trajectory in both overall trend and local variations, making it suitable for embedding in battery management systems for online health state estimation. Attached Figure Description

[0113] Figure 1 This is a flowchart illustrating the overall process of the lithium-ion battery health status prediction method based on IWOA-optimized LSTM networks according to the present invention.

[0114] Figure 2 Flowchart for the hyperparameter search of the improved IWOA (Innovation Whale Optimization) algorithm.

[0115] Figure 3 This is a curve comparing the actual and predicted SOH values ​​in battery B0005.

[0116] Figure 4 This is a schematic diagram of an LSTM network structure.

[0117] Figure 5 A flowchart for multi-source feature extraction and indirect health feature construction of lithium-ion batteries. Detailed Implementation

[0118] The present invention will be further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0119] The flowchart of the lithium-ion battery health status prediction method based on IWOA optimized LSTM network of the present invention is as follows: Figure 1 As shown, the specific steps include:

[0120] Step 1: Definition of State of Health (SOH) and Data Preprocessing.

[0121] Step 1.1: Define SOH, assuming the battery's current maximum capacity is... Rated capacity is Then SOH is defined as:

[0122]

[0123] Step 1.2: Outlier removal and time alignment are performed on the collected voltage V, current I, temperature T, capacity Q, and timestamps, and extreme value normalization is applied.

[0124]

[0125] in, Represents any primitive quantity. For sample index.

[0126] Step 2: Construct and normalize multi-source health features.

[0127] The process of multi-source feature extraction and indirect health feature construction of lithium-ion batteries is as follows: Figure 5 As shown.

[0128] Three types of health characteristics (HF) that best reflect battery degradation were selected from the charge-discharge curves: peak discharge temperature time, average discharge voltage, and constant current charging time.

[0129] The peak discharge temperature time HF1 is:

[0130]

[0131] Where T(k) is the temperature at the k-th time point, and argmaxT(k) is the index of the time point where the temperature peak occurs. The values ​​correspond to actual time, expressed in seconds. An earlier temperature peak typically indicates increased polarization, signifying internal decay.

[0132] Assume the voltage during the constant current stage starts from... Rise to The two moments are , The average discharge voltage HF2 is then expressed as:

[0133]

[0134] This is the instantaneous voltage during the discharge phase, measured in volts.

[0135] Let the start time of the constant current phase be . The end time of the constant current phase is The constant current charging time HF3 is:

[0136]

[0137] The unit is seconds, for each of the above features , Perform linear normalization:

[0138]

[0139] Obtain the normalized feature sequence .

[0140] Step 3: Grey relational analysis and construction of indirect health features.

[0141] Step 3.1: Using the SOH sequence Using the reference sequence, with each normalized feature To compare the sequences, calculate the grey relational coefficient:

[0142]

[0143] in, The resolution coefficient is set to 0.5.

[0144] Step 3.2: Calculate the first... Grey relational degree of each feature relative to SOH:

[0145]

[0146] Where N is the total number of cyclic samples participating in the grey relational analysis. These are the health characteristic serial numbers, corresponding to three types of characteristics: peak discharge temperature time, average discharge voltage, and constant current charging time. This is a circular index. For the first The feature in the first The grey relational coefficients corresponding to each cycle. For the first Grey relational degree of each feature relative to SOH.

[0147] Step 3.3: Calculate the weights based on the correlation of each feature.

[0148]

[0149] in, The first one obtained by grey relational normalization Each feature weight, .

[0150] Step 3.4: Construct indirect health feature sequences :

[0151]

[0152] in, For the first The feature in the first Normalized eigenvalues ​​at each loop. For the first The indirect health feature values ​​corresponding to each cycle are used as the input sequence for the LSTM network, while The true health state of the same cycle is used as the target for the network's output prediction.

[0153] Step 4: Construct the IWOA-LSTM prediction model.

[0154] Step 4.1: The LSTM network structure is as follows Figure 4 As shown.

[0155] Continuous A cycle As an input sample:

[0156]

[0157] The corresponding target is the SOH value per cycle .

[0158] The LSTM calculation is as follows:

[0159] (1) Input gate:

[0160] in, The input gate activation vector controls the degree to which new information is written. For the Sigmoid function, compressed to , The input gate weight matrix maps the previous hidden state to the current input. This is a vector concatenated from the hidden state and the input features. This is the input gate bias vector.

[0161] (2) Gate of Oblivion:

[0162] in, The forget gate activation value determines how much of the memory from the previous moment is retained. This is the forget gate weight matrix. Offset the forget gate.

[0163] (3) Candidate memories:

[0164] in, Candidate memory information refers to new memory content that is prepared to be written. This is the candidate memory weight matrix. This is the candidate memory bias. Given the hyperbolic tangent function, the output is... .

[0165] (4) Output gate:

[0166] in, The output gate activation value determines the current cell state exposure level. This is the output gate weight matrix. This is used to bias the output gate.

[0167] Memory status update:

[0168] This represents the current state of the memory cells. This is the state of memory from the previous moment. This is for Hadamard element-wise multiplication. For the forgetting module: retain part of the memory from the previous moment. For the input module: Write new candidate memories.

[0169] Hidden state:

[0170] This is the output of the current hidden layer, used as the input for the next time step. To perform non-linear compression of memory states. The exposure level is controlled by the output gate.

[0171] Step 4.2: IWOA optimizes the objective function.

[0172] Hyperparameter set to be optimized:

[0173]

[0174] Where H is the number of hidden layer units in the LSTM. d is the initial learning rate. d is the dropout ratio. E is the number of training epochs.

[0175] Given a training set and a validation set, define an individual The fitness function is the root mean square error of the validation set:

[0176]

[0177] in, For the validation set index set, To determine the number of samples in the validation set, To use hyperparameters The trained model is effective for samples The predicted value.

[0178] Step 4.3: Improve the Whale Optimization Algorithm (IWOA). The improved hyperparameter search process for the Whale Optimization Algorithm (IWOA) is as follows: Figure 2As shown.

[0179] Randomly generated within a given search range A search agent, i.e., an individual whale. And calculate its fitness. The individual with the lowest fitness is selected as the current global optimum. In the number of iterations At that time, dynamic inertia weights are introduced. .in, This represents the maximum number of iterations. During position updates, coefficients are defined. , , .in, For interval Internal random number. When random number and At that time, individuals perform a shrinking encirclement update around the current global optimal solution: .when and At that time, individuals surround randomly selected individuals in the population. Conduct long-distance exploration: .when At that time, a spiral search update is used: , .in, For the spiral shape parameters, For interval Internal random numbers. After each generation iteration, the population with the lowest fitness is selected. Each individual is stored in the global memory pool: In subsequent iterations, individuals are randomly selected from the memory pool with a certain probability to replace [the missing individuals]. Participate in updates to maintain population diversity. Ultimately, when the number of iterations reaches [a certain threshold], [the population will thrive]. Alternatively, if the fitness improvement is less than a set threshold after several consecutive generations, the iteration stops, and the optimal hyperparameter vector is output. .

[0180] Step 5: SOH prediction and performance evaluation based on IWOA-LSTM.

[0181] It consists of four parts: training set construction, model training, test set prediction, and performance evaluation.

[0182] Step 5.1: Divide the health feature sequence {HF(k)} and its corresponding SOH(k) after processing in Step 1 and Step 2 into a training set and a test set in chronological order to meet the temporal continuity requirements of battery aging. Let the total sample sequence length be N, and the following division method be adopted: (1) The first 100 cycles are used as the training set. (2) The last 68 cycles are used as the test set.

[0183]

[0184]

[0185] Step 5.2: LSTM training based on optimal IWOA hyperparameters.

[0186] Step 4 yields the optimal hyperparameter combination after IWOA optimization:

[0187]

[0188] Where H* represents the optimal number of hidden layer units. Optimal learning rate The optimal dropout ratio is given, and epoch* represents the optimal number of training epochs.

[0189] The optimal hyperparameters are then incorporated into the LSTM network structure to construct the final prediction model:

[0190]

[0191] In the training set Full training is performed on the dataset, with the training objective being to minimize the mean squared error loss.

[0192]

[0193] in, These are the weights of the LSTM network.

[0194] Step 5.3: Test set prediction and performance evaluation.

[0195] After training, input the test set into the LSTM model to obtain the predicted sequence:

[0196]

[0197] The accuracy of the prediction is evaluated based on the following two categories of indicators.

[0198] (1) Root Mean Square Error (RMSE):

[0199]

[0200] RMSE reflects the absolute deviation between the predicted curve and the actual degradation trajectory; the smaller the better.

[0201] (2) Mean Absolute Percentage Error (MAPE):

[0202]

[0203] MAPE focuses more on the magnitude of relative error and is suitable for scenarios where the state of harmonics (SOH) fluctuates slightly in the later stages of battery life.

[0204] Taking the publicly available B0005 battery dataset as an example, such as Figure 3 As shown, the SOH prediction curve obtained by the IWOA-LSTM model of the present invention is highly consistent with the actual capacity decay curve in terms of overall trend and local changes, which verifies the effectiveness and prediction accuracy of the method of the present invention.

[0205] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A method for predicting the state of health of lithium-ion batteries based on an IWOA-optimized LSTM network, characterized in that, By constructing multi-source health features, using grey relational weighted fusion, improving whale optimization hyperparameters, and employing LSTM time-series modeling, high-precision prediction of battery capacity degradation trajectories is achieved. Specifically, this includes the following steps: Step 1: Definition of State of Health (SOH) and Data Preprocessing; Step 1.1: Define SOH, assuming the battery's current maximum capacity is... Rated capacity is Then SOH is defined as: ; Step 1.2: Outlier removal and time alignment are performed on the collected voltage V, current I, temperature T, capacity Q, and timestamps, and extreme value normalization is applied. ; in, Represents any primitive quantity. For sample index; Step 2: Construct and normalize multi-source health features; Three types of health characteristics (HF) that best reflect battery degradation were selected from the charge-discharge curves. The peak discharge temperature time HF1 is: ; Where T(k) is the temperature at the k-th time point, and argmaxT(k) is the index of the time point where the temperature peak occurs. The unit is seconds, corresponding to actual time values; the earlier the temperature peak appears, the more polarization increases, indicating internal decay. Assume the voltage during the constant current stage starts from... Rise to The two moments are , The average discharge voltage HF2 is then expressed as: ; This is the instantaneous voltage during the discharge phase, measured in volts. Let the start time of the constant current phase be . The end time of the constant current phase is The constant current charging time HF3 is: ; The unit is seconds, for each of the above features , Perform linear normalization: ; Obtain the normalized feature sequence ; Step 3: Grey relational analysis and construction of indirect health features; Step 3.1: Using the SOH sequence Using the reference sequence, with each normalized feature To compare the sequences, calculate the grey relational coefficient: ; in, The resolution coefficient is set to 0.

5. Step 3.2: Calculate the first... Grey relational degree of each feature relative to SOH: ; Where N is the total number of cyclic samples participating in the grey relational analysis; These are the health characteristic serial numbers, corresponding to three types of characteristics: peak discharge temperature time, average discharge voltage, and constant current charging time, respectively. Circular index; For the first The feature in the first The grey relational coefficients corresponding to each cycle; For the first The grey relational degree of each feature relative to SOH; Step 3.3: Calculate the weights based on the correlation of each feature; ; in, The first one obtained by grey relational normalization Each feature weight, ; Step 3.4: Construct indirect health feature sequences : ; in, For the first The feature in the first Normalized eigenvalues ​​at each loop; For the first The indirect health feature values ​​corresponding to each cycle are used as the input sequence for the LSTM network, while The true health state of the same cycle is used as the target for the network's output prediction. Step 4: Construct the IWOA-LSTM prediction model; Step 4.1: LSTM network structure; Continuous A cycle As an input sample: ; The corresponding target is the first SOH value per cycle ; The LSTM calculation is as follows: (1) Input gate: ; in, The input gate activation vector controls the degree to which new information is written. For the Sigmoid function, compressed to , The input gate weight matrix maps the previous hidden state to the current input. The hidden state is concatenated with the input features to form a vector. The input gate bias vector; (2) Gate of Oblivion: ; in, The forget gate activation value determines how much of the memory from the previous moment is retained; This is the forget gate weight matrix; To offset the forget gate; (3) Candidate memories: ; in, Candidate memory information refers to new memory content that is prepared to be written. This is the candidate memory weight matrix; Bias for candidate memories; Given the hyperbolic tangent function, the output is... ; (4) Output gate: ; in, The output gate activation value determines the degree of exposure of the current cell state; This is the output gate weight matrix; For output gate bias; Memory status update: ; The current state of the memory cells; The state of memory from the previous moment; For Hadamard element-wise multiplication; For the forgetting module: retain partial memories from the previous moment; For the input module: Write new candidate memories; Hidden state: ; This is the output of the current hidden layer, to be used as the input for the next time step; To perform non-linear compression of memory states; The exposure level is controlled by the output gate; Step 4.2: IWOA optimizes the objective function; Hyperparameter set to be optimized: ; Where H is the number of hidden layer units in the LSTM; d is the initial learning rate; d is the dropout ratio; E is the number of training epochs. Given a training set and a validation set, define an individual The fitness function is the root mean square error of the validation set: ; in, For the validation set index set, To determine the number of samples in the validation set, To use hyperparameters The trained model is effective for samples The predicted value; Step 4.3: Improve the Whale Optimization Algorithm (IWOA); Randomly generated within a given search range A search agent, i.e., an individual whale. And calculate its fitness. The individual with the lowest fitness is selected as the current global optimal solution. In the number of iterations At that time, dynamic inertia weights are introduced. ;in, The maximum number of iterations; during position updates, coefficients are defined. , , ;in, For interval Internal random number; when random number and At that time, individuals perform a shrinking encirclement update around the current global optimal solution: ;when and At that time, individuals surround randomly selected individuals in the population. Conduct long-distance exploration: ;when At that time, a spiral search update is used: , ;in, For the spiral shape parameters, For interval Internal random numbers; after each generation iteration, select the population with the lowest fitness. Each individual is stored in the global memory pool: In subsequent iterations, individuals are randomly selected from the memory pool with a certain probability to replace [the missing individuals]. Participate in updates to maintain population diversity; ultimately, when the number of iterations reaches... Alternatively, if the fitness improvement is less than a set threshold after several consecutive generations, the iteration stops, and the optimal hyperparameter vector is output. ; Step 5: SOH prediction and performance evaluation based on IWOA-LSTM; It includes four parts: training set construction, model training, test set prediction, and performance evaluation; Step 5.1: Divide the health feature sequence {HF(k)} and the corresponding SOH(k) after processing in Step 1 and Step 2 into training set and test set in chronological order to meet the temporal continuity requirements of battery aging; Assume the total sample sequence length is N, and the following division method is adopted: (1) The first 100 cycles are used as training set; (2) The last 68 cycles are used as test set; ; ; Step 5.2: LSTM training based on optimal IWOA hyperparameters; Step 4 yields the optimal hyperparameter combination after IWOA optimization: ; Where H* represents the optimal number of hidden layer units. Optimal learning rate The optimal dropout ratio is given, and epoch* represents the optimal number of training epochs. The optimal hyperparameters are then incorporated into the LSTM network structure to construct the final prediction model: ; In the training set Full training is performed on the dataset, with the training objective being to minimize the mean squared error loss. ; in, For LSTM network weights; Step 5.3: Test set prediction and performance evaluation; After training, input the test set into the LSTM model to obtain the predicted sequence: ; The prediction accuracy is evaluated based on the following two categories of indicators; (1) Root Mean Square Error (RMSE): ; RMSE reflects the absolute deviation between the predicted curve and the actual degradation trajectory; the smaller the better. (2) Mean Absolute Percentage Error (MAPE): ; MAPE focuses more on the magnitude of relative error and is suitable for scenarios where the state of harmonics (SOH) fluctuates slightly in the later stages of battery life.

2. The method for predicting the health status of lithium-ion batteries based on an IWOA-optimized LSTM network according to claim 1, characterized in that, In step 3, the resolution coefficient of the grey relational analysis is set to λ=0.5, which is used to measure the correlation between the feature and the SOH degeneration sequence. When the grey relational degree γᵢ of a certain health feature relative to SOH is lower than the preset threshold of 0.6, the feature is downweighted during the training phase.

3. The method for predicting the health status of lithium-ion batteries based on an IWOA-optimized LSTM network according to claim 1, characterized in that, In step 4, IWOA employs the following three search mechanisms: (1) Improve the prey encirclement mechanism: introduce dynamic inertial weight w(t) to enhance global search; (2) Improved spiral update mechanism: Adaptive shrinkage factor is used to control the spiral radius to decrease with iteration; (3) Random search mechanism: When |A| ≥ 1, a random walk is performed, and a global memory pool is used to save the historical optimal solution to prevent forgetting; IWOA performs joint optimization on the LSTM hyperparameter set {H, lr, dropout, epochs}.

4. The method for predicting the health status of lithium-ion batteries based on an IWOA-optimized LSTM network according to claim 1, characterized in that, The optimization scope of IWOA includes: Number of hidden layer units H∈[20, 300]; learning rate lr∈[1e-5, 1e-2]; dropout∈[0, 0.5]; number of training epochs∈[50, 300]; whale population size N∈[20, 60]; maximum number of iterations T∈[30, 100].

5. The method for predicting the health status of lithium-ion batteries based on an IWOA-optimized LSTM network according to claim 1, characterized in that, In step 5, the LSTM model training and prediction follow the principle of time sequence division: the first phase of cyclic data is used for training, and the second phase of continuous cyclic data is used for testing, so as to ensure the time consistency of the battery degradation process; the prediction sequence must meet the following requirements: (1) monotonically or approximately monotonically decreasing trend; (2) consistent with the shape of the real SOH trajectory; (3) have lower RMSE and MAPE in the later degradation segment.

6. A lithium battery health status prediction system for implementing the method of claim 1, characterized in that the system... include: (1) Data acquisition module: collects voltage, current, temperature and capacity data during the charging and discharging process; (2) Feature extraction module: Calculate the peak discharge temperature time, average discharge voltage and constant current charging time from the original curve; (3) Feature normalization module: Performs Z-score processing and generates temporal feature sequences; (4) Model optimization module: Run IWOA to optimize LSTM hyperparameters H, lr, dropout, and epochs; (5) SOH prediction module: The optimal IWOA-LSTM model is used to output the predicted SOH value of the battery.

7. A computer-readable storage medium storing a computer program, characterized in that, When the program is executed by the processor, it causes the computer to perform the method as claimed in any one of claims 1-5.