1. Introduction
Prediction of the battery state of charge (SoC), which is a forward-looking process that forecasts future SoC based on currently available information, is crucial to ensuring the safety and reliability of electric vehicles (EVs) [
1]. Online SoC estimation provides essential information about the current status of the battery. Such estimation is critical because it serves as baseline information to prevent unexpected energy shortages and enable safe operation. However, SoC estimation for EVs is not sufficient to provide accurate information, such as predicting the exact point when the vehicle becomes inoperable. For example, drivers often rely solely on their experience when deciding when to charge the vehicle. An anxious driver may interrupt their service to charge the vehicle even when the remaining SoC is sufficient to complete the route. On the other hand, an overly optimistic driver may face a shortage of SoC while on the road. SoC prediction involves forecasting future battery states over a specified time horizon. This process plays a pivotal role in enabling proactive energy strategies such as adaptive power control, optimal route planning, charging schedule optimization, and energy-aware driving assistance [
2].
SoC prediction methods that rely solely on conventional estimation techniques often suffer from compounded errors. For example, estimation techniques, such as Coulomb counting, are widely used due to their simplicity and low computational requirements. However, they suffer from accumulated integration errors and drift caused by current sensor bias, making them less reliable over longer prediction horizons [
1,
2]. Model-based approaches, including equivalent circuit models and Kalman filter techniques, can partially address these limitations, but they often depend heavily on precise parameter identification and tend to degrade under variable and uncertain real-world conditions [
2]. Moreover, temperature variations, fluctuating loads, differences in driving behavior, and changes in environmental conditions introduce nonlinearities that are difficult to model explicitly. As a result, an accurate SoC prediction in practical EV applications remains a challenging task.
Recent advances in deep learning offer new opportunities to overcome these challenges. Recurrent neural networks (RNNs), Long Short-Term Memory (LSTM) networks, Gated Recurrent Units (GRUs), and Transformer-based architectures have shown strong capabilities in modeling complex temporal dependencies without requiring explicit physical modeling [
1]. These data-driven approaches are particularly well-suited for learning nonlinear relationships between multi-sensor signals and SoC dynamics. However, most prior work has focused primarily on battery-side measurements, such as voltage, current, temperature, and historical SoC, while ignoring external contextual factors that can significantly influence future power consumption [
3].
This study focuses on electric vehicles used for regular-route shuttle services whose estimated SoCs are observable and exhibit consistent driving patterns. Unlike private vehicles, shuttle buses typically run fixed routes at set times. They stop and vary their mass load as passengers board and disembark at a specific point, which reinforces spatial regularity. Especially on certain shuttles, such as the in-campus shuttle, there are no traffic lights, which increases spatial regularity. The shuttle bus’s driving profile is also generally more stable than that of private vehicles, since it must adhere to the given schedule. Hence, locational data shows a strong correlation among acceleration, mass-load, and road slope, which are major factors in vehicle power consumption. On the other hand, temperature data, which affects battery discharge efficiency, is also collected from the battery management system (BMS). Therefore, integrating GPS and BMS data, such as voltage, current, temperature, and estimated SoC, may improve the accuracy of predicting a vehicle’s energy consumption, especially for shuttle service vehicles. It explores integrating GPS-derived geographic data, such as driving location and altitude, into deep learning frameworks for SoC prediction. GPS information provides valuable contextual cues about driving behavior, route topology, and road gradient, which directly affect vehicle power demand and thus battery discharge characteristics [
3,
4]. Incorporating such information may enable the predictive model to anticipate energy consumption patterns more effectively, leading to improved operationally relevant horizon SoC prediction performance. To evaluate this hypothesis, three neural network (NN) architectures are applied and compared, including LSTM, GRU, and Transformer models. Real-world driving data collected from a self-built electric vehicle and an in-house BMS are also used.
Although GPS-derived features have been less explored in conventional battery prediction models, recent studies in the field of energy-aware mobility suggest that location-aware features can significantly enhance forecasting accuracy [
3,
4]. By leveraging this insight, our work aims to systematically investigate the role of GPS information in improving SoC prediction.
The main contributions of this paper are as follows:
A context-aware deep learning framework integrating GPS-derived features for SoC prediction;
A comparative analysis of three neural architectures (LSTM, GRU, and Transformer) using real-world shuttle EV data;
Empirical demonstration that incorporating location-based features improves SoC prediction performance for operationally relevant prediction horizons.
The rest of the paper is organized as follows.
Section 2 reviews related work, including approaches to SoC prediction and NNs. In
Section 3, the paper introduces an overview of the process.
Section 4 describes the target electric vehicle used for the experiment. The deep learning models used in this paper are introduced in
Section 5. The experiment setup and results are presented in
Section 6 and
Section 7, respectively. Finally, the conclusion summarizes the work with limitations.
2. Related Works
Several studies have been conducted to enhance the accuracy of SoC prediction. The SoC estimation leverages past and present power consumption data to determine the current state. Both for estimation and prediction, a physics-based approach is heavily studied. Physics-based models explicitly incorporate traditional electrochemical mechanisms and design parameters, thereby providing high accuracy. However, they often entail high computational costs when capturing complex dynamics and uncertainties. In contrast, data-driven models can achieve fast, accurate predictive performance under specific operating conditions, even with limited observable data. However, when physical constraints are not explicitly incorporated, such models may exhibit a strong black-box behavior and suffer from limited generalization. Recently, hybrid modeling approaches that combine physical insight with data-driven methods have been actively researched to address these limitations [
5,
6]. However, predicting future SoC or EV power consumption inevitably suffers from uncertainty, unless the future driving trajectory is already planned.
One approach is to improve SoC prediction accuracy by considering external environmental factors, such as driving speed, road gradient, and ambient temperature, recognizing that future SoC cannot be reliably predicted from historical power signals alone. Madziel et al. [
4] proposed a framework for SoC prediction in electric vehicles based on external driving variables. The model’s input consisted of vehicle speed, acceleration, road gradient, and ambient temperature to estimate the battery discharge behavior. This study aimed to reduce system complexity for traffic microsimulation by excluding direct voltage and current sensing. The results demonstrated that environmental factors have a significant influence on energy consumption during dynamic driving conditions. However, the model does not incorporate battery pack voltage or current, which could reflect fluctuating vehicle loads, such as the number of passengers. Liu et al. [
7] demonstrated that variations in road slope can lead to substantial differences in energy usage, especially during urban stop-and-go operations, using a statistical approach. The study emphasized the necessity of incorporating environmental and topographical information for accurate range and SoC prediction. While these studies highlight the critical role of topography and environmental factors in energy consumption, their modeling approaches primarily focus on external driving conditions without considering real-time sensor data, such as battery voltage and current, which reflect varying passenger loads. Furthermore, these approaches provide valuable physical insights but lack a predictive structure suitable for real-time SoC prediction within constrained embedded systems.
Another major research direction focuses on NNs, which have been raised as an emerging technology to predict the battery SoC of EVs in recent years by learning the nonlinear relationships between battery signals and SoC under various operating and aging conditions. El Fallah et al. [
8] developed a comprehensive deep-learning framework for lithium-ion battery SoC prediction under temperature and aging variations. The study compared multiple architectures, including deep neural networks (DNN), GRU, and LSTM networks, across diverse operating conditions. Their results showed that recurrent structures such as GRU and LSTM outperformed feed-forward models by effectively capturing temporal dependencies. The framework highlighted the potential of neural models to learn nonlinear electrochemical dynamics from historical current and voltage data. Nevertheless, these models are primarily “context-blind”; by focusing exclusively on internal battery signals (current, voltage), they do not account for upcoming external driving factors such as speed, altitude, or route information, which strongly affect the discharge profile. This highlights a significant gap, as real-world driving conditions have been shown to be critical for reliable SoC and energy-related predictions.
Ariche et al. [
9] conducted a comparative study of machine learning approaches for SoC prediction under real driving conditions. They considered the impact of factors such as road topology and heating, ventilation, and air conditioning (HVAC) usage on battery discharge behavior, and evaluated multiple models, including linear regression, support vector regression, random forests, and NNs. Their findings underscored the importance of incorporating real-world driving conditions to achieve reliable SoC predictions. Although the approach improved prediction accuracy by accounting for realistic operating conditions, it relied primarily on vehicle-level signals and did not explicitly leverage detailed spatial or route-based information obtained from GPS. Consequently, the model’s ability to predict based on upcoming road characteristics remains limited. Another work has further demonstrated the role of route-related context for a vehicle’s energy consumption prediction, which is fundamental for reliable future SoC prediction. Petkevicius et al. [
10] investigated electric vehicle (EV) energy consumption prediction using probabilistic deep learning. By modeling route information and speed profiles, they demonstrated that external driving factors play a crucial role in determining energy consumption, which is closely linked to the discharge profile. Their study highlighted the effectiveness of integrating probabilistic models with deep learning to capture uncertainty in prediction. Although their work did not focus on SoC directly, it nevertheless provided strong evidence that incorporating route-related information, which can be obtained from GPS, is essential for accurate predictions. Crucially, for such predictive insights to be of practical utility to the driver, the SoC estimation must be performed online and in-vehicle, necessitating a robust embedded implementation. Hong et al. [
11] proposed a real driving cycle-based SoC prediction framework using deep learning models. In their study, driving data were collected from the vehicle interface, and GPS information of traffic lights was employed to segment driving cycles into meaningful intervals. They applied Dynamic Time Warping (DTW) to group similar patterns and developed a Temporal Attention LSTM (TA LSTM) model to predict vehicle speed, which was then fed into a Functional Mock-Up Interface (FMI) simulation to obtain SoC predictions. Their results showed improved accuracy, but they used GPS data only indirectly for cycle segmentation, not as direct model features.
Considering these findings, it is effective to use NN models combined with external environmental factors to predict SoC. Recent studies focus on this. For example, Tang et al. [
12] introduced an Improved Genetic Algorithm (IGA) coupled with a GRU network to enhance lithium-ion battery SoC prediction accuracy. By integrating external temperature and current variations, the study partially addressed the effect of environmental conditions on battery behavior. The proposed IGA-GRU model achieved superior predictive accuracy compared to conventional GRU and back-propagation networks. Nevertheless, while temperature was treated as an external variable, other dynamic environmental and spatial factors, such as road topology and vehicle speed, were not explicitly modeled. On the other hand, Babu et al. [
13] explored real-time driving telemetry—including current, voltage, ambient temperature, and driving cycle data—and applied various machine learning regression algorithms (including NNs) to predict battery SoC. Although their results demonstrated improved prediction performance by incorporating driving-condition variables, the model did not explicitly include detailed spatial or route-based features such as GPS latitude/longitude, altitude, or travel heading. De Cauwer et al. [
14] proposed a data-driven regression framework for predicting electric-vehicle (EV) energy consumption under real-world driving conditions. Their approach used GPS-derived route information—such as road gradients, speed limits, and traffic patterns—to estimate energy consumption along candidate paths, demonstrating that external geographic factors substantially influence prediction accuracy. Although their method relied on conventional regression models rather than NNs, their findings highlight the strong predictive value of route-level contextual information. This finding supports the motivation of this study, in which GPS-based driving context is not only incorporated but also modeled using NNs to capture nonlinearities and temporal dependencies in SoC variations; the data-driven approach adopted in this study is not chosen merely to align with recent research trends. Specifically, this work does not aim to accurately estimate the internal battery state but rather to predict short-term future SoC in operational environments with repetitive driving routes, such as shuttle services.
A qualitative comparison with representative SoC prediction studies is summarized in
Table 1. A direct quantitative comparison with external works is not directly feasible due to fundamental differences in target scenarios and experimental settings. Existing studies, such as [
15,
16], focus on private-vehicle scenarios and rely on general-purpose driving datasets collected from electric vehicles operating along diverse, largely unconstrained urban or highway routes. In contrast, our work focuses on an embedded model tailored for shuttle service scenarios, characterized by route-constrained operation, high spatial regularity, and repetitive stop-and-go patterns at predefined stations, which are dominant factors influencing energy consumption. It differs fundamentally from the operating conditions of private electric vehicles. In particular, unlike prior works that utilize GPS information indirectly (e.g., for driving cycle segmentation [
11]), our approach directly incorporates latitude, longitude, and altitude as primary model inputs and adopts a ΔSoC prediction formulation. This enables the model to learn route-specific, location-dependent energy consumption patterns for repetitive shuttle operations.
In summary, prior studies have emphasized either the indirect use of GPS for segmentation, the integration of environmental conditions, or the impact of real-world auxiliary loads on SoC prediction. However, this work directly incorporates GPS data (latitude, longitude, altitude, speed, and heading) as input to deep learning models, in contrast to prior works that primarily use GPS information for segmentation or consider external factors in a limited manner. This approach not only enhances SoC prediction but also trains limited embedded models that meet the specific needs for shuttle-bus-like driving scenarios, where route patterns strongly correlate with power consumption.
3. Overview of the Process
The predicted SoC at time
from the current time
t is defined as
where
denotes the SoC variation at time t +
, and
represents the estimated SoC at the current time t. The SoC at time t (
) can be estimated by various methods, such as models coupled with aging mechanisms for accurate estimation. While a more precise estimation method, such as electrochemical modeling, may improve SoC estimation accuracy, this paper focuses on enhancing short-term (1- or 10-min) SoC prediction. Although battery aging, consisting of both calendar and cycle aging, is a critical factor in long-term battery management, its impact is negligible within the 1-to-10-min prediction horizon addressed in this work, as aging is a degradation process that typically progresses over months or years. Instead, this paper enhances the accuracy of short-term SoC prediction by examining the effects of external factors, such as road conditions and driving patterns, on EV energy consumption. It is clarified that this study targets electric vehicles used for regular-route shuttle services, which exhibit consistent driving patterns. All predictions are only based on
and external variables at time
t so the error between
and
does not accumulate over time, even if there exist estimation errors in
or sensor measurements. In this paper, therefore,
relies on Coulomb counting, which is a reasonable reference and a proper ground truth for deep learning models. In addition, the SoC level is recalibrated using the open-circuit voltage (OCV) and the manufacturer’s OCV table before each driving session begins to reset the accumulated bias. Similarly, commercial BMS, such as Orion BMS, estimate SoC by combining Coulomb counting with OCV calibration using an SoC-OCV lookup table.
An overview of the entire workflow of this work is presented in
Figure 1. The workflow consists of data collection, preprocessing, model training, and prediction processes. The first step of the workflow is data collection to develop a NN model for SoC prediction. There are two methods for acquiring data for training the NN: one is from physically modeled simulations, and the other is from the real world. The simulation method is typically used for reinforcement learning. However, it is challenging to accurately replicate the real environment unless the dynamic characteristics of the EV and the geographical characteristics of the target course are accurately implemented. Instead of relying on theoretical dynamic models or simulations [
11], real-world EV operation data is utilized to ensure the NN model captures complex and realistic driving patterns.
The next step is data preprocessing. The collected signals have different sampling frequencies. For instance, a typical GPS module provides positioning information every one to a few seconds, whereas vehicle speed and acceleration can vary much more rapidly. In contrast, ambient and battery temperatures change only slowly over time. Before training the NN, data with lower sampling rates are linearly interpolated to synchronize the time series. GPS information (latitude, longitude, altitude, speed, and heading), power-related variables (voltage and current), and environmental variables (temperature) were carefully synchronized to form a clean, structured time-series dataset suitable for model training. Additionally, all input features are normalized. The dataset was then divided into training, validation, and test sets to enable fair evaluation of the models’ performance [
17]. The trained model targets the shuttle service vehicle, which has fixed, regular routes; it exploits spatial regularity and memorization. It is not a limitation but a practical solution, as this study aims to improve prediction performance under realistic operating conditions for shuttle service vehicles equipped with an embedded platform environment. The model is targeted for an embedded platform with a relatively small model size. Although it is true that the model must be trained for each shuttle service route, its small parameter count enables efficient, centrally controlled updates when the vehicle’s service route changes.
On the modeling side, two deep learning models were developed: one incorporating GPS information and the other excluding it. Both models shared identical data structures and training conditions, differing only in input variables. This allowed for a clear and direct assessment of the contribution of GPS information to SoC prediction performance. By isolating this factor, the workflow aims to rigorously validate the impact of GPS features on improving SoC prediction accuracy.
5. Deep Learning Models
This study applies three representative deep learning architectures for time-series prediction of
: the GRU, the LSTM, and the Transformer. The GRU is a recurrent NN that learns temporal dependencies using gating mechanisms [
29]. The GRU architecture was adopted due to its ability to model temporal dependencies while using fewer parameters than LSTM, enabling efficient sequence learning. The LSTM is designed to capture long-term dependencies through input, forget, and output gates [
30]. The LSTM network, originally introduced to address the vanishing gradient problem and capture long-term dependencies, was used as a baseline recurrent model.
Transformer models address the limitations of recurrent architectures by capturing long-range dependencies more effectively through self-attention [
31]. Unlike RNN-based models, they process the entire input sequence in parallel and do not rely on recurrence, enabling better scalability to long-horizon forecasting tasks. The input features are projected into an embedding space and combined with positional encodings to retain sequential information. The Transformer encoder, composed of multi-head self-attention layers and feed-forward networks, has shown strong performance in long-term time-series prediction [
32].
The SoC prediction problem is formulated as a sequence-to-one regression task. The model
predicts the future SoC change
given an input window
, where
L,
,
, and
d denote the input sequence length, prediction horizon, the model parameters, and number of total input features, respectively. The input features consist of SoC, each of the 24 cell voltages, temperature, current, and five GPS variables (latitude, longitude, altitude, speed, and heading). The target output is the future-ahead SoC change,
. In this work, the model is trained to predict one- and ten-minute horizons SoC with a 60-s input sequence length. Once
is predicted, future-ahead
is calculated as declared in Equation (
1).
All models shared the same preprocessing and training procedures. Feature-wise min–max normalization is applied using statistics from the training set and reused for the validation and test sets. The test set is constructed by selecting the longest driving log, not merely for its duration, but because it covers the widest SoC range and includes diverse driving patterns, such as repeated stop-and-go events and steady-speed segments. This enables a more realistic evaluation. Additionally, the dataset is partitioned at the operation level to avoid temporal leakage that could arise from random sample-level partitioning. The models are trained to minimize the mean squared error (MSE) between predicted and ground truth values, with early stopping applied to prevent overfitting. For each model, two configurations were trained and evaluated under identical conditions: (1) a GPS-enabled version using all 32 input features, and (2) a GPS-ablated version excluding the five GPS channels (
). This comparison isolates the contribution of GPS information to short-term ΔSoC prediction accuracy. The hyperparameter settings are summarized in
Table 3.
6. Experimental Setup
The driving conditions are carefully designed to prevent the model from overfitting to specific driving patterns by intentionally introducing a variety of driving scenarios. For this purpose, several parameters are systematically varied. The driving course, depicted in
Figure 3, is a closed-loop circuit designed to emulate a shuttle vehicle operation. The course includes a balanced combination of uphill, downhill, and flat segments.
Each driving session continues under various battery SoC levels, allowing data to be collected over a wide range of operating conditions. The number of passengers is varied to simulate different load conditions, and the vehicle is occasionally guided to deviate from the designated route to diversify GPS trajectories. Intermittent stops are introduced during driving to emulate real-world shuttle driving behavior and sudden load variations. Furthermore, the experiments alternate between driving with and without charging to reflect irregular patterns of energy consumption. The distribution of variables such as different passenger numbers, route deviations, and parking duration mainly affects vehicle energy consumption by altering electrical behavior, such as current and voltage profiles, which are directly included as model inputs. Therefore, their influence is implicitly captured in the dataset. Even though the route was fixed due to the shuttle service scenario, the factors were not synchronized across drivings. Therefore, although the experimental design is not fully orthogonal, it provides sufficient practical diversity for evaluating the proposed model under realistic operating conditions. Consequently, these strategies ensure that the collected signals, including GPS, voltage, current, and SoC, capture realistic variations across multiple driving conditions. A total of 15 driving sessions are conducted for Course A, each lasting between 1 and 4 h, resulting in more than 35 h of real-world driving data. Additionally, a 30-min driving session is conducted for Course B to validate the effectiveness of the proposed process on a separate route.
For model training, the input sequence
is constructed using a sliding window of 60 s:
This sequence provides temporal context over the past 60 s, enabling the model to learn the relationship between past operating conditions and future SoC changes. The corresponding label represents the change in SoC in the next 60 s. By leveraging temporal dependencies, the model can learn patterns such as load fluctuations, driving dynamics, and energy usage trends that are not captured by single time-point inputs.
Before model training, comprehensive data preprocessing is executed, especially from the GPS module. Algorithm 1 summarizes the preprocessing and alignment procedure used to construct time-synchronized multiple inputs. First, for all data sets, timestamps are converted to monotonic time to correct potential timestamp discontinuity between multiple driving sessions. Raw GPS data is first parsed and decoded to extract feature tuples consisting of latitude, longitude, altitude, speed, and heading. After gathering meaningful information from the raw data, interpolation and smoothing are conducted, since GPS signals contain intermittent missing values and spikes due to GPS limitations.
First, invalid points are masked based on speed and acceleration thresholds of the EV, and Hampel filtering [
33] is used to remove spikes. Then, missing segments shorter than a predefined gap are linearly interpolated, while longer gaps remain unfilled to avoid artificial data. After that, a Savitzky–Golay filter [
34] is then applied to smooth the trajectory. Finally, altitude, speed, and heading were interpolated using Piecewise Cubic Hermite Interpolating Polynomial (PCHIP) [
35] for smooth nonlinear interpolation and circular interpolation for heading angles.
Since each sensor had a different sampling rate (e.g., voltage: 220 ms/SoC, current, and temperature: 10 ms/GPS: 1 s), the GPS timestamp is chosen as the reference. Using the processed GPS sequence as the temporal reference, BMS signals including voltage, current, temperature, and SoC are aligned via nearest-neighbor matching within a predefined tolerance ( ms for voltage, ms for SoC, and ms for current, respectively). The moving windows (size 5) are applied to the acquired battery voltage and current data. This approach ensures data size and consistent time alignment across all features.
For Course A, each driving record is treated as an independent sequence source, and data splitting is performed at the file level to prevent temporal leakage. Because the length of each driving session varies, the number of raw samples (rows) differs across files. For a sequence length of 60 s, a file with
N rows produces
training samples.
Table 4 shows the detailed information on dataset composition. For Course B, a single driving data set is included to augment the Course A data set and train a new model. Each input sequence consists of 60 s of data sampled at 1 Hz.
| Algorithm 1: Preprocessing and alignment procedure to construct time-synchronized multi-sensor inputs |
![Electronics 15 01014 i001 Electronics 15 01014 i001]() |
7. Experimental Results
Three model architectures—GRU, LSTM, and Transformer—are trained and evaluated under two configurations: (1) without GPS data (voltage, current, temperature, and SoC only), and (2) with GPS data (including latitude, longitude, altitude, speed, and heading). The models are implemented in PyTorch (v2.7.1) and optimized using the Adam optimizer with early stopping based on validation loss. Model performance is assessed using the Mean Absolute Error (MAE) for both one-minute and ten-minute SoC predictions.
For all models, the optimal number of layers and hidden sizes are determined to maximize model performance. The grid search is performed manually for the GRU and LSTM models. In contrast, the Transformer model employs Optuna for automatic hyperparameter optimization [
36], where parameters such as
, number of attention heads, feedforward dimension, and dropout rate are tuned. Due to the large hyperparameter space of the Transformer architecture, exhaustive manual tuning (e.g., varying only the number of layers and hidden dimensions) is not practical. The reported Transformer result corresponds to the best-performing configuration selected via Optuna-based hyperparameter optimization after evaluating multiple candidate architectures. This procedure ensures that the Transformer baseline is not under-tuned or arbitrarily configured, but instead represents a competitive state-of-the-art sequence modeling approach. The optimal Transformer configuration selected by Optuna achieves
,
, and a feedforward dimension of 256 with a dropout rate of 0.17156254, as shown in
Table 5.
7.1. One-Minute Prediction Results for Course A
Table 6 summarizes the performance comparison in terms of MAE and root mean squared error (RMSE) for one-minute SoC prediction for Course A. In the case of mean absolute percentage error (MAPE), it exhibits excessively large values due to near-zero values of
in the sample. Therefore, MAE (and RMSE) are used as the primary performance metrics. Across all architectures, the inclusion of GPS data consistently reduced prediction error. The best GRU performance is achieved with a single layer and a hidden size of 16, yielding a mean absolute error (MAE) of 0.3017 with GPS compared with 0.3918 without GPS, representing an improvement of approximately 23%. Similarly, the best LSTM configuration (two layers and a hidden size of 16) achieves an MAE of 0.2988 with GPS, outperforming the version without GPS (0.3456) by approximately 13.6%. The Transformer model, tuned using Optuna, achieves an MAE of 0.3592 with GPS, which outperforms the result without GPS (0.4312), showing a relative improvement of 16.7%. The time-series prediction
result is illustrated in
Figure 4. As shown, the model with GPS information more closely follows the actual
compared with the model without GPS data. The one-minute performance comparison under the low-SoC condition (20–40%) for Course A is summarized in
Table 7.
7.2. Ten-Minute Prediction Results for Course A
Ten-minute ahead SoC prediction for Course A results are summarized in
Table 8. As the prediction horizon increases, overall accuracy also decreases. However, models trained with GPS information still maintain superior accuracy, indicating a substantial improvement in longer horizon prediction accuracy. For the GRU model, the best configuration with GPS information (two layers, hidden size 16) achieves a MAE of 0.6741, representing a 76% reduction compared with the model without GPS information (2.8065). The LSTM model demonstrates the most substantial improvement, with the best configuration (two layers, hidden size 16) achieving an MAE of 0.3887 with GPS information, compared with 1.2679 without GPS information, representing an improvement of approximately 69.3%. The Transformer also benefits from GPS data, reducing the MAE from 1.6327 to 0.7070 in the configuration with one layer and 16 hidden units, a 56.7% reduction in prediction error. These results demonstrate that incorporating GPS data improves ten-minute SoC prediction accuracy by roughly 56.7–76%, depending on the model architecture. In detail,
Figure 5 and
Figure 6 illustrate the prediction results over time. Furthermore, the absolute error distribution graph in
Figure 7 illustrates that the probability density is significantly concentrated within the low-absolute error range, demonstrating the high predictive accuracy and reliability of the proposed model. Without GPS information, the model tends to be inaccurate, particularly when the remaining battery SoC is low. In contrast, the model with GPS information closely follows the actual SoC trajectory, resulting in a more accurate ten-minute prediction. The ten-minute prediction performance comparison under the low-SoC condition (20–40%) for Course A is summarized in
Table 9.
7.3. Ablation Study on GPS Features
On the other hand, the ablation study is performed to investigate the contribution of individual GPS features to one-minute and ten-minute SoC prediction, as shown in
Table 10. In each evaluation, a specific GPS component from the input features is removed. The resulting performance is compared with both the full GPS model and a configuration without any GPS information. For the one-minute prediction task using the LSTM (2,16) model, removing latitude and longitude increases the MAE from 0.2988 to 0.3290. Removing speed also leads to noticeable degradation. In contrast, removing altitude and heading results in only marginal performance changes. These results indicate that GPS information provides a moderate performance benefit for one-minute horizon SoC prediction, while no single GPS component is critically dominant. For the ten-minute prediction task using the GRU (2,16) model, the impact of GPS features becomes substantially more pronounced. Removing latitude and longitude results in the most severe degradation, increasing the MAE from 0.6741 to 1.7162. When all GPS features are removed, the MAE increases to 2.8065, highlighting the critical importance of GPS information for reliable long-term SoC prediction. Overall, the ablation results demonstrate that the contribution of GPS features strongly depends on the prediction horizon. While one-minute SoC prediction benefits moderately from GPS inputs, ten-minute horizon prediction relies more heavily on spatial information, particularly latitude and longitude, and degrades severely in the absence of GPS features.
7.4. Computational Costs of the Proposed Models
Table 11 summarizes the computational cost of the proposed models. The one-minute-ahead LSTM model exhibits a mean inference latency of 0.719 ms with 5425 parameters, while the 10-min-ahead GRU model requires 2.671 ms with 4081 parameters. Although the GRU model shows a slightly higher latency due to the longer prediction horizon, its model size remains extremely compact (15.6 KB). The latency was measured on a PC running an Intel i5-7500 CPU using a Python (v3.12.4) environment. Generally, the i5-7500 CPU is approximately 200 times faster than MCUs, such as the ARM Cortex-M7 (e.g., STM32F746ZGT). However, considering that C-compiled code typically executes at least ten times faster than Python, the estimated latency on an embedded platform would be no more than 20 times that measured on the PC. Typical battery management system (BMS) control cycles range from 100 ms to 1 s; the estimated embedded latency (approx. 14.4 ms to 53.4 ms) is well within the real-time constraints. Therefore, the proposed model is expected to operate within embedded BMS platforms.
7.5. Course B Results
On Course A, the model achieved an MAE of 0.2988 and an RMSE of 0.3568. When evaluated on Course B, the prediction errors increased even after retraining, reflecting the higher variability and complexity of the new driving environment. Specifically, the GPS-enabled model achieved an MAE of 0.3743 and an RMSE of 0.4754, whereas the GPS-disabled model yielded an MAE of 0.5316 and an RMSE of 0.6209 on Course B.
Figure 8 shows that the model with GPS follows the ground truth more accurately compared to the model without GPS, incorporating GPS information reduced the MAE by approximately 29.6% and the RMSE by 23.4% on Course B. These results indicate that although the new track introduces more challenging driving patterns, GPS features consistently improve prediction accuracy by capturing driving context information, such as vehicle speed variations and road elevation changes. Consequently, GPS information enhances the SoC prediction model even when the training data are augmented with newly collected driving data.
Overall, the results show that integratGPS information reduced the MAing GPS-based contextual features consistently reduces prediction error for both one- and ten-minute SoC prediction horizons. Furthermore, models regardless of GPS input commonly exhibit an increased error rate toward the end of the time series. This suggests that the models tend to overfit to temporal stamps or SoC levels rather than capturing the specific characteristics of the driving course or external environment. The observed improvements are more evident in longer prediction horizons, particularly under dynamic driving conditions.
8. Conclusions
This study presents a deep learning-based framework for predicting the future State of Charge (SoC) in electric vehicles, especially for the shuttle service, with a particular focus on the impact of incorporating GPS-derived information. By collecting real-world data from a self-built electric vehicle equipped with a 24-cell LiFePO4 battery pack and a custom-designed battery management system (BMS), it is demonstrated that contextual GPS features such as speed, location, and altitude can significantly enhance prediction accuracy.
Three representative neural architectures—GRU, LSTM, and Transformer—are trained and evaluated under both configurations with and without GPS data. Across all models, the inclusion of GPS data leads to notable MAE improvements in SoC prediction performance: up to 23% for one-minute and up to 76% for ten-minute predictions. These results indicate that environmental features, such as spatial and velocity cues derived from GPS, are correlated with vehicle power consumption, thereby contributing to improved forecasting performance of future battery states. The findings highlight the practical effectiveness of integrating GPS information into data-driven SoC prediction frameworks for electric shuttle buses and similar route-based applications. Beyond performance improvements, such models enhance the scope for predictive energy management strategies that support optimal route planning, adaptive power control, and proactive charging scheduling.
Although not the primary focus of this work, integrating physics-informed (e.g., electrochemical) or hybrid modeling approaches could provide a complementary solution for extending the proposed framework to non-repetitive driving scenarios. Furthermore, our approach focuses on a small-footprint model that fits each individual driving course rather than a generalized feature. Consequently, retraining is required when deploying the model to entirely new driving routes or new vehicles. Also, it does not predict the long-term future changes, such as battery capacity degradation (e.g., State of Health, SoH). Integrating such long-term degradation models with our short-term SoC prediction, as well as developing a generalized model that minimizes retraining, remains a promising direction for future research.