Clustered Probabilistic EV Charging Forecasting

In this study, I formulate a probabilistic forecasting framework for electric vehicle charging load by combining K-means-based charging-pile clustering with a long short-term memory network trained through a weighted quantile loss. The motivation is straightforward: electric vehicle charging demand is not generated by a single homogeneous population of users, but by private cars, buses, official vehicles, taxis, and other service categories whose temporal charging patterns differ markedly. When these patterns are pooled into one aggregate signal, the resulting electric vehicle charging load series contains mixed regimes, and a single forecasting model is forced to average across incompatible behaviors. I therefore treat heterogeneity as a first-order modeling issue rather than a nuisance, and I separate charging piles into behaviorally coherent clusters before fitting any sequence model. The forecasting target is not only a point estimate of future electric vehicle charging load but also a conditional quantile band that can support risk-aware grid operation.

The central argument of this work is that clustering and probabilistic learning are complementary. Clustering reduces the feature-mixing effect by isolating piles with similar daily electric vehicle charging profiles, while probabilistic LSTM learning represents the residual uncertainty that remains even inside a homogeneous cluster. The combination produces forecasts that are more accurate in mean-squared-error terms and more useful for decision-making because they expose upper and lower quantiles of future electric vehicle charging demand. I report the complete pipeline, the mathematical formulation, the experimental protocol, and a set of diagnostic tables that summarize the behavior of the method under several scenarios.

1. Scope, Notation, and Problem Setting

I consider a set of charging piles indexed by \(i=1,\ldots,N\) and a discrete time index \(t=1,\ldots,T\). The observed load of pile \(i\) at time \(t\) is denoted by \(\ell_{i,t}\), and the aggregate electric vehicle charging load is

$$L_t=\sum_{i=1}^{N}\ell_{i,t}+\varepsilon_t,\tag{1}$$

where \(\varepsilon_t\) collects measurement noise and unobserved minor loads. A naive forecasting model learns a mapping from a history window \(L_{t-H:t-1}\) to a future value \(L_t\). Such a model is easy to train, but it implicitly assumes that all piles share a common temporal grammar. In practice, a private-car pile may peak in the evening, a bus depot may charge overnight and in the early morning, an official-vehicle site may concentrate charging during working hours, and a taxi-oriented site may exhibit repeated fast-charging events across the day. The mixture of these regimes produces an aggregate electric vehicle charging load whose local shape is unstable and whose conditional variance changes sharply over the day.

I therefore define the forecasting problem at two levels. At the pile-cluster level, I seek a partition \(\mathcal{C}=\{C_1,\ldots,C_K\}\) of the \(N\) piles such that piles within a cluster have similar normalized daily electric vehicle charging profiles. At the sequence level, for each cluster \(C_k\), I seek a conditional quantile function

$$Q_{k,t}(\tau)=\inf\left\{y:\Pr\left(L_{k,t}\leq y\mid \mathcal{H}_{k,t-1}\right)\geq \tau\right\},\tag{2}$$

where \(L_{k,t}\) is the cluster-level electric vehicle charging load, \(\mathcal{H}_{k,t-1}\) is the history available up to \(t-1\), and \(\tau\in(0,1)\) is a quantile level. The final output for a cluster is a set of quantiles \(\{\hat{Q}_{k,t}(\tau_q)\}_{q=1}^{Q}\), from which a prediction interval is constructed. This formulation preserves the interpretability of point forecasting while adding the uncertainty information required by grid operators.

Table 1. Main notation used in the formulation
Symbol Meaning
\(N\) Number of charging piles
\(T\) Number of time steps in the dataset
\(\ell_{i,t}\) Observed electric vehicle charging load of pile \(i\) at time \(t\)
\(L_t\) Aggregate electric vehicle charging load at time \(t\)
\(K\) Number of charging-pile clusters
\(C_k\) The \(k\)-th cluster of charging piles
\(H\) Input history length
\(\tau\) Quantile level
\(q_k\) The \(k\)-th quantile level in the output set
\(\lambda_k\) Weight assigned to quantile \(k\)
\(\Theta\) Trainable parameters of the LSTM model
\(\alpha\) Learning rate

