A high-precision prediction model for distributed energy output

By constructing a high-precision prediction model for distributed energy output, the disturbance contribution of heterogeneous power sources is quantified and the output impedance is dynamically corrected. This solves the problem that existing technologies cannot quantify the disturbance contribution of a single power source, and achieves precise control and stability improvement of the grid connection point.

CN121546563BActive Publication Date: 2026-04-14NENGTAN (ZHEJIANG) TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NENGTAN (ZHEJIANG) TECHNOLOGY CO LTD
Filing Date
2026-01-16
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing distributed generation and microgrid control systems cannot dynamically adjust the output impedance of grid-connected inverters when facing weak grid conditions with high penetration of heterogeneous power sources. This leads to a decline in power quality at the PCC point and the risk of broadband oscillations. Furthermore, it is impossible to quantify the actual marginal physical contribution of a single power source to voltage/frequency disturbances at the PCC point.

Method used

By constructing a high-precision prediction model for distributed energy output, collecting real-time operating data and environmental data, generating a power fluctuation probability envelope, constructing a complementary voltage-stabilized virtual subgroup, quantifying the marginal contribution of the residual disturbance power vector to the frequency deviation at the point of common coupling, dynamically correcting the virtual resistance and virtual inductance parameters, realizing hierarchical decoupled closed-loop control, and optimizing impedance regulation and energy balance.

Benefits of technology

It achieves precise control of power quality and system stability at the grid connection point, effectively suppresses the risk of wideband oscillation caused by power fluctuations, improves the voltage and frequency stability of the PCC point, and solves the problem that the control system in the existing technology cannot dynamically adjust the impedance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121546563B_ABST
    Figure CN121546563B_ABST
Patent Text Reader

Abstract

The present application relates to the field of distributed energy and micro-grid technology, specifically to a distributed energy output high-precision prediction model, comprising: collecting data and generating power fluctuation probability envelope; constructing a complementary voltage stabilization virtual subgroup with negative correlation compensation characteristics through a time sequence comparison algorithm; quantifying the marginal contribution value of the residual disturbance power of each subgroup to the frequency deviation of the point of common coupling based on the power grid proxy model and the kernel function SHAP algorithm; performing nonlinear mapping on the contribution value to generate virtual impedance correction parameters; finally determining the prediction power regulation shortage and generating compensation instructions through a hierarchical decoupled closed-loop correction architecture. The present application realizes high-precision prediction of the influence of distributed energy grid connection stability by quantifying the complementarity and disturbance contribution of each heterogeneous power source.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed energy and microgrid technology, specifically a high-precision prediction model for distributed energy output. Background Technology

[0002] In the field of distributed generation and microgrid control, virtual power plants aggregate distributed energy sources such as wind power and photovoltaics to the point of common coupling (PCC) and connect them to the main power grid through grid-connected inverter interfaces. In order to maintain voltage stability and frequency synchronization at the PCC, existing control systems typically employ virtual synchronous machines or droop control strategies, using preset virtual impedances and droop coefficients to simulate the inertia and damping characteristics of synchronous generators.

[0003] However, in weak grid conditions with high penetration of heterogeneous power sources, the output power of wind turbines and photovoltaics exhibits strong random fluctuations, making it difficult for fixed control parameters (such as fixed virtual impedance) to adapt to the rapidly changing grid impedance characteristics. Existing control models typically treat each inverter as an independent voltage source, neglecting the complementary mitigation effect of heterogeneous power sources on physical output fluctuations, and failing to quantify the actual marginal physical contribution of a single power source to voltage / frequency disturbances at the PCC point. This prevents the control system from dynamically adjusting the equivalent output impedance of each inverter, making it unable to provide targeted damping injection based on the characteristics of the disturbance source when facing large power fluctuations, resulting in a decline in power quality at the PCC point and even the risk of broadband oscillations.

[0004] To address the technical problem of insufficient grid connection point stability caused by the inability of grid-connected inverters to dynamically adjust their output impedance based on actual disturbance contributions due to neglecting the complementary characteristics of heterogeneous power source fluctuations, this invention proposes a high-precision prediction model for distributed energy output. Summary of the Invention

[0005] The purpose of this invention is to provide a high-precision prediction model for distributed energy output, which achieves precise control of power quality and system stability at the grid connection point by quantifying the disturbance contribution of heterogeneous power sources and dynamically correcting the output impedance.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] A high-precision prediction model for distributed energy output includes:

[0008] The data processing module collects real-time operating data and environmental and equipment status data, and generates a power fluctuation probability envelope.

[0009] The subgroup construction module calculates the negative correlation compensation characteristics of each power fluctuation probability envelope through a time series comparison algorithm, and constructs a complementary voltage-stabilized virtual subgroup.

[0010] The contribution quantification module separates the residual disturbance power vector injected into the common coupling point by each complementary voltage-stabilized virtual subgroup. Based on the power grid proxy model and the kernel function SHAP approximation algorithm, it quantifies the marginal contribution value of the residual disturbance power vector to the frequency deviation of the common coupling point.

[0011] The parameter generation module performs a nonlinear mapping on the marginal contribution value to generate virtual resistance and virtual inductance correction parameters;

[0012] The closed-loop control module performs layered decoupled closed-loop correction based on virtual resistance and virtual inductance correction parameters; the parameter optimization layer reconstructs the equivalent output impedance based on the virtual resistance and virtual inductance correction parameters to set the reference impedance operating point and determine the predicted power regulation deficit; the dynamic stabilization layer generates the real-time execution impedance based on the reference impedance operating point according to real-time operating data; and the energy balance layer generates and corrects the active power compensation command for shared energy storage based on the predicted power regulation deficit.

[0013] Preferably, the data processing module is specifically configured to: collect three-phase voltage sampling data, three-phase current sampling data, and bus frequency sampling data at the distributed energy grid connection point as the real-time operating data; and collect photovoltaic panel temperature, horizontal irradiance, inclined irradiance, and wind turbine hub height wind speed as the environmental and equipment status data.

[0014] The generation of the power fluctuation probability envelope specifically includes: constructing a multi-dimensional time-series feature matrix containing the real-time operating data and environmental and equipment status data; inputting the multi-dimensional time-series feature matrix into a preset probability prediction neural network model; performing quantile regression calculation; outputting the quantile prediction value of the distributed energy output power within the future control cycle; selecting the highest quantile prediction trajectory as the upper bound; selecting the lowest quantile prediction trajectory as the lower bound; and generating the power fluctuation probability envelope.

[0015] Preferably, the subgroup construction module is specifically configured as follows: setting a sliding time window, extracting the trend center line sequence of each power fluctuation probability envelope within the sliding time window; calculating the Pearson correlation coefficient between any two trend center line sequences, screening out distributed energy node combinations with Pearson correlation coefficients less than a preset negative correlation judgment threshold, and determining that they have the negative correlation compensation characteristics; using the DBSCAN clustering algorithm to aggregate distributed energy nodes with negative correlation compensation characteristics into the same logical cluster, defining it as the complementary voltage stabilization virtual subgroup; calculating the algebraic sum of the power fluctuation probability envelopes of each node within the complementary voltage stabilization virtual subgroup, defining the peak-valley difference component of the sum as the self-healing fluctuation component, removing the self-healing fluctuation component from the total power vector of the complementary voltage stabilization virtual subgroup, and obtaining the residual disturbance power vector.

[0016] Preferably, the contribution quantification module is specifically configured as follows: Constructing a reduced-order state-space equation based on the power system rotor motion equation, describing the dynamic response of the frequency deviation at the point of common coupling to the injected power, as the power grid proxy model; the motion equation includes the equivalent inertia parameter of the point of common coupling and the system damping coefficient; inputting the residual disturbance power vector into the power grid proxy model, and outputting the predicted trajectory of the frequency deviation at the point of common coupling; using complementary voltage-stabilized virtual subgroups as game participants, traversing the participant subsets using the kernel function SHAP approximation algorithm, and for each target complementary voltage-stabilized virtual subgroup as the calculation object, calculating the change in the predicted trajectory of the frequency deviation when the target complementary voltage-stabilized virtual subgroup is added or removed, and obtaining the marginal contribution value after weighted averaging of the changes.

[0017] Preferably, the parameter generation module is specifically configured as follows: constructing a nonlinear impedance sensitivity function based on an S-shaped growth curve, setting an impedance adjustment dead zone threshold and a saturation threshold; substituting the marginal contribution value into the nonlinear impedance sensitivity function to calculate the impedance gain coefficient; multiplying the preset reference virtual resistance value and reference virtual inductance value by the impedance gain coefficient respectively to generate the virtual resistance and virtual inductance correction parameters for each distributed energy grid-connected interface; wherein, the impedance gain coefficient is positively correlated with the marginal contribution value, and the output damping of the grid-connected interface is increased proportionally according to the magnitude of the marginal contribution value.

