IDEAS home Printed from https://ideas.repec.org/a/eee/energy/v324y2025ics0360544225015774.html
   My bibliography  Save this article

SOC prediction for electric buses based on interpretable transformer model: Impact of traffic conditions and feature importance

Author

Listed:
  • Hu, Lipeng
  • Tang, Jinjun
  • Xu, Fuqiao
  • Liang, Xiao

Abstract

With increasingly serious environmental issues, the adoption of low-noise, low-emission new energy electric buses in urban public transportation systems is steadily increasing. Accurately estimating the battery State of Charge (SOC) during electric bus operations has emerged as a significant research challenge to improve battery health status. This study introduces a Transformer-based model employing a masked multi-head attention mechanism, designed to precisely capture both local and long-term dependencies through multi-source data integration, thereby achieving high-accuracy SOC predictions. The model effectively integrates vehicle dynamics, driver behavior, traffic conditions, and weather data through a Gated Residual Network (GRN) and a Variable Selection Network (VSN), improving SOC prediction accuracy. The GRN captures complex relationships between features, while the VSN identifies key factors related to SOC and reduces noise interference. The Masked Multi-Head Attention Mechanism enhances the model's ability to capture long-term dependencies, further improving SOC predictions over extended time horizons. The model is trained and evaluated using real-world datasets collected in Changsha city, China, including electric bus operation data, license plate recognition data, and weather information. Experimental results demonstrate that the model effectively captures the complex relationships between multi-source data and SOC, yielding accurate SOC predictions for the 10, 20, and 30-min prediction horizons. The corresponding Symmetric Mean Absolute Percentage Errors (SMAPE) are 0.418 %, 0.220 %, and 0.301 %, respectively, which validates the precision and reliability of proposed model.

