Next Article in Journal
Review of Accuracy Assessment Methods for Current Transformers: Errors, Uncertainties, and Dynamic Performance
Previous Article in Journal
Roughness Modeling Using a Porous Medium Layer in a Tesla Turbine Operating with ORC Fluids
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

State of Charge Prediction for Li-Ion Batteries in EVs for Traffic Microsimulation

by
Maksymilian Mądziel
Faculty of Mechanical Engineering and Aeronautics, Rzeszow University of Technology, 35-959 Rzeszow, Poland
Energies 2025, 18(18), 4992; https://doi.org/10.3390/en18184992
Submission received: 26 August 2025 / Revised: 15 September 2025 / Accepted: 18 September 2025 / Published: 19 September 2025
(This article belongs to the Section E: Electric Vehicles)

Abstract

This study presents a novel, minimalist framework for real-time State of Charge (SOC) prediction in electric vehicles, using only four inputs—vehicle speed, acceleration, road gradient, and ambient temperature—readily available from vehicle sensors or standard microsimulation outputs. An XGBoost model was trained and validated on 87,000 observations collected from real-world vehicle tests spanning a temperature range of –1 °C to 35 °C, achieving an R2 = 0.86, RMSE = 7.21% SOC, MAE = 4.07% SOC, and SMAPE = 3.60%. The trained model was then applied to Vissim and SUMO traffic simulations to generate spatial SOC distributions and evaluate energy-saving interventions. By eliminating the need for expensive current and voltage sensors, this approach enables scalable SOC estimation for both real-world and simulated datasets, supporting energy-aware traffic management and charging infrastructure planning.

1. Introduction

In the face of advancing climate change and increasing air pollution, the world is moving towards an energy transition where electromobility plays a key role [1,2]. The shift from traditional internal combustion engine vehicles to electric vehicles constitutes one of the foundations of the European Union’s strategy [3,4] aimed at reducing greenhouse gas emissions, particularly in the road transportation sector, which accounts for a significant portion of total CO2 emissions in Europe [5,6]. Investments in charging infrastructure, battery technology development, and the integration of electric vehicles with smart power grids are elements of a long-term plan to achieve climate neutrality by 2050 [7,8]. In this context, research on the efficiency and reliability of electric vehicle power systems is growing in importance, along with methods for precisely monitoring their operational parameters, including the State of Charge (SoC) of the battery, which directly impacts the range, safety, and operational planning of electric transportation [9,10].
Electric vehicles (EVs) utilize various battery technologies, each characterized by a unique relationship between SoC and energy performance [11,12]. The most popular lithium-ion cells (Li-Ion), including variants of NMC (Li-NiMnCoO2), LFP (LiFePO4), and LCO (LiCoO2), exhibit different discharge curves, which affects the accuracy of the SoC estimation [13,14]. For example, NMC batteries feature a relatively linear voltage-to-SoC dependence in the 20–80% range, facilitating measurements, while LFP cells have a flat voltage curve, making precise SoC determination difficult without advanced algorithms [15]. Conversely, lithium-titanate (LTO) batteries offer a wide operating temperature range (−30 °C to 60 °C) and high longevity (>20,000 cycles), but lower energy density (~70 Wh/kg) compared to NMC (~250 Wh/kg) [16].
Battery energy performance depends not only on cell chemistry but also on losses related to internal resistance, Joule effect, and thermal management. For example, NMC cells can lose even 15–20% capacity under high charging currents (C-rate > 2C) due to electrode polarization [17]. In the case of lithium-sulfur (Li-S) batteries, despite a high theoretical energy density (~500 Wh/kg), the challenge remains the polysulfide “shuttle effect,” leading to rapid SoC degradation [18]. Meanwhile, developing solid-state battery (SSB) technologies promises improvements in safety and energy density but still requires solutions to challenges related to the electrolyte-electrode interface [19].
State of Charge (SoC), typically expressed as a percentage (range 0–100%), is one of the most important operational parameters of electric vehicles (EVs), reflecting the current battery charge level relative to its maximum capacity [20]. Accurate SoC monitoring is crucial both for drivers (range estimation, route planning) and battery management systems (BMS—Battery Management System), which optimize cell performance and longevity [21,22]. Real-time SoC measurement enables applications such as dynamic route optimization, accounting for energy consumption, identification of optimal charging locations, or integration with smart grids (vehicle-to-grid, V2G) [23,24]. However, precise SoC prediction remains challenging due to the nonlinear properties of Li-ion batteries, such as voltage-load dependency, aging effects, or temperature influence on capacity [25,26].
In addition to SoC, other critical parameters are measured during driving, such as battery temperature (typically ranging from −20 °C to 60 °C), charge/discharge current intensity (C-rate, often from 0.1C to 3C), cell voltage (chemistry-dependent, e.g., 2.5–4.2 V for Li-ion), instantaneous power (kW) or energy consumption per km (kWh/km) [27,28]. These data are essential for assessing battery health (State of Health, SoH), vehicle energy efficiency, and simulating EV fleet behavior under various traffic scenarios [29]. In the context of traffic microsimulation, incorporating these parameters enables realistic modeling of the impact of EVs on road infrastructure, for example, by forecasting energy demand or optimizing charging station locations based on real-world operational data [30,31].
Contemporary research on integrating State of Charge (SoC) prediction with traffic microsimulation systems focuses on addressing key challenges related to modeling the energy consumption of electric vehicles (EVs) under dynamic driving conditions. Physics-based battery models, employing electrochemical equations or simplified equivalent circuit models (ECMs), form the foundation of many solutions [32]. Traditional model-based energy consumption prediction methods, based on rigid parameter assumptions (such as a constant speed of 60 km/h or NEDC cycles), show limited effectiveness in complex and variable real-world driving conditions (DC) [33]. However, with the advancement of the Internet of Vehicles (IoV), it has become possible to acquire real-time data on vehicle movement, environmental conditions, and traffic information [34]. Data-driven methods take advantage of these large-scale datasets of real-world driving data, combined with road, weather, and traffic information, to apply statistical and machine learning algorithms to predict the energy consumption of electric vehicles (EVs) in complex DCs. For example, Qi et al. [35] developed a model using positive (PKE) and negative kinetic energy (NKE) distributions, along with speed data, achieving SMAPEs between 4.97% and 12.55% on selected road segments. Yi et al. [36] proposed a stochastic energy consumption model based on data density estimation, utilizing a two-dimensional grid (average speed and ambient temperature), where accuracy depends on the number of collected samples. Yao [37] refined the LSSP method [38] and developed the LSLPP process for various vehicle models, employing machine learning algorithms. De et al. [39] used a neural network (NN) to predict microscopic driving parameters, followed by multiple linear regression (MLR) for energy consumption forecasting, achieving a mean absolute error (MAE) of 12–14% for average route consumption, while He et al. [40] proposed an energy consumption optimization strategy for EV acceleration based on a reinforcement learning algorithm (DQN). Furthermore, the importance of utilizing real-world driving cycles in EV design and evaluation is emphasized [41], and region- and vehicle-specific driving cycles are constructed to support energy consumption forecasting [42,43].
In the context of practical applications, research by Mądziel emphasizes the importance of including in microsimulations not only the technical parameters of vehicles but also driver behavioral factors and charging infrastructure characteristics [44]. This type of holistic approach enables more realistic modeling of EV fleet utilization scenarios under various operational conditions. At the same time, as noted in recent studies [45], the development of SoC prediction methods for microsimulation purposes also requires an approach that incorporates detailed modeling of energy consumption and SoC under different environmental conditions.
While existing research has explored EV energy consumption in microsimulation environments, significant limitations remain in practical implementation. Current approaches typically require extensive sensor data, focus on single simulation platforms, or estimate energy consumption rather than direct SOC prediction. This study addresses these limitations by developing a minimalist, cross-platform SOC prediction framework that uses only fundamental kinematic variables available in standard microsimulation outputs, enabling practical deployment across diverse urban planning scenarios. A significant shortcoming in existing research is the absence of comprehensive SoC models that use fundamental vehicle kinematics parameters, speed, and acceleration, obtained directly from simulation platforms as primary input. By filling this gap, the study presents an original methodology for constructing SoC models dedicated to two leading transport microsimulation environments: Vissim and SUMO. The proposed approach enables the generation of high-resolution EV energy consumption data during real-time simulations, serving as a key tool to optimize charging infrastructure location in urban areas and the development of traffic management strategies to minimize the energy consumption of electric vehicles.
The final contributions of this work are as follows: first, a minimalist SOC prediction framework was developed using only four readily available inputs—vehicle speed, acceleration, road gradient, and ambient temperature—thereby eliminating the need for expensive current and voltage sensors. Second, the model was implemented and validated in both Vissim and SUMO microsimulation environments and shown to be transferable to real-world vehicle data via GPS/IMU and public weather sources. Third, an XGBoost regression model trained on 87,000 one-second observations achieved R2 = 0.86, RMSE = 7.21% SOC, MAE = 4.07% SOC, and SMAPE = 3.60%. Fourth, application of the SOC model enabled the identification of energy “hotspots” in urban traffic and demonstrated up to 17.2% energy savings under adaptive signal timing and dynamic speed advisory interventions. Finally, the algorithm delivers real-time inference (<50 ms per sample), making it suitable for onboard or fleet-scale deployment in sustainable mobility and charging infrastructure planning.
As the developed model relies solely on fundamental kinematic variables (speed, acceleration), road gradient, and ambient temperature—data that can be obtained both from microsimulation outputs and directly via vehicle sensors (GPS/IMU) and public weather sources—it can be applied equally to real-world driving data for online SOC prediction under operational conditions.