[0018] Preferably, the parameter optimization layer in the closed-loop control module is specifically configured as follows: The virtual resistance and virtual inductance correction parameters are sent to the underlying control loop of the distributed energy source via a communication protocol; the stator voltage equation parameters in the underlying control loop are updated using the virtual resistance and virtual inductance correction parameters, an equivalent output impedance model defined by the virtual resistance and virtual inductance is established, and the state of the equivalent output impedance model is set as the reference impedance operating point, thereby realizing dynamic shaping of the electrical damping characteristics of the distributed energy source output port; the theoretical maximum output power of the distributed energy source is calculated based on the initial virtual resistance and initial virtual inductance values ​​before reconstruction, and the limited actual output power is calculated based on the reference impedance operating point; the difference between the theoretical maximum output power and the limited actual output power is calculated, and the difference is defined as the predicted power regulation deficit caused by the increase in impedance.

[0019] Preferably, the dynamic stabilization layer and energy balance layer in the closed-loop control module are specifically configured as follows: In the dynamic stabilization layer: the voltage change rate and frequency change rate of the common connection point in the real-time operating data are monitored in real time; when the voltage change rate and frequency change rate exceed the preset safety threshold, an additional damping component proportional to the change rate is calculated, and the additional damping component is superimposed on the reference impedance operating point to generate the real-time execution impedance, thereby quickly shaping the output current;

[0020] At the energy balance layer: the predicted power regulation deficit is used as a feedforward power signal and input to the energy management unit of the central shared energy storage system connected to the common junction point; the feedforward power signal is modified by charging and discharging power limiting based on the real-time state of charge of the shared energy storage battery, the active power compensation command is generated, and the power throughput of the central shared energy storage system is controlled to balance the power fluctuations of the common junction point.

[0021] Preferably, the contribution quantification module is further configured with an event-triggered update mechanism for the kernel function SHAP approximation calculation algorithm, specifically: calculating the prediction residual between the actual frequency deviation of the point of common connection and the predicted trajectory of the frequency deviation in real time; setting a model misalignment judgment threshold, and determining that the current power grid operating condition has drifted when the moving average of the prediction residual exceeds the model misalignment judgment threshold; immediately triggering the reconstruction process of the kernel function SHAP approximation calculation algorithm, recalculating the marginal contribution value of each complementary voltage regulation virtual subgroup based on the latest residual disturbance power vector, and updating the virtual resistance and virtual inductance correction parameters.

[0022] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0023] 1. By constructing a power fluctuation probability envelope to identify and aggregate power sources with negatively correlated compensation characteristics into virtual subgroups, and further using the kernel function SHAP algorithm to quantify the marginal physical contribution of residual disturbances of each subgroup to the common connection point, a collaborative processing method is achieved, realizing a leap from utilizing power source complementarity at the macroscopic level to accurately tracing the source of disturbances at the microscopic level. This design solves the problem that existing technologies cannot quantify the contribution of disturbances from a single power source due to neglecting the physical output complementarity effect between power sources, providing a precise quantitative basis for subsequent differentiated and refined impedance adjustment.

[0024] 2. By combining the quantized marginal contribution value with a nonlinear impedance sensitivity function based on an S-shaped growth curve, the equivalent output impedance (virtual resistance and virtual inductance) of each inverter is dynamically and nonlinearly corrected. This design allows the system to inject targeted damping based on the principle of "the greater the disturbance, the more damping," rather than using fixed control parameters. In weak grid conditions with high-penetration heterogeneous power supply integration, this adaptive adjustment capability can effectively suppress the risk of broadband oscillations caused by drastic power fluctuations, significantly improving the voltage and frequency stability at the PCC point.

[0025] 3. Coordinated control is achieved by embedding dynamic impedance correction parameters into a layered, decoupled, closed-loop correction architecture encompassing the parameter optimization layer, dynamic stabilization layer, and energy balance layer. This substantive cooperative design ensures system stability across multiple time scales: the parameter optimization layer sets the optimal reference impedance operating point on a predictive scale; the dynamic stabilization layer responds to sudden disturbances on an instantaneous scale; and the energy balance layer compensates for power deficits caused by impedance regulation by utilizing shared energy storage. This architecture resolves the contradiction between dynamic safety and steady-state energy balance that is difficult to achieve with a single control strategy, guaranteeing the overall safe and stable operation of the virtual power plant. Attached Figure Description

[0026] Figure 1 This is a flowchart illustrating the prediction process of a high-precision prediction model for distributed energy output according to the present invention.

[0027] Figure 2 This is a flowchart illustrating the construction and marginal contribution value quantification of complementary voltage-stabilized virtual subgroups in an embodiment of the present invention.

[0028] Figure 3 This is a diagram of the hierarchical decoupling closed-loop correction control architecture according to an embodiment of the present invention. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Other embodiments obtained by those skilled in the art based on the ideas in this specification without creative effort all fall within the protection scope of this invention.

[0030] Reference Figures 1 to 3 This invention provides a high-precision prediction model for distributed energy output, and the specific technical solution is as follows.

[0031] A high-precision prediction model for distributed energy output, characterized by comprising:

[0032] The data processing module collects real-time operating data and environmental and equipment status data, and generates a power fluctuation probability envelope.

[0033] The subgroup construction module calculates the negative correlation compensation characteristics of each power fluctuation probability envelope through a time series comparison algorithm, and constructs a complementary voltage-stabilized virtual subgroup.

[0034] The contribution quantification module separates the residual disturbance power vector injected into the common coupling point by each complementary voltage-stabilized virtual subgroup. Based on the power grid proxy model and the kernel function SHAP approximation algorithm, it quantifies the marginal contribution value of the residual disturbance power vector to the frequency deviation of the common coupling point.

[0035] The parameter generation module performs a nonlinear mapping on the marginal contribution value to generate virtual resistance and virtual inductance correction parameters;

[0036] The closed-loop control module performs layered decoupled closed-loop correction based on virtual resistance and virtual inductance correction parameters; the parameter optimization layer reconstructs the equivalent output impedance based on the virtual resistance and virtual inductance correction parameters to set the reference impedance operating point and determine the predicted power regulation deficit; the dynamic stabilization layer generates the real-time execution impedance based on the reference impedance operating point according to real-time operating data; and the energy balance layer generates and corrects the active power compensation command for shared energy storage based on the predicted power regulation deficit.

[0037] Example 1:

[0038] This invention provides a high-precision prediction model for distributed energy output. A virtual power plant operator manages multiple heterogeneous distributed energy nodes connected to a weak grid common connection point (PCC) in a certain region. This distributed energy node group includes three 50MW photovoltaic power plants (labeled PV-1, PV-2, and PV-3) and two 100MW wind power plants (labeled WT-1 and WT-2), all connected to a central shared energy storage system with a rated power of 30MW / 60MWh. Due to the intermittent and random fluctuations in photovoltaic and wind power output, high penetration rates can easily impact the power quality and system stability of the PCC.

[0039] To solve this technical problem, refer to Figure 1 The model described in this embodiment will execute the following core processes: First, it collects the operation and environmental data of each distributed energy node to generate a power fluctuation probability envelope for each node in the short term. Second, by analyzing the negative correlation compensation characteristics of each envelope, it dynamically aggregates energy nodes with complementary potential into a complementary voltage-stabilized virtual subgroup. Third, the model will separate and quantify the marginal contribution value of the residual disturbance power injected into the PCC by each subgroup to the grid frequency. Subsequently, based on this contribution value, it generates differentiated virtual resistance and virtual inductance correction parameters through nonlinear mapping. Finally, in a hierarchical decoupled closed-loop control architecture, these parameters are applied to reconstruct the equivalent output impedance of each energy node, and the shared energy storage system is instructed to compensate for the resulting power regulation deficit, thereby achieving active, precise, and coordinated control of the PCC point stability.

[0040] From a logical architecture perspective, the model described in this invention is built on a virtual processing architecture executed by a computer, specifically including: a data processing module, a subgroup construction module, a contribution quantification module, a parameter generation module, and a closed-loop control module. The specific execution flow described below is the specific operating logic of the above functional modules.

[0041] Furthermore, the data processing module is specifically configured to: collect three-phase voltage sampling data, three-phase current sampling data, and bus frequency sampling data at the distributed energy grid connection point as the real-time operating data; and collect photovoltaic panel temperature, horizontal irradiance, inclined irradiance, and wind turbine hub height wind speed as the environmental and equipment status data.