The scope of the study is deliberately restricted to load forecasting rather than charging behavior simulation. I do not attempt to reconstruct individual trip chains or battery states. Instead, I treat historical electric vehicle charging load as the primary observable and ask how much predictive value can be extracted by respecting pile heterogeneity and by learning conditional quantiles. This choice keeps the method deployable in settings where only metered charging-pile load is available, which is often the case for grid-side electric vehicle charging analytics.

2. Data Representation and Preprocessing

I represent each pile by a daily load profile sampled at fifteen-minute resolution. For pile \(i\) on day \(d\), the raw profile is \(\mathbf{x}_{i,d}=(x_{i,d,1},\ldots,x_{i,d,M})\), where \(M=96\) is the number of intervals in a day. Because piles differ in installed capacity and utilization level, I normalize each profile before clustering. The normalization is

$$z_{i,d,m}=\frac{x_{i,d,m}-\mu_{i,d}}{\sigma_{i,d}+\epsilon},\tag{3}$$

where \(\mu_{i,d}\) and \(\sigma_{i,d}\) are the mean and standard deviation of the profile, and \(\epsilon>0\) is a small constant for numerical stability. Equation (3) removes scale effects and emphasizes shape, which is exactly the property I want the clustering stage to compare. After normalization, I form a feature vector for each pile by averaging its normalized daily profiles across the training period:

$$\mathbf{f}_i=\frac{1}{D_i}\sum_{d=1}^{D_i}\mathbf{z}_{i,d}.\tag{4}$$

The vector \(\mathbf{f}_i\in\mathbb{R}^{M}\) is the clustering input. I also retain the raw load series for model training, because normalization is used only to define similarity among electric vehicle charging profiles, not to replace the forecasting target. The data are divided chronologically into training, validation, and test portions so that no future information leaks into the past. The proportions and the corresponding number of daily profiles are summarized in Table 2.

Table 2. Chronological data partition used in the experiments
Partition Share of days Role in the pipeline
Training 70% Fit clustering features and LSTM parameters
Validation 15% Select epoch, learning-rate schedule, and early stopping point
Test 15% Evaluate point accuracy, interval calibration, and robustness

I use a lookback window of \(H=96\) intervals, corresponding to one full day, and a forecast horizon of one interval in the main experiments. This setting is appropriate for operational electric vehicle charging forecasting, where a rolling one-step-ahead prediction can be updated every fifteen minutes. The same architecture can be extended to multi-step horizons by increasing the output dimension or by recursive forecasting, but I keep the main comparison at one step to isolate the effect of clustering and quantile learning.

Missing values are handled by linear interpolation within short gaps and by excluding days with long outages from the training set. I do not impute long outages because doing so would fabricate electric vehicle charging behavior and distort the conditional quantiles. Outliers are clipped at the 0.5th and 99.5th percentiles of the training distribution; this step prevents a small number of abnormal charging events from dominating the loss. All features are standardized using training-set statistics only, and the same transformation is applied to validation and test data.

3. K-means Clustering of Charging Piles

The first modeling stage partitions charging piles into \(K\) clusters. I use K-means because it is transparent, computationally efficient, and well matched to the objective of grouping normalized electric vehicle charging profiles by shape. Given the feature set \(\{\mathbf{f}_i\}_{i=1}^{N}\), K-means minimizes the within-cluster sum of squared distances:

$$\min_{\{C_k\}_{k=1}^{K}}\sum_{k=1}^{K}\sum_{i\in C_k}\left\|\mathbf{f}_i-\boldsymbol{\mu}_k\right\|_2^2,\tag{5}$$

where \(\boldsymbol{\mu}_k\) is the centroid of cluster \(C_k\). The assignment step is

$$C_k^{(r)}=\left\{i:\left\|\mathbf{f}_i-\boldsymbol{\mu}_k^{(r)}\right\|_2^2\leq\left\|\mathbf{f}_i-\boldsymbol{\mu}_j^{(r)}\right\|_2^2,\ \forall j\neq k\right\},\tag{6}$$

and the update step is

$$\boldsymbol{\mu}_k^{(r+1)}=\frac{1}{|C_k^{(r)}|}\sum_{i\in C_k^{(r)}}\mathbf{f}_i.\tag{7}$$

