Optimized VMD-SSA-LSTM Algorithm for Remaining Useful Life Prediction of Li-ion Batteries

In modern energy storage and electric vehicle systems, the li-ion battery has become a cornerstone due to its high energy density, long cycle life, and low self-discharge rate. However, as a li-ion battery undergoes repeated charge-discharge cycles, complex electrochemical reactions lead to irreversible aging, ultimately causing capacity degradation and failure. Predicting the Remaining Useful Life (RUL) of a li-ion battery is crucial for ensuring safety, optimizing maintenance, and preventing catastrophic failures. Traditionally, RUL prediction methods have relied on equivalent circuit models or data-driven approaches, but these often struggle with noise interference, parameter tuning inefficiencies, and capturing nonlinear degradation patterns, such as capacity regeneration phenomena. To address these challenges, we propose a novel hybrid algorithm that integrates Whale Optimization Algorithm (WOA), Variational Mode Decomposition (VMD), Sparrow Search Algorithm (SSA), and Long Short-Term Memory (LSTM) networks. This approach aims to enhance prediction accuracy and robustness for li-ion battery RUL by optimizing critical hyperparameters and decomposing complex degradation signals.

The performance of a li-ion battery degrades over time due to factors like electrode material strain and electrolyte decomposition, which reduce its capacity. When the capacity falls below 80% of its initial value, the li-ion battery is considered unfit for use, highlighting the need for accurate RUL prediction. Data-driven methods have gained popularity as they bypass the need for intricate physical models, instead leveraging historical data such as capacity fade curves. However, these methods often face issues like modal mixing in signal decomposition and suboptimal hyperparameter selection in neural networks. Our proposed WOA-VMD-SSA-LSTM algorithm tackles these problems by using WOA to optimize VMD parameters, thereby avoiding empirical tuning, and SSA to fine-tune LSTM hyperparameters, ensuring efficient model training. This combination allows for precise capture of degradation trends, including temporary capacity rebounds, which are common in li-ion battery aging data.

In this article, we first review the theoretical foundations of WOA, VMD, SSA, and LSTM, emphasizing their roles in enhancing li-ion battery RUL prediction. We then detail the methodology of our hybrid approach, including data preprocessing, parameter optimization, and prediction pipeline. Experimental validation is conducted using publicly available li-ion battery datasets from NASA PCoE, with results compared against baseline models. Multiple tables and mathematical formulas are provided to summarize key parameters, algorithms, and performance metrics. Finally, we discuss the implications of our findings and future research directions for improving li-ion battery management systems.

Theoretical Background

The core components of our hybrid algorithm include several optimization and machine learning techniques. Below, we describe each with mathematical formulations to establish a solid foundation for li-ion battery RUL prediction.

Whale Optimization Algorithm (WOA)

WOA is a metaheuristic algorithm inspired by the bubble-net hunting behavior of humpback whales. It is effective for global optimization problems, such as tuning parameters in signal decomposition for li-ion battery data. The algorithm involves three phases: encircling prey, bubble-net attacking, and searching for prey. Mathematically, the position update of a whale is represented as follows:

For encircling prey:
$$D = |C \cdot X^*(t) – X(t)|$$
$$X(t+1) = X^*(t) – A \cdot D$$
where \(D\) is the distance to the best solution \(X^*\), \(t\) is the iteration index, and \(A\) and \(C\) are coefficient vectors calculated as:
$$A = 2a \cdot r_1 – a$$
$$C = 2 \cdot r_2$$
$$a = 2 – \frac{2t}{T_{\text{max}}}$$
Here, \(r_1\) and \(r_2\) are random numbers in [0,1], \(a\) decreases linearly from 2 to 0, and \(T_{\text{max}}\) is the maximum iterations. For bubble-net attacking (exploitation), the position update is:
$$X(t+1) = X^*(t) + D_p \cdot e^{bl} \cdot \cos(2\pi l)$$
where \(D_p = |X^*(t) – X(t)|\), \(b\) is a constant for spiral shape, and \(l\) is a random number in [-1,1]. The search for prey (exploration) occurs when \(|A| \geq 1\), with:
$$D = |C \cdot X_{\text{rand}} – X(t)|$$
$$X(t+1) = X_{\text{rand}} – A \cdot D$$
where \(X_{\text{rand}}\) is a random whale position. WOA is used here to optimize VMD parameters, crucial for decomposing li-ion battery capacity signals without manual intervention.

