Prediction of State of Health for Lithium-ion Batteries under Small Sample Size

In recent years, the accurate prediction of the State of Health (SOH) for lithium-ion batteries has become increasingly critical for ensuring the reliability and safety of energy storage systems, electric vehicles, and portable electronics. The SOH of a lithium-ion battery reflects its current capacity relative to its initial capacity, and it degrades over time due to factors such as temperature fluctuations, charge-discharge rates, and depth of discharge. Traditional methods for SOH prediction, which rely on physical models like equivalent circuit models or electrochemical models, often struggle with accuracy due to the complex, nonlinear dynamics of lithium-ion batteries. With the rise of data-driven approaches, machine learning techniques, particularly neural networks, have shown promise in capturing these complexities. However, most data-driven methods depend on large-scale datasets for training, which are often unavailable in real-world scenarios where battery data is limited. This poses a significant challenge: how to achieve high-precision SOH prediction for lithium-ion batteries under small sample sizes? In this article, we address this challenge by proposing a novel hybrid model that integrates an Improved Aquila Optimizer (IAO) algorithm with a Temporal Convolutional Network (TCN) enhanced by a multi-head attention mechanism. Our method aims to optimize model parameters effectively with limited data, improving prediction accuracy and generalization. We validate our approach using battery datasets from the University of Maryland, demonstrating superior performance compared to baseline models such as TCN, Extreme Learning Machine (ELM), Long Short-Term Memory (LSTM) networks, and Convolutional Neural Networks (CNN). Through detailed experiments, we show that our model maintains an average error within 2.5%, with accuracy improvements of over 10 percentage points, highlighting its stability, precision, and robustness for lithium-ion battery SOH prediction in data-scarce environments.

The degradation of lithium-ion batteries is a stochastic process influenced by multiple operational and environmental factors, making SOH prediction a complex task. Conventional model-based approaches, while insightful, often require precise knowledge of battery chemistry and may fail to adapt to real-world variability. Data-driven methods, on the other hand, leverage historical data to learn degradation patterns, but they typically necessitate extensive datasets to avoid overfitting and ensure reliability. In practice, acquiring large amounts of battery cycling data is time-consuming and costly, especially for new battery technologies or specific applications. This limitation underscores the need for methods that can perform well with small sample sizes—a scenario common in early-stage testing or niche deployments of lithium-ion batteries. Our work focuses on developing a predictive framework that combines the strengths of deep learning and metaheuristic optimization to tackle this issue. We introduce an Improved Aquila Optimizer (IAO) algorithm, which enhances the standard Aquila Optimizer (AO) through Levy flight strategies and Generalized Opposition-Based Learning (GOBL), to optimize the weights and thresholds of a Temporal Convolutional Network (TCN). Additionally, we incorporate a multi-head attention mechanism into the TCN to allow the model to automatically focus on critical features in the battery data, such as voltage, temperature, and charge-discharge rates. This integrated approach, referred to as the IAO-TCN with attention model, is designed to improve feature extraction and parameter tuning, thereby boosting prediction accuracy even when training data is scarce. In the following sections, we delve into the methodologies, present experimental results, and discuss implications for lithium-ion battery management systems.

The core of our method lies in the Temporal Convolutional Network (TCN), a deep learning architecture tailored for sequence modeling. TCNs excel at capturing long-term dependencies in time-series data through causal convolutions and dilated convolutions, making them suitable for predicting the SOH of lithium-ion batteries, which evolves over charge-discharge cycles. The causal convolution ensures that the output at time \( t \) depends only on inputs up to \( t \), preventing information leakage from future time steps. Mathematically, for an input sequence \( x(t) \) representing battery features like SOH, voltage, and temperature, the causal convolution is defined as:

$$ y(t) = \sum_{k=0}^{K-1} w_k \cdot x(t – k) $$

Here, \( y(t) \) is the output SOH prediction at time \( t \), \( w_k \) denotes the weights of the convolutional kernel, and \( K \) is the kernel size. To expand the receptive field without increasing parameters, we use dilated convolutions, which introduce a dilation rate \( d \):

$$ y(t) = \sum_{k=0}^{K-1} w_k \cdot x(t – d \cdot k) $$

By adjusting \( d \), the model can capture patterns over varying time scales, which is crucial for lithium-ion battery degradation that may exhibit both short-term fluctuations and long-term trends. Residual connections are also incorporated to mitigate gradient vanishing in deep networks, expressed as \( f(x) = y(t) + x(t) \), where \( f(x) \) is the final prediction. However, standard TCNs may still suffer from suboptimal parameter initialization, especially with small datasets. To address this, we employ an Improved Aquila Optimizer (IAO) to fine-tune the weights and thresholds of the TCN, enhancing its adaptability and performance for lithium-ion battery SOH prediction.

The Aquila Optimizer (AO) is a metaheuristic algorithm inspired by the hunting behavior of eagles, combining global and local search strategies. It starts by initializing a population of solutions representing TCN parameters, with each solution’s position \( Z_i \) defined as:

