AI-based microgrid distributed collaborative control method
Patent Information
- Application Number
- CN202610206823.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-12
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-02-12
AI Technical Summary
这种将信息层与物理层割裂或简单等同的建模方式,导致控制策略在实际电气约束下可能表现不佳,或在通信受限时性能恶化
为拓扑图中的每条边赋予一个同时量化电气距离与通信时延的综合权重,构建出信息物理融合的微电网动态拓扑图。这一建模方式将影响控制性能的两个异质域关键参数统一在一个框架内。基于此综合权重,后续算法在信息聚合与决策过程中,能够自然区分不同连接的重要性,自动平衡电气耦合紧密性与通信实时性要求。控制策略的生成过程内在考虑了线路阻抗、功率交互强度以及数据传递延迟等多重实际约束,使得最终生成的输出指令更贴近物理系统的运行极限,增强了策略在实际执行时的可行性与鲁棒性,改善了系统在通信条件变化或电气参数波动时的动态调节品质。
Smart Images

Figure CN122001096B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent control technology for microgrids, specifically an AI-based distributed collaborative control method for microgrids. Background Technology
[0002] The stable and efficient operation of microgrids relies on the coordinated control of numerous distributed power sources within them. Existing coordinated control methods are mainly divided into two categories: centralized and distributed. Centralized control relies on a central controller to collect global information and perform optimization calculations, but it suffers from single-point-of-failure risks and has a heavy communication and computational burden, making it difficult to adapt to scenarios where distributed power sources are plug-and-play and topology varies. Distributed control, such as methods based on consensus protocols, where each node communicates only with its neighbors, offers higher reliability and scalability, and has become the mainstream research direction.
[0003] Existing distributed control schemes are typically based on simplified network models. Most methods design control laws solely based on the communication network topology, neglecting the differences in actual electrical coupling strength between nodes; others, while considering electrical connections, fail to incorporate the quality and latency of communication links into a unified analysis framework. This modeling approach, which separates or simplistically equates the information layer and the physical layer, can lead to poor performance of control strategies under actual electrical constraints or performance degradation when communication is limited. Furthermore, traditional distributed algorithms often rely solely on one-hop information from direct neighbors for decision-making, lacking the ability to perceive the state of a wider network area. When dealing with complex power fluctuations or local faults, they struggle to quickly coordinate network resources to achieve a globally optimal dynamic response. Summary of the Invention
[0004] This invention aims to solve at least one of the technical problems existing in the prior art; To this end, the present invention proposes an AI-based distributed cooperative control method for microgrids, comprising: Obtain the operational characteristic dataset of all distributed power generation nodes in the microgrid; The operational feature dataset is modeled as a graph structure, with each distributed power node modeled as a vertex in the graph structure, the electrical connections and communication links between nodes modeled as edges, and each edge is assigned a comprehensive weight reflecting electrical distance and communication delay, thus forming a dynamic topology graph of the microgrid. Local neighborhood features of each vertex are extracted from the dynamic topology graph of the microgrid. The local neighborhood features include the vertex's own operating feature data and the operating feature data of neighboring vertices connected by edges, forming a vertex feature vector. The vertex feature vectors of all vertices are input into a pre-trained graph neural network, which aggregates the information of each vertex and its multi-hop neighbors through multi-layer message passing and updates the hidden state vectors of all vertices. Based on the updated hidden state vectors of all vertices, a cooperative control policy is calculated for each vertex. The collaborative control strategy of each vertex is fed back to its corresponding distributed power source local controller for execution, thereby changing the output characteristics of the distributed power source. After a preset time interval, the running characteristic data of each node is re-collected and merged with the execution result of the previous moment to generate a new running characteristic dataset, which is used to start the next round of control loop.
[0005] Furthermore, graph structure modeling is performed on the runtime feature dataset, including: The operational feature dataset includes the node's output power, node voltage, local load, and energy storage status; Based on the physical wiring diagram and communication network structure of the microgrid, determine the connection relationship of the distributed power generation nodes; Calculate the impedance magnitude between any two electrically connected nodes and use it as the electrical distance weight; Measure or estimate the round-trip time of data packets between any two nodes that have a communication connection, and use it as a communication delay weight; The electrical distance weight and the communication delay weight are normalized and then linearly superimposed to obtain the comprehensive weight of the edge connecting the two nodes. Based on the comprehensive weights of all nodes, connections, and corresponding edges, the adjacency matrix and feature matrix of the microgrid dynamic topology graph are constructed.
[0006] Further, the local neighborhood features of each vertex are extracted from the dynamic topology graph of the microgrid, including: For each vertex in the dynamic topology graph of the microgrid, identify all neighboring vertices that are directly connected to it through edges; Read the vertex's own operational characteristic data; Read the operational feature data of all neighboring vertices and weight the operational feature data of neighboring vertices according to the comprehensive weight of the connecting edges; The vertex's own operational feature data is concatenated with the weighted operational feature data of its neighboring vertices to form the vertex feature vector.
[0007] Further, the step of inputting the vertex feature vectors of all vertices into the pre-trained graph neural network includes: Input the adjacency matrix of the microgrid dynamic topology graph and the vertex feature vector matrix of all vertices into the graph neural network; In each layer of the graph neural network, each vertex receives messages from its neighboring vertices via edges, processed by the hidden states of the neighboring vertices and the edge weights. Each vertex aggregates all received neighbor messages and merges them with its previous hidden state through a nonlinear transformation to update its hidden state vector; After a preset number of message passes and state updates, the final hidden state vector of all vertices is output.
[0008] Furthermore, the cooperative control policy calculated for each vertex based on the updated hidden state vectors of all vertices includes: The coordinated control strategy includes power reference value adjustment commands and voltage compensation commands; The final hidden state vector of each vertex is input into a fully connected policy network; The fully connected strategy network outputs continuous values in two dimensions, corresponding to the power reference value adjustment and voltage compensation, respectively. The power reference value adjustment amount is added to the current node output power to obtain the power reference value adjustment command; Add the voltage compensation amount to the current node voltage to obtain the voltage compensation command; The power reference value adjustment command and the voltage compensation command together constitute the collaborative control strategy of the vertex.
[0009] Furthermore, the step of feeding back the cooperative control strategy of each vertex to its corresponding distributed power local controller for execution includes: The power reference value adjustment command is sent to the power controller of the corresponding distributed power source to adjust the reference value of its power control loop; The voltage compensation command is sent to the voltage regulator of the corresponding distributed power source as an additional compensation signal for voltage droop control or reactive voltage control. The distributed power source local controller drives the converter through pulse width modulation based on the new reference value and compensation signal, thereby changing its output active and reactive power.
[0010] Furthermore, the step of re-collecting the operational feature data of each node after a preset time interval and merging it with the execution result of the previous moment to generate a new operational feature dataset includes: When the preset control cycle arrives, the output power, node voltage, local load and energy storage status of all distributed power nodes in the microgrid are collected synchronously. Obtain the actual completion rate of the power reference value adjustment command and voltage compensation command executed in the previous control cycle from each distributed power source local controller; The newly collected operational feature data is associated and merged with the actual completion data of the previous cycle's instructions by node to form a new operational feature dataset that includes historical action feedback.
[0011] Furthermore, the step of associating and merging the newly collected operational characteristic data with the actual completion data of the previous cycle's instructions by node also includes: Perform consistency checks on the new runtime feature dataset, checking whether the timestamps of the data on each node are synchronized and whether there are any outliers. Standardize the operational characteristic data that has passed the verification to eliminate the influence of different physical dimensions; The standardized data will be used as input for graph structure modeling in the next round of control loop.
[0012] Furthermore, the training method for the pre-trained graph neural network includes: Construct a historical dataset containing various typical operating and fault scenarios of microgrids; Using the historical dataset, with the optimization objectives of minimizing the global operating cost and voltage deviation of the microgrid, a deep reinforcement learning algorithm is used to train the parameters of the graph neural network and its fully connected strategy network offline. After training, the parameters of the graph neural network and its fully connected policy network are fixed for online distributed cooperative control.
[0013] Furthermore, the method also includes an exception handling mechanism: In each round of the control loop, the graph neural network simultaneously outputs the uncertainty evaluation value of the hidden state vector of each vertex; If the uncertainty assessment value of a vertex exceeds a preset confidence threshold, the vertex data or communication is determined to be abnormal. The system switches to the local preset conservative control mode of the abnormal vertex and notifies the neighboring vertices of the abnormal state through the message passing mechanism of the graph neural network, guiding the neighboring vertices to adapt to the abnormal situation of the abnormal vertex in the next round of calculation.
[0014] Compared with the prior art, the beneficial effects of the present invention are: Each edge in the topology graph is assigned a comprehensive weight that simultaneously quantifies electrical distance and communication delay, constructing a cyber-physical fusion microgrid dynamic topology graph. This modeling approach unifies the key parameters of two heterogeneous domains affecting control performance within a single framework. Based on this comprehensive weight, subsequent algorithms can naturally distinguish the importance of different connections and automatically balance the tightness of electrical coupling with the real-time requirements of communication during information aggregation and decision-making. The generation process of the control strategy inherently considers multiple practical constraints such as line impedance, power interaction strength, and data transmission delay, making the final generated output command closer to the operating limits of the physical system. This enhances the feasibility and robustness of the strategy during actual execution and improves the dynamic adjustment quality of the system when communication conditions change or electrical parameters fluctuate.
[0015] By employing a pre-trained graph neural network and its multi-layered message passing mechanism, each distributed power node can iteratively exchange and integrate information with its neighbors. Each layer of transmission extends the information perception range outward by one hop. Through multi-layer stacking, the hidden state vector ultimately formed by each node essentially encodes the operational status and topological characteristics of its multi-hop neighborhood and even the global network. This allows each local controller to make decisions based on more than just the direct neighbor states in traditional methods when calculating its own control strategy, incorporating richer spatiotemporal correlation information of the network. Local control actions generated based on this wide-area situational awareness inherently possess global coordination characteristics, enabling more effective suppression of power oscillations across the entire network, optimization of power flow distribution, and, in the event of failure of some nodes, driving other nodes to make coordinated and mutually supportive responses. Thus, while maintaining the distributed architecture, it approaches the overall performance of centralized optimization. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the steps of the AI-based distributed collaborative control method for microgrids described in this invention. Figure 2 The flowchart for extracting vertex feature vectors. Detailed Implementation
[0017] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] See Figure 1 The specific implementation method of the AI-based distributed collaborative control method for microgrids is as follows: The overall implementation scheme of this method is as follows: Obtain the operating characteristic dataset of all distributed generation nodes in the microgrid. Perform graph structure modeling on the operating characteristic dataset, modeling each distributed generation node as a vertex in the graph structure, and modeling the electrical connections and communication links between nodes as edges. Assign a comprehensive weight reflecting electrical distance and communication delay to each edge, forming a dynamic topology graph of the microgrid. Extract local neighborhood features from the dynamic topology graph of the microgrid. Local neighborhood features include the vertex's own operating characteristic data and the operating characteristic data of neighboring vertices connected by edges, forming a vertex feature vector. Input the vertex feature vectors of all vertices into a pre-trained graph neural network. The graph neural network aggregates the information of each vertex and its multi-hop neighbors through multi-layer message passing, updating the hidden state vectors of all vertices. Based on the updated hidden state vectors of all vertices, calculate a cooperative control strategy for each vertex. Feed back the cooperative control strategy of each vertex to its corresponding distributed generation local controller for execution, changing the output characteristics of the distributed generation. After a preset time interval, re-collect the operating characteristic data of each node and merge it with the execution result of the previous time step to generate a new operating characteristic dataset, which is used to start the next round of control loop.
[0019] In one embodiment of the present invention, see [reference] Figure 2 In practical implementation, the operational characteristic dataset is collected by measurement units and local controllers deployed at each distributed power node. Node output power is the current active power output measured in kilowatts (kW); node voltage is the effective voltage value measured at the point of common coupling (PCC) in volts; local load is the total active power measurement of the downstream loads of the node in kilowatts; and energy storage state is the current state of charge of the energy storage device, a dimensionless value between 0 and 1. Based on the microgrid's physical wiring diagram and communication network link configuration table, the connection relationships between distributed power nodes can be clearly defined. The physical wiring diagram defines whether electrical connections exist between nodes, and the communication network structure defines whether direct data communication links exist between nodes.
[0020] The impedance magnitude between any two electrically connected nodes is calculated as the electrical distance weight. This impedance magnitude is obtained through offline network parameter identification or online impedance measurement and is a real number in ohms. The round-trip time of data packets between any two communicatively connected nodes is measured as the communication delay weight. This round-trip time is obtained through timestamp protocols measured at the network communication layer and is measured in milliseconds. In practice, both the electrical distance weight and the communication delay weight need to be normalized to eliminate the influence of dimensions and limit their numerical range. Normalization uses a maximum-minimum method to linearly transform the original weight data to the interval between 0 and 1. Linear superposition uses a weighted sum, and the combined weight of the edge connecting two nodes is calculated using the following formula: in: Represents a node With nodes The combined weight of the edges between them. This represents the normalized electrical distance weights. This represents the normalized communication delay weight. and It is a pre-defined non-negative coefficient, and satisfies... Based on all nodes, the connections between nodes, and the calculated comprehensive weight of each edge, an adjacency matrix is constructed for the dynamic topology of the microgrid. The adjacency matrix is a... The square formation, It represents the total number of distributed power nodes and matrix elements. If node With nodes If there is no direct connection, then The feature matrix is composed of row-stacked feature data vectors of all nodes, and is a... The matrix, It is the dimension of the feature data that each node runs.
[0021] In some embodiments, for each vertex in the dynamic topology graph of a microgrid, the process of identifying its neighboring vertices involves querying the row or column corresponding to the vertex's index in the adjacency matrix. The vertex indices corresponding to all non-zero elements are the neighboring vertices directly connected by edges. Reading the vertex's own operational feature data involves indexing and extracting the data vector of the corresponding row from the feature matrix. Similarly, reading the operational feature data of all neighboring vertices involves extracting the corresponding row data vector from the feature matrix using an index, and then scalar-weighting the operational feature data vector of each neighboring vertex according to the comprehensive weight of the corresponding edges stored in the adjacency matrix. The weighting operation involves multiplying each element in the data vector by the comprehensive weight of that edge. Finally, the vertex's own operational feature data vector is sequentially concatenated with the weighted operational feature data vectors of all neighboring vertices along the feature dimension to form a longer feature vector, which constitutes the vertex's feature vector.
[0022] In practical implementation, the adjacency matrix of the microgrid's dynamic topology graph and the vertex feature vector matrices of all vertices are input into a multi-layered graph neural network. In each layer of the graph neural network, the computation process is performed in parallel on a vertex-by-vertex basis. Each vertex receives messages from all its neighboring vertices via edges. The message content is the result of a learnable linear transformation of the neighboring vertex's current hidden state vector, which is then multiplied by the combined weight of the connecting edges. Each vertex aggregates all received neighbor messages using a summation or averaging algorithm, concatenating the aggregated message vector with its own previous hidden state vector. The concatenated vector undergoes a nonlinear transformation consisting of a fully connected layer and an activation function. This nonlinear transformation fuses information from neighbors with the vertex's own historical state, thereby updating and generating a new hidden state vector for the vertex. After a predetermined number of message passing and state updates, the graph neural network outputs the final hidden state vector obtained by all vertices after the last layer update. It can be understood that the number of message passing layers in the graph neural network determines the number of neighbor hops each vertex can aggregate information from; a two-layer graph neural network allows a vertex to aggregate information from its two-hop neighbors.
[0023] In some embodiments, the calculation of the comprehensive weights can be configured in different ways. Optionally, the coefficients... and The value can be dynamically adjusted according to the current operating mode of the microgrid. When the microgrid is operating in grid-connected mode, the reliability of communication is more important, and it can be set... Greater than When a microgrid operates in islanded mode, the strength of the electrical connections has a greater impact on stability, and settings can be configured accordingly. Greater than Optionally, for node pairs that do not have a communication link but are electrically connected, their communication delay weights can be adjusted. This can be set to a constant much larger than the measured communication delay, thus reflecting communication constraints in the overall weighting. It can be understood that the constructed adjacency matrix is a symmetric matrix, reflecting the bidirectional nature of electrical connections and communication links. In a specific implementation, taking a microgrid with four distributed power nodes as an example, the four nodes are a photovoltaic inverter node, a wind turbine inverter node, an energy storage converter node, and a diesel generator node. The measured output power values of the four nodes constitute part of the operational characteristic data: the photovoltaic inverter node output power is 80 kW, the wind turbine inverter node output power is 50 kW, the energy storage converter node output power is -30 kW, and the diesel generator node output power is 100 kW.
[0024] The impedance magnitudes between nodes were calculated, with an electrical distance weight of 0.5 ohms between the photovoltaic (PV) and energy storage (ESS) nodes, and 0.3 ohms between the ESS and diesel generator nodes. The round-trip time of data packets between nodes was measured, with a communication delay weight of 2 milliseconds between the PV and ESS nodes, and 1 millisecond between the ESS and diesel generator nodes. After normalization and linear superposition, the combined weight of the edge between the PV and ESS nodes was 0.65, and the combined weight of the edge between the ESS and diesel generator nodes was 0.45. The constructed... In the adjacency matrix, the elements at corresponding positions represent the calculated comprehensive weights. When extracting local neighborhood features of the energy storage converter node, its neighboring vertices are identified as photovoltaic inverter nodes and diesel generator nodes. The operating feature vector of the energy storage node itself is read, and the operating feature vectors of the photovoltaic node and the diesel generator node are read separately. A comprehensive weight of 0.65 is used to weight the feature vector of the photovoltaic node, and a comprehensive weight of 0.45 is used to weight the feature vector of the diesel generator node. The energy storage node's own feature vector is then concatenated with the two weighted neighbor feature vectors to form the vertex feature vector of the energy storage node. The vertex feature vector matrices of all four vertices and the adjacency matrix are fed into the graph neural network. After three layers of message passing, four updated final hidden state vectors are output.
[0025] In one embodiment of the present invention, the cooperative control strategy includes a power reference value adjustment command and a voltage compensation command. The power reference value adjustment command is a signal used to correct the active power output target of the distributed power source, and the voltage compensation command is a signal used to correct the voltage control target of the distributed power source. The final hidden state vector of each vertex is input into a fully connected policy network. The final hidden state vector is a multi-dimensional real vector output by the last layer of the graph neural network. The fully connected policy network is a neural network module composed of multiple linear layers and nonlinear activation functions. The fully connected policy network outputs continuous values in two dimensions, which correspond to the power reference value adjustment and voltage compensation, respectively. The unit of the power reference value adjustment is kilowatts or per unit, and the unit of the voltage compensation is volts or per unit. The power reference value adjustment and voltage compensation are calculated through the forward propagation of the fully connected policy network. The calculation process can be expressed as follows: in: Indicates a vertex The corresponding power reference value adjustment amount for the distributed power node. Indicates a vertex The voltage compensation amount of the corresponding distributed power node. The nonlinear mapping function representing a fully connected policy network. Representing the vertex The final hidden state vector, with superscript This represents the total number of layers in the graph neural network.
[0026] The power reference value adjustment is added to the current node's output power to obtain the power reference value adjustment command. The specific operation is as follows: in: It is the vertex The corresponding new power reference value command, It is the vertex The corresponding distributed power node's output power is measured at the current moment. The voltage compensation amount is added to the current node voltage to obtain the voltage compensation command. The specific operation is as follows: ,in It is the vertex The corresponding new voltage compensation command, It is the vertex The corresponding distributed power node's current measured node voltage. The power reference adjustment command and the voltage compensation command together constitute the vertex's cooperative control strategy, which is a command pair containing two specific control parameters.
[0027] In some embodiments, a power reference value adjustment command is sent to the power controller of the corresponding distributed power source. The power controller is a closed-loop control module in the local controller responsible for regulating the active power output. Adjusting the reference value of the power control loop involves sending a new power reference value command. The setpoint is set as the outer loop reference value for the power control loop. A voltage compensation command is sent to the voltage regulator of the corresponding distributed power source. The voltage regulator is a closed-loop control module in the local controller responsible for regulating the output voltage. The voltage compensation command serves as an additional compensation signal for voltage droop control or reactive power voltage control. This additional compensation signal means that the command value will be algebraically superimposed on the voltage reference value or direct voltage setpoint generated by the droop control curve. Based on the new reference value and the compensation signal, the local controller of the distributed power source drives the converter through pulse width modulation (PWM) to change its output active and reactive power. PWM is the step that converts the control signal into a driving signal for the switching devices. The converter is a power electronic device that performs power conversion.
[0028] It can be understood that the power reference value adjustment command directly affects the active power control outer loop, while the voltage compensation command affects the voltage control loop. Both are issued independently but jointly influence the final output of the converter. In specific implementation, following the aforementioned examples regarding microgrid dynamic topology construction, local neighborhood feature extraction, and graph neural network message passing, the final hidden state vector of the energy storage converter node is: ,Will The input is a fully connected policy network, which calculates and outputs two scalar values, for example... kilowatt, Volts. Output power measured at the current moment at the energy storage converter node. The measured node voltage is -30 kW. The voltage is 380.5 volts. The new power reference value command is obtained by adding the power reference adjustment to the current output power. kilowatts. The voltage compensation amount is added to the current node voltage to obtain a new voltage compensation command. Volts. By kilowatts and The command pair consisting of volts constitutes the coordinated control strategy for the energy storage converter node. The power reference value adjustment command is sent to the power controller of the energy storage converter, updating its outer-loop power reference value from the original value to -24.8 kW. The voltage compensation command is sent to the voltage regulator of the energy storage converter as an additional compensation for its voltage droop control. Based on the new power reference value of -24.8 kW and the compensated voltage command, the local controller of the energy storage converter calculates and generates a new pulse width modulation signal through its internal current loop. This signal drives the insulated-gate bipolar transistor switches of the three-phase converter, thereby changing the amount of active power absorbed by the energy storage system from the AC bus and fine-tuning its output reactive power, achieving the coordinated control objective.
[0029] Optionally, the output layer activation function of the fully connected strategy network can be a hyperbolic tangent function, which limits the output power reference adjustment and voltage compensation within a certain range, for example... , , and These are limits set according to the safe operating range of the equipment. In some embodiments, power reference value adjustment commands and voltage compensation commands can be issued in the form of digital communication messages, which include target node identifier, command type, command value, and timestamp information. Optionally, for systems adopting a DC microgrid architecture, the voltage compensation command corresponds to the DC bus voltage compensation amount, and its generation and execution logic is similar to that of an AC system. It can be understood that the local controller needs a certain dynamic response time to execute new commands, and there is a transition process between the issuance of the command and the converter output power reaching a new steady state.
[0030] In one embodiment of the invention, the arrival of the preset control period is triggered by the microgrid central coordinator or a time synchronization protocol between distributed nodes. The typical value of the preset control period is in the range of hundreds of milliseconds to seconds. The output power, node voltage, local load, and energy storage status of all distributed power generation nodes in the microgrid are synchronously collected. This synchronous collection relies on the measurement units deployed at each node having a unified time reference, which can be obtained through a Global Positioning System (GPS) clock or a precision clock synchronization protocol. Output power is collected by measuring the instantaneous or periodic average value of active power at the point of common coupling (PCC) between the distributed power generation and the grid. Node voltage is collected by measuring the effective voltage value at the PCC. Local load is collected by measuring the total active power downstream of the node. Energy storage status is collected by reading the state of charge (SOC) value reported by the battery management system.
[0031] The local controllers of each distributed power source obtain the actual completion rate of the power reference value adjustment command and voltage compensation command executed in the previous control cycle. The actual completion rate is the difference or proportion between the command set value and the actual execution result. After the command execution cycle ends, the local controller records the actual output power value of the power reference value adjustment command. and the actual output voltage value of the voltage compensation command and with instruction value and Comparison calculations are performed.
[0032] The newly acquired operational feature data is correlated and merged with the actual completion data of the previous cycle's instructions, node by node. Correlation is achieved by matching data from different sources using unique node identifiers. The merging operation constructs an enhanced feature vector for each node, which includes not only the measurement data at the current moment but also feedback information on the effectiveness of the control actions executed at the previous moment. For each node... Its new operational feature data vector The construction process can be expressed by the formula: in: Indicates the current time Collection nodes 'output power' Indicates the current time Collection nodes node voltage, Indicates the current time Collection nodes Local load, Indicates the current time Collection nodes The energy storage status, Indicates the previous moment The actual completion rate of the power reference value adjustment command. Indicates the previous moment The actual completion rate of voltage compensation commands. The calculation method is as follows , The calculation method is as follows ,here and It is the measurement value at the beginning of the previous control cycle. and This is the adjustment instruction value issued in the previous cycle. The enhanced feature vectors of all nodes together constitute a new runtime feature dataset containing historical action feedback.
[0033] In some embodiments, a consistency check is performed on the new operational feature dataset. The consistency check verifies whether the timestamps of the data from each node are synchronized. The method involves calculating the maximum difference in timestamps across all data packets and comparing it to a preset synchronization tolerance threshold. If the maximum time deviation exceeds the tolerance threshold, the batch of data is discarded or a data retransmission is requested. The consistency check also checks for outliers. This is done using either a statistical thresholding method or a method based on the correlation between adjacent node data. The statistical thresholding method sets a reasonable physical range for each data dimension, marking data outside this range as outliers. The correlation-based method leverages the characteristic that adjacent node data in a microgrid network topology typically exhibits similar trends, marking data that clearly violates this trend. The operational feature data that passes the check is then standardized using Z-score normalization to eliminate the influence of different physical dimensions. The standardized transformation formula for each feature dimension is: in: These are the original eigenvalues. It is the mean of this feature dimension calculated across the entire training dataset or long-term historical data. That is the corresponding standard deviation. These are the standardized values. The standardized data is used as input for graph structure modeling in the next control loop. The standardized data has zero mean and unit variance, which is beneficial for stable training and fast convergence of the graph neural network.
[0034] Understandably, the introduction of actual completion data enables the control system to possess closed-loop feedback learning capabilities. The system can perceive the execution effect of the actions in the previous control cycle and input it as part of the state into the decision-making of the next cycle. In specific implementation, a control cycle is set to 500 milliseconds. When the clock signal triggers the start of a new cycle, the data acquisition unit synchronously reads the real-time data of the four distributed power nodes. The current output power of the photovoltaic inverter node... 85 kW, node voltage It is 382.1 volts, and its local load is The power rating is 10 kW, and energy storage mode is not applicable. The actual output power of the power reference value adjustment command from the previous cycle is read from the local controller of the photovoltaic inverter. The actual output voltage of the voltage compensation command is 84.8 kW. It is 381.9 volts. The measured value of the photovoltaic node at the start of the previous cycle is... kilowatt, Volt, the issued instruction value is kilowatt, Volts. The actual completion rate is calculated. , The new operational characteristic data vector for photovoltaic nodes is: The energy storage status field is filled with 0s. After similar processing and matrix formation of the data from all nodes, a consistency check is performed. Assuming the maximum timestamp deviation across all nodes is 2 milliseconds, which is less than the set 10-millisecond tolerance threshold, the data is accepted. After no outliers are found during the check, Z-score standardization is performed on all feature dimensions. The mean value required for standardization is... and standard deviation The data is derived from offline historical data statistics. The standardized data matrix is passed to the next control loop to reconstruct the graph structure and initiate new collaborative strategy calculations.
[0035] Optionally, the actual completion rate can also be calculated using the form of absolute error, for example... This refers to the deviation between the actual final value and the target value of the instruction. In some embodiments, for nodes where the precise actual completion rate cannot be obtained, the instruction issuance value can be used as an estimate, or the historical action feedback field of the node can be set to zero. Optionally, the standardization process can also employ a min-max scaling method to linearly transform the data to the [0,1] interval. It is understood that the threshold or correlation parameter for outlier detection in consistency verification needs to be tuned according to the specific microgrid scale and operating characteristics.
[0036] In one embodiment of the present invention, the training method for the pre-trained graph neural network includes constructing a historical dataset containing various typical microgrid operating scenarios and fault scenarios. The historical dataset originates from long-term simulation operation records of a microgrid simulation platform or archived historical operation data of an actual microgrid system. The construction process requires defining the structure of the data samples. Each data sample contains a complete microgrid state snapshot and a label for the optimal coordinated control action to be executed in that state. The state snapshot is the operating feature dataset, and the optimal coordinated control action label is obtained through offline optimal power flow calculation or other optimization algorithms. Various typical microgrid operating scenarios include high photovoltaic output and low load scenarios, low wind power output and high load scenarios, energy storage charging and discharging conversion scenarios, and main grid connection and islanding switching scenarios. Fault scenarios include single line interruption scenarios, single distributed power source shutdown scenarios, and communication link packet loss or delay scenarios. The total sample size of the historical dataset needs to reach a certain scale to cover the state space, for example, containing tens of thousands to hundreds of thousands of independent time step samples. The number of distributed power source nodes in each sample is consistent with the size of the target microgrid.
[0037] Using historical datasets, and with the optimization objectives of minimizing the overall operating cost and voltage deviation of a microgrid, a deep reinforcement learning algorithm is employed to train the parameters of a graph neural network and its fully connected policy network offline. The overall operating cost of the microgrid includes the fuel and maintenance costs of distributed generation and the cost of purchasing and selling electricity with the main grid. Voltage deviation is defined as the sum of the squares of the differences between the voltage at each node and its rated voltage. The deep reinforcement learning algorithm models the microgrid as a Markov decision process, with the graph neural network and its fully connected policy network acting as the intelligent agent. This represents the network weights that need to be trained. Optimization objective. This can be expressed as maximizing the expected value of long-term cumulative rewards, specifically in the form of: in: Represents time step The overall operating cost of the microgrid Represents time step The voltage deviation of the entire microgrid and It is a positive coefficient used to balance the weights of the two objectives. The discount factor is used to weigh immediate and future rewards. It is the length of the training rounds. This represents the expectation of the state transition distribution over the historical dataset. The training process iteratively updates the parameters using gradient descent. To maximize Gradient calculation relies on the policy gradient theorem or actor-critic framework in deep reinforcement learning algorithms.
[0038] Referring to Table 1, after training, the parameters of the graph neural network and its fully connected policy network are fixed for online distributed cooperative control. Fixing the parameters means using the network weights obtained after training convergence. Saved as a model file, this model file is loaded into the online control system and set to read-only mode. During online inference, the network weights are no longer updated. When used for online distributed cooperative control, each control cycle inputs the real-time collected and processed operational feature data into a graph neural network with fixed parameters. The neural network performs forward propagation calculations and outputs the control strategy; the output process does not involve adjustments to the network weights.
[0039] Table 1: Historical Dataset Sample Structure Table In some embodiments, the deep reinforcement learning algorithm employs a proximal policy optimization algorithm. The agent is trained in a simulated environment constructed from historical dataset samples. In each iteration, the algorithm samples a batch of trajectory data from the dataset, uses this data to calculate the policy gradient, and updates the parameters of the graph neural network and the fully connected policy network. Simultaneously, an independent value network is also trained to estimate the state value function, used to calculate the advantage function. Optionally, the historical dataset can be constructed using high-fidelity simulation based on a physical model. The simulation model includes detailed power network equations, distributed generation dynamic models, and communication network models. Massive amounts of data are generated by running simulations under different weather conditions, load curves, and fault injections. After training, the parameters are fixed. The file is exported as an Open Neural Network Exchange format and is deployed on the microgrid central server or distributed on edge computing devices at each node.
[0040] Understandably, offline training requires powerful servers or workstations, and the training time can take hours or even days. However, the trained model can run efficiently on resource-constrained online devices. In this specific implementation, a graph neural network was trained for a four-node microgrid comprising photovoltaic, wind turbine, energy storage, and diesel generator components. The historical dataset contained 50,000 samples, generated from simulations, covering four typical scenarios and three fault scenarios. Optimization target weights were set. , Discount factor After training for 2000 epochs using the proximal policy optimization algorithm, the objective function... The training converges to a stable value. After training, the final graph neural network parameters and fully connected policy network parameters are saved as the "gnn_controller.onnx" file. During online control, the microgrid central server reads real-time data in each control cycle, calls the inference engine loaded with the "gnn_controller.onnx" file, performs forward computation, and distributes the generated control policy to each node for execution. The entire online inference process is completed within 50 milliseconds.
[0041] Optionally, the training of deep reinforcement learning algorithms can incorporate a curriculum learning strategy, starting with simple steady-state operating scenarios. Once the strategy stabilizes, the complexity and randomness of the scenarios are gradually increased, such as adding load fluctuations and intermittent power fluctuations. Finally, fault scenarios are introduced for training. This gradual training approach helps improve the convergence speed and final performance of the strategy. In some embodiments, the value network can employ a graph neural network with a similar structure but independent parameters to a graph neural network, to better handle state inputs with graph structures. Optionally, during the offline training phase, the performance of the training strategy can be periodically evaluated on a set of reserved validation datasets. Based on the validation performance, it can be determined whether to terminate training early or adjust the hyperparameters. It can be understood that the optimal parameters obtained during training... It is designed for specific network topologies and component types. When the microgrid topology undergoes permanent changes, it is necessary to re-collect data or adjust the model structure and retrain.
[0042] In one embodiment of the present invention, the exception handling mechanism involves the graph neural network (Graph Neural Network) simultaneously outputting an uncertainty assessment value for the hidden state vector of each vertex in each control loop. This uncertainty assessment value is a scalar output generated by the Graph Neural Network when calculating the vertex hidden state vector, used to quantify the confidence level of the estimated vertex state. The Graph Neural Network outputs the uncertainty assessment value by adding a parallel branch to the last layer of the Graph Neural Network. This branch shares some low-level features with the main branch that generates the hidden state vector, but ultimately outputs a scalar value representing the uncertainty. If the uncertainty assessment value of a vertex exceeds a preset confidence threshold, then the vertex data or communication is determined to be abnormal. It is a constant determined based on historical normal data statistics; for example, it can be set as the 95th quantile of the uncertainty assessment value distribution during normal operation. The decision logic is: if... Then mark the vertex. This is an abnormal state.
[0043] Switching to the locally preset conservative control mode for abnormal vertices means that when a vertex is determined to be abnormal, its corresponding distributed power node will no longer execute the cooperative control strategy issued by the graph neural network. The conservative control mode is a simple, robust control logic preset in the local controller, such as constant power control mode, constant voltage control mode, or traditional droop control mode based on local measurements. Simultaneously, the abnormal vertex's abnormal state is notified to neighboring vertices through the graph neural network's message passing mechanism. This is achieved by adding an abnormal state flag to the message vector transmitted by the graph neural network. Before transmitting the message, the hidden state vector of the abnormal vertex is appended with a specific code indicating "abnormality." This guides neighboring vertices to adapt to the abnormal vertex's abnormal situation in the next round of computation. When aggregating messages, neighboring vertices can identify messages from abnormal vertices carrying an abnormal flag, thereby reducing or ignoring the influence weight of information from that abnormal vertex when updating their own hidden states. For example, the message weight from the abnormal vertex can be reset to zero in the message aggregation function.
[0044] In some embodiments, uncertainty assessment value The calculation can be based on the variance of the probability distribution of the model output. Graph neural networks are designed to output parameters that are Gaussian distributed, i.e., the mean of the hidden state vector. and variance Uncertainty assessment value Then it is taken from a certain norm of the variance vector, for example Preset confidence threshold The uncertainty assessment values of all vertex outputs can be collected and their statistical distribution calculated by running a graph neural network on a normal dataset during the offline phase. The specific operation of switching to conservative control mode involves setting a logic switch in the cooperative control algorithm. When a vertex is marked as abnormal, this switch switches the source of control commands from the graph neural network output to a locally preset controller. The local preset controller independently generates control commands based on the node's own measured values (such as local voltage and frequency). In a specific implementation, assuming a microgrid containing photovoltaic inverter nodes, wind turbine inverter nodes, energy storage converter nodes, and diesel generator nodes, in one control loop, the graph neural network outputs four uncertainty assessment values in addition to the hidden state vectors of the four vertices. , , , Preset confidence threshold Comparison revealed that the uncertainty assessment value of the energy storage converter node... Therefore, the system determines that the energy storage converter node's data or communication is abnormal. The system immediately switches control of the energy storage converter node to its locally preset constant power charging mode, in which the energy storage system will charge at a fixed power value. Simultaneously, in the next round of message passing in the graph neural network, the energy storage node will include a flag indicating its own abnormal state in the messages sent to the photovoltaic node and diesel generator node.
[0045] When photovoltaic nodes and diesel generator nodes aggregate messages, they detect messages from energy storage nodes that have anomaly flags. Therefore, when calculating their own new hidden state, they ignore the message content from the energy storage node and only aggregate information from other normal neighbor nodes, thereby generating a control strategy that adapts to the abnormal operating state of the energy storage node.
[0046] It is understandable that the uncertainty assessment value reflects the graph neural network's judgment on the quality of input data. Data loss, excessive communication delays, or significant measurement distortions can all lead to an abnormally high value. Notification of abnormal states is achieved through the inherent message passing channel of the graph neural network, without adding additional communication burden. Optionally, the conservative control mode can be customized according to node type and equipment characteristics. For photovoltaic inverter nodes, the conservative control mode might be maximum power point tracking (MPPT) mode; for diesel generator nodes, it might be constant frequency and constant voltage control mode. In some embodiments, when the data or communication of the abnormal vertex returns to normal, its uncertainty assessment value will fall below the confidence threshold. At this time, the system can automatically switch its control from the conservative control mode back to the mode dominated by the cooperative control strategy. A hysteresis interval can be designed during the switching process to prevent frequent mode oscillations. Optionally, for anomalies caused by brief communication interruptions, neighboring vertices can use the previously received valid historical data from that vertex as an estimate for partial compensation when adapting to the abnormal situation, instead of ignoring it completely. It is understandable that guiding neighboring vertices to adapt to abnormal situations enhances the resilience of the entire microgrid control system. When a local fault occurs, the remaining normal parts can autonomously adjust their strategies to maintain the stability of global operation.
[0047] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. An AI-based distributed cooperative control method for microgrids, characterized in that, include: Obtain the operational characteristic dataset of all distributed power generation nodes in the microgrid; The operational feature dataset is modeled as a graph structure, with each distributed power node modeled as a vertex in the graph structure, the electrical connections and communication links between nodes modeled as edges, and each edge assigned a comprehensive weight reflecting electrical distance and communication delay, thus forming a dynamic topology graph of the microgrid. Local neighborhood features of each vertex are extracted from the dynamic topology graph of the microgrid. The local neighborhood features include the vertex's own operating feature data and the operating feature data of neighboring vertices connected by edges, forming a vertex feature vector. The vertex feature vectors of all vertices are input into a pre-trained graph neural network, which aggregates the information of each vertex and its multi-hop neighbors through multi-layer message passing and updates the hidden state vectors of all vertices. Based on the updated hidden state vectors of all vertices, a cooperative control policy is computed for each vertex, including: The coordinated control strategy includes power reference value adjustment commands and voltage compensation commands; The final hidden state vector of each vertex is input into a fully connected policy network; The fully connected strategy network outputs continuous values in two dimensions, corresponding to the power reference value adjustment and voltage compensation, respectively. The power reference value adjustment amount is added to the current node output power to obtain the power reference value adjustment command; Add the voltage compensation amount to the current node voltage to obtain the voltage compensation command; The power reference value adjustment command and the voltage compensation command together constitute the collaborative control strategy of the vertex; The collaborative control strategy of each vertex is fed back to its corresponding distributed power source local controller for execution, thereby changing the output characteristics of the distributed power source. After a preset time interval, the running characteristic data of each node is re-collected and merged with the execution result of the previous moment to generate a new running characteristic dataset, which is used to start the next round of control loop.
2. The AI-based distributed cooperative control method for microgrids according to claim 1, characterized in that, Graph structure modeling of the runtime feature dataset includes: The operational feature dataset includes the node's output power, node voltage, local load, and energy storage status; Based on the physical wiring diagram and communication network structure of the microgrid, determine the connection relationship of the distributed power generation nodes; Calculate the impedance magnitude between any two electrically connected nodes and use it as the electrical distance weight; Measure or estimate the round-trip time of data packets between any two nodes that have a communication connection, and use it as a communication delay weight; The electrical distance weight and the communication delay weight are normalized and then linearly superimposed to obtain the comprehensive weight of the edge connecting the two nodes. Based on the comprehensive weights of all nodes, connections, and corresponding edges, the adjacency matrix and feature matrix of the microgrid dynamic topology graph are constructed.
3. The AI-based distributed cooperative control method for microgrids according to claim 2, characterized in that, Extracting local neighborhood features of each vertex from the dynamic topology graph of the microgrid, including: For each vertex in the dynamic topology graph of the microgrid, identify all neighboring vertices that are directly connected to it through edges; Read the vertex's own operational characteristic data; Read the operational feature data of all neighboring vertices and weight the operational feature data of neighboring vertices according to the comprehensive weight of the connecting edges; The vertex's own operational feature data is concatenated with the weighted operational feature data of its neighboring vertices to form the vertex feature vector.
4. The AI-based distributed cooperative control method for microgrids according to claim 3, characterized in that, The step of inputting the vertex feature vectors of all vertices into a pre-trained graph neural network includes: Input the adjacency matrix of the microgrid dynamic topology graph and the vertex feature vector matrix of all vertices into the graph neural network; In each layer of the graph neural network, each vertex receives messages from its neighboring vertices via edges, processed by the hidden states of the neighboring vertices and the edge weights. Each vertex aggregates all received neighbor messages and merges them with its previous hidden state through a nonlinear transformation to update its hidden state vector; After a preset number of message passes and state updates, the final hidden state vector of all vertices is output.
5. The AI-based distributed cooperative control method for microgrids according to claim 4, characterized in that, The step of feeding back the collaborative control strategy of each vertex to its corresponding distributed power local controller for execution includes: The power reference value adjustment command is sent to the power controller of the corresponding distributed power source to adjust the reference value of its power control loop; The voltage compensation command is sent to the voltage regulator of the corresponding distributed power source as an additional compensation signal for voltage droop control or reactive voltage control. The distributed power source local controller drives the converter through pulse width modulation based on the new reference value and compensation signal, thereby changing its output active and reactive power.
6. The AI-based distributed cooperative control method for microgrids according to claim 1, characterized in that, The step of re-collecting the operational feature data of each node after a preset time interval and merging it with the execution result of the previous moment to generate a new operational feature dataset includes: When the preset control cycle arrives, the output power, node voltage, local load and energy storage status of all distributed power nodes in the microgrid are collected synchronously. Obtain the actual completion rate of the power reference value adjustment command and voltage compensation command executed in the previous control cycle from each distributed power source local controller; The newly collected operational feature data is associated and merged with the actual completion data of the previous cycle's instructions by node to form a new operational feature dataset that includes historical action feedback.
7. The AI-based distributed cooperative control method for microgrids according to claim 6, characterized in that, The process of associating and merging the newly collected operational characteristic data with the actual completion data of the previous cycle's instructions by node also includes: Perform consistency checks on the new runtime feature dataset, checking whether the timestamps of the data on each node are synchronized and whether there are any outliers. Standardize the operational characteristic data that has passed the verification to eliminate the influence of different physical dimensions; The standardized data will be used as input for graph structure modeling in the next round of control loop.
8. The AI-based distributed cooperative control method for microgrids according to claim 1, characterized in that, The training method for the pre-trained graph neural network includes: Construct a historical dataset containing various typical operating and fault scenarios of microgrids; Using the historical dataset, with the optimization objectives of minimizing the global operating cost and voltage deviation of the microgrid, a deep reinforcement learning algorithm is used to train the parameters of the graph neural network and its fully connected strategy network offline. After training, the parameters of the graph neural network and its fully connected policy network are fixed for online distributed cooperative control.
9. The AI-based distributed cooperative control method for microgrids according to claim 1, characterized in that, The method also includes an exception handling mechanism: In each round of the control loop, the graph neural network simultaneously outputs the uncertainty evaluation value of the hidden state vector of each vertex; If the uncertainty assessment value of a vertex exceeds the preset confidence threshold, the vertex is determined to be an abnormal vertex. The control mode of the local controller of the distributed power source corresponding to the abnormal vertex is switched to the conservative control mode preset in the local controller of the distributed power source. At the same time, the abnormal state of the abnormal vertex is notified to the neighboring vertices through the message passing mechanism of the graph neural network, so as to guide the neighboring vertices to adapt to the abnormal situation of the abnormal vertex in the next round of calculation.
Citation Information
Patent Citations
Power grid side energy storage optimal configuration and operation control method and system
CN119171486A
Vehicle network interaction AI cooperative scheduling method and system based on multi-source data fusion
CN121327743A