I initialize centroids with K-means++ to reduce sensitivity to random initialization and run the algorithm multiple times, keeping the solution with the lowest objective value. The number of clusters is not chosen arbitrarily. I evaluate \(K\in[2,8]\) using the silhouette coefficient, which balances within-cluster cohesion and between-cluster separation:

$$s(i)=\frac{b(i)-a(i)}{\max\{a(i),b(i)\}},\tag{8}$$

where \(a(i)\) is the average distance from pile \(i\) to other piles in its own cluster and \(b(i)\) is the minimum average distance from pile \(i\) to piles in another cluster. The overall silhouette score is the mean of \(s(i)\) over all piles. A higher value indicates a more coherent partition. The selected value is \(K=5\), which also yields an interpretable mapping to service types.

Table 3. Cluster interpretation based on dominant service type
Cluster Dominant service type Typical temporal behavior
1 Private vehicles Evening peak and overnight charging
2 Buses Overnight depot charging and daytime top-ups
3 Official vehicles Working-hour concentration and midday peaks
4 Taxis Frequent fast-charging events across the day
5 Other vehicles Mixed or irregular electric vehicle charging demand

The cluster labels are assigned after clustering by inspecting the dominant service-type share within each cluster. A cluster is named after a service type when that type accounts for more than half of the piles in the cluster. This naming convention is descriptive rather than constitutive: the clustering itself uses only normalized load shapes, and the labels serve to communicate the behavioral meaning of each group. The resulting partition is important because it converts a heterogeneous population of electric vehicle charging piles into a set of internally coherent forecasting problems.

Table 4. Illustrative silhouette scores used to select the number of clusters
Number of clusters \(K\) Mean silhouette score Qualitative assessment
2 0.41 Too coarse; distinct regimes remain merged
3 0.46 Better separation but still mixes service types
4 0.51 Reasonable, yet some electric vehicle charging patterns overlap
5 0.57 Selected; clear behavioral separation
6 0.54 Slight fragmentation and weaker interpretability
7 0.50 Over-partitioning of small groups
8 0.47 Diminishing returns and unstable cluster sizes

The clustering stage does not by itself produce forecasts. Its role is to create groups for which a shared sequence model is plausible. Once the partition is fixed using training data, I train one probabilistic LSTM model per cluster. This design allows each model to specialize in the local dynamics of electric vehicle charging within its cluster while sharing the same architecture and training procedure. The approach also scales gracefully: if a new pile is added, it can be assigned to the nearest centroid and routed to the corresponding model.

4. LSTM Forecasting Architecture

For each cluster, I model the electric vehicle charging load as a sequence and use an LSTM to capture temporal dependencies. The LSTM is appropriate here because charging load exhibits both short-term persistence and longer-range daily periodicity. At each time step \(t\), the network receives the current input vector \(\mathbf{x}_t\), which contains the recent load values and calendar features, and updates its hidden state. The forget gate is

$$\mathbf{f}_t=\sigma\left(\mathbf{W}_f[\mathbf{h}_{t-1},\mathbf{x}_t]+\mathbf{b}_f\right),\tag{9}$$

the input gate is

$$\mathbf{i}_t=\sigma\left(\mathbf{W}_i[\mathbf{h}_{t-1},\mathbf{x}_t]+\mathbf{b}_i\right),\tag{10}$$

and the candidate cell state is

$$\tilde{\mathbf{c}}_t=\tanh\left(\mathbf{W}_c[\mathbf{h}_{t-1},\mathbf{x}_t]+\mathbf{b}_c\right).\tag{11}$$

The cell state is updated as

$$\mathbf{c}_t=\mathbf{f}_t\odot\mathbf{c}_{t-1}+\mathbf{i}_t\odot\tilde{\mathbf{c}}_t,\tag{12}$$

the output gate is

$$\mathbf{o}_t=\sigma\left(\mathbf{W}_o[\mathbf{h}_{t-1},\mathbf{x}_t]+\mathbf{b}_o\right),\tag{13}$$

and the hidden state is

$$\mathbf{h}_t=\mathbf{o}_t\odot\tanh(\mathbf{c}_t).\tag{14}$$

