Toward Generalizable State-of-Charge Prediction of Lithium-Ion Batteries Using Deep Learning and Real-World Data
Abstract
1. Introduction
- Data cleaning pipeline: A dedicated preprocessing stage is developed to handle real-world battery dataset challenges such as noise, outliers, and missing values commonly encountered in battery measurements.
- Deep learning–based SoC estimation framework: An original data-driven model is proposed based on a TimerV2 architecture capable of capturing multiscale temporal dependencies and nonlinear battery dynamics to accurately estimate the SoC.
- Transfer learning for generalization: Knowledge transfer is investigated to enhance model adaptability across different battery chemistries, configurations, and usage scenarios through an appropriate transfer learning strategy.
- Cross-Dataset Evaluation Results: A validation protocol is proposed to assess improvements in SoC prediction under different training configurations and to validate enhanced generalization.
2. State of the Art
3. Battery Datasets
- Laboratory-controlled datasets: provide high-precision measurements of individual cells or modules under strictly regulated experimental conditions.
- Test vehicle datasets: offer realistic battery pack–level load profiles obtained through controlled driving experiments (e.g., test benches) using standardized driving cycles.
- Real-World Driving Datasets: acquired from vehicles driven in real traffic conditions, capturing long-term battery behavior under highly variable and stochastic operating environments encountered in actual applications.
3.1. LG Dataset
3.2. CEVE Dataset
4. CEVE Dataset Challenges and Processing Pipeline
4.1. Challenges
4.2. Processing Pipeline
4.2.1. Missing Data and Outliers Procesing
4.2.2. Improving SoC Quantization
4.2.3. Improving Temperature Quantization
5. Generalizable SoC Prediction via DL and Transfer Learning
5.1. SoC Prediction Using DL
5.1.1. Data Processing and Training Strategy
5.1.2. TimerV2 Proposed Model Architecture
5.2. Enhancing Model Generalization from Open Source Dataset to Real-World Battery Dataset
5.2.1. Hard Transfer
5.2.2. Transfer Learning
6. Results and Discussion
6.1. Baseline and Comparative Models
6.2. Evaluation Metrics
6.3. In-Domain Evaluation Protocol for the Proposed Approach
6.4. Inter-Domain Evaluation Protocol for the Proposed Approach
7. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
| AI | Artificial Intelligence |
| BMS | Battery Management System |
| DL | Deep Learning |
| CEVE | Citroën Electric Vehicle Experiment |
| CLS | Classification Token |
| CNN | Convolutional Neural Network |
| ECM | Equivalent Circuit Model |
| ELM | Extreme Learning Machine |
| EV | Electric Vehicle |
| GELU | Gaussian Error Linear Unit |
| GPR | Gaussian Process Regression |
| GRU | Gated Recurrent Unit |
| KNN | k-Nearest Neighbors |
| LIB | Lithium-Ion Battery |
| LSTM | Long Short-Term Memory |
| MAE | Mean Absolute Error |
| MHSA | Multi-Head Self-Attention |
| ML | Machine Learning |
| MLP | Multilayer Perceptron |
| MSE | Mean Squared Error |
| OCV | Open Circuit Voltage |
| RMSE | Root Mean Square Error |
| RNN | Recurrent Neural Network |
| SoC | State of Charge |
| SoH | State of Health |
| SVM | Support Vector Machine |
| TimerV2 | Time-Series Transformer-Based Architecture (Version 2) |
References
- Padder, S.G.; Ambulkar, J.; Banotra, A.; Modem, S.; Maheshwari, S.; Jayaramulu, K.; Kundu, C. Data-driven approaches for estimation of EV battery SoC and SoH: A review. IEEE Access 2025, 13, 35048–35067. [Google Scholar] [CrossRef] [Scilit]
- Karthick, A. Review on State of charge prediction of battery management system in electric vehicles. Proc. Inst. Mech. Eng. Part J. Automob. Eng. 2025. [Google Scholar] [CrossRef] [Scilit]
- Ko, Y.; Cho, K.; Kim, M.; Choi, W. A novel capacity estimation method for the lithium batteries using the enhanced coulomb counting method with kalman filtering. IEEE Access 2022, 10, 38793–38801. [Google Scholar] [CrossRef] [Scilit]
- Marongiu, A.; Roscher, M.; Sauer, D.U. Influence of the vehicle-to-grid strategy on the aging behavior of lithium battery electric vehicles. Appl. Energy 2015, 137, 899–912. [Google Scholar] [CrossRef] [Scilit]
- How, D.N.; Hannan, M.; Lipu, M.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] [Scilit]
- Wong, K.L.; Bosello, M.; Tse, R.; Falcomer, C.; Rossi, C.; Pau, G. Li-ion batteries state-of-charge estimation using deep lstm at various battery specifications and discharge cycles. In Proceedings of the Conference on Information Technology for Social Good; Association for Computing Machinery: New York, NY, USA, 2021; pp. 85–90. [Google Scholar]
- Ofoegbu, E.O. State of charge (SOC) estimation in electric vehicle (EV) battery management systems using ensemble methods and neural networks. J. Energy Storage 2025, 114, 115833. [Google Scholar] [CrossRef] [Scilit]
- Trigui, R.; Derollepot, R.; Kreczanic, P.; Poupon, L.; Philipps-Bertin, C. Use analysis and systemic modeling of a new generation EV for autonomy optimization. In EEVC 2014, European Battery, Hybrid and Fuel Cell Electric Vehicle Congress; HAL: Bruxelle, Belgium, 2014; p. 10. [Google Scholar]
- Liu, P.; Xu, R.; Liu, Y.; Lin, F.; Zhao, K. Computational modeling of heterogeneity of stress, charge, and cyclic damage in composite electrodes of Li-ion batteries. J. Electrochem. Soc. 2020, 167, 040527. [Google Scholar] [CrossRef] [Scilit]
- Xu, R.; Yang, Y.; Yin, F.; Liu, P.; Cloetens, P.; Liu, Y.; Lin, F.; Zhao, K. Heterogeneous damage in Li-ion batteries: Experimental analysis and theoretical modeling. J. Mech. Phys. Solids 2019, 129, 160–183. [Google Scholar] [CrossRef] [Scilit]
- Ng, M.F.; Zhao, J.; Yan, Q.; Conduit, G.J.; Seh, Z.W. Predicting the state of charge and health of batteries using data-driven machine learning. Nat. Mach. Intell. 2020, 2, 161–170. [Google Scholar] [CrossRef] [Scilit]
- Lipu, M.H.; Hannan, M.; Hussain, A.; Ayob, A.; Saad, M.H.; Karim, T.F.; How, D.N. Data-driven state of charge estimation of lithium-ion batteries: Algorithms, implementation factors, limitations and future trends. J. Clean. Prod. 2020, 277, 124110. [Google Scholar] [CrossRef] [Scilit]
- Cover, T.; Hart, P. Nearest neighbor pattern classification. IEEE Trans. Inf. Theory 1967, 13, 21–27. [Google Scholar] [CrossRef] [Scilit]
- Talluri, T.; Chung, H.T.; Shin, K. Study of battery state-of-charge estimation with kNN machine learning method. IEIE Trans. Smart Process. Comput. 2021, 10, 496–504. [Google Scholar] [CrossRef] [Scilit]
- Song, S.; Zhang, X.; Gao, D.; Jiang, F.; Wu, Y.; Huang, J.; Gong, Y.; Liu, B.; Huang, Z. A hierarchical state of charge estimation method for lithium-ion batteries via xgboost and kalman filter. In Proceedings of the 2020 IEEE International Conference on Systems, Man, and Cybernetics (SMC); IEEE: New York, NY, USA, 2020; pp. 2317–2322. [Google Scholar]
- Anton, J.C.A.; Nieto, P.J.G.; Viejo, C.B.; Vilán, J.A.V. Support vector machines used to estimate the battery state of charge. IEEE Trans. Power Electron. 2013, 28, 5919–5926. [Google Scholar] [CrossRef] [Scilit]
- Dou, J.; Ma, H.; Zhang, Y.; Wang, S.; Ye, Y.; Li, S.; Hu, L. Extreme learning machine model for state-of-charge estimation of lithium-ion battery using salp swarm algorithm. J. Energy Storage 2022, 52, 104996. [Google Scholar] [CrossRef] [Scilit]
- Rumelhart, D.E.; Hinton, G.E.; Williams, R.J. Learning representations by back-propagating errors. Nature 1986, 323, 533–536. [Google Scholar] [CrossRef] [Scilit]
- LeCun, Y.; Boser, B.; Denker, J.S.; Henderson, D.; Howard, R.E.; Hubbard, W.; Jackel, L.D. Backpropagation applied to handwritten zip code recognition. Neural Comput. 1989, 1, 541–551. [Google Scholar] [CrossRef] [Scilit]
- Hopfield, J.J. Neural networks and physical systems with emergent collective computational abilities. Proc. Natl. Acad. Sci. USA 1982, 79, 2554–2558. [Google Scholar] [CrossRef] [Scilit]
- Hannan, M.A.; Lipu, M.S.H.; Hussain, A.; Saad, M.H.; Ayob, A. Neural network approach for estimating state of charge of lithium-ion battery using backtracking search algorithm. IEEE Access 2018, 6, 10069–10079. [Google Scholar] [CrossRef] [Scilit]
- Bhattacharyya, H.S.; Yadav, A.; Choudhury, A.B.; Chanda, C.K. Convolution neural network-based SOC estimation of Li-ion battery in EV applications. In Proceedings of the 2021 5th International Conference on Electrical, Electronics, Communication, Computer Technologies and Optimization Techniques (ICEECCOT); IEEE: New York, NY, USA, 2021; pp. 587–592. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [Scilit]
- Chung, J.; Gulcehre, C.; Cho, K.; Bengio, Y. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv 2014, arXiv:1412.3555. [Google Scholar] [CrossRef] [Scilit]
- Liu, Z.; Jia, W.; Liu, T.; Chang, Y.; Li, J. State of charge estimation of lithium-ion battery based on recurrent neural network. In Proceedings of the 2020 Asia Energy and Electrical Engineering Symposium (AEEES); IEEE: New York, NY, USA, 2020; pp. 742–746. [Google Scholar]
- Cheng, M.W.; Lee, Y.S.; Liu, M.; Sun, C.C. State-of-charge estimation with aging effect and correction for lithium-ion battery. IET Electr. Syst. Transp. 2015, 5, 70–76. [Google Scholar] [CrossRef] [Scilit]
- Tian, J.; Xiong, R.; Shen, W. A review on state of health estimation for lithium ion batteries in photovoltaic systems. ETransportation 2019, 2, 100028. [Google Scholar] [CrossRef] [Scilit]
- Tian, J.; Chen, C.; Shen, W.; Sun, F.; Xiong, R. Deep learning framework for lithium-ion battery state of charge estimation: Recent advances and future perspectives. Energy Storage Mater. 2023, 61, 102883. [Google Scholar] [CrossRef] [Scilit]
- Ghassani, F.; Abdurohman, M.; Putrada, A.G. Prediction of smarthphone charging using k-nearest neighbor machine learning. In Proceedings of the 2018 Third International Conference on Informatics and Computing (ICIC); IEEE: New York, NY, USA, 2018; pp. 1–4. [Google Scholar]
- Hu, C.; Jain, G.; Zhang, P.; Schmidt, C.; Gomadam, P.; Gorka, T. Data-driven method based on particle swarm optimization and k-nearest neighbor regression for estimating capacity of lithium-ion battery. Appl. Energy 2014, 129, 49–55. [Google Scholar] [CrossRef] [Scilit]
- Jiang, F.; Yang, J.; Cheng, Y.; Zhang, X.; Yang, Y.; Gao, K.; Peng, J.; Huang, Z. An aging-aware soc estimation method for lithium-ion batteries using xgboost algorithm. In Proceedings of the 2019 IEEE International Conference on Prognostics and Health Management (ICPHM); IEEE: New York, NY, USA, 2019; pp. 1–8. [Google Scholar]
- Liu, X.; Li, K.; Wu, J.; He, Y.; Liu, X. An extended Kalman filter based data-driven method for state of charge estimation of Li-ion batteries. J. Energy Storage 2021, 40, 102655. [Google Scholar] [CrossRef] [Scilit]
- Zhang, H.; Gui, X.; Zheng, S.; Lu, Z.; Li, Y.; Bian, J. BatteryML: An open-source platform for machine learning on battery degradation. arXiv 2023, arXiv:2310.14714. [Google Scholar]
- Zhang, H.; Li, Y.; Zheng, S.; Lu, Z.; Gui, X.; Xu, W.; Bian, J. Battery lifetime prediction across diverse ageing conditions with inter-cell deep learning. Nat. Mach. Intell. 2025, 7, 270–277. [Google Scholar] [CrossRef] [Scilit]
- Kollmeyer, P.; Vidal, C.; Naguib, M.; Skells, M. LG 18650HG2 Li-ion Battery Data and Example Deep Neural Network xEV SOC Estimator Script, Version 3; Mendeley Data: London, UK, 2020. [CrossRef]
- Wang, S.; Wu, H.; Shi, X.; Hu, T.; Luo, H.; Ma, L.; Zhang, J.Y.; Zhou, J. Timemixer: Decomposable multiscale mixing for time series forecasting. arXiv 2024, arXiv:2405.14616. [Google Scholar] [CrossRef] [Scilit]
- Gulli, A.; Pal, S. Deep Learning with Keras; Packt Publishing Ltd.: Birmingham, UK, 2017. [Google Scholar]
- Kingma, D.P. Adam: A method for stochastic optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]
- Liu, Y.; Zhang, H.; Li, C.; Huang, X.; Wang, J.; Long, M. Timer: Generative pre-trained transformers are large time series models. arXiv 2024, arXiv:2402.02368. [Google Scholar] [CrossRef] [Scilit]
- Dey, R.; Salem, F.M. Gate-variants of gated recurrent unit (GRU) neural networks. In Proceedings of the 2017 IEEE 60th International Midwest Symposium on Circuits and Systems (MWSCAS); IEEE: New York, NY, USA, 2017; pp. 1597–1600. [Google Scholar]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. Adv. Neural Inf. Process. Syst. 2017, 30. Available online: https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf (accessed on 13 May 2026).
- Chicco, D.; Warrens, M.J.; Jurman, G. The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation. PeerJ Comput. Sci. 2021, 7, e623. [Google Scholar] [CrossRef] [Scilit] [PubMed]









