Lithium-ion batteries are widely used in consumer electronics, electric vehicles, and energy storage systems due to their high output voltage, long cycle life, high energy density, low self-discharge rate, and broad operating temperature range. However, during the usage of lithium-ion batteries, their capacity inevitably degrades due to internal electrochemical reactions and external operational conditions. Assessing the health state and predicting the remaining useful life (RUL) of lithium-ion batteries are crucial for ensuring the safety and reliability of power systems, as well as for preventive maintenance and disaster avoidance. In this study, we address the challenges in RUL prediction by proposing a novel hybrid algorithm that combines the Whale Optimization Algorithm (WOA) with Particle Filter (PF), referred to as WOA-PF, to enhance prediction accuracy and robustness.

Extensive research has been conducted on predicting the remaining useful life of lithium-ion batteries, employing various methods such as artificial neural networks, support vector machines, and empirical degradation models. For instance, some studies have proposed capacity degradation rate-based models, while others have utilized weighted ampere-hour methods. However, these approaches often struggle with nonlinear and dynamic degradation processes inherent to lithium-ion batteries. Particle filter algorithms, which are based on recursive Bayesian estimation and Monte Carlo simulation, offer a framework for handling nonlinear systems by representing the state with a set of particles. Yet, traditional particle filter algorithms suffer from issues like particle degeneracy and loss of diversity, leading to inaccurate predictions. To mitigate these problems, we integrate the Whale Optimization Algorithm, a metaheuristic inspired by the bubble-net feeding behavior of humpback whales, to optimize the particle update strategy in the particle filter. The WOA-PF algorithm aims to improve particle distribution and enhance the tracking of the lithium-ion battery’s aging dynamics.
The state-space model for a nonlinear system in particle filter is described by the following equations. The state transition and measurement processes are given by:
$$x_k = f(x_{k-1}, w_{k-1})$$
$$z_k = h(x_k, v_k)$$
where \(x_k\) is the state vector at time \(k\), \(z_k\) is the measurement vector, \(f\) and \(h\) are nonlinear functions, and \(w_k\) and \(v_k\) are process and measurement noises, respectively. The particle filter approximates the posterior probability density \(p(x_k | z_{1:k})\) using a set of particles \(\{x_k^i, w_k^i\}_{i=1}^N\), where \(w_k^i\) are the importance weights. The weights are updated based on the likelihood:
$$w_k^i \propto w_{k-1}^i \cdot p(z_k | x_k^i)$$
However, particle degeneracy occurs when only a few particles have significant weights, reducing diversity. To address this, we introduce the Whale Optimization Algorithm during the importance sampling stage. The WOA mimics the hunting behavior of whales, which involves encircling prey and performing a bubble-net attack. In the algorithm, each whale’s position represents a candidate solution, and the prey corresponds to the optimal solution. The position update equations for WOA are as follows. For the encircling phase:
$$\vec{D} = |\vec{C} \cdot \vec{X}^*(t) – \vec{X}(t)|$$
$$\vec{X}(t+1) = \vec{X}^*(t) – \vec{A} \cdot \vec{D}$$
where \(\vec{X}^*\) is the best solution found so far, \(\vec{X}\) is the current position, \(t\) is the iteration number, and \(\vec{A}\) and \(\vec{C}\) are coefficient vectors. For the bubble-net attack phase, a spiral updating position is used:
$$\vec{X}(t+1) = \vec{D}’ \cdot e^{bl} \cdot \cos(2\pi l) + \vec{X}^*(t)$$
$$\vec{D}’ = |\vec{X}^*(t) – \vec{X}(t)|$$
where \(b\) is a constant defining the spiral shape, and \(l\) is a random number in \([-1, 1]\). By incorporating WOA into the particle filter, we guide particles toward high-likelihood regions, thereby improving particle diversity and mitigating degeneracy.
For lithium-ion battery degradation modeling, we adopt a double exponential empirical model to describe capacity fade over cycles. The model is expressed as:
$$x_k = a \cdot \exp(b \cdot k) + c \cdot \exp(d \cdot k)$$
where \(k\) represents the cycle number, \(x_k\) is the remaining capacity at cycle \(k\), and \(a\), \(b\), \(c\), \(d\) are parameters to be fitted. This model serves as a baseline for initializing the particle filter parameters. Unlike fixed-parameter models, the WOA-PF algorithm dynamically adjusts these parameters through state estimation, allowing it to better track the nonlinear aging process of lithium-ion batteries. The prediction steps of the WOA-PF algorithm are outlined as follows:
Step 1: Extract cycle number and capacity data from the NASA PCoE lithium-ion battery dataset. Split the data into training and prediction sets. Initialize WOA-PF parameters, such as the number of particles and iteration counts.
Step 2: Fit the double exponential degradation model parameters using tools like MATLAB to generate the initial particle set for the WOA-PF algorithm.
Step 3: Perform iteration using the particle filter algorithm. After initializing the particle set, apply the Whale Optimization Algorithm to compute the position of the optimal particle (i.e., the particle with the highest weight) and guide other particles toward this position, thereby increasing the number of effective particles in the set.
Step 4: After a certain number of cycle iterations, obtain the model parameters and predict the remaining capacity \(Q_T\) at cycle \(T\) using the following equation:
$$Q_T = a \cdot \exp(b \cdot T) + c \cdot \exp(d \cdot T)$$
Step 5: If the predefined capacity threshold is \(Q_{EOL}\), then the remaining useful life of the lithium-ion battery is calculated as \(RUL = t_{EOL} – t_T\), where \(t_{EOL}\) is the cycle number at end-of-life and \(t_T\) is the prediction cycle.
To validate the effectiveness of the WOA-PF algorithm, we conduct experiments using batteries B5, B6, and B18 from the NASA PCoE dataset. The prediction error for lithium-ion battery RUL is defined as:
$$E_{rul} = |RUL_T – RUL_P|$$
where \(E_{rul}\) denotes the error between the predicted RUL and the actual RUL, \(RUL_T\) is the true RUL, and \(RUL_P\) is the predicted RUL at cycle \(T\). We evaluate model performance using root mean square error (RMSE), mean absolute error (MAE), and the coefficient of determination (\(R^2\)), which are given by:
$$RMSE = \sqrt{\frac{1}{n} \sum_{i=1}^{n} (y_i – y_i’)^2}$$
$$MAE = \frac{1}{n} \sum_{i=1}^{n} |y_i’ – y_i|$$
$$R^2 = 1 – \frac{\sum_{i} (y_i’ – y_i)^2}{\sum_{i} (y_i – \bar{y})^2}$$
where \(y_i\) is the true value, \(y_i’\) is the predicted value, and \(\bar{y}\) is the mean of the true values. In our experiments, we set prediction cycles \(T = 40, 60, 80\), meaning that the model is trained on data up to cycle \(T\) and then used to predict the RUL for batteries B5, B6, and B18. For both PF and WOA-PF algorithms, we use 1000 particles and 100 iterations for WOA. The prediction curves for \(T = 80\) are shown in the following sections, but as per instructions, we avoid referencing specific figure numbers and instead summarize results in tables.
The WOA-PF algorithm demonstrates superior performance compared to the traditional PF algorithm. By leveraging WOA’s search mechanism, particles are more uniformly distributed toward optimal regions, enhancing prediction accuracy. Below, we present a comprehensive table summarizing the RMSE, MAE, \(R^2\), and RUL prediction errors for different batteries and prediction cycles.
| Battery | Prediction Cycle (T) | Algorithm | Battery Failure Cycle | RUL Prediction Error | RMSE | MAE | \(R^2\) |
|---|---|---|---|---|---|---|---|
| B5 | 40 | PF | 128 | 3 | 0.0554 | 0.0487 | 0.9192 |
| WOA-PF | 128 | 1 | 0.0244 | 0.0191 | 0.9835 | ||
| 60 | PF | 128 | 3 | 0.0612 | 0.0541 | 0.9029 | |
| WOA-PF | 128 | 1 | 0.0260 | 0.0201 | 0.9813 | ||
| 80 | PF | 128 | 4 | 0.0311 | 0.0234 | 0.9733 | |
| WOA-PF | 128 | 1 | 0.0229 | 0.0178 | 0.9854 | ||
| B6 | 40 | PF | 112 | 2 | 0.0362 | 0.0289 | 0.9793 |
| WOA-PF | 112 | 0 | 0.0345 | 0.0259 | 0.9811 | ||
| 60 | PF | 112 | 6 | 0.0405 | 0.0337 | 0.9742 | |
| WOA-PF | 112 | 1 | 0.0351 | 0.0266 | 0.9815 | ||
| 80 | PF | 112 | 7 | 0.0438 | 0.0362 | 0.9699 | |
| WOA-PF | 112 | 0 | 0.0346 | 0.0259 | 0.9811 | ||
| B18 | 40 | PF | 99 | 10 | 0.0313 | 0.0237 | 0.9591 |
| WOA-PF | 99 | 7 | 0.0302 | 0.0225 | 0.9618 | ||
| 60 | PF | 99 | 9 | 0.0323 | 0.0265 | 0.9563 | |
| WOA-PF | 99 | 6 | 0.0299 | 0.0227 | 0.9625 | ||
| 80 | PF | 99 | 16 | 0.0321 | 0.0257 | 0.9568 | |
| WOA-PF | 99 | 9 | 0.0303 | 0.0242 | 0.9616 |
From the table, it is evident that the WOA-PF algorithm consistently yields smaller RUL prediction errors, lower RMSE and MAE values, and higher \(R^2\) scores compared to the PF algorithm. This indicates that the WOA-PF algorithm provides more accurate and reliable predictions for the remaining useful life of lithium-ion batteries. The improvement is attributed to the enhanced particle diversity and optimized search capability introduced by the Whale Optimization Algorithm, which effectively addresses the limitations of traditional particle filter methods.
In conclusion, the double exponential empirical degradation model alone cannot adequately capture the dynamic aging process of lithium-ion batteries. While particle filter algorithms offer a probabilistic framework for tracking such processes, they are prone to particle degeneracy and loss of diversity. Our proposed WOA-PF algorithm integrates the Whale Optimization Algorithm into the importance sampling stage of the particle filter, guiding particles toward high-likelihood regions and maintaining particle diversity. Experimental results on NASA PCoE battery datasets demonstrate that the WOA-PF algorithm achieves superior performance in predicting the remaining useful life of lithium-ion batteries, with reduced prediction errors and higher fitting degrees. Future work may explore the application of this hybrid algorithm to other battery types or real-time monitoring systems, further advancing the field of lithium-ion battery health management.
The significance of accurate remaining useful life prediction for lithium-ion batteries cannot be overstated, as it directly impacts safety, cost, and efficiency in various applications. By leveraging advanced algorithms like WOA-PF, we can better manage battery lifecycle, optimize maintenance schedules, and prevent failures. This study contributes to the ongoing efforts in improving predictive maintenance strategies for energy storage systems, ultimately supporting the transition to sustainable energy solutions. The integration of metaheuristic optimization with Bayesian filtering opens new avenues for research in prognostics and health management, particularly for complex systems like lithium-ion batteries.
Further analysis of the lithium-ion battery degradation mechanisms reveals that capacity fade is influenced by multiple factors, including temperature, charge-discharge rates, and cycling history. The WOA-PF algorithm’s ability to adaptively update model parameters makes it suitable for handling such multivariate influences. Moreover, the algorithm’s robustness to noise and nonlinearities ensures reliable predictions even under uncertain operating conditions. We also note that the choice of the double exponential model is just one possible representation; other models, such as polynomial or Arrhenius-based equations, could be incorporated into the WOA-PF framework for enhanced flexibility. However, the current model suffices for demonstrating the algorithm’s efficacy.
In practice, implementing the WOA-PF algorithm for lithium-ion battery remaining useful life prediction involves computational considerations. The algorithm’s complexity is higher than that of traditional PF due to the additional WOA iterations, but the improved accuracy justifies the extra computational cost. For real-time applications, optimizations such as parallel processing or reduced particle counts could be explored. Nonetheless, our experiments show that even with moderate resources, the WOA-PF algorithm delivers significant gains. This makes it a viable candidate for embedded systems in electric vehicles or grid storage, where timely and accurate battery health assessments are critical.
To summarize, the WOA-PF algorithm represents a step forward in lithium-ion battery prognostics. By combining the strengths of particle filtering and whale optimization, we address key challenges in state estimation and prediction. The algorithm’s performance validates its potential for widespread adoption in industries reliant on lithium-ion battery technology. As the demand for efficient energy storage grows, such advanced predictive tools will play an increasingly important role in ensuring reliability and sustainability. We encourage further research to refine the algorithm and explore its applications in related domains, such as fuel cells or supercapacitors, where similar degradation dynamics may exist.
