With the rapid development of electric vehicles (EVs) and the integration of renewable energy resources, EV charging stations equipped with vehicle-to-grid (V2G) technology and energy storage systems have become critical components of modern power distribution networks. However, the unpredictable charging behaviors of EVs, combined with fluctuating base loads, often lead to heavy overload conditions in these stations, threatening grid stability and power quality. In this paper, I address the challenges of heavy overload risk assessment and management in EV charging stations by proposing a novel framework that combines advanced load forecasting techniques with optimized V2G operational strategies. The core of my approach lies in an improved Transformer-based model for accurate short-term load prediction, which enables proactive overload warnings. Subsequently, I develop a governance mechanism that leverages time-of-use electricity pricing and orderly V2G charging-discharging schedules to mitigate overload risks. Through extensive testing and analysis, I demonstrate the effectiveness of my methods in enhancing the reliability and efficiency of EV charging stations.
The increasing penetration of EVs has transformed EV charging stations into dynamic energy hubs, where V2G technology allows bidirectional power flow, enabling EVs to serve as distributed storage resources. While this flexibility supports grid balancing and renewable energy integration, it also introduces complexities in load management. Uncoordinated EV charging can cause peak load spikes, leading to transformer overloads in EV charging stations. Traditional load forecasting methods, such as statistical models and basic machine learning algorithms, often struggle to capture the non-linear and time-dependent patterns of EV charging loads. To overcome these limitations, I introduce a deep learning-based solution that enhances feature extraction and temporal dependency modeling. My work focuses on two main aspects: first, a robust overload warning system based on precise load forecasting; and second, a governance strategy that optimizes V2G operations to prevent overloads. By integrating these components, I aim to ensure the sustainable operation of EV charging stations within the broader context of smart grid development.