Variational Mode Decomposition (VMD)

VMD is a signal processing technique that decomposes a time series into intrinsic mode functions (IMFs) with specific sparsity. It is superior to traditional methods like EMD for li-ion battery data, as it avoids mode mixing and endpoint effects. The variational problem involves minimizing the sum of bandwidths of all modes:
$$\min_{\{u_k\},\{\omega_k\}} \left\{ \sum_{k=1}^K \left\| \partial_t \left[ \left( \delta(t) + \frac{j}{\pi t} \right) * u_k(t) \right] e^{-j\omega_k t} \right\|_2^2 \right\}$$
subject to \(\sum_{k=1}^K u_k(t) = f(t)\), where \(u_k\) are mode functions, \(\omega_k\) are center frequencies, \(K\) is the number of modes, \(f(t)\) is the original signal (e.g., li-ion battery capacity), \(\delta(t)\) is the Dirac delta, and \(*\) denotes convolution. To solve this, an augmented Lagrangian is introduced:
$$\mathcal{L}(\{u_k\},\{\omega_k\},\lambda) = \alpha \sum_{k=1}^K \left\| \partial_t \left[ \left( \delta(t) + \frac{j}{\pi t} \right) * u_k(t) \right] e^{-j\omega_k t} \right\|_2^2 + \left\| f(t) – \sum_{k=1}^K u_k(t) \right\|_2^2 + \langle \lambda(t), f(t) – \sum_{k=1}^K u_k(t) \rangle$$
where \(\alpha\) is the penalty factor and \(\lambda\) is the Lagrange multiplier. Using alternate direction method of multipliers (ADMM), the modes and frequencies are updated iteratively until convergence. For li-ion battery RUL prediction, VMD decomposes capacity degradation data into smooth components and residuals, facilitating accurate modeling.

Sparrow Search Algorithm (SSA)

SSA is a swarm intelligence algorithm based on the foraging and anti-predation behaviors of sparrows. It is used to optimize hyperparameters in LSTM networks for li-ion battery RUL prediction. The population consists of discoverers, joiners, and scouts. The position matrix \(X\) for \(n\) sparrows in \(d\)-dimensional space is:
$$X = \begin{bmatrix} X_{1,1} & \cdots & X_{1,d} \\ \vdots & \ddots & \vdots \\ X_{n,1} & \cdots & X_{n,d} \end{bmatrix}$$
The fitness values are computed based on prediction error. Discoverers update their positions as:
$$X_{i,j}^{t+1} = \begin{cases} X_{i,j}^t \cdot \exp\left(-\frac{i}{\alpha \cdot \text{iter}_{\text{max}}}\right), & \text{if } R_2 < ST \\ X_{i,j}^t + Q \cdot L, & \text{if } R_2 \geq ST \end{cases}$$
where \(R_2\) is a random number in [0,1], \(ST\) is a safety threshold in [0.5,1], \(Q\) is a random number from normal distribution, and \(L\) is a matrix of ones. Joiners update as:
$$X_{i,j}^{t+1} = \begin{cases} Q \cdot \exp\left(\frac{X_{\text{worst}} – X_{i,j}^t}{i^2}\right), & \text{if } i > n/2 \\ X_p^{t+1} + |X_{i,j}^t – X_p^{t+1}| \cdot A^+ \cdot L, & \text{if } i \leq n/2 \end{cases}$$
where \(X_p\) is the best discoverer position, \(X_{\text{worst}}\) is the worst position, and \(A\) is a random matrix. Scouts update as:
$$X_{i,j}^{t+1} = \begin{cases} X_{\text{best}}^t + \beta \cdot |X_{i,j}^t – X_{\text{best}}^t|, & \text{if } f_i \neq f_g \\ X_{i,j}^t + K \cdot \left( \frac{|X_{i,j}^t – X_{\text{worst}}^t|}{(f_i – f_w) + \epsilon} \right), & \text{if } f_i = f_g \end{cases}$$
where \(X_{\text{best}}\) is the global best position, \(\beta\) and \(K\) are random numbers, \(f_i\) is the current fitness, and \(f_g\) and \(f_w\) are global best and worst fitness values. SSA efficiently searches for optimal LSTM hyperparameters, improving prediction accuracy for li-ion battery degradation.

