Next Article in Journal
Powertrain in Battery Electric Vehicles (BEVs): Comprehensive Review of Current Technologies and Future Trends Among Automakers
Previous Article in Journal
Micro-Platform Verification for LiDAR SLAM-Based Navigation of Mecanum-Wheeled Robot in Warehouse Environment
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

State of Charge (SoC) Accurate Estimation Using Different Models of LSTM

Department of Electronics & Communications Engineering, Faculty of Engineering, Helwan University, Cairo 11795, Egypt
*
Author to whom correspondence should be addressed.
World Electr. Veh. J. 2025, 16(10), 572; https://doi.org/10.3390/wevj16100572
Submission received: 5 July 2025 / Revised: 4 October 2025 / Accepted: 6 October 2025 / Published: 10 October 2025
(This article belongs to the Section Storage Systems)

Abstract

Accurately estimating the State of Charge (SoC) is essential for optimal battery charge control and predicting the operational range of electric vehicles. The precision of SoC estimation directly influences these vehicles’ range and safety. However, achieving accurate SoC estimation is challenging due to environmental variations, temperature changes, and electromagnetic interference. Numerous technologies rely on Machine Learning (ML) and Artificial Neural Networks (ANN). The proposed model employs two or more cascaded Long Short-Term Memory (LSTM) networks, which have effectively reduced the Mean Square Error (MSE). Additionally, other models such as Nonlinear Auto Regressive models with exogenous input neural networks (NARX) combined with LSTM, and standard LSTM models have been simulated. In this research a model has been presented with reduced Root Mean Square Error (RMSE) compared to a LSTM by 78% and has reduced the RMSE compared to NARX with LSTM by 47%.

1. Introduction

