Estimation of SOC in Lithium Iron Phosphate Batteries Based on Electrochemical Impedance Spectroscopy and HO-TFRNN Model

Accurate estimation of the State of Charge (SOC) in energy storage lithium batteries is crucial for enhancing the performance, reliability, and lifespan of battery systems, especially in applications such as electric vehicles and grid storage. Traditional methods for SOC estimation, including open-circuit voltage and ampere-hour integration, often suffer from limitations like low accuracy, poor stability, and dependency on specific operating conditions. To address these challenges, this study proposes a novel approach that leverages Electrochemical Impedance Spectroscopy (EIS) for feature extraction and a hybrid Time-Frequency Recurrent Neural Network (TFRNN) optimized with the Hippopotamus Optimization (HO) algorithm and Transformer blocks for SOC estimation. EIS provides a non-invasive means to capture the internal electrochemical dynamics of energy storage lithium batteries, while the HO-TFRNN-Transformer model effectively handles the nonlinear relationships between EIS features and SOC. This article details the methodology, including data acquisition, feature selection, model architecture, and experimental validation, demonstrating significant improvements in estimation accuracy and robustness across multiple datasets.

The growing adoption of energy storage lithium batteries in various sectors underscores the need for precise SOC estimation. SOC, defined as the ratio of remaining capacity to maximum capacity, directly influences battery management strategies. However, the electrochemical complexity of batteries, particularly lithium iron phosphate types, makes SOC estimation a challenging task. Existing data-driven methods, such as deep neural networks and recurrent neural networks, have shown promise but often require extensive data and suffer from overfitting. By integrating EIS, which reflects battery internal states through impedance measurements at different frequencies, with advanced neural networks, this work aims to achieve high-precision SOC estimation. The following sections describe the systematic process of data collection, feature subset selection based on equivalent circuit modeling and frequency domain analysis, and the development of the HO-TFRNN-Transformer model, followed by experimental results and conclusions.

Data Acquisition and Feature Extraction

To construct a comprehensive dataset for SOC estimation, we conducted experiments on commercial 18650 lithium iron phosphate batteries with a nominal capacity of 1500 mAh. The battery testing system included a temperature chamber, a battery cycler for charge-discharge operations, an electrochemical workstation for EIS measurements, and a computer for data processing. The EIS tests were performed at specific SOC levels (0%, 10%, 30%, 50%, 70%, 90%, and 100%) under controlled temperature conditions, primarily at 25°C, with additional datasets collected at 15°C and 20°C for validation. Each EIS measurement involved applying AC signals across a frequency range from 0.1 Hz to 100 kHz, recording impedance magnitude, phase, real part, and imaginary part. This process generated over 1000 cycles of data, ensuring a robust dataset for training and testing the estimation model.

The raw EIS data contained numerous features, but not all were relevant for SOC estimation. To reduce dimensionality and enhance model performance, we employed a hybrid approach combining equivalent circuit modeling and frequency domain analysis. First, an equivalent circuit model was developed to represent the electrochemical behavior of the energy storage lithium battery. The model consisted of components such as ohmic resistance, charge transfer resistance, constant phase elements, and Warburg impedance, which account for diffusion processes. Using Zsimpwin software, we fitted the EIS data to the LR(QR)(QR)W model, as it provided the best fit with minimal error. The Warburg impedance (W) was identified as a key parameter due to its high correlation with SOC, as evidenced by a Pearson correlation coefficient of 0.98. The equivalent circuit model can be represented by the following equation for impedance \( Z \):

$$ Z = R_\Omega + \frac{R_{ct}}{1 + (j\omega R_{ct} C_{dl})^\alpha} + Z_W $$

where \( R_\Omega \) is the ohmic resistance, \( R_{ct} \) is the charge transfer resistance, \( C_{dl} \) is the double-layer capacitance, \( \alpha \) is the constant phase element exponent, \( \omega \) is the angular frequency, and \( Z_W \) is the Warburg impedance. The fitting results confirmed that W had the lowest error, making it a primary feature for SOC estimation.

