I have centered my research on the accurate estimation of remaining useful life (RUL) and state of health (SOH) for lithium ion battery systems, because these two quantities are fundamental to safety, reliability, and economic operation in electric vehicles, grid-scale energy storage, and portable electronics. The degradation of a lithium ion battery is a complex multiphysics process that involves electrolyte decomposition, loss of lithium inventory, growth of the solid electrolyte interphase, and active material loss. These phenomena cause nonlinear and time-varying changes in capacity, internal resistance, and thermal behavior. As a result, a single model is often insufficient to capture the different degradation trends that appear at different life stages of a lithium ion battery. To address this problem, I propose a novel hybrid network that combines long short-term memory (LSTM) layers, a multi-head attention (MA) mechanism, and a Mamba module. This hybrid architecture improves both the accuracy and the robustness of RUL and SOH estimation for lithium ion battery cells.
The core idea of my approach is to use LSTM to extract temporal dependencies from charging and discharging cycles of a lithium ion battery, then use MA to dynamically weight the most relevant degradation features, and finally use Mamba to capture complex nonlinear patterns and long-range dependencies with linear computational complexity. I also design a combined weighted loss function that consists of a smooth L1 loss and a weighted mean squared error (WMSE) loss. This loss function improves robustness against outliers and places greater emphasis on the later stage of the lithium ion battery life cycle, where degradation often accelerates. Experimental results show that my hybrid network achieves high accuracy and stability for both RUL and SOH estimation tasks.

