Electrical Vehicle Charging Event Classification Using Machine Learning
- 1. Department of Computer Engineering, Jeju National University, Republic of Korea
Abstract
Life on this planet is affected by burning fossil fuels like diesel, CO2, and gasoline, and a clean environment is necessary for survival. In recent years, various studies have been conducted to maintain a clean environment and mitigate pollution’s consequences because a clean environment is crucial for preserving this planet’s natural resources. Research indicates Electrical Vehicles (EVs) are environmentally friendly, emitting less greenhouse gases and air pollution. The increasing demand for EVs and their charging is causing voltage problems in energy supply systems. Smart meters can be used to record the energy usage of appliances like ovens and for charging Electrical vehicles. This study uses the Tabnet, Xtreme Gradient Boosting (XGB), and Random Forest model for the Electrical Vehicle event classification. The experimental results show that the RF model has higher accuracy than the other learning models
Keywords
• Machine learning; EV; Mutual information
Citation
Khan QW (2024) Electrical Vehicle Charging Event Classification Using Machine Learning. Comput Sci Eng 3(1): 1009.
INTRODUCTION
Electric cars (EVs) are becoming increasingly popular, but keeping them charged is a challenge. To make charging stations work better, we need to understand how people use them. Machine learning (like super smart computers) can help us categorize different charging events, like how long they take or why people charge.
A clean environment plays an important role in human and other species’ lives [1]. However, fuel and gas energy consumption in vehicles has introduced the problem of a warm atmosphere, which is dangerous for humans and other living species [2]. The existing studies show that in the last few years, fuel energy consumption has increased by 30%, and that is alarming situation for a clean environment [3]. To keep the environment neat and clean and reduce the chances of heat waves and other problems, it is necessary to reduce the consumption of fuels and gas in vehicles [4]. Therefore, the demand for electric cars is increasing to reduce carbon emissions in the air and keep the environment safe [5]. The increasing demand for Electrical vehicle charging causes an unexpected peak load for the energy distribution network [6]. Keeping track of Electrical vehicles cost-effectively charging at home is difficult [7]. The smart meters are used to record the energy consumption of households [8]. Current methods using Machine learning are pretty good at some things, like predicting how long a typical charge might take. But they still have trouble with things like quick top-ups or considering factors like weather.
This research tackles these challenges by creating a new approach to improve the accuracy of earlier ML models. Machine learning [9] is a sub-field of Artificial intelligence that can be used to learn from data and perform predictions. This study performed the Electrical vehicle charging classification using household total energy consumption intelligent meter readings. This study first analyzes the household total energy consumption dataset and prepares the data set for the Machine learning model to perform the classification. After this, the RF, XGB, and Tabnet model is applied to the selected features, and mutual information is used to select the features .
METHODOLOGY
Figure 1 shows the architecture diagram of a proposed method.
Figure 1: Architecture Diagram of a Proposed Model for electric vehicle charging event classification
This study utilized the publicly available dataset of Electrical vehicle charging events. After this, we selected the features using the mutual information method. The selected features are passed to a Machine-learning model for classifying charging events. A general overview of the proposed method for classifying Electrical vehicle charging events is shown in figure.
Dataset collection
This study utilized the publicly available dataset of Electrical vehicle charging history and charging events. This dataset has 419808 instances and 9 input features. It was collected from Kaggle every minute from January 2018 to October 2018.
Data preprocessing
Data preparation is converting raw data into a clean and useful format, removing duplicates, resolving missing numbers, and deleting inconsistent data. The major goal is to improve data quality so that it is appropriate for analysis and modelling. This stage involves preparing the raw data for use in the Machine learning model. This includes steps like handling missing values and encoding categorical variables.
Label encoding
Label encoding is a way of converting category data into numerical format. Each category is allocated a unique integer value, allowing an algorithm to process the input. This method works effectively for Machine learning models that require numerical input.
Data scaling (Z score)
Z score normalisation is a data scaling technique that transforms data into a mean of zero and a standard deviation of one. This method improves Machine learning algorithm performance by guaranteeing that features with varied units or scales contribute evenly to the model.
Feature selection using the machine information method
This step involves selecting a subset of the most relevant features from the data. Mutual information is a technique used to measure the dependence between two variables. In this case, it is used to identify features that have a strong correlation with the target variable (i.e., the type of charging event).
The mutual information techniquecalculatesthedependencies between each feature and the target variable and assesses how much information about the target variable is gathered from each feature. Features with greater mutual information scores are chosen for the model because they improve prediction accuracy and minimize model complexity [10].
Machine Learning Models
Three possible Machine Learning models that could be used
for classification:
- TabNet: This is a relatively good architecture that has shown good performance in various real world tasks. It is a type of deep neural network that is designed to be efficient and robust to irrelevant features.
- Random Forest: This is a popular ensemble method that combines multiple decision trees to make predictions. It is known for being relatively robust to overfitting and can handle a variety of data types.
- XGBoost: This is another ensemble method that uses gradient boosting to improve the performance of decision trees. It is known for its accuracy and efficiency.
This study classified charging events using the XG, RF, and Tabnet models. The model was validated with the K-fold cross- validation approach.
Xtreme gradient boosting
Xtreme Gradient Boosting (XGB) is a gradient-boosting method that is optimised for performance and speed. XGB builds an ensemble decision tree by sequentially correcting prior models’ faults, making it a reliable choice for predictive modelling tasks [11].
Random forest
Random Forest operates on the ensemble learning concept, building numerous decision trees during the training phase and pooling their output to improve performance accuracy. Averaging the outputs of these trees improves the model’s robustness against noise and variability in the data while reducing overfitting [12].
TabNet
TabNet is a deep learning architecture that is specifically intended for tabular data. It employs sequential attention to choose significant features, allowing for effective learning and interpretation. TabNet’s innovative technique allows for dynamic feature selection, which improves the model’s prediction accuracy and transparency [13].
Evaluation metric
This study uses the recall, accuracy, precision, and f-score metrics for model evaluation.
EXPERIMENTAL RESULTS
Table 1 presents the experimental results of a Machine- learning model for predicting Electrical vehicle charging events without feature selection.
Table 1: Result without mutual information feature selection.
Method |
Accuracy |
Precision |
Recall |
F score |
RF |
0.9981777 |
0.9981733 |
0.998177 |
0.9981749 |
XGB |
0.9978919 |
0.9978875 |
0.9978919 |
0.9978893 |
Tabnet |
0.9904838 |
0.9905316 |
0.9904838 |
0.9905064 |
It shows that the RF model has higher prediction results than the other models, while the Tabnet model has slightly lower prediction results than the RF and XGB models. All three models (Random Forest - RF, XGBoost - XGB, and TabNet) achieved very high accuracy, precision, recall, and F1-score values, indicating strong performance in predicting charging events. The Random Forest model outperformed the others across all metrics, achieving an accuracy of nearly 99.82%. XGBoost performed very similarly to RF, with slightly lower scores. TabNet had the lowest scores but still achieved an accuracy of over 99%, indicating good performance.
Figure 2 presents the accuracy of a Machine-learning model for classifying Electrical vehicle charging events.
Figure 2: Comparison of Graph without feature selection.
The accuracy of each model is presented. This figure shows that all learning models have 99% accuracy without feature selection.
Table 2 presents the experimental results of a machine- learning model for Electrical vehicle charging event classification with mutual information feature selection.
Table 2: Result with mutual information feature selection.
Method |
Accuracy |
Precision |
Recall |
F score |
RF |
0.9977252 |
0.9977231 |
0.9977252 |
0.9977241 |
XGB |
0.9963674 |
0.9963612 |
0.9963674 |
0.9963641 |
Tabnet |
0.9845406 |
0.9851869 |
0.9845406 |
0.9848013 |
The RF model has higher prediction results than the other models. We can see that utilizing mutual information feature selection did not increase the performance; instead, it decreased.
Figure 3 presents the accuracy of a Machine-learning model for Electrical vehicle charging event classification with mutual information feature selection.
Figure 3: Comparison Graph with mutual information feature selection.
The RF and XGB model have almost 99% accuracy, while the Tabnet model has 98% accuracy. Both models achieved an accuracy of 99%, indicating excellent performance in classifying charging events. The study employed mutual information to select the most relevant features from the data. This technique helps focus the models on features that have a strong correlation with the target variable (i.e., the type of charging event).
Model comparison
The experiments compared the models’ performance with and without feature selection. While the results concludes that the RF model consistently outperformed the others. This suggests that the feature selection process benefitted the RF model more than XGBoost or TabNet. TabNet, with its lower accuracy after feature selection, might require further investigation or potentially be better suited for different scenarios where specific features are less important.
CONCLUSION
This study proposed a method for classifying Electrical Vehicle charging events. This study performed the feature selection using the mutual information method. The RF, XGB, and Tabnet models are applied to a selected feature. The experiments are performed with and without the feature selection. The experimental results demonstrate the RF model has higher prediction results than the other method. At the same time, the Tabnet model has lower prediction results. It shows the effectiveness of an RF model for this problem.
LIMITATIONS
Discussing specific privacy-preserving techniques and their potential trade-offs with different model performance would be further considerable .TabNet achieves a slightly lower accuracy after feature selection compared to RF and XGBoost. This requires further investigation.
In the future, we will utilize the Weighted Ensemble model for the classification. Further, we can utilize some privacy- preserving methods to protect data privacy.
REFERENCES
- Uralovich KS, Toshmamatovich TU, Kubayevich KF, Sapaev IB, Saylaubaevna SS, Beknazarova ZF, et al. A primary factor in sustainable development and environmental sustainability is environmental education. Caspian Journal of Environmental Sciences. 2023: 21; 965-975.
- Albrechtowicz P. Electric vehicle impact on the environment in terms of the electric energy source- case study. Energy Reports. 2023; 9: 3813-3821.
- Ahmed M, Shuai C, Ahmed M. Analysis of energy consumption and greenhouse gas emissions trend in China, India, the USA, and Russia. Int J Environ Sci. Technol. 2023; 20: 2683-2698.
- Thalmann HL, Laurel BJ, Almeida LZ, Osborne KE, Marshall K, Miller JA. Marine heatwaves alter the nursery function of coastal habitats for juvenile gulf of alaska pacific cod. Sci Rep. 2024; 14: 14018.
- Alanazi, F. Electric vehicles: Benefits, challenges, and potential solutions for widespread adaptation. Appl Sci. 2023; 13: 6016.
- Williams B, Bishop D, Hooper G, Chase JG. Driving change: Electric vehicle charging behavior and peak loading. Renewable and Sustainable Energy Reviews. 2024; 189: 113953.
- Yousuf AKM, Wang Z, Paranjape R, Tang Y. An in-depth exploration of electric vehicle charging station infrastructure: A comprehensive review of challenges, mitigation approaches, and optimization strategies. IEEE Access. 2024; 12: 51570-51589.
- Wendt C, Kosin, D, Adam, M, Benlian A. Sustainable energy consumption behaviour with smart meters: The role of relative performance and evaluative standards. Information Systems Journal. 2024. 1-29.
- Singh A, Kanaujia A, Singh VK, Vinuesa R. Artificial intelligence for sustainable development goals: Bibliometric patterns and concept evolution trajectories. Sustainable Development. 2024; 32: 724-754.
- Su W, Zhu X, Tao C, Lu L. Towards all-in-one pre-training via maximizing multi-modal mutual information. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2023.
- Pristyanto Y, Mukarabiman Z, Nugraha AF. Extreme gradient boosting algorithm to improve machine learning model performance on multiclass imbalanced dataset. JOIV International Journal on Informatics Visualization. 2023; 7 : 710-715.
- Sun Z, Wang G, Li P, Wang H. An improved random forest based on the classification accuracy and correlation measurement of decision trees. Expert Systems with Applications. 2024; 237: 121549.
- McDonnell K, Murphy F, Sheehan B, Masello L, Castignani G. Deep learning in insurance: Accuracy and model interpretability using TabNet. Expert Systems with Applications. 2023; 217: 119543.