With the rise in electric mobility, Internal Combustion (IC) engines are gradually being phased out of the automotive industry. This transition demands electric vehicles (EVs) that can deliver comparable mileage to IC engine-powered vehicles. Achieving this requires the use of batteries with high power and energy density. However, increasing the battery pack’s capacity can significantly add to the vehicle’s weight, negatively affecting overall performance. Therefore, a balance must be struck between battery size and EV range. While Lithium-Ion Battery (LIB) packs currently meet the demands of both electric vehicles (EVs) and Hybrid Electric Vehicles (HEVs), concerns remain regarding their durability, safety, and lifespan. Key factors influencing LIB longevity include the SoC and the number of charge/discharge cycles [1,2].
The SoC is a critical parameter in batteries, representing the amount of energy currently stored. Accurate SoC estimation is vital for Battery Management Systems (BMS) to ensure the safe and efficient operation of batteries. Traditional methods for SoC estimation include Open-Circuit Voltage (OCV) measurement, the Kalman filter, and Coulomb counting [3].
The Open-Circuit Voltage (OCV) method estimates the SoC by measuring the battery’s voltage at rest and correlating it with a predefined voltage-SoC curve. Coulomb counting, on the other hand, calculates the SoC by integrating the current flowing into and out of the battery over time. The Kalman filter method employs a recursive algorithm, using a mathematical model of the battery along with measured voltage and current values to estimate the SoC [4].
Despite their widespread use, these traditional methods have certain limitations. The OCV method is influenced by factors such as temperature, battery aging, and other conditions that can cause deviations in the voltage-SoC curve from the predefined standard. The Coulomb counting method is susceptible to errors due to battery aging, self-discharge, and measurement inaccuracies. Similarly, the Kalman filter method relies on precise battery models and can be computationally intensive [5].
The Kalman filter is a mathematical algorithm that provides estimates of unknown variables by combining a series of measurements observed over time, accounting for statistical noise and other inaccuracies. In the context of battery management systems (BMS) for electric vehicles, the Kalman filter is instrumental in estimating the SoC of lithium-ion batteries. Accurate SoC estimation is crucial for optimizing battery performance, ensuring safety, and extending battery lifespan [6].
Traditional methods like Coulomb counting, which track the charge entering and leaving the battery, can accumulate errors over time due to factors like temperature variations and battery aging. The Kalman filter addresses these challenges by integrating a predictive model of the battery’s behavior with real-time measurements of voltage, current, and temperature. This integration allows for continuous correction of the SoC estimate, reducing cumulative errors and enhancing reliability [7].
Given the nonlinear characteristics of battery systems, the Extended Kalman Filter (EKF) is often employed. The EKF linearizes the nonlinear system dynamics around the current estimate, enabling the application of the Kalman filter to systems with nonlinearities. This approach enhances the accuracy of SoC estimation in real-world applications; implementing the Kalman filter for SoC estimation requires a precise battery model and accurate characterization of system noise [8].
To overcome these limitations, data-driven approaches using Machine Learning (ML) and Artificial Neural Networks (ANN) have gained traction [9]. However, many existing data-driven models, such as Feedforward Neural Networks (FNNs), are inherently static and lack internal memory, making them less suitable for time-dependent problems like SoC estimation, which involves sequential dependencies and hysteresis effects. Recurrent Neural Networks (RNNs) like Long Short-Term Memory (LSTM) and Nonlinear Auto Regressive models with Exogenous input (NARX) have shown promise in handling sequential data, but their implementation often presents challenges for real-time applications in resource-limited embedded systems [10]. Furthermore, many studies focus on single-layer architectures, which may not be sufficient to capture the complex, long-term temporal dependencies inherent in battery degradation and behavior [11].
Motivated by this challenge, this work explores a novel cascaded LSTM architecture to address the limitations of existing SoC estimation methods. The primary research gaps this study addresses is the need for a highly accurate yet computationally efficient model that can effectively capture the complex, nonlinear dynamics, and sequential dependencies of battery behavior. While other studies have used LSTM and NARX models, this work provides a comprehensive comparison of a novel three-cascaded LSTM model against traditional methods and a hybrid NARX-LSTM approach, demonstrating its superior performance [12].
The fuzzy logic method employs a rule-based approach, utilizing linguistic variables to manage the inherent uncertainty and imprecision within the battery system. Meanwhile, the adaptive observer method applies state estimation techniques, using mathematical models and adaptive algorithms to estimate the SoC [13].
Recently, there has been increasing interest in data-driven approaches for SoC estimation, particularly those based on machine learning, such as deep learning and reinforcement learning. Deep learning utilizes multi-layered Artificial Neural Networks (ANNs) to identify complex patterns within data [14]. Reinforcement learning, another form of machine learning, learns through interaction with the environment by trial and error [15].
SoC estimation plays a crucial role in Battery Management Systems (BMS), ensuring the optimal performance and longevity of batteries [16]. Traditional methods like the OCV, Coulomb counting, and Kalman filter have notable limitations. To address these, advanced techniques such as the ANN method, fuzzy logic, and adaptive observer methods have been introduced. More recently, data-driven approaches, including deep learning and reinforcement learning, have demonstrated promising potential in enhancing SoC estimation [17].
Given that SoC is a nonlinear function of both temperature and current, its estimation poses a significant challenge, these advanced methods are based on machine learning and data science algorithms, driven by recent developments in Artificial Intelligence (AI). Lithium-Ion Batteries (LIBs) are the preferred power source for electric vehicles, portable devices, and grid energy storage systems. However, both cycle aging and calendar aging contribute to the degradation of LIB capacity and power over time [18].
An Artificial Neural Network (ANN) was chosen due to its ability to mimic the way the human brain functions. In a neural network, an artificial neuron receives one or more inputs, which are combined with different weights to generate an output. Among the various ANN techniques available, the Multi-Layer Perceptron (MLP) was selected. MLP models brain activity by creating a complex network of interconnected nodes. These nodes are distributed across several layers: an input layer, an output layer, and one or more hidden layers. The MLP network operates in a feed-forward manner, where connections between layers move in one direction from the input layer to the output layer. Each layer, except for the input layer, processes data from the previous layer and passes the results to the next layer [19].
The Back-Propagation Neural Network (BPNN) is a type of ANN that uses supervised learning to train the network. The BPNN consists of various layers of neurons, encompassing an input layer, one or more hidden layers, and an output layer. Neurons within each layer establish connections with neurons in the subsequent layer through weighted connections. During training, the weights are fine-tuned to minimize the disparity between the predicted output and the actual output. The BPNN is a commonly used ANN for estimating SoC by training on a large amount of battery operation data [19].
Recurrent Neural Networks (RNNs) are a type of ANN designed to process sequential data. RNNs contain loops within the network that allow information to persist over time. The output of each neuron is fed back into the network as input to the next neuron in the sequence, enabling the network to learn patterns in sequential data. RNNs have been applied in battery SoC estimation, with one study using RNNs equipped with Long Short-Term Memory (LSTM) cells for this purpose. LSTM cells are specifically designed to retain information over extended periods, effectively addressing the issue of vanishing gradients that can occur in traditional RNNs [20].
LSTMs feature a memory cell that can maintain its state over time, controlled by three gates: the input gate, output gate, and forget gate. These gates are essential for regulating the flow of information in and out of the memory cell. The input gate manages the information entering the memory cell, while the forget gate determines what information is retained or discarded. The output gate controls the transmission of information from the memory cell to the output layer. Although LSTMs excel at handling long-term dependencies, they require more training cycles and are considered one of the more complex models within the RNN family [13].
There are different methods used in SoC rather than Recurrent Neural Network and generate impressive results [21].
The main contributions of this work are as follows, proposing a three-cascaded LSTM model; tailored for SoC estimation using six real-world input features, this architecture is designed to capture more complex temporal dependencies than single-layer models. Comprehensive comparative analysis; comparing the proposed model’s performance against a standard LSTM and a NARX-LSTM model to demonstrate its enhanced accuracy. Rigorous validation: through extensive experiments and statistical analysis using the MATLAB R2024a environment, we provide insights into training dynamics and the practical feasibility of the proposed model.
For the latest studies, this study is among the few that provides a comprehensive comparison between NARX and LSTM for SoC estimation, particularly with a focus on model simplicity and real-time applicability [22].
In recent years, data-driven approaches such as Artificial Neural Networks (ANN) and Feedforward Neural Networks (FNN) have been explored due to their ability to approximate complex nonlinear functions. However, these methods are inherently static and lack internal memory mechanisms, making them less suitable for time-dependent problems like SoC estimation, which involves sequential dependencies and hysteresis effects. Their inability to account for historical system dynamics limits their accuracy and adaptability, especially under fluctuating load and temperature conditions.
A comparison between the different methods used to estimate SoC is illustrated in Table 1.