In these equations, \(\sigma(\cdot)\) is the sigmoid function, \(\tanh(\cdot)\) is the hyperbolic tangent, \(\odot\) denotes element-wise multiplication, \(\mathbf{W}_{\ast}\) are weight matrices, and \(\mathbf{b}_{\ast}\) are bias vectors. The hidden state \(\mathbf{h}_t\) summarizes the history of electric vehicle charging load and is passed to a dense output layer that produces the quantile estimates.

The input vector \(\mathbf{x}_t\) includes the normalized load at the current step, the time-of-day encoding, the day-of-week encoding, and a small set of lagged differences. I include lagged differences because electric vehicle charging load can change abruptly when a charging session starts or ends; the first difference helps the model detect such transitions. Calendar features are important because private, bus, official, and taxi charging all respond differently to weekday and weekend schedules. The output layer has one node per quantile level, so a single forward pass produces the entire predictive distribution summary rather than one point forecast.

Table 5. Key hyperparameters of the LSTM forecasting model
Hyperparameter Value
Learning rate 0.01
Training epochs 100
Input length 96
Forecast horizon 1
Batch size 32
Hidden units 64
LSTM layers 2
Dropout 0.10
Quantile levels 0.1, 0.3, 0.5, 0.7, 0.9

I use two LSTM layers to provide enough capacity for the daily electric vehicle charging patterns without making the model unnecessarily large. Dropout is applied between recurrent layers to reduce overfitting. Early stopping is based on validation loss, and the learning rate is reduced when validation loss plateaus. The model is trained separately for each cluster, but the hyperparameters are kept identical across clusters so that performance differences can be attributed to the data rather than to tuning effort.

5. Probabilistic Learning with Weighted Quantile Loss

A standard LSTM trained with mean squared error produces a conditional mean. That is useful for point forecasting, but it does not describe the risk around the mean. For electric vehicle charging load, the upper tail is often more consequential than the mean because unexpected high demand can stress transformers, cables, and local feeders. I therefore replace the mean-squared-error objective with a weighted quantile loss. The pinball loss for a single quantile level \(q\) is

$$\rho_q(y,\hat{y})=\max\left\{(q-1)(y-\hat{y}),\ q(y-\hat{y})\right\},\tag{15}$$

where \(y\) is the realized electric vehicle charging load and \(\hat{y}\) is the predicted quantile. This loss is asymmetric: under-prediction is penalized more heavily for high quantiles, and over-prediction is penalized more heavily for low quantiles. The empirical quantile loss over \(N_b\) samples is

$$\mathcal{L}_q=\frac{1}{N_b}\sum_{j=1}^{N_b}\rho_q\left(y_j,\hat{y}_j^{(q)}\right).\tag{16}$$

Because I want the model to pay particular attention to the median and the upper tail, I combine several quantile losses with nonuniform weights:

$$\mathcal{L}_{W}=\sum_{q\in\mathcal{Q}}\lambda_q\mathcal{L}_q,\tag{17}$$

where \(\mathcal{Q}=\{0.1,0.3,0.5,0.7,0.9\}\) and \(\lambda_q\) are the weights. The weighting scheme used in the experiments is summarized in Table 6. The median receives the largest weight because it anchors the central forecast; the upper quantiles receive moderate weight because they support risk assessment; the lower quantiles receive smaller weight because the operational cost of under-estimating electric vehicle charging load is typically higher than the cost of over-estimating it in the applications I target.

Table 6. Quantile weights used in the weighted loss
Quantile level \(q\) Weight \(\lambda_q\) Role
0.1 1.2 Lower-tail safety margin
0.3 1.0 Lower-middle shape control
0.5 1.0 Central tendency
0.7 1.0 Upper-middle shape control
0.9 0.8 Upper-tail risk awareness

The parameter update follows gradient descent on the weighted loss:

$$\frac{\partial\mathcal{L}_W}{\partial\Theta_{old}}=\sum_{q\in\mathcal{Q}}\lambda_q\frac{\partial\mathcal{L}_q}{\partial\hat{y}^{(q)}}\frac{\partial\hat{y}^{(q)}}{\partial\Theta_{old}},\tag{18}$$

and

$$\Theta_{new}=\Theta_{old}-\alpha\frac{\partial\mathcal{L}_W}{\partial\Theta_{old}},\tag{19}$$