[0042] The generation of the power fluctuation probability envelope specifically includes: constructing a multi-dimensional time-series feature matrix containing the real-time operating data and environmental and equipment status data; inputting the multi-dimensional time-series feature matrix into a preset probability prediction neural network model; performing quantile regression calculation; outputting the quantile prediction value of the distributed energy output power within the future control cycle; selecting the highest quantile prediction trajectory as the upper bound; selecting the lowest quantile prediction trajectory as the lower bound; and generating the power fluctuation probability envelope.

[0043] Specifically, the data acquisition and processing flow in this step is illustrated using a photovoltaic power plant PV-1 as an example. The data acquisition module, through an intelligent electronic device (IED) deployed at the grid connection point of PV-1, collects the instantaneous values ​​of three-phase voltage, three-phase current, and PCC bus frequency at a sampling period of 10 milliseconds, forming the raw real-time operating data. Simultaneously, through temperature sensors and irradiance meters deployed on the photovoltaic array, the photovoltaic panel temperature, horizontal irradiance, and inclined irradiance are collected at a sampling period of 1 minute, forming the raw environmental and equipment status data.

[0044] During the data preprocessing stage, the system aligns data from different sources in terms of time and dimensions. High-frequency real-time operational data is processed into effective values ​​at a 1-minute time resolution, aligned with the timestamps of environmental and equipment status data. All aligned data sequences, including voltage, current, frequency, temperature, and irradiance, undergo minimum-maximum normalization to scale the values ​​to an interval, eliminating the influence of different physical dimensions on model training weights.

[0045] After preprocessing, the system constructs a multi-dimensional time-series feature matrix as input to the probabilistic prediction neural network model. This matrix is ​​organized using a sliding time window, with the window length set to the past 60 time steps (i.e., 60 minutes) and the time step size being 1 minute. Therefore, at any time t, a single sample input to the model is a tensor of dimension [60, N], where 60 represents the length of the historical time series and N represents the total number of features contained in the energy node (e.g., PV-1). Specifically, for the photovoltaic power station PV-1, the total number of features N is 5, namely the three-phase voltage RMS value, three-phase current RMS value, photovoltaic panel temperature, horizontal irradiance, and inclined irradiance after alignment and normalization in the aforementioned data preprocessing stage. For the wind farm WT-1 in the scenario, the total number of features N is 4, namely the three-phase voltage RMS value, three-phase current RMS value, bus frequency, and wind speed at the turbine hub height.

[0046] In this embodiment, the preset probabilistic prediction neural network model adopts a Long Short-Term Memory (LSTM) network architecture, a standard structure well-known to those skilled in the art. The innovation of this invention lies in the design of its output layer and loss function, rather than an improvement to the network structure itself. To ensure the feasibility of the solution, this embodiment provides a specific network configuration: the LSTM model consists of two stacked LSTM layers, each containing 128 hidden units. To prevent overfitting during model training, a dropout layer with a dropout rate of 0.2 is set after each LSTM layer. The network ends with a fully connected output layer containing 5 linear neurons, whose output dimension corresponds to the number of quantile prediction values. In the entire network, except for the output layer, all other layers use modified linear units as activation functions. When training the model, the Adam optimizer is used, and the initial learning rate is set to 0.001. The model's output layer is designed to contain 5 neurons, corresponding to the 5th, 25th, 50th, 75th, and 95th percentile prediction values ​​of the output power within the next 15-minute control period. The model training employs a quantile loss function, which asymmetrically penalizes prediction bias, enabling each output neuron to learn the predictive ability of its corresponding quantile. During model inference, the input [60, N] feature matrix is ​​processed by the network to output a vector containing five power prediction values. The system selects the 95th quantile prediction trajectory as the upper bound of the power fluctuation probability envelope and the 5th quantile prediction trajectory as the lower bound, thereby generating a high-confidence power output range for the PV-1 photovoltaic power station within the next 15 minutes. The same process is applied to all other distributed energy nodes in the scenario.

[0047] This step involves constructing a multidimensional time-series feature matrix containing heterogeneous data from multiple sources and using quantile regression to generate a probability envelope that reflects the uncertainty of output power, rather than a traditional single-point prediction. This method provides a more accurate and reliable data foundation for subsequent assessments of the complementary potential between power sources and for quantifying their actual disturbance range to the power grid, thus improving the robustness of the entire prediction and control model.

[0048] Furthermore, referring to Figure 2 The subgroup construction module is specifically configured as follows: A sliding time window is set, and the trend center line sequence of each power fluctuation probability envelope within the sliding time window is extracted; the Pearson correlation coefficient between any two trend center line sequences is calculated, and distributed energy node combinations with Pearson correlation coefficients less than a preset negative correlation threshold are selected and determined to have the negative correlation compensation characteristic; the DBSCAN clustering algorithm is used to aggregate distributed energy nodes with negative correlation compensation characteristics into the same logical cluster, which is defined as the complementary voltage-stabilized virtual subgroup; the algebraic sum of the power fluctuation probability envelopes of each node within the complementary voltage-stabilized virtual subgroup is calculated, and the peak-valley difference component of the sum is defined as the self-healing fluctuation component; the self-healing fluctuation component is removed from the total power vector of the complementary voltage-stabilized virtual subgroup to obtain the residual disturbance power vector.

[0049] Specifically, after generating power fluctuation probability envelopes for all five distributed energy nodes (PV-1, PV-2, PV-3, WT-1, WT-2), this model executes the following process to construct a complementary voltage-stabilized virtual subgroup. The system sets a 30-minute sliding time window and extracts the trend centerline sequence from the power fluctuation probability envelope of each node. In this embodiment, this trend centerline sequence is the 50th quantile (median) power prediction trajectory output by the aforementioned probabilistic prediction neural network model, representing the most likely expected path for the future output power of each node.

[0050] The system calculates the Pearson correlation coefficient between the trend centerline sequences of any two nodes in a scenario using a paired approach. In this embodiment, the preset negative correlation threshold is set to -0.3, which is used to filter out combinations of energy nodes with significantly opposite output trends. For example, during a certain period, the output of photovoltaic power plant PV-1 increases due to enhanced solar radiation, while the output of wind power plant WT-2 decreases due to weakened wind speed. The Pearson correlation coefficient calculated from their trend centerline sequences is -0.6. Since -0.6 is less than -0.3, the system determines that the combination of PV-1 and WT-2 has a negative correlation compensation characteristic; conversely, if geographically adjacent PV-1 and PV-2 have similar meteorological conditions, their correlation coefficient is calculated to be +0.9, and they are not determined to have a negative correlation compensation characteristic.

[0051] Subsequently, the system employs the density-based noise applied spatial clustering (DBSCAN) algorithm to aggregate all distributed energy nodes identified as having negative correlation compensation characteristics. The effective execution of the DBSCAN algorithm relies on the setting of two core parameters: the neighborhood radius (eps) and the minimum number of neighborhood samples (min_samples). In this embodiment, the min_samples parameter is set to 2, which physically means identifying at least pairs of energy node combinations with complementary characteristics. The eps parameter is directly related to the aforementioned Pearson correlation coefficient. The system first converts the correlation coefficient r into a distance metric d using the calculation d=1-r, and then sets the eps value to 1.3. This setting ensures that only nodes with an original Pearson correlation coefficient less than -0.3 (i.e., the negative correlation threshold) can be grouped into the same neighborhood due to sufficient proximity, thus ensuring that the clustering results are consistent with the criteria for determining negative correlation compensation characteristics. The DBSCAN algorithm is a standard clustering method well-known to those skilled in the art, which considers nodes with negative correlation compensation characteristics as "density reachable," thereby grouping them into the same logical cluster. Based on the above correlation calculation results, it is assumed that PV-1 and WT-2, and PV-3 and WT-1, all have negative correlation compensation characteristics, while PV-2 does not have a significant negative correlation with other nodes. The execution result of the DBSCAN algorithm will aggregate {PV-1, WT-2} into "complementary voltage regulation virtual subgroup A", aggregate {PV-3, WT-1} into "complementary voltage regulation virtual subgroup B", and treat PV-2 as an independent unit.

