Introduction and context
The use of electric vehicles has greatly increased in recent years. With the European Union voting to end sales of carbon dioxide–emitting cars by 2035 [1], that trend is expected to continue. Due to that trend, however, the transport sector’s electricity consumption increased sixfold between 2018 and 2022 [2]. Its growing energy demand challenges the reliability of the electrical grid. Therefore, there is a need to enhance smart charging, particularly by refining the generation of charging profiles, to optimise energy consumption.
A charging profile dictates the amount of power that will be delivered at different stages of a charging session. Constraint on two levels are considered when generating a charging profile:
- User level: During a session, enough energy has to be delivered to satisfy the user’s needs.
- Infrastructure level: The power delivered during the charging process has to respect local electric constraints and grid-level constraints.
To generate charging profiles, an energy management system (EMS) requires several pieces of information about the session, the user’s energy requirement, and the charging station (e.g., its consumption at a given moment). However, this information is usually not available at the beginning of a session and is thus replaced with placeholder values. To solve this issue, we explored the use of machine learning to predict the necessary data.
The work was focused on two use cases for Machine Learning in electric vehicle charging:
- Predicting user behaviour [3,4,5,10], such as the quantity of energy they will consume during a session and the duration of that session. The goal is to ensure that the user’s needs are met.
- Forecasting the demand on a charging station [6,7,8]. The objective is to know in advance when demand will be higher than usual in order to generate charging profiles that will avoid excessively high consumption peaks.
While the use of machine learning to predict user behaviour and forecast demand has been studied and largely mastered over the years, electric vehicle charging introduces three challenges related to the data used to train machine learning models:
- Data quality: In work with communicating devices, data are often missing or contain anomalies due to malfunctions or communication problems.
- Data quantity: Since the usage of electric vehicles constantly evolves, data tend to quickly become obsolete. In our case, we used data that were at most one year old to train our models. This constraint limited the quantity of data we could use.
- Data diversity: There are not enough different data sources to describe charging stations’ environment. Moreover, external information about the environment or about local or financial context is usually not accessible.
Machine learning work usually comprises three important parts: data preparation, predictive algorithm selection, and model evaluation. To overcome the aforementioned challenges, a lot of effort has gone into data analysis and feature engineering, i.e., defining new variables to further describe the environment.
Focus on the user behavior predictive model
To train a user behaviour predictive model, we used public data on charging sessions from the National Renewable Energy Laboratory [9] in the United States.
Using data gathered from different sources, we built an augmented dataset on charging sessions. To address the problems of anomalous or missing data common in Internet of Things systems, we then completed and filtered the data. Most of our pre-processing work related to feature engineering, i.e., giving the model as much information as possible for each element it would predict.
Next, we used the pre-processed data and a predictive algorithm to train a model.
Finally, we evaluated the model by examining its average error and the added value of each pre-processing step through an ablation study. We plotted and compared the model’s predictions and ground truth in order to analyse the model’s ability to capture complex behaviour (Fig. 1). The whole pipeline is shown in Fig. 2.
FIgure 1 : Session energy charged prediction plot

Figure 2 : User behavior model pipeline

Results and conclusions
Our work proved that machine learning is relevant to predict behavior on charging stations. For the evaluation, a baseline model that uses average value was defined to evaluate the machine learning relevance.
As shown in Table 1, our model for predicting energy charged during a session outperformed the baseline with an average error of 5.5 kWh (for an average consumption of 11 kWh) compared to 7.73 kWh. Moreover, the model predicted session duration with an error of 1.67 h (for sessions lasting on average 10.34 h) whereas the baseline had an error of 5.48 h. Lastly, we can forecast a charging station’s occupancy ratio with an average error of 15% (for an average occupancy of 36%) which is better than the baseline that had an average error of 18%.
Table 1 : Average error (RMSE) obtained with predictive models
ML model
(XGBoost) |
Baseline model
(Moving average) |
|
Energy charged prediction |
5.5 kWh |
7.73 kWh |
Stay duration prediction |
1.67 h |
5.48 h |
Station occupancy prediction |
15 % |
18% |
For future work on using machine learning in electric vehicle charging, stakeholders will need to enhance the data gathering around charging stations by collecting data on, for example, weather, electricity price, and local events [10].
Références :
[1] European Commission : Zero emission vehicles: first ‘Fit for 55′ deal will end the sale of new CO2 emitting cars in Europe by 2035, Ref, last accessed 28/02/2025
[2] European Commission : Final energy consumption in transport – detailed statistics, Ref, last accessed 21/02/2025
[3] Xiong Y., Chu C. -c., Gadh R. and Wang B. : Distributed optimal vehicle grid integration strategy with user behavior prediction, 2017 IEEE Power & Energy Society General Meeting, Chicago, IL, USA (2017) Ref
[4] Chung Y. W;, Khaki B.; Li T;, Chu C. and Gadh R. : Ensemble machine learning-based algorithm for electric vehicle user behavior prediction. Applied Energy, 254, 113732 (2019). Ref
[5] Lee Z. J.; Li T. and Low S. H. : Acn-data: Analysis and applications of an open ev charging dataset. In Proceedings of the tenth ACM international conference on future energy systems (pp. 139-149) (2019). Ref
[6] Ibrahim B.; Rabelo L.; Gutierrez-Franco; E. and Clavijo-Buritica N. : Machine learning for short-term load forecasting in smart grids. Energies, 15(21), 8079 (2022). Ref
[7] Ma T. Y. and Faye S. : Multistep electric vehicle charging station occupancy prediction using hybrid LSTM neural networks. Energy, 244, 123217 (2022). Ref
[8] Tolun Ö. C. ; Zor K. ; Tutsoy O. : A comprehensive benchmark of machine learning-based algorithms for medium-term electric vehicle charging demand prediction. The Journal of Supercomputing (2025). Ref
[9] Neuman C. ; Meintz A. ; Jun M. Workplace Charging Data Collection and Behavior (No. NREL/TP-5400-77515). National Renewable Energy Lab. (NREL), Golden, CO (United States) (2021) Ref
[10] Shahriar S. ; Al-Ali A. R. ; Osman A. H. ; Dhou S. ; Nijim M. : Machine learning approaches for EV charging behavior: A review. IEEE Access, 8, 168980-168993 (2020) Ref