Electric Vehicle Load Spatial-Temporal Forecasting Based on GRU-LSTM Model

Abstract

The rapid growth of electric vehicle (EV) ownership and their large-scale integration into the power grid have posed significant challenges to the planning and operation of new power systems. To enhance the rationality of dynamic expansion planning for future charging stations, this study proposes a spatial-temporal forecasting method for EV loads based on a hybrid model of Gated Recurrent Unit (GRU) and Long-Short-Term Memory (LSTM) neural networks (GRU-LSTM). We preprocess the National Household Travel Survey (NHTS) dataset to retain typical state information, establish a data-driven model through GRU-LSTM training, and import predicted travel data into a load calculation model to achieve spatial-temporal forecasting for actual road network nodes. Experimental results validate the effectiveness and superiority of the proposed method in predicting EV load distributions.

1. Introduction

As the world shifts toward green and low-carbon energy transitions, electric vehicles (EVs) have emerged as a pivotal solution to address climate change and energy shortages due to their low energy consumption and zero emissions. However, the large-scale integration of EVs into the power grid, both as transportation tools and “mobile load” carriers, has intensified the coupling between transportation and power networks. This integration necessitates accurate and efficient forecasting of EV charging and discharging loads to mitigate potential negative impacts on grid operation .

Current EV load forecasting methods primarily fall into two categories: model-driven and data-driven. Model-driven approaches, such as Monte Carlo, Markov chains, and travel chain methods, construct probability models but often suffer from reduced efficiency and random errors, limiting their universality. In contrast, data-driven methods, especially those leveraging neural networks, exhibit superior accuracy and generalization capabilities for nonlinear system prediction. Notable examples include LSTM-based models for short-term charging demand forecasting and hybrid neural network models considering factors like temperature and real-time prices .

However, existing studies predominantly rely on charging station data, resulting in partitioned predictions that fail to precisely forecast loads at road network nodes. By shifting the focus to user-side analysis, we aim to transform passive charging station-based predictions into active user-driven predictions, enhancing flexibility and universality. This study introduces a GRU-LSTM hybrid model to leverage the efficiency of GRU and the accuracy of LSTM, enabling more precise spatial-temporal load forecasting for EVs .

2. Methodology

2.1 User Characteristic Data Preprocessing

The National Household Travel Survey (NHTS) dataset is a representative source of transportation statistics, containing 58 user state information entries, including user characteristics and trip details. However, the dataset suffers from heterogeneity, missing values, and outliers, which necessitate preprocessing .

We adopt a direct elimination method for abnormal data to ensure comparability and retain state information highly relevant to EV travel. Given the diverse dimensions and scales of the data, we perform normalization using the following formulas:\(\begin{cases} x_{\text{norm}} = \frac{x_0 – x_{\text{min}}}{x_{\text{max}} – x_{\text{min}}} \\ x_{\text{scaled}} = x_{\text{norm}}(x_{\text{max}} – x_{\text{min}}) + x_{\text{min}} \end{cases}\) where \(x_{\text{norm}}\) is the normalized result, \(x_0\) is the original feature data, and \(x_{\text{min}}\) and \(x_{\text{max}}\) are the minimum and maximum values in the dataset, respectively .

Table 1: Description of Selected User Characteristic Data

Feature CategoryExamplesRelevance to EV Travel
User DemographicsAge, gender, household sizeInfluences travel frequency and patterns
Trip AttributesTrip start time, duration, distanceDirectly impacts EV energy consumption
Vehicle CharacteristicsEV type, battery capacityDetermines charging demand and range

2.2 GRU-LSTM Hybrid Neural Network

2.2.1 LSTM Neural Network

LSTM, an improved variant of Recurrent Neural Networks (RNNs), effectively addresses long-term dependency issues and gradient vanishing/exploding problems. Its core mechanism involves updating cell states through forget gates, input gates, and output gates to capture temporal correlations .

  • Forget Gate: Determines information to discard:\(f_t = \sigma(W_f[h_{t-1}, x_t] + b_f)\) where \(\sigma\) is the Sigmoid activation function, \(W_f\) is the weight matrix, \(h_{t-1}\) is the previous output, \(x_t\) is the current input, and \(b_f\) is the bias vector 🔶1-60🔶🔶1-61🔶🔶1-62🔶🔶1-63🔶.
  • Input Gate: Determines information to store in the cell state:\(\begin{cases} i_t = \sigma(W_i[h_{t-1}, x_t] + b_i) \\ \tilde{c}_t = \tanh(W_c[h_{t-1}, x_t] + b_c) \end{cases}\) where \(i_t\) is the input gate output, and \(\tilde{c}_t\) is the candidate cell state .
  • Cell State Update:\(c_t = f_t \cdot c_{t-1} + i_t \cdot \tilde{c}_t\) where \(c_t\) and \(c_{t-1}\) are the current and previous cell states .
  • Output Gate: Determines information to output:\(\begin{cases} o_t = \sigma(W_o[h_{t-1}, x_t] + b_o) \\ h_t = o_t \cdot \tanh(c_t) \end{cases}\) where \(o_t\) is the output gate output, and \(h_t\) is the current output .