$$ Z_i = Z_{\text{min}} + (Z_{\text{max}} – Z_{\text{min}}) \times \text{rand}(), \quad i = 1, 2, \dots, N $$

where \( Z_{\text{min}} \) and \( Z_{\text{max}} \) are the bounds for parameters, \( \text{rand}() \) is a random number in [0,1], and \( N \) is the number of parameters. The fitness of each solution is evaluated using the prediction error of the TCN on lithium-ion battery data, calculated as:

$$ f(z) = \sum_{j=1}^{L} \frac{| t_j – o_j |}{t_j} $$

with \( t_j \) and \( o_j \) being the actual and predicted SOH values, and \( L \) the sample size. The AO algorithm then performs global search via random flight and local search via deterministic strategies, updating positions to converge toward optimal parameters. However, to improve diversity and convergence speed for lithium-ion battery applications, we enhance AO with two modifications: Levy flight and Generalized Opposition-Based Learning (GOBL). The Levy flight introduces long jumps in the search space, helping escape local optima, and is modeled as:

$$ Z_{\text{new}} = \frac{\beta}{2\pi} \frac{e^{-\frac{\beta}{2(Z_c – \alpha)}}}{(Z_c – \alpha)^{3/2}}, \quad Z_c > \alpha $$

where \( \alpha \) and \( \beta \) are scaling factors. GOBL generates opposing candidate solutions to increase population diversity:

$$ Z_{\text{new}} = \epsilon (Z_{\text{max}} + Z_{\text{min}}) – Z_c $$

with \( \epsilon \) as a uniform random number in [0,1]. These enhancements result in the IAO algorithm, which we use to optimize the TCN, forming the IAO-TCN model. To further boost feature focus, we integrate a multi-head attention mechanism into the TCN. Attention mechanisms assign weights to input features, emphasizing those most relevant to lithium-ion battery SOH degradation. The multi-head attention computes queries \( Q_i \), keys \( K_i \), and values \( V_i \) through linear transformations:

$$ Q_i = X W_i^Q, \quad K_i = X W_i^K, \quad V_i = X W_i^V $$

where \( X \) is the input feature matrix for lithium-ion battery data. The attention output for each head is:

$$ \text{Attention}(Q_i, K_i, V_i) = \text{softmax}\left( \frac{Q_i K_i^T}{\sqrt{d_k}} \right) V_i $$

and the multi-head output is concatenated and transformed:

$$ M(Q_i, K_i, V_i) = \text{Concat}(h_{\text{head},1}, h_{\text{head},2}, \dots, h_{\text{head},H}) W^O $$

This allows the model to capture diverse feature interactions, improving prediction for lithium-ion battery SOH. The overall architecture of our proposed model is illustrated in the flowchart below, showing how battery time-series data flows through TCN layers, attention mechanisms, and IAO optimization to produce SOH predictions.

To validate our approach, we conducted experiments using lithium-ion battery datasets from the University of Maryland, specifically cells CS_35, CS_36, CS_37, and CS_39. These datasets include charge-discharge cycles with measurements of voltage, current, temperature, and capacity, which we used to compute SOH as the ratio of current capacity to initial capacity. We preprocessed the data by normalizing features and splitting it into training and testing sets with varying ratios to simulate small sample conditions. Our model, IAO-TCN with attention, was compared against several baseline methods: standard TCN, TCN with attention only, AO-TCN (without improvements), ELM, LSTM networks, and CNN. We used common evaluation metrics to assess performance: Mean Absolute Error (MAE), Root Mean Square Error (RMSE), Mean Absolute Percentage Error (MAPE), and the coefficient of determination (R²). These are defined as:

$$ E_{\text{MAE}} = \frac{1}{n} \sum_{j=1}^{n} | t_j – o_j | $$

$$ E_{\text{RMSE}} = \sqrt{ \frac{1}{n} \sum_{j=1}^{n} (t_j – o_j)^2 } $$

$$ E_{\text{MAPE}} = \frac{1}{n} \sum_{j=1}^{n} \frac{| t_j – o_j |}{t_j} \times 100\% $$

$$ R^2 = \left[ 1 – \frac{\sum_{j=1}^{n} (t_j – o_j)^2}{\sum_{j=1}^{n} (t_j – \bar{t}_j)^2} \right] \times 100\% $$

where \( n \) is the total number of time steps, \( t_j \) is the actual SOH, \( o_j \) is the predicted SOH, and \( \bar{t}_j \) is the mean actual SOH. Lower MAE, RMSE, and MAPE values indicate better accuracy, while a higher R² signifies better fit. We first tested the IAO algorithm’s optimization capability using benchmark functions—Sphere, Ackley, and Rastrigrin—to ensure its robustness before applying it to lithium-ion battery data. The results, averaged over 10 runs with 600 iterations each, are summarized in Table 1, showing that IAO achieves lower optimal values and standard deviations compared to standard AO, confirming its enhanced search performance for lithium-ion battery parameter tuning.