[0052] Finally, the system calculates the residual disturbance power vector for each subgroup. Taking subgroup A as an example, the system performs an algebraic summation of the power fluctuation probability envelopes of its internal nodes PV-1 and WT-2, that is, adding their upper bound trajectories to each other and their lower bound trajectories to each other, generating a convergent envelope representing the total output of subgroup A. Since the fluctuations of PV-1 and WT-2 are negatively correlated, the width of their convergent envelope (the difference between the upper and lower bounds) will be less than the sum of the widths of the two independent envelopes. This reduction in fluctuation caused by the mutual cancellation of internal outputs is defined as the self-healing fluctuation component. After removing this self-healing fluctuation component from the total power vector of subgroup A (represented by the center line of the convergent envelope), the resulting net output power fluctuation curve is the residual disturbance power vector injected into the common junction point of subgroup A. This vector reflects the portion of power fluctuations within the subgroup that cannot be self-absorbed and will actually affect the power grid.

[0053] This step identifies and aggregates distributed energy sources with complementary power output characteristics, reconstructing previously dispersed disturbance sources into virtual subgroups with inherent stability. It can quantify and separate the self-healing fluctuations within each subgroup, thereby accurately identifying the "residual" disturbances that truly impact the power grid. This provides an accurate analytical target for subsequent targeted and efficient damping control, avoiding the resource waste caused by indiscriminately suppressing all fluctuations.

[0054] As a preferred implementation, to further enhance the adaptability and foresight of subgroup construction, the construction of complementary voltage-stabilized virtual subgroups further includes: modeling each distributed energy node as an independent agent; defining the action of the agent as choosing to join or leave a complementary voltage-stabilized virtual subgroup; defining a global reward function related to minimizing the frequency deviation of the common connection point; and training online and outputting a dynamic subgroup aggregation strategy that maximizes the global reward function through a multi-agent reinforcement learning algorithm.

[0055] Specifically, in addition to the method of constructing subgroups based on the correlation of historical data mentioned above, this model can also employ an online optimization strategy. This strategy initializes the five distributed energy nodes (PV-1 to WT-2) in the scenario as five independent agents. Each agent's state space contains its own power prediction envelope information and the current grid frequency state; its action space is discretized into a finite number of choices, such as {not joining a subgroup, joining subgroup A, joining subgroup B...}. The system sets a global reward function, the core objective of which is to minimize the absolute integral of the frequency deviation at the PCC point in the next control cycle. After all agents have taken actions, the system simulates the expected frequency deviation using a grid proxy model based on the predicted residual disturbance of the subgroup combination, and calculates the global reward value accordingly. The model employs the Multi-Agent Deep Deterministic Policy Gradient (MADDPG) algorithm. Through continuous simulation, trial and error, and learning, each agent learns how to coordinate actions to maximize the common long-term reward, ultimately outputting a real-time optimal subgroup aggregation strategy that can cope with current and future predicted operating conditions.

[0056] This design elevates subgroup construction from a passive division based on historical statistics to an online optimization decision-making process oriented towards future operating conditions. It ensures that the aggregated virtual subgroups possess optimal synergistic and complementary capabilities at all times, providing the most effective execution basis for subsequent dynamic impedance adjustment based on actual disturbance contributions, thereby further enhancing the stability of the grid connection point.

[0057] Furthermore, referring to Figure 2The contribution quantification module is specifically configured as follows: It constructs a reduced-order state-space equation based on the power system rotor motion equation, describing the dynamic response of the frequency deviation at the point of common coupling to the injected power, as the power grid proxy model. The motion equation includes the equivalent inertia parameter of the point of common coupling and the system damping coefficient. The residual disturbance power vector is input into the power grid proxy model, and the predicted trajectory of the frequency deviation at the point of common coupling is output. The complementary voltage-stabilized virtual subgroup is used as a game participant. The kernel function SHAP approximation algorithm is used to traverse the participant subsets. For each target complementary voltage-stabilized virtual subgroup as the calculation object, the change in the predicted trajectory of the frequency deviation when the target complementary voltage-stabilized virtual subgroup is added or removed is calculated. The marginal contribution value is obtained after weighted averaging of the changes.

[0058] Specifically, to quantify the specific impact of each disturbance source identified in the aforementioned steps on grid stability, this model executes the following process. First, to simulate the dynamic response of the point of common coupling (PCC), a grid proxy model is constructed. This model is a simplified version of the classic swing equation of the power grid, and is a reduced-order second-order dynamic equation. This equation describes the relationship between the rate of change of the PCC frequency deviation and two factors: Specifically, this model is constructed based on the power system rotor motion equation (i.e., the swing equation), the physical meaning of which is: the time derivative of the PCC frequency deviation is proportional to the difference between the input residual disturbance power vector and the system damping coefficient multiplied by the current frequency deviation, and inversely proportional to the system's equivalent inertia parameter. The system uses the zero-order hold method to discretize this differential equation and generate specific iterative calculation logic. This logic defines the evolution law of the system state: that is, the PCC frequency deviation at the next calculation time is equal to the current frequency deviation minus the attenuation component determined by the system damping coefficient, plus the increment component determined by the ratio of the input residual disturbance power to the system's equivalent inertia parameter. The equivalent inertia parameter (M) and the system damping coefficient (D) are the two core parameters of the model.

[0059] To ensure the model accurately reflects the real-time characteristics of the power grid, the two core parameters, M and D, are periodically calibrated using online system identification technology. This embodiment specifically employs the recursive least squares method. This method continuously utilizes actual data collected from the PCC point, taking the total net injected power change as the input signal and the rate of change of the actual frequency deviation as the output signal. Through iterative calculations, the estimated values ​​of M and D are continuously updated to minimize the error between the model's predicted response and the actual power grid response. This power grid proxy model can receive power injection as input and calculate the resulting time-series trajectory of the PCC point frequency deviation as output.

[0060] Subsequently, the model treats the "complementary voltage-stabilizing virtual subgroup A," "complementary voltage-stabilizing virtual subgroup B," and independent node PV-2 generated in the preceding steps as three independent game participants. The model superimposes the residual disturbance power vectors of these three participants to form a total disturbance power injection sequence. This sequence is input into the constructed power grid proxy model, and the model outputs a baseline PCC frequency deviation prediction trajectory after computation. This trajectory represents the expected frequency fluctuation of the PCC point under the combined effect of all participants.

[0061] Next, the SHAP kernel function approximation algorithm is used to fairly allocate each participant's contribution to the total frequency bias. This algorithm achieves contribution allocation by systematically simulating "alliances" among different subsets of participants. Taking the calculation of the marginal contribution value of subgroup A as an example, the algorithm performs the following types of simulation calculations:

[0062] The case where only subgroup A is connected to the power grid is simulated. Its residual disturbance power vector is input into the power grid proxy model to obtain a frequency deviation trajectory.

[0063] The scenario of subgroup B and PV-2 forming a coalition connected to the power grid is simulated. The sum of their disturbance vectors is input into the model to obtain a frequency deviation trajectory. Then, the scenario of subgroup A joining the coalition (i.e., A, B, and PV-2 are all connected) is simulated to obtain a reference frequency deviation trajectory. The latter's frequency deviation trajectory is compared with the former's trajectory, and the root mean square error or maximum absolute deviation of the difference between the two frequency deviation prediction trajectories at each time step is calculated. This difference is defined as a single frequency deviation change scalar to characterize the overall impact of the subgroup on the frequency fluctuation amplitude.

[0064] The kernel function SHAP algorithm iterates through all possible combinations of participants (e.g., {A}, {B}, {PV-2}, {A, B}, {A, PV-2}, etc.) and calculates the change in frequency deviation trajectory caused by the addition of each different subset to the target subgroup A. Finally, the algorithm performs a weighted calculation on all these changes according to the Shapley value theory in game theory. The specific weighting rule is: for each combination, its weight depends on the ratio of the product of the factorial of the number of members already included in the combination and the factorial of the number of remaining members not included to the factorial of the total number of participants. Through this weighted summation based on combination probabilities, a single value is finally obtained, which is the marginal contribution of subgroup A to the PCC frequency deviation. This value accurately quantifies the average impact of the residual disturbance of subgroup A on the grid frequency stability. The same process is used to calculate the marginal contribution values ​​of subgroup B and independent node PV-2.

[0065] By introducing a power grid proxy model and the kernel function SHAP algorithm, this step establishes a direct and quantifiable causal relationship between the power disturbance of each virtual subgroup and its actual physical impact on the power grid frequency. This method overcomes the limitation of traditional control models that cannot trace the contribution of disturbances. It not only identifies the magnitude of the disturbance, but more importantly, reveals the actual marginal effect of the disturbance on system stability, providing a fair and accurate decision-making basis for the subsequent implementation of differentiated, cost-effective, and adaptive impedance control.