In addition to equivalent circuit parameters, we analyzed the frequency domain characteristics of EIS data. Nyquist plots, Bode magnitude, and phase plots revealed distinct patterns at specific frequencies. For instance, at 0.1 Hz, the magnitude and phase showed significant variations with SOC, reflecting diffusion-related processes. Similarly, the intersection point of the semicircle and linear segment in the Nyquist plot, corresponding to around 10 Hz, provided impedance values that correlated with SOC changes. Based on this analysis, we selected a feature subset including magnitude and phase at 0.1 Hz, real and imaginary parts at 100 Hz, and the Warburg impedance. This subset effectively captures the electrochemical dynamics of energy storage lithium batteries while minimizing redundancy. The Pearson correlation heatmap below summarizes the relationships between these features and SOC:

Feature Correlation with SOC
Warburg Impedance (W) 0.98
Magnitude at 0.1 Hz 0.95
Phase at 0.1 Hz -0.92
Real Part at 100 Hz 0.89
Imaginary Part at 100 Hz -0.87

This feature selection process ensured that the input data for the neural network model were both relevant and concise, facilitating accurate SOC estimation for energy storage lithium batteries.

Model Development: HO-TFRNN-Transformer Approach

The SOC estimation model was built upon a Time-Frequency Recurrent Neural Network (TFRNN) architecture, which combines temporal and spectral analysis to handle sequential data effectively. TFRNN blocks employ bidirectional feature extraction to capture both time-domain dynamics and frequency-domain structures, followed by residual connections and attention mechanisms for feature fusion. This makes it particularly suitable for processing EIS data from energy storage lithium batteries, where impedance varies with frequency and SOC. The basic TFRNN block can be represented as:

$$ \mathbf{H}_t = \text{TFRNN}(\mathbf{X}_t, \mathbf{H}_{t-1}) $$

where \( \mathbf{X}_t \) is the input at time step \( t \), and \( \mathbf{H}_t \) is the hidden state. To enhance the model’s ability to capture long-range dependencies, we integrated Transformer blocks into the TFRNN architecture. Transformers use self-attention mechanisms to weigh the importance of different sequence elements, improving the handling of complex, nonlinear relationships in EIS data. The self-attention operation is defined as:

$$ \text{Attention}(\mathbf{Q}, \mathbf{K}, \mathbf{V}) = \text{softmax}\left(\frac{\mathbf{Q}\mathbf{K}^T}{\sqrt{d_k}}\right)\mathbf{V} $$

where \( \mathbf{Q} \), \( \mathbf{K} \), and \( \mathbf{V} \) are query, key, and value matrices derived from the input, and \( d_k \) is the dimensionality. The modified TFRNN block with Transformer components allows for parallel processing and better generalization, addressing limitations of traditional RNNs in SOC estimation.

Hyperparameter tuning is critical for optimizing neural network performance. Manual tuning is time-consuming and often suboptimal; thus, we employed the Hippopotamus Optimization (HO) algorithm, a metaheuristic inspired by the social and foraging behaviors of hippos. HO balances global exploration and local exploitation by simulating hierarchy, territoriality, and migration. The algorithm optimizes key hyperparameters such as hidden units, batch size, and dropout rate. The objective function for HO minimizes the root mean square error (RMSE) between predicted and actual SOC values:

$$ \text{RMSE} = \sqrt{\frac{1}{N} \sum_{i=1}^{N} (SOC_{\text{pred},i} – SOC_{\text{actual},i})^2} $$

After 10 generations with a population size of 10, HO identified the optimal hyperparameters: hidden_units = 93, batch_size = 15, and dropout_rate = 0. This configuration reduced overfitting and improved convergence during training. The overall HO-TFRNN-Transformer model was trained on the EIS feature dataset using backpropagation and adaptive moment estimation (Adam) optimizer, with mean squared error as the loss function. The integration of EIS data with this advanced model ensures robust SOC estimation for energy storage lithium batteries under varying conditions.