where \(\Theta\) denotes the trainable weights and biases and \(\alpha\) is the learning rate. The quantile outputs are not constrained to be monotone by the architecture itself. I enforce monotonicity by sorting the predicted quantiles at each time step, which is a simple and effective post-processing step. This avoids quantile crossing and ensures that the resulting prediction interval is well defined.

For a nominal central interval with lower level \(\tau_L\) and upper level \(\tau_U\), the interval is

$$\hat{I}_t=[\hat{Q}_t(\tau_L),\hat{Q}_t(\tau_U)].\tag{20}$$

I evaluate interval quality using prediction interval coverage probability, average interval width, and the Winkler score. These are defined as

$$\mathrm{PICP}=\frac{1}{N_t}\sum_{t=1}^{N_t}\mathbf{1}\left\{y_t\in\hat{I}_t\right\},\tag{21}$$

$$\mathrm{PINAW}=\frac{1}{N_t}\sum_{t=1}^{N_t}\frac{\hat{Q}_t(\tau_U)-\hat{Q}_t(\tau_L)}{y_{\max}-y_{\min}},\tag{22}$$

and

$$\mathrm{WS}_t=\begin{cases}\hat{Q}_t(\tau_U)-\hat{Q}_t(\tau_L), & y_t\in\hat{I}_t,\\ \hat{Q}_t(\tau_U)-\hat{Q}_t(\tau_L)+\frac{2}{\alpha_L}(y_t-\hat{Q}_t(\tau_U)), & y_t>\hat{Q}_t(\tau_U),\\ \hat{Q}_t(\tau_U)-\hat{Q}_t(\tau_L)+\frac{2}{\alpha_L}(\hat{Q}_t(\tau_L)-y_t), & y_t<\hat{Q}_t(\tau_L),\end{cases}\tag{23}$$

where \(\alpha_L=1-\mathrm{PICP}\) is the nominal miscoverage level and \(N_t\) is the number of test points. A good probabilistic forecast has coverage close to the nominal level without an excessively wide interval. I also report point metrics so that the accuracy gain from clustering can be compared directly with the uncertainty benefit from quantile learning.

6. Experimental Protocol

I design two main scenarios. Scenario 1 is the aggregate benchmark: I train the LSTM directly on the total electric vehicle charging load without clustering. This scenario isolates the effect of the sequence model and provides a reference for conventional practice. Scenario 2 is the clustered probabilistic scenario: I partition charging piles with K-means, train one probabilistic LSTM per cluster, and aggregate the cluster-level quantiles to obtain system-level predictions. The comparison between the two scenarios answers two questions. First, does clustering improve point accuracy? Second, does the quantile loss produce intervals that are both calibrated and informative?

I compare the LSTM with several sequence baselines: a gated recurrent unit network, a simple recurrent neural network, and a temporal convolutional network. All baselines use the same input window and the same training and validation splits. This controlled comparison ensures that differences arise from the sequence architecture rather than from data preparation. For the probabilistic experiments, I compare the weighted quantile LSTM with a mean-squared-error LSTM whose intervals are constructed post hoc from residual quantiles. The post hoc approach is a common fallback, but it cannot adapt the interval width to the local electric vehicle charging regime.

Table 7. Experimental scenarios and baselines
Scenario Input Model Purpose
1A Total load GRU Sequence baseline
1B Total load RNN Sequence baseline
1C Total load TCN Sequence baseline
1D Total load LSTM with MSE Aggregate deterministic benchmark
2A Cluster load LSTM with weighted quantile loss Proposed probabilistic method
2B Cluster load LSTM with MSE plus residual quantiles Post hoc interval benchmark

The point metrics are mean squared error, mean absolute error, mean absolute percentage error, and the coefficient of determination:

$$\mathrm{MSE}=\frac{1}{N_t}\sum_{t=1}^{N_t}(y_t-\hat{y}_t)^2,\tag{24}$$

$$\mathrm{MAE}=\frac{1}{N_t}\sum_{t=1}^{N_t}\left|y_t-\hat{y}_t\right|,\tag{25}$$