2. NARX-LSTM

NARX stands for Nonlinear Autoregressive Exogenous model, and is illustrated in Figure 1, which shows its mathematical structure. The model consists of three layers: an input layer, a hidden layer, and an output layer, along with a feedback connection from the output layer back to the input layer. The input layer includes an input block for storing the input time series and an output block for storing the output time series.
NARX is a robust model for time series analysis and forecasting, capable of capturing and predicting future behavior based on historical data. By identifying relationships between past and present values, it constructs a mathematical model to accurately reflect these.
The feedback connections within the model allow the output to loop back into the input, enabling the network to effectively learn and represent patterns in time series data.
The NARX model offers the advantage of rapid convergence and requires fewer training cycles, although it depends on output parameters from previous time steps. As global concerns over traditional fuel supplies and emissions intensify, the demand for electric and hybrid vehicles continues to rise. This increases the need for precise battery system modeling, facilitating the design of smaller, more efficient battery packs. Accurate SoC estimation is a critical element in optimizing Battery Management Systems, directly influencing the performance and lifespan of electric vehicle batteries [23,24,25,26,27].
The SoC estimation of a battery can be achieved through various neural network techniques, including FNNs and RNNs. LSTM networks have been widely utilized for SoC estimation, with some models incorporating cascaded configurations of multiple LSTMs to enhance accuracy. Comparative studies of these configurations have been performed to identify the most effective approach for SoC estimation. Figure 2 presents the mathematical model of the LSTM [26].
The model of LSTM has three inputs Ct − 1, ht − 1, and Xt. where Ct − 1, ht − 1 are the output of the previous cell in case there is a previous cell, and Xt is the input for the cell from the data that should be processed. The processing in the cell is a combination of sigmoid, tanh, additions, and multiplications. The output of the cell is Ct, and ht. where Ct is the information that is used as a memory to the next cell if there is a next cell, and ht is the output of the processed data.
The NARX-LSTM model has been applied for SoC estimation in batteries [14]. The verification of this research was conducted using MATLAB, with the dataset sourced from IEEE-DataPort [27].
The NARX-LSTM model is used by applying the measurements of the current, voltage, and temperature as input vector to the NARX; the output of NARX with also current, voltage, and temperature readings are now considered as inputs for the next layer of LSTM. The LSTM output is the estimated SoC of the battery.
The choice to use the NARX model in this study was initially inspired by prior research [26], where it demonstrated promising performance in modeling nonlinear dynamic systems with memory. Upon further investigation, it found that NARX is particularly well-suited for the time series prediction tasks due to its ability to incorporate both past input and output data, which aligns well with the temporal dependencies observed in battery SoC estimation.
Additionally, the NARX architecture offers a balance between model complexity and training efficiency, making it a practical choice for real-time or embedded implementations, which are required in battery SoC estimation.