Long Short-Term Memory (LSTM) Network

LSTM is a type of recurrent neural network designed to capture long-term dependencies in sequential data, making it ideal for li-ion battery RUL prediction where capacity trends evolve over cycles. The LSTM cell includes input, forget, and output gates, along with a cell state. The forward propagation equations are:

Forget gate:
$$f(t) = \sigma(W_f \cdot [h(t-1), x(t)] + b_f)$$
Input gate:
$$i(t) = \sigma(W_i \cdot [h(t-1), x(t)] + b_i)$$
$$\tilde{C}(t) = \tanh(W_C \cdot [h(t-1), x(t)] + b_C)$$
Cell state update:
$$C(t) = f(t) \odot C(t-1) + i(t) \odot \tilde{C}(t)$$
Output gate:
$$o(t) = \sigma(W_o \cdot [h(t-1), x(t)] + b_o)$$
Hidden state:
$$h(t) = o(t) \odot \tanh(C(t))$$
Prediction output:
$$\hat{y}(t) = \sigma(V \cdot h(t) + c)$$
where \(\sigma\) is the sigmoid function, \(\odot\) denotes element-wise multiplication, \(W\) and \(b\) are weights and biases, \(x(t)\) is the input (e.g., decomposed li-ion battery capacity), and \(\hat{y}(t)\) is the predicted value. The LSTM’s ability to remember long sequences helps model the nonlinear degradation of a li-ion battery, including capacity regeneration effects.

Methodology: WOA-VMD-SSA-LSTM Hybrid Algorithm

Our proposed approach for li-ion battery RUL prediction integrates WOA, VMD, SSA, and LSTM into a cohesive pipeline. The steps are outlined below, with formulas and tables summarizing key aspects.

Step 1: Data Preprocessing and WOA-based VMD Parameter Optimization

We use capacity degradation data from li-ion batteries, where the capacity \(C(t)\) decreases over cycles \(t\). To handle noise and nonlinearities, VMD is applied, but its performance depends on the mode number \(K\) and penalty factor \(\alpha\). Traditionally, these are set empirically, leading to suboptimal decomposition for li-ion battery signals. We employ WOA to optimize \(K\) and \(\alpha\) by minimizing the envelope entropy \(E_p\), which measures sparsity and information content. For a signal \(x(i)\) with \(N\) samples, the envelope entropy is:
$$E_p = -\sum_{i=1}^N p_i \log p_i$$
$$p_i = \frac{a(i)}{\sum_{i=1}^N a(i)}$$
where \(a(i)\) is the envelope signal obtained via Hilbert transform. WOA iteratively searches for \(K\) and \(\alpha\) that minimize \(E_p\), ensuring effective decomposition of li-ion battery capacity data. The optimization process is summarized in the following pseudocode:

WOA-VMD Optimization Pseudocode:
1. Initialize whale population with random positions \((K, \alpha)\).
2. For each whale, compute VMD decomposition and envelope entropy \(E_p\).
3. Find the best whale position with minimum \(E_p\).
4. Update positions using WOA equations (encircling, attacking, searching).
5. Repeat until maximum iterations; output optimal \(K^*\) and \(\alpha^*\).

For instance, with li-ion battery datasets, WOA yields parameters as shown in Table 1.

Dataset Optimal Mode Number \(K\) Optimal Penalty Factor \(\alpha\) Minimum Envelope Entropy \(E_p\)
B0005 3 75 0.12
B0006 3 104 0.09
B0007 3 98 0.11
B0018 4 5 0.15

These parameters are then used to decompose the original li-ion battery capacity signal \(f(t)\) into \(K\) modes \(u_k(t)\) and a residual \(r(t)\), such that:
$$f(t) = \sum_{k=1}^K u_k(t) + r(t)$$
The residual captures irregular fluctuations, which are common in li-ion battery aging due to factors like temperature variations.

