With the rapid growth of the electric car market, particularly in regions like China EV, the integration of large-scale electric vehicles into the power grid has introduced significant challenges in load management. Accurate short-term charging load prediction is crucial for optimizing grid scheduling, enhancing stability, and supporting the transition to sustainable energy. Traditional prediction methods often struggle with the high variability and randomness of electric car charging behaviors, leading to suboptimal performance. To address this, we propose a novel approach combining gray limited dynamic spectrum clustering (GLDSC) with an enhanced Autoformer model, termed ConvAutoformer, for improved forecasting accuracy. This method leverages the temporal and spatial differences in charging patterns to cluster data effectively and extract salient features for prediction. In this paper, we detail the methodology, experimental setup, and results, demonstrating the superiority of our model over existing techniques in handling the complexities of China EV charging loads.

The proliferation of electric cars worldwide, especially in China EV markets, has underscored the need for reliable load forecasting to mitigate grid instability. Electric car charging loads exhibit non-linear and periodic characteristics influenced by user behavior, environmental factors, and infrastructure constraints. Conventional prediction models, such as those based on neural networks or Transformer architectures, often fail to capture these nuances due to inadequate feature extraction and clustering. Our work introduces a hybrid model that integrates advanced clustering techniques with deep learning to enhance prediction precision. By focusing on the unique aspects of electric car data, we aim to provide a robust solution for grid operators and policymakers in the evolving landscape of China EV adoption.
In the following sections, we first review the foundational algorithms, including spectral clustering and Autoformer, before presenting our GLDSC-ConvAutoformer framework. We then describe the experimental design using real-world electric car charging data, followed by a comprehensive analysis of results. The paper concludes with insights into the model’s implications for future electric car integration and grid management.
Methodology
Our approach consists of two main components: data preprocessing using gray limited dynamic spectrum clustering (GLDSC) and load prediction using the ConvAutoformer model. The GLDSC algorithm improves upon traditional spectral clustering by incorporating a gray relational degree model based on limited dynamic time warping (LDTW) distance. This allows for better handling of the temporal misalignments and periodicities in electric car charging data. The ConvAutoformer model enhances the standard Autoformer by integrating dual convolutional layers for feature extraction, addressing issues like prediction oscillation and feature degradation in deep networks.
Data Preprocessing
To normalize the electric car charging load data, we apply Z-score standardization, which preserves the shape of the load curves while reducing scale effects. For a dataset of electric car daily load curves, each represented as $P_i = [p_{i,1}, p_{i,2}, \dots, p_{i,T}]$, where $p_{i,j}$ denotes the load value for the $i$-th electric car at time $j$, the standardized value is computed as:
$$ P’_i = \frac{P_i – \mu_i}{\sigma_i} $$
where $\mu_i = \frac{1}{n} \sum_{j=1}^{n} p_{i,j}$ is the mean and $\sigma_i = \sqrt{\frac{1}{n} \sum_{j=1}^{n} (p_{i,j} – \mu_i)^2}$ is the standard deviation. This results in a normalized matrix $P’$ with dimensions $N \times T$, where $N$ is the number of electric car load curves and $T$ is the number of time intervals.
The GLDSC algorithm begins by computing the initial and zero-start images of the normalized sequences. For a sequence $X_i(t)$, the zero-start image is given by:
$$ X_i(t) = p’_i(t) – p’_i(0) $$
Next, we use the LDTW algorithm to calculate the distance matrix and path length between electric car load curves. LDTW restricts the warping path to a limited window, reducing computational time and addressing pathological alignments. The gray relational degree based on LDTW distance is then computed as:
$$ \gamma(X_0, X_i) = \frac{\min_m \min_n |x_0(t_0) – x_i(t_i)| + \xi \max_m \max_n |x_0(t_0) – x_i(t_i)|}{\text{LDTW}(X_0, X_i)/\lambda + \xi \max_m \max_n |x_0(t_0) – x_i(t_i)|} $$
where $\xi = 0.5$ is the resolution coefficient and $\lambda$ is the path length from LDTW. This gray relational degree matrix serves as the similarity matrix for spectral clustering. The Laplacian matrix $L$ is constructed as $L = S – D$, where $D$ is the degree matrix and $S$ is the similarity matrix. After normalization, we perform K-means++ clustering on the eigenvectors, with the optimal number of clusters $k$ determined by the elbow method using silhouette scores.
ConvAutoformer Model
The ConvAutoformer model builds on the Autoformer architecture, which decomposes time series into trend and periodic components. For an input sequence $\chi \in \mathbb{R}^{L \times d}$, the decomposition is expressed as:
$$ \chi_t = \text{AvgPool}(\text{Padding}(\chi)) $$
$$ \chi_s = \chi – \chi_t $$
where $\chi_t$ and $\chi_s$ represent the trend and periodic components, respectively. The Autoformer employs an encoder-decoder structure with series decomposition blocks and auto-correlation mechanisms. However, to enhance feature extraction, we introduce dual convolutional layers before the Autoformer. The first convolutional layer uses a kernel size of $3 \times 1$ with 7 filters, and the second uses $2 \times 1$ with 5 filters. This allows the model to capture local patterns and reduce noise in electric car charging data.
The encoder processes the periodic components, while the decoder accumulates trend components. The overall equations for the $l$-th decoder layer are:
$$ S^{l,1}_{de}, T^{l,1}_{de} = \text{SeriesDecomp}(\text{Auto-Correlation}(\chi^{l-1}_{de}) + \chi^{l-1}_{de}) $$
$$ S^{l,2}_{de}, T^{l,2}_{de} = \text{SeriesDecomp}(\text{Auto-Correlation}(S^{l,1}_{de}, \chi^N_{en}) + S^{l,1}_{de}) $$
$$ S^{l,3}_{de}, T^{l,3}_{de} = \text{SeriesDecomp}(\text{FeedForward}(S^{l,2}_{de}) + S^{l,2}_{de}) $$
$$ T^l_{de} = T^{l-1}_{de} + \omega_{l,1} * T^{l,1}_{de} + \omega_{l,2} * T^{l,2}_{de} + \omega_{l,3} * T^{l,3}_{de} $$
where $\omega_{l,i}$ are projection weights. The final prediction is the sum of the refined periodic and trend components: $\omega_S * \chi^M_{de} + T^M_{de}$. By integrating convolutional layers, the ConvAutoformer mitigates top and bottom prediction oscillations and improves feature representation for electric car load forecasting.
Experimental Design
We evaluate our model using real-world data from electric car charging stations in a urban setting, representative of typical China EV scenarios. The dataset includes charging transactions from December 1–31, 2019, with features such as start and end times, energy consumption, and station identifiers. After preprocessing, we obtain 103 unique electric car identifiers, each with 1488 sampling points at 30-minute intervals. The data is split into training (70%, 1037 samples), validation (10%, 150 samples), and test sets (20%, 297 samples).
For the GLDSC clustering, we vary the number of clusters $k$ from 2 to 12 and select the optimal value based on silhouette scores. The clustering results group electric car load curves into distinct patterns, enhancing the periodicity and trend analysis. For the ConvAutoformer model, we set the prediction length (pred_len) to 1, label length (label_len) to 2, sequence length (seq_len) to 4, encoder layers (e_layers) to 4, decoder layers (d_layers) to 1, attention heads (n_heads) to 8, model dimension (d_model) to 48, and batch size to 3. The convolutional layers are configured with kernel sizes and filters as described earlier.
We compare our GLDSC-ConvAutoformer model against several baselines: traditional neural networks (TCN, LSTM), Transformer-based models (Transformer, Informer, Reformer, Autoformer), and ablated versions of our model (ConvAutoformer, GLDSC-Autoformer). Performance is assessed using mean absolute error (MAE) and mean squared error (MSE):
$$ E_{\text{MSE}} = \frac{1}{n} \sum_{i=1}^{n} (y_i – \hat{y}_i)^2 $$
$$ E_{\text{MAE}} = \frac{1}{n} \sum_{i=1}^{n} |y_i – \hat{y}_i| $$
where $y_i$ is the actual value, $\hat{y}_i$ is the predicted value, and $n$ is the number of test samples. Lower values indicate better performance, which is critical for effective grid management in the context of China EV expansion.
Results and Analysis
The GLDSC algorithm identified an optimal cluster count of $k=5$ based on the elbow method, with silhouette scores showing a steep decline until $k=5$ before leveling off. The clustering results are summarized in Table 1, which details the number of daily load curves per cluster. Clusters 0, 2, 3, and 4 exhibit clear periodicity and trends, while Cluster 1 serves as a residual group with minimal impact on overall prediction due to its smaller size and load share.
| Cluster | Number of Curves |
|---|---|
| 0 | 360 |
| 1 | 183 |
| 2 | 1179 |
| 3 | 1069 |
| 4 | 407 |
Visualization of partial clustering results confirms the effectiveness of GLDSC in grouping electric car charging behaviors, with distinct patterns observed across clusters. This preprocessing step reduces the randomness and enhances the predictability of the data, which is vital for accurate forecasting in dynamic China EV environments.
The prediction results demonstrate that our GLDSC-ConvAutoformer model outperforms all baseline methods. Figure 1 illustrates the load prediction curves, where our model closely follows the actual values, while others show significant deviations, especially in peak periods. Traditional neural networks like TCN and LSTM exhibit high volatility, and Transformer-based models suffer from poor local fitting. In contrast, the ablated models (ConvAutoformer and GLDSC-Autoformer) show improvements but are still surpassed by the full GLDSC-ConvAutoformer approach.
Error analysis for individual clusters, as shown in Table 2, reveals that Cluster 1 has the highest MSE (0.420) and MAE (0.489), but its minor influence on the aggregate load minimizes the overall impact. The superior performance of our model is quantified in Table 3, which compares the MAE and MSE across all methods. GLDSC-ConvAutoformer achieves the lowest errors, with a 66.494% reduction in MSE compared to standard Autoformer, highlighting its efficacy for electric car load prediction.
| Cluster | MSE | MAE |
|---|---|---|
| 0 | 0.120 | 0.210 |
| 1 | 0.420 | 0.489 |
| 2 | 0.095 | 0.180 |
| 3 | 0.110 | 0.195 |
| 4 | 0.130 | 0.220 |
| Model | MAE | MSE |
|---|---|---|
| LSTM | 0.895 | 0.392 |
| TCN | 0.812 | 0.370 |
| Transformer | 0.586 | 0.255 |
| Informer | 0.517 | 0.207 |
| Reformer | 0.402 | 0.165 |
| Autoformer | 0.385 | 0.142 |
| ConvAutoformer | 0.277 | 0.098 |
| GLDSC-Autoformer | 0.259 | 0.095 |
| GLDSC-ConvAutoformer | 0.129 | 0.026 |
These results underscore the importance of combining advanced clustering with enhanced deep learning for electric car charging load prediction. The GLDSC algorithm effectively groups similar charging patterns, while the ConvAutoformer model leverages convolutional features to improve temporal modeling. This synergy is particularly beneficial for China EV applications, where load variability can challenge grid stability.
Conclusion
In this paper, we presented the GLDSC-ConvAutoformer model for short-term charging load prediction of regional electric cars. By integrating gray limited dynamic spectrum clustering with a convolutional-enhanced Autoformer, our approach addresses the limitations of existing methods in handling the non-linear and periodic nature of electric car charging data. The clustering step groups load curves into meaningful patterns, reducing randomness, while the dual convolutional layers in ConvAutoformer enhance feature extraction and prediction accuracy.
Experimental results on real-world data demonstrate that our model significantly outperforms traditional and Transformer-based models, with a 66.494% improvement in MSE over Autoformer. This advancement supports better grid scheduling and reliability, essential for the growing adoption of electric cars in regions like China EV. Future work could explore incorporating additional factors, such as weather conditions and user demographics, to further refine predictions and adapt to evolving electric car technologies.
Overall, the GLDSC-ConvAutoformer framework offers a robust solution for short-term load forecasting, contributing to the sustainable integration of electric cars into power systems. As the China EV market continues to expand, such innovations will play a pivotal role in achieving energy efficiency and carbon reduction goals.