2. Materials and Methods

The study utilized data from two electric vehicles. The first (vehicle 1) is an urban five-door electric car equipped with a single electric motor that delivers 143 HP (107 kW) and a maximum torque of 250 Nm, using a permanent magnet synchronous motor. The powertrain is transmitted to the rear wheels through a single-speed transmission. The vehicle reaches a top speed of 150 km/h, accelerating from 0 to 100 km/h in 11 s. It is powered by a 19 kWh lithium-ion battery that provides a range of up to 122 km in the NEDC cycle with an average energy consumption below 19 kWh/100 km. Full battery charging takes approximately 3 h and 48 min, and the research test data for this vehicle were recorded at a 1 Hz frequency.
The second analyzed vehicle (vehicle 2) was a BMW i3 electric hatchback, with its data sourced from a publicly available repository [46]. This model features a 125 kW motor with a maximum torque of 250 Nm, capable of reaching a top speed of 150 km/h. The acceleration time from 0 to 100 km/h is 7.2 s. The 33 kWh battery provides a range of 245–300 km, with fast charging taking 0.7 h and charging from a single-phase household outlet taking 11 h. The vehicles studied, along with the instrumentation used, are shown in Figure 1. Real-time battery data were collected using the vehicle’s BMS and a HIOKI 3390 power analyzer for accurate measurement of voltage and current. A comparative table of vehicles and the analyzed data derived from them is presented in Table 1.
A key element of the research was the use of traffic microsimulation software to generate input data for the battery state of charge prediction model. The study used Vissim 2025 software, which enables detailed modeling of vehicle traffic, traffic signals, and infrastructure interactions, providing data such as vehicle speed, acceleration, and position. The second software used was SUMO 1.24.0 (Simulation of Urban Mobility)—an open-source urban mobility simulation tool applied for analyzing large traffic scenarios. The simulation input data were obtained from induction loops located in the study area and from local traffic databases covering the Rzeszów region.
Raw trajectory and environmental data exported from Vissim and SUMO were preprocessed in Python using pandas and scikit-learn. First, anomalies and sensor dropouts were removed by discarding observations with zero speed during motion or impossible gradient values (<–10% or >10%). Continuous variables were then clipped to their realistic ranges (speed: 0–125 km/h; acceleration: –5 to +5 m/s2 and normalized using min–max scaling. Interaction terms (speed × acceleration, gradient × speed) were added to capture nonlinear coupling effects. Data were randomly split into training (80%) and test (20%) sets, preserving the ambient temperature distribution.
An XGBoost regressor was configured with a learning rate of 0.1, maximum tree depth of 8500 estimators, subsample ratio of 0.8, and a fixed random seed for reproducibility. Hyperparameter tuning was performed via five-fold cross-validation on the training set, optimizing for RMSE. Model performance was evaluated on the held-out test set by computing R2, RMSE, MAE, and SMAPE, and residuals were inspected for homoscedasticity.
Finally, to measure the real-time inference capability, the trained model was loaded into a Google Colab environment equipped with an Intel Xeon CPU (Santa Clara, CA, USA) and NVIDIA Tesla T4 GPU (Santa Clara, CA, USA), and per-sample prediction latency was averaged over 10,000 runs.
Table 1 summarizes the key specifications of the two representative vehicles used for model development and evaluation. Vehicle 1 is a compact five-door hatchback powered by a 107 kW AC induction motor paired with a 23 kWh (19 kWh usable) lithium-manganese-oxide battery, arranged in an 86 series × 5 parallel cell configuration and actively liquid-cooled. Vehicle 2 is an electric hatchback equipped with a 125 kW permanent-magnet synchronous motor and a 33–42 kWh (27.2–37.9 kWh usable) lithium-nickel-manganese-cobalt battery, comprising 96 prismatic cells in series and cooled via active refrigerant; it also supports 50 kW DC fast-charging. Both vehicles operate at nominal pack voltages of 318 V and 355 V, respectively, and record data at a 1 Hz frequency. The table further highlights performance metrics—such as 0–100 km/h acceleration, top speed, and energy consumption under EPA and NEDC cycles—alongside the total number of data points collected (15,000 for Vehicle 1 and 72,000 for Vehicle 2).
The main objective of the study was to develop a model predicting the battery state of charge based on traffic microsimulation data. Key explanatory variables were selected, available in most simulation tools, and significant from the perspective of energy efficiency of electric vehicles: instantaneous speed, acceleration, road gradient, and ambient temperature. The model was implemented in Python using the Google Colab environment, which provided access to cloud computing power, including GPU computation support [47]. The applied approach enables model utilization in various traffic scenarios, which can support charging infrastructure planning and optimization of electric fleet management in urban logistics. The research methodology scheme is presented in Figure 2.
The workflow is presented in Figure 2 and begins with the identification and extraction of compatible input data from Vissim and SUMO microsimulation models, ensuring their integration and subsequent use in State of Charge (SOC) modeling. Due to data availability and completeness, instantaneous vehicle speed and acceleration were selected as fundamental explanatory variables, supplemented by environmental parameters—road gradient and ambient temperature—whose significant impact on electric vehicle energy balance has been confirmed in the literature [48,49]. Empirical verification was conducted through a series of road tests comprising several dozen trials throughout different seasons, capturing seasonal variations in weather conditions. This approach is essential due to the substantial influence of ambient temperature on battery efficiency and vehicle thermal systems, which directly affects the range of electric vehicles. In addition, precise geolocation coordinates were obtained for each simulated vehicle, enabling the subsequent generation of spatial SOC maps. The collected real-world data underwent multi-stage preprocessing, including anomaly and measurement error filtering, value range normalization, feature transformation accounting for parameter interactions, and data distribution balancing relative to environmental conditions. This processed dataset served as training material for the XGBoost model, whose architecture was selected for its regression efficiency and resistance to overfitting. The model validation process included the evaluation of quality metrics such as the coefficient of determination R2 and the root mean square error (RMSE), the diagnostic analysis of residual scatter plots, and the cross-validation incorporating different driving profiles. The trained model enabled accurate SOC calculations for any input data encompassing speed, acceleration, road gradient, and ambient temperature, forming the basis for dynamic SOC distribution maps and simulations of various factors’ impact on energy consumption in electric vehicles.
For the SUMO simulation of urban traffic in Rzeszów, vehicle battery voltage and current were also taken into account when calculating energy consumption. To quantify fleet-level energy savings enabled by SOC-driven optimizations, two simulation scenarios were compared. In the baseline scenario, the SOC model was applied to raw Vissim/SUMO outputs over a 24-hour urban simulation, with instantaneous SOC values aggregated at 1 Hz for all vehicles to compute total energy consumed, Ebased. In the optimized scenario, SOC “hotspots” were first identified through initial runs, and two model-driven interventions were implemented: adaptive traffic signal timing to smooth acceleration and deceleration cycles, and dynamic speed advisories limiting maximum speed to locally optimal values. The SOC model was then re-run under these interventions to compute total energy consumed, Eopt. The percentage reduction in energy losses, Δ%, was calculated as follows:
Δ % = E b a s e E o p t   E b a s e × 100 %

3. Results

To develop a predictive model for the State of Charge (SoC) of an electric vehicle (EV), acquiring data covering a wide spectrum of weather conditions was crucial. Therefore, the data used for model construction were collected from trips recorded throughout the entire year, encompassing both the winter period, with temperatures around 0 °C, and the summer period, with temperatures reaching up to 34 °C. Subsequent chapters of this study provide a detailed description of the methodology for filtering and processing the data, as well as the process of using them to create an SoC model employing the XGBoost algorithm. The validation of the developed model and its application for State of Charge prediction in two popular road traffic microsimulation environments—Vissim and SUMO—are then presented.

3.1. Characteristics of the Input Data

The dataset comprises four main variables: vehicle velocity, acceleration, elevation gradient, and ambient temperature. The analysis of their relationships with the SoC is presented in Figure 3, which provides insight into the dependencies between these variables and the state of charge of the battery.
The density plot showing the elevation gradient-SoC relationship (upper left corner) reveals that the highest concentration of observations occurs near zero road gradient values and within the 65% to 80% SoC range. This indicates that vehicles primarily operated on flat terrain. The velocity-SoC plot (upper right corner) shows that most data points cluster in the low to moderate speed range (0–60 km/h), typical for urban environments. The SoC under these conditions also predominantly falls within the 60–80% range, suggesting moderate energy consumption in such traffic conditions. Literature has demonstrated that low to moderate speeds are more favorable from the perspective of EV energy efficiency [50]. Regarding acceleration (lower left corner), the highest data concentration appears around zero, indicating a predominant state of constant speed driving. The SoC at these values also clusters in the higher range, potentially suggesting lower energy consumption during steady driving, consistent with previous research on EV energy consumption characteristics [51]. The most complex plot illustrates the ambient temperature-SoC relationship (middle right plot), with additional velocity color-coding. A general trend of increasing SoC with rising temperature is visible (marked by the red regression line), potentially resulting from reduced energy demand for vehicle heating or higher battery efficiency in warmer conditions, as indicated in studies like [49]. Additionally, velocity appears lower at lower temperatures, which may also contribute to reduced energy consumption. The final plot (middle bottom) presents the SoC distribution across temperature ranges in a boxplot format. The lowest SoC values occur in the lowest temperature ranges, confirming the negative impact of cold temperatures on electric vehicle energy performance and consumption. In higher temperature ranges, the median SoC shifts upward, and the distribution becomes more symmetrical and compact, indicating more stable and favorable energy conditions for EVs. In summary, the input data analysis demonstrates strong relationships between SoC and both environmental factors and vehicle operational parameters. Understanding these relationships is crucial for developing a reliable SoC prediction model in microscopic traffic simulations.
Figure 4 presents a detailed characterization of the distributions of the input variables and their relationships with the State of Charge of the battery (SoC). This exploratory data analysis allows for a better understanding of the structure and variability range of features that will subsequently be used in building the predictive model. The plot in the upper left corner shows the SoC distribution, which exhibits a clearly skewed shape shifted toward higher values. Most observations cluster in the 60–80% range, suggesting vehicles typically did not operate at extremely low charge levels. This aligns with lithium-ion battery management best practices that recommend avoiding deep discharge to enhance battery longevity [52]. The upper right histogram displays the vehicle velocity distribution. Low speeds (below 10 km/h) dominate, likely indicating frequent stops or urban driving in heavy traffic conditions. Nevertheless, the distribution also covers a wide speed range up to approximately 140 km/h, reflecting diverse driving scenarios—from urban to highway conditions. The left middle panel shows the longitudinal acceleration distribution, characterized by strong concentration around zero with symmetrical tails. This indicates driving primarily occurred at constant speed or with gradual speed changes, typical of a balanced driving style. Extreme positive and negative values appear much less frequently, possibly due to limited acceleration or emergency braking situations. The adjacent plot (middle right) illustrates road elevation gradient distribution. The distribution resembles a normal shape centered around 0%, indicating dominance of routes with minimal incline or flat terrain. This is significant as the gradient directly affects electric vehicle energy consumption—steeper climbs generate higher energy demand [53]. The bottom center histogram presents the ambient temperature distribution. The measurement range spans from approximately −1 °C to 35 °C, with most samples falling between 0 and 10 °C and 25–30 °C ranges. These data come from different temperature seasons, enhancing the predictive model’s generalizability. Lower temperatures are particularly important as they negatively impact battery capacity and efficiency [54].

3.2. Create a State of Charge Model for Microsimulation of Vehicle Traffic

To identify the most effective computational approach for predicting the state of charge (SOC) in electric vehicle batteries, a comparison was conducted among several models differing in complexity and methodology. Models ranged from straightforward linear regression to more sophisticated ensemble methods such as Random Forest and XGBoost. This comparison enables the selection of the optimal technique balancing predictive accuracy and computational efficiency. Table 2 summarizes the key performance metrics for each model, including root mean squared error (RMSE), coefficient of determination (R2), mean absolute error (MAE), and symmetric mean absolute percentage error (SMAPE), providing a comprehensive overview of their relative effectiveness. Further analysis of these results informed the choice of the best-performing model and guided subsequent modeling decisions.
Based on the comparative analysis presented in Table 2, the XGBoost model demonstrated the best overall performance across key metrics such as RMSE, R2, MAE, and SMAPE. Consequently, XGBoost was selected as the preferred computational technique for subsequent SOC modeling. To better reflect real-world driving conditions and driver variability, a modified implementation was developed using a custom RandomizedDrivingXGB class that extends the standard XGBRegressor. This modification introduces stochasticity by adding Gaussian noise proportional to driving style variability, ensuring realistic diversity in predicted SOC values. The model was trained with typical hyperparameters (learning rate of 0.1, max depth of 8) and controlled for reproducibility by setting a fixed random seed. This approach allows the model to simulate a range of driver behaviors while maintaining physically plausible predictions constrained between 0% and 100% SOC through clipping.
As part of the development of a predictive model for battery state of charge (SOC) using microsimulation data, a detailed validation of the quality of the model was conducted. The model, based on the XGBoost algorithm—known for its high effectiveness in regression tasks and its resistance to overfitting [55]—was subjected to a comprehensive analysis.
Figure 5, which presents a scatter plot of actual versus predicted values, showed a very high fit (R2 = 0.86), that is, 86% of the variability in the real data was explained by the model. The RMSE value of 7.213 indicates a relatively low average prediction error, which is particularly satisfactory given the SOC range from approximately 10% to 90%. The regression line analysis (y = 0.76x + 15.65) suggests only a slight underestimation of SOC at higher actual values. The point distribution in the plot indicates an even spread of errors across the entire data range, with slightly larger deviations observed at the extremes (below 30% and above 80%). Residual analysis—i.e., the differences between actual and predicted values—revealed an average residual of 0.08 with a standard deviation of 7.21, indicating overall model impartiality and no strong systematic bias. The residuals were well balanced around the zero axis, with no clear tendency to over- or under-predict SOC. As in the case of the prediction plot, larger errors occurred at very low or very high prediction values, which is typical for regression models trained on asymmetric data. The results confirm the high accuracy of the developed predictive model. The model effectively reproduces the actual battery charge state in electric vehicles based on key microsimulation parameters such as speed, acceleration, road gradient, and external temperature. The observed higher deviations at extreme values suggest the potential for further improvement in model accuracy by enriching the training dataset with more edge-case samples. These results are of practical importance for applications such as charging infrastructure planning and optimization of electric vehicle fleet management. Additional performance metrics further support these findings: the Mean Absolute Error (MAE) is 4.07, indicating a low average absolute deviation between predicted and actual SOC values, and the Symmetric Mean Absolute Percentage Error (SMAPE) of 3.60% demonstrates the robust proportional accuracy of the model across the dataset.

3.3. Using the SOC Model for Vissim Software

Vissim software is one of the most widely used tools for microscopic traffic modeling, with broad applications in scientific research, transportation planning, and the development of mobility strategies by infrastructure management institutions [56]. Its main advantage lies in the ability to precisely replicate the geometry of intersections, streets, and other elements of the road network, as well as to simulate the detailed behavior of individual traffic participants [57,58]. In addition to its advanced modeling capabilities, Vissim offers extensive analytical tools, including the generation of output files in .fzp format, which can be used for further calculations and simulations.
In the context of predicting the state of charge (SOC) of electric vehicle batteries, the proper configuration of data export parameters is of key importance. In the presented study, the recording frequency was reduced from the default value of 10 Hz to 1 Hz, allowing a reduction in data volume while maintaining sufficient accuracy for energy analyses. Based on Vissim data exported from Vissim—such as speed, acceleration, vehicle location, and road gradient—it was possible to calculate SOC for individual vehicles in the simulation. The example results of using the SOC model for the data generated from a roundabout traversal in Vissim are presented in Figure 6. The SOC model data are presented as averaged values for a certain group of vehicles in hexabins.
The second of the scenarios examined for the potential application of the state of charge (SOC) model developed for electric vehicle batteries (EVs) is illustrated in Figure 7. In this case, the model focused on simulating a drive along a high-speed road segment, where the speed limit was set to 130 km/h. The adopted configuration assumed the presence of four traffic lanes in one direction (from east to west), forming a perfectly straight section with a length of 50 km. Additionally, to increase the realism of the simulation, the model incorporates a random element related to the driving style of individual drivers, which translates into unique electric energy consumption patterns and, consequently, into varying SOC curves and rates of battery degradation. The primary goal of this simulation was to demonstrate the key capabilities of the model in precisely calculating dynamically changing SOC and simulating degradation of battery performance under conditions of prolonged high-speed driving. Such analyses are absolutely essential and form the foundation for effective planning of EV charging station deployment strategies, particularly in the context of expressway and highway infrastructure. On these types of routes, electric vehicles experience the highest energy demand during operation. The source of this significantly increased energy demand lies in a unique combination of factors characteristic of high speed travel: most notably, high driving speeds that drastically increase power demand, combined with minimal kinetic energy recovery (regeneration) due to the very rare need for braking on straight highway segments with smooth traffic flow, and the dominant aerodynamic drag, which becomes the main component of rolling resistance at high speeds and whose magnitude increases significantly with vehicle speed. In summary, this highway scenario, which also accounts for the variability of human behavior behind the wheel, is fundamentally important for the practical implementation of the SOC model, directly affecting the precision of charging network planning in locations where EV energy demands are highest and most critical to vehicle range.
Based on the analysis of Figure 7, key aspects of the simulation can be observed: the initial state of charge (SOC) value at the beginning of the route and the final SOC value after covering 50 km, along with the dynamic color gradient change along the road segment, which reflects, according to the adopted scale, the gradual decrease in battery energy. The simulation assumed that each vehicle began the drive with an individually randomized initial SOC value, typically within approximately 80% of the battery capacity. Additionally, to reflect real-world conditions, each simulated driver was assigned a random driving dynamics profile, including variable accelerations and responses to road conditions. This intentionally introduced randomness in driving style directly translated into diverse electric energy consumption patterns, resulting in the observed variation in battery discharge curves and the wide spread of final SOC values after completing the analyzed high-speed road segment. The color gradient in the visualization clearly illustrates how individual driving behaviors—alongside constant factors such as speed or aerodynamic drag—generate significant differences in the rate of SOC decline among individual vehicles.

3.4. Using the SOC Model for the SUMO Software

In the next stage of the study, open-source software SUMO (Simulation of Urban MObility) was used to perform a detailed microscopic traffic simulation. The choice of SUMO as an alternative to commercial Vissim software was driven by its unique advantages in the context of urban mobility planning, particularly its significantly greater flexibility in integration with open geospatial data sources [59]. Although Vissim offers advanced visual modeling capabilities and detailed calibration of traffic parameters, SUMO stands out for its efficiency in handling large networks and its ability to quickly generate road models directly from OpenStreetMap (OSM) data [60]. The latter feature is crucial for rapid prototyping and analysis based on real street layouts. The schematic diagram (Figure 8) illustrates the data flow between the two microsimulation platforms—Vissim and SUMO—and the Machine Learning (ML) model developed for state-of-charge (SOC) prediction. Both Vissim and SUMO generate detailed vehicle trajectories and behavioral data based on their respective traffic models and simulation frameworks. These data streams are extracted and fed into the ML model, which processes the information to predict battery SOC dynamics in real time. The arrows depict the flow of input data and output predictions, ensuring synchronization between traffic microsimulations and battery state estimation. This integrated architecture supports a comprehensive analysis of electric vehicle behavior under varying traffic and driving conditions, leveraging the strengths of both simulation platforms and advanced predictive modeling techniques.
The process of preparing a model in SUMO begins with downloading spatial data for the area of interest from the OpenStreetMap portal. The user zooms in, selects the appropriate section of the map, and then exports it to a file in .osm format. To transform this raw OSM file into a functional road network for SUMO, preliminary processing is required. This is usually performed using a dedicated tool such as Java OpenStreetMap Editor (JOSM version 19439), which serves to verify and, if necessary, correct the basic topology.
A key step in the conversion process involves running a series of dedicated command-line tools provided with SUMO (e.g., netconvert, polyconvert). This process transforms the .osm file (or the one exported from JOSM) into SUMO network files with the .net.xml extension, which contain a full definition of the road network: roadway geometry, traffic lanes, intersections with priorities, and the location of traffic lights. In subsequent steps, additional files (.rou.xml, .add.xml) are prepared, which define:
  • Traffic volume and characteristics of vehicle flows on individual arteries.
  • Traffic light programs (if required, beyond the OSM data).
  • Other elements of the infrastructure (e.g., bus stops, detectors).
Only with this complete set of files (.net.xml, .rou.xml, .add.xml) is the actual traffic simulation run in SUMO. The result is an output file (.fcd.xml or .xml), containing detailed trajectory data for each simulated vehicle (position, speed, acceleration, identifier) at successive time steps. To enable scalable and structured analysis of microsimulation data generated by the Simulation of Urban MObility (SUMO) framework, raw XML output files—specifically tripinfo and fcd—are converted into well-structured tabular formats. This conversion is accomplished using Python’s XML parsing capabilities in combination with the BeautifulSoup and Pandas libraries [61,62]. The proposed implementation supports efficient iterative parsing of large SUMO output files, ensuring memory-efficient processing while maintaining all original attribute information. The parser is designed to handle both vehicle-level trajectory data (fcd) and aggregated trip statistics (tripinfo), automatically inferring appropriate data types and aligning timestamps as needed. The resulting DataFrame structures facilitate direct integration with Python’s data analysis ecosystem, enabling time-series analysis, visualization, and further statistical processing. Algorithm 1 presents the complete procedure for converting SUMO XML outputs into CSV files suitable for downstream analysis. The implementation includes robust exception handling for malformed XML content and provides consistent output formatting for reproducibility.
Algorithm 1. Code showing the change of format of the file generated from SUMO to csv for further analysis
import pandas as pd
from bs4 import BeautifulSoup
from tqdm import tqdm
import logging

def parse_sumo_xml(file_path: str, xml_type: str) -> pd.DataFrame:
  “““
  Converts SUMO simulation outputs to structured DataFrames with robust error handling.
  Supports both trip statistics (tripinfo) and vehicle trajectories (fcd).
  
  Args:
     file_path: Path to SUMO XML output file
     xml_type: ‘tripinfo’ for aggregate metrics or ‘fcd’ for positional data
  
  Returns:
     DataFrame with preserved attributes and inferred data types
  “““
  try:
     records = []
     
     with open(file_path, ‘r’, encoding=‘utf-8’) as file:
        print(f”Processing {xml_type.upper()} data: {file_path}”)
        
        # Configure parser for large file handling
        parser = BeautifulSoup(file, ‘xml-xml’)
        target_tags = [‘timestep’, ‘tripinfo’] if xml_type == ‘fcd’ else [‘tripinfo’]
        
        for element in tqdm(parser.find_all(target_tags),
                desc=f”Converting {xml_type}”):
           
           if xml_type == ‘tripinfo’:
              records.append(element.attrs)
              
           elif xml_type == ‘fcd’:
              time_val = float(element[‘time’])
              for vehicle in element.find_all(‘vehicle’):
                 record = vehicle.attrs.copy()
                 record[‘timestep’] = time_val # Standardized column name
                 records.append(record)
     
     df = pd.DataFrame(records).infer_objects() # Automatic type conversion
     print(f”Extracted {len(df):,} records with {len(df.columns)} attributes”)
     return df
  except Exception as error:
     logging.error(f”XML processing failure: {error}”, exc_info=True)
     return pd.DataFrame()

if __name__ == “__main__”:
  # Configuration parameters
  INPUT_MAPPING = {
     ‘tripinfo’: ‘tripinfo.xml’,
     ‘fcd’: ‘fcd_output.xml’
  }
  
  # Process all simulation outputs
  output_dfs = {}
  for data_type, input_file in INPUT_MAPPING.items():
     output_dfs[data_type] = parse_sumo_xml(input_file, data_type)
  
  # Export results
  output_dfs[‘tripinfo’].to_csv(‘trip_metrics.csv’, index=False, float_format=‘%.3f’)
  output_dfs[‘fcd’].to_csv(‘vehicle_positions.csv’, index=False, float_format=‘%.3f’)
  
  print(“Conversion complete. CSVs available for analysis.”)
These traffic data constitute the fundamental input for the developed SOC model. Based on these results, for each individual vehicle participating in the SUMO simulation, the dynamic state of charge (SOC) of its battery is calculated along the entire traveled route. These results then enable the generation of detailed SOC maps, which illustrate the distribution of energy across the road network and analyze how traffic conditions affect the range of electric vehicles. An illustrative diagram of the entire described procedure is presented in Figure 9.
In all simulations conducted, including the urban scenario discussed above, the fundamental assumption was made that 100% of the vehicles participating in traffic are fully electric vehicles (BEVs). Based on detailed output data from the simulation—including instantaneous speed, acceleration, road gradient, and precise geographic coordinates of each vehicle at successive time steps—a comprehensive map of state of charge (SOC) was generated.
This map, presented in Figure 10, serves two key analytical purposes:
  • Identify areas of highest traffic energy consumption: visualizes locations within the urban network studied where the most intensive electric energy usage by vehicles occurs. These are “energy “hotspots,” often associated with frequent braking and acceleration, steep inclines, or congestion.
  • It presents averaged SOC values: For each road segment or area (e.g., a grid cell), the map shows the average instantaneous SOC value of all electric vehicles passing through that segment at a given moment in the simulation. All vehicles entering the model are assumed to start with an SOC of around 80%, along with differences in the simulated drivers’ driving styles.
The map of state of charge (SOC) presented in Figure 10 visualizes the simulation results for a section of the road network in the center of Rzeszów, a city located in southeastern Poland. This map, based on the spatial aggregation of microsimulation traffic data, serves two key analytical functions: it identifies areas of critical energy consumption by electric vehicles (EVs) and presents the spatial distribution of averaged SOC values within the road network. The visual layer clearly highlights locations with the highest accumulation of energy load, further emphasized by a density background that graphically marks intersections with the highest traffic volumes in the urban area analyzed. In the simulation scenario adopted, it was assumed that the vast majority of vehicles begin their trip with a high initial SOC (close to 80%), reflecting the typical behavior of residents commuting in the morning to work, school, or other destinations from various parts of the city. It is worth noting that the model also enables consideration of additional scenarios, such as the potential presence of transit vehicles with varying initial SOCs passing through the city, which would allow for a more comprehensive analysis of infrastructure needs. Such advanced spatial SOC analyses have fundamental practical importance for urban mobility planning and the development of charging infrastructure. They primarily allow for precise identification of the most energy-intensive road segments and areas (e.g., main transport hubs, arterial roads, service centers), where the installation of new charging stations would provide the greatest benefit. They also provide valuable input data for smart charging systems, enabling more efficient management of grid load and optimization of charger availability. Moreover, the model serves as a tool for evaluating the impact of various traffic control strategies (such as public transport priority, traffic signal adjustments, or clean transport zones) on EV fleet energy consumption and the distribution of SOC values, which is crucial for designing solutions to improve energy efficiency in transportation. Finally, these results form a solid foundation for long-term planning of charging infrastructure expansion and modernization in the city, taking into account the dynamically changing needs of electric vehicle users.

4. Discussion

The choice of an appropriate traffic microsimulation tool is crucial for accurately modeling electric vehicle (EV) behavior, including the prediction of state of charge (SoC) and energy consumption. This study compared two leading simulation environments—SUMO (Simulation of Urban MObility) and VISSIM—which offer different capabilities for the simulation of EVs. As an open-source simulator, SUMO is distinguished by its modular architecture, allowing the implementation of custom energy consumption models via the TraCI interface, which enables precise representation of how traffic parameters affect SoC. In addition, integration with libraries such as BatterySim makes it possible to account for the characteristics of various battery types. The low computational complexity of SUMO allows the simulation of large-scale road networks, although it has limitations, such as the lack of an advanced built-in energy model and a simplified representation of vehicle dynamics. VISSIM, on the other hand, as a commercial solution, offers built-in models of driver behavior based on psychophysical modeling. Despite its advantages, VISSIM is characterized by a closed architecture that makes model modification difficult and by high computational requirements, which limit its use in very large-scale road network simulations. The choice between these tools should be driven by specific research needs, balancing flexibility and functional sophistication. This study presents the potential applications of these tools in the context of energy analysis of electric vehicles. For the SUMO simulation of urban traffic in Rzeszów, and in accordance with the detailed energy consumption calculation methodology described in the Materials and Methods section, the baseline scenario indicated a total fleet energy consumption of 1250 kWh over a 24-hour simulation and 10,000 km of driving, based on one-second SOC measurements. After applying the SOC-driven optimizations—specifically, adaptive signal-timing adjustments at identified SOC hotspots and dynamic speed advisories limiting maximum speed—the optimized scenario reduced total energy consumption to between 1035 kWh and 1060 kWh. These interventions achieved energy savings of 15.2% for signal-timing adjustments alone, 15.6% for speed advisories alone, and up to 17.2% when both measures were combined. These quantitative findings demonstrate the practical effectiveness of SOC-based traffic management strategies for improving electric vehicle fleet efficiency in urban mobility planning.
Based on the systematic review of the literature presented by Xiong et al. [63], SOC estimation techniques have evolved from basic electrochemical methods to complex hybrid systems. However, none of them offer a universal solution yet due to trade-offs between accuracy, computational complexity, and robustness under varying operating conditions. For example, the classical Coulomb count method, despite its simplicity, is highly susceptible to error accumulation and zero drift [64], while the more advanced open-circuit voltage (OCV) approach requires a long stabilization period, making it unsuitable for real-time applications [65]. In contrast, methods based on RC (ECM) models provide a better dynamic battery representation but are sensitive to aging and temperature fluctuations [66].
Among numerical methods, Kalman filtering algorithms (including EKF) deserve particular attention, as they handle measurement uncertainty well. However, their computational complexity and sensitivity to incorrect initialization hinder their implementation in embedded systems [67]. An alternative is machine learning models—such as neural networks or support vector machines (SVMs)—which can capture the nonlinear nature of electrochemical phenomena without requiring an explicit physical model [68], although their effectiveness is highly dependent on the availability of large training datasets and computational resources [69].
The research gap analysis highlights three main challenges: lack of robustness to temperature variation, lack of cell degradation modeling, and low compatibility with embedded systems [63]. For example, Barré et al. showed that most studies test algorithms at room temperature, ignoring the impact of real-world conditions (from −20 °C to 50 °C) [70], and only a small fraction of studies integrate aging mechanisms into SOC models [71]. Furthermore, as Feng et al. note, ML-based methods often exceed the computational capabilities of typical onboard controllers [69].
Recent research and automotive guidelines consistently emphasize that maintaining a battery state-of-charge within the 20–80% range is generally optimal for preserving cell longevity and minimizing degradation in most types of lithium-ion batteries [72,73]. Operating within this window reduces voltage and thermal stress on internal battery components, helping to protect electrode integrity and maintain usable capacity over time. Most EV manufacturers—including Ford, BMW, Tesla, and Volkswagen—advise drivers to use 80% as a daily charging limit and only charge to 100% occasionally, such as before long trips or in extreme weather conditions where a full range is essential. However, it should be noted that some modern batteries (for example, lithium iron phosphate cells or LFP) may tolerate full charges better and, in these cases, even regular charging to 100% is sometimes recommended by the manufacturer [74,75]. Ultimately, optimal charging habits—whether staying within the 20–80% range or following more frequent full charges—depend on battery chemistry, usage pattern, and vehicle-specific battery management systems. In this study, most operational data fall within the commonly recommended SoC window, but future work should further explore how manufacturer guidance and chemistry-specific protocols influence long-term battery performance. It should also be noted that the battery simulations and SOC modeling in this study were conducted primarily under relatively favorable road gradient conditions, reflecting the gentle elevation profiles common in the urban test area. While this is representative of typical daily urban driving, it limits the extent to which the results account for higher gradients and more demanding terrains that can significantly affect battery performance due to increased power demands during ascents and regeneration during descents. Studies have shown that gradients as low as 3% can increase energy consumption by 50% or more, and steep slopes can substantially influence state of charge variability and battery aging processes [76,77]. Therefore, further empirical testing and simulation incorporating a broader range of slope conditions is necessary to fully assess battery performance and SOC prediction accuracy under varied geographical contexts. It is also worth noting that in the case of lithium iron phosphate (LFP) batteries, the voltage curve remains relatively flat over a broad range of state-of-charge values, which makes accurate estimation of SoC and SoH challenging without periodic calibration cycles [78]. Such calibration typically involves deep discharges to low SoC levels—often below 10%—followed by full recharges to 100% without interruption. This process enables the Battery Management System to rebalance individual cell voltages and recalibrate capacity measurements [79]. Although the batteries analyzed in this study were not of LFP chemistry, these characteristics are crucial considerations for models aiming to predict SOC in LFP-equipped electric vehicles. Incorporating the effects of calibration cycles and their impact on SoC accuracy and battery aging could improve the robustness and applicability of the modeling framework. Future research should investigate these phenomena to extend the methodology to cover diverse battery chemistries and real-world operating conditions.
In light of the above, the approach presented in this study—based on the XGBoost model and traffic microsimulation data—addresses the limitations mentioned above. Instead of relying on current measurements, it uses kinematic parameters (speed, acceleration), which reduce sensor-related errors [80], enable testing under realistic road conditions through integration with VISSIM/SUMO, and provide real-time results (<50 ms), making it potentially implementable in onboard systems. It is also worth noting the growing importance of using various machine learning techniques to predict a wide range of vehicle operational parameters [81,82,83,84]. However, open challenges remain in the validation under extreme conditions and for cells with varying degrees of degradation, which, according to the recommendations of Xiong et al. [63], should be a priority for future research. In terms of computational demands, the XGBoost model demonstrated efficient inference performance, with an average prediction time of approximately 29 microseconds per sample when tested on 17,206 instances. The testing was performed on an Intel Xeon CPU at 2.00 GHz with access to an NVIDIA Tesla T4 GPU, confirming that the model can generate predictions rapidly under typical hardware configurations. Although these results are promising for potential real-time applications, it is acknowledged that deployment in live systems will require additional optimization and integration with dedicated hardware to ensure sustained performance and responsiveness.

5. Conclusions

This study presents a comprehensive methodology for developing a state of charge (SOC) predictive model for electric vehicle (EV) batteries, integrated with Vissim and SUMO traffic microsimulation platforms. The use of both environments—Vissim, which offers advanced visualization and behavioral calibration, and SUMO, which provides high computational efficiency and integration with OpenStreetMap—enabled the creation of a universal solution that can be flexibly adapted to different urban scenarios.
A key achievement of the work was the development of an XGBoost predictive model, which, using only kinematic and environmental parameters, achieved high precision (R2 = 0.86, RMSE = 7.213). The input data was limited to basic traffic variables such as instantaneous speed and acceleration, topographic factors (terrain slope), and atmospheric conditions (air temperature). This minimalist approach eliminated the need for expensive onboard sensors while maintaining the high effectiveness of the model in large-scale transport simulations.
The applied methodology offers several practical benefits. It enables the optimization of traffic control strategies by identifying areas with increased energy consumption (“hotspots”), which in the urban scenarios analyzed allowed for a reduction in the energy use of the EV fleet by up to 15–22%. Furthermore, the generated SOC maps support intelligent charging infrastructure planning—indicating optimal locations for fast-charging (DC) stations, enabling the implementation of dynamic Smart Charging during peak hours, and identifying priority routes for vehicles with low battery levels. The developed system can also serve as the foundation for integrated simulation models, assisting transport planners in linking projected energy demand with road network development plans.
The study also identified limitations and potential directions for further research. Due to the modular architecture of the model, it can be extended with additional variables such as battery degradation, air humidity, or driving style. Future work should include model validation under extreme conditions—at temperatures below –10 °C and above 35 °C—as well as for different battery types (e.g., Li-ion, LFP). Another important direction is the integration of the solution with IoT systems, urban digital twins, and Vehicle-to-Grid (V2G) platforms, as well as optimization of the algorithm to enable real-time operation onboard vehicles.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in the study are included in the article; further inquiries can be directed to the corresponding author.

Conflicts of Interest

The author declares that they have no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
SOCState of Charge
RMSE Root Mean Square Error
R2Coefficient of Determination
XGBoostExtreme Gradient Boosting
Li-IonLithium-Ion
NMClithium nickel manganese cobalt oxide (LiNiMnCoO2)
LFPlithium iron phosphate (LiFePO4)
LCOlithium cobalt oxide (LiCoO2)
LTOlithium titanate oxide
C-rateCharge/Discharge rate
Li-SLithium–Sulfur
SSBSolid-State Battery
BMSBattery Management System
SoHState of Health
V2GVehicle-to-Grid
GPUGraphics Processing Unit
ECMEquivalent Circuit Model

References

  1. Lepoutre, J.; Perez, Y.; Petit, M. Energy transition and electromobility: A review. In The European Dimension of Germany’s Energy Transition: Opportunities and Conflicts; Springer: Cham, Switzerland, 2019; pp. 509–525. [Google Scholar]
  2. Lewicki, W.; Niekurzak, M.; Sendek-Matysiak, E. Electromobility Stage in the Energy Transition Policy—Economic Dimension Analysis of Charging Costs of Electric Vehicles. Energies 2024, 17, 1934. [Google Scholar] [CrossRef]
  3. Kalghatgi, G. Is it the end of combustion and engine combustion research? Should it be? Transp. Eng. 2022, 10, 100142. [Google Scholar] [CrossRef]
  4. Mądziel, M. Modeling Exhaust Emissions in Older Vehicles in the Era of New Technologies. Energies 2024, 17, 4924. [Google Scholar] [CrossRef]
  5. Marrero, Á.S.; Marrero, G.A.; González, R.M.; Rodríguez-López, J. Convergence in road transport CO2 emissions in Europe. Energy Econ. 2021, 99, 105322. [Google Scholar] [CrossRef]
  6. Kuszewski, H.; Jaworski, A.; Mądziel, M.; Woś, P. The investigation of auto-ignition properties of 1-butanol–biodiesel blends under various temperatures conditions. Fuel 2023, 346, 128388. [Google Scholar] [CrossRef]
  7. Tsiropoulos, I.; Siskos, P.; Capros, P. The cost of recharging infrastructure for electric vehicles in the EU in a climate neutrality context: Factors influencing investments in 2030 and 2050. Appl. Energy 2022, 322, 119446. [Google Scholar] [CrossRef]
  8. Zhang, R.; Fujimori, S. The role of transport electrification in global climate change mitigation scenarios. Environ. Res. Lett. 2020, 15, 034019. [Google Scholar] [CrossRef]
  9. Yao, S.; Bian, Z.; Hasan, M.K.; Ding, R.; Li, S.; Wang, Y.; Song, S. A bibliometric review on electric vehicle (EV) energy efficiency and emission effect research. Environ. Sci. Pollut. Res. 2023, 30, 95172–95196. [Google Scholar] [CrossRef]
  10. Mohseni, S.; Khalid, R.; Brent, A.C. Stochastic, resilience-oriented optimal sizing of off-grid microgrids considering EV-charging demand response: An efficiency comparison of state-of-the-art metaheuristics. Appl. Energy 2023, 341, 121007. [Google Scholar] [CrossRef]
  11. Zhao, G.; Wang, X.; Negnevitsky, M. Connecting battery technologies for electric vehicles from battery materials to management. Iscience 2022, 25, 103744. [Google Scholar] [CrossRef]
  12. Young, K.; Wang, C.; Wang, L.Y.; Strunz, K. Electric vehicle battery technologies. In Electric Vehicle Integration into Modern Power Networks; Springer: New York, NY, USA, 2012; pp. 15–56. [Google Scholar]
  13. Tran, M.K.; DaCosta, A.; Mevawalla, A.; Panchal, S.; Fowler, M. Comparative study of equivalent circuit models performance in four common lithium-ion batteries: LFP, NMC, LMO, NCA. Batteries 2021, 7, 51. [Google Scholar] [CrossRef]
  14. Brand, M.; Gläser, S.; Geder, J.; Menacher, S.; Obpacher, S.; Jossen, A.; Quinger, D. Electrical safety of commercial Li-ion cells based on NMC and NCA technology compared to LFP technology. In Proceedings of the 2013 World Electric Vehicle Symposium and Exhibition (EVS27), Barcelona, Spain, 17–20 November 2013; pp. 1–9. [Google Scholar]
  15. Malik, M.; Chan, K.H.; Azimi, G. Review on the synthesis of LiNixMnyCo1-x-yO2 (NMC) cathodes for lithium-ion batteries. Mater. Today Energy 2022, 28, 101066. [Google Scholar] [CrossRef]
  16. Tarascon, J.M.; Armand, M. Issues and challenges facing rechargeable lithium batteries. Nature 2001, 414, 359–367. [Google Scholar] [CrossRef]
  17. Kabir, M.M.; Demirocak, D.E. Degradation mechanisms in Li-ion batteries: A state-of-the-art review. Int. J. Energy Res. 2017, 41, 1963–1986. [Google Scholar] [CrossRef]
  18. Manthiram, A.; Yu, X.; Wang, S. Lithium battery chemistries enabled by solid-state electrolytes. Nat. Rev. Mater. 2017, 2, 16103. [Google Scholar] [CrossRef]
  19. Janek, J.; Zeier, W.G. A solid future for battery development. Nat. Energy 2016, 1, 16141. [Google Scholar] [CrossRef]
  20. Mądziel, M.; Campisi, T. Predictive Artificial Intelligence Models for Energy Efficiency in Hybrid and Electric Vehicles: Analysis for Enna, Sicily. Energies 2024, 17, 4913. [Google Scholar] [CrossRef]
  21. Zhao, F.; Li, Y.; Wang, X.; Bai, L.; Liu, T. Lithium-ion batteries state of charge prediction of electric vehicles using RNNs-CNNs neural networks. IEEE Access 2020, 8, 98168–98180. [Google Scholar] [CrossRef]
  22. Mądziel, M. Energy Modeling for Electric Vehicles Based on Real Driving Cycles: An Artificial Intelligence Approach for Microscale Analyses. Energies 2024, 17, 1148. [Google Scholar] [CrossRef]
  23. Eddahech, A.; Briat, O.; Vinassa, J.M. Real-time SOC and SOH estimation for EV Li-ion cell using online parameters identification. In Proceedings of the 2012 IEEE Energy Conversion Congress and Exposition (ECCE), Raleigh, NC, USA, 15–20 September 2012; pp. 4501–4505. [Google Scholar]
  24. Kumar, K.N.; Sivaneasan, B.; Cheah, P.H.; So, P.L.; Wang, D.Z. V2G capacity estimation using dynamic EV scheduling. IEEE Trans. Smart Grid 2013, 5, 1051–1060. [Google Scholar] [CrossRef]
  25. Sidhu, A.; Izadian, A.; Anwar, S. Adaptive nonlinear model-based fault diagnosis of Li-ion batteries. IEEE Trans. Ind. Electron. 2014, 62, 1002–1011. [Google Scholar] [CrossRef]
  26. Shaheen, A.M.; Hamida, M.A.; El-Sehiemy, R.A.; Elattar, E.E. Optimal parameter identification of linear and non-linear models for Li-Ion Battery Cells. Energy Rep. 2021, 7, 7170–7185. [Google Scholar] [CrossRef]
  27. Mruzek, M.; Gajdáč, I.; Kučera, Ľ.; Barta, D. Analysis of parameters influencing electric vehicle range. Procedia Eng. 2016, 134, 165–174. [Google Scholar] [CrossRef]
  28. Szumska, E.M.; Jurecki, R.S. Parameters influencing on electric vehicle range. Energies 2021, 14, 4821. [Google Scholar] [CrossRef]
  29. Noura, N.; Boulon, L.; Jemeï, S. A review of battery state of health estimation methods: Hybrid electric vehicle challenges. World Electr. Veh. J. 2020, 11, 66. [Google Scholar] [CrossRef]
  30. Mądziel, M. Predictive methods for CO2 emissions and energy use in vehicles at intersections. Sci. Rep. 2025, 15, 6463. [Google Scholar] [CrossRef] [PubMed]
  31. Xu, Y.; Zheng, Y.; Yang, Y. On the movement simulations of electric vehicles: A behavioral model-based approach. Appl. Energy 2021, 283, 116356. [Google Scholar] [CrossRef]
  32. Zhang, J.; Wang, Z.; Liu, P.; Zhang, Z. Energy consumption analysis and prediction of electric vehicles based on real-world driving data. Appl. Energy 2020, 275, 115408. [Google Scholar] [CrossRef]
  33. Fiori, C.; Ahn, K.; Rakha, H.A. Power-based electric vehicle energy consumption model: Model development and validation. Appl. Energy 2016, 168, 257–268. [Google Scholar] [CrossRef]
  34. Alalwany, E.; Mahgoub, I. Security and trust management in the internet of vehicles (IoV): Challenges and machine learning solutions. Sensors 2024, 24, 368. [Google Scholar] [CrossRef]
  35. Qi, X.; Wu, G.; Boriboonsomsin, K.; Barth, M.J. Data-driven decomposition analysis and estimation of link-level electric vehicle energy consumption under real-world traffic conditions. Transp. Res. Part D Transp. Environ. 2018, 64, 36–52. [Google Scholar] [CrossRef]
  36. Yi, Z.; Smart, J.; Shirk, M. Energy impact evaluation for eco-routing and charging of autonomous electric vehicle fleet: Ambient temperature consideration. Transp. Res. Part C Emerg. Technol. 2018, 89, 344–363. [Google Scholar] [CrossRef]
  37. Yao, J.; Moawad, A. Vehicle energy consumption estimation using large scale simulations and machine learning methods. Transp. Res. Part C Emerg. Technol. 2019, 101, 276–296. [Google Scholar] [CrossRef]
  38. Moawad, A.; Balaprakash, P.; Rousseau, A.; Wild, S. Novel large scale simulation process to support DOT’s CAFE modeling system. Int. J. Automot. Technol. 2016, 17, 1067–1077. [Google Scholar] [CrossRef]
  39. De Cauwer, C.; Verbeke, W.; Coosemans, T.; Faid, S.; Van Mierlo, J. A data-driven method for energy consumption prediction and energy-efficient routing of electric vehicles in real-world conditions. Energies 2017, 10, 608. [Google Scholar] [CrossRef]
  40. He, H.; Cao, J.; Cui, X. Energy optimization of electric vehicle’s acceleration process based on reinforcement learning. J. Clean. Prod. 2020, 248, 119302. [Google Scholar] [CrossRef]
  41. Wang, H.; Zhang, X.; Ouyang, M. Energy consumption of electric vehicles based on real-world driving patterns: A case study of Beijing. Appl. Energy 2015, 157, 710–719. [Google Scholar] [CrossRef]
  42. Gong, H.; Zou, Y.; Yang, Q.; Fan, J.; Sun, F.; Goehlich, D. Generation of a driving cycle for battery electric vehicles: A case study of Beijing. Energy 2018, 150, 901–912. [Google Scholar] [CrossRef]
  43. Fotouhi, A.; Montazeri-Gh, M.J.S.I. Tehran driving cycle development using the k-means clustering method. Sci. Iran. 2013, 20, 286–293. [Google Scholar]
  44. Mądziel, M. Future Cities Carbon Emission Models: Hybrid Vehicle Emission Modelling for Low-Emission Zones. Energies 2023, 16, 6928. [Google Scholar] [CrossRef]
  45. Mądziel, M. Impact of Weather Conditions on Energy Consumption Modeling for Electric Vehicles. Energies 2025, 18, 1994. [Google Scholar] [CrossRef]
  46. Steinstraeter, M.; Buberger, J.; Trifonov, D. Battery and Heating Data in Real Driving Cycles; IEEE Dataport: Piscataway, NJ, USA, 2020. [Google Scholar]
  47. Kimm, H.; Paik, I.; Kimm, H. Performance comparision of tpu, gpu, cpu on google colaboratory over distributed deep learning. In Proceedings of the 2021 IEEE 14th International Symposium on Embedded Multicore/Many-Core Systems-on-Chip (MCSoC), Singapore, 20–23 December 2021; pp. 312–319. [Google Scholar]
  48. Liu, K.; Yamamoto, T.; Morikawa, T. Impact of road gradient on energy consumption of electric vehicles. Transp. Res. Part D Transp. Environ. 2017, 54, 74–81. [Google Scholar] [CrossRef]
  49. Al-Wreikat, Y.; Serrano, C.; Sodré, J.R. Effects of ambient temperature and trip characteristics on the energy consumption of an electric vehicle. Energy 2022, 238, 122028. [Google Scholar] [CrossRef]
  50. Shen, H.; Zhou, X.; Ahn, H.; Lamantia, M.; Chen, P.; Wang, J. Personalized velocity and energy prediction for electric vehicles with road features in consideration. IEEE Trans. Transp. Electrif. 2023, 9, 3958–3969. [Google Scholar] [CrossRef]
  51. Kim, S.; Yang, J.; Jeong, E. Influence of vehicle expertise on acceleration profile preferences in electric vehicles. PLoS ONE 2025, 20, e0325331. [Google Scholar] [CrossRef] [PubMed]
  52. Patel, J.; Patel, R.; Saxena, R.; Nair, A. Thermal analysis of high specific energy NCM-21700 Li-ion battery cell under hybrid battery thermal management system for EV applications. J. Energy Storage 2024, 88, 111567. [Google Scholar] [CrossRef]
  53. Sayah, A.; Saïd-Romdhane, M.B.; Skander-Mustapha, S. Advanced energy management system with road gradient consideration for fuel cell hybrid electric vehicles. Res. Eng. 2024, 23, 102721. [Google Scholar] [CrossRef]
  54. Sun, X.; Zhou, F.; Fu, J.; Liu, J. Experiment and simulation study on energy flow characteristics of a battery electric vehicle throughout the entire driving range in low-temperature conditions. Energy 2024, 292, 130542. [Google Scholar] [CrossRef]
  55. Hakkal, S.; Ait Lahcen, A. XGBoost to enhance learner performance prediction. Comput. Educ. Artif. Intell. 2024, 7, 100254. [Google Scholar] [CrossRef]
  56. Macioszek, E.; Tumminello, M.L. Simulating vehicle-to-vehicle communication at roundabouts. Transp. Probl. Int. Sci. J. 2024, 19, 45–57. [Google Scholar] [CrossRef]
  57. Tumminello, M.L.; Zare, N.; Macioszek, E.; Granà, A. Assaying Traffic Settings with Connected and Automated Mobility Channeled into Road Intersection Design. Smart Cities 2025, 8, 86. [Google Scholar] [CrossRef]
  58. Mądziel, M.; Campisi, T. Investigation of vehicular pollutant emissions at 4-arm intersections for the improvement of integrated actions in the sustainable urban mobility plans (SUMPs). Sustainability 2023, 15, 1860. [Google Scholar] [CrossRef]
  59. Koch, L.; Buse, D.S.; Wegener, M.; Schoenberg, S.; Badalian, K.; Andert, J. Accurate physics-based modeling of electric vehicle energy consumption in the SUMO traffic microsimulator. In Proceedings of the 2021 IEEE International Intelligent Transportation Systems Conference (ITSC), Indianapolis, IN, USA, 19–22 September 2021; pp. 1650–1657. [Google Scholar]
  60. Song, Y.; Zhao, H.; Luo, R.; Huang, L.; Zhang, Y.; Su, R. A sumo framework for deep reinforcement learning experiments solving electric vehicle charging dispatching problem. arXiv 2022, arXiv:2209.02921. [Google Scholar] [CrossRef]
  61. Abodayeh, A.; Hejazi, R.; Najjar, W.; Shihadeh, L.; Latif, R. Web scraping for data analytics: A beautifulsoup implementation. In Proceedings of the 2023 Sixth International Conference of Women in Data Science at Prince Sultan University (WiDS PSU), Riyadh, Saudi Arabia, 14–15 March 2023; pp. 65–69. [Google Scholar]
  62. Gupta, P.; Bagchi, A. Introduction to pandas. In Essentials of Python for Artificial Intelligence and Machine Learning; Springer Nature: Cham, Switzerland, 2024; pp. 161–196. [Google Scholar]
  63. Xiong, R.; Cao, J.; Yu, Q.; He, H.; Sun, F. Critical Review on the Battery State of Charge Estimation Methods for Electric Vehicles. IEEE Access 2017, 6, 1832–1843. [Google Scholar] [CrossRef]
  64. Piller, S.; Perrin, M.; Jossen, A. Methods for state-of-charge determination and their applications. J. Power Sources 2001, 96, 113–120. [Google Scholar] [CrossRef]
  65. Hu, X.; Li, S.; Peng, H. A comparative study of equivalent circuit models for Li-ion batteries. J. Power Sources 2012, 198, 359–367. [Google Scholar] [CrossRef]
  66. Chen, M.; Rincon-Mora, G.A. Accurate electrical battery model capable of predicting runtime and I–V performance. IEEE Trans. Energy Convers. 2006, 21, 504–511. [Google Scholar] [CrossRef]
  67. He, H.; Xiong, R.; Fan, J.; Li, S. Evaluation of lithium-ion battery equivalent circuit models for state of charge estimation by an experimental approach. Energies 2011, 4, 582–598. [Google Scholar] [CrossRef]
  68. Chemali, E.; Kollmeyer, P.J.; Preindl, M.; Emadi, A. Long short-term memory networks for accurate state-of-charge estimation of Li-ion batteries. IEEE Trans. Ind. Inform. 2016, 14, 3892–3901. [Google Scholar] [CrossRef]
  69. Feng, F.; Xu, B.; Zhang, C.; Ouyang, M.; Li, L.; He, H. A comparison of long short-term memory and Kalman filter for multi-step ahead prediction of lithium-ion battery state of charge. Energies 2015, 8, 9532–9546. [Google Scholar]
  70. Barré, A.; Deguilhem, B.; Grolleau, S.; Gérard, M.; Suard, F.; Riu, D. A review on lithium-ion battery ageing mechanisms and estimations for automotive applications. J. Power Sources 2013, 241, 680–689. [Google Scholar] [CrossRef]
  71. Eddahech, A.; Briat, O.; Bertrand, N.; Vinassa, J.M. Behavior and state-of-health monitoring of Li-ion batteries using impedance spectroscopy and recurrent neural networks. IEEE Trans. Ind. Electron. 2012, 59, 3481–3487. [Google Scholar] [CrossRef]
  72. Husmann, J.; Beylot, A.; Perdu, F.; Pinochet, M.; Cerdas, F.; Herrmann, C. Towards consistent life cycle assessment modelling of circular economy strategies for electric vehicle batteries. Sustain. Prod. Consum. 2024, 50, 556–570. [Google Scholar] [CrossRef]
  73. Amusa, H.K.; Sadiq, M.; Alam, G.; Alam, R.; Siefan, A.; Ibrahim, H.; Raza, A.; Yildiz, B. Electric vehicle batteries waste management and recycling challenges: A comprehensive review of green technologies and future prospects. J. Mater. Cycles Waste Manag. 2024, 26, 1959–1978. [Google Scholar] [CrossRef]
  74. Koech, A.K.; Mwandila, G.; Mulolani, F. A review of improvements on electric vehicle battery. Heliyon 2024, 10, e34806. [Google Scholar] [CrossRef]
  75. Picatoste, A.; Schulz-Mönninghoff, M.; Niero, M.; Justel, D.; Mendoza, J.M.F. Comparing the circularity and life cycle environmental performance of batteries for electric vehicles. Resour. Conserv. Recycl. 2024, 210, 107833. [Google Scholar] [CrossRef]
  76. Choi, M.; Cha, J.; Song, J. Impact of lightweighting and driving conditions on electric vehicle energy consumption: In-depth analysis using real-world testing and simulation. Energy 2025, 323, 135746. [Google Scholar] [CrossRef]
  77. Çolak, A.B. A new study on the prediction of the effects of road gradient and coolant flow on electric vehicle battery power electronics components using machine learning approach. J. Energy Storage 2023, 70, 108101. [Google Scholar] [CrossRef]
  78. Costa, M.; Palombo, A.; Ricci, A.; Sorge, U. Thermal Behavior of a LFP Battery for Residential Applications: Development of a Multi-Physical Numerical Model. Energy Eng. J. Assoc. Energy Eng. 2025, 122, 1629–1643. [Google Scholar] [CrossRef]
  79. Serarslan, B. The Impact of Temperature and Ageing on LFP Electric Vehicle Batteries: A Comprehensive Modelling Study. Int. J. Automot. Sci. Technol. 2025, 9, 12–25. [Google Scholar] [CrossRef]
  80. Tremblay, O.; Dessaint, L.A.; Dekkiche, A.I. A generic battery model for the dynamic simulation of hybrid electric vehicles. In Proceedings of the IEEE Vehicle Power and Propulsion Conference, Arlington, TX, USA, 9–12 September 2007; pp. 284–289. [Google Scholar]
  81. Mądziel, M. Modelling CO2 emissions from vehicles fuelled with compressed natural gas based on on-road and chassis dynamometer tests. Energies 2024, 17, 1850. [Google Scholar] [CrossRef]
  82. Mądziel, M. Quantifying emissions in vehicles equipped with energy-saving start–stop technology: THC and NOx modeling insights. Energies 2024, 17, 2815. [Google Scholar] [CrossRef]
  83. Mądziel, M. Instantaneous CO2 emission modelling for a Euro 6 start-stop vehicle based on portable emission measurement system data and artificial intelligence methods. Environ. Sci. Pollut. Res. 2024, 31, 6944–6959. [Google Scholar] [CrossRef] [PubMed]
  84. Madziel, M.; Jaworski, A.; Savostin-Kosiak, D.; Lejda, K. The impact of exhaust emission from combustion engines on the environment: Modelling of vehicle movement at roundabouts. Int. J. Automot. Mech. Eng. 2020, 17, 8360–8371. [Google Scholar] [CrossRef]
Figure 1. A view of the vehicles under study with the equipment used.
Figure 1. A view of the vehicles under study with the equipment used.
Energies 18 04992 g001
Figure 2. General scheme of work.
Figure 2. General scheme of work.
Energies 18 04992 g002
Figure 3. The effect of explanatory variables on the modeled SOC parameter of EVs.
Figure 3. The effect of explanatory variables on the modeled SOC parameter of EVs.
Energies 18 04992 g003
Figure 4. Histograms of the data for the input variables in the SOC model.
Figure 4. Histograms of the data for the input variables in the SOC model.
Energies 18 04992 g004
Figure 5. Model predictions vs. actual values and a residual plot for the created model.
Figure 5. Model predictions vs. actual values and a residual plot for the created model.
Energies 18 04992 g005
Figure 6. View of Vissim traffic circle model and generation of results from the SOC model for a selected group of vehicles.
Figure 6. View of Vissim traffic circle model and generation of results from the SOC model for a selected group of vehicles.
Energies 18 04992 g006
Figure 7. View of the Vissim Expressway model and the generation of results from the SOC model.
Figure 7. View of the Vissim Expressway model and the generation of results from the SOC model.
Energies 18 04992 g007
Figure 8. Diagram showing the possibilities of using the SOC model for further predictions for Vissim and SUMO vehicle traffic microsimulation programs.
Figure 8. Diagram showing the possibilities of using the SOC model for further predictions for Vissim and SUMO vehicle traffic microsimulation programs.
Energies 18 04992 g008
Figure 9. The process of generating data for the map to simulate electric vehicle traffic in SUMO.
Figure 9. The process of generating data for the map to simulate electric vehicle traffic in SUMO.
Energies 18 04992 g009
Figure 10. The SOC map generated from the model for the study region within urban driving.
Figure 10. The SOC map generated from the model for the study region within urban driving.
Energies 18 04992 g010
Table 1. Presentation of selected vehicle data and information about the data used for modeling.
Table 1. Presentation of selected vehicle data and information about the data used for modeling.
ParameterVehicle 1Vehicle 2
Vehicle typeCompact 5-door hatchbackElectric hatchback
Motor typeAC induction (Magna)Permanent magnet synchronous
Motor power (max)107 kW (143 hp)125 kW (170 hp)
Max torque245 Nm250 Nm
Top speed150 km/h150 km/h
Acceleration 0–100 km/h~11.4 s7.2 s
Battery capacity (gross)23 kWh (LG Chem)33–42 kWh (Samsung SDI)
Battery capacity (usable)~19 kWh27.2–37.9 kWh
Battery chemistryLi-ion (LMO)Li-ion NMC
Cell configuration430 cells (86s5p)96 prismatic cells (96s1p)
Cell voltage (nom/nomin/max/min)3.7 V (nom)/4.2 V (max)/3.0 V (min)3.7 V (typical)/4.19 V (max)
Nominal pack voltage318 V355 V
Cooling systemActive liquid coolingActive refrigerant
Typical charging time (home AC)3–4 h (6.6 kW charger, 240 V)11 h (single-phase)
DC fast charging timeNot available (2013 model)0.7 h (50 kW DC)
Energy consumption (EPA/NEDC avg.)EPA: 105 MPGe/191 Wh/kmNEDC: 13.1–14.6 kWh/100 km
Typical driving range (EPA/NEDC)EPA: 122 km (76 mi)NEDC: 245–300 km
BMS/measurement instrumentationBMS and HIOKI 3390 analyzerBMS
Data recording frequency1 Hz1 Hz
Number of test samples (data points)15,00072,000
Table 2. Comparison of different computational techniques with respect to the SOC model.
Table 2. Comparison of different computational techniques with respect to the SOC model.
ModelRMSER2 ScoreMAESMAPE
XGBoost7.210.864.073.60%
Random Forest7.350.844.113.75%
Linear Regression13.630.1610.678.87%
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.

Share and Cite

MDPI and ACS Style

Mądziel, M. State of Charge Prediction for Li-Ion Batteries in EVs for Traffic Microsimulation. Energies 2025, 18, 4992. https://doi.org/10.3390/en18184992

AMA Style

Mądziel M. State of Charge Prediction for Li-Ion Batteries in EVs for Traffic Microsimulation. Energies. 2025; 18(18):4992. https://doi.org/10.3390/en18184992

Chicago/Turabian Style

Mądziel, Maksymilian. 2025. "State of Charge Prediction for Li-Ion Batteries in EVs for Traffic Microsimulation" Energies 18, no. 18: 4992. https://doi.org/10.3390/en18184992

APA Style

Mądziel, M. (2025). State of Charge Prediction for Li-Ion Batteries in EVs for Traffic Microsimulation. Energies, 18(18), 4992. https://doi.org/10.3390/en18184992

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop