Predicting EV Charging Demand in Renewable-Energy-Powered Grids Using Explainable Machine Learning
Abstract
1. Introduction
2. Literature Review
2.1. Machine Learning Applications in EV Charging Demand Forecasting
2.2. Integration of Renewable Energy in Charging Demand Forecasting
2.3. Gaps and Comparative Positioning of This Study
3. Data and Methodology
3.1. Data and Variables
3.2. Methods
3.2.1. Machine Learning Models
3.2.2. Explain the Machine
4. Results and Discussion
4.1. Model Comparison
4.2. Feature Analysis
4.3. Scenario Analysis
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
CNNs | convolutional neural networks |
EVs | electric vehicles |
GHG | greenhouse gas |
ML | machine learning |
RNNs | recurrent neural networks |
Seq2Seq | sequence to sequence |
SHAP | Shapley additive explanations |
SVM | support vector machine |
Appendix A
Variable | Mean | Std | Min | Max |
---|---|---|---|---|
EV Charging Demand (kW) | 0.149951 | 0.086355 | 0.000003 | 0.300000 |
Solar Energy Production (kW) | 0.149902 | 0.086668 | 0.000002 | 0.300000 |
Wind Energy Production (kW) | 0.150191 | 0.086470 | 0.000039 | 0.300000 |
Electricity Price (USD/kWh) | 0.124878 | 0.043351 | 0.050000 | 0.200000 |
Grid Availability | 0.947785 | 0.222465 | 0.000000 | 1.000000 |
Weather Conditions | 2.007541 | 1.411002 | 0.000000 | 4.000000 |
Battery Storage (kWh) | 24.862472 | 14.418184 | 0.004400 | 49.998000 |
Charging Station Capacity (kW) | 27.536187 | 13.020923 | 5.001500 | 49.998700 |
EV Charging Efficiency (%) | 90.029377 | 5.775470 | 80.000400 | 99.999200 |
Number of EVs Charging | 4.994772 | 2.572260 | 1.000000 | 9.000000 |
Battery Storage (kWh)_lag_1h | 24.859918 | 14.416536 | 0.004400 | 49.998000 |
Battery Storage (kWh)_lag_6h | 24.863403 | 14.416843 | 0.004400 | 49.998000 |
Battery Storage (kWh)_lag_24h | 24.860508 | 14.417561 | 0.004400 | 49.998000 |
Grid Stability Index_lag_1h | 0.999501 | 0.289177 | 0.500100 | 1.499900 |
Grid Stability Index_lag_6h | 0.999403 | 0.289190 | 0.500100 | 1.499900 |
Grid Stability Index_lag_24h | 0.999464 | 0.289159 | 0.500100 | 1.499900 |
Renewable Energy Usage (%)_lag_1h | 50.016175 | 28.825318 | 0.001800 | 99.999500 |
Renewable Energy Usage (%)_lag_6h | 50.014546 | 28.829674 | 0.001800 | 99.999500 |
Renewable Energy Usage (%)_lag_24h | 50.008934 | 28.827764 | 0.001800 | 99.999500 |
Season | 2.397982 | 1.097807 | 1.000000 | 4.000000 |
References
- Hansen, J.; Sato, M. Greenhouse gas growth rates. Proc. Natl. Acad. Sci. USA 2004, 101, 16109–16114. [Google Scholar] [CrossRef] [PubMed]
- Hannappel, R. The impact of global warming on the automotive industry. In AIP Conference Proceedings; AIP Publishing: Melville, NY, USA, 2017; Volume 1871, No. 1. [Google Scholar]
- Mostafaeipour, A.; Bidokhti, A.; Fakhrzad, M.B.; Sadegheih, A.; Mehrjerdi, Y.Z. A new model for the use of renewable electricity to reduce carbon dioxide emissions. Energy 2022, 238, 121602. [Google Scholar] [CrossRef]
- International Renewable Energy Agency (IRENA). Global Renewables Outlook: Energy Transformation 2050—2024 Update; IRENA: Abu Dhabi, United Arab Emirates, 2024. [Google Scholar]
- Un-Noor, F.; Padmanaban, S.; Mihet-Popa, L.; Mollah, M.N.; Hossain, E. A comprehensive study of key electric vehicle (EV) components, technologies, challenges, impacts, and future direction of development. Energies 2017, 10, 1217. [Google Scholar] [CrossRef]
- Bhusal, N.; Abdelmalak, M.; Kamruzzaman, M.; Benidris, M. Power system resilience: Current practices, challenges, and future directions. IEEE Access 2020, 8, 18064–18086. [Google Scholar] [CrossRef]
- California Air Resources Board. California Moves to Accelerate to 100% New Zero-Emission Vehicle Sales by 2035 | California Air Resources Board. 2022. Available online: https://ww2.arb.ca.gov/news/california-moves-accelerate-100-new-zero-emission-vehicle-sales-2035 (accessed on 1st January 2025).
- Lazo, A. California Needs a Million EV Charging Stations—But That’s ‘Unlikely’ and ‘Unrealistic’. CalMatters. 2024. Available online: https://calmatters.org/environment/climate-change/2024/07/california-electric-car-chargers-unrealistic-goals/?gad_source=1&gclid=CjwKCAiA5pq-BhBuEiwAvkzVZUJrupQiLpYA8AgYDnuaJa2zyRSI8pzgpBKgl8HjfTChOM9vtplRehoCgqAQAvD_BwE (accessed on 5 March 2025).
- Peng, Q.; Bakkar, Y.; Wu, L.; Liu, W.; Kou, R.; Liu, K. Transportation resilience under COVID-19 Uncertainty: A traffic severity analysis. Transp. Res. Part A Policy Pract. 2024, 179, 103947. [Google Scholar] [CrossRef]
- Peng, Q.; Liu, W.; Zhang, Y.; Zeng, S.; Graham, B. Generation planning for power companies with hybrid production technologies under multiple renewable energy policies. Renew. Sustain. Energy Rev. 2023, 176, 113209. [Google Scholar] [CrossRef]
- Peng, Q.; Liu, W.; Shi, Y.; Dai, Y.; Yu, K.; Graham, B. Multi-objective electricity generation expansion planning towards renewable energy policy objectives under uncertainties. Renew. Sustain. Energy Rev. 2024, 197, 114406. [Google Scholar] [CrossRef]
- Zhu, T.; Cruden, A.; Peng, Q.; Liu, K. Enabling extreme fast charging. Joule 2023, 7, 2660–2662. [Google Scholar] [CrossRef]
- Ediger, V.Ş.; Akar, S. ARIMA forecasting of primary energy demand by fuel in Turkey. Energy Policy 2007, 35, 1701–1708. [Google Scholar] [CrossRef]
- Somu, N.; MR, G.R.; Ramamritham, K. A deep learning framework for building energy consumption forecast. Renew. Sustain. Energy Rev. 2021, 137, 110591. [Google Scholar] [CrossRef]
- Bedi, J.; Toshniwal, D. Deep learning framework to forecast electricity demand. Appl. Energy 2019, 238, 1312–1326. [Google Scholar] [CrossRef]
- Yi, Z.; Liu, X.C.; Wei, R.; Chen, X.; Dai, J. Electric vehicle charging demand forecasting using deep learning model. J. Intell. Transp. Syst. 2022, 26, 690–703. [Google Scholar] [CrossRef]
- Shahriar, S.; Al-Ali, A.R.; Osman, A.H.; Dhou, S.; Nijim, M. Prediction of EV charging behavior using machine learning. IEEE Access 2021, 9, 111576–111586. [Google Scholar] [CrossRef]
- Shayan, M.E.; Petrollese, M.; Rouhani, S.H.; Mobayen, S.; Zhilenkov, A.; Su, C.L. An innovative two-stage machine learning-based adaptive robust unit commitment strategy for addressing uncertainty in renewable energy systems. Int. J. Electr. Power Energy Syst. 2024, 160, 110087. [Google Scholar] [CrossRef]
- Almughram, O.; Abdullah ben Slama, S.; Zafar, B.A. A reinforcement learning approach for integrating an intelligent home energy management system with a vehicle-to-home unit. Appl. Sci. 2023, 13, 5539. [Google Scholar] [CrossRef]
- Ma, W.; Wu, W.; Ahmed, S.F.; Liu, G. Techno-economic feasibility of utilizing electrical load forecasting in microgrid optimization planning. Sustain. Energy Technol. Assess. 2025, 73, 104135. [Google Scholar] [CrossRef]
- Kim, Y.; Kim, S. Forecasting charging demand of electric vehicles using time-series models. Energies 2021, 14, 1487. [Google Scholar] [CrossRef]
- Li, C.; Dong, Z.; Chen, G.; Zhou, B.; Zhang, J.; Yu, X. Data-driven planning of electric vehicle charging infrastructure: A case study of Sydney, Australia. IEEE Trans. Smart Grid 2021, 12, 3289–3304. [Google Scholar] [CrossRef]
- Buzna, L.; De Falco, P.; Ferruzzi, G.; Khormali, S.; Proto, D.; Refa, N.; Straka, M.; van der Poel, G. An ensemble methodology for hierarchical probabilistic electric vehicle load forecasting at regular charging stations. Appl. Energy 2021, 283, 116337. [Google Scholar] [CrossRef]
- Yaghoubi, E.; Yaghoubi, E.; Khamees, A.; Razmi, D.; Lu, T. A systematic review and meta-analysis of machine learning, deep learning, and ensemble learning approaches in predicting EV charging behavior. Eng. Appl. Artif. Intell. 2024, 135, 108789. [Google Scholar] [CrossRef]
- Zhang, M.; Sun, Q.; Yang, X. Electric vehicle charging load prediction considering multi-source information real-time interaction and user regret psychology. Power Syst. Technol. 2021, 46, 632–641. [Google Scholar]
- Lan, T.; Jermsittiparsert, K.; Alrashood, S.T.; Rezaei, M.; Al-Ghussain, L.; Mohamed, M.A. An advanced machine learning based energy management of renewable microgrids considering hybrid electric vehicles’ charging demand. Energies 2021, 14, 569. [Google Scholar] [CrossRef]
- Ma, T.Y.; Faye, S. Multistep electric vehicle charging station occupancy prediction using hybrid LSTM neural networks. Energy 2022, 244, 123217. [Google Scholar] [CrossRef]
- Lei, M.; Mohammadi, M. Hybrid machine learning based energy policy and management in the renewable-based microgrids considering hybrid electric vehicle charging demand. Int. J. Electr. Power Energy Syst. 2021, 128, 106702. [Google Scholar] [CrossRef]
- Zhang, X.; Chan, K.W.; Li, H.; Wang, H.; Qiu, J.; Wang, G. Deep-learning-based probabilistic forecasting of electric vehicle charging load with a novel queuing model. IEEE Trans. Cybern. 2020, 51, 3157–3170. [Google Scholar] [CrossRef] [PubMed]
- Zamee, M.A.; Han, D.; Cha, H.; Won, D. Self-supervised online learning algorithm for electric vehicle charging station demand and event prediction. J. Energy Storage 2023, 71, 108189. [Google Scholar] [CrossRef]
- Cao, T.; Xu, Y.; Liu, G.; Tao, S.; Tang, W.; Sun, H. Feature-enhanced deep learning method for electric vehicle charging demand probabilistic forecasting of charging station. Appl. Energy 2024, 371, 123751. [Google Scholar] [CrossRef]
- Dong, H.; Hu, Q.; Li, D.; Li, Z.; Song, Z. Predictive battery thermal and energy management for connected and automated electric vehicles. IEEE Trans. Intell. Transp. Syst. 2024, 26, 2144–2156. [Google Scholar] [CrossRef]
- Pan, S.; Zheng, Z.; Guo, Z.; Luo, H. An optimized XGBoost method for predicting reservoir porosity using petrophysical logs. J. Pet. Sci. Eng. 2022, 208, 109520. [Google Scholar] [CrossRef]
- Wang, C.; Deng, C.; Wang, S. Imbalance-XGBoost: Leveraging weighted and focal losses for binary label-imbalanced classification with XGBoost. Pattern Recognit. Lett. 2020, 136, 190–197. [Google Scholar] [CrossRef]
- Nielsen, D. Tree Boosting with Xgboost-Why Does Xgboost Win “Every” Machine Learning Competition? Master’s Thesis, Norwegian University of Science and Technology (NTNU), Trondheim, Norway, 2016. [Google Scholar]
- Touzani, S.; Granderson, J.; Fernandes, S. Gradient boosting machine for modeling the energy consumption of commercial buildings. Energy Build. 2018, 158, 1533–1543. [Google Scholar] [CrossRef]
- Trizoglou, P.; Liu, X.; Lin, Z. Fault detection by an ensemble framework of Extreme Gradient Boosting (XGBoost) in the operation of offshore wind turbines. Renew. Energy 2021, 179, 945–962. [Google Scholar] [CrossRef]
- Chen, T.; Guestrin, C. Xgboost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar]
- Bücker, M.; Szepannek, G.; Gosiewska, A.; Biecek, P. Transparency, auditability, and explainability of machine learning models in credit scoring. J. Oper. Res. Soc. 2022, 73, 70–90. [Google Scholar] [CrossRef]
- Wang, N.; Zhang, H.; Dahal, A.; Cheng, W.; Zhao, M.; Lombardo, L. On the use of explainable AI for susceptibility modeling: Examining the spatial pattern of SHAP values. Geosci. Front. 2024, 15, 101800. [Google Scholar] [CrossRef]
- Covert, I.; Lundberg, S.M.; Lee, S.I. Understanding global feature contributions with additive importance measures. Adv. Neural Inf. Process. Syst. 2020, 33, 17212–17223. [Google Scholar]
- Kim, Y.; Kim, Y. Explainable heat-related mortality with random forest and SHapley Additive exPlanations (SHAP) models. Sustain. Cities Soc. 2022, 79, 103677. [Google Scholar] [CrossRef]
- Lundberg, S.M.; Erion, G.G.; Lee, S.I. Consistent individualized feature attribution for tree ensembles. arXiv 2018, arXiv:1802.03888. [Google Scholar]
- Zhu, Q.; Duan, Y.; Sarkis, J. Supply chain carbon transparency to consumers via blockchain: Does the truth hurt? Int. J. Logist. Manag. 2024, 35, 833–864. [Google Scholar] [CrossRef]
- Wozabal, D.; Graf, C.; Hirschmann, D. The effect of intermittent renewables on the electricity price variance. OR Spectr. 2016, 38, 687–709. [Google Scholar] [CrossRef]
- García-Villalobos, J.; Zamora, I.; San Martín, J.I.; Asensio, F.J.; Aperribay, V. Plug-in electric vehicles in electric distribution networks: A review of smart charging approaches. Renew. Sustain. Energy Rev. 2014, 38, 717–731. [Google Scholar] [CrossRef]
- Schill, W.P.; Zerrahn, A.; Kunz, F. Prosumage of solar electricity: Pros, cons, and the system perspective. Econ. Energy Environ. Policy 2017, 6, 7–32. [Google Scholar] [CrossRef]
- Li, R.; Lee, H. The role of energy prices and economic growth in renewable energy capacity expansion–Evidence from OECD Europe. Renew. Energy 2022, 189, 435–443. [Google Scholar] [CrossRef]
- Muratori, M.; Rizzoni, G. Residential demand response: Dynamic energy management and time-varying electricity pricing. IEEE Trans. Power Syst. 2015, 31, 1108–1117. [Google Scholar] [CrossRef]
- Holland, S.P.; Mansur, E.T.; Muller, N.Z.; Yates, A.J. Are there environmental benefits from driving electric vehicles? The importance of local factors. Am. Econ. Rev. 2016, 106, 3700–3729. [Google Scholar] [CrossRef]
- Lund, H.; Kempton, W. Integration of renewable energy into the transport and electricity sectors through V2G. Energy Policy 2008, 36, 3578–3587. [Google Scholar] [CrossRef]
- Gnann, T.; Plötz, P.; Kühn, A.; Wietschel, M. Modelling market diffusion of electric vehicles with real world driving data—German market and policy options. Transp. Res. Part A Policy Pract. 2015, 77, 95–112. [Google Scholar] [CrossRef]
- Hanni, U.E.; Yamamoto, T.; Nakamura, T. An Analysis of Electric Vehicle Charging Intentions in Japan. Sustainability 2024, 16, 1177. [Google Scholar] [CrossRef]
Variable | Description |
---|---|
EV Charging Demand (kW) | The amount of electricity (in kilowatts) demanded by EV for charging during each hour |
Solar Energy Production (kW) | The amount of electricity (in kilowatts) produced from solar energy sources during each hour |
Wind Energy Production (kW) | The amount of electricity (in kilowatts) produced from wind energy sources during each hour |
Electricity Price ($/kWh) | The price of electricity per kilowatt-hour |
Grid Availability | Indicates whether the grid was available or not during each hour |
Weather Conditions | Describes the weather during each hour, with possible values such as “Clear”, “Cloudy”, “Rainy”, “Sunny”, and “Partly Cloudy” |
Battery Storage (kWh) | The amount of electricity stored in batteries during each hour |
Charging Station Capacity (kW) | The maximum capacity of the charging stations in kilowatts |
EV Charging Efficiency (%) | The efficiency of the EV charging process, expressed as a percentage |
Number of EVs Charging | The number of EV charging during each hour |
Renewable Energy Usage (%) | The percentage of energy used from renewable sources |
Grid Stability Index | An index indicating the stability of the grid, with higher values indicating greater stability |
Carbon Emissions (kgCO2/kWh) | The amount of carbon emissions produced per kilowatt-hour of electricity |
Power Outages (h) | The duration of power outages during each hour |
Energy Savings ($) | The amount of money saved through energy efficiencies during each hour |
Carbon Footprint Reduction (kgCO2) | The reduction in carbon emissions due to renewable energy usage |
Renewable Energy Efficiency | The efficiency of utilizing renewable energy for charging EVs |
Year | The year corresponding to the recorded data |
Month | The month corresponding to the recorded data (1–12) |
Day | The day of the month corresponding to the recorded data (1–31) |
Hour | The hour of the day when the data was recorded (0–23) |
Weekday | The day of the week corresponding to the recorded data (0 = Monday, 6 = Sunday) |
Is_Weekend | A binary indicator (1 = weekend, 0 = weekday) |
Is_Peak_Hour | A binary indicator (1 = peak charging hour, 0 = non-peak hour) |
Electricity Price ($/kWh)_lag_1h | Electricity price (USD/kWh) recorded one hour before the current observation |
Electricity Price ($/kWh)_lag_6h | Electricity price (USD/kWh) recorded six hours before the current observation |
Electricity Price ($/kWh)_lag_24h | Electricity price (USD/kWh) recorded 24 h before the current observation |
Solar Energy Production (kW)_lag_1h | Amount of electricity (kW) produced from solar energy sources one hour before the current observation |
Solar Energy Production (kW)_lag_6h | Amount of electricity (kW) produced from solar energy sources six hours before the current observation |
Solar Energy Production (kW)_lag_24h | Amount of electricity (kW) produced from solar energy sources 24 h before the current observation |
Wind Energy Production (kW)_lag_1h | Amount of electricity (kW) produced from wind energy sources one hour before the current observation. |
Wind Energy Production (kW)_lag_6h | Amount of electricity (kW) produced from wind energy sources six hour before the current observation |
Wind Energy Production (kW)_lag_24h | Amount of electricity (kW) produced from wind energy sources 24 h before the current observation |
Battery Storage (kWh)_lag_1h | Amount of electricity stored in batteries one hour before the current observation |
Battery Storage (kWh)_lag_6h | Amount of electricity stored in batteries six hour before the current observation |
Battery Storage (kWh)_lag_24h | Amount of electricity stored in batteries 24 h before the current observation |
Grid Stability Index_lag_1h | Grid stability index recorded one hour before the current observation |
Grid Stability Index_lag_6h | Grid stability index recorded six hour before the current observation |
Grid Stability Index_lag_24h | Grid stability index recorded 24 h before the current observation |
Renewable Energy Usage (%)_lag_1h | Percentage of energy used from renewable sources one hour before the current observation |
Renewable Energy Usage (%)_lag_6h | Percentage of energy used from renewable sources six hour before the current observation |
Renewable Energy Usage (%)_lag_24h | Percentage of energy used from renewable sources 24 h before the current observation |
Season | The season corresponding to the recorded data (e.g., 1 = Winter, 2 = Spring, 3 = Summer, 4 = Autumn) |
Model | R2 | MAE | RMSE |
---|---|---|---|
Linear regression | 0.5910 | 0.0418 | 0.0554 |
Random forest | 0.9859 | 0.0060 | 0.0103 |
XGBoost | 0.9869 | 0.0062 | 0.0099 |
LightGBM | 0.9847 | 0.0072 | 0.0107 |
CatBoost | 0.9675 | 0.0116 | 0.0156 |
Number | Feature | Interaction Importance |
---|---|---|
1 | Carbon Footprint Reduction (kgCO2) | 0.077598 |
2 | Renewable Energy Usage (%) | 0.064800 |
3 | Carbon Emissions (kgCO2/kWh) | 0.045645 |
4 | Solar Energy Production (kW)_lag_24h | 0.000789 |
5 | Grid Stability Index_lag_6h | 0.000721 |
6 | Electricity Price (USD/kWh)_lag_1h | 0.000706 |
7 | Solar Energy Production (kW)_lag_6h | 0.000705 |
8 | Wind Energy Production (kW)_lag_24h | 0.000688 |
9 | Renewable Energy Usage (%)_lag_24h | 0.000678 |
10 | Electricity Price (USD/kWh)_lag_6h | 0.000666 |
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. |
© 2025 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhang, T.; Peng, Q.; Zeng, S. Predicting EV Charging Demand in Renewable-Energy-Powered Grids Using Explainable Machine Learning. Sustainability 2025, 17, 4158. https://doi.org/10.3390/su17094158
Zhang T, Peng Q, Zeng S. Predicting EV Charging Demand in Renewable-Energy-Powered Grids Using Explainable Machine Learning. Sustainability. 2025; 17(9):4158. https://doi.org/10.3390/su17094158
Chicago/Turabian StyleZhang, Taicheng, Qiao Peng, and Shihong Zeng. 2025. "Predicting EV Charging Demand in Renewable-Energy-Powered Grids Using Explainable Machine Learning" Sustainability 17, no. 9: 4158. https://doi.org/10.3390/su17094158
APA StyleZhang, T., Peng, Q., & Zeng, S. (2025). Predicting EV Charging Demand in Renewable-Energy-Powered Grids Using Explainable Machine Learning. Sustainability, 17(9), 4158. https://doi.org/10.3390/su17094158