[0066] Furthermore, the parameter generation module is specifically configured as follows: constructing a nonlinear impedance sensitivity function based on an S-shaped growth curve, setting impedance adjustment dead zone thresholds and saturation thresholds; substituting the marginal contribution value into the nonlinear impedance sensitivity function to calculate the impedance gain coefficient; multiplying the preset reference virtual resistance value and reference virtual inductance value by the impedance gain coefficient respectively to generate the virtual resistance and virtual inductance correction parameters for each distributed energy grid-connected interface; wherein, the marginal contribution value specifically refers to the degree of positive contribution of this subgroup to the deterioration or increase of the frequency deviation at the point of common coupling. The impedance gain coefficient is positively correlated with this deterioration contribution value, so as to increase the output damping of the grid-connected interface in a targeted manner according to the marginal contribution value.

[0067] Specifically, after obtaining the marginal contribution values ​​of each game participant (complementary voltage-stabilized virtual subgroup A, subgroup B, and independent node PV-2), the model generates specific control parameters through a nonlinear mapping process. The core of this process is a nonlinear impedance sensitivity function constructed based on an S-shaped growth curve. To implement this nonlinear mapping, this embodiment uses a standard logistic function to specifically define the S-shaped curve. The calculation logic of this function is as follows: First, calculate the difference between the set maximum gain coefficient and the basic gain coefficient, using this as the numerator; second, calculate the difference between the input marginal contribution value and the preset curve center point (e.g., 0.55), multiply this difference by a preset growth rate coefficient (e.g., 10), and raise the product to the negative exponent of the natural constant. Then, add one to this exponent, using this as the denominator; finally, divide the numerator by the denominator, and add the resulting quotient to the basic gain coefficient to obtain the output impedance gain coefficient. The function's growth rate and center point, two internal parameters, are jointly calibrated based on a set dead zone threshold of 0.2 and a saturation threshold of 0.9 to ensure that the function curve exhibits a smooth, non-linear growth pattern that best meets control requirements within the effective adjustment range. Numerically, this function maps the marginal contribution of the input to an output impedance gain coefficient.

[0068] In this embodiment, the key parameters of the function are set as follows: the impedance adjustment dead zone threshold is set to 0.2, and the saturation threshold is set to 0.9. The response characteristics of the function are as follows: when the marginal contribution value of the input is less than 0.2, the impedance gain coefficient of the function output is constant at 1.0, which means that small disturbances with negligible impact on the power grid will not trigger additional impedance adjustment; when the marginal contribution value of the input is between 0.2 and 0.9, the impedance gain coefficient increases smoothly and non-linearly with the increase of the contribution value, with the growth rate being the largest in the middle region and relatively slow at both ends, conforming to the characteristics of an S-shaped curve; when the marginal contribution value of the input exceeds 0.9, the impedance gain coefficient reaches and remains at the set maximum value of 3.0 to prevent excessive impedance injection from causing new system instability problems.

[0069] Following the calculation results of the previous embodiment, we assume that the marginal contributions of subgroup A, subgroup B, and PV-2 are 0.8, 0.4, and 0.1, respectively. The system substitutes these values ​​into the nonlinear impedance sensitivity function:

[0070] For PV-2, its contribution value of 0.1 is less than the dead zone threshold of 0.2, so the calculated impedance gain coefficient is 1.0.

[0071] For subgroup B, its contribution value of 0.4 is within the effective adjustment region of the function, and the calculated impedance gain coefficient is 1.8.

[0072] For subgroup A, its contribution value of 0.8 is also within the effective adjustment region, and the value is larger, with a calculated impedance gain coefficient of 2.7.

[0073] Finally, the system uses these gain coefficients to correct the reference impedance parameters of each distributed energy source. It is assumed that the reference virtual resistance value for all inverters in the system is preset to 0.1 ohms, and the reference virtual inductance value is preset to 0.5 millihenries. The same correction parameters are used for energy nodes belonging to the same subgroup. Therefore, for the five energy nodes in the scenario, the generated virtual resistance and virtual inductance correction parameters are as follows:

[0074] PV-1 and WT-2 (belonging to subgroup A): virtual resistance is 0.27 ohms (0.1*2.7), virtual inductance is 1.35 millihenries (0.5*2.7).

[0075] PV-3 and WT-1 (belonging to subgroup B): virtual resistance is 0.18 ohms (0.1*1.8), virtual inductance is 0.9 millihenries (0.5*1.8).

[0076] PV-2: Virtual resistance is 0.1 ohms (0.1 * 1.0), virtual inductance is 0.5 millihenries (0.5 * 1.0).

[0077] As a preferred implementation, to make the generated impedance parameters more robust, the nonlinear mapping operation on the marginal contribution value further includes: simultaneously calculating the probability distribution of the frequency deviation prediction trajectory introduced by the power fluctuation probability envelope while traversing the participant subset using the kernel function SHAP approximation algorithm; calculating the information entropy of the probability distribution as an uncertainty index of the marginal contribution value; and using the uncertainty index to perform risk-added correction on the virtual resistance and virtual inductance correction parameters, wherein the amount of risk-added correction is positively correlated with the uncertainty index.

[0078] Specifically, in each simulation step of the SHAP kernel algorithm, the system input is no longer a single residual disturbance power centerline, but rather the entire power fluctuation probability envelope. Through Monte Carlo sampling, the system inputs multiple possible trajectories within the envelope into the power grid proxy model, thereby obtaining a probability distribution of a frequency deviation prediction trajectory. The system further calculates the information entropy of this probability distribution; the higher the information entropy, the more divergent and uncertain the predicted frequency impact of the subgroup. This information entropy value is defined as the uncertainty index of the marginal contribution value. After generating virtual impedance correction parameters based on the impedance gain coefficient, the system also applies a risk-additional correction based on this uncertainty index. For example, if the uncertainty index of the contribution value of subgroup A is very high, the system will add an additional 10% to its original correction parameters (virtual resistance 0.27 ohms, virtual inductance 1.35 millihenries) as a safety margin to address potential prediction deviations.

[0079] This design incorporates the reliability (uncertainty) of the contribution value into the impedance regulation decision-making process. It enables the dynamic adjustment strategy to respond not only to the magnitude of the disturbance contribution but also to the risk of the contribution prediction. By automatically configuring a higher safety margin for high-risk disturbances, it ensures the reliability of dynamic impedance regulation under various prediction accuracies, fundamentally guaranteeing the stability of the grid connection point.

[0080] By constructing a nonlinear impedance sensitivity function, this step achieves a nonlinear and differentiated mapping from disturbance contribution to control parameters. This design ensures that the control system can, according to the principle of "responding on demand and allocating according to responsibility," inject strong damping into the source of major disturbances, weak damping into secondary disturbance sources, and no response to harmless fluctuations. This refined adjustment mechanism avoids the resource waste and potential risks of "one-size-fits-all" control, and improves the accuracy of system control and resource utilization efficiency.

[0081] Furthermore, the parameter optimization layer in the closed-loop control module is specifically configured as follows: The virtual resistance and virtual inductance correction parameters are sent to the underlying control loop of the distributed energy source via a communication protocol; the stator voltage equation parameters in the underlying control loop are updated using the virtual resistance and virtual inductance correction parameters, an equivalent output impedance model defined by the virtual resistance and virtual inductance is established, and the state of the equivalent output impedance model is set to the reference impedance operating point, thereby realizing the dynamic shaping of the electrical damping characteristics of the distributed energy source output port; the theoretical maximum output power of the distributed energy source is calculated based on the initial virtual resistance and initial virtual inductance values ​​before reconstruction, and the limited actual output power is calculated based on the reference impedance operating point; the difference between the theoretical maximum output power and the limited actual output power is calculated, and the difference is defined as the predicted power regulation deficit caused by the increase in impedance.

[0082] Specifically, at the parameter optimization layer, the model converts the virtual resistance and virtual inductance correction parameters generated in the aforementioned steps into actual control actions. The central controller of the virtual power plant sends the calculated parameters to the local grid-connected inverter controllers of each distributed energy node (PV-1, PV-2, PV-3, WT-1, WT-2) in the scenario through standard communication protocols such as IEC 61850.

[0083] Taking the PV-1 photovoltaic power plant as an example, its local controller receives a virtual resistance correction parameter of 0.27 ohms and a virtual inductance correction parameter of 1.35 millihenries. These parameters are used to update the stator voltage equation simulating the behavior of a synchronous generator in its underlying control loop in real time. Specifically, the controller adjusts the original voltage reference command by adding a virtual voltage drop term proportional to the product of the output current and the corrected impedance parameter. Electrically, this process is equivalent to connecting a virtual resistor of 0.27 ohms and a virtual inductor of 1.35 millihenries in series at the physical output port of the inverter, thereby dynamically reconstructing the equivalent output impedance of PV-1. This operating state, defined by the new parameters and possessing enhanced damping characteristics, is set as the reference impedance operating point for PV-1 in a future control cycle.