3. Cascaded LSTMs

The SoC of the LIB can be estimated using various neural network technologies, such as FNNs and RNNs. LSTM networks have also been employed for SoC estimation, with models incorporating multiple LSTMs in a cascaded configuration. These configurations have been compared to identify the most suitable approach for accurate SoC estimation. The data is first input into the LSTM in a sequential format. This sequence is then processed by the LSTM layer, whose output is passed to a fully connected layer. Finally, the expected output, in this case, a regression result, is produced by the LSTM network.
A cascaded configuration of LSTM layers is used, with the number of networks adjusted at each iteration. The Mean Absolute Error (MAE) for the network is then calculated using the following Equation (1).
M A E = 1 N × i = 1 N | E x p e c t e d O u t p u t i C u r r e n t O u t p u t i |
MSE and RMSE have been calculated using Equations (2) and (3).
M S E = 1 N × i = 1 N ( E x p e c t e d O u t p u t i C u r r e n t O u t p u t i ) 2
R M S E = 1 N × i = 1 N ( E x p e c t e d O u t p u t i C u r r e n t O u t p u t i ) 2
The model used in this research is based on the cascaded networks of LSTM, Figure 2 shows the mathematical model of one network of LSTM.

4. Experimental Setup

To ensure reproducibility and provide a clear basis for our results, this section details the dataset, data preprocessing steps, and the specific hyperparameters used for all neural network models.
The dataset used in this study was sourced from IEEE-DataPort. It contains time-series data for three different Lithium-ion batteries. The data was collected under various conditions, including charging and discharging cycles, which capture the dynamic and nonlinear behavior of the batteries. The dataset includes three key features: Load current, Load voltage, and temperature. Data from the first battery was used to train the models, the second battery’s data was used for validation, and the third battery’s data was held out for testing. To manage any potential missing or outlier points, a simple linear interpolation method was applied to ensure the time series was continuous.
Model Hyperparameters are implemented in MATLAB. Table 2 summarizes the key hyperparameters and configurations used for all models.
The network architecture for the cascaded LSTM model consisted of a sequence input layer, followed by three cascaded LSTM layers, and a final fully connected layer that produced the single-value SoC output. The output of each LSTM layer was passed to the next as an additional input, allowing the network to learn progressively more complex representations of the temporal data.

5. Results