Function Name Algorithm Best Value Average Value Standard Deviation
Sphere AO 1.2833 111.4386 733.476
Sphere IAO 0 343.3021 859.690
Ackley AO 0.465 5.014 2.885
Ackley IAO 0 0.959 1.241
Rastrigrin AO 160.574 209.142 39.786
Rastrigrin IAO 0 27.683 28.442

For lithium-ion battery SOH prediction, we set the training set ratio to 80% of the data for initial comparisons. The prediction results on cell CS_36 are depicted in a plot showing actual versus predicted SOH values, where our model closely tracks the degradation curve. Quantitative metrics for all four cells are averaged and presented in Table 2, comparing our method with baseline models. The IAO-TCN with attention achieves an MAE of 0.056%, RMSE of 0.621%, MAPE of 2.345%, and R² of 0.975, outperforming other models. For instance, standard TCN yields an MAPE of 20.345%, while attention-enhanced TCN reduces it to 13.665%. AO-TCN shows improvement but is still behind our method, highlighting the benefits of Levy flight and GOBL for lithium-ion battery applications.

Prediction Model MAE (%) RMSE (%) MAPE (%)
TCN 0.558 0.541 20.345 0.893
TCN with Attention 0.327 0.315 13.665 0.924
AO-TCN 0.384 0.373 14.586 0.943
IAO-TCN 0.277 0.238 10.339 0.958
Our Method (IAO-TCN with Attention) 0.056 0.621 2.345 0.975

To further demonstrate the efficacy under small sample sizes, we varied the training set ratio from 20% to 80% and recorded the MAPE for different models, as shown in Table 3. Our method consistently maintains low errors across all ratios, with MAPE below 5% even at 20% training data, whereas other models exhibit errors above 20% at lower ratios. This underscores the robustness of our approach for lithium-ion battery SOH prediction when data is limited. For example, ELM struggles with MAPE around 40% at 20% training, while LSTM networks improve but still lag behind. The multi-head attention mechanism helps by focusing on key features like voltage spikes or temperature anomalies that are critical for lithium-ion battery health, and IAO optimization ensures that the TCN parameters are well-tuned to capture these patterns without overfitting.

Training Set Ratio Our Method MAPE (%) TCN MAPE (%) LSTM MAPE (%) ELM MAPE (%)
20% 4.892 25.671 22.345 42.118
40% 3.456 21.983 19.876 38.765
60% 2.987 19.654 17.432 35.432
80% 2.345 20.345 17.935 40.334

The superior performance of our method can be attributed to several factors. First, the TCN’s ability to model long-term dependencies aligns well with the gradual degradation of lithium-ion batteries. Second, the IAO algorithm effectively explores the parameter space, avoiding local minima that often plague gradient-based optimizers in small-data regimes. The Levy flight strategy introduces randomness that enhances global search, while GOBL increases population diversity, both crucial for optimizing lithium-ion battery models with limited samples. Third, the multi-head attention mechanism acts as a feature selector, weighting important temporal patterns—such as capacity fade during high-rate discharges—that directly impact SOH. This is particularly beneficial for lithium-ion batteries, where degradation signals may be subtle and intertwined with noise. In contrast, models like ELM lack depth for feature extraction, and LSTM networks may suffer from vanishing gradients without careful tuning. Our hybrid approach mitigates these issues, offering a balanced solution for accurate SOH prediction.

From a practical standpoint, our method has significant implications for lithium-ion battery management systems (BMS). By enabling reliable SOH prediction with small datasets, it reduces the need for extensive cycling tests, accelerating battery development and deployment. For instance, in grid-scale energy storage using lithium-ion batteries, operators can monitor health with fewer historical cycles, enabling proactive maintenance and replacement. Additionally, the model’s low computational cost—due to efficient TCN architecture and optimized parameters—makes it suitable for real-time applications in electric vehicles or portable devices. However, challenges remain, such as generalizing across different lithium-ion battery chemistries or operating conditions. Future work could explore transfer learning to adapt the model to new battery types with minimal data, or integrate physics-informed constraints to enhance interpretability. Overall, our contributions advance the state of lithium-ion battery health monitoring, providing a robust tool for sustainable energy systems.

In conclusion, we have presented a novel framework for predicting the State of Health of lithium-ion batteries under small sample sizes. By combining an Improved Aquila Optimizer with a Temporal Convolutional Network and a multi-head attention mechanism, we achieve high accuracy and stability, with average errors below 2.5%. Experimental results on real lithium-ion battery datasets confirm that our method outperforms existing models like TCN, ELM, LSTM, and CNN, particularly when training data is scarce. The integration of Levy flight and Generalized Opposition-Based Learning enhances optimization, while attention mechanisms improve feature focus, making the model well-suited for the complex dynamics of lithium-ion battery degradation. This work paves the way for more efficient battery management, contributing to the longevity and reliability of lithium-ion batteries in various applications. As the demand for energy storage grows, such data-driven approaches will be vital for optimizing performance and reducing costs, ensuring that lithium-ion batteries continue to play a key role in the transition to clean energy.

Scroll to Top