[0084] Subsequently, the parameter optimization layer needs to determine the potential power loss caused by the increased impedance, i.e., predict the power regulation deficit. The system first calculates the theoretical maximum output power of PV-1 in this state based on the initial virtual resistance (0.1 ohms) and initial virtual inductance (0.5 millihenries) before reconfiguration, combined with the current grid voltage and the inverter's internal potential; for example, the calculated value is 45MW. Next, the system recalculates using the updated reference impedance operating point (virtual resistance 0.27 ohms, virtual inductance 1.35 millihenries). Based on the physical principles of AC power transmission, the upper limit of active power transmission is inversely proportional to the impedance magnitude along the transmission path. Therefore, as the updated virtual resistance and virtual inductance values ​​increase significantly, the virtual impedance magnitude increases accordingly, forcing a reduction in the power transmission limit between the inverter's grid connection point voltage and internal potential. Thus, the calculated limited actual output power is assumed to be 42MW.

[0085] The system calculates the difference between these two values, 45MW minus 42MW, resulting in 3MW. This 3MW difference is defined as the predicted power regulation deficit incurred by PV-1 due to its impedance regulation task. This value represents the power margin that PV-1 needs to reserve from its maximum generating capacity to enhance grid stability. The same calculation process is applied to all other energy nodes in the scenario to obtain their respective predicted power regulation deficits.

[0086] The design of this parameter optimization layer, by transforming the abstract correction parameters calculated by the upper layer into electrical characteristic adjustments that can be executed by the lower-level controller, constitutes a key bridge connecting prediction and control. It not only enables online dynamic shaping of the output damping of each energy node, but more importantly, by accurately calculating and predicting the power regulation deficit, it quantifies the power cost required to improve system stability, providing clear and forward-looking power commands for the subsequent energy balance layer to actively compensate by calling upon shared energy storage.

[0087] Furthermore, referring to Figure 3 The dynamic stabilization layer and energy balance layer in the closed-loop control module are specifically configured as follows: In the dynamic stabilization layer: the voltage change rate and frequency change rate of the common connection point in the real-time operating data are monitored in real time; when the voltage change rate and frequency change rate exceed the preset safety threshold, an additional damping component proportional to the change rate is calculated, and the additional damping component is superimposed on the reference impedance operating point to generate the real-time execution impedance, thereby quickly shaping the output current;

[0088] At the energy balance layer: the predicted power regulation deficit is used as a feedforward power signal and input to the energy management unit of the central shared energy storage system connected to the common junction point; the feedforward power signal is modified by charging and discharging power limiting based on the real-time state of charge of the shared energy storage battery, the active power compensation command is generated, and the power throughput of the central shared energy storage system is controlled to balance the power fluctuations of the common junction point.

[0089] Specifically, the hierarchical decoupled closed-loop correction architecture in this embodiment includes a dynamic stabilization layer and an energy balance layer, in addition to the parameter optimization layer. The two work together on different time scales.

[0090] The dynamic stabilization layer's primary responsibility is to handle unpredictable, millisecond-level transient disturbances. This layer continuously monitors real-time operating data, such as three-phase voltage and bus frequency, collected from the point of common coupling (PCC), and calculates their rates of change (dv / dt and df / dt) in real time. The system has preset safety thresholds, such as a voltage rate of change safety threshold of 5% per second and a frequency rate of change safety threshold of 0.5 Hz per second. When a line fault or sudden switching of a large load occurs in the grid, causing any monitored rate of change to exceed its preset safety threshold, the dynamic stabilization layer is instantly activated. Upon activation, this layer calculates an additional damping component for the inverter of each distributed energy node. This component (including additional virtual resistance and additional virtual inductance) is proportional to the rate of change exceeding the limit. For example, if the frequency rate of change reaches 1.0 Hz per second, the additional virtual resistance value will be several times that of a frequency rate of change of 0.6 Hz per second. This calculated additional damping component is immediately superimposed on the reference impedance operating point set by the parameter optimization layer, forming an instantaneous, more damped real-time execution impedance. Based on this real-time execution impedance, the inverter controller rapidly shapes its output current, thereby injecting strong damping support into the grid in a very short time to suppress violent voltage or frequency oscillations.

[0091] At the energy balance layer, the focus is on maintaining the power balance of the entire virtual power plant on a longer timescale of minutes. This layer receives the sum of the predicted power regulation deficits of all distributed energy nodes calculated by the parameter optimization layer. In this embodiment, it is assumed that the total deficit of the five nodes is 10MW. This 10MW value is sent as a feedforward power signal to the Energy Management Unit (EMS) of the central shared energy storage system connected to the PCC. Upon receiving this instruction, the EMS first checks the real-time state of charge (SoC) of the shared energy storage batteries. If the battery SoC is within the normal operating range (e.g., between 20% and 90%) and its instantaneous charge / discharge capacity allows, the EMS will convert the 10MW deficit signal into a 10MW active power compensation instruction, instructing the energy storage inverter to release 10MW of power to the grid. If the battery SoC is too low (e.g., below 20%) and cannot meet the 10MW discharge demand, the EMS will limit the instruction based on its maximum allowable discharge power, for example, to 8MW. The revised instructions are sent to the energy storage system for execution. By absorbing and distributing the corresponding power, the system accurately compensates for the power gap caused by the distributed energy nodes' inability to provide damping support, thereby ensuring that the total power output of the virtual power plant is smooth and controllable, and balancing the power fluctuations at the PCC point.

[0092] The collaborative work of the dynamic stabilization layer and the energy balance layer constitutes a multi-timescale, in-depth defense system for system stability. The dynamic stabilization layer, acting as a rapid reaction force, handles urgent transient events and ensures the system's instantaneous safety. The energy balance layer, as a logistical support system, uses the proactive scheduling of shared energy storage to compensate for energy gaps created by improved stability, ensuring that the virtual power plant executes advanced stability control strategies without sacrificing its overall energy scheduling and balancing capabilities.

[0093] As a preferred and more holistic implementation, the execution logic of the parameter optimization layer and the energy balance layer further includes: establishing a unified state-space model describing the effect of virtual impedance regulation and shared energy storage compensation on suppressing frequency deviation at the point of common coupling; constructing a linear quadratic regulator (LQR) with the goal of minimizing total regulation cost; and using the linear quadratic regulator to solve online for the residual disturbance power vector and output the optimal cooperative allocation sequence of virtual impedance correction parameters and active power compensation commands.

[0094] Specifically, in addition to the aforementioned layered and decoupled control architecture, this model can also employ an integrated optimal control strategy. This strategy no longer treats impedance regulation and energy storage compensation as two independent levels, but instead establishes a higher-dimensional unified state-space model. This model can simultaneously describe the combined impact of virtual impedance changes and energy storage power injection on PCC frequency deviation. The system further constructs a linear quadratic regulator (LQR), whose optimization objective is to minimize a quadratic cost function that includes a frequency deviation penalty, a virtual impedance regulation loss penalty, and an energy storage throughput cost penalty. When a new round of residual disturbance power vector is calculated, the LQR controller, based on this unified model, solves the Riccati equation to calculate in real time an optimal control sequence that minimizes the total regulation cost over a future period. This sequence simultaneously includes the virtual impedance correction parameters to be allocated to each inverter and the active power compensation command to be executed by the shared energy storage.

[0095] This design integrates dynamic impedance regulation and energy storage compensation through optimal control theory, achieving coordinated optimization. It breaks away from the rigid "impedance first, energy storage later" model, realizing the dynamic and optimal allocation of the two stable resources. This ensures that the system can always suppress disturbances with the optimal resource combination, making the dynamic adjustment behavior based on disturbance contribution the most efficient globally. Thus, it achieves optimal protection of grid connection stability at the lowest cost.

[0096] Furthermore, the contribution quantification module is also configured with an event-triggered update mechanism for the kernel function SHAP approximation algorithm. Specifically, it calculates the prediction residual between the actual frequency deviation of the point of common connection and the predicted trajectory of the frequency deviation in real time; sets a model misalignment threshold, and determines that the current power grid operating condition has drifted when the moving average of the prediction residual exceeds the model misalignment threshold; and immediately triggers the reconstruction process of the kernel function SHAP approximation algorithm. Considering that the algorithm involves multiple model iterations, the system executes the reconstruction process by calling high-performance edge computing units or cloud parallel computing resources. After completing the calculation, the results are sent out, and the marginal contribution values ​​of each complementary voltage-stabilized virtual subgroup are recalculated based on the latest residual disturbance power vector, and the virtual resistance and virtual inductance correction parameters are updated.