2.2.2 GRU Neural Network

GRU simplifies LSTM by merging the forget and input gates into an “update gate,” reducing training parameters and improving efficiency. It includes two gates: an update gate (determines historical information transmission) and a reset gate (determines historical information discard) .

  • Update and Reset Gates:\(\begin{cases} z_t = \sigma(W_z[h_{t-1}, x_t] + b_z) \\ r_t = \sigma(W_r[h_{t-1}, x_t] + b_r) \end{cases}\) where \(z_t\) is the update gate, \(r_t\) is the reset gate, and \(W_z, W_r, b_z, b_r\) are weight matrices and biases .
  • Candidate Hidden State:\(\tilde{h}_t = \tanh(W_h[r_t \cdot h_{t-1}, x_t] + b_h)\)
  • Hidden State Update:\(h_t = (1 – z_t) \cdot h_{t-1} + z_t \cdot \tilde{h}_t\) where \(h_t\) balances previous and candidate hidden states based on the update gate .
2.2.3 GRU-LSTM Hybrid Model

The GRU-LSTM model integrates GRU’s efficiency and LSTM’s accuracy, as illustrated in Figure 1 (omitted here). GRU layers extract temporal features rapidly, while LSTM layers capture long-term dependencies. Dropout layers are added after each layer to prevent overfitting, and a fully connected (FC) layer outputs predictions .

3. EV Load Spatial-Temporal Forecasting Based on Actual Road Networks

3.1 Actual Road Network Model

We model the transportation network using coordinate and path data of real road nodes, calculating path lengths and generating a network topology. Taking a region in Yangpu District, Shanghai, as an example, the road network and its topology include 53 nodes (1-53). We use Dijkstra’s algorithm to compute the shortest path in the weighted graph, considering factors like distance, travel time, and congestion .

The driving cost \(U_j\) for the j-th edge is:\(U_j = \sum_j \left( \frac{d_j}{v_j} \right) w_j\) where \(d_j\) is the distance, \(v_j\) is the speed, and \(w_j\) is the weight factor accounting for time cost and congestion .

3.2 EV Load Calculation Model

3.2.1 State of Charge (SOC) Update

When an EV’s SOC drops below 20%, a charging demand is triggered. The SOC update formula is:\(\text{SOC}_t = \text{SOC}_{t-1} – \frac{Q \cdot d_j}{S_{\text{max}}}\) where Q is the power consumption per unit distance, \(d_j\) is the travel distance, and \(S_{\text{max}}\) is the maximum battery capacity .

3.2.2 Travel Time Calculation

Travel time between nodes is:\(T_t = T_{t-1} + \frac{d_j}{v_j} \times 60\) where \(T_t\) and \(T_{t-1}\) are the current and previous travel times in minutes .

3.2.3 Charging Time Calculation

Charging time to reach the target SOC is:\(T_C = \frac{(\text{SOC}_{\text{set}} – \text{SOC}_{\text{cur}}) \cdot S_{\text{max}} \times 60}{P_C}\) where \(\text{SOC}_{\text{set}}\) is the target SOC, \(\text{SOC}_{\text{cur}}\) is the current SOC, and \(P_C\) is the charging power .

3.2.4 Load Matrix and Total Load Calculation

We use a load matrix to record node loads over time, with updates and total load calculation as:\(\begin{cases} L_t = L_{t-1} + P_C \\ L_{\text{sum}} = \sum_{i=1}^{1440} L(i, \cdot) \end{cases}\) where \(L_t\) and \(L_{t-1}\) are current and previous node loads, and \(L(i, \cdot)\) is the total load at the i-th minute .

3.3 Forecasting Workflow