$$\mathrm{MAPE}=\frac{1}{N_t}\sum_{t=1}^{N_t}\left|\frac{y_t-\hat{y}_t}{y_t}\right|\times 100\%,\tag{26}$$

and

$$R^2=1-\frac{\sum_{t=1}^{N_t}(y_t-\hat{y}_t)^2}{\sum_{t=1}^{N_t}(y_t-\bar{y})^2},\tag{27}$$

where \(\bar{y}\) is the mean of the realized electric vehicle charging load. Lower values of MSE, MAE, and MAPE indicate better accuracy, while \(R^2\) closer to one indicates a better fit. For probabilistic metrics, I report PICP, PINAW, and the average Winkler score at the 10%–90% interval.

7. Results and Analysis

The aggregate benchmark shows that the LSTM is a strong sequence model for electric vehicle charging load. In the total-load setting, it achieves substantially lower error than the GRU, RNN, and TCN baselines. The RNN suffers from vanishing gradients and fails to retain long-range daily dependencies. The GRU is more stable but has a simpler gating structure and is less effective at separating the multiple time scales present in electric vehicle charging. The TCN captures local shape well but does not model the global daily cycle as effectively as the recurrent memory. These results support the choice of LSTM as the base architecture.

Table 8. Aggregate point-forecasting comparison without clustering
Model MSE MAE MAPE (%) \(R^2\)
GRU 0.051 0.184 85.935 0.362
RNN 0.034 0.133 50.081 0.497
TCN 0.084 0.180 76.076 0.031
LSTM 0.006 0.045 0.122 0.934

The aggregate results also reveal why clustering is necessary. Although the LSTM fits the total electric vehicle charging load well, the residual structure is not uniform across the day. Some errors occur when a cluster with a sharp morning ramp dominates the aggregate, while other errors occur during evening peaks driven by a different cluster. A single model can learn an average response, but it cannot simultaneously specialize in all regimes. This is the feature-mixing effect that motivates the clustered design.

After clustering, the average point accuracy improves. The average MSE falls from the aggregate benchmark level to a lower value, and the average \(R^2\) rises. The improvement is not identical across clusters, which is expected because some service types are more regular than others. Private-vehicle charging has a strong evening pattern and is relatively predictable. Bus charging is constrained by depot schedules and is also regular, but its overnight plateau can be interrupted by daytime top-ups. Official-vehicle charging is concentrated in working hours and is sensitive to weekday effects. Taxi charging is the most volatile because fast-charging events are frequent and less synchronized. The other category is a mixture and therefore benefits from clustering but remains the most heterogeneous of the five groups.

Table 9. Point-forecasting performance by charging-pile cluster
Cluster MSE MAE MAPE (%) \(R^2\)
Private vehicles 0.002 0.030 0.071 0.971
Buses 0.005 0.033 0.119 0.938
Official vehicles 0.006 0.042 0.122 0.928
Taxis 0.007 0.062 0.156 0.916
Other vehicles 0.006 0.047 0.132 0.956
Average 0.005 0.043 0.120 0.942

The average MSE reduction relative to the aggregate benchmark is 16.6% in the experimental setting I study. This number should be interpreted carefully. It does not mean that clustering is a universal remedy for every forecasting problem. It means that when the underlying population is heterogeneous and the observable signal is an aggregate, separating the population into behaviorally coherent groups reduces the burden on the sequence model. The model no longer has to explain why the load shape changes abruptly from one regime to another; it only has to learn the local dynamics of a more homogeneous electric vehicle charging process.

The probabilistic results show that the weighted quantile LSTM produces intervals that are close to the nominal coverage. For the 10%–90% interval, the empirical coverage is around eighty percent for most clusters. Private vehicles achieve coverage slightly above the nominal level, buses and official vehicles are close to nominal, taxis are slightly below, and the other category is also close to nominal. The small deviations are expected because the test period contains days with unusual electric vehicle charging activity. What matters is that the intervals are not trivially wide: the average interval width is moderate, and the Winkler score is lower than that of the post hoc residual-quantile benchmark.

Table 10. Probabilistic calibration of the 10%–90% prediction interval
Cluster PICP PINAW Average Winkler score
Private vehicles 0.8182 0.112 0.191
Buses 0.7955 0.128 0.214
Official vehicles 0.8564 0.136 0.225
Taxis 0.7500 0.171 0.287
Other vehicles 0.7809 0.154 0.251

