The rapid growth of electric vehicle adoption in China has introduced significant challenges to power grid stability and operational efficiency. As the number of electric vehicles on the road increases, accurately predicting their charging load becomes crucial for grid management, resource allocation, and ensuring reliable energy supply. Traditional load forecasting methods often struggle to capture the complex, non-linear patterns inherent in electric vehicle load data, particularly when influenced by external factors like weather conditions and user behavior. In this article, I propose a novel short-term load forecasting model for electric vehicles that integrates the Sparrow Search Algorithm (SSA) with a Bidirectional Gated Recurrent Unit (BiGRU) and Convolutional Neural Network (CNN) to enhance prediction accuracy. This model not only leverages historical load data but also incorporates a fluctuation data correction mechanism to account for weather-induced variations, making it highly suitable for real-world applications in China’s evolving electric vehicle landscape.

The proliferation of electric vehicles in China is driven by government policies, environmental concerns, and technological advancements, leading to a surge in charging demand that strains existing power infrastructure. Electric vehicle load forecasting is essential for utilities to balance supply and demand, prevent overloads, and integrate renewable energy sources effectively. However, electric vehicle load data exhibits high volatility due to factors like charging patterns, temperature changes, and day-of-week effects, which complicate prediction tasks. Existing approaches, such as those based on Back Propagation (BP) neural networks or Long Short-Term Memory (LSTM) models, often fail to fully exploit temporal dependencies or handle external influences efficiently. For instance, while LSTM networks capture sequential relationships, they may overlook bidirectional context, and methods that combine multiple features without proper filtering can introduce noise. Moreover, optimizing hyperparameters manually in these models is time-consuming and prone to suboptimal results. To address these issues, I develop a hybrid SSA-BiGRU-CNN framework that automates parameter tuning and enhances feature extraction, specifically tailored for electric vehicle load forecasting in China.
The core of my model lies in combining the strengths of BiGRU and CNN architectures, optimized using SSA. The BiGRU component processes historical load data in both forward and backward directions, capturing long-range dependencies and temporal patterns that are critical for electric vehicle charging behavior. This is represented mathematically as follows: the output of the BiGRU at time step \( t \) is given by:
$$ \begin{aligned} A_t &= f(W A_{t-1} + U x_t) \\ A’_t &= f(W’ A’_{t+1} + U’ x_t) \\ y_t &= g(V A_t + V’ A’_t) \end{aligned} $$
where \( A_t \) and \( A’_t \) are the hidden states for forward and backward passes, respectively, \( W, W’, U, U’, V, V’ \) are trainable weight matrices, \( x_t \) is the input at time \( t \), \( f \) is the GRU activation function, and \( g \) is the output activation function. This bidirectional approach allows the model to learn from past and future contexts simultaneously, improving its ability to predict electric vehicle load fluctuations. Meanwhile, the CNN layer applies convolutional filters to extract local features from the load data, such as peak demand periods or seasonal trends, which are common in electric vehicle charging patterns. The CNN operations can be summarized as:
$$ z = \sigma \left( \sum_{i=1}^{k} w_i \cdot x_{i:i+h-1} + b \right) $$
where \( z \) is the feature map output, \( \sigma \) is the activation function, \( w_i \) are the weights of the convolutional kernel, \( x_{i:i+h-1} \) is the input segment, \( h \) is the kernel size, and \( b \) is the bias term. By stacking multiple layers, the CNN identifies hierarchical patterns that are vital for accurate electric vehicle load forecasting.
To optimize the BiGRU-CNN model, I employ the Sparrow Search Algorithm (SSA), which mimics the foraging behavior of sparrows to efficiently search for optimal hyperparameters. SSA divides the population into discoverers and followers, with some individuals acting as watchers to avoid local optima. The algorithm iteratively updates positions based on fitness evaluations, ensuring convergence to the best parameters for learning rate, batch size, hidden layer neurons, and convolutional kernel settings. This optimization process reduces the manual effort required and enhances model performance, as demonstrated in later experiments. The fitness function for SSA is defined as the minimization of prediction errors, such as Mean Absolute Percentage Error (MAPE), which is crucial for electric vehicle applications where even small inaccuracies can lead to grid instability.
In addition to the primary forecasting model, I introduce a fluctuation data correction module to handle external factors like temperature and day type (e.g., weekdays vs. weekends). These factors have a significant impact on electric vehicle charging behavior in China, as shown by Pearson correlation analysis. The Pearson correlation coefficient between two variables \( X \) and \( Y \) is calculated as:
$$ r = \frac{\sum_{i=1}^{n} (X_i – \bar{X})(Y_i – \bar{Y})}{\sqrt{\sum_{i=1}^{n} (X_i – \bar{X})^2} \sqrt{\sum_{i=1}^{n} (Y_i – \bar{Y})^2}} $$
where \( n \) is the number of samples, \( \bar{X} \) and \( \bar{Y} \) are the means of \( X \) and \( Y \), respectively. Based on this analysis, I select highly correlated features—specifically, maximum temperature and day type—as inputs for the correction model. The BiGRU-CNN network is then used to predict the error between the initial forecast and actual load, and this error is subtracted to refine the final output. This two-stage approach ensures that weather-induced fluctuations are accurately accounted for, leading to more reliable electric vehicle load predictions.
For experimental validation, I use a dataset from an electric vehicle charging station in Shaanxi, China, covering the period from December 1, 2021, to June 1, 2022, with hourly sampling. The dataset includes 4,344 data points, split into 3,480 for training and 864 for testing. I evaluate the model for short-term forecasting horizons of 4 hours and 24 hours, comparing it against two baseline methods: Method 1, which uses SSA-BiGRU-CNN without fluctuation correction, and Method 2, which incorporates all influencing factors directly into the model without correction. The performance is assessed using standard metrics: Mean Absolute Percentage Error (MAPE), Root Mean Square Error (RMSE), and Mean Absolute Error (MAE), defined as:
$$ \text{MAPE} = \frac{1}{N} \sum_{i=1}^{N} \left| \frac{y_i – \hat{y}_i}{y_i} \right| \times 100\% $$
$$ \text{RMSE} = \sqrt{\frac{1}{n} \sum_{i=1}^{n} (y_i – \hat{y}_i)^2} $$
$$ \text{MAE} = \frac{1}{n} \sum_{i=1}^{n} |y_i – \hat{y}_i| $$
where \( y_i \) is the actual load, \( \hat{y}_i \) is the predicted load, and \( N \) is the number of samples. The parameter settings for the BiGRU and CNN components are optimized via SSA, as summarized in the table below:
| Component | Parameter | Optimization Range |
|---|---|---|
| BiGRU | Hidden Layer Neurons | [10, 20, 30, 50, 70, 100, 150, 200, 300] |
| Batch Size | [8, 16, 32, 64, 128, 256, 512] | |
| Learning Rate | [0.001, 0.01, 0.1, 0.3, 0.5, 0.7, 1] | |
| CNN | Convolutional Kernels | [8, 16, 32, 64, 128, 256, 512] |
| Stride | [1, 2, 3, 4, 5] | |
| Learning Rate | [0.001, 0.01, 0.1, 0.2, 0.3, 0.5, 0.8, 1] |
The results demonstrate that my proposed model (Method 3) outperforms the baselines across both forecasting horizons. For a 4-hour ahead prediction, the model achieves a MAPE of 2.21% on weekdays and 3.37% on weekends, significantly lower than Method 1 (5.25% and 7.20%) and Method 2 (3.55% and 4.98%). Similarly, for 24-hour ahead predictions, the MAPE values are 4.59% on weekdays and 5.03% on weekends, compared to 7.39% and 7.47% for Method 1, and 5.11% and 5.90% for Method 2. This improvement is consistent across RMSE and MAE metrics, highlighting the effectiveness of the fluctuation correction mechanism in handling external variabilities specific to electric vehicle load in China. The table below provides a detailed comparison of the prediction errors for the 4-hour horizon:
| Day Type | Method | RMSE (kW) | MAE (kW) | MAPE (%) |
|---|---|---|---|---|
| Weekday | Method 1 | 14186.0 | 12202.0 | 5.25 |
| Method 2 | 9818.5 | 8290.0 | 3.55 | |
| Method 3 (Proposed) | 5033.4 | 4176.6 | 2.21 | |
| Weekend | Method 1 | 15630.0 | 13217.0 | 7.20 |
| Method 2 | 12038.0 | 10339.0 | 4.98 | |
| Method 3 (Proposed) | 5866.7 | 4743.2 | 3.37 |
Furthermore, the model’s ability to generalize is evident in its consistent performance across different days, which is essential for practical deployments in China’s diverse electric vehicle ecosystem. The integration of SSA optimization reduces training time and computational cost, making the approach scalable for large-scale applications. For instance, the BiGRU-CNN model with SSA converges faster than traditional grid search methods, as the algorithm efficiently navigates the parameter space. This is particularly beneficial for electric vehicle load forecasting, where real-time updates are often required.
In conclusion, the SSA-BiGRU-CNN model with fluctuation data correction offers a robust solution for short-term electric vehicle load forecasting, addressing key challenges in China’s power grid management. By leveraging bidirectional temporal learning, local feature extraction, and intelligent parameter optimization, the model achieves high accuracy and stability. Future work could focus on incorporating additional factors, such as user behavior analytics or real-time traffic data, to further enhance predictions. As the adoption of electric vehicles continues to rise in China, advanced forecasting tools like this will play a pivotal role in ensuring grid reliability and promoting sustainable energy practices.