| Dataset | LSTM | GRU | Transformer | TimerV2 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MAE | MSE | RMSE | MAE | MSE | RMSE | MAE | MSE | RMSE | MAE | MSE | RMSE | |
| LG Cell | 0.0004 | 0.000408 | 0.0202 | 0.011332 | 0.000207 | 0.0144 | 0.015059 | 0.000362 | 0.019024 | 0.006 | 0.0000608 | 0.0078 |
| CEVE Cell | 0.0008 | 0.000841 | 0.0290 | 0.06478 | 0.007433 | 0.07221 | 0.06154 | 0.005945 | 0.07710 | 0.01 | 0.000159 | 0.0126 |
| CEVE Pack (88 Cells) | 0.0007 | 0.000729 | 0.0270 | 0.1181 | 0.019405 | 0.1319 | 0.1026 | 0.014881 | 0.1220 | 0.009 | 0.000135 | 0.0116 |
| Scenario | Dataset | Metrics | Epochs | ||||
|---|---|---|---|---|---|---|---|
| Train | Test | Transfer Type | MAE | MSE | RMSE | ||
| No Transfer | CEVE Cell | CEVE Cell | None | 0.01 | 0.0001 | 0.0126 | 154 |
| Hard Transfer | LG Cell | CEVE Cell | Hard Transfer | 0.155 | 0.0291 | 0.1705 | 154 |
| Few-shot Learning | LG Cell | CEVE Cell | Fine tuning | 0.0222 | 0.000805 | 0.0207 | 10 |
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. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Khedhiri, M.; Slama, R.; Redondo-Iglesias, E.; Trigui, R. Toward Generalizable State-of-Charge Prediction of Lithium-Ion Batteries Using Deep Learning and Real-World Data. Batteries 2026, 12, 185. https://doi.org/10.3390/batteries12060185
Khedhiri M, Slama R, Redondo-Iglesias E, Trigui R. Toward Generalizable State-of-Charge Prediction of Lithium-Ion Batteries Using Deep Learning and Real-World Data. Batteries. 2026; 12(6):185. https://doi.org/10.3390/batteries12060185
Chicago/Turabian StyleKhedhiri, Montaha, Rim Slama, Eduardo Redondo-Iglesias, and Rochdi Trigui. 2026. "Toward Generalizable State-of-Charge Prediction of Lithium-Ion Batteries Using Deep Learning and Real-World Data" Batteries 12, no. 6: 185. https://doi.org/10.3390/batteries12060185
APA StyleKhedhiri, M., Slama, R., Redondo-Iglesias, E., & Trigui, R. (2026). Toward Generalizable State-of-Charge Prediction of Lithium-Ion Batteries Using Deep Learning and Real-World Data. Batteries, 12(6), 185. https://doi.org/10.3390/batteries12060185