After calculating the error, it was found that the least error occurred when three cascaded LSTM networks were used, as shown in Figure 3. The addition of more networks beyond this point did not significantly improve the model’s accuracy and, in some cases, led to an increase in error due to overfitting and error propagation. This indicates that the optimal number of cascaded LSTMs is highly dependent on the dataset’s complexity. The best number was determined by finding the minimum values for MAE, MSE, and RMSE across different configurations, with three layers consistently providing the lowest error.
To validate the overfitting concerns, the training and validation loss curves were plotted against the number of epochs. As shown in Figure 4, the training loss continued to decrease with more epochs, but the validation loss began to plateau and then increase after a certain point. This divergence is a clear indication of overfitting, where the model begins to memorize the training data rather than generalizing to unseen data. This analysis provides convincing evidence that a three-layer configuration strikes the optimal balance between model complexity and generalization ability for this specific dataset. Figure 4: Training and Validation Loss Curves for the Three-Cascaded LSTM Model. The plot shows the training loss (blue line) and validation loss (orange line) decreasing over the first one hundred epochs, with a minimal increase in validation loss toward the end, confirming the model’s stability without significant overfitting at this configuration.
The performance of the severely overfit model, such as the 10-cascaded LSTM network, is illustrated in Figure 5. This figure clearly shows a rapid divergence where the training loss continues to drop while the validation loss steeply increases after the initial learning phase. This comparison provides convincing evidence that a three-layer configuration strikes the optimal balance between model complexity and generalization ability for this specific dataset, while configurations with more layers suffer from performance degradation due to overfitting. The problem setup is to optimize SoC estimation to reduce the charging and discharging cycles.
The three networks of LSTM have presented that it has the least error of MAE, MSE, and RMSE compared to other LSTM models, Table 3 shows the MAE, MSE, and RMSE for the thirteen models of LSTM including the NARX connected to LSTM.
To ensure that the observed improvements were statistically significant and not due to random chance, a paired t-test was conducted to compare the RMSE values of the three-cascaded LSTM model with both the single-layer LSTM and the NARX-LSTM models. The results of the t-test confirmed that the performance gains of the three-cascaded LSTM network were statistically significant at a p-value of less than 0.05. This finding strengthens the claim that this specific architecture provides a robust and repeatable improvement in SoC estimation accuracy.
While MAE, MSE, and RMSE are effective metrics for measuring average prediction errors, they do not fully capture the impact of worst-case scenarios vital for battery safety. To provide a more domain-specific evaluation, we also considered the Maximum Absolute Error (MAE) to assess the largest momentary deviation in SoC estimation, and the SoC Error at Full Discharge, a critical parameter for predicting vehicle range. The three-cascaded LSTM model consistently showed the lowest MAE and a minimal error at the full discharge point, further supporting its robustness in practical applications compared to the other architecture. Figure 6 shows the Maximum Absolute error for the different models of RNN.
From the above results, it is shown that the error is decreased when the number of LSTM networks has increased to three and after that the error is increasing and decreasing in a random way due to overfitting and error propagation.

6. Discussion

While various techniques exist for estimating the SoC of a battery, this research focuses on data-driven methods, specifically utilizing LSTM and NARX models due to their proven capability in modeling dynamic systems with memory and external influences. This study used RMSE as the primary measurement technique to evaluate the models, allowing for a direct and quantitative comparison. The findings indicate that using three cascaded LSTM layers provides the most accurate SoC estimation. This configuration achieved a reduction in RMSE by 78% when compared to the single-layer LSTM, and by 58% compared to the NARX-LSTM model. The superior performance of the cascaded model can be attributed to its ability to learn more complex, hierarchical features from the input data, effectively overcoming the limitations of single-layer models.
For future work, we recommend several avenues to build upon these findings. First, the model’s generalizability could be enhanced by training on a larger, more diverse dataset that includes multiple battery chemistries and varying states of health. Second, exploring model compression techniques or more computationally efficient architectures, such as gated recurrent units (GRUs) or temporal convolutional networks (TCNs), could address the challenges of real-time implementation. Finally, incorporating explainability methods like SHAP or LIME would provide valuable insights into the contribution of individual input features to the SoC prediction, moving this work from a “black box” model to a more transparent and interpretable solution.

Author Contributions

Conceptualization, F.H. and R.I.M.; methodology, F.H. and R.I.M.; software, F.H.; writing—original draft, F.H.; writing—review and editing, M.E.-B. and R.I.M.; supervision, M.E.-B. and R.I.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

All data used in my article are available; the dataset can be accessed using the following link: https://dx.doi.org/10.21227/fh1g-8k11.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
SoCState of Charge
MLMachine Learning
ANNArtificial Neural Network
LSTMLong Short-Term Memory
MSEMean Square Error
NARXNonlinear Auto Regressive models with Exogenous input neural network
RMSERoot Mean Square Error
LIBLithium-ion Battery
EVElectric Vehicle
ICInternal Combustion
HEVHybrid Electric Vehicle
BMSBattery Management System
OCVOpen-Circuit Voltage
EKFExtended Kalman Filter
AIArtificial Intelligence
MLPMulti-Layer Perceptron
BPNNBack-Propagation Neural Network
RNN Recurrent Neural Network
MAE Mean Absolute Error

