Distributed swarm intelligence vertical and horizontal collaborative control method and device for heterogeneous micro-grid group
Patent Information
- Application Number
- CN202611234895.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-10-23
- Filing Date
- 2026-08-14
- Publication Date
- 2026-10-16
AI Technical Summary
当频率二次控制通道受到虚假数据注入攻击时,实际作用于DG的控制输入信号可能发生偏移,导致频率恢复性能下降,影响微电网稳定运行;
[0049]第一,在单微电网层面,本申请针对频率二次控制通道中存在的虚假数据注入攻击,设计了集成前馈神经网络的智能状态观测器,利用残差信号、残差变化率、频率跟踪偏差及控制器输出等多维信息,实现了对攻击信号的在线估计;通过将攻击估计值作为补偿项引入频率二次控制回路,有效抑制了攻击对实际控制输入的影响,提升了微电网在信息物理协同攻击场景下的安全运行能力。同时,所提出的事件触发通信机制使各DG仅在观测状态偏差累积达到设定阈值时才触发通信,相较于传统周期性通信方式,大幅减少了冗余信息交互,在保障协同控制精度的前提下有效节约了稀缺的通信资源。
Smart Images

Figure CN122931881A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart grid and distributed energy control technology, specifically to a distributed swarm intelligence vertical and horizontal collaborative control method and device for heterogeneous microgrid groups. Background Technology
[0002] With the widespread integration of distributed generation (DG) power systems, such as photovoltaic and wind power, microgrids are gradually becoming an important carrier for integrating distributed power sources, energy storage, and loads. To improve power supply reliability, energy utilization efficiency, and regional energy sharing capabilities, multiple microgrids can be interconnected through electrical and communication networks to form microgrid clusters. Actual microgrid clusters typically consist of heterogeneous units such as photovoltaic microgrids, wind power microgrids, and energy storage microgrids. Each microgrid differs in output characteristics, regulation capabilities, and operational constraints, making it difficult for existing methods to simultaneously address both stable operation within a single microgrid and collaborative optimization at the cluster level. Existing technologies mainly suffer from the following problems:
[0003] (1) Distributed secondary control of microgrids relies on information interaction between controllers, actuators and adjacent nodes. When the frequency secondary control channel is attacked by false data injection, the actual control input signal acting on the DG may be deviated, resulting in a decrease in frequency recovery performance and affecting the stable operation of the microgrid;
[0004] (2) Existing distributed control mostly adopts periodic communication. After the system approaches steady state, each node continues to exchange status information, which easily generates redundant communication and occupies limited communication bandwidth.
[0005] (3) Existing microgrid cluster control methods focus on power balance or a single economic indicator, making it difficult to comprehensively consider the energy utilization status, energy storage operation status and equipment operation constraints of different types of microgrids. This can easily lead to uneven distribution of regulation pressure among microgrids, making it difficult to achieve coordinated optimization and dynamic balance of cluster operation status. Summary of the Invention
[0006] The main objective of this application is to provide a distributed swarm intelligence collaborative control method for heterogeneous microgrids, comprising the following steps:
[0007] Step S10: Construct a two-layer control framework, which includes a distributed resilient secondary control layer at the single microgrid level and a distributed collective intelligent collaborative control layer at the heterogeneous microgrid cluster level.
[0008] Step S20: In the distributed resilient secondary control layer at the single microgrid level, a false data injection attack model is introduced into the frequency secondary control channel. The attack signal is estimated using an intelligent state observer with an integrated feedforward neural network. The attack estimate is introduced into the frequency secondary control loop as a compensation term. Communication is triggered based on the frequency error to achieve frequency recovery and active power ratio sharing within the single microgrid.
[0009] Step S30: In the distributed swarm intelligence collaborative control layer at the heterogeneous microgrid cluster level, local comprehensive operating status indicators of distributed power sources are constructed respectively, and microgrid-level comprehensive operating status indicators are obtained by aggregation by each microgrid master node; power adjustment amount is generated through information interaction between adjacent microgrid master nodes.
[0010] Step S40: The power adjustment amount is sent to the corresponding microgrid, and the power is allocated within the microgrid to achieve collaborative optimization and dynamic balance of the operating status at the heterogeneous microgrid cluster level.
[0011] In one embodiment, step S20 specifically includes:
[0012] A false data injection attack model is introduced into the secondary control channel of the distributed power supply frequency.
[0013] A smart state observer integrating a feedforward neural network is constructed to estimate the spurious data injection attack signal based on the frequency observation residual, residual change rate, frequency tracking deviation, and controller output without compensation between the actual frequency and the observed frequency.
[0014] A distributed secondary controller is constructed based on frequency estimates and attack estimates. Frequency recovery is achieved by employing a leader-led consensus tracking mechanism, and the attack estimate is introduced as a compensation term into the frequency secondary control loop. A leaderless consensus mechanism is employed to achieve consistent convergence of droop coefficient-weighted active power.
[0015] An event-triggered communication mechanism is constructed based on the frequency observation status, and each DG decides whether to trigger communication based on the frequency error status.
[0016] In one embodiment, the step of constructing an intelligent state observer integrating a feedforward neural network to estimate frequency states specifically includes:
[0017] Based on the frequency observation residual between the actual frequency and the observed frequency, the estimated attack value output by the feedforward neural network, and the control signal, the frequency estimate is calculated as follows:
[0018]
[0019] in, This is a frequency estimate. The attack estimate is the output of the feedforward neural network. The observer gain is set to dynamically stabilize the observation error; the frequency observation residual signal is defined as... and its corresponding rate of change .
[0020] In one embodiment, the step of estimating the fake data injection attack signal online by the feedforward neural network specifically includes:
[0021] The input layer of the feedforward neural network includes the residual signal and its rate of change, the tracking error of the frequency, and the uncompensated controller output; the output layer contains a neuron whose output is the estimated value of the corresponding attack signal. The calculation formula is as follows:
[0022]
[0023] in, and These are the weights from the input layer to the hidden layer and from the hidden layer to the output layer, respectively. and For the corresponding bias, For the hidden layer activation function, The estimated value for injecting attack signals into the spurious data in the i-th DG frequency secondary control channel.
[0024] In one embodiment, the workflow of the feedforward neural network includes offline training and online estimation, specifically including:
[0025] During the offline training phase, a frequency-secondary control channel model is constructed, and various types and amplitudes of fake data injection attacks and load disturbances are injected to generate a training dataset. The weights and biases of the feedforward neural network are trained using the error backpropagation algorithm, and the observer gain is designed to keep the observer error dynamically stable.
[0026] During the online estimation phase, the trained feedforward neural network and state observer are deployed on the local controller of each DG to collect input vectors in real time to calculate the attack estimate. The attack estimate is fed back to the state observer and introduced as a compensation term into the frequency quadratic control loop to compensate for the attack impact.
[0027] In one embodiment, the dynamic event triggering mechanism for the frequency error state specifically includes:
[0028] Define the local error of the i-th DG as Based on local frequency observations, neighbor node hold-up values, and rated frequency reference values, a frequency consistency error is constructed:
[0029]
[0030] in, Let i be the set of neighbors of the i-th DG. For communication topology adjacency weights; The traction coefficient is the reference value for the rated frequency; a dynamic trigger variable is introduced to dynamically adjust the communication trigger threshold. Its update rule is as follows:
[0031]
[0032] in, The initial value for the dynamically triggered variable. The attenuation coefficient is... For adjustment coefficients, This is the relative trigger coefficient;
[0033] Communication trigger time The event is determined by the following triggering conditions:
[0034]
[0035] When the above triggering conditions are not met, the i-th DG does not broadcast a new state, and the neighboring nodes continue to use the most recently received hold information. When the triggering condition is met, the i-th DG broadcasts the current frequency observation to its neighboring nodes. Active power information weighted by droop factor And update the corresponding hold value.
[0036] In one embodiment, step S30, in the distributed swarm intelligence collaborative control layer at the heterogeneous microgrid cluster level, specifically includes the step of constructing local integrated operating status indicators for distributed power sources and aggregating them by each microgrid master node to obtain the microgrid-level COSI, which includes:
[0037] Construct indicators for photovoltaic microgrids to reflect the economic cost of curtailment and the pressure on electrical operation;
[0038] Construct indicators for wind power microgrids to comprehensively quantify the wind curtailment cost and the electromechanical operating pressure of wind turbine units;
[0039] To construct an index for energy storage microgrids that comprehensively evaluate the state-of-charge health and operational losses of energy storage systems.
[0040] In one embodiment, the i-th power adjustment of the microgrid can be expressed as:
[0041]
[0042] in, This is the executable power adjustment amount that will ultimately be distributed to the i-th microgrid; and Let these represent the minimum and maximum power adjustment allowed for the i-th microgrid under its current operating state, respectively, satisfying... .
[0043] A distributed swarm intelligence collaborative control device for heterogeneous microgrid clusters, the device comprising:
[0044] The framework construction module constructs a two-layer distributed swarm intelligence collaborative control framework, which includes a distributed elastic secondary control layer at the single microgrid level and a distributed swarm intelligence collaborative control layer at the heterogeneous microgrid cluster level.
[0045] The intelligent state observer module integrating a feedforward neural network, in the distributed elastic secondary control layer at the single microgrid level, introduces a false data injection attack model into the frequency secondary control channel, uses the intelligent state observer integrating a feedforward neural network to estimate the attack signal, introduces the attack estimate as a compensation term into the frequency secondary control loop, and triggers communication based on the frequency error to achieve frequency recovery and active power ratio sharing within the single microgrid.
[0046] The power adjustment module, a distributed swarm intelligence collaborative control layer at the heterogeneous microgrid cluster level, constructs the Comprehensive Operational Status Index (COSI) of the DG, which is then aggregated by each microgrid master node to obtain the microgrid-level COSI; and generates power adjustment amounts through information interaction between adjacent microgrid master nodes.
[0047] The integrated optimization module sends the power adjustment amount to the corresponding microgrid, and the power is allocated within the microgrid to achieve collaborative optimization and dynamic balance of the operating status at the heterogeneous microgrid cluster level.
[0048] Therefore, this application has the following beneficial effects:
[0049] First, at the single microgrid level, this application addresses the issue of spurious data injection attacks in the frequency secondary control channel by designing an intelligent state observer integrating a feedforward neural network. Utilizing multi-dimensional information such as residual signals, residual change rates, frequency tracking deviations, and controller outputs, it achieves online estimation of the attack signal. By introducing the attack estimate as a compensation term into the frequency secondary control loop, the impact of the attack on the actual control input is effectively suppressed, enhancing the microgrid's safe operation capability under cyber-physical collaborative attack scenarios. Simultaneously, the proposed event-triggered communication mechanism ensures that communication is triggered only when the accumulated observation state deviation reaches a set threshold. Compared to traditional periodic communication methods, this significantly reduces redundant information exchange, effectively conserving scarce communication resources while ensuring the accuracy of collaborative control.
[0050] Secondly, at the heterogeneous microgrid cluster level, this application constructs COSIs (Cost of Injection) for three different types of microgrids—photovoltaic, wind power, and energy storage—incorporating multi-dimensional constraints such as the economic cost of curtailment, voltage deviation, speed deviation, state of charge deviation, and charge / discharge aging losses. These COSIs are then aggregated into a unified microgrid-level COSI through capacity weighting, solving the problem of quantifying and comparing the operating states of heterogeneous units on the same scale. Based on this, a lightweight communication method that only exchanges microgrid-level COSIs between adjacent microgrid master nodes, combined with power-COSI sensitivity direction discrimination and operational constraint limiting correction, achieves a reasonable allocation of power regulation tasks at the cluster level and a dynamic balance of the overall operating pressure of each microgrid.
[0051] Third, the two-layer control mechanism, which generates and distributes power adjustments through the cluster layer and allocates and executes them proportionally at the individual microgrid layer, is organically integrated. Cooperative optimization can be achieved solely through local information exchange between adjacent microgrid master nodes and distributed control within each microgrid, demonstrating good scalability and ease of engineering deployment. Simulation results show that this application can maintain frequency stability and power ratio sharing under attack conditions, and rapidly converge the overall operating state of the heterogeneous microgrid group from imbalance to uniformity, verifying its comprehensive advantages in security, communication efficiency, and cooperative optimization. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 This is a schematic diagram of the overall operation of a distributed swarm intelligence collaborative control method for heterogeneous microgrids.
[0054] Figure 2 This is a flowchart of the workflow of a distributed resilient secondary controller for a single microgrid.
[0055] Figure 3 This is the overall architecture diagram of a distributed swarm intelligence-based collaborative control method for heterogeneous microgrid clusters;
[0056] Figure 4 This is a frequency recovery response diagram of 7 DGs in a single microgrid under a false data injection attack;
[0057] Figure 5 This is a diagram showing the convergence process of droop-weighted active power of 7 DGs in a single microgrid;
[0058] Figure 6 This is a comparison chart of the actual FDI attack signal and the online FNN results in the frequency secondary control channel;
[0059] Figure 7 This is a comparison chart of local COSI regulation before and after adjustment in each DG within a heterogeneous microgrid group;
[0060] Figure 8 This is a comparison chart of microgrid-level COSI regulation before and after capacity-weighted aggregation. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0062] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.
[0063] To address the shortcomings of existing technologies, this application provides a distributed swarm intelligence collaborative control method for heterogeneous microgrid clusters, comprising steps S10 to S40. (Refer to...) Figure 1 , Figure 1 This is a system flowchart for a distributed, collaborative, and intelligent control method for heterogeneous microgrid clusters.
[0064] Step S10: Construct a two-layer control framework, which includes a distributed resilient secondary control layer at the single microgrid level and a distributed swarm intelligence collaborative control layer at the heterogeneous microgrid cluster level.
[0065] Step S20: In the distributed resilient secondary control layer at the single microgrid level, a false data injection attack model is introduced into the frequency secondary control channel. The attack signal is estimated using an intelligent state observer with an integrated feedforward neural network. The attack estimate is introduced into the frequency secondary control loop as a compensation term. Communication is triggered based on the frequency error to achieve frequency recovery and active power ratio sharing within the single microgrid.
[0066] Step S30: In the distributed swarm intelligence collaborative control layer at the heterogeneous microgrid cluster level, local comprehensive operating status indicators of distributed power sources are constructed respectively, and microgrid-level comprehensive operating status indicators are obtained by aggregation by each microgrid master node; power adjustment amount is generated through information interaction between adjacent microgrid master nodes.
[0067] Step S40: The power adjustment amount is sent to the corresponding microgrid, and the power is allocated within the microgrid to achieve collaborative optimization and dynamic balance of the operating status at the heterogeneous microgrid cluster level.
[0068] Specifically, in this embodiment, the steps of this application include:
[0069] Step S10: Construct a two-layer control framework, which includes a distributed resilient secondary control layer at the single microgrid level and a distributed swarm intelligence collaborative control layer at the heterogeneous microgrid cluster level.
[0070] Specifically, this application decouples the control problem of microgrid clusters vertically into two levels: the lower level is a distributed, resilient secondary control layer within a single microgrid, primarily responsible for frequency recovery and active power allocation; the upper level is a distributed, swarm intelligence-coordinated control layer at the heterogeneous microgrid cluster level, primarily responsible for coordinating the operational status and allocating power tasks among multiple heterogeneous microgrids. The advantage of this two-layer architecture lies in the fact that each microgrid in the lower layer independently maintains its own stable operation, while the upper layer only needs to exchange a small amount of aggregated state information between the microgrid master nodes, without needing to know the operational data of all distributed generation (DG) nodes within each microgrid. This reduces communication and computational burden while ensuring control accuracy. Furthermore, each level adopts a distributed control strategy, without relying on any centralized scheduling unit, exhibiting good robustness and scalability.
[0071] Step S20: In the distributed resilient secondary control layer at the single microgrid level, a false data injection attack model is introduced into the frequency secondary control channel. The attack signal is estimated using an intelligent state observer with an integrated feedforward neural network. The attack estimate is introduced into the frequency secondary control loop as a compensation term. Communication is triggered based on the frequency error to achieve frequency recovery and active power ratio sharing within the single microgrid.
[0072] Specifically, addressing the security vulnerability of the secondary frequency control channel of the distributed generation (DG) within a microgrid to spurious data injection attacks, this application treats the attack signal in the control channel as an unknown input. By constructing an intelligent state observer integrating a feedforward neural network, the residual signal and its rate of change between the actual and observed frequencies, the frequency tracking deviation, and the uncompensated secondary controller output are all used as inputs to the feedforward neural network. The neural network then outputs a real-time estimate of the attack signal online. This estimate is fed back to the observer to update the frequency state estimate and is also introduced into the secondary frequency control loop in a compensatory manner, effectively canceling out the superimposed attack components in the actual control input, thereby ensuring the accuracy and reliability of frequency recovery control. Simultaneously, each DG no longer exchanges state information with neighboring nodes at a fixed period; instead, communication is triggered based on event-triggered conditions designed according to frequency errors. This reduces redundant communication while ensuring the accuracy of coordinated control, effectively alleviating the problem of limited communication resources.
[0073] Step S30: In the distributed collective intelligent collaborative control layer at the heterogeneous microgrid cluster level, local comprehensive operating status indicators of distributed power sources are constructed respectively, and microgrid-level comprehensive operating status indicators are obtained by aggregation of each microgrid master node; power adjustment amount is generated through information interaction between adjacent microgrid master nodes.
[0074] Specifically, due to the fundamental differences in physical structure, operating mechanism, and constraint characteristics among photovoltaic, wind power, and energy storage microgrids, their operating states are difficult to directly compare using a unified physical quantity. Therefore, this application introduces two sub-indicators for photovoltaic DG: curtailment degree and grid connection point voltage deviation; for wind power DG: wind curtailment degree and turbine speed deviation; and for energy storage DG: state of charge deviation and charge / discharge aging loss. Adjustable weighting coefficients are configured for each sub-indicator to construct a dimensionless local COSI, allowing the operating pressure of various DG types to be quantitatively characterized on the same scale. Based on this, the master node of each microgrid weights and aggregates the local COSI according to the rated capacity of each internal DG to obtain the microgrid-level COSI, and uses the COSI imbalance error to characterize the overall operating pressure difference of this microgrid relative to adjacent microgrids. The introduction of the power-COSI sensitivity direction enables the cluster layer to correctly decide the positive or negative of power adjustment based on the influence direction of active power changes on COSI for different types of microgrids, avoiding blind adjustments that exacerbate local operating pressure.
[0075] Step S40: The power adjustment amount is sent to the corresponding microgrid, and the power is allocated within the microgrid to achieve collaborative optimization and dynamic balance of the operating status at the heterogeneous microgrid cluster level.
[0076] Specifically, the power adjustment amount generated by the cluster layer is limited and corrected after comprehensively considering the current available power limit of each microgrid, the state of charge safety boundary, and equipment operation constraints, ensuring that the power command is within the actual adjustable range of the microgrid. After the corrected power adjustment amount is sent to the master node of the corresponding microgrid, the distributed elastic secondary control layer within the microgrid distributes the adjustment task to the actuators of each DG according to the droop coefficient ratio of each DG, realizing the organic connection between the cluster layer's operational state balancing objective and the single microgrid layer's power sharing mechanism. Through the synergistic effect of the above steps S10 to S40, this application achieves the control objective of "stabilizing local conditions at the lower layer and adjusting global conditions at the upper layer," enabling heterogeneous microgrid clusters to simultaneously ensure the stable operation of single microgrids and the coordinated optimization and dynamic balance of the cluster's global operational state even under multiple challenges such as network attacks, limited communication resources, and heterogeneous collaborative constraints.
[0077] Further, in this embodiment, step S20 specifically includes:
[0078] A false data injection attack model is introduced into the secondary control channel of the distributed power supply frequency.
[0079] A smart state observer integrating a feedforward neural network is constructed to estimate the spurious data injection attack signal based on the frequency observation residual, residual change rate, frequency tracking deviation, and controller output without compensation between the actual frequency and the observed frequency.
[0080] A distributed secondary controller is constructed based on frequency and attack estimates. Frequency recovery is achieved using a leader-led consensus tracking mechanism, and the attack estimate is introduced as a compensation term into the frequency secondary control loop. A leaderless consensus mechanism is used to achieve consistent convergence of droop-weighted active power.
[0081] An event-triggered communication mechanism is constructed based on the frequency observation status, and each DG decides whether to trigger communication based on the frequency error status.
[0082] Specifically, in this embodiment, the distributed resilient secondary control layer at the microgrid level estimates spurious data injection attack signals in the frequency secondary control channel through an intelligent state observer integrating a feedforward neural network, and combines this with an event-triggered communication mechanism based on frequency error information to achieve frequency recovery and active power ratio sharing within the microgrid. This specifically includes:
[0083] A fake data injection attack model is introduced between the output of the secondary controller and the input of the actuator in DG frequency control.
[0084] A smart state observer integrating a feedforward neural network is constructed. Based on the residual signal between the actual frequency and the observed frequency, the rate of change of the residual signal, the frequency tracking deviation, and the output of the frequency secondary controller without compensation, the spurious data injection attack signal is estimated.
[0085] A distributed secondary controller is constructed based on frequency estimates and attack estimates. A leader-led consensus tracking mechanism is used to achieve frequency recovery, and the attack estimate is introduced as a compensation term into the frequency secondary control loop. A leaderless consensus mechanism is used to achieve active power sharing among the DGs.
[0086] An event-triggered communication mechanism is constructed based on frequency observation and error status, enabling each DG to decide whether to trigger communication based on changes in local frequency observation error, and to transmit frequency observation values and droop coefficient weighted active power information to neighboring nodes when triggered.
[0087] Each distributed generation (DG) within a single microgrid is modeled as a droop control unit. For the i-th DG, its frequency droop relationship is:
[0088]
[0089] in and Let be the output frequency and active power of the i-th DG, respectively. For frequency setpoint, This is the droop coefficient. In the secondary control layer, the input is controlled by frequency. and active power auxiliary control This is to achieve frequency restoration and active power sharing among all DGs.
[0090] Considering a spoofed data injection attack acting between the output of the frequency secondary controller and the input of the actuator, the attacked frequency control channel of the i-th DG is represented as:
[0091]
[0092] in, A model of attack signals injected by the attacker.
[0093] The control objective of the distributed elastic secondary control is:
[0094]
[0095]
[0096] in, This is the reference value for the system's rated frequency.
[0097] In one embodiment, the step of constructing an intelligent state observer integrating a feedforward neural network to estimate frequency states includes:
[0098] Based on the frequency observation residual between the actual frequency and the observed frequency, and the feedforward neural network input...
[0099] The estimated attack value and control signal are used to calculate the frequency estimate:
[0100]
[0101] in, This is a frequency estimate. The attack estimate is the output of the feedforward neural network. The observer gain is set to dynamically stabilize the observation error; the frequency observation residual signal is defined as... and its corresponding rate of change .
[0102] Specifically, in this embodiment, addressing the vulnerability of the distributed secondary frequency control channel of a microgrid to spoofed data injection attacks and inaccurate frequency state observations, an intelligent state observer integrating a feedforward neural network is constructed to achieve synchronous and accurate estimation of the system frequency state and attack signals. The core of the observer uses the actual acquired frequency, the controller output control signal, and the attack estimate output in real time by the feedforward neural network as inputs to construct a frequency estimation solution formula. This formula includes three core variables: the frequency estimate to be solved, the attack estimate output by the neural network, and the stabilized observer gain. After tuning, the observer gain ensures dynamic convergence and stability of the observation error throughout the process, suppressing observation drift from the ground up. The implementation process first defines two types of core error signals: one is the frequency observation residual formed by the difference between the actual frequency and the observed frequency; the other is the residual change rate over time. These two serve as key input features of the neural network, characterizing the disturbance traces of the attack on the frequency dynamics. During observation, sensors collect the true frequency of a single distributed generation (DG) and send it to the observation unit, simultaneously receiving the uncompensated original control signal from the secondary controller. An integrated feedforward neural network, relying on four-dimensional inputs including residuals, residual change rate, frequency tracking deviation, and the original controller output, outputs a real-time estimate of the spurious data injection attack. This estimate is used to iteratively update the frequency estimate in the observer and also serves as a compensation factor in the secondary control loop to offset the attack offset. This observer treats the unknown spurious data injection attack as an unmeasurable disturbance to the system. It uses a neural network to fit the disturbance online and then embeds a state observation closed loop to correct the frequency observation results. Unlike traditional linear observers that rely solely on system models, this observer can adapt to various unknown attack scenarios with multiple amplitudes and types. In the simulation, after a 12-second spurious data injection attack, the observer can quickly capture the residual mutation and simultaneously correct the frequency estimate, providing accurate state support for subsequent frequency consistency recovery and attack compensation control, ensuring stable and reliable frequency observation accuracy for a single microgrid under attack conditions.
[0103] In one embodiment, the step of estimating the fake data injection attack signal online by the feedforward neural network specifically includes:
[0104] The input layer of the feedforward neural network includes the residual signal and its rate of change, the tracking error of the frequency, and the uncompensated controller output; the output layer contains a neuron whose output is the estimated value of the corresponding attack signal. The calculation formula is as follows:
[0105]
[0106] in, and These are the weights from the input layer to the hidden layer and from the hidden layer to the output layer, respectively. and For the corresponding bias, For the hidden layer activation function, The estimated value of the spurious data injection attack signal in the i-th DG frequency secondary control channel.
[0107] Specifically, in this embodiment, an intelligent state observer integrating a feedforward neural network is constructed to estimate the frequency state of the i-th DG and the spoofed data injection attack signal. For the aforementioned dynamic model of the attacked frequency, the state observer is represented as:
[0108]
[0109] in, This is a frequency estimate. The attack estimate is the output of the feedforward neural network. Let the observer gain be denoted as . The frequency observation residual signal is defined as . and its corresponding rate of change .
[0110] For the i-th DG, the input vector for constructing its corresponding feedforward neural network is:
[0111]
[0112] When the frequency secondary controller is attacked, the attack signal will cause changes in the frequency observation residual and its rate of change. Simultaneously, the frequency tracking deviation reflects the impact of the attack on the frequency recovery target, and the output of the uncompensated frequency secondary controller characterizes the system's current normal control action. Therefore, the frequency observation residual, the rate of change of the residual, the frequency tracking deviation, and the output of the uncompensated frequency secondary controller can be used as inputs for attack signal estimation. The attack estimation is specifically expressed as follows:
[0113]
[0114] in, and These are the weights from the input layer to the hidden layer and from the hidden layer to the output layer, respectively. and For the corresponding bias, The activation function for the hidden layer is typically the sigmoid function or the hyperbolic tangent function. The estimated value of the spurious data injection attack signal in the i-th DG frequency secondary control channel.
[0115] In one embodiment, the workflow of the feedforward neural network includes offline training and online estimation:
[0116] In the offline training phase, a frequency-secondary control channel model is constructed, and various types and amplitudes of fake data injection attacks and load disturbances are injected to generate a training dataset. The weights and biases of the feedforward neural network are trained using the error backpropagation algorithm, and the observer gain is designed to keep the observer error dynamic stable.
[0117] During the online estimation phase, the trained feedforward neural network and state observer are deployed on the local controller of each DG to collect input vectors in real time to calculate the attack estimate. The attack estimate is fed back to the state observer and introduced as a compensation term into the frequency quadratic control loop to compensate for the attack impact.
[0118] Specifically in this embodiment, a frequency secondary control channel model is constructed during the offline training phase, and various types and amplitudes of fake data injection attacks and load disturbances are injected to generate a training dataset. The weights and biases of the feedforward neural network are trained using the error backpropagation algorithm, and the observer gain is designed to keep the observer error dynamically stable.
[0119] During the online estimation phase, the trained feedforward neural network and state observer are deployed on the local controller of each DG to collect input vectors in real time to calculate the attack estimate. The attack estimate is fed back to the state observer and introduced as a compensation term into the frequency quadratic control loop to compensate for the attack impact.
[0120] In one embodiment, the dynamic event triggering mechanism based on frequency error state specifically includes:
[0121] Define the local error of the i-th DG as Based on local frequency observations, neighbor node hold-up values, and rated frequency reference values, a frequency consistency error is constructed:
[0122]
[0123] in, Let i be the set of neighbors of the i-th DG. For communication topology adjacency weights; The traction coefficient is the reference value for the rated frequency; a dynamic trigger variable is introduced to dynamically adjust the communication trigger threshold. Its update rule is as follows:
[0124]
[0125] in, The initial value for the dynamically triggered variable. The attenuation coefficient is... For adjustment coefficients, This is the relative trigger coefficient;
[0126] Communication trigger time The event is determined by the following triggering conditions:
[0127]
[0128] When the above triggering conditions are not met, the i-th DG does not broadcast a new state, and the neighboring nodes continue to use the most recently received hold information. When the triggering condition is met, the i-th DG broadcasts the current frequency observation to its neighboring nodes. Active power information weighted by droop factor And update the corresponding hold value.
[0129] Specifically, in this embodiment, a dynamic event-triggered communication mechanism based on frequency observation status is constructed. For the i-th DG, let its communication triggering time sequence be... .in, This represents the time of the k-th communication trigger for the i-th DG. Between two adjacent trigger times, neighboring nodes maintain the frequency observation value of the most recent propagation of the i-th DG, i.e.
[0130]
[0131] in, The most recent valid frequency information of the i-th DG stored for neighboring nodes.
[0132] Define the local error of the i-th DG as And based on the frequency observations, neighbor node hold-up values, and rated frequency reference values, the frequency consistency error is constructed as follows:
[0133]
[0134] in, Let i be the set of neighbors of the i-th DG. For communication topology adjacency weights; The traction coefficient is the reference value for the rated frequency.
[0135] To dynamically adjust the communication triggering conditions, a dynamic trigger variable is introduced. Its update rule is as follows:
[0136]
[0137] in, The initial value for the dynamically triggered variable. The attenuation coefficient is... For adjustment coefficients, This is the relative triggering coefficient.
[0138] The parameters are selected based on frequency recovery performance, allowable communication errors, and communication resource constraints. Increase This can accelerate the decay of dynamic trigger variables, allowing trigger conditions to respond more quickly to current communication errors, but may increase the number of communications; reducing This can enhance the smoothness of the trigger threshold, which helps reduce frequent triggering. Increasing... It can improve the response speed of dynamic trigger variables to changes in frequency consistency errors and local communication errors, and reduce... This makes the change in the trigger threshold more gradual. Increasing... This can increase the allowable communication error range, thereby reducing the number of communications, but may increase the deviation between the maintenance information used by neighboring nodes and the current observation state; reducing This can improve the frequency of status information updates and the accuracy of coordinated control. The above parameters can be tuned in conjunction with the communication topology, system dynamic response, and allowable frequency deviation.
[0139] Therefore, the next communication trigger time for the i-th DG is defined as:
[0140]
[0141] When the above triggering conditions are not met, the i-th DG does not broadcast a new state, and the neighboring nodes continue to use the most recently received hold information. When the triggering condition is met, the i-th DG broadcasts the current frequency observation to its neighboring nodes. and active power information This allows each DG to communicate continuously at a fixed period, thereby reducing redundant communication.
[0142] Without attack compensation, the frequency controller of the i-th DG is , This is the frequency consistency control gain, and its value is determined based on the communication topology, frequency recovery speed, and allowable control input range.
[0143] The attack estimate output by the feedforward neural network is compensated into the frequency controller when the attack signal... When operating the secondary control channel of the frequency, the actual control input acting on the i-th DG is: When the attack estimate Approaching the signal of a real attack At that time, the control effects caused by the attack are compensated, thereby maintaining frequency consistency control and rated frequency recovery performance.
[0144] Furthermore, the active power sharing control shares the same communication triggering time as the aforementioned frequency event-triggered communication mechanism. Based on the local real-time active power and neighbor node maintenance information, the active power sharing error of the i-th DG is constructed. The corresponding active power sharing auxiliary control quantity is obtained as follows:
[0145]
[0146] in, This is to store the most recent valid weighted active power information of the neighboring nodes. This is the active power sharing control gain. Its value is selected based on the power sharing convergence rate.
[0147] like Figure 2 As shown, Figure 2 This is a flowchart illustrating the workflow of a distributed resilient secondary controller (DG) in a microgrid. After offline training, the feedforward neural network and state observer are deployed on the local controller of each DG. During system operation, the i-th DG collects the necessary information, and the state observer generates a frequency estimate. The controller calculates the secondary control input for the unattacked frequency based on local frequency observation information, the frequency information maintained by the most recent broadcast from neighboring nodes, and the rated frequency reference value. Meanwhile, based on frequency observation residuals residual change rate Frequency tracking deviation and the frequency secondary control input that is not under attack Construct the input vector of the feedforward neural network, and use the feedforward neural network to generate an estimate of the spoof data injection attack signal in the frequency secondary control channel. .
[0148] The attack estimate is introduced as a compensation term into the frequency secondary control loop to obtain the compensated frequency secondary control quantity. When the attack signal When superimposed between the output of the frequency secondary controller and the input of the actuator, the actual frequency control input acting on the i-th DG is: The attack estimate is simultaneously fed back to the state observer to update the frequency state estimate.
[0149] In one embodiment, step S30, in the distributed swarm intelligence collaborative control layer at the heterogeneous microgrid cluster level, specifically includes the step of constructing local comprehensive operating status indicators for distributed power sources and aggregating them by each microgrid master node to obtain a microgrid-level comprehensive operating status indicator, which includes:
[0150] Construct indicators for photovoltaic microgrids to reflect the economic cost of curtailment and the pressure on electrical operation;
[0151] Construct indicators for wind power microgrids to comprehensively quantify the wind curtailment cost and the electromechanical operating pressure of wind turbine units;
[0152] To construct an index for energy storage microgrids that comprehensively evaluate the state-of-charge health and operational losses of energy storage systems.
[0153] Specifically, in this embodiment, to uniformly characterize the operating status of different types of distributed generation (DG) in heterogeneous microgrids, dimensionless local COSIs are constructed for photovoltaic, wind power, and energy storage DGs respectively. The larger the COSI value, the higher the resource utilization loss, operating pressure, or equipment health risk of the corresponding DG; the smaller the COSI value, the better its operating status or the larger its adjustability margin.
[0154] For the i-th microgrid Suppose that its internal contents include There are 10 DGs of the same type. The local COSI of the l-th DG is denoted as . For photovoltaic (PV) distributed generation (DG), its local COSI is used to characterize the degree of underutilization of PV resources and electrical operating stress (calculated using voltage deviation), expressed as:
[0155]
[0156] in, , and These represent the maximum available power, actual output power, and rated active power under the current lighting conditions, respectively. For the corresponding bus voltage or grid connection point voltage, and These are the voltage reference value and the normalized reference value, respectively. In this embodiment, the reference value is taken as the reference voltage. The first item reflects the degree of light rejection, and the second item reflects the electrical operating pressure caused by the voltage deviating from the expected operating point.
[0157] For wind-powered DG, its local COSI is used to comprehensively consider the degree of underutilization of wind energy resources and the operating pressure of electromechanical equipment (calculated using turbine speed deviation), and is expressed as follows:
[0158]
[0159] in, , and These represent the maximum available power, actual output power, and rated active power under the current wind speed conditions, respectively. and The actual speed and rated speed of the wind turbine rotor are respectively displayed. The first item reflects the degree of wind curtailment, and the second item reflects the electromechanical operating pressure corresponding to the speed deviation.
[0160] For energy storage-type distributed generation (DG), its local COSI is used to comprehensively consider the degree of deviation from the state of charge and the charging and discharging operation losses, and is expressed as:
[0161]
[0162] in, The state of charge of energy storage DG, For an ideal state of charge, and These are the lower and upper limits of its safe operating state of charge, respectively. and These are the actual charge / discharge power and the rated charge / discharge power, respectively. This refers to the battery aging factor. The aging factor characterizes the impact of unit charge / discharge power on battery cycle life and can be set based on battery type, manufacturer's cycle life data, historical operating data, or empirical parameters. The first item reflects the health risks and reduced regulation margin caused by deviations from the ideal state of charge, while the second reflects the impact of current charge / discharge operations on battery cycle life.
[0163] All of the above weighting coefficients are non-negative and satisfy the following conditions: , and This ensures that the relative contributions of different sub-indicators within each local COSI are adjustable while maintaining consistent overall weights. For photovoltaic-type distributed generation (DG), when greater emphasis is placed on photovoltaic resource utilization and power generation revenue, the weight of the curtailment index can be appropriately increased. When greater emphasis is placed on grid connection voltage safety and the operating status of electrical equipment, the weight of the voltage deviation index can be appropriately increased. For wind-generated distributed generation (DG), when greater emphasis is placed on wind energy resource utilization, the weighting of wind curtailment indicators can be increased. When more attention is paid to fan speed deviation, mechanical transmission system operating status, and equipment protection, the weight of electromechanical operation pressure indicators can be increased. For energy storage-type distributed generation (DG), when greater emphasis is placed on the adjustability margin of the energy storage unit and the safety of its state of charge (SPC), the weight of the SPC deviation index can be increased. When focusing more on battery cycle life and charge / discharge losses, the weight of operational loss indicators can be increased. .
[0164] In one embodiment, the i-th power adjustment of the microgrid can be expressed as:
[0165]
[0166] in, This is the executable power adjustment amount that will ultimately be distributed to the i-th microgrid; and Let these represent the minimum and maximum power adjustment allowed for the i-th microgrid under its current operating state, respectively, satisfying... .
[0167] Specifically, in this implementation, the local COSI of each DG within the microgrid is aggregated using capacity weighting by the master node of the i-th microgrid, resulting in the microgrid-level COSI:
[0168]
[0169] in, For the i-th microgrid aggregated microgrid, the microgrid-level COSI is... The capacity weight of the l-th DG satisfies The capacity weight is determined based on the rated active capacity of each DG:
[0170]
[0171] DG with a large active power capacity has a significant impact on the overall output capacity and operating status of the microgrid, and therefore occupies a high weight in microgrid-level COSI aggregation.
[0172] Microgrid-level COSI (Active Power Indicator) is coupled with active power regulation, but the impact of active power changes on COSI may vary depending on the type of microgrid and its operating conditions. For example, increasing photovoltaic or wind power output can reduce curtailment losses, but it may also exacerbate voltage deviations or generator operating pressures; adjusting energy storage charging and discharging power will simultaneously affect the state of charge and battery operating losses. Therefore, the level of COSI alone cannot directly determine whether active power should be increased or decreased.
[0173] Therefore, the local power-COSI response direction of the l-th DG within the i-th microgrid is defined as follows: When the active power of the DG is increased, causing its local COSI to increase, take... When the active power is increased to reduce its local COSI, take When the impact of active power changes on local COSI is weak, or when the DG is close to the operating constraint boundary, take... .
[0174] The power-COSI sensitivity direction of the i-th microgrid is obtained by aggregating the local response directions of each internal DG by the master node:
[0175]
[0176] in, For the corresponding aggregate weights, satisfying and The aggregation weights can be determined based on the rated active power capacity and current adjustable power margin of the distributed generation (DG). DGs with larger active power capacity and higher adjustable power margins have higher weights; DGs approaching available power, state of charge, or equipment operating constraints have correspondingly lower weights. The aggregated weights... Used to characterize the overall influence direction of the active power of the i-th microgrid on its microgrid-level COSI.
[0177] Each microgrid master node constructs the COSI imbalance error of the i-th microgrid based on the microgrid-level COSI exchanged with neighboring microgrids:
[0178]
[0179] in, Let i represent the set of neighbors of the i-th microgrid. This represents the weight for communication between microgrids. When... When, it indicates that the overall operating pressure of the i-th microgrid is higher than that of its neighboring microgrids; when When, it indicates that the overall operating pressure of the i-th microgrid is lower than that of its neighboring microgrids.
[0180] To transform the COSI imbalance error into a cooperative adjustment effect, a cooperative adjustment signal is constructed:
[0181]
[0182] in, and These represent the proportional and integral adjustment gains for the COSI imbalance error, respectively. Further, combining the aforementioned coordinated adjustment signal and the microgrid-level power COSI sensitivity direction, the original power adjustment amount for the i-th microgrid is generated:
[0183]
[0184] in, Let be the initial power adjustment for the i-th microgrid. This is the power conversion factor, used to convert the COSI coordinated regulation signal into an active power adjustment. Its value can be determined based on the microgrid's rated active power capacity, current adjustable power margin, and operating constraints. Microgrids with larger capacities and higher adjustable margins can use a larger value. For microgrids with smaller capacity or close to the operational constraint boundary, a smaller value is used. In the above calculations, the COSI imbalance error is used to determine the relative level of operating pressure, the power-COSI sensitivity direction is used to determine the direction of active power adjustment, and the power conversion coefficient is used to determine the adjustment magnitude.
[0185] To ensure the executability of the power adjustment command, the original power adjustment amount is limited and corrected to obtain the final power adjustment amount sent to the i-th microgrid (received by the master node and subsequently shared proportionally):
[0186]
[0187] in, This is the executable power adjustment amount that will ultimately be distributed to the i-th microgrid; and Let these represent the minimum and maximum power adjustment allowed for the i-th microgrid under its current operating state, respectively, satisfying... .
[0188] For the i-th photovoltaic microgrid, its power adjustment should satisfy:
[0189]
[0190] in, and These represent the current total output power and the total available power under current lighting conditions for the microgrid, respectively.
[0191] For the i-th wind power microgrid, its power adjustment should satisfy:
[0192]
[0193] in, and These represent the current total output power and the total available power under the current wind speed conditions, respectively.
[0194] For the i-th energy storage microgrid, the state of charge of each energy storage unit within it should satisfy:
[0195]
[0196] The adjusted total charging and discharging power of the i-th energy storage microgrid satisfies:
[0197]
[0198] in, Let be the total charging and discharging power of all energy storage units within the i-th energy storage microgrid. and These are the maximum allowed total charging power and maximum total discharging power of the energy storage microgrid, respectively. (Convention) Indicates discharge. This indicates that the device is charging.
[0199] When the i-th microgrid master node receives the power adjustment amount sent by the cluster layer Subsequently, the internal control layer allocates the power according to the droop coefficient ratio of each DG, as detailed in the method design within a single-layer microgrid. When the power correction obtained by a DG according to the proportional allocation exceeds its operational constraints such as available power, state of charge, or charging / discharging power, the power correction of that DG is limited, and the remaining power adjustment is continued to be allocated proportionally among other DGs that meet the constraints.
[0200] Using the above method, the cluster layer determines the coordinated regulation effect based on the microgrid-level COSI differences, and generates executable power commands by combining the power-COSI sensitivity direction and operating constraints. This process does not require that the physical states of different types of microgrids be completely consistent, nor does it require that each microgrid have the same active power output. Instead, it achieves coordinated optimization and dynamic equilibrium of the operating state of heterogeneous microgrid clusters through a unified characterization of operating pressure and the redistribution of power regulation tasks.
[0201] like Figure 3 As shown, Figure 3 This is a diagram of the overall architecture for distributed, swarm intelligence, vertical and horizontal collaborative control of heterogeneous microgrid clusters. The heterogeneous microgrid clusters include photovoltaic microgrids, wind power microgrids, and energy storage microgrids, with each microgrid consisting of multiple DGs of the same type.
[0202] In the distributed resilient secondary control layer of a single microgrid, each distributed generation (DG) achieves frequency recovery and proportional active power sharing through local communication to maintain stable operation within the microgrid. In the distributed swarm intelligence collaborative control layer of a heterogeneous microgrid cluster, each microgrid master node aggregates the local COSIs of each DG within its cluster to obtain a microgrid-level COSI, and exchanges this microgrid-level COSI with neighboring microgrid master nodes. Each master node generates and corrects power adjustment amounts based on neighborhood COSI differences, power-COSI sensitivity direction, and the operational constraints of its own microgrid.
[0203] The constrained power adjustment is sent to the corresponding microgrid and distributed within the microgrid according to the droop coefficient ratio of each distributed generation (DG). The power adjustment is then executed by the corresponding secondary controller. Thus, lower-level control achieves frequency recovery and proportional power sharing within a single microgrid, while upper-level control achieves coordinated adjustment of overall operating pressure and power task allocation between heterogeneous microgrids. This framework eliminates the need for a centralized dispatcher, achieving coordinated optimization and dynamic equilibrium of the operating status of photovoltaic, wind power, and energy storage microgrids through local information exchange between microgrid master nodes and distributed control within the microgrid.
[0204] In this embodiment, an islanded AC microgrid simulation model consisting of 7 DGs is constructed. The rated frequency is 50 Hz, the simulation time is 35 s, the simulation step size is 0.002 s, and the spurious data injection attack is connected to the frequency secondary control channel at 12 s.
[0205] The output filter resistor and inductor of each DG are set to 0.03 Ω and 0.35 mH, respectively. To reflect the difference in DG capacity, the active power droop factor of DG1, DG3, and DG5 is set to 6.28 × 10⁻⁶. -5 The active power droop factor for DG2, DG4, DG6, and DG7 is set to 3.14 × 10⁻⁶. -5The line resistances and inductances of Lines 1 to 6 are set to (0.64 Ω, 2.32 μH), (1.28 Ω, 2.64 μH), (0.64 Ω, 1.32 μH), (0.51 Ω, 1.05 μH), (0.51 Ω, 1.05 μH), and (0.58 Ω, 1.21 μH), respectively.
[0206] In terms of the communication network, only DG1 can directly obtain the rated frequency. The adjacency matrix between DGs is A=[0 1 0 0 00 0;1 0 1 0 0 0 0;0 1 0 1 0 0 0;0 0 1 0 1 0 0;0 0 0 1 0 1 0;0 0 0 0 1 0 1;0 00 0 0 1 0]. The frequency control gain and active power sharing control gain are set as follows: and Regarding event-triggered communication parameters, the initial value of the dynamic trigger variable is set to... The dynamic variable decay coefficient is set to The dynamic variable adjustment coefficient is set to The relative trigger coefficient is set to Each DG is subjected to attack signals with different amplitudes and phases. Simulation results are as follows: Figures 4 to 6 As shown. By Figure 4 It can be seen that after the attack is injected for 12 seconds, the frequencies of each DG exhibit a short-term shift, which converges back to around 50 Hz under the action of frequency consistency control and attack compensation, indicating that the method can still achieve frequency recovery under attack conditions. Figure 5 It can be seen that the weighted active power of the droop coefficient of each DG gradually tends to be consistent, indicating that different DGs can achieve active power sharing. Figure 6 It can be seen that before the attack injection, the attack estimate output by the neural network remains near zero; after the attack injection, the estimate, after a brief adjustment, can track the positive or negative attack signals of different DGs. This result demonstrates that the feedforward neural network can utilize frequency observation residuals, residual change rates, frequency tracking bias, and uncompensated control input information to perform online estimation of non-consistent spoofing attacks.
[0207] In this embodiment, a microgrid cluster consisting of three heterogeneous microgrids is constructed. Among them, This is a photovoltaic microgrid, which contains two photovoltaic distributed grids, denoted as DG1-PV and DG2-PV respectively. This is a wind power microgrid, which contains two wind power DGs, denoted as DG3-WT and DG4-WT respectively; This is an energy storage microgrid, containing an energy storage distributed generation (DG), denoted as DG5-ESS. This embodiment is mainly used to verify the collaborative balancing effect of the cluster layer operation status.
[0208] The rated active power capacities of DG1-PV and DG2-PV are 560 kW and 440 kW, respectively, with corresponding capacity weights of 0.56 and 0.44. The rated active power capacities of DG3-WT and DG4-WT are 600 kW and 400 kW, respectively, with corresponding capacity weights of 0.60 and 0.40. The rated active power capacity of DG5-ESS is set at 500 kW, with a capacity weight of 1.
[0209] Based on the aforementioned method for constructing local COSI, the local COSI can be calculated by substituting the specific operating parameters of each DG into the corresponding formula. This section focuses on verifying the collaborative balancing effect at the cluster layer; therefore, specific parameters and intermediate calculation processes are not listed here. All types of local COSI adopt a dimensionless normalized form and a unified evaluation direction: a larger COSI indicates higher overall operating pressure, while a smaller COSI indicates a better operating state or greater adjustment margin.
[0210] Before adjustment, the local COSI values for DG1-PV, DG2-PV, DG3-WT, DG4-WT, and DG5-ESS were calculated to be 0.43, 0.29, 0.50, 0.33, and 0.18, respectively. After capacity-weighted aggregation, the microgrid-level COSI values were obtained as follows: .
[0211] During cluster-level collaboration, each microgrid master node exchanges microgrid-level COSI and determines the power adjustment direction according to the aforementioned power-COSI sensitivity direction discrimination method. It then generates and distributes power adjustment amounts for internal power allocation within each microgrid. After adjustment, the local COSIs of the five DGs become 0.42, 0.30, 0.40, 0.32, and 0.37, respectively. Further aggregation yields a microgrid-level COSI of 0.37 for all three microgrids. Figure 7 As shown, the local COSI of DG3-WT decreased from 0.50 to 0.40, indicating that its operating pressure was relieved; the local COSI of DG5-ESS increased from 0.18 to 0.37, indicating that it took on more regulation tasks using its own regulation margin. Figure 8 As shown, the microgrid-level COSI of the three microgrids was adjusted from 0.37, 0.43 and 0.18 before adjustment to about 0.37, realizing the coordinated balance of the overall operating status of the heterogeneous microgrid group.
[0212] Other embodiments or specific implementations of the distributed swarm intelligence collaborative control device for heterogeneous microgrids can be found in the above-described method embodiments, and will not be repeated here.
[0213] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0214] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0215] It is particularly important to note that, through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus the necessary general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0216] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A distributed swarm intelligence collaborative control method for heterogeneous microgrid groups, characterized in that, Includes the following steps: Step S10: Construct a two-layer control framework, which includes a distributed resilient secondary control layer at the single microgrid level and a distributed swarm intelligence collaborative control layer at the heterogeneous microgrid cluster level. Step S20: In the distributed resilient secondary control layer at the single microgrid level, a false data injection attack model is introduced into the frequency secondary control channel. The attack signal is estimated using an intelligent state observer with an integrated feedforward neural network. The attack estimate is introduced into the frequency secondary control loop as a compensation term. Communication is triggered based on the frequency error to achieve frequency recovery and active power ratio sharing within the single microgrid. Step S30: In the distributed swarm intelligence collaborative control layer at the heterogeneous microgrid cluster level, local comprehensive operating status indicators of distributed power sources are constructed respectively, and microgrid-level comprehensive operating status indicators are obtained by aggregation by each microgrid master node; power adjustment amount is generated through information interaction between adjacent microgrid master nodes. Step S40: The power adjustment amount is sent to the corresponding microgrid, and the power is allocated within the microgrid to achieve collaborative optimization and dynamic balance of the operating status at the heterogeneous microgrid cluster level.
2. The method according to claim 1, characterized in that, Step S20 specifically includes: A false data injection attack model is introduced into the secondary control channel of the distributed power source (DG) frequency. A smart state observer integrating a feedforward neural network is constructed to estimate the spurious data injection attack signal based on the frequency observation residual, residual change rate, frequency tracking deviation, and controller output without compensation between the actual frequency and the observed frequency. A distributed secondary controller is constructed based on frequency estimates and attack estimates. Frequency recovery is achieved by employing a leader-led consensus tracking mechanism, and the attack estimate is introduced as a compensation term into the frequency secondary control loop. A leaderless consensus mechanism is employed to achieve consistent convergence of droop coefficient-weighted active power. An event-triggered communication mechanism is constructed based on the frequency observation status, and each DG decides whether to trigger communication based on the frequency error status.
3. The method according to claim 2, characterized in that, The steps of constructing an intelligent state observer integrating a feedforward neural network to estimate the frequency state specifically include: Based on the frequency observation residual between the actual frequency and the observed frequency, the attack estimate output by the feedforward neural network, and the control signal, the frequency estimate is calculated as follows: ; in, This is a frequency estimate. The attack estimate is the output of the feedforward neural network. The observer gain is set to dynamically stabilize the observation error; the frequency observation residual signal is defined as... and its corresponding rate of change .
4. The method according to claim 2, characterized in that, The feedforward neural network, in its step of online estimation of spoofed data injection attack signals, specifically includes: The input layer of the feedforward neural network includes the residual signal and its rate of change, the tracking error of the frequency, and the uncompensated controller output; the output layer contains a neuron whose output is the estimated value of the corresponding attack signal. The calculation formula is: ; in, and These are the weights from the input layer to the hidden layer and from the hidden layer to the output layer, respectively. and For the corresponding bias, For the hidden layer activation function, The estimated value of the spurious data injection attack signal in the i-th DG frequency secondary control channel.
5. The method according to claim 2, characterized in that, The workflow of the feedforward neural network includes offline training and online estimation, specifically including: In the offline training phase, a frequency-secondary control channel model is constructed, and various types and amplitudes of fake data injection attacks and load disturbances are injected to generate a training dataset. The weights and biases of the feedforward neural network are trained using the error backpropagation algorithm, and the observer gain is designed to keep the observer error dynamic stable. During the online estimation phase, the trained feedforward neural network and state observer are deployed on the local controller of each DG to collect input vectors in real time to calculate the attack estimate. The attack estimate is fed back to the state observer and introduced as a compensation term into the frequency quadratic control loop to compensate for the attack impact.
6. The method according to claim 1, characterized in that, The dynamic event triggering mechanism for the frequency error state specifically includes: Define the local communication error of the i-th DG as Based on local frequency observations, neighbor node hold-up values, and rated frequency reference values, a frequency consistency error is constructed: ; in, Let i be the set of neighbors of the i-th DG. For communication topology adjacency weights; The traction coefficient is the reference value for the rated frequency; a dynamic trigger variable is introduced to dynamically adjust the communication trigger threshold. Its update rule is as follows: ; in, The initial value for the dynamically triggered variable. The attenuation coefficient is... For adjustment coefficients, This is the relative trigger coefficient; Communication trigger time The event is determined by the following triggering conditions: ; When the above triggering conditions are not met, the i-th DG does not broadcast a new state, and the neighboring nodes continue to use the most recently received hold information. When the triggering condition is met, the i-th DG broadcasts the current frequency observation to its neighboring nodes. Active power information weighted by droop factor And update the corresponding hold value.
7. The method according to claim 1, characterized in that, In step S30, the step of constructing the local integrated operating status index (COSI) of distributed power sources in the distributed swarm intelligence collaborative control layer at the heterogeneous microgrid cluster level, and aggregating it by each microgrid master node to obtain the microgrid-level COSI, specifically includes: Construct indicators for photovoltaic microgrids to reflect the economic cost of curtailment and the pressure on electrical operation; Construct indicators for wind power microgrids to comprehensively quantify the wind curtailment cost and the electromechanical operating pressure of wind turbine units; To construct an index for energy storage microgrids that comprehensively evaluate the state-of-charge health and operational losses of energy storage systems.
8. The method according to claim 1, characterized in that, The i-th power adjustment of the microgrid can be expressed as: ; in, This is the executable power adjustment amount that will ultimately be distributed to the i-th microgrid; and Let these represent the minimum and maximum power adjustment allowed for the i-th microgrid under its current operating state, respectively, satisfying... .
9. A distributed swarm intelligence collaborative control device for heterogeneous microgrid clusters, characterized in that, The device includes: The framework construction module constructs a two-layer distributed swarm intelligence collaborative control framework, which includes a distributed elastic secondary control layer at the single microgrid level and a distributed swarm intelligence collaborative control layer at the heterogeneous microgrid cluster level. The intelligent state observer module integrating a feedforward neural network, in the distributed elastic secondary control layer at the single microgrid level, introduces a false data injection attack model into the frequency secondary control channel, uses the intelligent state observer integrating a feedforward neural network to estimate the attack signal, introduces the attack estimate as a compensation term into the frequency secondary control loop, and triggers communication based on frequency error to achieve frequency recovery and active power ratio sharing within the single microgrid. The power adjustment module, a distributed swarm intelligence collaborative control layer at the heterogeneous microgrid cluster level, constructs local COSIs for each DG, which are then aggregated by the microgrid master nodes to obtain a microgrid-level COSI; and generates power adjustment amounts through information interaction between adjacent microgrid master nodes. The integrated optimization module sends the power adjustment amount to the corresponding microgrid, and the power is allocated within the microgrid to achieve collaborative optimization and dynamic balance of the operating status at the heterogeneous microgrid cluster level.