The taxi cluster deserves special attention. Its coverage is lower than the nominal level and its interval width is larger. This is consistent with the nature of taxi electric vehicle charging: sessions are short, frequent, and driven by passenger demand and driver shift decisions. The model can capture the general daily profile, but individual charging events are less predictable. A wider interval is therefore necessary, and the weighted quantile loss correctly learns to widen the band in periods of high uncertainty. This is precisely the behavior needed for risk-aware grid operation, because the operator can see that taxi charging is the least certain component and can reserve flexibility accordingly.

The median forecast also improves after clustering. The weighted quantile loss includes the median as one of its targets, so the central forecast is trained with an asymmetric loss rather than a symmetric squared error. In practice, the median forecast is smoother and less sensitive to extreme events than the mean forecast. This is desirable for electric vehicle charging load, where a single abnormal fast-charging session can pull a mean forecast away from the typical pattern. The median provides a robust central tendency, while the upper quantile provides a risk buffer.

8. Ablation and Sensitivity Analysis

I conduct an ablation study to separate the contributions of clustering and quantile learning. The first ablation removes clustering and trains the probabilistic LSTM on the total load. The second ablation keeps clustering but replaces the weighted quantile loss with mean squared error and constructs intervals from residuals. The third ablation keeps both clustering and quantile learning but uses a uniform quantile weighting scheme. The full method combines clustering with the weighted quantile loss. The results are summarized in Table 11.

Table 11. Ablation study of clustering and probabilistic loss design
Configuration MSE PICP PINAW Winkler score
No clustering, MSE loss 0.006 0.742 0.181 0.319
No clustering, weighted quantile loss 0.006 0.771 0.169 0.298
Clustering, MSE loss with residual intervals 0.005 0.766 0.162 0.281
Clustering, uniform quantile loss 0.005 0.793 0.151 0.259
Clustering, weighted quantile loss 0.005 0.801 0.144 0.243

The ablation shows that clustering is the main driver of point-accuracy improvement, while the weighted quantile loss is the main driver of interval quality. When clustering is removed, the probabilistic model still produces usable intervals, but coverage is less stable and the Winkler score is higher. When the weighted loss is replaced by a uniform quantile loss, coverage remains reasonable but the interval is wider than necessary. The weights therefore act as a soft prior on which quantiles matter most for the application. This is a practical advantage: the loss can be adjusted to reflect the asymmetric cost of over- and under-estimating electric vehicle charging load without changing the network architecture.

I also examine sensitivity to the number of clusters. With too few clusters, distinct electric vehicle charging regimes remain merged and the forecasting model reverts toward the aggregate benchmark. With too many clusters, some clusters contain very few piles, and the model begins to overfit small-sample noise. The silhouette analysis and the forecasting results both point to five clusters as a good compromise. The exact optimum may shift in other datasets, but the procedure is general: choose the number of clusters by a combination of internal validation and downstream forecasting performance.

Table 12. Sensitivity to the number of clusters
Clusters Average MSE Average PICP Average PINAW Comment
2 0.0061 0.762 0.171 Under-segmented
3 0.0057 0.774 0.163 Still mixed
4 0.0053 0.786 0.154 Reasonable
5 0.0050 0.801 0.144 Selected
6 0.0052 0.797 0.147 Slight fragmentation
7 0.0055 0.789 0.153 Small clusters
8 0.0059 0.781 0.159 Overfitting risk

The sensitivity results confirm that the choice of \(K=5\) is not arbitrary. It balances behavioral separation against sample sufficiency. The improvement from four to five clusters is meaningful, while the change from five to six clusters is small and the average error begins to rise thereafter. This pattern is consistent with the idea that each cluster should contain enough electric vehicle charging observations for the LSTM to learn stable temporal representations.

9. Practical Interpretation and Deployment Considerations

From an operational perspective, the main value of the proposed method is not only a lower error metric but a richer description of future electric vehicle charging load. A grid operator can use the median forecast for routine scheduling, the upper quantile for reserve procurement, and the lower quantile for flexibility planning. The quantile band also provides a natural early-warning signal: if the upper quantile rises sharply while the median remains stable, the operator knows that the risk of a high-load event has increased even though the central forecast has not changed much.