References

  1. Wei, M.; Wang, Q.; Ye, M.; Li, J. State of charge estimation for lithium-ion battery using Dynamic Neural Networks. In Proceedings of the 2020 International Conference on Artificial Intelligence and Electromechanical Automation (AIEA), Online, 26 June 2020. [Google Scholar] [CrossRef]
  2. Bian, C.; He, H.; Yang, S. Stacked bidirectional long short-term memory networks for state-of-charge estimation of lithium-ion batteries. Energy 2020, 191, 116538. [Google Scholar] [CrossRef]
  3. Zhao, W.; Kong, X.; Wang, C. Combined estimation of the state of charge of a lithium battery based on a back-propagation–adaptive Kalman filter algorithm. Proc. Inst. Mech. Eng. Part D J. Automob. Eng. 2018, 232, 357–366. [Google Scholar] [CrossRef]
  4. Wei, M.; Ye, M.; Li, J.B.; Wang, Q.; Xu, X. State of charge estimation of lithium-ion batteries using LSTM and NARX Neural Networks. IEEE Access 2020, 8, 189236–189245. [Google Scholar] [CrossRef]
  5. Zhang, Z.; Dong, Z.; Lin, H.; He, Z.; Wang, M.; He, Y.; Gao, X.; Gao, M. An improved bidirectional gated recurrent unit method for accurate state-of-charge estimation. IEEE Access 2021, 9, 11252–11263. [Google Scholar] [CrossRef]
  6. Zhang, Y.; Xiong, R.; He, H.; Pecht, M.G. Long short-term memory recurrent neural network for remaining useful life prediction of lithium- ion batteries. IEEE Trans. Veh. Technol. 2018, 67, 5695–5705. [Google Scholar] [CrossRef]
  7. Vidal, C.; Malysz, P.; Kollmeyer, P.; Emadi, A. Machine learning applied to electrified vehicle battery state of charge and state of health estimation: State-of-the-art. IEEE Access 2020, 8, 52796–52814. [Google Scholar] [CrossRef]
  8. Praakash, H.N.S.; Reddy, A.K.V.K.; Meenakshi, G.; Sharan, S.; Ananya, R.; Rashmi, N. Embedded System-Based Extended Kalman Filter for Real-Time Soc Estimation of Lithium-Ion Cells. In Proceedings of the 2024 10th International Conference on Advanced Computing and Communication Systems (ICACCS), Coimbatore, India, 14–15 March 2024; pp. 1364–1372. [Google Scholar] [CrossRef]
  9. How, D.N.T.; Hannan, M.A.; Lipu, M.S.H.; Ker, P.J. State of charge estimation for lithium-ion batteries using model-based and data-driven methods: A review. IEEE Access 2019, 7, 136116–136136. [Google Scholar] [CrossRef]
  10. Yang, F.; Li, W.; Li, C.; Miao, Q. State-of-charge estimation of lithium-ion batteries based on gated recurrent neural network. Energy 2019, 175, 66–75. [Google Scholar] [CrossRef]
  11. Gismero, A.; Schaltz, E.; Stroe, D.-I. Recursive state of charge and state of health estimation method for lithium-ion batteries based on Coulomb counting and open circuit voltage. Energies 2020, 13, 1811. [Google Scholar] [CrossRef]
  12. Guo, F.; Hu, G.; Hong, R. A parameter adaptive method with dead zone for state of charge and parameter estimation of lithium-ion batteries. J. Power Sources 2018, 402, 174–182. [Google Scholar] [CrossRef]
  13. Qin, X.; Gao, M.; He, Z.; Liu, Y. State of charge estimation for lithium-ion batteries based on NARX neural network and UKF. In Proceedings of the IEEE 17th International Conference on Industrial Informatics (INDIN), Helsinki, Finland, 22–25 July 2019; pp. 1706–1711. [Google Scholar]
  14. Caliwag, A.C.; Lim, W. Hybrid VARMA and LSTM method for lithium-ion battery state-of-charge and output voltage forecasting in electric motorcycle applications. IEEE Access 2019, 7, 59680–59689. [Google Scholar] [CrossRef]
  15. Yang, F.; Zhang, S.; Li, W.; Miao, Q. State-of-charge estimation of lithium-ion batteries using LSTM and UKF. Energy 2020, 201, 117664. [Google Scholar] [CrossRef]
  16. Balasingam, B.; Ahmed, M.; Pattipati, K. Battery management systems—Challenges and some solutions. Energies 2020, 13, 2825. [Google Scholar] [CrossRef]
  17. Wang, G.; Yao, X.; Cui, J.; Yan, Y.; Dai, J.; Zhao, W. A novel piezoelectric hysteresis modeling method combining LSTM and NARX neural networks. Mod. Phys. Lett. B 2020, 34, 2050306. [Google Scholar] [CrossRef]
  18. Rahimi, M. Lithium-ion batteries: Latest advances and prospects. Batteries 2021, 7, 8. [Google Scholar] [CrossRef]
  19. Popescu, M.-C.; Balas, V.; Perescu-Popescu, L.; Mastorakis, N. Multilayer perceptron and neural networks. WSEAS Trans. Circuits Syst. 2009, 8, 579–588. [Google Scholar]
  20. Smagulova, K.; James, A. A survey on LSTM memristive neural network architectures and applications. Eur. Phys. J. Spec. Top. 2019, 228, 2313–2324. [Google Scholar] [CrossRef]
  21. Koschwitz, D.; Frisch, J.; van Treeck, C. Data-driven heating and cooling load predictions for non-residential buildings based on support vector machine regression and NARX recurrent neural network: A comparative study on district scale. Energy 2018, 165, 134–142. [Google Scholar] [CrossRef]
  22. Huang, Z.; Zhou, Y.; Deng, Z.; Huang, K.; Xu, M.; Shen, Y.; Huang, Y. Precise State-of-Charge Mapping via Deep Learning on Ultrasonic Transmission Signals for Lithium-Ion Batteries. ACS Appl. Mater. Interfaces 2023, 15, 8217–8223. [Google Scholar] [CrossRef] [PubMed]
  23. Le, X.H.; Ho, H.; Lee, G.; Jung, S. Application of Long Short-Term Memory (LSTM) Neural Network for Flood Forecasting. Water 2019, 11, 1387. [Google Scholar] [CrossRef]
  24. Liu, Y.; Li, J.; Zhang, G.; Hua, B.; Xiong, N. State of charge estimation of lithium-ion batteries based on temporal convolutional network and transfer learning. IEEE Access 2021, 9, 34177–34187. [Google Scholar] [CrossRef]
  25. Hong, J.; Wang, Z.; Chen, W.; Wang, L.-Y.; Qu, C. Online joint-prediction of multi-forward-step battery SOC using LSTM neural networks and multiple linear regression for real-world electric vehicles. J. Energy Storage 2020, 30, 101459. [Google Scholar] [CrossRef]
  26. Massaoudi, M.; Chihi, I.; Sidhom, L.; Trabelsi, M.; Refaat, S.; Oueslati, F. A novel approach based deep RNN using hybrid NARX-LSTM model for solar power forecasting. arXiv 2019, arXiv:1910.10064. [Google Scholar] [CrossRef]
  27. Chen, F. Lithium-Ion Battery Data Set; IEEE DataPort™: Piscataway, NJ, USA, 2022. [Google Scholar] [CrossRef]
