A Comprehensive Simulation of Electric Vehicle (2023)
A Comprehensive Simulation of Electric Vehicle (2023)
Abstract—This study presents an evaluation of predictive due to terrain differences, weather conditions, or traffic
models for electric vehicle (EV) energy consumption in a scenarios makes the case for advanced modeling techniques
simulated environment. Utilizing a synthetic elevation grid in predicting EV energy consumption [7].
and considering variables such as weather conditions and
traffic levels, we implemented the A* algorithm to simulate Air quality, especially in urban locales, has been a grow-
EV routes and calculate energy costs. The generated dataset ing concern, with studies highlighting the significant air
was used to train three regression models: Gradient Boosting, pollution contributions from traffic in city districts near
Random Forest, and Linear Regression. Model performance was major motorways [8]. Electric vehicles, with their zero-
assessed using Mean Squared Error (MSE), Mean Absolute Error
emission capabilities, provide a promising solution to this
(MAE), and the R-squared (R2) score. Results indicated that
the predictive accuracy of the models was limited, with all pressing environmental issue. However, maximizing their
models exhibiting low R2 scores and high MSE and MAE values. potential necessitates efficient energy consumption models
The study highlights the challenges in predicting EV energy that are data-driven and intelligent.
consumption and suggests the need for more complex models Machine learning have shown tremendous promise in
or additional features that can better capture the dynamics of
energy usage in EVs.
various fields of application [9] [10]. In our study, we lever-
age machine learning methodologies, incorporating the A*
I. I NTRODUCTION route planning algorithm, and consider elevation changes,
weather factors, and vehicle-specific parameters. With the
With the onset of the digital age, cities globally have increasing integration of wireless artificial intelligence sys-
been undergoing a transformation towards becoming smart tems in vehicles, understanding how to make cars smarter
urban centers, focusing on integrating information and and more efficient has become imperative [11]. As noted by
technology in a secure manner to manage a city’s assets Bojnordi et al., the generalization ability of neural networks
[1] [2] [3]. A notable dimension of this transformation is can be substantially improved using advanced algorithms,
the rapid adaptation of electric vehicles (EVs), which have presenting an exciting avenue for enhancing our EV energy
become a cornerstone of sustainable urban transportation consumption models [12].
[4]. The primary concerns for EV users are the accurate By analyzing and comparing different models such as
prediction of energy requirements and, consequently, the Gradient Boosting, Random Forest, and Linear Regression,
vehicle’s operational range, especially in the face of various this research aims to discern which model provides the
dynamic factors like terrain elevation, weather, and traffic most accurate prediction under diverse conditions [13].
[5]. The overarching goal is to enhance the existing routing
In today’s routing systems, while traditional models typi- systems for EVs, ensuring drivers make informed decisions,
cally employ shortest path algorithms based on distance or potentially extending the operational range of their vehicles,
time, for electric vehicles, the energy cost is an essential and contributing to the broader vision of smart cities.
component that cannot be overlooked. As illustrated by
Akbarzadeh et al., modern computational models, when II. R ELATED W ORKS
applied in domains like heating-cooling monitoring, can
forecast power consumption with impressive precision, thus In the realm of routing electric commercial vehicles,
enhancing the management of energy in smart homes significant strides have been made to address the twin
[6]. Similarly, the unpredictability of a route’s energy cost challenges of energy consumption prediction and route
optimization amidst uncertainties. This is crucial for en- B. Route Planning Algorithm
hancing the practical deployment and reliability of electric
The route optimization was framed as a search problem
vehicle fleets, particularly in urban logistics.
utilizing the A* algorithm. The heuristic h used to estimate
The advent of the time-dependent Electric Vehicle Rout-
the cost from the current point to the goal was the Man-
ing Problem with Chance-Constraints (EVRP-CC) marks a
hattan distance, given by h(a, b) = |a x − b x | + |a y − b y |, for
substantial advancement in the field. As delineated in [14],
two points a and b. The cost function g for traversing from
the EVRP-CC leverages a probabilistic Bayesian machine
point a to b incorporated the vehicle’s energy consumption
learning framework to forecast energy demands with re-
model.
markable precision. This model stands validated against
actual energy usage data from electric buses in Gothenburg
and corroborated by high-fidelity simulations for Luxem- C. Energy Consumption Model
bourg’s traffic. By incorporating the variability of energy The energy cost E to move an EV from point a to b was
consumption into the routing process, this method demon- calculated as follows:
strates enhanced route reliability and energy efficiency,
marking a significant departure from deterministic models E (a, b) = |e b − e a | × α + T × β − W × γ +C × δ − η + µ × ω
commonly referenced in literature.
Parallel to these developments, the study presented in where α, β, γ, and δ are constants representing the impact
[15] confronts the issue of ’range anxiety’ that impedes of elevation change, temperature, wind, and traffic condi-
the broader acceptance of electric vehicles. A hybrid pre- tions on energy consumption. The term −η accounts for
dictive methodology that synthesizes physical modeling of the vehicle’s battery efficiency, and µ × ω represents the
vehicle components with machine learning is proposed. additional energy cost due to the vehicle’s weight.
This approach, substantiated by high R-squared values on
synthetic and real-world datasets, underscores the method’s D. Simulation
robustness. Furthermore, it explores the efficiency of re-
generative braking systems, thus enriching the accuracy of A set of N travel scenarios was generated by randomly
energy consumption predictions. selecting start and end points within the grid. Each vehicle
Complementing these innovations, [16] introduces the v was characterized by its weight w v and battery efficiency
Two-stage Electric Vehicle Routing Problem (2sEVRP), η v . The simulation computed the energy cost for each
which refines energy consumption estimates by integrat- scenario without a predictive model, resulting in a dataset
ing detailed topography and vehicular speed profiles. This D = {(e a , e b , w v , η v , E (a, b))}, which was used for model
paper details a novel method for calculating energy costs training and validation.
and integrating these into a comprehensive routing strategy,
which is subsequently validated against empirical data E. Model Training and Evaluation
from Gothenburg’s electric buses and simulation models.
Machine learning models were trained to predict the
The 2sEVRP demonstrates a notable leap in precision for
energy consumption based on the features extracted from
both energy and time estimations, thereby ensuring the
the simulation data. The models’ performances were evalu-
feasibility of planned routes and the strategic incorporation
ated using standard regression metrics: Mean Squared Error
of charging stops.
(MSE), Mean Absolute Error (MAE), and the coefficient of
Collectively, these contributions underscore a concerted determination (R 2 ).
effort to refine predictive models and routing algorithms
for electric commercial vehicles, thereby addressing critical
F. Experimental Setup
limitations and setting the stage for more sustainable and
efficient urban freight transportation. The simulation data was partitioned into training (80%)
and testing (20%) sets. A range of regression models were
III. M ETHODOLOGY trained, including Gradient Boosting, Random Forest, and
A. Data Generation Linear Regression. The models’ predictions for the energy
consumption of a predefined route were calculated and
To simulate a realistic environment, a synthetic elevation compared.
model was created. Each point on the grid (i , j ) is assigned
an elevation e i j which is determined by a uniform random
G. Statistical Analysis
distribution U (0, 100). Weather conditions were represented
by two variables: temperature T and wind speed W , where The results of the model evaluations were statistically
T ∼ U (−10, 40) (in degrees Celsius) and W ∼ U (0, 15) (in analyzed and visualized to compare the predictive accuracy
meters per second). Traffic conditions were modeled as a and to identify the most effective model in terms of energy
discrete random variable C such that C ∼ U {0, 1, 2}, indicat- consumption estimation for electric vehicles in a simulated
ing low, medium, and high traffic levels, respectively. environment.
Fig. 1. R2 Score (Coefficient of Determination) comparison across models. Fig. 3. Mean Squared Error (MSE) comparison across models.
E. Discussion