Step 2: SSA-based LSTM Hyperparameter Tuning

After decomposition, each mode and residual are predicted separately using LSTM networks. However, LSTM performance hinges on hyperparameters like hidden units, training epochs, and learning rate. We use SSA to optimize these for each li-ion battery component. The fitness function is the Mean Absolute Error (MAE) between predicted and actual values. SSA searches the hyperparameter space efficiently, as described earlier. The optimized hyperparameters for a sample li-ion battery dataset (B0005) are given in Table 2.

Hyperparameter Search Range SSA-Optimized Value
Hidden Units [50, 150] 117
Training Epochs [50, 500] 50
Initial Learning Rate [0.001, 0.1] 0.018833

The LSTM model is trained on 50% of the data (early cycles) and tested on the remaining 50% for each li-ion battery component. The prediction for each mode \(\hat{u}_k(t)\) and residual \(\hat{r}(t)\) is obtained via forward propagation through the LSTM equations.

Step 3: Prediction and Reconstruction

The final RUL prediction for the li-ion battery is achieved by summing the predicted components:
$$\hat{f}(t) = \sum_{k=1}^K \hat{u}_k(t) + \hat{r}(t)$$
where \(\hat{f}(t)\) is the estimated capacity at cycle \(t\). The RUL is then calculated as the number of cycles until \(\hat{f}(t)\) falls below 80% of the initial capacity. This approach captures both trend and noise, improving accuracy for li-ion battery degradation forecasting.

Algorithm Summary

The entire WOA-VMD-SSA-LSTM algorithm for li-ion battery RUL prediction can be summarized as follows:

1. Input: Li-ion battery capacity degradation data \(f(t)\) for cycles \(t=1\) to \(T\).
2. WOA-VMD: Optimize \(K\) and \(\alpha\) using WOA; decompose \(f(t)\) into modes \(u_k(t)\) and residual \(r(t)\).
3. SSA-LSTM: For each component, optimize LSTM hyperparameters using SSA; train LSTM models.
4. Prediction: Predict each component \(\hat{u}_k(t)\) and \(\hat{r}(t)\); reconstruct \(\hat{f}(t)\).
5. Output: Predicted RUL for the li-ion battery based on \(\hat{f}(t)\).

This hybrid method leverages optimization to enhance signal decomposition and neural network tuning, specifically tailored for li-ion battery applications.

Experimental Validation and Results

To evaluate our algorithm, we use four li-ion battery datasets (B0005, B0006, B0007, B0018) from NASA PCoE, with nominal capacities of 2.0 Ah. These datasets exhibit capacity fade over cycles, including regeneration events. We compare WOA-VMD-SSA-LSTM against two baseline models: standalone LSTM and WOA-VMD-LSTM (without SSA optimization). Performance is assessed using three metrics:

Mean Absolute Error (MAE):
$$\text{MAE} = \frac{1}{n} \sum_{i=1}^n |x(i) – \hat{x}(i)|$$
Root Mean Square Error (RMSE):
$$\text{RMSE} = \sqrt{\frac{1}{n} \sum_{i=1}^n (x(i) – \hat{x}(i))^2}$$
Mean Absolute Percentage Error (MAPE):
$$\text{MAPE} = \frac{100\%}{n} \sum_{i=1}^n \left| \frac{\hat{x}(i) – x(i)}{x(i)} \right|$$
where \(x(i)\) is the actual capacity, \(\hat{x}(i)\) is the predicted capacity, and \(n\) is the number of test cycles for the li-ion battery.

Decomposition Results

Using WOA-optimized VMD, the li-ion battery capacity data is decomposed into modes. For example, for B0005 with \(K=3\), the modes capture smooth degradation trends, while the residual contains high-frequency noise. This separation aids LSTM in learning underlying patterns. The decomposition for each li-ion battery dataset is consistent, as per Table 1.

Prediction Performance