Figure 1. Mathematical model of NARX these patterns for future predictions.
Figure 1. Mathematical model of NARX these patterns for future predictions.
Wevj 16 00572 g001
Figure 2. Mathematical model of LSTM.
Figure 2. Mathematical model of LSTM.
Wevj 16 00572 g002
Figure 3. Neural Network Model vs. RMSE.
Figure 3. Neural Network Model vs. RMSE.
Wevj 16 00572 g003
Figure 4. The number of epochs vs. loss (MSE).
Figure 4. The number of epochs vs. loss (MSE).
Wevj 16 00572 g004
Figure 5. Training and Validation Loss in MSE versus number of LSTM networks.
Figure 5. Training and Validation Loss in MSE versus number of LSTM networks.
Wevj 16 00572 g005
Figure 6. Maximum Absolute Error vs. different models of RNN.
Figure 6. Maximum Absolute Error vs. different models of RNN.
Wevj 16 00572 g006
Table 1. The comparison between the different methods used to estimate the SoC.
Table 1. The comparison between the different methods used to estimate the SoC.
AspectLSTMNARXTraditional Methods (e.g., Coulomb Counting, Kalman Filter)
InnovationDeep learning model specialized in time-series data with memory capability.Nonlinear dynamic modeling using past inputs/outputs.Model-based estimators use physical/electrical equations.
Advantages
-
Learns complex nonlinear dependencies
-
Captures temporal patterns
-
Robust to noise if trained well.
-
Captures nonlinear dynamics efficiently
-
Good systems with memory and input-output dependencies.
-
Easy to implement (e.g., Coulomb Counting).
-
Low computational load.
-
Based on physical intuition.
Disadvantages
-
Requires large, diverse datasets
-
High computational demand.
-
Requires system identification and model training.
-
Sensitive to training data quality.
-
Less scalable to variable loads.
-
Sensitive to sensor drift (Coulomb Counting).
-
Errors accumulate over time.
-
Assumes linear or simplified dynamics.
Main Gaps
-
Real-time implementation is challenging in embedded systems.
-
Explainability is low (black-box model).
-
Performance degrades under untrained conditions.
-
Model selection and tuning are non-trivial.
-
Inaccurate under dynamic conditions.
-
Poor adaptability to aging and temperature changes.
Industrial Limitations
-
Requires high-end hardware for training/inference.
-
Not yet widely adopted due to complexity and regulatory trust.
-
Limited toolchain support in embedded systems.
-
Difficulty in retraining for different battery types.
-
Lacks robustness to real-world nonlinearities.
-
Accuracy drops in high C-rate or aging conditions.
Table 2. The key hyperparameters and configurations used for all LSTM models.
Table 2. The key hyperparameters and configurations used for all LSTM models.
ParameterValueRationale
Optimization AlgorithmAdamChosen for its efficiency and widespread use in deep learning, it combines the benefits of both AdaGrad and RMSProp.
Number of Epochs100Selected to provide sufficient training while monitoring signs of overfitting on the validation set.
Mini-Batch Size27A non-standard size was chosen after empirical testing showed it provided the best balance between training stability and computational efficiency for this dataset.
Hidden Units125Determined through a series of experiments to find the optimal balance between model complexity and performance, avoiding underfitting.
Loss FunctionMSEThe default loss function for regression tasks, well-suited for continuous-valued predictions like SoC.
Learning Rate0.001A standard initial learning rate that offers a good starting point for the Adam optimizer.
RegularizationL2 RegularizationApplied to the network weights to penalize large values, which helps to mitigate overfitting.
Random Seed42A fixed random seed was used to ensure that the initial weights and training process were identical across all experiments for full reproducibility.
Table 3. MAE, MSE, and RMSE for the different models of RNN.
Table 3. MAE, MSE, and RMSE for the different models of RNN.
ModelMAEMSERMSE
LSTM0.56890.35670.5972
2 Cascaded LSTMs0.17030.04660.2158
3 Cascaded LSTMs0.12460.02040.1430
4 Cascaded LSTMs0.13290.02540.1594
5 Cascaded LSTMs0.22300.07790.2791
6 Cascaded LSTMs0.19130.06510.2551
7 Cascaded LSTMs0.18310.05010.2239
8 Cascaded LSTMs0.22410.07850.2803
9 Cascaded LSTMs0.17540.05110.2259
10 Cascaded LSTMs1.42542.06991.4387
11 Cascaded LSTMs0.20950.08220.2867
12 Cascaded LSTMs0.32140.14920.3863
NARX → LSTM0.30160.11510.3393
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Hassan, F.; El-Bably, M.; Mubarak, R.I. State of Charge (SoC) Accurate Estimation Using Different Models of LSTM. World Electr. Veh. J. 2025, 16, 572. https://doi.org/10.3390/wevj16100572

AMA Style

Hassan F, El-Bably M, Mubarak RI. State of Charge (SoC) Accurate Estimation Using Different Models of LSTM. World Electric Vehicle Journal. 2025; 16(10):572. https://doi.org/10.3390/wevj16100572

Chicago/Turabian Style

Hassan, Fehr, Mohamed El-Bably, and Roaa I. Mubarak. 2025. "State of Charge (SoC) Accurate Estimation Using Different Models of LSTM" World Electric Vehicle Journal 16, no. 10: 572. https://doi.org/10.3390/wevj16100572

APA Style

Hassan, F., El-Bably, M., & Mubarak, R. I. (2025). State of Charge (SoC) Accurate Estimation Using Different Models of LSTM. World Electric Vehicle Journal, 16(10), 572. https://doi.org/10.3390/wevj16100572

Article Metrics

Back to TopTop