Suggested Citation

  • Hu, Lipeng & Tang, Jinjun & Xu, Fuqiao & Liang, Xiao, 2025. "SOC prediction for electric buses based on interpretable transformer model: Impact of traffic conditions and feature importance," Energy, Elsevier, vol. 324(C).
  • Handle: RePEc:eee:energy:v:324:y:2025:i:c:s0360544225015774
    DOI: 10.1016/j.energy.2025.135935
    as

    Download full text from publisher

    File URL: http://www.sciencedirect.com/science/article/pii/S0360544225015774
    Download Restriction: Full text for ScienceDirect subscribers only

    File URL: https://libkey.io/10.1016/j.energy.2025.135935?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to

    for a different version of it.

    References listed on IDEAS

    as
    1. Wang, Yujie & Tian, Jiaqiang & Sun, Zhendong & Wang, Li & Xu, Ruilong & Li, Mince & Chen, Zonghai, 2020. "A comprehensive review of battery modeling and state estimation approaches for advanced battery management systems," Renewable and Sustainable Energy Reviews, Elsevier, vol. 131(C).
    2. Hannan, M.A. & Lipu, M.S.H. & Hussain, A. & Mohamed, A., 2017. "A review of lithium-ion battery state of charge estimation and management system in electric vehicle applications: Challenges and recommendations," Renewable and Sustainable Energy Reviews, Elsevier, vol. 78(C), pages 834-854.
    3. Chen, Liping & Wu, Xiaobo & Lopes, António M. & Yin, Lisheng & Li, Penghua, 2022. "Adaptive state-of-charge estimation of lithium-ion batteries based on square-root unscented Kalman filter," Energy, Elsevier, vol. 252(C).
    4. Bian, Chong & He, Huoliang & Yang, Shunkun, 2020. "Stacked bidirectional long short-term memory networks for state-of-charge estimation of lithium-ion batteries," Energy, Elsevier, vol. 191(C).
    5. Yu, Hanqing & Zhang, Lisheng & Wang, Wentao & Li, Shen & Chen, Siyan & Yang, Shichun & Li, Junfu & Liu, Xinhua, 2023. "State of charge estimation method by using a simplified electrochemical model in deep learning framework for lithium-ion batteries," Energy, Elsevier, vol. 278(C).
    6. Jiang, Cong & Wang, Shunli & Wu, Bin & Fernandez, Carlos & Xiong, Xin & Coffie-Ken, James, 2021. "A state-of-charge estimation method of the power lithium-ion battery in complex conditions based on adaptive square root extended Kalman filter," Energy, Elsevier, vol. 219(C).
    7. Lin, Cheng & Yu, Quanqing & Xiong, Rui & Wang, Le Yi, 2017. "A study on the impact of open circuit voltage tests on state of charge estimation for lithium-ion batteries," Applied Energy, Elsevier, vol. 205(C), pages 892-902.
    8. Zhang, Xinghui & Li, Zhao & Luo, Lingai & Fan, Yilin & Du, Zhengyu, 2022. "A review on thermal management of lithium-ion batteries for electric vehicles," Energy, Elsevier, vol. 238(PA).
    9. Xiao, Renxin & Hu, Yanwen & Jia, Xianguang & Chen, Guisheng, 2022. "A novel estimation of state of charge for the lithium-ion battery in electric vehicle without open circuit voltage experiment," Energy, Elsevier, vol. 243(C).
    10. Wang, Jinghui & Yang, Hao, 2023. "Low carbon future of vehicle sharing, automation, and electrification: A review of modeling mobility behavior and demand," Renewable and Sustainable Energy Reviews, Elsevier, vol. 177(C).
    11. Bian, Xiaolei & Liu, Longcheng & Yan, Jinying, 2019. "A model for state-of-health estimation of lithium ion batteries based on charging profiles," Energy, Elsevier, vol. 177(C), pages 57-65.
    12. Salinas, David & Flunkert, Valentin & Gasthaus, Jan & Januschowski, Tim, 2020. "DeepAR: Probabilistic forecasting with autoregressive recurrent networks," International Journal of Forecasting, Elsevier, vol. 36(3), pages 1181-1191.
    13. Li, Renzheng & Wang, Hui & Dai, Haifeng & Hong, Jichao & Tong, Guangyao & Chen, Xinbo, 2022. "Accurate state of charge prediction for real-world battery systems using a novel dual-dropout-based neural network," Energy, Elsevier, vol. 250(C).
    14. Chuan-Xiang Yu & Yan-Min Xie & Zhao-Yu Sang & Shi-Ya Yang & Rui Huang, 2019. "State-Of-Charge Estimation for Lithium-Ion Battery Using Improved DUKF Based on State-Parameter Separation," Energies, MDPI, vol. 12(21), pages 1-19, October.
    15. Yang, Yongsong & Xu, Yuchen & Nie, Yuwei & Li, Jianming & Liu, Shizhuo & Zhao, Lijun & Yu, Quanqing & Zhang, Chengming, 2024. "Deep transfer learning enables battery state of charge and state of health estimation," Energy, Elsevier, vol. 294(C).
    16. Liu, Xingtao & Chen, Zonghai & Zhang, Chenbin & Wu, Ji, 2014. "A novel temperature-compensated model for power Li-ion batteries with dual-particle-filter state of charge estimation," Applied Energy, Elsevier, vol. 123(C), pages 263-272.
    17. Lim, Bryan & Arık, Sercan Ö. & Loeff, Nicolas & Pfister, Tomas, 2021. "Temporal Fusion Transformers for interpretable multi-horizon time series forecasting," International Journal of Forecasting, Elsevier, vol. 37(4), pages 1748-1764.
    18. Chen, Xiaokai & Lei, Hao & Xiong, Rui & Shen, Weixiang & Yang, Ruixin, 2019. "A novel approach to reconstruct open circuit voltage for state of charge estimation of lithium ion batteries in electric vehicles," Applied Energy, Elsevier, vol. 255(C).
    19. Zafar, Muhammad Hamza & Mansoor, Majad & Abou Houran, Mohamad & Khan, Noman Mujeeb & Khan, Kamran & Raza Moosavi, Syed Kumayl & Sanfilippo, Filippo, 2023. "Hybrid deep learning model for efficient state of charge estimation of Li-ion batteries in electric vehicles," Energy, Elsevier, vol. 282(C).
    20. Song, Yuchen & Liu, Datong & Liao, Haitao & Peng, Yu, 2020. "A hybrid statistical data-driven method for on-line joint state estimation of lithium-ion batteries," Applied Energy, Elsevier, vol. 261(C).
    21. Maheshwari, A. & Nageswari, S., 2022. "Real-time state of charge estimation for electric vehicle power batteries using optimized filter," Energy, Elsevier, vol. 254(PB).
    22. Jiang, Yu & Guo, Jianhua & Zhao, Di & Li, Yue, 2024. "Intelligent energy consumption prediction for battery electric vehicles: A hybrid approach integrating driving behavior and environmental factors," Energy, Elsevier, vol. 308(C).
    23. Chen, Biao & Jiang, Haobin & Chen, Xijia & Li, Huanhuan, 2022. "Robust state-of-charge estimation for lithium-ion batteries based on an improved gas-liquid dynamics model," Energy, Elsevier, vol. 238(PC).
    24. Zhang, Jin & Wang, Zhenpo & Liu, Peng & Zhang, Zhaosheng, 2020. "Energy consumption analysis and prediction of electric vehicles based on real-world driving data," Applied Energy, Elsevier, vol. 275(C).
    25. Chai, Xuqing & Li, Shihao & Liang, Fengwei, 2024. "A novel battery SOC estimation method based on random search optimized LSTM neural network," Energy, Elsevier, vol. 306(C).
    26. Liu, Yongjie & Huang, Zhiwu & Wu, Yue & Yan, Lisen & Jiang, Fu & Peng, Jun, 2022. "An online hybrid estimation method for core temperature of Lithium-ion battery with model noise compensation," Applied Energy, Elsevier, vol. 327(C).
    27. Chen, Yuan & Duan, Wenxian & Huang, Xiaohe & Wang, Shunli, 2024. "Multi-output fusion SOC and SOE estimation algorithm based on deep network migration," Energy, Elsevier, vol. 308(C).
    28. Yang, Fangfang & Li, Weihua & Li, Chuan & Miao, Qiang, 2019. "State-of-charge estimation of lithium-ion batteries based on gated recurrent neural network," Energy, Elsevier, vol. 175(C), pages 66-75.
    29. Chen, Junxiong & Zhang, Yu & Wu, Ji & Cheng, Weisong & Zhu, Qiao, 2023. "SOC estimation for lithium-ion battery using the LSTM-RNN with extended input and constrained output," Energy, Elsevier, vol. 262(PA).
    30. Ng, Kong Soon & Moo, Chin-Sien & Chen, Yi-Ping & Hsieh, Yao-Ching, 2009. "Enhanced coulomb counting method for estimating state-of-charge and state-of-health of lithium-ion batteries," Applied Energy, Elsevier, vol. 86(9), pages 1506-1511, September.
    31. Jaguemont, J. & Boulon, L. & Dubé, Y., 2016. "A comprehensive review of lithium-ion batteries used in hybrid and electric vehicles at cold temperatures," Applied Energy, Elsevier, vol. 164(C), pages 99-114.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Takyi-Aninakwa, Paul & Wang, Shunli & Zhang, Hongying & Yang, Xiao & Fernandez, Carlos, 2023. "A hybrid probabilistic correction model for the state of charge estimation of lithium-ion batteries considering dynamic currents and temperatures," Energy, Elsevier, vol. 273(C).
    2. Molla Shahadat Hossain Lipu & Tahia F. Karim & Shaheer Ansari & Md. Sazal Miah & Md. Siddikur Rahman & Sheikh T. Meraj & Rajvikram Madurai Elavarasan & Raghavendra Rajan Vijayaraghavan, 2022. "Intelligent SOX Estimation for Automotive Battery Management Systems: State-of-the-Art Deep Learning Approaches, Open Issues, and Future Research Opportunities," Energies, MDPI, vol. 16(1), pages 1-31, December.
    3. Yang, Kuo & Tang, Yugui & Zhang, Shujing & Zhang, Zhen, 2022. "A deep learning approach to state of charge estimation of lithium-ion batteries based on dual-stage attention mechanism," Energy, Elsevier, vol. 244(PB).
    4. Chen, Zheng & Zhao, Hongqian & Shu, Xing & Zhang, Yuanjian & Shen, Jiangwei & Liu, Yonggang, 2021. "Synthetic state of charge estimation for lithium-ion batteries based on long short-term memory network modeling and adaptive H-Infinity filter," Energy, Elsevier, vol. 228(C).
    5. Panagiotis Eleftheriadis & Spyridon Giazitzis & Sonia Leva & Emanuele Ogliari, 2023. "Data-Driven Methods for the State of Charge Estimation of Lithium-Ion Batteries: An Overview," Forecasting, MDPI, vol. 5(3), pages 1-24, September.
    6. Bian, Chong & He, Huoliang & Yang, Shunkun, 2020. "Stacked bidirectional long short-term memory networks for state-of-charge estimation of lithium-ion batteries," Energy, Elsevier, vol. 191(C).
    7. Qian, Cheng & Guan, Hongsheng & Xu, Binghui & Xia, Quan & Sun, Bo & Ren, Yi & Wang, Zili, 2024. "A CNN-SAM-LSTM hybrid neural network for multi-state estimation of lithium-ion batteries under dynamical operating conditions," Energy, Elsevier, vol. 294(C).
    8. Chai, Xuqing & Li, Shihao & Liang, Fengwei, 2024. "A novel battery SOC estimation method based on random search optimized LSTM neural network," Energy, Elsevier, vol. 306(C).
    9. Mei, Peng & Karimi, Hamid Reza & Xie, Jiale & Chen, Fei & Ou, Lei & Yang, Shichun & Huang, Cong, 2024. "Battery state estimation methods and management system under vehicle–cloud collaboration: A Survey," Renewable and Sustainable Energy Reviews, Elsevier, vol. 206(C).
    10. Yang, Fangfang & Zhang, Shaohui & Li, Weihua & Miao, Qiang, 2020. "State-of-charge estimation of lithium-ion batteries using LSTM and UKF," Energy, Elsevier, vol. 201(C).
    11. Chen, Lin & Yu, Wentao & Cheng, Guoyang & Wang, Jierui, 2023. "State-of-charge estimation of lithium-ion batteries based on fractional-order modeling and adaptive square-root cubature Kalman filter," Energy, Elsevier, vol. 271(C).
    12. Takyi-Aninakwa, Paul & Wang, Shunli & Zhang, Hongying & Yang, Xiaoyong & Fernandez, Carlos, 2022. "An optimized long short-term memory-weighted fading extended Kalman filtering model with wide temperature adaptation for the state of charge estimation of lithium-ion batteries," Applied Energy, Elsevier, vol. 326(C).
    13. Wang, Yujie & Tian, Jiaqiang & Sun, Zhendong & Wang, Li & Xu, Ruilong & Li, Mince & Chen, Zonghai, 2020. "A comprehensive review of battery modeling and state estimation approaches for advanced battery management systems," Renewable and Sustainable Energy Reviews, Elsevier, vol. 131(C).
    14. Ingvild B. Espedal & Asanthi Jinasena & Odne S. Burheim & Jacob J. Lamb, 2021. "Current Trends for State-of-Charge (SoC) Estimation in Lithium-Ion Battery Electric Vehicles," Energies, MDPI, vol. 14(11), pages 1-24, June.
    15. Takyi-Aninakwa, Paul & Wang, Shunli & Zhang, Hongying & Li, Huan & Xu, Wenhua & Fernandez, Carlos, 2022. "An optimized relevant long short-term memory-squared gain extended Kalman filter for the state of charge estimation of lithium-ion batteries," Energy, Elsevier, vol. 260(C).
    16. Wenxian Duan & Chuanxue Song & Silun Peng & Feng Xiao & Yulong Shao & Shixin Song, 2020. "An Improved Gated Recurrent Unit Network Model for State-of-Charge Estimation of Lithium-Ion Battery," Energies, MDPI, vol. 13(23), pages 1-19, December.
    17. Shahjalal, Mohammad & Roy, Probir Kumar & Shams, Tamanna & Fly, Ashley & Chowdhury, Jahedul Islam & Ahmed, Md. Rishad & Liu, Kailong, 2022. "A review on second-life of Li-ion batteries: prospects, challenges, and issues," Energy, Elsevier, vol. 241(C).
    18. Son, Donghee & Song, Youngbin & Park, Shina & Oh, Junseok & Kim, Sang Woo, 2025. "Online state-of-charge and capacity co-estimation for lithium-ion batteries under aging and varying temperatures," Energy, Elsevier, vol. 316(C).
    19. Liang Zhang & Shunli Wang & Daniel-Ioan Stroe & Chuanyun Zou & Carlos Fernandez & Chunmei Yu, 2020. "An Accurate Time Constant Parameter Determination Method for the Varying Condition Equivalent Circuit Model of Lithium Batteries," Energies, MDPI, vol. 13(8), pages 1-12, April.
    20. Sun, Li & Li, Guanru & You, Fengqi, 2020. "Combined internal resistance and state-of-charge estimation of lithium-ion battery based on extended state observer," Renewable and Sustainable Energy Reviews, Elsevier, vol. 131(C).

    More about this item

    Keywords

    ;
    ;
    ;
    ;
    ;

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:eee:energy:v:324:y:2025:i:c:s0360544225015774. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Catherine Liu (email available below). General contact details of provider: http://www.journals.elsevier.com/energy .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.