The RUL predictions are shown graphically, with our model closely following actual capacity curves, including regeneration spikes. Quantitative results are presented in Table 3, highlighting the superiority of WOA-VMD-SSA-LSTM for li-ion battery RUL prediction.

Model Li-ion Battery Dataset RMSE MAE MAPE (%)
LSTM B0005 0.101 0.076 5.24
B0006 0.033 0.022 1.68
B0007 0.038 0.035 2.30
B0018 0.106 0.091 6.36
WOA-VMD-LSTM B0005 0.076 0.064 4.48
B0006 0.030 0.021 1.53
B0007 0.018 0.014 0.92
B0018 0.026 0.018 1.28
WOA-VMD-SSA-LSTM B0005 0.020 0.011 0.79
B0006 0.024 0.018 1.28
B0007 0.009 0.006 0.43
B0018 0.013 0.011 0.75

As seen, our proposed model achieves the lowest errors across all li-ion battery datasets, with an average MAPE below 1%, demonstrating high accuracy and robustness. The improvement over standalone LSTM is significant, as LSTM fails to capture capacity regenerations, leading to higher errors. WOA-VMD-LSTM shows better performance but is still outperformed by WOA-VMD-SSA-LSTM, emphasizing the importance of SSA in tuning LSTM hyperparameters for li-ion battery data.

Analysis of Li-ion Battery Degradation Patterns

The degradation of a li-ion battery involves complex electrochemical processes, such as solid electrolyte interphase growth and lithium plating. Our algorithm’s ability to decompose signals into modes allows for detailed analysis. For instance, the first mode often represents the overall capacity fade trend, while higher modes capture periodic regenerations due to factors like electrolyte redistribution. This insight is valuable for health monitoring of li-ion batteries in real-world applications.

Furthermore, the residual component in VMD accounts for random fluctuations, which might be caused by measurement noise or external disturbances. By including it in the prediction, our model enhances resilience, making it suitable for noisy li-ion battery operational environments.

Discussion and Implications

The WOA-VMD-SSA-LSTM algorithm offers several advantages for li-ion battery RUL prediction. Firstly, the use of WOA automates VMD parameter selection, eliminating manual tuning and improving decomposition quality for diverse li-ion battery datasets. Secondly, SSA optimizes LSTM hyperparameters efficiently, reducing training time and enhancing prediction accuracy. Thirdly, the hybrid approach effectively models nonlinear degradation, including capacity regenerations, which are critical for accurate RUL estimation in li-ion batteries.

Compared to existing methods, such as genetic algorithm-optimized support vector machines or particle swarm optimization with gated recurrent units, our algorithm shows superior performance in terms of error metrics. This is attributed to the synergistic combination of optimization techniques tailored for li-ion battery characteristics. For practical applications, such as electric vehicles or grid storage, this can lead to better battery management, reduced downtime, and increased safety.

However, there are limitations. The algorithm relies on historical capacity data, which may not always be available in real-time systems. Future work could integrate multi-source data, such as voltage, current, and temperature, to further improve li-ion battery RUL prediction. Additionally, the computational complexity of WOA and SSA might be high for large-scale deployments; thus, lightweight optimization variants could be explored.

Conclusion

In this article, we have presented a novel hybrid algorithm, WOA-VMD-SSA-LSTM, for predicting the Remaining Useful Life of li-ion batteries. By integrating whale optimization for VMD parameter tuning and sparrow search for LSTM hyperparameter optimization, we address key challenges in signal decomposition and model training. Experimental results on NASA li-ion battery datasets confirm that our approach achieves high accuracy, with MAPE values below 1%, and effectively captures capacity regeneration phenomena. This work contributes to the advancement of data-driven methods for li-ion battery health management, offering a robust tool for predictive maintenance. Future research will focus on real-time implementation and extension to other battery chemistries, further solidifying the role of optimization-driven models in energy storage systems.

The li-ion battery remains a vital component in modern technology, and accurate RUL prediction is essential for its sustainable use. Our algorithm provides a scalable solution that can be adapted to various li-ion battery applications, from portable electronics to large-scale energy storage. By continuously refining such methods, we can enhance the reliability and longevity of li-ion batteries, supporting the transition to renewable energy and electric mobility.

Scroll to Top