Transformer and Support Vector Regression for LiPo Battery Charging Time Prediction
Abstract
This study aims to estimate the charging time of Lithium Polymer (LiPo) batteries using a machine learning-based approach. The parameters used in this study include voltage, current, temperature, and State of Charge (SoC), which are obtained through a microcontroller-based monitoring system. Two algorithms, namely Transformer and Support Vector Regression (SVR), are implemented and compared for battery charging time prediction. Data are collected directly during the charging process and processed for model training and testing. The performance of both models is evaluated using regression metrics, including Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), Mean Absolute Percentage Error (MAPE), and the coefficient of determination (R²). The experimental results show that the SVR model outperforms the Transformer model, achieving an MAE of 14.67 seconds, an RMSE of 20.16 seconds, a MAPE of 11.83%, and an R² value of 0.9991. Meanwhile, the Transformer model achieves an MAE of 22.54 seconds, an RMSE of 29.61 seconds, a MAPE of 16.83%, and an R² value of 0.9981. These results indicate that both models are capable of accurately predicting battery charging time; however, the SVR model provides better overall prediction performance for the experimental dataset used in this study. This research is expected to contribute to the development of more intelligent and accurate battery management systems.
Downloads
References
P. A. Shinde and M. A. Abdelkareem, “Rechargeable Batteries: Technological Advancement, Challenges, Current and Emerging Applications,” pp. 1–20.
N. Gautama, Y. Yunita, and A. Hidayat, “Internet of Things (IoT): Masa Depan Kehidupan Serba Terkoneksi,” Prim. J. Multidiscip. Res., vol. 1, no. 5, pp. 173–177, 2025, [Online]. Available: https://doi.org/10.70716/pjmr.v1i4.294
W. Budiarjo, “Optimasi Sistem Pengisian Kendaraan Listrik Berbasis Fast Charging dan Smart Grid,” RIGGS J. Artif. Intell. Digit. Bus., vol. 4, no. 2, pp. 4063–4072, 2025, doi: 10.31004/riggs.v4i2.1172.
S. Oligomers et al., “Critical Review on High-Safety Lithium-Ion Batteries Modified by,” 2024.
J. Li, Y. Peng, Q. Wang, X. Jiang, and Z. Gao, “State of charge estimation for lithium-ion batteries base on convolutional neural network and transformer framework enhanced by the nutcracker optimization algorithm,” J. Energy Storage, vol. 137, no. July, p. 118526, 2025, doi: 10.1016/j.est.2025.118526.
C. Chen, Z. Li, and J. Wei, “Estimation of Lithium-Ion Battery State of Charge Based on Genetic Algorithm Support Vector Regression under Multiple Temperatures,” Electron., vol. 12, no. 21, 2023, doi: 10.3390/electronics12214433.
R. Salsabila, N. A. Windarko, B. Sumantri, P. Elektronika, N. Surabaya, and J. Timur, “Rancang Bangun Adaptive Neuro-Fuzzy Inference System ( ANFIS ),” vol. 10, no. 1, pp. 198–210, 2025.
H. P. Amrullah, N. A. Windarko, B. Sumantri, P. Elektronika, N. Surabaya, and J. Timur, “Estimasi State-of-Charge Pada Baterai Lithium-Ion Menggunakan,” vol. 9, no. 3, pp. 729–739, 2024.
A. A. Husien.R, N. A. Windarko, and B. Sumantri, “Estimasi State Of Charge (Soc) Pada Baterai Lithium Ion Menggunakan Long Short-Term Memory (LSTM) Neural Network,” Briliant J. Ris. dan Konseptual, vol. 9, no. 4, pp. 986–997, 2024, doi: 10.28926/briliant.v9i4.1955.
G. G. Njema, R. B. O. Ouma, and J. K. Kibet, “A Review on the Recent Advances in Battery Development and Energy Storage Technologies,” vol. 2024, 2024, doi: 10.1155/2024/2329261.
A. Naufal, M. A. Sulaiman, P. Penerbangan, and I. Curug, “RANCANGAN MONITORING BATTERY CHARGING PERALATAN GLIDE PATH SELEX SI-2100 MENGGUNAKAN NODEMCU BERBASIS APLIKASI,” vol. 13, no. 1, 2025.
J. Jaguemont and F. Bardé, “Fast-Charging Model of Lithium Polymer Cells,” 2025.
V. Bhogade and B. Nithya, “Time series forecasting using transformer neural network,” Int. J. Comput. Appl., vol. 46, no. 10, pp. 880–888, 2024, doi: 10.1080/1206212X.2024.2396321.
K. Mohiuddin et al., “Retention Is All You Need,” Int. Conf. Inf. Knowl. Manag. Proc., no. Nips, pp. 4752–4758, 2023, doi: 10.1145/3583780.3615497.
P. M. S. Arianthi, M. Jannah, and N. Santoso, “Journal of Computer Engineering , Electronics and Information Technology ( COELITE ) A Metaheuristic-Based Approach to Inflation Prediction in Indonesia with Support Vector Regression ( SVR ),” J. Comput. Eng. Electron. Inf. Technol., vol. 4, no. 1, pp. 25–34, 2025.
A. Kandiri, P. Shakor, R. Kurda, and A. F. Deifalla, “Modified Artificial Neural Networks and Support Vector Regression to Predict Lateral Pressure Exerted by Fresh Concrete on Formwork,” Int. J. Concr. Struct. Mater., vol. 16, no. 1, 2022, doi: 10.1186/s40069-022-00554-4.
U. Thapa, B. M. Pati, S. Thapa, D. Pyakurel, and A. Shrestha, “Comparative Analysis of Snowmelt-Driven Streamflow Forecasting Using Machine Learning Techniques,” Water (Switzerland), vol. 16, no. 15, 2024, doi: 10.3390/w16152095.
P. Manandhar, H. Rafiq, and E. Rodriguez-ubinas, “New Forecasting Metrics Evaluated in Prophet , Random Forest , and Long Short-Term Memory Models for Load Forecasting,” pp. 1–30, 2024.

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.



