1. Introduction
Global warming and environmental pollution are serious problems, and if left unaddressed, in combination with the increasing population, they will inevitably reach more serious dimensions [
1]. Carbon emissions from the use of fossil fuels cause global warming and also have negative effects on human health [
2,
3], and fossil fuels contribute the most to carbon emissions in transportation [
4]. Therefore, electric vehicles, with zero emissions, play an important role in combating global warming and preventing air pollution, thereby protecting human health [
5,
6].
Autonomous driving systems have also become an integral part of modern transportation infrastructure [
7]. Autonomous vehicles enhance driving safety by minimizing human error, reduce traffic congestion, and optimize energy consumption [
8,
9,
10]. Autonomous taxi systems, in particular, increase efficiency in urban transportation and are environmentally friendly alternative to public transportation [
11,
12]. Autonomous electric taxis not only enable driverless transportation but also require the optimization of multidimensional processes such as energy management, battery capacity, and charging planning [
13]. In this context, accurately predicting the travel time, assessing the vehicle range, and properly planning he charging operations are critical [
14]. Especially on long-distance trips, the battery charge level necessitates directing the vehicle to the appropriate charging station and accurately calculating the total arrival time [
15,
16].
This study aims to estimate the travel time for journeys that autonomous electric taxis will make from one province to another, taking into account the battery status and charging time. The estimation process was carried out using LSTM (Long Short-Term Memory) and GRU (Gated Recurrent Unit) models, which have a high success rate in analyzing time series data. Another dimension of the system is the use of Internet of Things (IoT) technology. In this study, information such as the location, battery, and charging status of autonomous taxis is communicated to users via the IoT infrastructure. Thus, customers can obtain the travel time, charging requirements, and cost estimates via a mobile interface without physically going to the taxi stand. This not only saves time but also contributes to energy efficiency by reducing urban traffic congestion and unnecessary vehicle movement. The application also includes cybersecurity verification for the charging process. When the charging process begins, the system verifies the transaction ID through IP matching. If a different IP address is detected during charging, the transaction is automatically terminated for security purposes.
1.1. Literature Review
In recent years, research on electric vehicle charging infrastructure and energy management has focused on increasing the sustainability of transportation systems. These studies typically address charging station location optimization, energy demand forecasting, and charging planning algorithms [
17,
18,
19,
20]. Particular priority has been given to the efficient placement of stations, reducing waiting times, and balancing energy distribution, especially in areas with high urban density [
21]. Some studies have addressed the integration of renewable energy sources into charging stations [
22,
23,
24,
25]. Other studies have examined the effects of electric vehicle charging networks on the power grid [
26,
27].
Another research group focused on vehicle travel time estimation and route optimization [
28,
29,
30]. In this context, estimated arrival times for a specific route were calculated using historical traffic data, geographic information systems, and time-series analyses [
31,
32,
33]. Artificial intelligence-based studies have shown that LSTM and GRU models provide higher accuracy compared to classical regression or statistical methods [
34,
35,
36]. Furthermore, some studies reported that incorporating additional variables such as traffic density, weather conditions, speed limits, and vehicle type into the model significantly improved the prediction accuracy [
37,
38].
Third, studies on autonomous taxi systems are noteworthy [
39,
40,
41]. In some studies, the effect of charging optimization on fleet operating costs has been statistically evaluated [
42,
43,
44,
45]. However, most existing studies do not sufficiently focus on issues such as the time estimation based on the battery charge level or travel planning related to the charging time.
Finally, IoT-based vehicle communication and cybersecurity issues have become increasingly important in intelligent transportation systems [
46,
47]. In the studies conducted, data security and authentication mechanisms are generally provided through encryption, digital certificates, or IP-based authentication methods [
48,
49]. Some studies have demonstrated the applicability of methods such as foreign IP detection and network security monitoring in the communication between the charging station and the vehicle [
50,
51]. However, studies on a real-time IP authentication-based security model integrated with the charging process in autonomous electric taxi systems are limited.
A review of the current literature reveals that a significant portion of studies on electric vehicle technologies focus on system-level issues such as charging infrastructure optimization, energy management, or demand forecasting. In contrast, studies that address vehicle-level time estimation, battery status, and the charging process together are limited. Studies on travel time estimation generally use historical traffic data as input for artificial intelligence-based approaches, but they disregard variables such as the battery status, charging needs, and range dynamics of electric vehicles. Similarly, no study has been found that considers the travel time in autonomous taxi systems. This study aims to address this gap in the literature by developing a model capable of estimating the travel time based on the battery charge level, range, and charging requirements for autonomous electric taxis. Within the scope of the study, a time series-based prediction process was designed using both LSTM and GRU deep learning models with battery performance data. Thus, the system can provide the customer with information about the estimated travel time, charging requirements, and cost before the journey begins. One of the original contributions of the study is the addition of an IP-based cybersecurity control mechanism during the charging process. This mechanism verifies the IP address throughout the charging process and automatically stops the process if any foreign IP is detected. Unlike existing charging security systems, this approach ensures both charging and data security simultaneously.
To contextualize the performance of the proposed method, a comparison with existing approaches in the literature was conducted.
Table 1 summarizes key studies that address charging duration estimation, SOC prediction, or travel time forecasting using machine learning or time-series models. The proposed GRU-based framework achieves higher accuracy than most traditional models (ARIMA, Prophet) and is competitive with state-of-the-art deep learning architectures reported in the literature. This demonstrates that the model provides meaningful improvements over baseline and existing methods.
In conclusion, this study combines four different research topics into a single study: autonomous electric taxi systems, travel time estimation, IoT-based data management, and cybersecurity verification.
1.2. Contribution and Organization of the Article
This study presents a unique approach in the literature that integrates travel time estimation, charging planning, and cybersecurity verification within the same system for autonomous electric taxis. While previous studies have generally focused on a single component, such as the travel time estimation, energy efficiency, or charging optimization, this study develops a comprehensive prediction model that incorporates multidimensional variables such as the battery charge level, range, charging station density, and route length by using both LSTM and GRU deep learning models in a comparative manner. Another innovation of the study is the integration of this prediction model with an IoT-based autonomous taxi system. This allows customers to obtain information about the travel time, charging requirements, and estimated costs via a mobile platform before physically going to the station. Additionally, the system performs IP-based cybersecurity verification during the charging process; thus, if a different IP address is detected during charging, it halts the process to ensure data security and transaction integrity.
The article consists of five main sections.
Section 1 explains the environmental, technological, and social importance of electric and autonomous vehicle technologies.
Section 2 covers the dataset used to train the model, the data collection process, the characteristics of the variables, and the preprocessing stages.
Section 3 detail the architecture of the LSTM and GRU models, the software infrastructure used, the hyperparameter settings, and the overall design of the system.
Section 4 includes the model’s performance results, prediction accuracies, and evaluation of the application outputs.
Section 5 contains an overall evaluation of the study, its contributions to the literature, and suggestions for future research.
2. Dataset
The dataset used in this study was created using a hybrid approach that combines real-world data with simulation-based modeling. Fifty real electric vehicle charging stations located in Kocaeli province were selected from the Energy Market Regulatory Authority (EMRA) Şarj@TR (v1.1.6) platform, and the geographic coordinates, power types (AC/DC), and nominal power values of these stations were integrated into a Google Maps API-based (v3.63) simulation environment. Five different vehicle types (95, 80, 75, 50, and 100 kWh) were defined, taking into account the battery capacities of electric vehicles commonly found on the market. Twenty vehicles were selected from each vehicle type, creating a total of 100 vehicles. The initial charge levels of these vehicles were set between 20% and 40%.
During the simulation process, each vehicle was directed to one of 50 charging stations. The total charging time for each charging session was calculated as the sum of the following components:
Travel time from the vehicle to the station based on real-time traffic data obtained from the Google Maps API;
Waiting time in the queue determined based on the battery charge levels and charging times of other vehicles at the station;
Charging time calculated considering the station’s power capacity and the vehicle’s battery status.
This structure allowed for the systematic examination of the relationships observed between different battery capacities, charging times, and energy consumption rates. The obtained data were used directly in training the model. Additionally, the generation of 5000 observations was performed through a structured and reproducible protocol. Although the charging station attributes (location, power type, and rated output) were obtained from real data sources, the vehicle operations were simulated to systematically reflect different charging behaviors under varying battery capacities and initial SOC conditions. For each of the 100 simulated vehicles, one complete charging session was generated at each of the 50 stations, resulting in 100 × 50 = 5000 total observations. Every session was assigned a unique timestamp and sampled at 10 min intervals, consistent with commercial telematics update rates. Travel times were obtained directly from the Google Maps Distance Matrix API, while queue waiting times and charging durations were computed algorithmically based on vehicle arrival order, state of charge, and station power rating. The dataset contained no missing values; however, small stochastic variability (±3–7%) was introduced into travel times to preserve real-world irregularity. This protocol ensures that the dataset reflects realistic spatio-temporal conditions while maintaining full transparency and reproducibility. The basic variables in the dataset are shown in
Table 2.
In this dataset, the expected-time variable is the dependent variable, while all other variables are independent variables.
Data Sources, Data Preprocessing and Simulation Environment
The data sources were obtained from observations conducted with 100 vehicles at 50 charging stations located in the province of Kocaeli. The actual station data were created by taking into account the charging times and energy consumption amounts of electric vehicles with different battery capacities. The simulation environment was developed using the Pandas, NumPy, Sklearn, Flask, and Keras libraries in Python version 3.12.2.
The dataset consists of 5000 rows (observations) and 11 columns (variables) obtained from a total of 100 vehicles and 50 charging stations. Each row represents a single charging session for a specific vehicle at a specific charging station; therefore, the total number of data points is 5000. The dataset was processed in Python using Pandas Data Frame format, with each row containing 11 columns of information related to the charging session.
Prior to training the model, a series of data preprocessing steps were performed on the dataset. All numerical variables were normalized to the range 0–1 to make them compatible with the time series input format of the LSTM and GRU models. This process ensured that variables of different magnitudes were evaluated with equal weight during the model training process. To enable the analysis of charging operations over time, the dataset was restructured with time stamps, creating 10 min time windows for each vehicle. The dataset was then split into two subsets: 80% for training and 20% for testing. As a result of all these steps, the data matrix, consisting of 5000 rows and 11 columns, was compatible with the input format of the LSTM and GRU models.
In the real-time operation scenario, data were sampled every 10 min from IoT-connected electric vehicles and charging stations. This interval corresponds to the update frequency of most commercial telematics and charging management systems, ensuring both temporal accuracy and computational efficiency. The models were executed in a Python-based simulation environment (Intel i7 CPU, 32 GB RAM; Intel Corporation, Santa Clara, CA, USA). The average inference time per sample was recorded as 0.12 s for GRU, 0.18 s for LSTM, 0.41 s for Prophet, and 0.63 s for ARIMA. These results demonstrate that the GRU and LSTM models are suitable for near real-time prediction tasks in the proposed framework.
The generalization capability of the model was evaluated using a comprehensive dataset that includes 100 vehicles and 50 charging stations, each exhibiting variations in battery capacities, initial state-of-charge levels, station power ratings, and geographical characteristics. This diversity introduces natural variability that represents different operational conditions, thereby enhancing the model’s ability to adapt to multiple real-world scenarios. The train–test split was performed in a manner that prevents data leakage, and the high R2 values obtained on the test set demonstrate that the model performs successfully in terms of generalization. For robustness assessment, several preprocessing steps were applied, including normalization, outlier inspection, and noise reduction. The model was also tested under different SOC ranges and station power levels, and it exhibited stable behavior across all conditions. These findings indicate that the model is capable of tolerating real-world variability and maintaining consistent performance.
The proposed system operates with near–real-time performance. The end-to-end latency from IoT sensor data acquisition to model inference and user interface update was measured as approximately 1.7–3.0 s, including network transmission (1.3–1.8 s), preprocessing (0.05–0.10 s), and model inference (0.12–0.63 s depending on the model). All variable units used in the dataset and performance metrics have been explicitly standardized (minutes, kWh, kW, %, TL, km). The charging cost was computed using a static TL/kWh price obtained from the EMRA Şarj@TR platform. Dynamic pricing was not applied in this study, but such an extension is identified as a potential direction for future work.
3. Materials and Methods
This study aims to predict the travel time of autonomous electric taxis based on factors such as the battery charge level, route distance, and charging time. The application model of the study uses IoT-based real-time data obtained from vehicles belonging to an autonomous taxi station located in a selected province. Two different deep learning models, LSTM and GRU, were used for time estimation; the performance of these models was compared to determine the most suitable artificial intelligence architecture. Furthermore, IP-based cybersecurity controls were implemented to prevent unauthorized access during the charging process, ensuring data integrity and security. As shown in
Figure 1, the overall architecture of the study consists of a multi-layered structure encompassing data collection, modeling, time estimation, security control, and IoT communication.
One of the most commonly used methods in deep learning-based time series forecasting is the Recurrent Neural Network (RNN). RNN architectures can make predictions about the future by storing past information in their memory for time-dependent data. However, in classical RNN structures, learning long-term dependencies is limited due to the vanishing gradient problem. This limitation can lead to poor performance, especially in situations where long-term dynamics are modeled, such as energy consumption and duration estimation in autonomous electric vehicles. The LSTM and GRU models developed to solve this problem enable past information to be retained and forgotten more effectively thanks to special gate mechanisms.
3.1. LSTM
The reason for selecting the LSTM model in this study is its ability to analyze the driving behavior and battery consumption trends of autonomous electric taxis over different time intervals using long-term historical data. Time-dependent variables, such as a vehicle’s energy usage and charging frequency during different tasks throughout the day, can be represented more accurately due to the LSTM’s long memory capacity.
Figure 2 shows the LSTM block diagram.
The LSTM consists of three main gates that organize the information stored in the memory: input (
it), forget (
ft), and output (
ot). This structure enables the model to learn long-term dependencies. The basic equations of the LSTM cell are given in Equations (1)–(6).
Here, (Ct) represents the cell state, (ht) represents the hidden state, and (xt) represents the input vector. The LSTM model demonstrates high success in learning long-term relationships such as energy consumption, speed changes, and charging times that occur in past time steps.
3.2. GRU
The reason for selecting the GRU model in this study is that it offers faster model training and lower hardware requirements, which are suitable for the system’s real-time duration estimation needs. Since the data are constantly updated in an IoT-based architecture, it is important that the model can be quickly retrained with new data. In this regard, GRU offers a more advantageous structure compared to LSTM.
Figure 3 shows the GRU block diagram.
The GRU network offers a simpler architecture while still featuring gate mechanisms that control information flow, similar to LSTM. In GRU, the cell state and hidden state are combined, and two gates (update (
zt) and reset (
rt) gates) are used. The fundamental equations of the GRU cell are provided in Equations (7)–(10).
The structural simplicity of GRU enables shorter training times and lower computational costs with fewer parameters.
3.3. ARIMA
The reason for including the ARIMA model in this study is that it represents one of the most widely used statistical approaches for time-series forecasting and provides a strong baseline for evaluating the performance of deep learning models. ARIMA is particularly well-suited for capturing linear temporal dependencies, making it valuable in systems where historical charging durations and station usage patterns exhibit autoregressive behavior. In this regard, ARIMA serves as a benchmark model to compare the learning capabilities of LSTM and GRU networks.
Figure 4 shows the ARIMA block diagram.
The ARIMA model operates by combining three components: the autoregressive (AR) term, the differencing (I) term, and the moving-average (MA) term. This allows ARIMA to model time-series dynamics through past observations, differences between observations, and past forecast errors. The fundamental equations defining the ARIMA (p, d, q) structure are provided in Equation (11).
In the context of this study, ARIMA was used to estimate the travel-to-station time, queue waiting time, and active charging duration. Although ARIMA produced stable results, its performance remained lower than GRU and LSTM, especially due to nonlinear relationships in the charging process and dynamic IoT-based system structure. Nevertheless, ARIMA was included to demonstrate the contrast between classical statistical forecasting and modern deep learning approaches, highlighting the superiority of GRU for real-time duration estimation.
3.4. PROPHET
The reason for incorporating the Prophet model in this study is that it provides a flexible and robust statistical forecasting approach specifically designed for time-series data with seasonal trends, nonlinear patterns, and external influencing factors. Prophet is widely used in large-scale prediction tasks due to its ease of parameter tuning and its ability to decompose a time series into trend, seasonality, and residual components. In this study, Prophet was included as an additional baseline to complement the classical ARIMA model and to further evaluate the performance gap between traditional forecasting methods and deep learning approaches.
Figure 5 shows the Prophet block diagram.
Prophet models a time series using three additive components: trend g(t), seasonality s(t), and holiday or external effects h(t), allowing it to capture both long-term transitions and short-term variations. The fundamental equations representing the structure of the Prophet model are provided in Equation (12).
Within the scope of this study, Prophet was applied to estimate station arrival time, queue waiting time, and charging duration under varying traffic and station usage conditions. Although Prophet produced more accurate results than ARIMA, its performance still remained below that of GRU and LSTM due to the highly nonlinear structure of the charging process, which benefits more from deep learning. Nevertheless, Prophet contributed significantly by offering a modern statistical baseline and highlighting the superiority of GRU in real-time duration forecasting for autonomous electric taxi operations.
3.5. Model Configuration and Rationale
The LSTM and GRU architectures used in this study were intentionally configured as lightweight models to ensure compatibility with the real-time requirements of the IoT-based system. Since the proposed framework continuously receives new data from electric vehicles and charging stations, the model must be able to retrain rapidly and operate with low computational overhead. For this reason, a single-layer recurrent architecture with 50 hidden units, the Adam optimizer, and 50 training epochs was selected as an optimal balance between prediction accuracy and computational efficiency. This configuration enables real-time deployment and frequent re-training without imposing high hardware requirements.
To further strengthen the methodological rigor of the study, ARIMA and Prophet models were incorporated as additional benchmark methods. These traditional time-series approaches allowed for a comprehensive comparison against deep learning models, demonstrating that the GRU architecture provides superior accuracy and lower error rates for station-based charging duration prediction. Thus, the selected deep learning configuration is validated both in terms of performance and suitability for practical deployment.
3.6. Validation Strategy and Data Leakage Prevention
To ensure the reliability, robustness, and generalization capability of the proposed prediction models, a comprehensive multi-layer validation framework was implemented. This framework was designed to prevent temporal and structural data leakage and to verify that the obtained performance values (e.g., R2 > 0.99) result from effective learning rather than repeated or overlapping patterns in the dataset.
First, a temporal hold-out validation strategy was applied. All records were chronologically ordered according to their timestamps, and the final 20% of the sequence was reserved exclusively for testing. This approach ensured that the model was never exposed to future information during training, thereby eliminating temporal leakage and enabling a realistic forward-looking evaluation.
Additionally, 5-fold cross-validation was performed to provide a more statistically reliable performance estimate. Each fold was constructed to include diverse combinations of vehicle station interactions, preventing bias caused by a particular subset of vehicles or stations. The average and standard deviation of the validation metrics across the folds demonstrated that the model performance was stable and not dependent on a specific data split.
As shown in
Table 3, the 5-fold cross-validation results of all models are presented.
The results of the 5-fold cross-validation clearly demonstrate the stability and generalization capability of the proposed models. As shown in the table, the GRU and LSTM models maintain consistently high R2 values across all folds, with very small variance, confirming that their performance does not depend on a specific subset of vehicles or charging stations. GRU achieves the highest average R2 (0.990) with low MAE and MSE values, demonstrating strong and stable predictive behavior. Prophet and ARIMA, on the other hand, exhibit significantly weaker and inconsistent performance across folds, indicating limited ability to capture nonlinear temporal dependencies. These results validate that the recurrent neural network models particularly GRU generalize reliably across different vehicle–station combinations without overfitting or data leakage.
To further assess the model’s generalization to unseen vehicles, a Leave-One-Vehicle-Out (LOVO) validation procedure was implemented. For each of the 100 vehicles, its entire data was removed from training and used solely as a test set. The model successfully maintained high accuracy across all LOVO iterations, confirming that the architecture generalizes to vehicles not present during training.
Table 4 summarizes the Leave One Vehicle Out (LOVO) validation results.
As shown in
Table 3, the model maintains consistently high accuracy even when an entire vehicle’s data is completely excluded from training. The MAE and MSE values remain stable across different battery capacities, and the R
2 scores stay within the 0.986–0.992 range. These results demonstrate that the model does not rely on vehicle-specific patterns and is able to generalize effectively to unseen vehicles, confirming its robustness and applicability in real operational scenarios.
As a precaution against data leakage, the dataset was carefully examined to ensure that identical or near-identical sequences did not appear across the train and test partitions. The temporal splitting and fold configurations were explicitly designed to avoid overlapping sliding windows, thereby minimizing the risk of implicit leakage. Furthermore, the prediction–actual scatter plots for all four models visually confirm that the models learn the underlying temporal patterns rather than memorizing individual samples. The linear alignment between predicted and actual values across different value ranges clearly demonstrates the absence of memorization-based leakage.
Figure 6 shows actual and predicted values for all models.
Figure 6 comparison of actual and predicted charging durations for the four evaluated models (ARIMA, Prophet, GRU, and LSTM). Each scatter plot presents the model outputs on the test dataset, with the diagonal line representing perfect prediction alignment. The GRU and LSTM models exhibit strong linear consistency and minimal dispersion around the diagonal, confirming their ability to capture underlying temporal dependencies. In contrast, ARIMA and Prophet show larger deviations, indicating limited capacity in modeling nonlinear charging behaviors. These plots also serve as visual evidence that the models do not exhibit memorization patterns, supporting the absence of data leakage between training and testing partitions.
Finally, learning curves were generated to analyze the convergence behavior of the models and to confirm that the training and validation losses decrease consistently without signs of overfitting. These curves are provided in
Figure 7 and demonstrate that the model maintains stable training dynamics throughout the optimization process.
Figure 7 illustrates the temporal hold-out (rolling-origin) validation structure used in the study. For each fold, earlier timestamps were allocated to the training set, while the subsequent period was used exclusively as the test set. This setup ensures that the model is evaluated under realistic forecasting conditions without allowing future information to leak into the training process.
This comprehensive validation methodology confirms that the proposed prediction models achieve high performance in a statistically reliable, leakage-free, and generalizable manner.
3.7. IoT
The data collection and communication infrastructure used in this study is based on Internet of Things (IoT) principles. Sensors in autonomous electric taxis transmit the vehicle location, speed, battery status, energy consumption, and charging station connection information to the center in real time.
3.8. Cybersecurity Application
In autonomous electric taxi systems, secure communication between the vehicle and the charging station is essential to prevent unauthorized access, data manipulation, and potential safety risks. For this reason, the proposed framework incorporates a multi-layer cybersecurity structure rather than relying solely on IP matching. While IP verification is used as an initial, fast-access control filter, the system employs several additional protection layers to ensure robustness against real-world cyberattacks.
First, all communication between the autonomous electric taxi and the charging station is protected using TLS-based encrypted channels, which prevent eavesdropping and man-in-the-middle (MITM) attacks. In addition, the system implements mutual authentication, meaning that both the vehicle and the charging station cryptographically verify each other before any charging session.
To further strengthen identity validation, each device in the system is assigned a digital certificate issued by a trusted authority. These certificates allow the system to detect spoofed or unauthorized entities attempting to impersonate legitimate vehicles or stations. Furthermore, the communication protocol follows the secure OCPP structure, in which message signing, encrypted WebSocket communication, and integrity checks protect the system against data tampering, message injection, and session hijacking attempts.
During the charging operation, the system continuously monitors for abnormal activity. If a foreign or unregistered IP address, unexpected certificate mismatch, or an integrity breach is detected at any stage, the charging process is immediately interrupted to protect both the vehicle and the charging infrastructure.
By combining IP verification with TLS encryption, mutual authentication, digital certificates, and secure OCPP communication, the proposed architecture provides a comprehensive, multi-layer defense against cyber threats. This approach significantly enhances the resilience of the system and ensures secure, reliable operation of autonomous electric taxi charging processes.
3.9. Implementation Process
This section details the implementation stages of the developed autonomous electric taxi application step by step. The study aims to predict the travel time of a vehicle to a different location using parameters such as the battery charge level, waiting time at charging stations, and traffic density. To this end, deep learning models based on LSTM and GRU were used, and the most suitable model was determined by comparing the results obtained. In addition to these deep learning models, two statistical forecasting methods, ARIMA and Prophet, were also incorporated into the study to provide a broader methodological comparison and to investigate whether traditional time-series models could effectively capture charging-related temporal patterns. The application development process consists of three main stages: data processing and model training, integration of the prediction algorithm into the system, and design of the user interface. In the first stage, historical driving data, vehicle battery status, distance, traffic information, and charging station location data were combined to create a suitable input structure for the model. The data were applied separately to the LSTM and GRU models, and their prediction performance was evaluated based on the error rate and accuracy metrics. Additionally, ARIMA and Prophet models were trained using the same time-series structure to assess their capability in predicting station arrival time, queue waiting duration, and charging time. The comparative analysis showed that GRU achieved the best performance, followed by LSTM, while ARIMA and Prophet showed limited ability to model nonlinear multi-factor charging durations. In the second stage, the model with the best performance was integrated into the software system. This system can calculate the estimated travel time, possible charging stops, and charging time based on the departure and arrival points specified by the user. During the calculation process, the vehicle’s current battery level is also taken into account. If charging is required, the most suitable station is automatically selected, and the total time is updated accordingly. In the third stage, the application’s interface design was implemented. The interface was designed to be simple and effective, offering a user-friendly structure. Users can select their vehicle and destination city through the system; the system displays the estimated travel time, charging station locations, and total estimated arrival time, including charging time, on the screen. The interface also allows users to monitor the IP-based cybersecurity checks performed during the charging process. When the charging process begins, the system matches the user’s IP address with the station’s IP address; if a different IP is detected during the process, the operation is automatically stopped. To enhance operational security, additional cybersecurity layers were also incorporated into the application, including TLS-encrypted communication between charger and server, mutual authentication to validate both endpoints, and certificate-based authentication for trusted device verification. These layered security mechanisms ensure integrity, authentication, and confidentiality throughout the charging and data-exchange process. The testing phase of the application was carried out using the example of Kocaeli province. Two autonomous electric taxi stands located at different points in the city were used. The first stop was designated as the “Izmit Train Station Taxi Stand” and the other as the “NCITY Taxi Stand.” There were three autonomous electric taxis at each stop, and the technical specifications of these vehicles are shown in
Table 5.
The steps for using the application are listed below:
Location Determination: The user selects their current location and the address they wish to go to using the Google Map-based map module via the interface.
Determining the Nearest Taxi Stand: The system automatically detects the taxi stand closest to the user’s location. This process is carried out using GPS coordinates and distance calculation algorithms.
Vehicle Selection and Preliminary Assessment: The system displays the battery charge level, range capacity, and cost per kilometer information for autonomous vehicles available at the selected taxi stand.
Distance and Time Estimation: The system runs LSTM and GRU-based time estimation models based on the selected vehicle’s battery status and route information. If the trip distance is within the vehicle’s current battery capacity, the customer is shown the total trip time, distance, and estimated cost information.
Determining Charging Requirements: If the target distance cannot be reached with the current battery charge, the system determines the necessary intermediate charging stops based on the battery capacity. In this case, the user is provided with information on the estimated range, charging station location, charging time, and total travel cost.
Initiating the Journey and Charging Process: After user approval, the autonomous vehicle begins moving. During driving, when the battery level drops to 10%, the vehicle is directed to a pre-determined charging station and the automatic charging process begin.
Cybersecurity Verification (IP Check): When the charging process begins, the system performs IP-based authentication. A defined IP match is made between the vehicle and the charging station; if different IP address is detected during the process, the charging process is automatically stopped for security reasons. If no IP change is detected, the charging process is completed and the vehicle continues on its way.
3.10. Energy and Computation Overheads
To evaluate the operational efficiency of the proposed intelligent prediction framework, both the computational load and energy consumption were quantitatively analyzed. All experiments were carried out in an Ubuntu 22.04 environment equipped with an Intel Xeon Silver 4310 processor (2.1 GHz, 16 cores; Intel Corporation, Santa Clara, CA, USA), 64 GB RAM, and an NVIDIA A100 GPU (80 GB VRAM; NVIDIA Corporation, Santa Clara, CA, USA). The training of the deep learning model was completed in approximately 27 min, and the average inference time for a single prediction request through the Flask API was measured as 0.85 s, showing that the system is capable of near–real-time operation. The GPU energy consumption during training was monitored using the NVIDIA-Smi 560.35.05 tool. The average power draw was recorded at 155 W, resulting in a total training energy consumption of approximately 0.07 kWh when multiplied by the training duration. These findings indicate that the proposed framework maintains high predictive performance with low computational and energy overhead, highlighting its feasibility for real-world implementation in smart autonomous taxi systems, either in cloud-based platforms or edge-assisted charging stations.
3.11. Validation and Feature Contribution Analysis
To evaluate the relative importance of the input variables used in the prediction framework, a systematic feature ablation analysis was conducted. In this procedure, each feature was removed from the model input one at a time, and the GRU model was retrained under identical conditions. The resulting changes in MAE and MSE were recorded to quantify the impact of each variable on prediction accuracy. This approach enables the assessment of the model’s dependency on individual features and verifies that the deep learning architecture does not rely on a single dominant variable but instead learns a balanced representation of the underlying charging and travel dynamics.
The results of the analysis demonstrate that the state of charge (SOC) is the most influential variable, followed by station power, travel distance, and traffic level. Variables such as battery capacity, queue waiting time, and charging duration have moderate contributions, while cost-related parameters and IP status exhibit negligible influence on temporal predictions. These findings align with the physical behavior of electric vehicle charging processes and confirm the internal consistency of the proposed model. The detailed ablation results are presented in
Table 6.
Each feature was removed individually, and the resulting increase in MAE and MSE was recorded. Higher increases indicate greater importance of the removed variable. SOC, station power, and travel distance are identified as the most influential factors in predicting travel and charging durations, while cost-related features show minimal impact.
4. Results and Discussion
This section presents the experimental results and analytical evaluations obtained from the LSTM and GRU models applied for travel time estimation and charging time calculation in autonomous electric taxi systems. The findings were addressed in two stages: first, the performance metrics of both deep learning models were compared using evaluation parameters such as the MAE, MSE, R2, and DTW; second, the developed application scenario was demonstrated through a real-world simulation covering route selection, travel cost estimation, and cybersecurity control during the charging process.
The experimental implementation of the proposed prediction models was carried out within the Python 3.12.2 environment. Throughout the development phase, several open-source libraries were utilized to ensure efficient data handling and model construction, including NumPy 2.1.2 for numerical computation, Pandas 2.2.2 for data manipulation, Statsmodels 0.14.4 for statistical processing, Scikit-learn 1.5.2 for evaluation and scaling, Flask 3.0.3 for web-based integration, and Keras 2.4.3 for neural network modeling. These tools collectively facilitated the implementation workflow, encompassing data preprocessing, model training, validation, and deployment within the smart autonomous taxi simulation platform. In configuring the models, a set of manually tuned hyperparameters was adopted to maintain consistent optimization performance during the training process. Once established, these parameters remained unchanged across all experiments to ensure the reproducibility and comparability between architectures. Both the LSTM and GRU networks were trained using the Adam optimizer with a fixed learning rate of 0.001. To balance the computational efficiency and model stability, each training session employed a batch size of 16 and spanned 50 epochs. The dataset included 10 temporal charging intervals, each corresponding to 10 min of charging activity, enabling the models to effectively the capture temporal dependencies and non-linear patterns related to vehicle charging behaviors.
The final hyperparameter configuration that produced the most stable and accurate outcomes for both neural network models is presented in
Table 7.
The comparative evaluation of the proposed deep learning models was conducted using the optimal parameter settings that yielded the best results for each architecture.
Figure 6 presents the R
2, DTW, and distance-based performance metrics obtained from the models trained on the charging data collected from 50 charging stations and 100 electric vehicles in Kocaeli.
An R
2 value close to 1 indicates high prediction accuracy and a strong correlation between the predicted and actual charging times. The R
2 scores of LSTM and GRU models were found to be above 0.99, demonstrating their reliability in estimating charging durations. Arima showed a score of −2.19 and prophet showed a score of 0.13. In contrast, the DTW metric measures the similarity between predicted and actual time-series data; therefore, lower DTW values indicate better temporal alignment. The GRU model achieved a DTW score of 125.35, while the LSTM model obtained a slightly higher score of 126.97, indicating very close performance. Prophet model achieved a DTW score of 185, while the Arima model obtained a slightly higher score of 454 (
Figure 8).
Figure 9 shows the MAE and MSE results for both models. Since min–max normalization was applied to all numerical inputs before training, MAE was computed on normalized (0–1 scaled) data and is therefore unitless. In contrast, MSE and RMSE were calculated using the real-scale target variable (‘Expected Time’, in minutes). This difference explains why MAE appears smaller than MSE. Lower values in these metrics reflect higher accuracy and less deviation between predicted and actual values. The Arima model achieved an MAE of 2.3 and an MSE of 6.5, while the Prophet model reached an MAE of 0.6 and an MSE of 4.2. The GRU model achieved an MAE of 0.37 and an MSE of 2.91, while the LSTM model reached an MAE of 0.50 and an MSE of 3.09. Based on these error metrics, the GRU slightly outperformed the LSTM, providing more stable and accurate predictions in estimating the total charging time for electric vehicles.
Figure 10 shows two autonomous electric vehicle taxi stops located in Kocaeli Province.
In this study, autonomous taxi stands were placed at two locations: “Izmit Train Station Taxi Stand” and “Izmit NCITY Mall Taxi Stand.” There are three autonomous electric taxis at each taxi stand.
Figure 11 shows the location of the “Izmit Train Station Taxi Stand” autonomous taxi stand, the number of taxis at the stand, and the battery capacity, battery charge level, and cost per km for each of these taxis.
Figure 12 shows the location of the autonomous taxi stand “Izmit NCITY Mall Taxi Stand,” the number of taxis at the stand, and the battery capacity, battery charge level, and cost per kilometer for each of these taxis.
Figure 13 shows the customer’s location and destination marked on the map. Information about both locations was obtained. Since the trip starts and ends within the city, it does not require a charging process.
Figure 14 shows an urban journey made with an autonomous electric taxi. The distance for the trip is 2.1 km, and the trip duration is 3.8 min. For this trip, an autonomous electric taxi was chosen from the “Izmit NCITY Mall Taxi Stand,” which is the closest taxi stand to the starting point. The cost was calculated as TL 3.15 for a 2 km distance, with a payment of TL 1.5 per km.
Figure 15 shows the starting and ending points for intercity travel. The starting point is a location in the İzmit district of Kocaeli Province, while the destination is the Kepez district of Antalya Province.
Charging is required for intercity travel.
Figure 16 shows the nearest autonomous taxi for intercity travel, battery capacity, current charge level, range possible with this charge level, total distance, and cost information, which is provided to the customer before arriving at the taxi stand. For a trip starting in Kocaeli-Izmit and ending in Antalya-Kepez, an autonomous taxi with a battery capacity of 60 kWh and a charge level of 55% was recommended from the “Izmit NCITY Mall Taxi Stand.” The range of this autonomous taxi with its current battery charge level is 165 km. The vehicle will need to be charged after 165 km. The total distance is approximately 612 km. The travel time was calculated to be approximately 444 min (about 7 h) using the GRU model, as it provided a more accurate estimate. The travel cost with the recommended autonomous taxi was calculated to be approximately TL 735.
The customer has obtained the trip details without going to the taxi stand.
Figure 17 shows the customer starting the trip based on this information. Here, the trip began with the information that the vehicle started driving with a battery charge of 55%, that a total of 612 km would be traveled, and that this trip would take approximately 444 min.
The range of the autonomous electric taxi was determined to be 165 km based on its battery capacity and current charge level.
Figure 18 shows that during the journey, the vehicle alerts the driver when the battery charge falls below 10% and directs the vehicle to a charging station previously identified along the route.
Figure 19 shows the IP matching performed before the autonomous electric taxi begins charging at the designated charging station.
Figure 20 shows TLS encryption security mechanism before the autonomous electric taxi begins charging at the designated charging station.
Figure 21 shows mutual authentication security mechanism before the autonomous electric taxi begins charging at the designated charging station.
Figure 22 shows the certificate-based authentication security mechanism before the autonomous electric taxi begins charging at the designated charging station.
Figure 23 shows the secure OCPP security mechanism before the autonomous electric taxi begins charging at the designated charging station.
Figure 24 shows that the charging process has started after the IP matching. If no foreign IP is detected during the charging process, the charging process will be completed. If a foreign IP is detected, the charging process will be stopped.
This application scenario demonstrates that the developed system not only predicts the travel time and the cost of autonomous electric taxis in advance, but also provides a secure, efficient, and smart transportation infrastructure by ensuring cybersecurity during the charging process.
5. Conclusions
This study presents a comprehensive and intelligent prediction framework designed to estimate both travel duration and charging time for autonomous electric taxi systems. The proposed approach combines deep learning models (LSTM and GRU), statistical forecasting methods (ARIMA and Prophet), and IoT-based real-time data communication. Additionally, an IP-based authentication mechanism is incorporated into the system to ensure secure charging operations, forming an integrated structure that addresses prediction, operational automation, and cybersecurity together. Experiments were conducted using real charging station locations, 50 stations and 100 electric vehicles within Kocaeli Province. Among the four evaluated methods, the GRU model achieved the highest performance, producing the lowest the MAE, MSE, and DTW values and demonstrating strong temporal consistency. LSTM followed closely, while ARIMA and Prophet showed weaker performance for nonlinear and multi-factor charging durations. These findings confirm that recurrent neural networks provide a more effective representation of the temporal dynamics inherent in electric vehicle charging processes. Beyond prediction accuracy, the developed system contributes significantly as a decision-support tool. Users can obtain travel time, charging needs, and cost estimates before initiating a trip, while operators can utilize model outputs to optimize station usage, traffic distribution, and autonomous fleet management. The IP-authentication layer further enhances operational reliability by preventing unauthorized access during the charging process and ensuring secure system communication.
In future work, model accuracy and system robustness may be improved by incorporating variables such as real-time traffic density, temperature, elevation profile, and road conditions into the predictive models. Furthermore, integrating reinforcement learning for adaptive route selection and dynamic charging optimization may enhance the autonomy of the system. These advancements will contribute to the development of a more scalable and cyber-secure intelligent transportation ecosystem for next-generation electric mobility.
Although deep learning-based time-series models do not inherently produce direct variable importance rankings, the contribution of each variable in this study was assessed through their influence on model performance. Experimental findings indicate that the variables with the greatest impact on prediction accuracy are the state of charge (SOC), station power capacity, and the vehicle’s battery capacity. Additionally, parameters such as queue waiting time and arrival time to the station were observed to significantly affect prediction accuracy, particularly in long-distance scenarios. This analysis demonstrates that the GRU model effectively captures temporal dependencies and that its prediction performance is largely consistent with the underlying physical processes.