[0097] Specifically, to ensure the continued accuracy of the model, this embodiment introduces an event-triggered update mechanism for the SHAP kernel function approximation algorithm. The core of this mechanism lies in real-time evaluation of the prediction accuracy of the power grid proxy model. The system continuously collects the actual power grid frequency at the point of common coupling (PCC) and compares it point-by-point with the frequency deviation prediction trajectory previously output by the power grid proxy model, calculating the difference between the two, i.e., the prediction residual.

[0098] To smooth out the effects of instantaneous measurement noise or minute fluctuations, the system calculates a moving average over a sliding time window for the continuous prediction residual sequence. In this embodiment, the window length is set to 5 minutes. Simultaneously, the system presets a model inaccuracy threshold, which is set based on historical data analysis and power grid operation guidelines, for example, 0.02 Hz. This threshold represents the acceptable upper limit of model prediction error.

[0099] During operation, the system continuously monitors the 5-minute moving average of the prediction residuals. Under normal operating conditions, this average should fluctuate slightly below the model inaccuracy threshold. When significant events occur that are not explicitly perceived by the model, such as changes in the grid topology (e.g., line maintenance), or the connection or disconnection of large generator units, the equivalent inertia and damping characteristics of the grid will change significantly, resulting in a drift in the grid operating conditions. This drift will render the original grid proxy model inaccurate, and its predicted frequency deviation trajectory will deviate continuously and significantly from the actual frequency deviation. Consequently, the moving average of the prediction residuals will continuously rise and eventually exceed the 0.02 Hz inaccuracy threshold.

[0100] Once the over-limit event is detected, the event-triggered update mechanism is immediately activated. The system determines that the current grid proxy model is inaccurate and immediately triggers the reconstruction process of the kernel function SHAP approximation algorithm. This reconstruction process first calls the online system identification module to update the equivalent inertia and damping coefficient of the grid proxy model using the latest grid response data. Subsequently, based on the residual disturbance power vector generated by the latest distributed energy output prediction, the system uses the updated grid proxy model and kernel function SHAP algorithm to recalculate the marginal contribution values ​​of each complementary voltage-stabilized virtual subgroup (subgroup A, subgroup B) and independent node (PV-2) to the PCC frequency deviation. The calculated new marginal contribution values ​​will replace the old values ​​and enter the subsequent nonlinear mapping stage, thereby generating a new set of virtual resistance and virtual inductance correction parameters that can adapt to the current actual grid operating conditions, and then sending them to each inverter for execution.

[0101] This event-triggered update mechanism endows the entire control model with self-correction and adaptive capabilities. By constructing a closed-loop feedback loop based on prediction residuals, it ensures that the grid proxy model, which serves as the core of contribution quantification, can always closely approximate the true dynamic characteristics of the grid. This mechanism avoids model failure caused by changes in grid operating conditions, guarantees the long-term accuracy of marginal contribution value quantification, and thus ensures the continuous effectiveness and reliability of the adaptive impedance control strategy in dynamically changing grid environments.

[0102] This embodiment provides a high-precision prediction model for distributed energy output. By constructing a power fluctuation probability envelope, identifying and aggregating power sources with negative correlation characteristics into complementary voltage-stabilizing virtual subgroups, and further utilizing a collaborative processing method that accurately quantifies the marginal contribution of residual disturbances of each subgroup to the grid frequency using the kernel function SHAP algorithm, this invention achieves a closed loop from macroscopic identification of complementary potential to microscopic source tracing of disturbance contributions. The model maps the quantified contribution values ​​to differentiated virtual impedance correction parameters through a nonlinear function and executes them in a hierarchical decoupled control architecture. This architecture can not only dynamically shape the electrical damping characteristics of each power source according to the disturbance contribution, but also proactively compensate for the adjustment cost through shared energy storage, while possessing the ability to cope with transient impacts and adaptively update the model. This overall design solves the fundamental problems of poor adaptability and inability to allocate damping on demand in traditional fixed-parameter control under weak grid environments, significantly improving the power quality and system operation stability of high-penetration distributed energy grid connection points.

[0103] Example 2:

[0104] This invention can also be applied to the stability control scenario of an industrial park-level microgrid. In this scenario, a high-tech industrial park located in a certain area is connected to the regional main grid through its internal microgrid system. The microgrid includes various types of distributed energy resources (DERs), including: a total of 20MW distributed photovoltaic arrays (labeled RFPV-1 and RFPV-2) covering the rooftops of multiple factory buildings, a 5MW small wind turbine (labeled SWT-1), and a 10MW gas-fired combined heat and power unit (labeled CHP-1). An 8MW / 16MWh battery energy storage system (BESS) is also deployed in the park to smooth out fluctuations. Due to the frequent start-up and shutdown of large industrial loads in the park, coupled with the randomness of renewable energy output, the point of common coupling (PCC) with the main grid faces severe voltage and frequency stability challenges.

[0105] To address this challenge, the specific implementation process of the high-precision prediction model for distributed energy output described in this invention in this scenario is as follows:

[0106] First, the model's data acquisition module gathers data from the local controllers and sensor networks of each distributed energy source. For RFPV-1 and RFPV-2, the acquired data includes their real-time three-phase voltage and current, panel temperature, and solar irradiance at multiple angles; for SWT-1, it acquires their real-time electrical data and nacelle wind speed; and for CHP-1, it acquires their real-time electrical data and operational status data such as gas input and power generation commands. These heterogeneous data, after time alignment and normalization preprocessing, are constructed into their respective multi-dimensional time-series feature matrices. Each matrix is ​​then input into a pre-defined probabilistic prediction neural network model based on a Long Short-Term Memory (LSTM) network. This model performs quantile regression calculations to output a power fluctuation probability envelope for each distributed energy source within the next 30-minute control cycle. The upper and lower bounds of this envelope are defined by the 95th and 5th quantile prediction trajectories, respectively.

[0107] Next, the model enters the stage of constructing a complementary voltage regulation virtual subgroup. The system extracts the trend center line (50th quantile trajectory) of the power envelope of each energy node and calculates the Pearson correlation coefficient between any two center line sequences within a 1-hour sliding time window. The calculation results may show that, under cloudy and windy weather conditions during the day, the output fluctuations of RFPV-1 and SWT-1 exhibit a significant negative correlation (e.g., a correlation coefficient of -0.7, less than the preset threshold of -0.3). Based on this, the system uses the DBSCAN clustering algorithm to aggregate {RFPV-1, SWT-1} into a "complementary voltage regulation virtual subgroup C". CHP-1, due to its relatively controllable output, does not have a stable negative correlation with other power sources; RFPV-2, due to its orientation or shading, has weak complementarity with SWT-1. Therefore, CHP-1 and RFPV-2 are considered independent disturbance units within this period. Subsequently, the model calculates the algebraic sum of the power envelopes within subgroup C, and removes the fluctuations (self-healing fluctuation components) that cancel each other out due to reverse output from the total power vector, thus obtaining the residual disturbance power vector that subgroup C actually injects into the grid and cannot suppress itself.

[0108] The model then initiates a contribution quantification process based on the kernel function SHAP approximation algorithm. Subgroups C, CHP-1, and RFPV-2, as three game participants, have their respective residual perturbation power vectors used to assess their impact on PCC frequency stability. A second-order power grid proxy model, which has been identified and calibrated online and includes PCC equivalent inertia and damping coefficients, is used to simulate PCC frequency deviation under different participant combinations. The kernel function SHAP algorithm calculates the change in the predicted PCC frequency deviation trajectory caused by the target participant (such as subgroup C) joining or leaving each alliance by traversing all possible participant alliances (such as {CHP-1}, {CHP-1, RFPV-2}, etc.). By weighted averaging all these changes, the model calculates an accurate marginal contribution value for subgroups C, CHP-1, and RFPV-2, for example, 0.75, 0.15, and 0.40, respectively.

[0109] Based on these marginal contribution values, the model generates differentiated virtual resistance and virtual inductance correction parameters using a nonlinear impedance sensitivity function based on an S-shaped growth curve. Since the contribution value of CHP-1 (0.15) is below the dead-zone threshold of 0.2, its impedance gain coefficient is 1.0 (no enhancement regulation is applied); the contribution values ​​of RFPV-2 (0.4) and subgroup C (0.75) are both within the effective regulation region and are mapped to impedance gain coefficients of 1.8 and 2.6, respectively. These coefficients are multiplied by the reference impedance value to generate the final correction parameters for each inverter.