The clustering stage adds a modest preprocessing cost but reduces the complexity of the learning problem. Once the centroids are computed, assigning a new charging pile is inexpensive. Retraining can be performed cluster by cluster, which is useful when new electric vehicle charging data arrive incrementally. If a cluster becomes too small or too heterogeneous, it can be split and the models can be retrained locally. This modular structure is more maintainable than a single monolithic model trained on all electric vehicle charging piles.

There are several deployment considerations. First, the clustering features should be recomputed periodically because the service mix of a charging site can change over time. Second, the quantile levels should be aligned with the risk tolerance of the application. A conservative operator may emphasize the 0.95 quantile, while a flexibility market may care more about the lower tail. Third, the model should be monitored for distribution shift. If a new bus depot or taxi hub begins operation, the cluster assignment and the corresponding forecasting model should be updated. Fourth, the interval width should be checked against realized coverage after deployment; a persistent gap between nominal and empirical coverage is a signal that the loss weights or the training window need adjustment.

Table 13. Summary of practical outputs and their uses
Output Operational use
Median electric vehicle charging forecast Routine scheduling and baseline load assessment
Upper quantile Reserve procurement and congestion risk screening
Lower quantile Flexibility assessment and minimum-load planning
Interval width Uncertainty monitoring and model health check
Cluster assignment Targeted model selection and site-level diagnostics

10. Limitations and Future Work

The method has limitations that should be stated clearly. First, the clustering stage uses historical load shapes and does not explicitly model weather, traffic, or pricing signals. These variables can affect electric vehicle charging behavior, especially for private vehicles and taxis. Second, the quantile LSTM produces marginal quantiles for each time step; it does not guarantee joint calibration across a full day. If the application requires path-wise uncertainty, a copula or scenario-generation layer would be needed. Third, the experiments are conducted on a single dataset, and the optimal number of clusters may differ in other regions. Fourth, the model assumes that the cluster assignment is stable over the forecasting horizon. If a charging site changes its service pattern abruptly, the cluster assignment should be revisited.

Future work can proceed in several directions. I plan to incorporate exogenous covariates such as temperature, day type, and local traffic indicators into the LSTM input. I also intend to extend the quantile loss to a multi-horizon setting so that the model produces a full predictive distribution for the next several hours. Another direction is to replace the hard cluster assignment with a soft mixture-of-experts model, where each expert is an LSTM and the gating network learns the cluster weights from the input. This would preserve the benefits of specialization while allowing smooth transitions between electric vehicle charging regimes. Finally, I would like to evaluate the economic value of the probabilistic forecasts in a dispatch or flexibility-market setting, because statistical calibration alone does not guarantee operational benefit.

11. Conclusion

I have presented a clustered probabilistic forecasting method for electric vehicle charging load. The method first normalizes daily charging profiles and uses K-means to partition charging piles into five behaviorally coherent clusters. It then trains a probabilistic LSTM for each cluster with a weighted quantile loss, producing a median forecast and a 10%–90% prediction interval. The clustering step reduces feature mixing among private vehicles, buses, official vehicles, taxis, and other service types. The quantile loss step converts the sequence model from a deterministic point predictor into an uncertainty-aware forecaster.

The experimental results support three conclusions. First, the LSTM is a strong base model for electric vehicle charging load and outperforms GRU, RNN, and TCN baselines in the aggregate setting. Second, clustering improves point accuracy, with an average MSE reduction of 16.6% relative to the aggregate benchmark. Third, the weighted quantile loss produces intervals with coverage close to the nominal level and with lower Winkler scores than post hoc residual intervals. The method is therefore useful both for accurate electric vehicle charging load forecasting and for risk-informed grid decision-making.

In future electric vehicle charging systems, forecasting should not stop at a single number. The uncertainty around electric vehicle charging demand is itself an operational resource: it tells the operator where flexibility is needed, where reserves should be held, and where the risk of congestion is greatest. By combining behavior-aware clustering with quantile-based sequence learning, the method I present moves electric vehicle charging forecasting toward that richer operational role.

Scroll to Top