Degradation Mechanisms and Data Characteristics of Lithium Ion Battery
I begin by examining the degradation mechanisms of a lithium ion battery in detail. During repeated charge and discharge cycles, several irreversible processes occur. Electrolyte decomposition reduces ionic conductivity and accelerates the nonlinear growth of internal resistance. Loss of active material weakens lithium ion intercalation, which shortens charge and discharge times. The growth of the solid electrolyte interphase consumes lithium inventory and increases impedance. These processes are influenced by cycling rate, temperature, depth of discharge, and load profile. Because these factors interact, the degradation trajectory of a lithium ion battery is not linear, and the rate of capacity fade often changes abruptly after a certain number of cycles. Therefore, an accurate RUL and SOH estimator must be able to adapt to different degradation stages and operating conditions.
The data used in my study include voltage, current, temperature, internal resistance, charge time, and differential capacity features. Each feature reflects a different aspect of lithium ion battery aging. For example, internal resistance is closely related to power capability, while the maximum and minimum of dQ/dV are associated with electrode phase transitions. The variance of dQ/dV indicates the degree of structural disorder in the electrode materials. I normalize all features before feeding them into the neural network. The normalization formula is:
$$ z_i = \frac{x_i – \mu}{\sigma} $$
where \(x_i\) is the original value, \(\mu\) is the mean, and \(\sigma\) is the standard deviation. This z-score normalization ensures that all features have zero mean and unit variance. I have observed that this step is especially important for lithium ion battery datasets collected under different temperatures and loads, because it prevents features with large numerical ranges from dominating the learning process.
| Feature | Physical Meaning | Relevance to Lithium Ion Battery Aging |
|---|---|---|
| Cycle number | Cumulative charge-discharge cycles | Directly quantifies time accumulation |
| Average temperature | Mean temperature during cycling | High temperature accelerates SEI growth and electrolyte decomposition |
| Internal resistance | Ohmic and polarization resistance | Reflects active material loss and impedance rise |
| Charge time | Duration of charging phase | Prolonged charge time indicates lithium inventory loss |
| dQ/dV maximum | Maximum differential capacity | Related to electrode phase transition equilibrium |
| dQ/dV minimum | Minimum differential capacity | Indicates structural degradation of electrodes |
| dQ/dV variance | Variance of differential capacity | Measures disorder and material decay |
LSTM Module for Temporal Feature Extraction
To capture the time-dependent behavior of a lithium ion battery during repeated charge and discharge cycles, I use an LSTM module. The LSTM cell maintains a cell state and three gates: forget gate, input gate, and output gate. The forget gate determines how much old information should be retained:
$$ f_t = \sigma(W_f [h_{t-1}, x_t] + b_f) $$
where \(W_f\) is the weight matrix for the forget gate, \(b_f\) is the bias, \(h_{t-1}\) is the previous hidden state, and \(x_t\) is the current input. The input gate controls the addition of new information:
$$ i_t = \sigma(W_i [h_{t-1}, x_t] + b_i) $$
$$ \tilde{C}_t = \tanh(W_C [h_{t-1}, x_t] + b_C) $$
where \(i_t\) is the input gate output, \(\tilde{C}_t\) is the candidate cell state, \(W_i\) and \(b_i\) are the weight and bias of the input gate, and \(W_C\) and \(b_C\) are the weight and bias for the candidate state. The output gate controls the final output:
$$ o_t = \sigma(W_o [h_{t-1}, x_t] + b_o) $$
$$ h_t = o_t \tanh(C_t) $$
The cell state is updated as:
$$ C_t = f_t C_{t-1} + i_t \tilde{C}_t $$
In my hybrid network, the LSTM layer receives the normalized features and produces a sequence of hidden states that describe the degradation dynamics of the lithium ion battery. These hidden states are then passed to the multi-head attention module. I use a hidden dimension of 16, which I found to provide a good balance between expressiveness and overfitting prevention for lithium ion battery degradation data.
Multi-Head Attention for Feature Weighting
After the LSTM layer, I use a multi-head attention mechanism to emphasize the most relevant features for RUL and SOH estimation of a lithium ion battery. The attention module projects the input sequence into query, key, and value matrices:
$$ Q = X W_q, \quad K = X W_k, \quad V = X W_v $$
where \(X = [x_1, x_2, \ldots, x_n]\) is the input sequence, and \(W_q\), \(W_k\), and \(W_v\) are learnable weight matrices. The attention score is computed as:
$$ A = \frac{Q K^T}{\sqrt{d_k}} $$
where \(d_k\) is the dimension of the key vectors. The attention weights are obtained by applying softmax:
$$ A’ = \text{softmax}(A) $$
The multi-head attention output is formed by concatenating the outputs of several attention heads and applying a linear transformation:
$$ \text{MH}(Q, K, V) = \text{Concat}(\text{head}_1, \ldots, \text{head}_n) W_o $$
In my design, I use four parallel attention heads. This allows the model to simultaneously focus on different aspects of the lithium ion battery degradation data, such as voltage relaxation, temperature rise, and internal resistance growth. The attention mechanism filters out irrelevant noise and highlights the features that are most predictive of RUL and SOH. I have found that the multi-head attention mechanism is particularly useful when the lithium ion battery operates under varying load conditions, because it can dynamically adjust the importance of each feature based on the current cycle.
Mamba Module for Nonlinear Pattern Recognition
The Mamba module is a structured state space sequence model with a selection mechanism and a scan module. It is designed to capture long-range dependencies and nonlinear patterns with linear time complexity. The state space model is defined by:
$$ h_t = G h_{t-1} + B x_t $$
$$ y_t = M h_t $$
where \(h_t\) is the hidden state, \(x_t\) is the input, \(y_t\) is the output, and \(G\), \(B\), and \(M\) are the state transition, input, and output matrices. In the selective state space model, the parameters are input-dependent. The discretization process can be written as:
$$ \bar{G} = \exp(\Delta G) $$
$$ \bar{B} = (\Delta G)^{-1} (\exp(\Delta G) – I) \Delta B $$
where \(\Delta\) is the sampling time. The selective scan mechanism allows the model to dynamically adjust its memory and focus on the most informative parts of the lithium ion battery degradation sequence. In my hybrid network, the Mamba module processes the output of the attention layer and extracts deeper nonlinear correlations that are difficult to capture with LSTM alone. The linear complexity of Mamba is a major advantage for lithium ion battery prognostics, because the cycling history can be very long, sometimes exceeding several thousand cycles.
Combined Weighted Loss Function
To improve robustness and to better fit the later stage of the lithium ion battery life cycle, I use a combined weighted loss function. The smooth L1 loss is defined as:
$$ L_{\text{SL1}} = \begin{cases} 0.5 (y_i – \hat{y}_i)^2, & \text{if } |y_i – \hat{y}_i| < 1 \\ |y_i – \hat{y}_i| – 0.5, & \text{otherwise} \end{cases} $$
where \(y_i\) is the true value and \(\hat{y}_i\) is the predicted value. The weighted mean squared error loss is:
$$ L_{\text{WMSE}} = \sum_{i=1}^{n} \omega_i (y_i – \hat{y}_i)^2 $$
The weight \(\omega_i\) is dynamically adjusted based on the cycle number:
$$ \omega_i = \begin{cases} 1, & \text{if } \frac{Cycle_i}{Cycle_{\max}} < \eta \\ 1 + \tau \left( \frac{Cycle_i}{Cycle_{\max}} – \eta \right), & \text{otherwise} \end{cases} $$
where \(Cycle_{\max}\) is the maximum cycle number, \(\eta\) is a threshold, and \(\tau\) is a scaling factor. In my experiments, I set \(\eta = 0.7\) and \(\tau = 0.5\). The combined loss is:
$$ L_C = \alpha L_{\text{SL1}} + \beta L_{\text{WMSE}} $$
where \(\alpha + \beta = 1\). I use \(\alpha = 0.7\) and \(\beta = 0.3\), which I found to give the best balance between robustness and sensitivity to late-life degradation of the lithium ion battery. The smooth L1 loss reduces the influence of outliers, while the weighted MSE loss ensures that the model pays more attention to the later cycles, where the lithium ion battery degrades more rapidly.
Experimental Dataset and Setup
I evaluate my hybrid network on a nickel manganese cobalt (NMC) lithium ion battery degradation dataset. The dataset contains complete cycling records from 0 to 1200 cycles and 0 to 1800 cycles, with temperatures from 10°C to 40°C and loads from 1C to 3C. The features include cycle number, average temperature, internal resistance, charge time, and differential capacity features such as maximum, minimum, and variance of dQ/dV. These features reflect the aging state of the lithium ion battery. I randomly select 70% of the data for training and 30% for testing. The model is trained for 2000 epochs using the Adam optimizer with a learning rate of 0.0001 and a weight decay of \(10^{-5}\). The hidden dimension is 16, and the number of attention heads is 4. The experiments are implemented in Python 3.11 with PyCharm 2023, and the model is trained on an NVIDIA GeForce GTX 4060 Ti GPU.
| Parameter | Value |
|---|---|
| Epochs | 2000 |
| Optimizer | Adam |
| Learning rate | 0.0001 |
| Weight decay | \(10^{-5}\) |
| Hidden dimension | 16 |
| Attention heads | 4 |
| \(\alpha\) | 0.7 |
| \(\beta\) | 0.3 |
| Training set | 70% |
| Test set | 30% |
Evaluation Metrics
I use mean squared error (MSE), root mean squared error (RMSE), mean absolute error (MAE), and the coefficient of determination (\(R^2\)) to evaluate the performance of my model for lithium ion battery RUL and SOH estimation. These metrics are defined as follows:
$$ \text{MSE} = \frac{1}{n} \sum_{i=1}^{n} (y_i – \hat{y}_i)^2 $$
$$ \text{RMSE} = \sqrt{\frac{1}{n} \sum_{i=1}^{n} (y_i – \hat{y}_i)^2} $$
$$ \text{MAE} = \frac{1}{n} \sum_{i=1}^{n} |y_i – \hat{y}_i| $$
$$ R^2 = 1 – \frac{\sum_{i=1}^{n} (y_i – \hat{y}_i)^2}{\sum_{i=1}^{n} (y_i – \bar{y})^2} $$
where \(y_i\) is the true value, \(\hat{y}_i\) is the predicted value, \(\bar{y}\) is the mean of the true values, and \(n\) is the number of samples. I also compute a 95% confidence interval using Monte Carlo dropout. During inference, I randomly drop 10% of neurons and repeat the prediction 100 times. The uncertainty \(\sigma\) is calculated as:
$$ \sigma = \sqrt{\frac{1}{N} \sum_{i=1}^{N} (y_i – \mu)^2} $$
where \(N\) is the number of Monte Carlo samples, \(y_i\) is the prediction of the \(i\)-th sample, and \(\mu\) is the mean prediction. This uncertainty estimate provides a measure of confidence for each RUL and SOH prediction of the lithium ion battery.
RUL Prediction Results for Lithium Ion Battery
I perform four independent experiments for RUL prediction. The results are summarized in Table 3. The MSE values range from 162.44 to 324.48, the RMSE values range from 12.75 to 18.01, and the MAE values range from 9.57 to 14.09. The \(R^2\) values are all above 0.9979, which indicates that my model captures the overall degradation trend of the lithium ion battery very well. The slight increase in error during the accelerated degradation stage, especially after 1300 cycles, is due to the local feature extraction challenge in extreme conditions. However, the overall accuracy and stability remain high. The confidence intervals are narrow for most datasets, which suggests that the model is confident in its predictions. The wider intervals in some experiments correspond to conditions where the lithium ion battery degradation data are noisier or more complex.
| Experiment | MSE | RMSE | MAE | \(R^2\) |
|---|---|---|---|---|
| 1 | 324.4839 | 18.0134 | 12.4354 | 0.9988 |
| 2 | 236.3104 | 15.3724 | 11.7613 | 0.9979 |
| 3 | 162.4385 | 12.7451 | 9.5713 | 0.9985 |
| 4 | 288.5141 | 16.9857 | 14.0929 | 0.9990 |
SOH Prediction Results for Lithium Ion Battery
For SOH estimation, I also conduct four experiments. The results are shown in Table 4. The MSE values are extremely small, ranging from \(0.0012 \times 10^{-2}\) to \(0.0040 \times 10^{-2}\). The RMSE values range from 0.0034 to 0.0063, and the MAE values range from 0.0025 to 0.0054. The \(R^2\) values range from 0.9742 to 0.9932. These results show that my hybrid network can track the health state of a lithium ion battery with very high precision. The small errors indicate that the combination of LSTM, multi-head attention, and Mamba is effective in learning the nonlinear degradation patterns of a lithium ion battery. The model performs particularly well in the early and middle stages of life, and it maintains good accuracy even when the lithium ion battery approaches the end of its life.
| Experiment | MSE (\(\times 10^{-2}\)) | RMSE | MAE | \(R^2\) |
|---|---|---|---|---|
| 1 | 0.0012 | 0.0034 | 0.0025 | 0.9932 |
| 2 | 0.0036 | 0.0060 | 0.0054 | 0.9769 |
| 3 | 0.0040 | 0.0063 | 0.0040 | 0.9742 |
| 4 | 0.0013 | 0.0036 | 0.0025 | 0.9923 |
Comparison of Loss Functions
I compare the combined weighted loss function with smooth L1 loss alone and weighted MSE loss alone. The results show that the combined loss function achieves better fitting in the later stage of the lithium ion battery life cycle and is more robust to outliers. When the lithium ion battery approaches its end of life, the degradation rate increases, and the combined loss function gives higher weight to these samples. This leads to more accurate RUL and SOH estimation. The comparison is summarized in Table 5.
| Loss Function | RUL MSE | SOH MSE (\(\times 10^{-2}\)) |
|---|---|---|
| Smooth L1 only | 315.7 | 0.0038 |
| Weighted MSE only | 302.4 | 0.0031 |
| Combined weighted loss | 288.5 | 0.0013 |
Weight Coefficient Analysis
I also investigate the effect of different combinations of \(\alpha\) and \(\beta\) in the combined loss function. The results are shown in Table 6. The best performance is obtained when \(\alpha = 0.7\) and \(\beta = 0.3\), where both RUL MSE and SOH MSE reach their minimum values. This indicates that a higher weight on the smooth L1 loss improves robustness, while a moderate weight on the weighted MSE loss ensures that the later stage of the lithium ion battery life cycle is properly emphasized. When \(\alpha\) is too small, the model becomes more sensitive to outliers and the RUL MSE increases. When \(\alpha\) is too large, the model may underfit the late-life degradation and the SOH MSE increases.
| Experiment | \(\alpha\) | \(\beta\) | RUL MSE | SOH MSE (\(\times 10^{-2}\)) |
|---|---|---|---|---|
| 1 | 0.4 | 0.6 | 298.6 | 0.0042 |
| 2 | 0.5 | 0.5 | 310.2 | 0.0024 |
| 3 | 0.7 | 0.3 | 288.5 | 0.0013 |
| 4 | 0.9 | 0.1 | 342.7 | 0.0056 |
Ablation Study
To verify the contribution of each component, I conduct an ablation study. I remove Mamba, multi-head attention, or LSTM from the hybrid network and compare the SOH prediction performance. The results are shown in Table 7. When only LSTM is used, the RMSE is 0.0103, the MAE is 0.0083, and \(R^2\) is 0.9381. When only multi-head attention is used, the performance is worse, with RMSE 0.0138 and \(R^2\) 0.8886. When LSTM and multi-head attention are combined, the RMSE drops to 0.0052 and \(R^2\) rises to 0.9840. Adding Mamba to LSTM reduces the RMSE to 0.0038 and increases \(R^2\) to 0.9912. Adding Mamba to multi-head attention gives RMSE 0.0043 and \(R^2\) 0.9895. The full hybrid network with LSTM, multi-head attention, and Mamba achieves the best performance, with RMSE 0.0034, MAE 0.0025, and \(R^2\) 0.9932. This confirms that each component contributes to the final accuracy and robustness for lithium ion battery SOH estimation.
| LSTM | MA | Mamba | MSE (\(\times 10^{-2}\)) | RMSE | MAE | \(R^2\) |
|---|---|---|---|---|---|---|
| ✓ | 0.0106 | 0.0103 | 0.0083 | 0.9381 | ||
| ✓ | 0.0190 | 0.0138 | 0.0100 | 0.8886 | ||
| ✓ | ✓ | 0.0027 | 0.0052 | 0.0038 | 0.9840 | |
| ✓ | ✓ | 0.0014 | 0.0038 | 0.0030 | 0.9912 | |
| ✓ | ✓ | 0.0018 | 0.0043 | 0.0032 | 0.9895 | |
| ✓ | ✓ | ✓ | 0.0012 | 0.0034 | 0.0025 | 0.9932 |
Comparison with Baseline Models
I further compare my hybrid network with several baseline models for lithium ion battery RUL and SOH estimation. The baselines include a standalone LSTM, a gated recurrent unit (GRU), a convolutional neural network (CNN), a Transformer, and a CNN-GRU hybrid. The results are summarized in Table 8. My hybrid network achieves the lowest RMSE and MAE and the highest \(R^2\) for both RUL and SOH tasks. The Transformer model performs well but has higher computational cost and requires more training data. The LSTM and GRU models capture temporal dependencies but fail to capture long-range nonlinear patterns as effectively as Mamba. The CNN model extracts local features but lacks the sequential modeling capability. The CNN-GRU hybrid improves over CNN and GRU but still lags behind my LSTM + Mamba + MA network. These results demonstrate the superiority of my proposed architecture for lithium ion battery prognostics.
| Model | RUL RMSE | RUL \(R^2\) | SOH RMSE | SOH \(R^2\) |
|---|---|---|---|---|
| LSTM | 22.45 | 0.9852 | 0.0103 | 0.9381 |
| GRU | 23.12 | 0.9837 | 0.0112 | 0.9315 |
| CNN | 25.78 | 0.9764 | 0.0135 | 0.9024 |
| Transformer | 19.34 | 0.9912 | 0.0078 | 0.9653 |
| CNN-GRU | 20.56 | 0.9891 | 0.0085 | 0.9587 |
| My hybrid network | 12.75 | 0.9985 | 0.0034 | 0.9932 |
Influence of Operating Conditions
I also analyze the performance of my model under different operating conditions. The lithium ion battery dataset includes temperatures from 10°C to 40°C and loads from 1C to 3C. I group the test data into three temperature ranges and three load ranges. The results are shown in Table 9. My model maintains high accuracy across all conditions, but the error is slightly higher at low temperature and high load. This is because low temperature increases polarization and reduces reaction kinetics, while high load accelerates degradation and introduces more nonlinearity. The multi-head attention mechanism helps the model adapt to these conditions by reweighting the features. The Mamba module also contributes by capturing the long-range dependencies that are critical under extreme conditions.
| Condition | RUL RMSE | SOH RMSE | \(R^2\) |
|---|---|---|---|
| 10°C | 16.32 | 0.0058 | 0.9854 |
| 25°C | 13.21 | 0.0036 | 0.9962 |
| 40°C | 14.87 | 0.0041 | 0.9921 |
| 1C | 12.45 | 0.0032 | 0.9978 |
| 2C | 14.78 | 0.0043 | 0.9915 |
| 3C | 17.56 | 0.0061 | 0.9832 |
Discussion
The experimental results demonstrate that my hybrid LSTM + Mamba network with multi-head attention and combined weighted loss is highly effective for lithium ion battery RUL and SOH estimation. The LSTM layer captures the temporal evolution of the lithium ion battery degradation, while the multi-head attention mechanism dynamically weights the most informative features. The Mamba module further extracts nonlinear dependencies and long-range patterns. The combined weighted loss function improves robustness to outliers and emphasizes the critical later stage of the lithium ion battery life cycle. Compared with single models such as LSTM alone or attention alone, the hybrid network achieves significantly lower RMSE and MAE and higher \(R^2\). This improvement is consistent across different experiments and datasets.
One important observation is that the degradation of a lithium ion battery is not linear. The capacity fade and internal resistance increase accelerate after a certain number of cycles. My model handles this nonlinearity well because Mamba can adapt its state transition based on the input, and the weighted loss function focuses on the later stage. The multi-head attention mechanism also helps by allowing the model to attend to different degradation indicators simultaneously. For example, a sudden drop in voltage during discharge may be correlated with a rise in temperature and internal resistance. The attention mechanism can capture these cross-feature dependencies, which are crucial for accurate RUL and SOH estimation of a lithium ion battery.
Another advantage of my approach is its computational efficiency. Mamba has linear time complexity with respect to sequence length, which makes it suitable for long cycling histories of a lithium ion battery. This is important for real-world battery management systems, where the model must process thousands of cycles and provide timely estimates. The hybrid architecture balances the strengths of recurrent networks, attention mechanisms, and state space models, resulting in a robust and accurate predictor for lithium ion battery health management.
I also note that the combined weighted loss function is essential for achieving high accuracy in the later stage of the lithium ion battery life cycle. When the battery is close to its end of life, the degradation rate increases, and the model must be sensitive to small changes in capacity and resistance. The weighted MSE loss ensures that these samples receive higher weight during training, while the smooth L1 loss prevents outliers from destabilizing the training process. The optimal balance of \(\alpha = 0.7\) and \(\beta = 0.3\) confirms that both components are necessary.
Conclusion
I have proposed a hybrid LSTM + Mamba network for RUL and SOH prediction of a lithium ion battery. The network integrates LSTM for temporal feature extraction, multi-head attention for dynamic feature weighting, and Mamba for nonlinear pattern recognition. I also designed a combined weighted loss function that combines smooth L1 loss and weighted MSE loss to improve robustness and focus on the later stage of the lithium ion battery life cycle. Experimental results on an NMC lithium ion battery dataset show that my model achieves high accuracy and stability. The RUL prediction yields \(R^2\) values above 0.9979, and the SOH prediction yields \(R^2\) values above 0.9742. The ablation study confirms that each component contributes to the overall performance. The comparison with baseline models shows that my hybrid network outperforms LSTM, GRU, CNN, Transformer, and CNN-GRU for lithium ion battery prognostics.
Future work will explore the applicability of this hybrid network to other lithium ion battery chemistries, such as lithium iron phosphate and solid-state batteries. I will also investigate transfer learning to enhance cross-domain adaptability and Bayesian uncertainty quantification for risk-aware battery management. In addition, I plan to integrate the model into an embedded battery management system to evaluate its real-time performance and energy efficiency. The results presented in this work suggest that the hybrid LSTM + Mamba network is a powerful and practical solution for lithium ion battery RUL and SOH estimation, and it can support safer and more reliable operation of lithium ion battery systems in a wide range of applications.
In summary, my hybrid LSTM + Mamba network provides a comprehensive framework for lithium ion battery prognostics. By combining temporal modeling, attention-based feature selection, and selective state space modeling, it addresses the challenges of nonlinearity, time variance, and long-range dependencies in lithium ion battery degradation data. The combined weighted loss function further improves robustness and late-life accuracy. I believe that this approach can be extended to other energy storage systems and can contribute to the advancement of battery health management technologies.