Heavy overload in EV charging stations occurs when the total load exceeds the transformer’s capacity for prolonged periods, potentially causing equipment damage and power outages. The risk assessment process begins with accurate load forecasting, which I achieve using an improved Transformer model. This model incorporates temporal convolutional networks (TCN) and cross-attention mechanisms to handle both short-term fluctuations and long-term dependencies in load data. The forecasting outputs are then used to evaluate the load rate of the EV charging station, classifying its state as normal, heavy load, or overload based on predefined thresholds. For governance, I employ Monte Carlo simulations to model EV user behaviors and particle swarm optimization to determine optimal time-of-use pricing periods. This encourages orderly charging and discharging, reducing peak loads and alleviating overload conditions. In the following sections, I detail the methodology, experimental setup, and results, highlighting the performance gains and practical implications for EV charging station management.
Overload Warning Model Based on Improved Transformer
To assess heavy overload risks in EV charging stations, I first transform the problem into a load forecasting task. The total load in an EV charging station comprises the base electricity consumption and the EV charging load. I handle these components separately due to their distinct characteristics, using an enhanced Transformer model for prediction. The standard Transformer model relies on self-attention mechanisms to capture sequential dependencies, but it may overlook local temporal features. My improvements include temporal expanded attention and multi-time-scale cross-attention, which integrate temporal convolution layers to refine feature extraction.
The temporal expanded attention mechanism combines TCN with attention calculation. TCN uses dilated causal convolutions to expand the receptive field, allowing the model to capture information from adjacent time points effectively. The output of TCN serves as the key and value in attention computation, while the original input sequence acts as the query. This approach enhances the model’s ability to perceive local trends and fluctuations in load data. The dilated causal convolution in TCN is defined as:
$$ F(s) = \sum_{i=0}^{k-1} f(i) \cdot x_{s-d \cdot i} $$
where \( d \) is the dilation factor, \( k \) is the kernel size, \( x_{s-d \cdot i} \) is the input at position \( s-d \cdot i \), and \( f(i) \) represents the convolutional kernel elements. Residual connections are incorporated to prevent gradient issues in deep networks.
For the attention mechanism, I compute the output as:
$$ \text{Attention}(Q, K, V) = \text{softmax}\left(\frac{Q K^T}{\sqrt{d_k}}\right) V $$
where \( Q \), \( K \), and \( V \) are derived from the TCN outputs and input sequences. Specifically, \( K \) and \( V \) are obtained from the TCN-processed sequence, while \( Q \) comes from the raw input. This temporal expanded attention ensures that nearby time steps are considered during feature weighting.
Next, I introduce cross-attention to fuse features from multiple time windows. I parallelize TCN layers with different kernel sizes (e.g., 3, 5, and 7) to extract multi-scale temporal features. The outputs from kernels 3 and 5 are combined as the key and value, and the output from kernel 7 is used as the query. The cross-attention calculation facilitates the integration of diverse temporal patterns, improving the model’s ability to predict both periodic trends and irregular fluctuations in EV charging station loads.
The overall architecture of the improved Transformer model includes embedding layers for input features (e.g., historical load, temperature, holidays), followed by temporal expanded attention layers, cross-attention layers, and standard Transformer encoder-decoder layers. The model outputs short-term load forecasts for the base load and EV charging load, which are summed to obtain the total load of the EV charging station. The load rate is then calculated as:
$$ \text{Load Rate} = \frac{\text{Total Load}}{\text{Transformer Capacity}} \times 100\% $$
Based on continuous monitoring, I classify the EV charging station state as follows:
| State | Evaluation Criteria |
|---|---|
| Normal | 8 or more consecutive sampling points with load rate below 80% |
| Heavy Load | 8 or more consecutive sampling points with load rate between 80% and 100% |
| Overload | 8 or more consecutive sampling points with load rate above 100% |
To evaluate the forecasting performance, I use mean squared error (MSE), mean absolute error (MAE), and mean absolute percentage error (MAPE):
$$ 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| $$
$$ E_{\text{MAPE}} = \frac{1}{n} \sum_{i=1}^{n} \left| \frac{y_i – \hat{y}_i}{y_i} \right| \times 100\% $$
where \( y_i \) is the actual load, \( \hat{y}_i \) is the predicted load, and \( n \) is the number of samples. Lower values indicate better accuracy.
Governance Strategy for Heavy Overload in EV Charging Stations
Once an overload warning is generated, I implement a governance strategy that involves optimizing time-of-use electricity pricing and guiding orderly V2G charging-discharging behaviors. The goal is to shift EV loads away from peak periods and utilize V2G discharge to reduce the overall load on the EV charging station. I formulate this as an optimization problem with objectives to minimize user charging costs and load fluctuations.
First, I model the orderly charging-discharging behavior of EVs using Monte Carlo simulations. For an EV \( w \) responding to time-of-use pricing, the start times of charging during valley periods and discharging during peak periods are randomized within the respective time windows. The start time for charging in the \( i \)-th valley period is:
$$ t_{\text{ch},(w,i)} = t_{\text{vs},i} + \text{rand}() \cdot \Delta t_{v,i} $$
and for discharging in the \( m \)-th peak period:
$$ t_{\text{disch},(w,m)} = t_{\text{ps},m} + \text{rand}() \cdot \Delta t_{p,m} $$
where \( t_{\text{vs},i} \) and \( \Delta t_{v,i} \) are the start and duration of the valley period, and \( t_{\text{ps},m} \) and \( \Delta t_{p,m} \) are for the peak period. The user response rate \( \lambda \) is set to 0.75, meaning 75% of EVs participate in the orderly scheme.
The optimization aims to minimize two objective functions: the total charging-discharging cost for users and the load variance of the EV charging station. The cost function is:
$$ f_1 = \sum_{w=1}^{N} \sum_{t} \left[ P_{\text{ch},w}(t) – P_{\text{disch},w}(t) \right] \cdot C(t) $$
where \( P_{\text{ch},w}(t) \) and \( P_{\text{disch},w}(t) \) are the charging and discharging powers of EV \( w \) at time \( t \), \( C(t) \) is the electricity price, and \( N \) is the number of responding EVs. The load variance function is:
$$ f_2 = \frac{1}{T} \sum_{t=1}^{T} \left[ P_{\text{total}}(t) – \text{avg}(P_{\text{total}}) \right]^2 $$
where \( P_{\text{total}}(t) \) is the total load of the EV charging station at time \( t \), and \( T \) is the total time steps. The total load is computed as:
$$ P_{\text{total}}(t) = P_b(t) + P_{\text{EV,disch},N}(t) – P_{\text{buy}}(t) – P_{\text{pv}}(t) – P_{\text{EV,ch},N}(t) $$
Here, \( P_b(t) \) is the base load, \( P_{\text{EV,disch},N}(t) \) is the total discharging power of EVs, \( P_{\text{buy}}(t) \) is the power purchased from the grid, \( P_{\text{pv}}(t) \) is photovoltaic generation, and \( P_{\text{EV,ch},N}(t) \) is the total charging power of EVs. The combined objective function is:
$$ F = \rho_1 f_1 + \rho_2 f_2 $$
with weights \( \rho_1 = \rho_2 = 0.5 \).
Constraints include time-of-use period constraints based on overload warnings, continuous load rate constraints to prevent prolonged heavy loads, and power balance constraints. For example, the peak pricing periods must align with overload warning periods, and the load rate should not exceed 80% for more than 7 consecutive sampling points. The grid purchase power must cover demand, storage charging, and EV charging:
$$ P_{\text{buy}}(t) = P_{\text{buy,dmd}}(t) + P_{\text{buy,ch}}(t) + P_{\text{buy,evch}}(t) $$
Energy storage and photovoltaic constraints are also considered:
$$ E_{\text{ess}}(t) = E_{\text{ess}}(t-1) + \eta_{\text{ch}} P_{\text{ch}}(t) – \frac{P_{\text{disch}}(t)}{\eta_{\text{disch}}} $$
$$ 0 \leq P_{\text{pv}}(t) \leq P_{\text{pv,max}}(t) $$
where \( E_{\text{ess}}(t) \) is the energy storage capacity, \( \eta_{\text{ch}} \) and \( \eta_{\text{disch}} \) are efficiency factors, and \( P_{\text{pv,max}}(t) \) is the maximum PV output.
I use particle swarm optimization to solve for the optimal time-of-use periods (peak and valley start times and durations) that minimize the objective function. The optimization process iteratively updates particle positions based on fitness evaluations, incorporating Monte Carlo simulations for EV behavior.
Experimental Setup and Data Preprocessing
To validate my approach, I use historical data from an actual EV charging station, including base load and EV charging load from January 1, 2022, to December 31, 2022, with a 15-minute sampling interval. The dataset is split 80-20 for training and testing. Feature selection is performed using Pearson correlation coefficients to identify relevant factors for load forecasting.
For base load forecasting, input features include minimum temperature, maximum temperature, average temperature, and historical load, as these show strong correlations with load. For EV charging load forecasting, inputs include holidays, temperature, and historical charging load. Holiday features are encoded using one-hot encoding.
The improved Transformer model parameters are set as follows: input sequence length \( s = 288 \) (3 days), output length \( p = 96 \) (1 day), hidden dimension \( D = 512 \), attention heads \( n_s = 8 \), encoder layers \( e = 6 \), TCN kernel sizes \( k = 3, 5, 7 \), residual blocks \( c = 2 \), batch size \( b = 32 \), and training epochs \( j = 50 \). For the governance optimization, particle swarm parameters include 100 particles, learning factors \( C_1 = C_2 = 0.5 \), and initial velocity weight 0.5. Time-of-use prices are set at peak: 0.8077 $/kWh, valley: 0.4039 $/kWh, and flat: 0.6213 $/kWh.
The table below summarizes the feature correlations for base load forecasting:
| Feature | Correlation Coefficient |
|---|---|
| Rainfall | 0.119 |
| Relative Humidity | 0.130 |
| Minimum Temperature | 0.637 |
| Maximum Temperature | 0.742 |
| Average Temperature | 0.762 |
Results and Discussion
I evaluate the overload warning model on two typical overload days, day1 and day2. The improved Transformer model demonstrates superior forecasting accuracy compared to baseline models like Autoformer, standard Transformer, and CNN-BiGRU. The following table presents the performance metrics:
| Day | Model | MSE | MAE | MAPE |
|---|---|---|---|---|
| Day1 | CNN-BiGRU | 1258.368 | 30.619 | 0.296 |
| Transformer | 919.552 | 26.174 | 0.253 | |
| Autoformer | 637.647 | 22.356 | 0.218 | |
| Proposed Model | 299.279 | 14.794 | 0.143 | |
| Day2 | CNN-BiGRU | 1405.288 | 32.323 | 0.307 |
| Transformer | 1026.914 | 27.631 | 0.263 | |
| Autoformer | 639.541 | 22.291 | 0.212 | |
| Proposed Model | 337.172 | 15.959 | 0.152 |
The proposed model achieves the lowest errors, indicating its effectiveness in capturing load patterns for EV charging stations. For day1, the overload warning period predicted by my model is 16:35-19:48, closely matching the actual period of 16:37-19:53, with an error of less than 5 minutes. This precision enables timely interventions.
In terms of governance, the optimized time-of-use periods are: peak from 16:45 to 19:15 (2.5 hours) and valley from 23:45 to 04:30 (4.75 hours). The orderly charging-discharging schedule significantly reduces the peak load. For day1, the disordered EV charging load shows random spikes, while the ordered schedule smooths the load curve. After governance, the overload warning period is eliminated, and only brief heavy load periods occur, all lasting less than 2 hours, which is within safe limits. The total load variance decreases, demonstrating improved stability in the EV charging station.
The governance strategy not only mitigates overload risks but also benefits users by reducing charging costs. The particle swarm optimization efficiently converges to solutions that balance cost and load fluctuation objectives. The integration of Monte Carlo simulations ensures realistic modeling of EV behaviors, enhancing the practicality of the approach for real-world EV charging station management.
Conclusion
In this paper, I have presented a comprehensive framework for heavy overload risk assessment and management in EV charging stations with V2G and energy storage. The improved Transformer model, featuring temporal expanded attention and cross-attention mechanisms, provides accurate load forecasts, enabling reliable overload warnings. The governance strategy, based on optimized time-of-use pricing and orderly V2G operations, effectively reduces peak loads and prevents prolonged overload conditions. Experimental results confirm the superiority of my methods in terms of forecasting accuracy and governance efficacy. This work contributes to the sustainable integration of EVs into power systems by enhancing the operational resilience of EV charging stations. Future research could explore real-time adaptation of pricing strategies and the inclusion of more diverse renewable energy sources.