The GRU-LSTM-based EV load spatial-temporal forecasting workflow involves:

  1. Preprocessing NHTS data to obtain a complete dataset.
  2. Building the GRU-LSTM model for data-driven modeling.
  3. Generating predicted travel data by mapping user characteristics to travel patterns.
  4. Importing predicted data into the load calculation model for spatial-temporal load forecasting on real road networks.
  5. Validating model effectiveness through evaluation metrics .

4. Experimental Analysis

4.1 Case Overview

We use the latest public NHTS dataset, selecting 50,000 valid user state records. After preprocessing, 8,493 valid records form the typical user feature dataset, divided into training (80%) and testing (20%) sets. The model is built using MATLAB R2021b on an Intel Core i5-1155G7 CPU with 16 GB RAM .

The neural network architecture includes:

  • GRU layer: 50 hidden units for feature extraction.
  • LSTM layer: 32 hidden units for temporal relationship learning.
  • Dropout rate: 0.2 to prevent overfitting.
  • Training: Adam optimization algorithm, mini-batch gradient descent (batch size = 128), maximum iterations = 1,000, initial learning rate = 0.01 (20% decay every 20 epochs) .

EV load calculation parameters:

  • Target SOC: 95%
  • Maximum battery capacity: 80 kWh
  • Maximum travel distance: 270 km
  • Power consumption per km: 0.296 kWh/km .

4.2 Evaluation Metrics

We use four metrics to evaluate model performance:

  • Root Mean Square Error (RMSE):\(E_{\text{RMS}} = \sqrt{\frac{1}{n} \sum_{i=1}^{n} (y_i – \hat{y}_i)^2}\)
  • Coefficient of Determination (\(R^2\)):\(R^2 = \frac{\sum_{i=1}^{n} (\hat{y}_i – \overline{y})^2}{\sum_{i=1}^{n} (y_i – \overline{y})^2}\)
  • Mean Absolute Error (MAE):\(E_{\text{MA}} = \frac{1}{n} \sum_{i=1}^{n} |y_i – \hat{y}_i|\)
  • Mean Bias Error (MBE):\(E_{\text{MB}} = \frac{1}{n} \sum_{i=1}^{n} (y_i – \hat{y}_i)\) where n is the sample size, \(y_i\) is the true value, \(\hat{y}_i\) is the predicted value, and \(\overline{y}\) is the mean .

4.3 Data-Driven Modeling Results

The GRU-LSTM model was trained to map user characteristics to travel patterns. Predicted EV travel data (start time, duration) closely matched real data, with start times concentrated between 8:00 and 18:00 and most trips lasting <2 hours, aligning with original travel patterns .

Table 2: Comparison of Prediction Metrics for GRU, LSTM, and GRU-LSTM Models

ModelData TypeRMSE\(R^2\)MAEMBEPrediction Time (s)
GRUTrip Start Time20.68120.994215.79721.224980.0
Trip Duration10.24740.99587.2924-0.805641.0
Average15.46430.995011.54480.209760.5
LSTMTrip Start Time19.52410.994315.69170.747394.0
Trip Duration8.84850.99636.2906-0.168643.0
Average14.18630.995310.99120.289468.5
GRU-LSTMTrip Start Time18.04790.994914.7102-0.0691103.0
Trip Duration8.33370.99656.07890.088352.0
Average13.19080.995710.39460.009677.5

Table 2 shows that the GRU-LSTM model outperforms single GRU and LSTM models in prediction accuracy (lower RMSE, MAE, and MBE, higher \(R^2\)) while balancing prediction efficiency .

4.4 EV Load Spatial-Temporal Forecasting Results

Importing GRU-LSTM predicted travel data into the load calculation model reveals the EV load spatial distribution. Figure 2 (omitted here) shows a 3D and 2D view of load distribution, with higher loads at nodes 20, 44, and 52, likely due to their edge locations and longer commute distances, leading to more charging demands .

Temporally, the GRU-LSTM model’s load prediction matches real travel records, with a peak around 12:00 and valleys from 0:00-5:00 and 20:00-24:00, reflecting actual user travel patterns. This demonstrates the model’s effectiveness in capturing both spatial and temporal load characteristics .

5. Conclusion

This study presents a GRU-LSTM-based spatial-temporal forecasting method for EV loads, integrating GRU’s efficiency and LSTM’s accuracy to model user-driven data and predict loads on real road networks. Experimental results confirm that the proposed method achieves higher prediction precision and efficiency than single GRU or LSTM models, providing a robust foundation for future charging station planning, including location decision-making and capacity design.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top