[0110] Ultimately, the model executes control within a layered, decoupled closed-loop architecture. In the parameter optimization layer, newly generated virtual impedance correction parameters are sent to the underlying controllers of RFPV-1, SWT-1, CHP-1, and RFPV-2, reconstructing their equivalent output impedance and setting it as the new reference impedance operating point. Simultaneously, this layer calculates the total predicted power regulation deficit caused by the increased impedance, for example, a total of 3MW. In the energy balance layer, this 3MW deficit serves as a feedforward signal, instructing the BESS within the microgrid to release 3MW of active power to compensate, ensuring stable total power exchange at the PCC point. In the dynamic stability layer, the system continuously monitors the voltage and frequency change rate of the PCC. If the voltage change rate exceeds the limit due to the startup of a large device within the microgrid, this layer immediately superimposes an additional damping component proportional to the change rate onto the reference impedance of all inverters, generating a real-time execution impedance to rapidly suppress transient disturbances. Meanwhile, the entire contribution quantification process is supervised by an event-triggered update mechanism. Once the prediction residual of the power grid proxy model continues to exceed the limit, the model parameters will be reconstructed and the contribution value will be recalculated, ensuring the long-term adaptability of the control strategy to changes in power grid operating conditions.

[0111] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the scope of protection defined in the claims.

Claims

1. A high-precision prediction model for distributed energy output, characterized in that, include: The data processing module collects real-time operating data and environmental and equipment status data, and generates a power fluctuation probability envelope. The subgroup construction module calculates the negative correlation compensation characteristics of each power fluctuation probability envelope through a time-series sequence comparison algorithm, and constructs a complementary voltage-stabilized virtual subgroup. The contribution quantification module separates the residual disturbance power vector injected into the common coupling point by each complementary voltage-stabilized virtual subgroup. Based on the power grid proxy model and the kernel function SHAP approximation algorithm, it quantifies the marginal contribution value of the residual disturbance power vector to the frequency deviation of the common coupling point. The parameter generation module performs a nonlinear mapping on the marginal contribution value to generate virtual resistance and virtual inductance correction parameters; the parameter generation module is specifically configured as follows: A nonlinear impedance sensitivity function based on an S-shaped growth curve is constructed, and impedance adjustment dead zone threshold and saturation threshold are set. The marginal contribution value is substituted into the nonlinear impedance sensitivity function to calculate the impedance gain coefficient. The preset reference virtual resistance value and reference virtual inductance value are multiplied by the impedance gain coefficient to generate the virtual resistance and virtual inductance correction parameters of each distributed energy grid-connected interface. The impedance gain coefficient is positively correlated with the marginal contribution value, and the output damping of the grid-connected interface is increased proportionally according to the magnitude of the marginal contribution value. The closed-loop control module performs layered decoupled closed-loop correction based on virtual resistance and virtual inductance correction parameters; the parameter optimization layer reconstructs the equivalent output impedance based on the virtual resistance and virtual inductance correction parameters to set the reference impedance operating point and determine the predicted power regulation deficit; the dynamic stabilization layer generates the real-time execution impedance based on the reference impedance operating point according to real-time operating data; the energy balance layer generates and corrects the active power compensation command for shared energy storage based on the predicted power regulation deficit; the specific configurations of the dynamic stabilization layer and the energy balance layer in the closed-loop control module are as follows: In the dynamic stabilization layer: the voltage change rate and frequency change rate of the common connection point in the real-time operating data are monitored in real time; when the voltage change rate and frequency change rate exceed the preset safety threshold, an additional damping component proportional to the change rate is calculated, and the additional damping component is superimposed on the reference impedance operating point to generate the real-time execution impedance, and the output current is quickly shaped. At the energy balance layer: the predicted power regulation deficit is used as a feedforward power signal and input to the energy management unit of the central shared energy storage system connected to the common junction point; the feedforward power signal is modified by charging and discharging power limiting based on the real-time state of charge of the shared energy storage battery, the active power compensation command is generated, and the power throughput of the central shared energy storage system is controlled to balance the power fluctuations of the common junction point.

2. The high-precision prediction model for distributed energy output according to claim 1, characterized in that, The data processing module is specifically configured as follows: Three-phase voltage sampling data, three-phase current sampling data, and bus frequency sampling data of the distributed energy grid connection point are collected as the real-time operation data; photovoltaic panel temperature, horizontal irradiance, inclined irradiance, and wind turbine hub height wind speed are collected as the environmental and equipment status data. The generation of the power fluctuation probability envelope specifically includes: constructing a multi-dimensional time-series feature matrix containing the real-time operating data and environmental and equipment status data; inputting the multi-dimensional time-series feature matrix into a preset probability prediction neural network model; performing quantile regression calculation; outputting the quantile prediction value of the distributed energy output power within the future control cycle; selecting the highest quantile prediction trajectory as the upper bound; selecting the lowest quantile prediction trajectory as the lower bound; and generating the power fluctuation probability envelope.

3. The high-precision prediction model for distributed energy output according to claim 1, characterized in that, The specific configuration of the subgroup construction module is as follows: A sliding time window is set, and the trend center line sequence of each power fluctuation probability envelope within the sliding time window is extracted. The Pearson correlation coefficient between any two trend center line sequences is calculated, and distributed energy node combinations with Pearson correlation coefficients less than a preset negative correlation threshold are selected and determined to have the negative correlation compensation characteristic. The DBSCAN clustering algorithm is used to aggregate distributed energy nodes with negative correlation compensation characteristics into the same logical cluster, which is defined as the complementary voltage stabilization virtual subgroup. The algebraic sum of the power fluctuation probability envelopes of each node within the complementary voltage stabilization virtual subgroup is calculated, and the peak-valley difference component of the sum is defined as the self-healing fluctuation component. The self-healing fluctuation component is removed from the total power vector of the complementary voltage stabilization virtual subgroup to obtain the residual disturbance power vector.

4. The high-precision prediction model for distributed energy output according to claim 1, characterized in that, The contribution quantification module is specifically configured as follows: A reduced-order state-space equation describing the dynamic response of frequency deviation at the point of common coupling (PCC) to injected power is constructed based on the rotor motion equation of the power system. This equation serves as the power grid proxy model. The motion equation includes the equivalent inertia parameter of the PCC and the system damping coefficient. The residual disturbance power vector is input into the power grid proxy model, and the predicted trajectory of frequency deviation at the PCC is output. The complementary voltage-stabilized virtual subgroup is used as a game participant. The kernel function SHAP approximation algorithm is used to traverse the participant subset. For each target complementary voltage-stabilized virtual subgroup, the change in the predicted trajectory of frequency deviation when the target complementary voltage-stabilized virtual subgroup is added or removed is calculated. The marginal contribution value is obtained by weighted averaging of the changes.

5. The high-precision prediction model for distributed energy output according to claim 1, characterized in that, The parameter optimization layer in the closed-loop control module is specifically configured as follows: The virtual resistance and virtual inductance correction parameters are sent to the underlying control loop of the distributed energy source via a communication protocol. The stator voltage equation parameters in the underlying control loop are updated using the virtual resistance and virtual inductance correction parameters to establish an equivalent output impedance model defined by the virtual resistance and virtual inductance. The state of the equivalent output impedance model is set to the reference impedance operating point to realize the dynamic shaping of the electrical damping characteristics of the distributed energy source output port. The theoretical maximum output power of the distributed energy source is calculated based on the initial virtual resistance and initial virtual inductance values ​​before reconstruction, and the limited actual output power is calculated based on the reference impedance operating point. The difference between the theoretical maximum output power and the limited actual output power is calculated, and the difference is defined as the predicted power regulation deficit caused by the increase in impedance.

6. The high-precision prediction model for distributed energy output according to claim 4, characterized in that, The contribution quantification module is also configured with an event-triggered update mechanism for the kernel function SHAP approximation algorithm, specifically: The prediction residual between the actual frequency deviation of the point of common coupling and the predicted trajectory of the frequency deviation is calculated in real time; a model misalignment judgment threshold is set, and when the moving average of the prediction residual exceeds the model misalignment judgment threshold, it is determined that the current power grid operating condition has drifted. The reconstruction process of the kernel function SHAP approximation algorithm is immediately triggered. Based on the latest residual perturbation power vector, the marginal contribution value of each complementary voltage-stabilized virtual subgroup is recalculated, and the virtual resistance and virtual inductance correction parameters are updated.

Citation Information

Patent Citations

  • Adaptive virtual impedance based equipartition control method island of AC micro-grid power

    CN109728604A

  • Port green power virtual energy storage aggregation regulation and control method

    CN121097748A