Prediction method and system for regulating and controlling electric vehicle charging pile based on micro-grid
By integrating multi-source data acquisition and a lightweight spatiotemporal attention prediction model into electric vehicle charging piles, coordinated control of electric vehicle charging piles and microgrids was achieved, solving the problems of low renewable energy consumption efficiency and slow response speed, and improving the stability and economy of microgrids.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA THREE GORGES UNIV
- Filing Date
- 2025-12-25
- Publication Date
- 2026-05-01
AI Technical Summary
In existing technologies, the coordination between electric vehicle charging piles and microgrids is poor, resulting in low efficiency of new energy consumption, slow response speed, information silos, and insufficient prediction accuracy, making it impossible to effectively participate in the dynamic regulation of microgrids.
By integrating multi-source heterogeneous data acquisition, lightweight spatiotemporal attention prediction model and bidirectional power module into the charging pile, local prediction and real-time control are achieved, charging and discharging scheduling instructions are generated, and charging power or reverse discharge power adjustment is supported.
It has improved the capacity for renewable energy absorption, enhanced the stability and response speed of microgrids, broken down protocol barriers, and improved system integration efficiency and economic benefits.
Smart Images

Figure CN121965486A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of microgrid energy management and electric vehicle charging control technology, and in particular to a predictive method and system for regulating electric vehicle charging piles based on microgrids. Background Technology
[0002] In small-scale power systems (microgrids) at the edge of industrial parks and residential communities, the deployment and application of electric vehicle charging piles has become an important part of distributed energy utilization. However, existing technologies have defects, resulting in a serious disconnect between the operation of charging piles and the dynamic characteristics of the microgrid, making it impossible to achieve efficient coordination.
[0003] Existing technologies suffer from the following drawbacks: 1. Current charging pile load prediction models only focus on their own charging data, failing to incorporate key dynamic information such as real-time output of photovoltaic and wind power within the microgrid and the state of charge (SOC) of energy storage. This results in a severe mismatch between charging load and local renewable energy generation in terms of timing. This problem directly leads to frequent wind and solar curtailment, with typical solar curtailment rates in the industry often being high, resulting in a significant waste of green energy. Simultaneously, disorderly charging exacerbates power impacts on the upstream power grid, affecting grid stability. 2. Microgrids are characterized by low inertia and frequent load and generation fluctuations, requiring power balance commands to respond within seconds. However, existing charging pile control decisions rely on cloud processing, with command transmission and execution delays as high as 2-5 seconds, far from meeting the real-time requirements of microgrid frequency regulation and power support, and hindering the realization of the regulation potential of charging piles as flexible loads. 3. Equipment within microgrids comes from diverse sources, with photovoltaic inverters, energy storage systems, and charging piles from different manufacturers employing various heterogeneous communication protocols such as ModbusTCP, DNP3.0, and IEC61850, lacking a unified data interaction standard. This makes it difficult for charging piles to achieve efficient and low-cost data exchange with other devices, preventing them from participating in global collaborative optimization. They can only operate as independent devices, which restricts the improvement of the overall operating efficiency of the microgrid.
[0004] In addition, existing technical solutions mostly focus on optimizing the charging efficiency and safety protection of charging piles themselves, failing to fundamentally solve the core problem of deep collaboration between them and edge small power systems. As a result, the renewable energy absorption capacity, grid support capacity and user economy of microgrids have not been fully released. Summary of the Invention
[0005] The main objective of this invention is to provide a prediction method and system for regulating electric vehicle charging piles based on microgrids, which solves the problems of prediction being out of sync with the operating environment, low efficiency of new energy consumption, slow response speed, information silos, and low prediction accuracy in the prior art.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a predictive method for regulating electric vehicle charging piles based on microgrids, using charging piles as intelligent collaborative nodes of the microgrid, comprising the following steps: S1: Collect multi-source heterogeneous data through the microgrid collaborative communication interface and perform data preprocessing; the multi-source heterogeneous data includes charging pile status data, microgrid real-time operation data, and environmental and user behavior data; S2: Obtain multi-source heterogeneous data after data preprocessing, input it into the constructed load prediction model, perform local prediction, and obtain the charging load prediction result; S3: Upload the charging load prediction results to the microgrid EMS, combine them with the real-time operating status of the charging pile itself, generate charging and discharging scheduling instructions, and send them to the electric vehicle charging pile; S4: The electric vehicle charging pile executes the charging and discharging scheduling command through the bidirectional power module to realize the adjustment of charging power or reverse discharge power.
[0007] In a preferred embodiment, S2 includes: After acquiring the multi-source heterogeneous data that has undergone preprocessing, the load forecasting model performs normalization processing to obtain normalized data. The load forecasting model processes the normalized data through an encoder to obtain a hidden state sequence; The load prediction model calculates attention weights on the hidden state sequence through a time attention layer to obtain weighted hidden states; The load prediction model performs channel weighting on the weighted hidden state through a spatial channel attention layer to obtain calibration features; The load prediction model processes the calibration features through a decoder to obtain the charging load prediction result.
[0008] In the preferred embodiment, the charging pile's own status data includes: historical charging power sequence, real-time SOC, and equipment temperature; Real-time microgrid operation data includes photovoltaic power output forecast, real-time SOC of energy storage, and grid frequency at the point of common coupling within a preset time period provided by the microgrid EMS. Environmental and user behavior data include light intensity, ambient temperature, and user charging urgency tags.
[0009] In the preferred embodiment, the data preprocessing in S1 includes: The microgrid collaborative communication interface uses a dynamic protocol adaptation engine: by utilizing the multi-protocol stack and dynamic protocol adaptation engine built into the communication interface module, it performs protocol parsing, unified information modeling and rule mapping on multi-source heterogeneous data, and encapsulates it into standardized data in a preset unified format. The collected data is subjected to Z-score normalization to generate a multidimensional time series tensor.
[0010] In a preferred embodiment, the load prediction model calculates attention weights on the hidden state sequence through a time attention layer, including: The temporal attention layer performs global average pooling on the hidden state sequence to obtain temporal statistics; The time attention layer processes the time statistics through a fully connected layer to obtain the attention weights; The temporal attention layer performs a weighted summation of the hidden state sequence based on the attention weights to obtain the weighted hidden state.
[0011] In the preferred embodiment, the formula for calculating the attention weight is: ; in, The parameters are trainable, and the weighted context vector is: ; For attention weights at time steps, For trainable parameter vectors, This represents the hidden state of the encoder at a given time step.
[0012] In the preferred embodiment, the load prediction model performs channel weighting on the weighted hidden states through a spatial channel attention layer to obtain calibration features, including: Compression: Perform global average pooling on each feature channel to obtain channel statistics, using the following formula: ; In the formula, The number of channels in the input feature map; The height of the feature map; The width of the feature map; Let be the feature value of the c-th channel at position (i,j); This represents the global computational cost for the c-th channel. The calibrated features and context vectors are used as inputs to output a charging load prediction sequence.
[0013] In the preferred embodiment, S3 generates charge / discharge scheduling instructions, including: The microgrid energy management system aggregates the charging load prediction results of multiple electric vehicle charging piles to obtain a predicted load set; The microgrid energy management system optimizes the calculation by combining the predicted load set with photovoltaic output, energy storage status of charge, and time-of-use electricity price. The microgrid energy management system determines the charging and discharging power setting value for the electric vehicle charging pile based on the optimization calculation results, and uses it as the charging and discharging scheduling command.
[0014] In the preferred embodiment, the load forecasting model in S2 is trained and updated using a loss function and a federated learning mechanism, including: The loss function used is Huber loss, and the formula is as follows: ; In the formula, For the actual load, To predict load, This is the threshold parameter for the loss function, used to control the switching between squared loss and absolute loss; use optimizer, and introduce Regularization and gradient pruning mechanisms; The federated learning mechanism includes the following steps: Microgrid EMS server initializes global model parameters Each charging station uses locally encrypted data. Calculate the gradient of the model Or model update Gradient or model updates are encrypted using a homomorphic encryption algorithm and then uploaded to EMS. EMS uses a federated averaging algorithm to aggregate all encrypted local updates, decrypts them, and then updates the global model using the following formula: ; In the formula, Here are the global model parameters after the (t+1)th round update; K is the total number of charging piles participating in the training. Let be the local data volume of the k-th charging pile. The parameters of the local model uploaded after the training of the k-th pile in the t-th iteration are: A global model update is triggered after a preset time period or when model performance deteriorates.
[0015] Secondly, the present invention provides a system for intelligent predictive regulation of electric vehicle charging piles based on microgrid collaboration, characterized in that it is applicable to a predictive method for regulating electric vehicle charging piles based on a microgrid, with the charging pile as an intelligent collaborative node of the microgrid, comprising: The multi-source heterogeneous data module is used to collect multi-source heterogeneous data through the microgrid collaborative communication interface and perform data preprocessing; the multi-source heterogeneous data includes charging pile status data, microgrid real-time operation data, and environmental and user behavior data. The local prediction module is used to acquire multi-source heterogeneous data after data preprocessing and input it into the constructed load prediction model to perform local prediction and obtain the charging load prediction result. The load prediction model is a built-in lightweight spatiotemporal attention prediction model based on an encoder-decoder framework. The encoder includes three layers of bidirectional LSTM, a temporal attention layer, and a spatial channel attention layer, and the decoder includes two layers of LSTM and a fully connected layer. The charging and discharging scheduling module is used to upload the charging load prediction results to the microgrid EMS, combine them with the real-time operating status of the charging pile itself, generate charging and discharging scheduling instructions, and send them to the electric vehicle charging pile. The reverse adjustment module is used by the electric vehicle charging pile to execute the charging and discharging scheduling command through the bidirectional power module to realize the adjustment of charging power or reverse discharge power.
[0016] This invention provides a predictive method for regulating electric vehicle charging piles based on a microgrid. By collecting multi-source heterogeneous data and preprocessing it, the data is input into a constructed load prediction model. The load prediction model is a built-in lightweight spatiotemporal attention prediction model based on an encoder-decoder framework, obtaining the charging load prediction result. This result is then uploaded to the microgrid EMS. Combined with the real-time operating status of the charging piles, charging and discharging scheduling commands are generated. The electric vehicle charging piles execute these commands through bidirectional power modules, achieving adjustment of charging power or reverse discharging power. This improves prediction accuracy, strengthens the absorption capacity of new energy sources, accelerates response speed, enhances microgrid stability, breaks down protocol barriers, improves system integration efficiency, and optimizes economic benefits. Attached Figure Description
[0017] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a diagram of the three-level system collaboration (charging pile-microgrid-cloud) architecture of the present invention; Figure 2 This is a flowchart illustrating the data interaction between the microgrid EMS and the charging pile in this invention. Figure 3 This is a scenario diagram of 2G and energy storage collaborative scheduling in this invention; Figure 4 This is the power supply priority logic diagram of the charging pile in the island mode of the present invention; Figure 5 This is a flowchart of the data decomposition process of this invention; Figure 6 This is the data protocol adaptation process of the present invention; Figure 7 This is a schematic diagram of the multi-level backup power system of the present invention; Figure 8 This is a diagram of the integrated architecture of heterogeneous devices and upper-layer applications of this invention; Figure 9 This is a comparison chart of the absorption effect during the midday peak photovoltaic power generation period. Figure 10 This is a comparison chart of the effects of midday frequency deviation on microgrids; Figure 11 This is a comparison chart of power curves during the midday peak photovoltaic power generation period. Detailed Implementation
[0018] Example 1 like Figure 1-11 As shown, a predictive method for regulating electric vehicle charging piles based on microgrids, using charging piles as intelligent collaborative nodes in the microgrid, includes the following steps: S1: Collect multi-source heterogeneous data through the microgrid collaborative communication interface and perform data preprocessing.
[0019] S2: Obtain multi-source heterogeneous data after data preprocessing and input it into the constructed load prediction model to perform local prediction and obtain the charging load prediction result; The load prediction model is a built-in lightweight spatiotemporal attention prediction model, which is based on an encoder-decoder framework. The encoder includes three layers of bidirectional LSTM, a temporal attention layer, and a spatial channel attention layer, and the decoder includes two layers of LSTM and a fully connected layer.
[0020] S3: Upload the charging load forecast results to the microgrid EMS, combine them with the real-time operating status of the charging piles, generate charging and discharging scheduling instructions, and send them to the electric vehicle charging piles.
[0021] S4: Electric vehicle charging piles execute charging and discharging scheduling commands through bidirectional power modules to achieve charging power or reverse discharge power adjustment.
[0022] This embodiment collects heterogeneous data from multiple sources, preprocesses the data, and inputs it into a constructed load prediction model. The load prediction model is a built-in lightweight spatiotemporal attention prediction model based on an encoder-decoder framework. The charging load prediction results are obtained and uploaded to the microgrid EMS. Combined with the real-time operating status of the charging piles, charging and discharging scheduling instructions are generated. The electric vehicle charging piles execute the charging and discharging scheduling instructions through bidirectional power modules to achieve charging power or reverse discharge power adjustment. This improves prediction accuracy, strengthens the renewable energy absorption capacity, accelerates response speed, enhances microgrid stability support, breaks down protocol barriers, improves system integration efficiency, and enhances economic efficiency.
[0023] The intelligent predictive regulation electric vehicle charging pile proposed in this embodiment, through the collaborative reconstruction of the hardware system and the embedding of software algorithms, enables the charging pile to become an intelligent node capable of sensing, predicting, and responding to the dynamics of the microgrid.
[0024] like Figure 1 As shown, the hardware system architecture implemented in this embodiment includes a three-level collaborative architecture of cloud-microgrid-charging pile: 1. Smart microgrid collaborative interface and edge controller: Integrated microgrid communication protocol stack: Built-in ModbusTCP, DNP3.0, IEC61850 and other protocol stacks, through dynamic protocol adaptation engine (supporting intelligent rule matching and manufacturer equipment feature code recognition) to achieve efficient, plug-and-play communication with more than 95% of microgrid equipment (such as energy storage inverters and photovoltaic controllers) (compatibility rate increased to 98%).
[0025] Local intelligent edge computing unit: It has a built-in lightweight spatiotemporal attention model (approximately 800,000 parameters), which autonomously predicts the charging load every 15 minutes (prediction error ≤ 2.5%), and uploads the prediction results and its own operating status (SOC, temperature) to the microgrid EMS in real time. This prediction function is the foundation for the intelligent collaborative decision-making of this charging pile.
[0026] Federated learning node: As a federated learning client, it participates in the joint model training of multiple charging piles without leaving the local data (encrypted by AES-256) and aggregates global parameters through the microgrid EMS to improve prediction accuracy and protect privacy.
[0027] 2. Intelligent bidirectional power module and response mechanism: High-efficiency V2G function: Integrated high-efficiency (≥95%) bidirectional power module, supporting reverse power supply (V2G) up to 20kW peak power, such as... Figure 2 As shown, the entire process of two-way data interaction between EMS and charging piles is presented, clearly defining the time nodes and data content.
[0028] Microgrid Coordinated Response: Possesses rapid response capabilities (response time ≤ 1 second), not only responding to main grid dispatch commands but also prioritizing real-time dispatch commands issued by the microgrid EMS (such as signals based on time-of-use pricing, photovoltaic output fluctuations, and grid frequency deviation ±0.2Hz), enabling dynamic charging and discharging adjustment (such as peak-hour V2G and off-peak centralized charging). Figure 3 As shown; the current module is the physical entity that ultimately executes the coordinated control instructions.
[0029] Based on the above analysis, this embodiment constructs a load forecasting model that integrates multi-source data.
[0030] The load prediction model is a lightweight spatiotemporal attention prediction model, and its construction and training process is as follows: 1. First, collect data and perform data preprocessing.
[0031] In the preferred embodiment, the data preprocessing in step S1 includes: like Figure 2As shown, the microgrid collaborative communication interface uses a dynamic protocol adaptation engine: utilizing the ModbusTCP, DNP3.0, IEC61850 multi-protocol stack and dynamic protocol adaptation engine built into the communication interface module to perform protocol parsing, unified information modeling and rule mapping on multi-source heterogeneous data, and encapsulate it into standardized data in JSON or ProtocolBuffers format. The collected data is subjected to Z-score normalization to form a multidimensional time series tensor with dimension D=8, time window T=60 minutes, and sampling interval of 1 minute.
[0032] like Figure 5 As shown, this is the multi-source data standardization processing flow. It starts by receiving raw data from charging piles (supporting access from multiple protocol devices such as IEC61850 and ModbusTCP), which is then processed by protocol parsing and dynamic conversion engine. Finally, it completes field mapping, format conversion (JSON encapsulation), and data verification through rule base matching, and outputs standardized data for microgrid EMS to receive.
[0033] and Figure 5 The process is consistent. Figure 6 It presents in detail the parsing and adaptation process of heterogeneous protocols (IEC 61850, DNP3.0, etc.), including MMS parsing, register address mapping, data point number conversion, and the standardization process of timestamp unification (UNIX format), unit specifications (voltage V, power kW), etc.
[0034] In the preferred scheme, the multi-source heterogeneous data includes the charging pile's own status data, the microgrid's real-time operation data, and environmental and user behavior data.
[0035] In the preferred scheme, in the encoder of the attention prediction model in step S2, the number of hidden units in each layer of bidirectional LSTM is 128. The temporal attention layer can dynamically focus on key time nodes of microgrid power balance, and the spatial channel attention layer achieves adaptive weighting of feature channels through global average pooling and fully connected layers.
[0036] This embodiment uses a multidimensional time series tensor as the model input, including the following data features: 1) The charging pile's own status data includes: historical charging power sequence, real-time SOC (State of Charge), and equipment temperature; 2) Real-time microgrid operation data includes the photovoltaic predicted output for the next 15 minutes, the real-time SOC of energy storage, and the grid frequency of the point of common coupling (PCC) provided by the microgrid EMS.
[0037] 3) Environmental and user behavior data include local light intensity (W / m²), ambient temperature (°C), and user charging urgency label (high=1.0, medium=0.5, low=0.1).
[0038] All input features are Z-score normalized to eliminate the influence of dimensions.
[0039] 2. Model Architecture Analysis In this embodiment, the lightweight spatiotemporal attention model is based on an encoder-decoder framework with approximately 800,000 parameters. Its specific structure is as follows: 1) Encoder: Consists of 3 layers of bidirectional LSTM, with 128 hidden units per layer, outputting a sequence of hidden states: ; in (Two-way splicing).
[0040] In the preferred scheme, the time attention layer is used for dynamic learning and focusing on key time points (such as evening peak electricity consumption) that affect the power balance of the microgrid. The attention weight calculation formula is as follows: ; in, The parameters are trainable, and the weighted context vector is: ; For attention weights at time steps, For trainable parameter vectors, This represents the hidden state of the encoder at a given time step.
[0041] In the preferred embodiment, step S2 includes: After acquiring the multi-source heterogeneous data that has undergone preprocessing, the load forecasting model performs normalization processing to obtain normalized data. The load forecasting model processes normalized data through an encoder to obtain a hidden state sequence.
[0042] The load forecasting model calculates attention weights on the hidden state sequence through a time attention layer to obtain weighted hidden states.
[0043] The load prediction model uses a spatial channel attention layer to perform channel weighting on the weighted hidden states to obtain calibration features.
[0044] The load prediction model processes calibration features through a decoder to obtain charging load prediction results.
[0045] In the preferred scheme, the load prediction model adaptively weights the input feature channels through a spatial channel attention layer (SEBlock) to obtain calibrated features. The core operations include: a) Compression: Perform global average pooling on each feature channel to obtain channel statistics, using the following formula: ; In the formula, The number of channels in the input feature map (i.e., the hidden state dimension, with a value of 256); The height of the feature map (corresponding to time step T=60); The width of the feature map (1 here because the features have been compressed spatially); Let be the feature value of the c-th channel at position (i,j); This represents the global computational cost for the c-th channel.
[0046] The calibrated features and context vectors are used as inputs to output a charging load prediction sequence.
[0047] b) Excitation: The decoder consists of two LSTM layers with 128 hidden units, and learns channel weights through fully connected layers. ; in, For the weights of the first fully connected layer, compress the dimension from C to... ; For the weights of the second fully connected layer, the dimension is compressed from C to... ; The compression ratio (value is 16) controls the model complexity.
[0048] for Activation function: ; for Activation function: ; is the weight coefficient of the c-th channel, ranging from [0,1].
[0049] c) Recalibration: The learned channel weights s are multiplied channel by channel with the original input features F to obtain the calibrated features. : ; in, This is the feature map after calibration for the c-th channel.
[0050] d) Feature fusion and decoding input: Input the calibrated features context vectors output by the temporal attention layer To merge: First of all Compress the vector using global average pooling, then combine it with the context vector. The features are concatenated or added together; the fused features serve as the initial input to the decoder, which consists of two LSTM layers with 128 hidden units. It receives the fused features and progressively outputs a charging load prediction sequence for the next 15 minutes. .
[0051] 3. Model training and federated learning process: Local training: Updates are performed using a loss function and a federated learning mechanism, including: a) The loss function used is Huber loss, and the formula is: ; In the formula, For the actual load, To predict load, This is the threshold parameter for the loss function.
[0052] use Optimizer (learning rate) Weight decay Batch size 32, training epochs 50. Regularization: Introduced. And a gradient clipping (threshold=1.0) mechanism to prevent overfitting.
[0053] b) Federated learning: Initialization: The microgrid EMS server initializes the global model parameters. .
[0054] Local training: Each charging station uses locally encrypted data ( ), calculate gradient : ; in, Here is the Huber loss function.
[0055] Encrypted upload: Gradients are encrypted using homomorphic encryption. The algorithm was uploaded to EMS.
[0056] c) Secure aggregation: EMS uses a federated averaging algorithm ( Update the global model: ; In the formula, Here are the global model parameters updated in round t+1; K is the total number of charging piles participating in the training. Let be the local data volume of the k-th charging pile. The parameters of the local model uploaded after the training of the k-th pile in the t-th iteration are: The learning rate is used to trigger a global model update after a preset time period (e.g., every 24 hours) or when the model performance deteriorates and the root mean square error (RMSE) of the validation set increases by more than 5%.
[0057] d) Model deployment: every 24 hours or when model performance degrades (validation set) When ), an update is triggered.
[0058] In the preferred embodiment, step S3 generates a charge / discharge scheduling command, including: The microgrid energy management system aggregates the charging load forecasts of multiple electric vehicle charging stations to obtain a predicted load set.
[0059] The microgrid energy management system optimizes the calculations based on the predicted load set, photovoltaic output, energy storage status of charge, and time-of-use pricing.
[0060] Based on the optimization calculation results, the microgrid energy management system determines the charging and discharging power setpoints for electric vehicle charging piles, which serve as charging and discharging scheduling instructions.
[0061] This embodiment selects a State Grid integrated energy demonstration park as the test scenario. The park has a typical microgrid architecture and can fully simulate the actual operation needs such as photovoltaic absorption, peak and valley regulation, and emergency power supply. The specific configuration is as follows: In order to verify the effectiveness of the intelligent prediction and regulation method in this embodiment, a 72-hour closed test was conducted in a State Grid integrated energy demonstration park. The aim was to quantitatively evaluate the collaborative regulation efficiency of the system in a real microgrid environment and compare it with the traditional charging pile operation mode.
[0062] (I) Configuration of core equipment for microgrids 1. Photovoltaic System: The microgrid forms a photovoltaic array with a peak power of 1.05MW, which is installed on the roof of the factory buildings in the park and equipped with photovoltaic inverters from mainstream brands such as Huawei and Sungrow Power, supporting ModbusTCP and DNP3.0 protocol data output; 2. Energy Storage System: A 2MWh / 1MW lithium iron phosphate battery energy storage system, which outputs real-time data such as state of charge (SOC) and charge / discharge power, and adopts the IEC61850 communication protocol. Figure 7 As shown, the multi-level backup power system includes a backup power architecture with supercapacitors and energy storage batteries connected in parallel. The supercapacitors have a response time of <10ms and provide instantaneous power support. The energy storage batteries have a capacity of 2MWh and can provide power for 72 hours. When the main grid fails, the supercapacitors are activated first, and then the energy storage batteries take over the power supply for the core loads (medical charging piles, emergency lighting). The switching response time is <120ms.
[0063] 3. Charging Pile Cluster: 200 smart charging piles, of which 150 are the smart piles in this embodiment (test group) and 50 are traditional orderly charging piles (control group). The charging piles in the test group are equipped with a microgrid communication module (model: MG-Com-01) and an edge computing controller (model: ECU-2023), and integrate a bidirectional power module (efficiency ≥95%, peak reverse power supply power 20kW).
[0064] 4. Microgrid EMS: Deploy a collaborative scheduling server (software version: V1.2) and protocol middleware to support multi-protocol parsing, global optimization calculation and scheduling command issuance.
[0065] 5. Data acquisition equipment: Yokogawa CW240 power quality analyzer is used to collect power and frequency data in real time at the point of common coupling (PCC) (sampling frequency 100Hz). All operating data is synchronously recorded by the EMS log system.
[0066] (II) Key Technology Configuration Parameters 1. Communication Protocol Adaptation: The charging piles in the test group have built-in ModbusTCP, DNP3.0, and IEC61850 multi-protocol stacks. The dynamic protocol adaptation engine supports intelligent rule matching and manufacturer equipment feature code recognition, achieving a plug-and-play protocol success rate of ≥97%. Figure 5 As shown.
[0067] 2. Prediction Model Deployment: The edge computing controller has a built-in lightweight spatiotemporal attention prediction model (approximately 800,000 parameters), with an input feature dimension D=8, a time window T=60 minutes, a sampling interval of 1 minute, and performs local load prediction every 15 minutes; 3. Federated learning configuration: Local data is encrypted using AES-256, gradients are uploaded using homomorphic encryption algorithm, and the microgrid EMS uses a federated averaging algorithm to aggregate global model parameters. Model updates are triggered every 7 days or when the error on the model validation set increases by more than 5%.
[0068] 4. Response mechanism parameters: Bidirectional power module command response time ≤ 1 second, supports fast adjustment based on grid frequency deviation ±0.2Hz, V2G reverse power supply peak power 20kW / pile.
[0069] II. Test Implementation Process The testing period is 72 hours (October 15-17, 2023), divided into two phases, aiming to compare the operational performance of the traditional mode and the collaborative mode of this invention: (I) Phase One: Benchmarking (October 15): All charging piles (including the test group) are set to the traditional orderly charging mode. The microgrid EMS does not perform active coordinated scheduling, but only records the original operating data, including photovoltaic output, energy storage SOC, charging pile charging power, PCC point frequency and curtailment rate, etc., as benchmark data for subsequent comparison.
[0070] (II) Second Phase: Coordinated Regulation Testing (October 16-17): The intelligent prediction and collaborative control function of the charging piles in the test group was activated. The microgrid EMS performed global optimization scheduling based on multi-source data, focusing on testing two core scenarios: Scenario 1: Midday photovoltaic power generation peak period consumption test (October 16, 11:30-13:30).
[0071] 1. Data Acquisition and Preprocessing: The charging pile collects multi-source heterogeneous data through the microgrid collaborative communication interface, including historical charging power sequence, real-time SOC, equipment temperature, photovoltaic power output prediction for the next 15 minutes, real-time SOC of energy storage, grid frequency at PCC point, irradiance, ambient temperature, and user charging urgency tag. After Z-score normalization, it forms a multi-dimensional time series tensor.
[0072] like Figure 8 As shown, the original protocol data of heterogeneous device layers (charging piles, energy storage inverters, photovoltaics, etc.) is processed into standardized data through protocol conversion and adaptation, unified information model and rule mapping engine, and then connected to upper-layer applications (user APP, etc.) through unified service and REST API to achieve cross-device and cross-application integration.
[0073] 2. Local Prediction: The edge computing controller runs the prediction model, processes the normalized data through a 3-layer bidirectional LSTM encoder, and after weighting by the time attention layer and calibration by the spatial channel attention layer, the 2-layer LSTM decoder outputs the prediction result of the charging load for the next hour (prediction error MAPE=2.3%).
[0074] 3. Global Scheduling: The EMS aggregates the predicted load set of 150 test group charging piles, and calculates the power surplus by combining the real-time output of photovoltaic (800kW and continuously increasing) and the energy storage SOC (85%), and issues instructions to increase the charging power to 80 low SOC charging piles.
[0075] 4. Execution and Feedback: The test group of charging piles smoothly increased the total charging power from 250kW to 520kW according to the instructions, dynamically tracked the photovoltaic output curve, and the energy storage system assisted in smooth adjustment. During this period, the average photovoltaic power consumption was 500kW, and the curtailment rate decreased from the baseline of 12.5% to 3.8%.
[0076] Scenario 2: Evening peak V2G support test (October 16, 18:00-20:00).
[0077] 1. Pre-schedule preparation: At 17:50, based on the load forecast results (the typical load of the park during the evening peak is about 3.3MW), EMS sends V2G preparatory instructions to 60 test charging piles with SOC≥80%, and the charging piles complete self-checks and enter standby mode.
[0078] 2. Peak-hour load reduction and control: At 18:15, the park load reached its peak. 60 charging piles started V2G reverse power supply according to the dispatch instructions, with a peak power of 600kW, achieving a load reduction ratio of about 18% at the PCC point.
[0079] 3. Frequency emergency adjustment: At 18:30, the main network frequency dropped to 49.82Hz. The EMS issued a frequency adjustment command in real time. Within 900ms, the V2G pile group increased the total reverse power supply from 600kW to 720kW, quickly smoothing out the frequency fluctuation.
[0080] 4. Continuous operation and benefits: From 18:30 to 20:00, the V2G power is dynamically adjusted according to EMS instructions. During peak hours, the cumulative feedback energy is 1.1MWh. Users participating in V2G can save costs through peak discharge premium and off-peak charging, with the average charging cost reduced by 20%-25%.
[0081] like Figure 9 As shown in the bar chart, comparing the photovoltaic absorption rate and curtailment rate of the traditional model with those of this embodiment, the traditional model has an absorption rate of 82.0% and a curtailment rate of 12.5%, while this embodiment has an absorption rate of 97.0% and a curtailment rate of 3.8%, which clearly demonstrates the effect of increasing the absorption rate by 15.0% and reducing the curtailment rate by 8.7%.
[0082] like Figure 10 As shown, there are two sub-plots. The upper plot is the frequency curve from 18:30 to 18:40. In the traditional mode, the frequency drops to a minimum of 49.82 Hz (close to the safety limit). In this embodiment, the frequency is maintained by rapid adjustment via V2G. The lower plot is the area plot of the absolute value of the frequency deviation. In the traditional mode, the deviation area is 1.148 Hz·min, while in this embodiment it is 0.208 Hz·min, a reduction of 81.9%.
[0083] like Figure 11 As shown, the line graph displays the photovoltaic output, traditional mode charging load, and charging load curves of this embodiment from 11:30 to 13:30. The peak photovoltaic output is 850kW, the average curtailment rate of the traditional mode is 58.6%, and that of this embodiment is 3.3%. By comparing the overlap of the curves and the curtailment area, the advantages of this embodiment in dynamically tracking the photovoltaic output for power consumption are highlighted.
[0084] III. Implementation Results Verification (I) Comparison of core performance indicators The test is divided into the traditional mode and this embodiment. The key performance comparison is shown in Table 1.
[0085] Table 1 Comparison of Key Performance Components
[0086] Traditional solutions suffer from several disconnects: 1. Charging piles cannot sense the microgrid's status: During peak afternoon solar power generation, charging piles remain inactive, leading to significant curtailment (~18%); while during evening peak hours, concentrated charging exacerbates the impact on the upper-level grid. 2. There is no effective decision-making interaction between the microgrid EMS and charging piles. The EMS can only passively respond to charging loads and cannot proactively optimize them. 3. Control commands rely on the cloud, resulting in delays of several seconds, failing to address the microgrid's second-level fluctuations.
[0087] In this embodiment, the edge controller of the charging pile runs a prediction model every 15 minutes, integrating photovoltaic output prediction, energy storage SOC and grid frequency signals from the microgrid EMS, and realizes "sensing" of the local environment; synergistic effect: load prediction error is reduced to 2.3%.
[0088] In this embodiment, the EMS aggregates the predicted load curves uploaded by all charging piles and performs global optimization calculations with photovoltaic, energy storage, and grid electricity price signals to generate the optimal charging and discharging strategy for each charging pile. By integrating microgrid dynamic data, the prediction error is reduced from over 10% in traditional models to 2.0%-2.8%, providing a reliable decision-making basis for global scheduling. The photovoltaic absorption rate is increased from the baseline of 82% to 97%, achieving efficient utilization of new energy sources. At the same time, global optimization reduces the peak-shaving pressure on the energy storage system. The microgrid frequency deviation qualification rate is increased from 91.5% to 99.2%, the peak power purchased by the grid during peak hours is reduced by about 40%, and the islanding mode switching success rate is 100% (switching delay ≈ 120ms), improving power supply reliability. This increases the economic benefits for users, reduces the operating pressure on the grid, and improves the efficiency of new energy absorption.
[0089] During the initial deployment of this embodiment, the protocol mapping rules of mainstream devices need to be configured through the protocol parser to establish a unified information model and ensure data interoperability between heterogeneous devices. After the edge computing controller deploys the prediction model, it needs to perform 7 days of local data pre-training to ensure that the initial prediction accuracy meets the requirements. Local data is stored using AES-256 encryption, and gradient transmission uses homomorphic encryption to avoid data leakage. The bidirectional power module needs to be calibrated regularly to ensure that the command response time is ≤1 second and the reverse power supply efficiency is ≥95%.
[0090] This embodiment verifies the feasibility and effectiveness of the method through closed testing in a real microgrid scenario, and is widely applicable to various microgrid scenarios such as residential communities and industrial parks.
[0091] The lightweight spatiotemporal attention prediction model constructed in this embodiment has the following significant improvements and advantages compared to the existing charging pile load prediction model: Architectural innovation: It is the first to introduce a "spatiotemporal dual attention" mechanism (temporal attention + spatial channel attention) in charging pile load prediction, which enables the model to focus on key time points and key feature channels at the same time, significantly improving prediction accuracy and reducing the mean absolute percentage error (MAPE) to 2.0%-2.8%.
[0092] Lightweight design: By controlling the model's depth and width (total parameters of approximately 800,000), it can be built into the edge computing unit of the charging pile, achieving true localized prediction, eliminating cloud transmission delay, and reducing the prediction response time to less than 1 second, thus meeting the needs of rapid regulation of the microgrid.
[0093] Deep scenario fusion: The model input feature dimension (D=8) is designed specifically for microgrid collaborative scenarios. For the first time, it systematically models the charging pile's own status, real-time microgrid operation data, and environmental user behavior data in a unified manner, solving the problem of the disconnect between prediction and operation environment, and making the prediction results naturally support the subsequent global optimization and scheduling of the microgrid.
[0094] Example 2 Further illustrating with reference to Embodiment 1, a system for intelligent predictive regulation of electric vehicle charging piles based on microgrid collaboration is applicable to the predictive method for regulating electric vehicle charging piles based on microgrids in Embodiment 1, using the charging piles as intelligent collaborative nodes of the microgrid, and includes: The multi-source heterogeneous data module is used to collect multi-source heterogeneous data through the microgrid collaborative communication interface and perform data preprocessing; the multi-source heterogeneous data includes charging pile status data, microgrid real-time operation data, and environmental and user behavior data.
[0095] The local forecasting module is used to acquire multi-source heterogeneous data after data preprocessing, input it into the constructed load forecasting model, perform local forecasting, and obtain charging load forecasting results.
[0096] The load forecasting model is a lightweight spatiotemporal attention forecasting model optimized for the edge computing environment of microgrids, based on an encoder-decoder framework. Its improvement lies in that, in addition to the three-layer bidirectional LSTM, the encoder also sequentially connects a temporal attention layer and a spatial channel attention layer to adaptively assign weights to the temporal and feature channel dimensions of the input sequence, respectively. The decoder includes two layers of LSTM and a fully connected layer, which are used to generate load forecasting results based on the calibration feature sequence output by the encoder.
[0097] The charging and discharging scheduling module is used to upload the charging load prediction results to the microgrid EMS, combine them with the real-time operating status of the charging piles, generate charging and discharging scheduling instructions, and send them to the electric vehicle charging piles.
[0098] The reverse adjustment module is used by electric vehicle charging piles to execute charging and discharging scheduling commands through bidirectional power modules to achieve adjustment of charging power or reverse discharge power.
[0099] This embodiment provides a predictive method for regulating electric vehicle charging piles based on microgrids, including its working process, details, and technical effects. Please refer to Embodiment 1 for further details.
[0100] The above embodiments are merely preferred technical solutions of the present invention and should not be considered as limitations on the present invention. The scope of protection of the present invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of the present invention.
Claims
1. A predictive method for regulating electric vehicle charging piles based on microgrids, characterized in that, Using charging piles as intelligent collaborative nodes in a microgrid includes the following steps: S1: Collect multi-source heterogeneous data through the microgrid collaborative communication interface and perform data preprocessing; the multi-source heterogeneous data includes charging pile status data, microgrid real-time operation data, and environmental and user behavior data; S2: Obtain multi-source heterogeneous data after data preprocessing, input it into the constructed load prediction model, perform local prediction, and obtain the charging load prediction result; S3: Upload the charging load prediction results to the microgrid EMS, combine them with the real-time operating status of the charging pile itself, generate charging and discharging scheduling instructions, and send them to the electric vehicle charging pile; S4: The electric vehicle charging pile executes the charging and discharging scheduling command through the bidirectional power module to realize the adjustment of charging power or reverse discharge power.
2. The prediction method for regulating electric vehicle charging piles based on microgrids according to claim 1, characterized in that, S2 includes: After acquiring the multi-source heterogeneous data that has undergone preprocessing, the load forecasting model performs normalization processing to obtain normalized data. The load forecasting model processes the normalized data through an encoder to obtain a hidden state sequence; The load prediction model calculates attention weights on the hidden state sequence through a time attention layer to obtain weighted hidden states; The load prediction model performs channel weighting on the weighted hidden state through a spatial channel attention layer to obtain calibration features; The load prediction model processes the calibration features through a decoder to obtain the charging load prediction result.
3. The prediction method for regulating electric vehicle charging piles based on microgrids according to claim 1, characterized in that, The charging pile's own status data includes: historical charging power sequence, real-time SOC, and equipment temperature; Real-time microgrid operation data includes photovoltaic power output forecast, real-time SOC of energy storage, and grid frequency at the point of common coupling within a preset time period provided by the microgrid EMS. Environmental and user behavior data include light intensity, ambient temperature, and user charging urgency tags.
4. The prediction method for regulating electric vehicle charging piles based on microgrids according to claim 1, characterized in that, The data preprocessing in S1 includes: The microgrid collaborative communication interface uses a dynamic protocol adaptation engine: by utilizing the multi-protocol stack and dynamic protocol adaptation engine built into the communication interface module, it performs protocol parsing, unified information modeling and rule mapping on multi-source heterogeneous data, and encapsulates it into standardized data in a preset unified format. The collected data is subjected to Z-score normalization to generate a multidimensional time series tensor.
5. The prediction method for regulating electric vehicle charging piles based on microgrids according to claim 2, characterized in that, The load prediction model calculates attention weights on the hidden state sequence through a time attention layer, including: The temporal attention layer performs global average pooling on the hidden state sequence to obtain temporal statistics; The time attention layer processes the time statistics through a fully connected layer to obtain the attention weights; The temporal attention layer performs a weighted summation of the hidden state sequence based on the attention weights to obtain the weighted hidden state.
6. The prediction method for regulating electric vehicle charging piles based on microgrids according to claim 5, characterized in that, The formula for calculating the attention weight is: ; in, The parameters are trainable, and the weighted context vector is: ; Attention weights for time steps, For trainable parameter vectors, This represents the hidden state of the encoder at a given time step.
7. The prediction method for regulating electric vehicle charging piles based on microgrids according to claim 2, characterized in that, The load prediction model performs channel weighting on the weighted hidden states through a spatial channel attention layer to obtain calibration features, including: Compression: Perform global average pooling on each feature channel to obtain channel statistics, using the following formula: ; In the formula, The number of channels in the input feature map; The height of the feature map; The width of the feature map; Let be the feature value of the c-th channel at position (i,j); This represents the global computational cost for the c-th channel. The calibrated features and context vectors are used as inputs to output a charging load prediction sequence.
8. The predictive method for regulating electric vehicle charging piles based on microgrids according to claim 1, characterized in that, The S3 generates charge / discharge scheduling instructions, including: The microgrid energy management system aggregates the charging load prediction results of multiple electric vehicle charging piles to obtain a predicted load set; The microgrid energy management system optimizes the calculation by combining the predicted load set with photovoltaic output, energy storage status of charge, and time-of-use electricity price. The microgrid energy management system determines the charging and discharging power setting value for the electric vehicle charging pile based on the optimization calculation results, and uses it as the charging and discharging scheduling command.
9. The predictive method for regulating electric vehicle charging piles based on microgrids according to claim 1, characterized in that, The load prediction model in S2 is trained and updated using a loss function and a federated learning mechanism, including: The loss function used is Huber loss, and the formula is as follows: ; In the formula, For the actual load, To predict load, This is the threshold parameter for the loss function, used to control the switching between squared loss and absolute loss; use Optimizer, and introduce Regularization and gradient pruning mechanisms; The federated learning mechanism includes the following steps: Microgrid EMS server initializes global model parameters Each charging station uses locally encrypted data. Calculate the gradient of the model Or model update Gradient or model updates are encrypted using a homomorphic encryption algorithm and then uploaded to EMS. EMS uses a federated averaging algorithm to aggregate all encrypted local updates, decrypts them, and then updates the global model using the following formula: ; In the formula, Here are the global model parameters after the (t+1)th round update; K is the total number of charging piles participating in the training. Let be the local data volume of the k-th charging pile. The parameters of the local model uploaded after the training of the k-th pile in the t-th iteration are: A global model update is triggered after a preset time period or when model performance deteriorates.
10. A system for intelligent predictive regulation of electric vehicle charging piles based on microgrid collaboration, characterized in that, A predictive method for regulating electric vehicle charging stations based on a microgrid, using charging stations as intelligent collaborative nodes in the microgrid, includes: The multi-source heterogeneous data module is used to collect multi-source heterogeneous data through the microgrid collaborative communication interface and perform data preprocessing; the multi-source heterogeneous data includes charging pile status data, microgrid real-time operation data, and environmental and user behavior data. The local prediction module is used to acquire multi-source heterogeneous data after data preprocessing and input it into the constructed load prediction model to perform local prediction and obtain the charging load prediction result. The load prediction model is a built-in lightweight spatiotemporal attention prediction model based on an encoder-decoder framework. The encoder includes three layers of bidirectional LSTM, a temporal attention layer, and a spatial channel attention layer, and the decoder includes two layers of LSTM and a fully connected layer. The charging and discharging scheduling module is used to upload the charging load prediction results to the microgrid EMS, combine them with the real-time operating status of the charging pile itself, generate charging and discharging scheduling instructions, and send them to the electric vehicle charging pile. The reverse adjustment module is used by the electric vehicle charging pile to execute the charging and discharging scheduling command through the bidirectional power module to realize the adjustment of charging power or reverse discharge power.