Experimental Results and Performance Analysis

We evaluated the proposed HO-TFRNN-Transformer model on EIS datasets collected at 15°C, 20°C, and 25°C, comparing its performance against baseline models like CNN, DNN, RNN, and standard TFRNN. The evaluation metrics included RMSE, mean absolute error (MAE), and maximum error (ME), defined as:

$$ \text{MAE} = \frac{1}{N} \sum_{i=1}^{N} |SOC_{\text{pred},i} – SOC_{\text{actual},i}| $$

$$ \text{ME} = \max |SOC_{\text{pred},i} – SOC_{\text{actual},i}| $$

The following table summarizes the results for the 25°C dataset, demonstrating the superiority of the HO-TFRNN-Transformer model:

Model RMSE (%) MAE (%) ME (%)
CNN 2.02064 1.72070 7.54539
DNN 2.24880 1.71140 7.80014
RNN 1.77170 1.33870 7.41727
TFRNN 1.36340 1.00940 5.71444
HO-TFRNN-Transformer 1.02460 0.86290 2.64960

As shown, the HO-TFRNN-Transformer model achieved the lowest errors, with RMSE reduced by approximately 40% compared to standard TFRNN. The improvement is attributed to the synergistic effects of HO optimization and Transformer integration, which enhance feature representation and sequence modeling. For instance, the attention mechanisms in Transformer blocks allow the model to focus on critical EIS features, such as low-frequency impedance changes, that are strongly correlated with SOC in energy storage lithium batteries. The error distribution for the HO-TFRNN-Transformer model on the 25°C dataset remained within 3%, indicating high precision and stability.

To validate generalizability, we tested the model on datasets at 15°C and 20°C. The results, presented in the table below, confirm consistent performance across temperatures:

Dataset Model RMSE (%) MAE (%) ME (%)
15°C TFRNN 3.41468 2.34360 5.13445
15°C HO-TFRNN-Transformer 1.03001 0.87560 1.90433
20°C TFRNN 2.08240 1.86810 7.20567
20°C HO-TFRNN-Transformer 1.39880 1.18690 2.84019

These findings highlight the model’s robustness to temperature variations, a common challenge in energy storage lithium battery applications. The HO-TFRNN-Transformer algorithm maintains low errors even with smaller datasets, as evidenced by an RMSE of 0.65050% on a reduced 25°C dataset. This makes it suitable for real-world scenarios where data availability may be limited. Overall, the experimental results underscore the effectiveness of combining EIS-based feature extraction with advanced neural networks for accurate SOC estimation in energy storage lithium batteries.

Conclusion and Future Work

This study presents a novel framework for SOC estimation in lithium iron phosphate batteries, leveraging Electrochemical Impedance Spectroscopy and a hybrid HO-TFRNN-Transformer model. By integrating equivalent circuit modeling and frequency domain analysis, we identified a compact feature subset that captures the essential electrochemical characteristics of energy storage lithium batteries. The HO-TFRNN-Transformer model, optimized with the Hippopotamus Optimization algorithm, demonstrated significant improvements in accuracy, with RMSE below 1.03% across multiple temperatures. The use of Transformer blocks enhanced the model’s ability to process sequential EIS data, while HO automation reduced hyperparameter tuning time. These advancements address key limitations of traditional SOC estimation methods, offering a reliable solution for battery management systems.

Future work will focus on extending this approach to other types of energy storage lithium batteries, such as ternary lithium-ion cells, and incorporating additional states like State of Health (SOH) and temperature effects. Real-time implementation and adaptation to dynamic operating conditions will also be explored to further enhance the practicality of the proposed method. The integration of EIS with deep learning models holds great promise for advancing the reliability and efficiency of energy storage systems, contributing to the sustainable development of battery technologies.

Scroll to Top