A virtual power plant grid frequency modulation intelligent response method
By employing federated learning to generate personalized models and autonomous control of backup control kernels in a virtual power plant, the problem of frequency runaway caused by communication interruptions was solved, achieving smooth reconnection and grid stability during communication recovery, thus improving grid security and recovery efficiency.
Patent Information
- Application Number
- CN202611683891.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-29
- Publication Date
- 2026-11-27
AI Technical Summary
When existing virtual power plants experience communication interruptions, the distributed resource terminals lose cloud control, leading to frequency outages and difficulty in smooth reconnection after communication is restored, which may pose a risk to power grid security.
A federated learning framework is used to generate personalized frequency-voltage response models. The backup control core takes over control when communication is interrupted, performs autonomous control based on local data, and achieves a smooth handover between the cloud and the terminal through counterfactual inference and model verification when communication is restored.
During communication outages, the autonomous frequency regulation capability of distributed resources is maintained to ensure grid stability. During recovery, power surges are avoided through classified recovery strategies and slip compensation, thereby improving grid security and recovery smoothness.
Smart Images

Figure CN123184033A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of frequency control technology for virtual power plants, and in particular to a smart response method for grid frequency regulation in virtual power plants. Background Technology
[0002] Virtual power plants aggregate dispersed resources such as energy storage, charging piles, and photovoltaic inverters into a dispatchable whole through communication networks, participating in grid frequency regulation. Under normal operating conditions, the cloud platform generates dispatch commands based on real-time collected operational data from each terminal and sends them to the terminal edge gateways for execution, forming a centralized frequency regulation control closed loop of "cloud-edge-device" collaboration. The communication network is the core link maintaining this control closed loop; terminals rely on cloud commands to determine their own power output, and the cloud relies on data sent by the terminals to grasp the overall operating status and make dispatch decisions.
[0003] However, when multiple terminals experience mass communication outages with the cloud platform due to extreme weather, equipment failures, or cyberattacks, existing technologies typically only provide passive off-grid protection or maintain the terminals in their pre-outage state. They cannot provide active frequency response control during the outage. If the power grid experiences frequency disturbances at this time, these out-of-control terminals not only fail to provide frequency regulation support but their uncontrolled charging and discharging behavior may further worsen frequency deviations. Furthermore, after widespread communication restoration, existing technologies lack effective systemic solutions for smoothly and seamlessly reintegrating the large number of recovered terminals into centralized cloud control. Therefore, enabling distributed resources to transition from passive loss of control to active autonomy during communication outages and achieving seamless grid connection after communication restoration has become a critical technical challenge. Summary of the Invention
[0004] To overcome the above shortcomings, this invention provides a smart response method for grid frequency regulation in virtual power plants. It aims to improve the existing virtual power plant's passive and uncontrolled state due to the loss of cloud control in communication interruption scenarios, making it difficult to actively respond to grid frequency fluctuations. Furthermore, it addresses the issue that synchronous switching of multiple terminals after a large-scale restoration of communication can easily lead to aggregated power impacting grid safety.
[0005] This invention provides the following technical solution: a virtual power plant grid frequency regulation intelligent response method, comprising: S1. The cloud platform uses a federated learning framework to generate and distribute personalized frequency-voltage response models for each distributed resource terminal. The main control core of each terminal edge gateway executes cloud instructions, and the backup control core loads the model and constructs the current autonomous control instructions based on the real-time collected local frequency and voltage data. S2. When communication is interrupted, the backup control core takes over control, uses the current autonomous control command as the initial output, generates subsequent control commands based on the model, and extracts the operation log containing the frequency sequence and power trajectory. S3. When communication is restored, the cloud platform extracts the operation log, uses the model synchronized before the network outage, performs counterfactual deduction based on the frequency sequence, and constructs the cloud control trajectory. S4. The cloud platform compares the cloud control trajectory with the actual power trajectory in the operation log, calculates the deviation, and marks the terminal as either model reliable or model inaccurate based on whether the deviation exceeds the threshold. S5. The cloud platform divides the recovery batches according to the markers, power contribution, and device type of each terminal. S6. The cloud platform generates slip compensation instructions for the trusted terminal of the model, transfers its power to the cloud control trajectory, and then returns control. For the misaligned terminal of the model, it takes over with the current actual power as the initial target value and gradually adjusts it. During the batch recovery process, the cloud platform adjusts the timing of subsequent batches to control the rate of change of aggregated power.
[0006] The present invention has the following beneficial effects: 1. In this invention, through the hot standby mechanism of the backup control core and the local closed-loop autonomous control, the terminal can continuously generate and execute frequency modulation control commands based on the real-time collected local frequency and voltage data during the period of complete communication interruption. This transforms the distributed resources that were originally out of control during the network outage into autonomous nodes that can actively support the grid frequency, thus eliminating the frequency modulation capability vacuum during the communication interruption.
[0007] 2. In this invention, reliability diagnosis of control handover after communication restoration is achieved through counterfactual deduction and model credibility verification. The cloud platform reproduces and deduces the operation logs during the terminal's autonomous period based on the model synchronized before the network outage. By comparing the cumulative deviation between the cloud control trajectory and the actual power trajectory, it can quantitatively assess whether the terminal model drifted during the network outage, providing an objective basis for the selection of subsequent recovery strategies and avoiding inappropriate compensation due to model inaccuracies.
[0008] 3. In this invention, a classification recovery strategy is adopted, and slip compensation handover and zero power change handover are performed for the model trusted terminal and the model misaligned terminal respectively, so that the terminal in different states can return to centralized control in the most suitable way. This avoids the problem of insufficient adaptability of the single recovery method to different terminals in the prior art, and takes into account the smoothness and security of recovery. Attached Figure Description
[0009] Figure 1 This is a flowchart illustrating a virtual power plant grid frequency regulation intelligent response method proposed in this invention. Figure 2This is a schematic diagram of the autonomous operation process of a communication interruption in a virtual power plant grid frequency regulation intelligent response method proposed in this invention; Figure 3 This is a schematic diagram of the communication recovery trajectory extrapolation and model verification process for a virtual power plant grid frequency regulation intelligent response method proposed in this invention; Figure 4 This is a schematic diagram of the batch division and classification recovery process of a virtual power plant grid frequency regulation intelligent response method proposed in this invention; Figure 5 This is a schematic diagram illustrating the model generation and normal operation process of a virtual power plant grid frequency regulation intelligent response method proposed in this invention. Detailed Implementation
[0010] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0011] Example 1 In a first embodiment of the present invention, the present invention provides a virtual power plant grid frequency regulation intelligent response method, such as... Figures 1-5 As shown, it includes the following steps: S1. The cloud platform uses a federated learning framework to generate and distribute personalized frequency-voltage response models for each distributed resource terminal. The main control core of each terminal edge gateway executes cloud commands, and the backup control core loads the model. Based on the real-time collected local frequency and voltage data, it constructs the current autonomous control commands.
[0012] Specifically, the cloud platform first constructs an initial basic response model. This basic response model adopts a multilayer perceptron structure, including an input layer, two hidden layers, and an output layer. The input layer receives two feature quantities, namely the local frequency deviation value and the local voltage deviation value; the output layer outputs a control quantity, namely the target power adjustment quantity.
[0013] The cloud platform distributes the completed basic response model to the edge gateways of each distributed resource terminal. Upon receiving the basic response model, each edge gateway trains it locally using locally stored historical operational data. This historical operational data includes local frequency, local voltage, and corresponding power regulation records at multiple sampling times. Local training employs a stochastic gradient descent algorithm, with a learning rate set to 0.001 and a batch size of 64 samples per training iteration. After training, each terminal generates local model parameters—the weights and biases of the locally trained basic response model—and uploads these parameters to the cloud platform.
[0014] After receiving the local model parameters uploaded by each terminal, the cloud platform aggregates them using a federated average algorithm. The formula for the federated average algorithm is as follows: ; in, This represents the aggregated global model parameters. This represents the local model parameters uploaded by the k-th terminal. This represents the number of local historical running data samples used by the k-th terminal in the training process. This represents the total number of samples used in training across all terminals.
[0015] The cloud platform updates the base response model using the calculated global model parameters and then redeploys the updated base response model to each terminal. Each terminal uses its local historical operating data to retrain the updated base response model locally and uploads the trained local model parameters again. This process of training, uploading, aggregation, and updating is repeated until the model converges. The convergence criterion can be that the change in the mean square error of the global model parameters after two consecutive aggregations on the validation set is less than a preset value, which can be set to 0.0001. The converged model is then deployed as the personalized frequency-voltage response model for that terminal.
[0016] The validation set is constructed as follows: before local training, each terminal randomly divides 80% of the samples from its local historical running data as the training set and the remaining 20% as the validation set. After each aggregation, the cloud platform distributes the aggregated global model parameters to each terminal. Each terminal calculates the mean squared error on its local validation set and uploads it to the cloud platform. The cloud platform takes the mean of the mean squared errors of the validation sets of each terminal as the judgment criterion.
[0017] In step S1, after each terminal edge gateway completes the loading of its personalized frequency-voltage response model, it enters normal operation mode. The edge gateway has two built-in computing cores: a main control core and a backup control core. These two cores share hardware resources but run their own programs independently. The main control core is responsible for receiving and executing scheduling instructions from the cloud platform to control the terminal's power output. The backup control core loads the terminal's personalized frequency-voltage response model and continuously collects local frequency and voltage data within a preset time window. The value of this preset time window is the same as the fixed control period of the backup control core's autonomous control process in step S2, both being 100 milliseconds. The preset time window is used for the data acquisition frequency under normal operation, while the fixed control period is used for the autonomous control execution frequency after communication interruption; both are kept the same to ensure consistency in control timing.
[0018] After each data acquisition, the backup control core inputs the acquired local frequency and voltage data into the personalized frequency-voltage response model. The model calculation process involves using the local frequency and voltage deviation values as input features, propagating them forward layer by layer through the input and hidden layers, and finally obtaining the current autonomous control command at the output layer. The autonomous control command is the terminal target power adjustment amount, in kilowatts. The backup control core temporarily stores this current autonomous control command in a buffer. After each subsequent acquisition and calculation, the backup control core overwrites the existing command in the buffer with the newly calculated autonomous control command, ensuring that the buffer always contains the latest autonomous control command corresponding to the current grid state. This guarantees that whenever the backup control core is triggered to take over, the autonomous control commands in the buffer are all calculated based on the latest grid state.
[0019] S2. When communication is interrupted, the backup control core takes over control, uses the current autonomous control command as the initial output, generates subsequent control commands based on the model, and extracts the operation log containing frequency sequence and power trajectory.
[0020] Specifically, in step S2, when communication is interrupted, the backup control core takes over control, uses the current autonomous control command as the initial output, generates subsequent control commands based on the personalized frequency-voltage response model, and extracts the operation log containing the frequency sequence and power trajectory. During normal operation, the main control core sends a heartbeat request signal to the cloud platform at a fixed period and waits for a response signal from the cloud platform. The sending period of this heartbeat request signal can be set to 500 milliseconds. When the main control core does not receive a response signal from the cloud platform within a preset time, it determines that the communication link between the main control core and the cloud platform has been interrupted, triggering the backup control core to take over control. This preset time can be set to three consecutive heartbeat cycles without a response, i.e., 1500 milliseconds.
[0021] After the backup control core takes over control, it first reads the latest autonomous control instruction stored in the buffer and outputs it as the initial control instruction to the terminal power execution unit. The terminal power execution unit adjusts the active power output of the terminal according to the initial control instruction. After completing the output of the initial control instruction, the backup control core enters the local closed-loop autonomous mode. In this mode, the backup control core continuously executes the autonomous control process with a fixed control cycle. The fixed control cycle can be set to 100 milliseconds according to the frequency regulation response requirements. The autonomous control process within each control cycle is as follows:
[0022] The backup control core collects the local frequency and local voltage values for the current cycle, and calculates the local frequency deviation and local voltage deviation. The formula for calculating the local frequency deviation is: ; in, This indicates the local frequency deviation value. This represents the collected local frequency value. This represents the rated frequency of the power grid, taken as 50 Hz. The formula for calculating the local voltage deviation is: ; in, This indicates the local voltage deviation value. This represents the collected local voltage value. This indicates the rated voltage of the power grid, which is determined based on the voltage level at which the terminal is connected.
[0023] The backup control core inputs the calculated local frequency deviation and local voltage deviation values into the personalized frequency-voltage response model. The personalized frequency-voltage response model performs forward propagation calculations on the input data and outputs the control command for the next cycle. The control command is the target power adjustment amount, in kilowatts. The backup control core outputs this control command to the terminal power execution unit, which adjusts the active power output of the terminal accordingly.
[0024] After generating and outputting control commands for each control cycle, the backup control core synchronously records the operating data for the current cycle. The recorded data includes the local frequency value, local voltage value, and actual terminal power value for the current cycle. The actual terminal power value can be obtained from the measured power signal fed back by the terminal power execution unit. The backup control core stores the data recorded for each control cycle sequentially in chronological order, forming an operating log containing a frequency sequence and power trajectory. The frequency sequence in the operating log is represented as follows: ; in, Represents a frequency sequence. This represents the local frequency value recorded in the i-th control cycle, and n represents the total number of control cycles executed during the autonomous period.
[0025] The power trajectory is represented in the operation log as follows: ; in, Represents the power trajectory. This represents the actual power value of the terminal recorded in the i-th control cycle.
[0026] During the autonomous period, the backup control core continues to execute the above-mentioned local closed-loop autonomous control process until the main control core receives the communication signal from the cloud platform again. After communication is restored, it proceeds to step S3.
[0027] S3. When communication is restored, the cloud platform extracts the operation logs, uses the model synchronized before the network outage, performs counterfactual inference based on the frequency sequence, and constructs the cloud control trajectory.
[0028] Specifically, in step S3, when communication is restored, the cloud platform extracts the operation logs, uses the personalized frequency-voltage response model synchronized before the network outage, performs counterfactual inference based on the frequency sequence, and constructs the cloud control trajectory.
[0029] After the main control core receives the response signal from the cloud platform again, it sends a communication recovery notification to the cloud platform. Upon detecting the recovery of terminal communication, the cloud platform sends a log extraction request to the edge gateway of the terminal. Upon receiving the log extraction request, the edge gateway uploads the operation log stored in step S2 to the cloud platform. After obtaining the operation log, the cloud platform extracts the frequency sequence from it.
[0030] Simultaneously, the cloud platform retrieves the personalized frequency-voltage response model that was last synchronized with the terminal before the network outage. This model is the version deployed to the terminal after the federated learning training in step S1 has converged, and the cloud platform retains a copy during each model synchronization. The model copy retrieved by the cloud platform has parameters that are completely identical to the model parameters deployed on the backup control core before the network outage. The cloud platform extracts the frequency values corresponding to each control cycle from the frequency sequence point by point in chronological order and inputs them sequentially into the personalized frequency-voltage response model. For the frequency value of the i-th control cycle in the frequency sequence... The cloud platform calculates the corresponding input characteristics, including frequency deviation and voltage deviation. The formula for calculating the frequency deviation is: ; in, This represents the frequency deviation value of the i-th control cycle in the frequency sequence. This represents the local frequency value of the i-th control cycle in the frequency sequence. This represents the rated frequency of the power grid, taken as 50 Hz. The voltage deviation can be calculated using the local voltage value recorded last before the communication interruption. The local voltage value recorded last before the communication interruption can be obtained from the first record of the frequency and voltage sequences in the operation log.
[0031] The cloud platform inputs the calculated frequency and voltage deviation values into the personalized frequency-voltage response model. The model performs forward propagation calculations and outputs the power control command corresponding to that control cycle. The forward propagation calculation process of the model can be represented as follows: ; in, This represents the power control command value output by the model for the i-th control cycle in the frequency sequence. This represents the local frequency value of the i-th control cycle in the frequency sequence. This represents the last recorded local voltage value before the communication interruption, and M represents the input-to-output mapping function defined by the personalized frequency-voltage response model.
[0032] The cloud platform performs the above calculations point-by-point on all control cycles in the frequency sequence to obtain the power control command value corresponding to each control cycle, forming a power control command sequence. The power control command sequence is represented as follows: ; in, This represents a sequence of power control commands. This represents the power control command value output by the model in the i-th control cycle, and n represents the total number of control cycles in the frequency sequence.
[0033] The cloud platform arranges the power control command sequence along a timeline to construct a cloud control trajectory. The cloud control trajectory is represented as follows: ; in, This indicates the trajectory controlled by the cloud. This represents the power value during the i-th control cycle in the cloud-based control trajectory. The cloud control trajectory represents the power trajectory that the terminal would have output if, assuming no network outage occurred during the communication interruption and the terminal was continuously controlled by the cloud platform. This cloud control trajectory will be used for trajectory comparison and deviation calculation in step S4.
[0034] S4. The cloud platform compares the cloud control trajectory with the actual power trajectory in the operation log, calculates the deviation, and marks the terminal as either model reliable or model inaccurate based on whether the deviation exceeds the threshold.
[0035] Specifically, in step S4, the cloud platform compares the cloud control trajectory with the actual power trajectory in the operation log, calculates the deviation, and marks the terminal as a model-trusted terminal or a model-inaccurate terminal based on whether the deviation exceeds the threshold.
[0036] The cloud platform extracts the actual power trajectory from the operation logs obtained in step S3. The power trajectory in the operation logs has already been recorded and stored by the backup control core in step S2, and its representation is as follows: ; in, Indicates the actual power trajectory. This represents the actual terminal power value recorded in the i-th control cycle, and n represents the total number of control cycles executed during the autonomous period.
[0037] The cloud platform aligns the cloud control trajectory constructed in step S3 with the actual power trajectory point by point according to the control cycle number. The cloud control trajectory is represented as follows: ; The alignment method is to match the cloud-based control trajectory power values corresponding to the same control cycle sequence number i. Compared with actual power trajectory power value This forms an alignment point. Since both trajectories use the control cycle in step S2 as the time reference, the timestamps of each alignment point are naturally consistent, eliminating the need for time interpolation.
[0038] The cloud platform calculates the power deviation at each alignment point. The formula for calculating the power deviation at the i-th alignment point is: ; in, This represents the power deviation value at the i-th alignment point. This represents the power value during the i-th control cycle in the cloud-based control trajectory. This represents the terminal actual power value in the i-th control cycle of the actual power trajectory.
[0039] The cloud platform uses the sum of the absolute values of the power deviations at each alignment point as the cumulative deviation. The formula for calculating the cumulative deviation is: ; in, Indicates cumulative deviation. This represents the power deviation value of the i-th alignment point, and n represents the total number of alignment points.
[0040] The cloud platform compares the calculated cumulative deviation with a preset deviation threshold. The preset deviation threshold can be set based on the terminal's rated power and the allowable level of model drift. A feasible implementation is to set the preset deviation threshold to 5% of the terminal's rated power multiplied by the total number of alignment points, i.e.: ; in, This represents the preset deviation threshold, and n represents the total number of alignment points. This indicates the rated power of the terminal, in kilowatts.
[0041] If cumulative deviation Not exceeding the preset deviation threshold If the personalized frequency-voltage response model of the terminal does not drift significantly during the communication interruption, the terminal is marked as a reliable terminal in the model. If the cumulative deviation... Exceeding the preset deviation threshold If the personalized frequency-voltage response model of the terminal is significantly drifted during the communication interruption, the terminal is marked as a model-inaccurate terminal.
[0042] The cloud platform stores the marking results of each terminal, which will be used for recovery batch division in step S5 and classification recovery strategy selection in step S6.
[0043] S5 and the cloud platform divide the recovery batches according to the marking, power contribution and device type of each terminal.
[0044] Specifically, in step S5, the cloud platform divides the recovery batches according to the marking, power contribution and device type of each terminal.
[0045] The cloud platform first obtains the power contribution of each terminal during the communication interruption. The power contribution characterizes the terminal's contribution to grid frequency support during autonomous operation. The cloud platform extracts the actual power trajectory and the power value at the moment of interruption from the operation log. The power value at the moment of interruption refers to the actual power value of the terminal recorded in the last control cycle before the communication interruption occurred. This value can be obtained from the power trajectory in the operation log, i.e., the first power record value corresponding to the moment of communication interruption. The formula for calculating the power contribution is: ; in, This represents the power contribution of the k-th terminal. This represents the actual power value of the k-th terminal during the i-th control cycle of the autonomous period. This represents the power value at the interruption moment of the k-th terminal, and n represents the total number of control cycles executed during the autonomous period. The larger the power contribution value, the greater the adjustment of the terminal's power in response to frequency changes during the autonomous period.
[0046] The cloud platform acquires the device type of each terminal. Device types include energy storage systems, photovoltaic inverters, charging piles, and controllable loads. The cloud platform determines the response rate level of each terminal based on its device type. The response rate level is determined by the inherent response time constant of the terminal's power execution unit. A feasible classification method is as follows: energy storage systems, due to their fast-response characteristics of power electronic interfaces, are classified as the first response rate level; photovoltaic inverters are classified as the second response rate level; charging piles are classified as the third response rate level; and controllable loads, due to their involvement of mechanical or thermal inertia, are classified as the fourth response rate level. A smaller level number indicates a faster response rate.
[0047] The cloud platform, based on the labels, power contributions, and response rate levels of each terminal, interleaves trusted and inaccurate terminals to generate the batch sequence for this recovery. The batch sequence is an ordered list, represented as follows: ; Where B represents the batch sequence, Let m represent the set of terminals included in the j-th recovery batch, and m represent the total number of recovery batches.
[0048] The batching rules are as follows: Each recovery batch contains both model-trusted terminals and model-inaccurate terminals, which are interleaved to avoid local fluctuations in aggregated power caused by the concentrated recovery of a single type of terminal. Within a single recovery batch, terminal selection considers both power contribution and response rate level. Terminals with higher power contributions are prioritized for earlier batches to ensure that terminals with significant frequency modulation contributions are included in the unified cloud scheduling as quickly as possible. Simultaneously, each recovery batch includes terminals with different response rate levels to leverage the natural temporal dispersion of power changes between fast and slow response terminals, reducing the peak value of aggregated power changes within the batch.
[0049] During batch orchestration, the cloud platform estimates the aggregated power change resulting from terminal recovery within each batch. The estimated aggregated power change is the sum of the expected power adjustments for each terminal within that batch upon recovery. For terminals with a reliable model, the expected power adjustment is the absolute value of the deviation between the cloud control trajectory and the current actual power; for terminals with an inaccurate model, the expected power adjustment is zero. The cloud platform ensures that the estimated aggregated power change for each batch does not exceed a preset limit. This preset limit can be determined based on the maximum allowable power ramp rate of the power grid and the batch interval duration. A feasible implementation is to set the preset limit to 10% of the total rated power of the virtual power plant. If the estimated aggregated power change for a batch exceeds the preset limit, some terminals in that batch are moved to the next batch until the limit requirement is met.
[0050] The cloud platform will store the generated batch sequence, which will be used to control the execution order of the batch recovery in step S6.
[0051] S6. The cloud platform generates slip compensation instructions for the trusted terminal of the model, transfers its power to the cloud control trajectory, and then returns control. For the misaligned terminal of the model, it takes over with the current actual power as the initial target value and gradually adjusts it. During the batch recovery process, the cloud platform adjusts the timing of subsequent batches to control the rate of change of aggregated power.
[0052] Specifically, in step S6, the cloud platform generates slip compensation instructions for the trusted terminal of the model, transfers its power to the cloud control trajectory, and then returns control; for the misaligned terminal of the model, it takes over with the current actual power as the initial target value and gradually adjusts it; during the batch recovery process, the cloud platform adjusts the timing of subsequent batches to control the rate of change of aggregated power.
[0053] Step S6 is executed sequentially according to the batch sequence determined in step S5. The cloud platform initiates the recovery process for each terminal in each recovery batch in the order of the batch sequence. For model-trusted terminals, the cloud platform uses a slip compensation recovery method. The cloud platform extracts the actual power trajectory of the terminal from the operation log and aligns it point by point with the cloud control trajectory constructed in step S3 according to the control cycle number. The alignment method is consistent with the alignment method of trajectory comparison in step S4. The cloud platform calculates the deviation between the power value of the cloud control trajectory and the power value of the actual power trajectory at each alignment point. This deviation value is the power deviation value of each alignment point calculated in step S4.
[0054] The cloud platform generates a slip compensation command based on the power deviation value. The slip compensation command adjusts the terminal power to a preset ratio in the cloud control trajectory within each control cycle. The calculation formula for the slip compensation command in the i-th control cycle is: ; in, This represents the slip compensation command value generated in the i-th control cycle. This indicates the current actual power value of the terminal during this control cycle. This represents the target power value corresponding to this control cycle in the cloud-based control trajectory. This represents the slip compensation coefficient, with a value of 0.3. The slip compensation coefficient determines the step size by which the terminal power approaches the target power in each control cycle.
[0055] The cloud platform sends the generated slip compensation command to the edge gateway of the model's trusted terminal. At this time, the terminal is still in standby control mode. After receiving the slip compensation command, the standby control core outputs the command to the terminal power execution unit for execution. The terminal power execution unit adjusts the terminal's active power output according to the slip compensation command. After multiple control cycles of slip compensation adjustment, the actual power of the terminal gradually approaches the cloud control trajectory. The convergence process of slip compensation is characterized by a gradual reduction in the deviation between the terminal power and the cloud control trajectory power after each control cycle, with the deviation decreasing proportionally in each cycle.
[0056] When the deviation between the actual power of the terminal and the cloud control trajectory narrows to below a preset synchronization threshold, the terminal power is considered synchronized with the cloud control trajectory. The preset synchronization threshold is an absolute deviation value in kilowatts and can be set according to control accuracy requirements. A feasible implementation is to set the preset synchronization threshold to one percent of the terminal's rated power. Synchronization is determined when the power deviation value for three consecutive control cycles is below the preset synchronization threshold. After synchronization, the backup control core returns control to the main control core. The main control core resumes receiving and executing scheduling commands issued by the cloud platform, and the terminal returns to normal centralized control mode.
[0057] For terminals with inaccurate models, the cloud platform adopts a zero-power change handover method. Because the personalized frequency-voltage response model of the terminal with inaccurate models drifts significantly during the communication interruption, the cloud platform no longer trusts the cloud control trajectory derived from the model. Therefore, instead of using slip compensation for recovery, it performs a non-disruptive handover based on the terminal's current actual power.
[0058] The cloud platform obtains the actual power value of the model-misaligned terminal at the current moment, which is acquired by sending a power query request to the terminal's edge gateway. Using this actual power value as the initial target value, the cloud platform generates a takeover command. The takeover command includes the initial target value information and a control switching flag. The cloud platform then sends the takeover command to the model-misaligned terminal.
[0059] After receiving the takeover command, the backup control core of the misaligned terminal maintains its current power at the initial target value without performing any additional power adjustments. The backup control core then returns control to the master control core; the terminal power does not change abruptly during the handover. After the control handover is complete, the cloud platform issues optimized scheduling commands to the master control core in subsequent scheduling cycles. These optimized scheduling commands are calculated based on the global optimization target of the virtual power plant. The cloud platform gradually adjusts the terminal power to the cloud-optimized target value over multiple scheduling cycles. The cloud-optimized target value is the ideal output value of the terminal calculated based on conventional economic dispatch or frequency regulation requirements, without considering network outage recovery scenarios.
[0060] During the phased recovery process, the cloud platform monitors the rate of change in aggregated power in real time and dynamically adjusts the start timing of subsequent batches. After each batch of recovery is completed, the cloud platform collects the current actual power values from all recovered terminals and terminals in normal communication status, and calculates the total aggregated power value of the currently recovered terminals. The formula for calculating the total aggregated power value is: ; in, This indicates the total aggregate power value of the terminals that have been restored. This represents the current actual power value of the k-th restored terminal, where K represents the total number of restored terminals.
[0061] The cloud platform calculates the rate of change in polymerization power based on the change in total polymerization power before and after the recovery of this batch, and the recovery time. The formula for calculating the rate of change in polymerization power is: ; Where R represents the rate of change of polymerization power. This indicates the total polymerization power value after the recovery of this batch is completed. This represents the total polymerization power value before the start of the current batch recovery, and T represents the duration of the current batch recovery in minutes.
[0062] The cloud platform compares the calculated aggregate power change rate with a preset grid safety limit. The grid safety limit can be determined according to the maximum allowable power ramp rate specified in the grid connection agreement for the virtual power plant to connect to the grid. One feasible implementation is to set the grid safety limit at 5% of the total rated power of the virtual power plant per minute.
[0063] If the aggregated power change rate exceeds the grid safety limit, the cloud platform will start the next batch after a preset delay. The preset delay time can be determined based on the decay time constant of the grid power oscillation; a feasible implementation is a preset delay time of 30 seconds. If the aggregated power change rate does not exceed the grid safety limit, the cloud platform will start the next batch sequentially according to the batch sequence defined in step S5. When starting the next batch, the above classification and recovery process for trusted and inaccurate model terminals will be repeated.
[0064] Through the closed-loop control of the batch recovery and aggregated power change rate monitoring mentioned above, it is ensured that the total aggregated power change of the entire virtual power plant during the large-area communication recovery process is always within the range allowed for safe operation of the power grid.
[0065] Example 2 This embodiment, based on Embodiment 1, specifically applies the virtual power plant grid frequency regulation intelligent response method to a V2G electric vehicle charging pile scenario. In this embodiment, the distributed resource terminal is a V2G electric vehicle charging pile, which has bidirectional power flow capability, capable of drawing power from the grid to charge the vehicle and also feeding back the electrical energy stored in the vehicle's power battery into the grid.
[0066] In step S1, the cloud platform uses a federated learning framework to generate and distribute personalized frequency-voltage response models for each V2G electric vehicle charging pile. Unlike Example 1, the personalized frequency-voltage response model for V2G charging piles adds the battery state-of-charge (SOC) value of the currently connected vehicle to the input features. The model input layer receives three feature quantities: local frequency deviation, local voltage deviation, and vehicle battery SOC value. The SOC value ranges from 0 to 100, representing the remaining percentage of the vehicle's battery charge. The model output layer outputs two control quantities: a target charge / discharge power value and a control mode flag. A positive target charge / discharge power value indicates charging, while a negative value indicates discharging. The control mode flag distinguishes between regular charging mode, V2G discharging mode, and standby mode. The control mode flag works in conjunction with the target charge / discharge power value: when the control mode flag is in regular charging mode or V2G discharging mode, the target charge / discharge power value serves as the setpoint for charging or discharging power; when the control mode flag is in standby mode, the target charge / discharge power value is set to zero, and the terminal does not perform charging or discharging operations. The switching between the three modes is determined in real time by the model based on the input features, without any additional time constraints.
[0067] Each V2G charging station trains its basic response model using local historical operating data, which includes local frequency, local voltage, vehicle battery state of charge, and corresponding charging and discharging power adjustment records at multiple sampling times. The aggregation and iteration process of federated learning is the same as in Example 1 and will not be repeated here. The converged personalized frequency-voltage response model is then deployed to the edge gateway backup control core of each V2G charging station.
[0068] In the normal operation of step S1, the edge gateway main control core of the V2G charging pile executes the regular charging scheduling instructions issued by the cloud platform, and the backup control core loads the personalized frequency-voltage response model, continuously collects local frequency, local voltage and battery state of charge data of the currently connected vehicle in a preset time window, inputs the model to calculate the current autonomous control instructions and temporarily stores them in the cache area.
[0069] In step S2, when a communication interruption occurs, the backup control core of the V2G charging pile takes over control and enters a local closed-loop autonomous mode. In each control cycle, the backup control core collects local frequency and voltage values, calculates frequency and voltage deviations, and simultaneously reads the current state of charge (SOC) value provided by the vehicle's battery management system. These three features are then input into the personalized frequency-voltage response model. The model generates the corresponding control command for that control cycle based on the input data.
[0070] The local autonomous control strategy for V2G charging piles is as follows: When the local frequency is lower than a first preset threshold, the backup control core controls the charging pile to increase its V2G reverse discharge power, injecting active power into the grid to support frequency recovery. The first preset threshold can be set to 49.8 Hz. When the local frequency is higher than a second preset threshold, the backup control core controls the charging pile to stop discharging and switch to charging mode, absorbing active power from the grid to absorb excess power. The second preset threshold can be set to 50.2 Hz. When the local frequency is between the first and second preset thresholds, the backup control core controls the charging pile to maintain its current charging and discharging state.
[0071] When recording the operation log, in addition to recording the local frequency value, local voltage value, and actual charging and discharging power value of the terminal for each control cycle, the backup control core of the V2G charging pile also synchronously records autonomous discharge data with timestamps and grid frequency credentials. The calculation formula for autonomous discharge data is as follows: ; in, This indicates the cumulative discharge during the autonomous period. This represents the discharge power value in the j-th discharge control cycle. The value is negative to facilitate taking the absolute value during measurement. The duration of the control cycle is expressed in hours, and m represents the total number of discharge control cycles executed during the autonomous period. The grid frequency certificate is the frequency value recorded within the discharge control cycle, used to prove that the grid frequency is indeed low and requires frequency regulation support during that period. The operation log is also stored in the local storage unit of the edge gateway.
[0072] In step S3, after communication is restored, the cloud platform extracts the operation logs uploaded by the V2G charging piles. In addition to extracting the frequency sequence and power trajectory, it also extracts the autonomous discharge data from the operation logs. The cloud platform uses the personalized frequency-voltage response model synchronized before the network outage to perform counterfactual inference based on the frequency sequence and construct the cloud control trajectory. This process is the same as in Example 1.
[0073] In step S4, the cloud platform performs trajectory comparison and model credibility verification on the V2G charging piles, and the marking process is the same as in Example 1.
[0074] In steps S5 and S6, the cloud platform performs batch division and classification recovery of V2G charging piles based on the marking results and power contribution, with the recovery process being the same as in Example 1. After recovery, the cloud platform extracts autonomous discharge data from the operation log and calculates and includes the V2G revenue of the V2G charging pile user based on the frequency modulation service market price during the communication interruption. The formula for calculating V2G revenue is: ; in, This indicates the V2G frequency modulation revenue that the end user should receive during the autonomous communication outage. This indicates the cumulative discharge during the autonomous period. This indicates the market settlement price per kilowatt-hour for grid frequency regulation services during communication outages. The cloud platform will credit this revenue to the user's account, completing the settlement and reconciliation for the off-grid period, ensuring that users receive corresponding economic returns after providing frequency regulation support to the grid during communication outages.
[0075] Example 3 This embodiment, based on Embodiment 1, specifically applies the virtual power plant grid frequency regulation intelligent response method to a computing load scenario. In this embodiment, the distributed resource terminal is the computing load of the computing center, which includes high-priority real-time inference tasks and low-priority offline training tasks. Real-time inference tasks are latency-sensitive and require immediate response from computing resources; offline training tasks are not latency-sensitive and resource allocation can be flexibly adjusted within a certain range.
[0076] In step S1, the cloud platform utilizes a federated learning framework to generate and distribute personalized frequency-voltage response models for the edge gateways of each computing center. Unlike Example 1, the personalized frequency-voltage response model for computing load adds two features to its input features: current computing load rate and task priority distribution. The computing load rate represents the proportion of total computing resources occupied by currently executing computing tasks, ranging from 0 to 1. The task priority distribution represents the proportion of computing resources occupied by real-time inference tasks and offline training tasks, respectively. The model output layer outputs the target total computing load adjustment amount, expressed as a percentage of computing resources.
[0077] Each computing center's edge gateway trains the basic response model using local historical operational data. This historical data includes local frequency, local voltage, computing load rate, task priority distribution, and corresponding computing load adjustment records at multiple sampling times. The aggregation and iteration process of federated learning is the same as in Example 1 and will not be repeated here. The converged personalized frequency-voltage response model is then distributed and deployed to the edge gateway backup control cores of each computing center.
[0078] In the normal operation of step S1, the main control core of the computing center edge gateway executes the regular computing power scheduling instructions issued by the cloud platform, and the backup control core loads a personalized frequency-voltage response model. It continuously collects local frequency, local voltage, computing power load rate and task priority distribution data in a preset time window, inputs the model to calculate the current autonomous control instructions and temporarily stores them in the cache.
[0079] In step S2, when a communication interruption occurs, the backup control core of the computing center edge gateway takes over control and enters a local closed-loop autonomous mode. The backup control core collects local frequency and voltage values in each control cycle, calculates the frequency deviation, and simultaneously reads the current computing load rate and task priority distribution data, inputting these features into a personalized frequency-voltage response model. The model generates the total computing load adjustment amount corresponding to that control cycle based on the input data. Specifically, the local autonomous control strategy of the computing center is as follows: when the local frequency is lower than a preset warning threshold, the backup control core prioritizes suspending or slowing down offline training tasks according to the total computing load adjustment amount, using the released computing resources to ensure that the resource requirements of real-time inference tasks are not affected, thereby reducing the total computing power consumption. The preset warning threshold can be set to 49.8 Hz. The specific method for slowing down offline training tasks is to reduce the proportion of computing resources allocated to offline training tasks. The calculation formula for computing load adjustment is: ; in, This indicates the actual amount of computing power adjusted for offline training tasks. This represents the total computing power load adjustment amount output by the model. This indicates the proportion of computing resources currently used by offline training tasks. This formula ensures that the computing load is reduced first from offline training tasks without affecting real-time inference tasks.
[0080] When the local frequency recovers to above the preset safety threshold, the backup control core gradually resumes the restricted offline training tasks. The preset safety threshold can be set to 50.0 Hz. The recovery process involves gradually increasing the computing resource allocation for offline training tasks according to a preset recovery step size within each control cycle until it returns to normal levels. The preset recovery step size can be set to one-tenth of the original total computing power allocation for offline training tasks.
[0081] When recording the operation log, in addition to recording the local frequency value, local voltage value, and actual total computing power load value for each control cycle, the backup control core of the computing power center edge gateway also synchronously records the actual computing power load value of the real-time inference task and the actual computing power load value of the offline training task. The representation format of the operation log is similar to that of Embodiment 1, and the power trajectory corresponds to the computing power load trajectory in this scenario.
[0082] In step S3, after communication is restored, the cloud platform extracts the operation logs uploaded by the edge gateway of the computing power center, and extracts the frequency sequence and computing power load trajectory from the operation logs. The cloud platform uses the personalized frequency-voltage response model synchronized before the network outage to perform counterfactual inference based on the frequency sequence to construct the cloud control trajectory. In this scenario, the cloud control trajectory represents the computing power load trajectory that the cloud should have controlled if the network had not been lost. The counterfactual inference process is the same as in Example 1, and will not be repeated here.
[0083] In step S4, the cloud platform compares the cloud control trajectory with the actual computing power load trajectory in the operation log, calculates the cumulative deviation, and marks the model trusted terminal or the model inaccurate terminal. The marking process is the same as in Example 1.
[0084] In steps S5 and S6, the cloud platform performs batch division and classification recovery of the computing center terminals based on the marking results and power contribution. In this scenario, the power contribution is replaced by the computing power adjustment contribution, which is calculated as the sum of the absolute values of the deviations between the actual computing power load trajectory during the autonomous period and the computing power load value at the time of interruption. The classification recovery process is the same as in Example 1, wherein the model-trusted terminal smoothly transitions the computing power load to the cloud control trajectory through slip compensation instructions and then returns control, while the model-misaligned terminal takes over with the current actual computing power load as the initial target value and gradually adjusts to the cloud-optimized target value.
[0085] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0086] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for intelligent frequency regulation response of a virtual power plant grid, characterized in that, include: S1. The cloud platform uses a federated learning framework to generate and distribute personalized frequency-voltage response models for each distributed resource terminal. The main control core of each terminal edge gateway executes cloud commands, and the backup control core loads the model and constructs the current autonomous control commands based on real-time collected local frequency and voltage data. S2. When communication is interrupted, the backup control core takes over control, uses the current autonomous control command as the initial output, generates subsequent control commands based on the model, and extracts the operation log containing the frequency sequence and power trajectory. S3. When communication is restored, the cloud platform extracts the operation log, uses the model synchronized before the network outage, performs counterfactual deduction based on the frequency sequence, and constructs the cloud control trajectory. S4. The cloud platform compares the cloud control trajectory with the actual power trajectory in the operation log, calculates the deviation, and marks the terminal as either model reliable or model inaccurate based on whether the deviation exceeds the threshold. S5. The cloud platform divides the recovery batches according to the markers, power contribution, and device type of each terminal. S6. The cloud platform generates slip compensation instructions for the trusted terminal of the model, transfers its power to the cloud control trajectory, and then returns control. For the misaligned terminal of the model, it takes over with the current actual power as the initial target value and gradually adjusts it. During the batch recovery process, the cloud platform adjusts the timing of subsequent batches to control the rate of change of aggregated power.
2. The method for intelligent frequency regulation response of a virtual power plant grid according to claim 1, characterized in that, In step S1, a personalized frequency-voltage response model is generated and distributed for each distributed resource terminal, including: The cloud platform builds a basic response model and distributes it to various terminals; Each terminal uses local historical operating data to train the basic response model, generates local model parameters, and uploads them to the cloud platform. The cloud platform aggregates the local model parameters uploaded by each terminal and updates the basic response model; The cloud platform will redeploy the updated basic response model and repeat the training, uploading, aggregation and updating process until the model converges. The converged model will then be deployed as the personalized frequency-voltage response model.
3. The method for intelligent frequency regulation response of a virtual power plant grid according to claim 1, characterized in that, In S1, the current autonomous control instructions are constructed, including: The main control core receives and executes scheduling instructions issued by the cloud platform to control the terminal power output; The backup control core loads the personalized frequency-voltage response model and continuously collects local frequency and voltage data within a preset time window. The backup control core inputs the collected local frequency and voltage data into the personalized frequency-voltage response model, calculates the current autonomous control command in real time, and temporarily stores it in the cache area; After each acquisition and calculation, the backup control core overwrites the original instructions in the buffer with the newly calculated autonomous control instructions, so that the buffer always contains the latest autonomous control instructions corresponding to the current power grid state.
4. The method for intelligent frequency regulation response of a virtual power plant grid according to claim 1, characterized in that, In step S2, subsequent control commands are generated based on the model, and an operation log containing frequency sequences and power trajectories is extracted, including: If the main control core does not receive a response signal from the cloud platform within a preset time, it determines that the communication is interrupted and triggers the backup control core to take over control. The backup control core reads the autonomous control instruction at the current moment from the buffer and outputs it to the terminal power execution unit as the initial control instruction; The backup control core continuously collects local frequency and voltage data at a fixed control cycle, inputs the collected data into the personalized frequency-voltage response model, calculates and generates control commands for the next cycle, and outputs them. After each control command is generated, the backup control core synchronously records the local frequency, voltage, and actual terminal power value of the current cycle, forming and storing the operation log containing the frequency sequence and power trajectory.
5. The method for intelligent frequency regulation response of a virtual power plant grid according to claim 1, characterized in that, In step S3, counterfactual deduction is performed based on the frequency sequence to construct a cloud-based control trajectory, including: After the cloud platform detects that terminal communication has been restored, it sends a log extraction request to the terminal to obtain the operation log; The cloud platform extracts the frequency sequence from the operation log and retrieves the personalized frequency-voltage response model that was last synchronized with the terminal before the network outage; The cloud platform inputs the frequency sequence into the personalized frequency-voltage response model point by point in chronological order, and the model outputs the corresponding power control command sequence. The cloud platform arranges the power control command sequence according to the time axis to construct the cloud control trajectory.
6. The method for intelligent frequency regulation response of a virtual power plant grid according to claim 1, characterized in that, In S4, marking the terminal as either model reliable or model inaccurate includes: The cloud platform extracts the actual power trajectory from the operation log and aligns the cloud control trajectory with the actual power trajectory point by point according to the timestamp. The cloud platform calculates the power deviation value at each alignment point and uses the sum of the absolute values of the deviation values at each point as the cumulative deviation. The cloud platform compares the accumulated deviation with a preset deviation threshold. If the accumulated deviation does not exceed the preset deviation threshold, the terminal is marked as a reliable terminal for the model; if it exceeds the threshold, it is marked as an inaccurate terminal for the model.
7. The method for intelligent frequency regulation response of a virtual power plant grid according to claim 1, characterized in that, In step S5, the recovery batches are divided, including: The cloud platform obtains the power contribution of each terminal during the communication interruption, and the power contribution is calculated based on the difference between the actual power trajectory in the operation log and the power at the time of the interruption. The cloud platform obtains the device type of each terminal and determines the response rate level of each terminal based on the device type; The cloud platform, based on the markers, power contribution, and response rate levels of each terminal, interleaves the trusted terminals and the inaccurate terminals of the model to generate a batch sequence for this recovery. The aggregate power change generated by the recovery of a single terminal within a single batch does not exceed a preset limit.
8. The method for intelligent frequency regulation response of a virtual power plant grid according to claim 1, characterized in that, In step S6, the cloud platform generates a slip compensation command for the model's trusted terminal, transfers its power to the cloud control trajectory, and then returns control, including: The cloud platform extracts the actual power trajectory from the operation log and aligns it point by point with the cloud control trajectory constructed in S3 according to the timestamp. The cloud platform calculates the power deviation between the cloud control trajectory and the actual power trajectory at each alignment point; The cloud platform generates a slip compensation command based on the power deviation value. The slip compensation command adjusts the terminal power to the cloud control trajectory by a preset ratio in each control cycle. The cloud platform sends the slip compensation command to the trusted terminal of the model, and the backup control core executes the slip compensation command to make the terminal power approximate the cloud control trajectory cycle by cycle; Once the terminal power is synchronized with the cloud-based control trajectory, the backup control core will hand over control back to the main control core, and the main control core will resume executing cloud-based scheduling instructions.
9. The method for intelligent frequency regulation response of a virtual power plant grid according to claim 1, characterized in that, In S6, for the model-inaccurate terminal, after takeover, adjustments are made gradually using the current actual power as the initial target value, including: The cloud platform obtains the actual power value of the terminal with the inaccurate model at the current moment and uses the actual power value as the initial target value. The cloud platform generates a takeover instruction based on the initial target value and sends the takeover instruction to the model misalignment terminal; After receiving the takeover command, the model misalignment terminal maintains the current power at the initial target value and returns control to the main control core. After the control is handed over, the cloud platform issues optimization scheduling instructions to the main control core in subsequent scheduling cycles, gradually adjusting the terminal power to the cloud optimization target value.
10. The method for intelligent frequency regulation response of a virtual power plant grid according to claim 1, characterized in that, In S6, during the batch recovery process, the cloud platform adjusts the timing of subsequent batches to control the rate of change in aggregate power, including: After each batch of recovery is completed, the cloud platform collects the total aggregate power value of the currently recovered terminals; The cloud platform calculates the rate of change of total aggregate power before and after the recovery of this batch, based on the change in total aggregate power value and the recovery time. The cloud platform compares the aggregated power change rate with a preset power grid safety limit; If the rate of change of aggregated power exceeds the power grid safety limit, the cloud platform will start the next batch after a preset delay; if it does not exceed the limit, the next batch will be started in sequence according to the recovery batches divided in S5.
