An intelligent micro-grid control method based on edge computing

By employing edge computing-based intelligent control methods in microgrids and utilizing edge aggregation nodes and digital twin models for distributed task scheduling, the problems of slow control response and poor stability under centralized architecture are solved, achieving efficient and reliable microgrid control.

CN121602357BActive Publication Date: 2026-04-21STATE GRID (SUZHOU) URBAN ENERGY RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID (SUZHOU) URBAN ENERGY RES INST CO LTD
Filing Date
2026-01-26
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

The slow control response and poor stability of microgrids caused by centralized network communication architecture have not been effectively solved by existing technologies, especially with the increasing proportion of renewable energy and the increasing complexity of grid topology.

Method used

An edge computing-based intelligent microgrid control method is adopted. By deploying simulation computing tasks at the edge aggregation node, the cost prediction and computing power scheduling of local execution and migration execution are performed using the microgrid holographic topology map and edge digital twin model, thereby optimizing the allocation of computing tasks and realizing distributed control.

Benefits of technology

It significantly shortens the control response time, improves the stability and reliability of the microgrid, avoids control interruptions caused by central node failures or communication link congestion in centralized architectures, and enhances the flexibility and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121602357B_ABST
    Figure CN121602357B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of micro-grid control, and specifically provides a kind of intelligent micro-grid control method based on edge computing, comprising: according to control instruction, generate the calculation task for simulation;According to cost data, through the computing power scheduling method, obtain processing strategy;In the case where local edge convergent node executes calculation task, based on micro-grid holographic topology, through edge digital twin model, the control instruction is simulated, and performance index is obtained;In the case where target edge convergent node executes calculation task, send calculation task to target edge convergent node, and receive the performance index returned by target edge convergent node;In the case where performance index meets preset safety constraint set, the circuit device in micro-grid is controlled by control instruction, to solve the problem that centralized network communication architecture leads to slow control response and poor stability in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of microgrid control technology, and in particular to a smart microgrid control method based on edge computing. Background Technology

[0002] In the field of smart microgrid monitoring and control, traditional system architectures generally adopt a centralized data processing model. In this model, sensor terminals distributed throughout the microgrid collect massive amounts of real-time operating data, which are then remotely transmitted to a central cloud server via network communication links. The central cloud server performs unified storage, computation, and decision analysis, and then issues control commands to the grid equipment.

[0003] As the proportion of renewable energy increases and grid topologies become more complex, the inherent shortcomings of the aforementioned centralized architecture become increasingly apparent: First, the remote transmission of all raw data is highly susceptible to network bandwidth congestion and transmission delays, making it difficult for system status awareness and command issuance to meet the millisecond-level requirements of real-time microgrid control, resulting in slow response times; second, the aggregation of massive amounts of data places enormous computational and storage pressure on cloud servers, creating performance bottlenecks and posing challenges to stability; finally, the centralized computing model cannot dynamically allocate computing resources according to network status and business needs, lacking elasticity and adaptability. These factors collectively constrain the efficient, stable, and secure operation of complex microgrids.

[0004] There is currently no effective solution to the problems of slow control response and poor stability caused by the centralized network communication architecture in related technologies. Summary of the Invention

[0005] The present invention provides a smart microgrid control method based on edge computing, which at least solves the problems of slow control response and poor stability caused by centralized network communication architecture in related technologies.

[0006] According to one aspect of the present invention, a smart microgrid control method based on edge computing is provided, comprising: upon receiving a control command, generating a computational task for simulation based on the control command; predicting cost data for local execution and migration execution based on the computational task and an edge aggregation node; obtaining a processing strategy based on the cost data using a computing power scheduling method; the processing strategy being used to determine whether the computational task is executed by a local edge aggregation node or a target edge aggregation node; and, when the computational task is executed by the local edge aggregation node, simulating the control command based on a holographic topology map of the microgrid using an edge digital twin model to obtain... The system obtains performance indicators; wherein the microgrid holographic topology map is constructed and updated in real time based on the electrical topology and real-time operating data of the microgrid; when the target edge aggregation node executes the calculation task, the calculation task is sent to the target edge aggregation node, and the system receives the performance indicators returned by the target edge aggregation node, wherein the target edge aggregation node is configured to simulate the control commands based on the microgrid holographic topology map and the edge digital twin model to obtain the performance indicators; when the performance indicators meet the preset safety constraint set, the system controls the circuit devices in the microgrid through the control commands.

[0007] As an optional approach, based on the computing task and the edge aggregation node, the cost data for local execution and migration execution is predicted, including: obtaining the execution time of the computing task based on the expected computational load of the computing task and the computing power load of the edge aggregation node; obtaining the execution energy consumption based on the execution time and the total operating power consumption of the edge aggregation node; obtaining the transmission time of the computing task based on the data size of the computing task and the real-time bandwidth and latency of the computing task reaching the target edge aggregation node; and obtaining the transmission energy consumption based on the transmission time and transmission power consumption; wherein the cost data includes the execution time, the execution energy consumption, the transmission time, and the transmission energy consumption.

[0008] As an optional approach, a processing strategy is obtained based on the cost data using a computing power scheduling method. The processing strategy determines whether the computation task will be executed by a local edge aggregation node or a target edge aggregation node, including: establishing an execution cost function based on the execution time and energy consumption of the computation task; establishing a migration cost function based on the transmission time and energy consumption of the computation task; calculating the local execution cost of the local edge aggregation node and the migration execution cost to the target edge aggregation node based on the execution cost function and the migration cost function; and determining the processing strategy based on the relationship between the local execution cost and the migration execution cost.

[0009] As an optional approach, the processing strategy is determined based on the relationship between the local execution cost and the migration execution cost, including: generating a processing strategy to execute the computing task on the local edge aggregation node when the local execution cost is less than or equal to the migration execution cost; and generating a processing strategy to migrate the computing task to the target edge aggregation node for execution when the local execution cost is greater than the migration execution cost.

[0010] As an optional approach, before simulating the control commands and obtaining performance indicators based on the microgrid holographic topology map and an edge digital twin model, the method further includes: constructing an initial edge digital twin model based on the microgrid holographic topology map and the corresponding mechanism model of the circuit device; mapping the real-time operating data to the initial edge digital twin model and updating the dynamic state variables of the circuit device to obtain an updated edge digital twin model; comparing the simulated operating data of the updated edge digital twin model with the real-time operating data measured by the physical microgrid at a preset period, and calculating the deviation value using the recursive least squares method; adjusting the model physical parameters in the updated edge digital twin model according to the deviation value and a preset deviation threshold to obtain an optimized edge digital twin model.

[0011] As an optional approach, based on a holographic topology map of the microgrid, the control commands are simulated using an edge digital twin model to obtain performance indicators. This includes: obtaining a state snapshot based on the state variables of the edge digital twin model synchronized with the physical microgrid at the current moment; obtaining model parameter adjustment values ​​according to the control commands; wherein the model parameter adjustment values ​​have future timestamps; simulating the edge digital twin model based on the state snapshot and the model parameter adjustment values ​​to obtain the evolution trajectory of electrical state variables and generate a predicted state time series; and calculating the performance indicators based on the predicted state time series.

[0012] As an optional approach, based on the state snapshot and the model parameter adjustment values, the edge digital twin model is simulated to obtain the evolution trajectory of the electrical state variables and generate a predicted state time series. This includes: based on the state snapshot, using a variable step-size integral algorithm to perform forward integration on the edge digital twin model to reach a future timestamp and obtain the instantaneous model state; based on the instantaneous model state and the model parameter adjustment values, the evolution trajectory is obtained through edge digital twin model simulation; and the evolution trajectory is recorded at a rate higher than the Nyquist sampling frequency to obtain the predicted state time series.

[0013] As an optional approach, when the performance indicators meet a preset set of safety constraints, controlling the circuit devices in the microgrid via the control command includes: comparing the performance indicators with the preset set of safety constraints, wherein the performance indicators include at least one of the following: maximum voltage offset, maximum frequency offset, stability margin, and available transmission capacity; issuing an alarm when the performance indicators exceed the corresponding preset set of safety constraints, wherein the preset set of safety constraints includes preset safety constraints corresponding to each performance indicator; and controlling the circuit devices according to the control command when the performance indicators are within the range of the preset set of safety constraints.

[0014] As an optional approach, the microgrid holographic topology map is constructed and updated in real time based on the electrical topology and real-time operating data of the microgrid. This includes: constructing a basic topology map by using the circuit devices in the electrical topology as nodes and the electrical connections in the electrical topology as edges; mapping the real-time operating data onto the basic topology map and performing global state estimation of the microgrid using a Kalman filter algorithm to obtain an electrical state snapshot; fusing the electrical state snapshot with the non-electrical dimension data of the circuit devices to obtain the microgrid holographic topology map; and updating the microgrid holographic topology map based on the real-time operating data.

[0015] As an optional approach, after the microgrid holographic topology map is constructed and updated in real time based on the electrical topology and real-time operating data of the microgrid, it further includes: collecting the real-time operating data and comparing it with preset fault triggering conditions; when the real-time operating data triggers the fault triggering conditions, locating the fault based on the fault features in the microgrid holographic topology map and the real-time operating data using a graph neural network fault diagnosis model; sending an isolation command based on the fault location and updating the microgrid holographic topology map.

[0016] As an optional approach, sending an isolation command based on the fault location and updating the microgrid holographic topology map includes: determining the isolation boundary device of the faulty component based on the fault location and the microgrid holographic topology map; wherein the isolation boundary device includes a smart switch directly electrically connected to the faulty component; generating the isolation command based on the isolation boundary device and sending it to the isolation boundary device; confirming the execution result of the isolation command based on the status information of the isolation boundary device and the real-time operating data; and updating the microgrid holographic topology map based on the execution result.

[0017] As an optional approach, before predicting the cost data for local execution and migration execution based on the computing task and the edge aggregation node, the method further includes: obtaining the expected computational load of the computing task based on the type and metadata of the computing task, and the number of nodes and branches in the microgrid holographic topology map; obtaining the computing load of the edge aggregation node through periodic sampling and quantization calculation using the operating system kernel interface and hardware performance counters built into the edge aggregation node; calculating and summing the real-time power consumption of each hardware component of the edge aggregation node based on the power supply voltage and current data of the edge aggregation node to obtain the total operating power consumption of the edge aggregation node; and collecting power supply data through a power management integrated circuit to construct a power consumption model and obtain the transmission power consumption based on the power consumption model.

[0018] According to another aspect of the present invention, an electronic device is also provided, comprising: a processor, and a memory storing a program, the program including instructions that, when executed by the processor, cause the processor to perform the method described in any of the preceding claims.

[0019] According to another aspect of the invention, a non-transitory machine-readable medium storing computer instructions for causing the computer to perform any of the methods described above is also provided.

[0020] According to another aspect of the present invention, a computer program product is also provided, comprising a computer program / instructions that, when executed by a processor, implement the method described in any of the preceding claims.

[0021] This invention provides an edge computing-based smart microgrid control method, comprising: deploying simulation computing tasks corresponding to microgrid control commands at the edge aggregation node level, avoiding the communication delays caused by all tasks needing to be uploaded to the cloud or central server in a centralized architecture; prioritizing the optimal edge aggregation node for rapid task processing through cost prediction and computing power scheduling of local execution and migration execution; updating the microgrid holographic topology map in real time based on electrical topology and real-time operating data, and directly completing the simulation derivation of control commands at the edge side in conjunction with the edge digital twin model, without relying on centralized simulation at the central node, significantly shortening the end-to-end response time from command reception, simulation verification to control execution; simultaneously, the distributed deployment of edge aggregation nodes reduces dependence on a single central node, avoiding control interruptions caused by central node failure or communication link congestion in a centralized architecture, and the task migration mechanism can flexibly avoid the problem of insufficient computing power of local edge aggregation nodes, thereby solving the problems of slow control response and poor stability caused by centralized network communication architecture in related technologies, achieving a significant improvement in the stability and reliability of microgrid control. Attached Figure Description

[0022] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other embodiments based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart of an edge computing-based smart microgrid control method according to an embodiment of the present invention.

[0024] Figure 2 This is a schematic diagram of the edge aggregation node function and hierarchical collaboration architecture of an embodiment of the present invention.

[0025] Figure 3 This is a flowchart of an edge aggregation node computing power scheduling method according to an embodiment of the present invention.

[0026] Figure 4 This is a flowchart of the predictive security verification of the edge aggregation node according to an embodiment of the present invention.

[0027] Figure 5 This is a flowchart of edge aggregation node fault diagnosis according to an embodiment of the present invention.

[0028] Figure 6 This is a flowchart of the fault location of the graph neural network fault diagnosis model according to an embodiment of the present invention.

[0029] Figure 7 This is a schematic diagram of the structure of the electronic device created by this invention. Detailed Implementation

[0030] Embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. While some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.

[0031] According to one aspect of the present invention, a smart microgrid control method based on edge computing is provided, comprising:

[0032] Step S101: Upon receiving a control command, generate a computational task for simulation based on the control command.

[0033] Step S102: Based on the computing task and edge aggregation node, predict the cost data for local execution and migration execution;

[0034] Step S103: Based on the cost data, a processing strategy is obtained through a computing power scheduling method; the processing strategy is used to determine whether the computing task is performed by the local edge aggregation node or the target edge aggregation node.

[0035] Step S104: When performing computational tasks at the local edge aggregation node, the control commands are simulated based on the microgrid holographic topology map and the edge digital twin model to obtain performance indicators; wherein, the microgrid holographic topology map is constructed and updated in real time based on the electrical topology of the microgrid and real-time operating data.

[0036] Step S105: When the target edge aggregation node performs the calculation task, the calculation task is sent to the target edge aggregation node, and the performance index returned by the target edge aggregation node is received. The target edge aggregation node is configured to simulate the control command based on the microgrid holographic topology map and the edge digital twin model to obtain the performance index.

[0037] Step S106: If the performance indicators meet the preset safety constraint set, control the circuit devices in the microgrid through control commands.

[0038] In step S101, the control instructions include device identifiers, such as BESS-PCS-01, SW-01, etc.; control actions, such as mode switching, switch opening and closing, power setting, etc.; execution timestamps, such as the time point of future execution; and control parameters, such as reference power, voltage setting value, etc.

[0039] After receiving the control command, the edge aggregation node parses the control command into a model parameter adjustment event with a future timestamp that can be recognized by the edge digital twin model.

[0040] For example, in Event 1: at simulation time t=1.0s, the control mode parameter ControlMode of BESS-PCS-01 in the edge digital twin model is adjusted from PQ control to V / f preparatory, and the active power reference value P_ref is set to 1.05 times the current total load.

[0041] Event 2: At simulation time t=2.0s, the switch status parameter Status of SW-01 in the twin model is changed from closed to open.

[0042] The future timestamps corresponding to the events are adjusted according to the model parameters, and all events are sorted and integrated to form an ordered sequence of control events. The sequence of control events, along with the simulation initial conditions, simulation time domain range, and performance indicators, are encapsulated to obtain a structured computational task.

[0043] In step S102, the edge aggregation node is an industrial-grade computing device, such as an industrial edge computer, deployed at the microgrid site, serving as the local decision-making core of the microgrid monitoring system. The edge aggregation node also includes a main processing chip, memory, a communication module, and onboard power management integrated circuits.

[0044] like Figure 2 As shown, edge aggregation nodes are the core units for smart microgrid control. Edge aggregation nodes interface with smart sensors, circuit devices, smart switches, and other devices in the physical Internet of Things (IoT) layer. Edge aggregation nodes receive real-time operational data uploaded by smart sensors and can simultaneously issue control commands to smart switches and circuit devices. Different edge aggregation nodes can migrate computational tasks, thereby achieving computational collaboration among edge aggregation nodes.

[0045] like Figure 2 As shown, edge aggregation nodes carry three core functions: data and models, core algorithms and logic, and status monitoring. In the data and models dimension, edge aggregation nodes have built-in microgrid holographic topology maps and edge digital twin models, constructing a digital mapping for the physical microgrid. In the core computing and logic dimension, edge aggregation nodes possess localized intelligent decision-making capabilities such as graph neural network fault diagnosis, simulation engines, predictive security verification, computing power scheduling, and fault isolation. In the status monitoring dimension, they can achieve real-time tracking of their own computing load and functional operation status.

[0046] like Figure 3 As shown, the edge aggregation node receives the computing tasks to be processed. The edge aggregation node indicates how much computing resources it can provide and its current status; it can monitor its own computing load. The computation cost data is calculated based on the expected computational workload of the task and the edge aggregation node's monitored computing load.

[0047] Edge aggregation nodes have limited computing power and energy. By predicting cost data, it's possible to avoid placing all tasks on local edge aggregation nodes, preventing system slowdowns or even crashes due to overload. Microgrid control has extremely high real-time requirements, such as... Figure 3 As shown, based on cost data, the local execution cost and migration execution cost are obtained through a computing power scheduling method. The relationship between the local execution cost and the migration execution cost can ensure that computing tasks are allocated to the nodes that can complete them the fastest, avoiding delays in critical decisions due to busy local nodes.

[0048] In step S103, the computing power scheduling method is a decision algorithm based on optimization theory. The computing power scheduling method includes a local execution cost function and a task migration cost function, and selects the optimal execution location for the computing task through joint decision-making.

[0049] By inputting cost data into the local execution cost function and task migration cost function of the computing power scheduling method, the local execution cost and migration execution cost can be obtained. For example, if the local execution cost is calculated to be 5.762 and the migration execution cost is 2.572 from the input cost data, the processing strategy is to migrate the computing task to the target edge aggregation node for execution. The process of obtaining the processing strategy through specific numerical quantification eliminates the uncertainty of decision-making.

[0050] The processing strategy is the output of the computing power scheduling method; it is a specific scheduling instruction that can be directly executed by the system. Processing strategies include local execution strategies and task migration strategies. In the local execution strategy, the scheduling instruction submits the computing task to the local computing resource queue for execution. Through computing power scheduling, computing tasks can be migrated to nearby idle edge aggregation nodes for execution.

[0051] In step S104, the microgrid holographic topology map is a dynamic, multi-dimensional data graph based on a graph data structure, including nodes representing circuit devices and edges representing the electrical connections between them. The microgrid holographic topology map labels each node and edge with rich static and dynamic attributes, achieving the fusion of electrical state data and non-electrical dimension data. Electrical state data includes voltage, current, and power; non-electrical dimension data includes equipment model, maintenance records, and operating temperature.

[0052] The microgrid holographic topology map is used to define how the various sub-models in the edge digital twin model are connected, thereby constructing a virtual mirror consistent with the physical microgrid. As a convergence point for real-time data, the microgrid holographic topology map provides continuous and synchronous driving input for the edge digital twin model.

[0053] Edge digital twin models are constructed based on mechanistic models of microgrid holographic topology instantiation, such as differential-algebraic equations describing the dynamic behavior of photovoltaic inverters and energy storage converters. After receiving control commands, the edge digital twin model can simulate the dynamic response of the microgrid over a future period of time on a timescale much faster than physical reality.

[0054] The edge digital twin model compares the simulation output with the actual measurement data of the physical microgrid periodically, and uses algorithms such as recursive least squares to automatically adjust model parameters, such as line impedance and load factor, when the deviation between the two exceeds a preset threshold.

[0055] Simulation of control commands enables predictive and safe operation and maintenance of microgrids, avoiding system risks caused by blind control. The simulation provides a quantitative basis for safe decision-making regarding control commands, automatically comparing performance indicators with a preset set of safety constraints to arrive at the execution decision.

[0056] Step S104 utilizes a high-fidelity edge digital twin model supported by a real-time updated microgrid holographic topology map to proactively simulate the execution consequences of the control strategy in virtual space and generate quantified performance indicators as safety criteria.

[0057] In step S105, sending the computation task to the target edge aggregation node is a standardized communication and data exchange process. The computation task and data are packaged and routed to the target edge aggregation node through the communication interface. Specifically, the local edge aggregation node serializes and packages the computation task to be executed and its required data. The packaged data includes the control event sequence itself, the initial conditions necessary for simulation, such as the current state snapshot of relevant circuit devices extracted from the microgrid holographic topology map, and the task's metadata, such as the expected computational load and data size.

[0058] The packaged data is transmitted via the communication modules built into the edge aggregation nodes, such as industrial Ethernet interfaces, using preset industrial communication protocols. Industrial communication protocols, such as IEC61850 GOOSE and ModbusTCP, are used to achieve reliable and fast data exchange in industrial control networks.

[0059] Performance metrics are the input for the security verification in step S106. Regardless of where the computation task is executed, the local edge aggregation node, as the initiator of the initial request and the coordinator of the entire monitoring process, must obtain performance metrics to advance subsequent processes. In the system architecture, the local edge aggregation node is the monitoring and decision-making center of its microgrid area, responsible for coordinating the entire process from real-time data perception and computation task scheduling to the final execution of control commands. Retaining security verification and control decision-making authority at the local edge aggregation node ensures the consistency of the strategy and the clarity of the responsible party.

[0060] Edge digital twin models simulate future time periods, producing accurate performance metrics. Meanwhile, the preset safety constraint set consists of constraint rules controlling the circuitry of local edge aggregation nodes, formulated based on power grid operation procedures, equipment technical specifications, and practical operating experience.

[0061] By separating performance metrics from the preset security constraint set, the target edge aggregation node can function as a pure, reusable simulation computing power provider. It only needs to perform ultra-real-time simulations of the computational task and return performance metrics, without needing to load or understand the initiator's unique multi-dimensional security constraint set. When the security policy needs updating, only the configuration of the local edge aggregation node needs to be modified, without upgrading all potential target edge aggregation nodes, greatly improving the system's maintainability and flexibility.

[0062] Different edge aggregation nodes may serve microgrids in different regions or with different attributes, and their preset security constraint sets may differ due to the topology, equipment type, and operational requirements of the microgrids they serve. If the target edge aggregation node performs security verification, it must load and understand the preset security constraint set specific to the local edge aggregation node that initiated the request, which increases the complexity of the system and the difficulty of configuration synchronization. Having the local edge aggregation node perform security verification uniformly ensures that all security decisions within its jurisdiction are based on the same, up-to-date preset security constraint set, avoiding decision conflicts or control errors caused by inconsistent policies.

[0063] The preset security constraint set is a predefined quantitative security operation rule library in the local edge aggregation node, which defines the security boundary of the microgrid.

[0064] For control commands deemed safe and executable, the edge aggregation node needs to compile them into executable control commands that can be directly recognized and executed by the intelligent electronic devices of the target circuitry. For example, switching energy storage to V / f mode requires compiling these commands into low-level, specific executable control commands that the target device can parse.

[0065] Instruction 1, for the BESS-PCS-01 energy storage unit: Compiled as a ModbusTCP write instruction, its goal is to write the value 2 to register 40100, located at the IP address (Internet Protocol Address) 192.168.1.20 of the energy storage converter's IED (Intelligent Electronic Device), with function code 0x10. 2 represents V / f mode, and the power reference value is set to XkW. A CRC (Cyclic Redundancy Check) checksum is appended to the instruction. The CRC checksum is used to prevent malicious attacks and misoperations.

[0066] Instruction 2 is compiled into another Modbus TCP write instruction for the smart switch SW-01. The goal is to write the value 0 to register 40050 of the switch IED's IP address 192.168.1.10. 0 represents tripping.

[0067] At predetermined time points T+1.0s and T+2.0s, the compiled instruction messages are sent to the IED device via industrial Ethernet.

[0068] After the command is issued, the edge aggregation node will immediately start the monitoring process, and cross-verify whether the command has been executed correctly by using real-time operation data uploaded by the smart sensing terminal.

[0069] After T+1.0s, check whether the real-time power output of BESS-PCS-01 is consistent with the instruction value, and read the status register to confirm that the operating mode has been changed to V / f mode.

[0070] After T+2.0s, check if the current reading of the sensor associated with SW-01 has become zero, and read the status feedback to confirm that the switch position is open.

[0071] When the monitored real-time data changes are completely consistent with expectations, it is confirmed that the entire control strategy has been successfully executed, and the closed loop is completed.

[0072] The simulation-predicted performance indicators are automatically compared with a preset set of multidimensional security constraints, and the verified security policies are parsed and compiled into standardized instructions executable by the target device.

[0073] The present invention provides a smart microgrid control method based on edge computing, comprising: deploying the simulation computing task corresponding to the microgrid control command at the edge aggregation node level, and prioritizing the selection of the optimal edge aggregation node to quickly process the task through cost prediction and computing power scheduling of local execution and migration execution.

[0074] The microgrid holographic topology map is updated in real time based on the electrical topology and real-time operation data. Combined with the edge digital twin model, the simulation and deduction of control commands are completed directly at the edge side without relying on the centralized simulation of the central node, which greatly shortens the end-to-end response time from command reception, simulation verification to control execution.

[0075] Meanwhile, the distributed deployment of edge aggregation nodes reduces the dependence on a single central node, avoids control interruptions caused by central node failure or communication link congestion in centralized architecture, and the task migration mechanism can flexibly avoid the problem of insufficient computing power of local edge aggregation nodes. Thus, it solves the problems of slow control response and poor stability caused by centralized network communication architecture in related technologies, and achieves the technical effect of significantly improving the stability and reliability of microgrid control.

[0076] As an optional approach, based on the computing task and the edge aggregation node, the cost data for local execution and migration execution is predicted, including: the execution time of the computing task based on the expected computational load of the computing task and the computing power load of the edge aggregation node; the execution energy consumption based on the execution time and the total operating power consumption of the edge aggregation node; the transmission time of the computing task based on the data size of the computing task and the real-time bandwidth and latency of the computing task to the target edge aggregation node; and the transmission energy consumption based on the transmission time and transmission power consumption. Among these, the cost data includes execution time, execution energy consumption, transmission time, and transmission energy consumption.

[0077] The expected computational load of a computing task represents the workload of that task and is a core metric for evaluating the computing resources required, used to quantify and compare the complexity of different tasks. When a computing task is received, the system quantifies the computational load requirement, including the expected computational load, based on the task type and metadata.

[0078] The computing load of an edge aggregation node indicates the current percentage of processor resources being used; for example, the CPU (Central Processing Unit) utilization rate is 75%. A node may have high absolute computing power, but if it is currently fully loaded, its available computing speed for new tasks will be low. The real-time utilization rate of the CPU cores can be obtained by calling the operating system kernel interface and hardware performance counters built into the edge aggregation node. The available computing speed needs to be estimated by combining this utilization rate with the processor's theoretical peak computing speed. The theoretical peak computing speed is an inherent property of the hardware.

[0079] Execution time represents the length of time the computing device needs to operate continuously. The total power consumption of the edge aggregation node represents the rate at which the edge aggregation node consumes energy per unit time. By communicating with the onboard power management integrated circuit, the power supply voltage and current data of the edge aggregation node's main processing chip, memory, and communication modules are collected in real time, and the current total power consumption of the device is calculated. Execution energy consumption is the execution time multiplied by the total power consumption.

[0080] The data size of the computation task includes the sum of the task's input data and potential output data. Real-time bandwidth and latency are obtained through the network modules of the edge aggregation nodes, either proactively probed or acquired via network status services, by monitoring the real-time performance parameters of the network links between the target edge aggregation nodes.

[0081] Transmission power consumption is the specific power consumption of an edge aggregation node when it activates its network communication module to send data. This power consumption is obtained through prior testing and modeling, forming a power consumption model. The current transmission power consumption is then obtained by inputting the real-time acquired state variables into the power consumption model.

[0082] As an optional approach, a processing strategy is derived based on cost data using a computing power scheduling method. This processing strategy determines whether the computation task will be executed by the local edge aggregation node or the target edge aggregation node. This includes: establishing an execution cost function based on the execution time and energy consumption of the computation task; establishing a migration cost function based on the transmission time and energy consumption of the computation task; calculating the local execution cost of the local edge aggregation node and the migration execution cost to the target edge aggregation node based on the execution cost function and the migration cost function; and determining the processing strategy based on the relationship between the local execution cost and the migration execution cost.

[0083] The execution cost function is a multi-objective optimization function that combines execution time and execution energy consumption into a single execution cost value through weighted summation. The weight coefficients of execution time and execution energy consumption are used to adjust their relative importance in the decision-making process. Tasks with high real-time requirements have a larger weight coefficient for execution time, while tasks with high energy consumption requirements have a larger weight coefficient for execution energy consumption.

[0084] Microgrid monitoring and control are extremely sensitive to latency. Execution time directly determines the response speed of the control loop. Incorporating it into the execution cost can ensure the timeliness of critical business operations. Edge aggregation nodes have limited and fluctuating energy. Execution energy consumption is related to the energy cost of computing tasks. Incorporating it into the execution cost can optimize system energy efficiency and achieve synergy between computing power and energy.

[0085] The migration cost function combines transmission time and energy consumption in a weighted manner to obtain the migration cost. The weighting coefficients for time and energy consumption are consistent with those of the local execution cost function, ensuring the fairness of the decision comparison. Quantifying transmission time can avoid erroneous migration decisions under network congestion or high latency, and incorporating transmission energy consumption into the calculation can assess the energy cost of the migration process and optimize end-to-end energy efficiency.

[0086] Taking edge aggregation node NodeA as an example: NodeA receives computing tasks that require 1 billion CPU computation cycles, with a data size of 5MB, and must be completed within 1 second; NodeA currently has an available computing speed of 1.5 billion cycles / second and a power consumption of 20 watts; the nearby lightly loaded edge aggregation node NodeB has a network bandwidth of 100Mbps and a latency of 20ms; NodeA's data transmission power consumption is 2 watts; the system decision time weight is 0.6 and the energy consumption weight is 0.4.

[0087] A local execution cost function is established and calculated, with a local execution time of approximately 0.67 seconds. Multiplying the local execution time by the node's current operating power consumption, the estimated energy consumption for local execution is approximately 13.4 joules. Introducing a unit time cost conversion coefficient λt of 1 and a unit energy consumption cost conversion coefficient λe of 1, the time value is 0.67 and the energy value is 13.4. After weighted calculation based on 60% time weight and 40% energy weight, the comprehensive cost value of local execution is obtained as 0.6 × 0.67 + 0.4 × 13.4 = 5.762.

[0088] Specifically, a task migration cost function is established and calculated. Based on the time required to send 5MB of data through 100Mbps bandwidth and a network latency of 20 milliseconds, the total network transmission time is calculated to be 0.42 seconds. Multiplying the data transmission time by the power consumption of the network transmission module, the energy consumption of the transmission process is obtained as 0.84 joules. After weighting the unit time cost conversion coefficient and the unit energy consumption cost conversion coefficient with a 60% time weight and a 40% energy weight, the comprehensive cost value of the task migration process is obtained as 0.572.

[0089] Compare the total costs of local execution and migration execution. The total cost of migration execution includes the cost of the migration process and the cost of executing the task on the target node. Assuming the execution cost of NodeB is 2.0, the total cost of migration execution is 2.572, while the cost of local execution is 5.762. Therefore, the priority is to migrate the task to the target edge aggregation node NodeB for execution.

[0090] This invention establishes local execution cost functions and task migration cost functions respectively, enabling quantitative evaluation and horizontal comparison of the costs incurred when computing tasks are executed in different physical locations. Ultimately, it provides a scheduling decision basis for resource-constrained microgrid edge computing environments that can both meet the timeliness requirements of business operations and optimize the overall energy efficiency of the system.

[0091] As an optional approach, a processing strategy is determined based on the relationship between local execution cost and migration execution cost, including: generating a processing strategy to execute the computation task on the local edge aggregation node when the local execution cost is less than or equal to the migration execution cost; and generating a processing strategy to migrate the computation task to the target edge aggregation node for execution when the local execution cost is greater than the migration execution cost.

[0092] By comparing the local execution cost and the migration execution cost, it can be determined whether the computation task should be performed on the local edge aggregation node or the target edge aggregation node. For example, if the local execution cost is 5.762 and the migration execution cost is 2.588, then the computation task will be migrated to the target edge aggregation node for execution.

[0093] By quantifying cost comparisons, scheduling decisions are transformed from an experience-based, subjective process into an objective, automatically executed calculation process based on data and models, ensuring the consistency and reliability of system decisions.

[0094] The computing power scheduling method forces the system to conduct a comprehensive and quantitative evaluation of the time, energy consumption advantages and disadvantages of local execution and migration execution at each decision point, thereby dynamically selecting the execution plan with the lowest overall cost under the current system state.

[0095] For example, while local edge aggregation nodes may have considerable absolute computing power, their high load makes local execution costly. Dynamic migration strategies achieve cross-node load balancing, transferring tasks from high-load nodes to low-load nodes. This solves local bottlenecks and fully utilizes idle computing power in the network, thereby improving the overall efficiency and resilience of the entire edge computing cluster to localized pressure.

[0096] If it is a task migration, the migration process is initiated. The specific process of sending the computing task to the target edge aggregation node is as follows: the task execution code and input data are packaged as transmission units, such as a tar.gz compressed package; it is sent to the task receiving endpoint of the target edge aggregation node through the node communication interface HTTPPOST; after receiving the acceptance confirmation acknowledgment from the target edge aggregation node, the task status is marked as unloaded and the task waits for the return of the computing performance indicators.

[0097] The computing power scheduling method assigns real-time levels and importance weights to the computing tasks to be processed. When calculating the local execution cost function or the migration execution cost function, the weights are incorporated and the delay cost of the computing tasks is penalized with weighting. The computing tasks are scheduled to be executed locally only when the real-time power generation of the local distributed power source meets the expected energy consumption requirements of the task.

[0098] As an optional approach, before simulating control commands and obtaining performance indicators based on the microgrid holographic topology map and an edge digital twin model, the following steps are also included: constructing an initial edge digital twin model based on the microgrid holographic topology map and the corresponding mechanism model of the circuit device; mapping real-time operating data to the initial edge digital twin model and updating the dynamic state variables of the circuit device to obtain an updated edge digital twin model; comparing the simulation operating data of the updated edge digital twin model with the real-time operating data measured by the physical microgrid at a preset period, and calculating the deviation value using the recursive least squares method; adjusting the model physical parameters in the updated edge digital twin model according to the deviation value and a preset deviation threshold to obtain an optimized edge digital twin model.

[0099] The mechanistic model corresponding to the circuit device is a mathematical equation describing its dynamic behavior. It is based on electrical, electromagnetic and control theories and includes photovoltaic inverter models, energy storage converter models, cable line models, etc.

[0100] The photovoltaic inverter model includes the differential equations for the maximum power point tracking algorithm, DC-side capacitor dynamics, and AC-side grid-connected control loops, such as phase-locked loops and current loops. The energy storage converter model describes its dynamic response equations under different control modes, as well as the state-of-charge (SOC) ampere-hour integral model of the connected energy storage units. The cable line model can be a π-type equivalent circuit model, including resistance, inductance, and capacitance parameters.

[0101] An edge digital twin model is a virtual mirror of a microgrid deployed at an edge aggregation node. It is formed by instantiating and interconnecting the mechanistic models of all circuit devices based on the connection relationships of the microgrid holographic topology. It is a computable simulation system that operates in real time or ultra-real time with the physical microgrid.

[0102] During the initial edge-convergence twin model construction, the edge-convergence nodes load and parse the microgrid holographic topology, identifying all circuit devices and their physical electrical connections. The system traverses each circuit device node in the topology, selecting and loading the corresponding parametric mechanism model from a predefined mechanism model library based on the device type and model. Initial parameters are assigned to the instantiated model according to the static attributes marked in the topology. Following the connection relationships defined in the topology, the electrical connections of all device models are completed in the simulation environment, forming an initial edge digital twin model consistent with the physical microgrid topology.

[0103] The holographic topology map of the microgrid provides a structural blueprint for the digital twin model, while the mechanistic model provides a behavioral kernel. Together, they ensure that the initial model is consistent with the physical microgrid in terms of structure and basic behavior.

[0104] By mapping real-time operational data to the initial model and updating the dynamic state variables of the edge digital twin model, the model is transformed from a static idealized state into a simulation system that can reflect the real-time operating state of the physical microgrid.

[0105] The system compares and updates the simulation output data of the edge digital twin model with the actual measurement data of the physical system at a preset cycle, and calculates the deviation value. When the deviation value exceeds the preset threshold, the recursive least squares method is used to calculate the correction weight, and the physical parameters of the edge digital twin model are adjusted accordingly to complete the self-correction of the edge digital twin model and obtain the optimized edge digital twin model.

[0106] The aforementioned closed-loop self-correction mechanism enables the edge digital twin model to have synchronous evolution capabilities, which can adaptively track the characteristic changes of the physical microgrid caused by equipment aging and environmental changes, maintain the accuracy of simulation predictions in the long term, and provide a reliable basis for the forward-looking safety verification of control commands.

[0107] Specifically, the instantiation and initialization of the mechanistic model includes:

[0108] When the edge aggregation node starts up, it parses the holographic topology of the microgrid and traverses the device nodes in the graph, such as PV-INV-01 and BESS-PCS-01. Based on the device type and model attributes of the node, it selects and loads a mechanism model from the model library. For example, for PV-INV-01, it loads a photovoltaic inverter simulation model that includes maximum power point tracking and voltage and frequency control logic; for connecting cables, it loads a standard model. An equivalent circuit model is constructed, and initial parameters are set based on the line impedance properties in the microgrid holographic topology diagram.

[0109] Based on the connection relationships in the holographic topology diagram, the instantiated device models are connected in the simulation environment to form a computable initial edge digital twin model consistent with the physical microgrid topology.

[0110] Edge aggregation nodes will collect and process real-time operational data from smart sensing terminals, using it as input drive signals and injecting it into the initial edge digital twin model in real time. For example, real-time solar irradiance data obtained from the park's weather station will serve as input to the photovoltaic array model; active and reactive power commands issued by the system will serve as control setpoint inputs to the energy storage converter model; and actual load power consumption collected from smart meters will serve as input to the load model.

[0111] The initial edge digital twin model is calculated based on the input signal, and the internal dynamic state variables are updated in real time to obtain the updated edge digital twin model. For example, the photovoltaic inverter model calculates the DC side voltage and maximum available power based on irradiance; the energy storage model updates the state of charge in real time based on the charging and discharging power using the ampere-hour integration method; the power flow calculation of the entire microgrid updates the power flow of the lines and the voltage of the nodes in real time; when the smart switch SW-03 trips, the state of the smart switch SW-03 is mapped into the twin model in real time, and the switch model will also disconnect.

[0112] Set a calibration cycle, for example, once every 5 seconds; within the calibration cycle, compare the simulation output of the updated edge digital twin model with the actual measurement data of the physical microgrid. For example, compare: the simulated calculated voltage of the BESS-PCS-01 grid connection point in the digital twin model with the actual voltage measured by the phasor measurement unit; the simulated power flow value of a main line in the digital twin model with the actual power flow value measured by the line's smart meter.

[0113] The deviation between the simulation output of the updated edge digital twin model and the actual measurement data of the physical microgrid is calculated. Preset deviation thresholds are used, such as voltage deviation exceeding 1% and power flow deviation exceeding 3%. When the calculated deviation exceeds the threshold, parameter adjustment is triggered: based on recursive least squares, the deviation value is used as input to calculate the prediction error and correction weights, and the deviation is minimized by adjusting the parameters in the model. The final optimized edge digital twin model is obtained.

[0114] For example, if it is found that the simulated voltage drop of a certain line is always smaller than the actual voltage, resulting in an overestimation of the simulated voltage, the line impedance parameter is inferred to have increased due to aging and temperature rise based on the recursive least squares method. A correction amount is then calculated, and the line impedance value in the edge digital twin model is increased. Similarly, if the load model's behavior does not match reality, the load model coefficients are adjusted based on the recursive least squares method.

[0115] This invention utilizes a holographic topology model as the input driver, real-time measurement data, and recursive least squares method to correct the deviation between the output of the edge digital twin model and the actual data online. This achieves synchronization of state variables and adaptive optimization of model parameters between the physical microgrid and the edge digital twin model, providing a virtual experimental platform for subsequent ultra-real-time simulation, predictive analysis, and control strategy verification. This enhances the reliability and security of the intelligent microgrid monitoring system for simulation.

[0116] As an optional approach, based on the holographic topology of the microgrid, a performance index is obtained by simulating control commands using an edge digital twin model. This includes: obtaining a state snapshot based on the state variables of the edge digital twin model synchronized with the physical microgrid at the current moment; obtaining model parameter adjustment values ​​according to the control commands; wherein the model parameter adjustment values ​​have future timestamps; simulating the edge digital twin model based on the state snapshot and model parameter adjustment values ​​to obtain the evolution trajectory of electrical state variables and generate a predicted state time series; and calculating the performance index based on the predicted state time series; wherein the performance index includes both the performance index itself and the evolution trajectory.

[0117] The edge digital twin model used for simulation in this embodiment is the optimized edge digital twin model described above. For example... Figure 4 As shown, the execution flow of the edge aggregation node receiving control commands and performing predictive security checks is as follows: First, it receives the control commands, copies a snapshot of the current state of the edge digital twin, and performs simulation on the edge digital twin model to obtain performance indicators characterizing the system's stability and security. Then, it determines whether the predicted state conforms to the security constraint set. If it does, it generates executable control commands and sends them to the circuit device, and then confirms successful execution through detection data. If it does not conform, it terminates execution and issues a warning, thus completing the entire security check process.

[0118] Synchronizing with the physical microgrid at the current moment ensures that the initial conditions of the simulation prediction are completely consistent with the physical world. The synchronization operation is equivalent to adjusting the initial layout and state of the virtual circuit device, the edge digital twin model, to be exactly the same as the real scene, thereby ensuring that subsequent simulations have practical guiding significance.

[0119] A state snapshot is a dataset that records the complete dynamic internal state of all circuit devices in an edge digital twin model at a certain moment. It includes all state variables such as generator power angle and speed, energy storage unit state of charge, line inductor current and capacitor voltage, and control loop integrator output value.

[0120] State snapshots are obtained by copying the state variables of the model currently synchronized with the physical microgrid. Before the simulation, the simulation engine pauses real-time data injection, reads and saves all dynamic variable values ​​at once, and freezes the continuously synchronized model in time to a specific point as the initial conditions for the simulation calculation, ensuring that the simulation starting point is consistent with the physical system and is not affected by subsequent changes in the physical system.

[0121] The holographic topology map of the microgrid ensures that the connection relationships of the model devices are consistent with the physical system. The mechanistic model realistically reflects the dynamic response of the circuit devices, supporting simulation prediction of system behavior under new operating conditions and faults. The model parameter adjustment values ​​are the concrete mapping of control commands in the model. They are parameter adjustment commands with future timestamps, specifying the devices, parameters, and target values ​​that need to be adjusted at a specific future time in the simulation. They accurately reproduce the execution sequence of control commands and are the foundation for achieving predictive safety verification.

[0122] Simulations are conducted based on state snapshots and model parameter adjustments to pre-enact the complete execution process of the control strategy and its impact on the system in digital space. Post-processing and analysis of the simulation results yield performance indicators. By verifying the performance indicators against the set of safety constraints, the traditional passive mode is transformed into an active mode, accurately identifying and intercepting system instability risks before command execution, providing quantitative decision-making basis, and improving the power supply security, operational economy, and decision-making intelligence of the microgrid.

[0123] Specifically, before starting the simulation, the dynamic state variables of the edge digital twin model at the current moment are copied, which is called a state snapshot. This snapshot includes: the integrator state of the internal control loop of the photovoltaic inverter and the energy storage converter; the state of charge of the energy storage unit; and the current of the line inductor and the voltage of the capacitor in the network.

[0124] The state snapshot is loaded into the edge digital twin model as the initial conditions for the simulation. The edge digital twin model is started, and starting from the state snapshot, the variable step-size integration method is used to solve the differential equations describing the dynamic behavior of the microgrid in the instantiated mechanistic model by forward integration. The simulation time domain endpoint is set to t=10s.

[0125] When the simulation time progresses to t=1.0s, the solver pauses and performs the model parameter adjustment defined in event 1. After the adjustment, the solver continues to integrate from the new state at t=1.0s. When the simulation time progresses to t=2.0s, the solver pauses again and performs the model parameter adjustment in event 2. The solver continues to integrate until the simulation endpoint at t=10s.

[0126] Specifically, the analysis and encapsulation of predicted states include:

[0127] Throughout the simulation process, the dynamic evolution trajectory of electrical state variables is recorded at a rate much higher than the Nyquist sampling frequency, for example, once every 0.5 milliseconds, to form a predicted state time series, including: the system frequency of the microgrid, the voltage amplitude of the nodes, the active and reactive power output of distributed power sources, and the state of charge change curves of energy storage units.

[0128] After the simulation, the recorded predicted state time series was analyzed to calculate the quantified performance indicators: maximum frequency offset, maximum voltage offset, stability margin, and available transmission capacity.

[0129] The performance indicators are calculated based on the predicted state time series. The maximum voltage deviation in the performance indicators traverses the entire time series to find the maximum deviation of the voltage relative to the rated value. The stability margin is derived by analyzing the system's recovery time and fluctuation amplitude after the disturbance. The available transmission capacity is calculated based on power flow distribution data through the power grid security constraint equation, ultimately forming a quantitative set of performance indicators.

[0130] This invention receives multiple control commands to be executed as a candidate set, performs simulations of future time periods on an edge digital twin model, and calculates the score of each control command on system stability, thereby improving the operating efficiency and stability of the microgrid while ensuring safety.

[0131] This invention accelerates the time-domain simulation of future control commands on a digital twin model and performs in-depth analysis of the multi-dimensional dynamic evolution trajectory generated by the simulation. This enables quantitative prediction of the dynamic response and potential risks of the microgrid after the execution of the control strategy. It allows the intelligent microgrid monitoring system to conduct sandbox simulations of the safety and feasibility of complex operations without affecting the safety of physical entities. This avoids the risk of system instability or equipment damage that may be caused by blind control and enhances the proactive safety and forward-looking decision-making of the microgrid operation.

[0132] As an optional approach, based on state snapshots and model parameter adjustment values, the edge digital twin model is simulated to obtain the evolution trajectory of electrical state variables and generate a predicted state time series. This includes: based on the state snapshot, using a variable step-size integral algorithm to perform forward integration on the edge digital twin model to reach a future timestamp and obtain the instantaneous model state; based on the instantaneous model state and model parameter adjustment values, the evolution trajectory is obtained through edge digital twin model simulation; and the evolution trajectory is recorded at a rate higher than the Nyquist sampling frequency to obtain the predicted state time series.

[0133] A state snapshot is loaded into the simulation engine, resetting the model state. Forward integration is then performed; the simulation engine employs a variable-step-size integration algorithm, starting from the initial state and solving the system of differential-algebraic equations in the model to advance the simulation time. When the simulation time progresses to a future timestamp defined in the model parameter adjustment values, the engine pauses, applies the model parameter adjustment values ​​(e.g., changing switch states), and then continues integration. During the simulation, the evolution trajectory of electrical state variables is recorded at a high frequency.

[0134] Electrical state variables are the core physical variables that describe the instantaneous operating state of a microgrid. They include the voltage magnitude and phase angle of nodes, system frequency, active and reactive power flow of branches, output of distributed generation sources and state of charge of energy storage units, etc. Together, they define the electrical energy distribution and balance of the power grid at any given time.

[0135] The variable step-size integration algorithm is a numerical method for solving systems of differential equations. It automatically adjusts the calculation step size according to the drastic changes in the system's dynamics. When electrical state variables change rapidly, the step size is reduced to ensure accuracy; when changes are gradual, the step size is increased to improve computational efficiency, thus achieving an optimal balance between simulation accuracy and speed.

[0136] The forward integration solution of the edge digital twin model is based on the state snapshot as the initial condition. The variable step size integration algorithm is used to iteratively solve its inherent differential algebraic equations, thereby continuously advancing the simulation time and gradually calculating the values ​​of all electrical state variables at each time point in the future time domain.

[0137] The solver is paused when a future timestamp is reached. At this precise moment, the model parameters corresponding to the control command are adjusted, such as changing the switch state or controller mode, and applied to the model. Then, integration continues based on this instantaneous model state, ensuring that the simulation can realistically simulate the dynamic effects of the control action being executed at a specific point in time.

[0138] The evolution trajectory is obtained by recording the value of each electrical state variable at fixed, high-frequency intervals during the ultra-real-time forward integration process. These data points, arranged in chronological order, constitute a continuous trajectory reflecting the dynamic changes of the state variables. Obtaining the evolution trajectory of the electrical state variables is to fully capture the continuous process of the microgrid's dynamic response after the execution of control commands. This trajectory reveals the transition path of the system from the current state to the future state and is the only data basis for analyzing stability, identifying oscillations, and calculating performance indicators such as maximum offset.

[0139] The Nyquist sampling frequency refers to the minimum sampling rate required to reproduce the highest frequency component of a continuous signal without distortion; its value is equal to twice the highest frequency component of the signal. Recording the evolution trajectory at a rate higher than the Nyquist sampling frequency is to comply with the sampling theorem, ensuring that all high-frequency dynamic components during the transient process of the microgrid, such as short-circuit inrush current and power oscillations, can be completely captured and accurately reproduced, avoiding information distortion and spurious frequency phenomena caused by insufficient sampling.

[0140] Throughout the simulation process, the dynamic evolution trajectory of electrical state variables is recorded at a rate much higher than the Nyquist sampling frequency, for example, once every 0.5 milliseconds, forming a predicted state time series, including: node voltage amplitude time series, system frequency time series, distributed power output time series, distributed power active or reactive power output time series, and energy storage SOC time series.

[0141] In summary, the above steps transform the future impact of control commands into quantifiable and analyzable high-precision dynamic data. This system can not only proactively identify and intercept high-risk commands that may cause voltage overruns or frequency instability, thus building a digital security defense line, but also provide operators with intuitive basis for optimizing control commands by comparing the trajectories and performance indicators under different control commands. Ultimately, it realizes a transformation in microgrid control from passive response to proactive early warning and optimization, significantly improving the reliability, economy, and intelligence of system operation.

[0142] As an optional approach, when the performance indicators meet the preset safety constraint set, the circuit devices in the microgrid are controlled by control commands, including: comparing the performance indicators with the preset safety constraint set, wherein the performance indicators include at least one of the following: maximum voltage deviation, maximum frequency deviation, stability margin, and available transmission capacity; issuing an alarm when the performance indicators exceed the corresponding preset safety constraint range, wherein the preset safety constraint set includes preset safety constraints corresponding to each performance indicator; and controlling the circuit devices according to the control commands when the performance indicators are within the preset safety constraint set range.

[0143] After the simulation, the recorded predicted state time series was analyzed to calculate the quantified performance indicators: maximum frequency offset, maximum voltage offset, stability margin, and available transmission capacity.

[0144] Maximum voltage / frequency offset reflects transient extremes, stability margin characterizes the system's disturbance rejection capability, and transmission capacity can be used to assess line capacity margin. Performance indicators condense complex dynamic responses into key decision-making criteria, enabling rapid quantitative assessment of safety risks.

[0145] The preset safety constraint set can also be combined with the evolution trajectory of electrical state variables to analyze the changing trends of performance indicators in the time dimension, helping to determine whether there are potential safety risks. For example, the fluctuation amplitude and duration of voltage offset in the evolution trajectory.

[0146] Microgrid security requires multi-dimensional protection: voltage constraints prevent equipment insulation damage, frequency constraints prevent generator disconnection, stability margin ensures dynamic resilience, and transmission capacity constraints prevent line overload. Only by constructing a complete set of constraints covering multiple dimensions such as electrical, stability, and equipment can systemic risks be fully avoided.

[0147] Comparing performance metrics with a pre-defined set of safety constraints is the core logic for objectively assessing system security through quantitative data. The set of safety constraints defines the rigid boundaries for stable system operation. If all metrics do not exceed the boundaries within the prediction time domain, it proves that the control commands will not cause instability risks and meet the conditions for safe execution.

[0148] The system will traverse the complete time series data of each performance indicator and automatically compare it with the upper and lower limits of the preset safety constraint set point by point. It will only be judged as globally compliant when all indicators meet the constraints at all future times. Any violation of the limit at any time will result in verification failure.

[0149] Specifically, the performance metrics are compared with a preset set of safety constraints, including:

[0150] The edge aggregation node loads a preset set of security constraints from its local configuration database. This preset set of security constraints is pre-defined based on State Grid guidelines, equipment technical specifications, and park operation experience, and includes the following:

[0151] Frequency deviation range: The instantaneous frequency remains within the range of [49.0Hz, 51.0Hz];

[0152] Voltage deviation range: The per-unit value of the bus voltage is maintained within the range of [0.90pu, 1.10pu];

[0153] Line thermal stability limit: The load rate of the transmission line shall not exceed 110% of the rated capacity within 10 minutes;

[0154] Equipment safety operating area: The charging and discharging power of the energy storage unit shall not exceed the rated power, and the state of charge shall be maintained between [15%, 95%].

[0155] Automatically compare performance metrics with a preset set of safety constraints:

[0156] Frequency verification: The predicted lowest frequency of 49.2Hz is within the range of [49.0Hz, 51.0Hz];

[0157] Voltage verification: The predicted minimum voltage of 0.91 pu is within the range of [0.90 pu, 1.10 pu];

[0158] Line power flow verification: The predicted status time series shows that the peak power flow of the line has not exceeded the 110% limit;

[0159] Equipment status verification: The predicted energy storage output and state of charge change curves are both within the safe operating range.

[0160] Since the performance index did not touch or cross the boundary of the safety constraint set during the entire prediction time domain t=0 to 10s, the planned control command was determined to be safe and executable, and the control circuit device was then controlled according to the control command.

[0161] If the simulation results show that the frequency will drop to 48.8Hz, the frequency verification will fail, the planned control command will be deemed unsafe, and the subsequent process will be terminated. At the same time, an alarm event will be generated with the content: Control command terminated: the predicted frequency is below the safe lower limit, and the operation and maintenance personnel will be notified.

[0162] As an optional approach, the microgrid holographic topology map is constructed and updated in real time based on the electrical topology and real-time operating data of the microgrid. This includes: constructing a basic topology map by using circuit devices as nodes and electrical connections as edges; mapping real-time operating data onto the basic topology map and performing global state estimation of the microgrid using a Kalman filter algorithm to obtain an electrical state snapshot; fusing the electrical state snapshot with non-electrical dimension data of the circuit devices to obtain the microgrid holographic topology map; and updating the microgrid holographic topology map based on the real-time operating data.

[0163] The electrical topology is a diagram showing the physical connections of all circuit devices in a microgrid. It originates from standardized model files used in the microgrid planning and design phase. By parsing these standardized model files, device identifiers, types, and electrical connections can be extracted. The basic topology diagram is a static network skeleton containing only physical connections, consisting of device nodes and connecting edges.

[0164] Mapping real-time operational data to the basic topology requires associating real-time operational data with each device node, ensuring timing consistency through timestamp alignment and data cleaning. Global state estimation can employ either Kalman filtering or weighted least squares methods.

[0165] The Kalman filter method takes the state estimate from the previous moment and the current measurement as input, and calculates the state quantities that cannot be directly measured through a prediction-correction loop to obtain a globally consistent electrical state snapshot.

[0166] The weighted least squares method is used to establish a state estimation model. A weight matrix is ​​constructed based on the sensor accuracy, and the Gauss-Newton method is used to solve iteratively. After bad data detection and removal, an electrical state snapshot is obtained.

[0167] Both methods can provide a reliable electrical state snapshot data basis for holographic topology maps. Kalman filtering is suitable for continuous state tracking of dynamic systems, while weighted least squares is suitable for fitting cross-sectional data and removing bad data in steady-state systems.

[0168] An electrical status snapshot is the electrical state of a microgrid's circuitry at a specific moment, serving as a baseline for system data. Non-electrical dimension data includes equipment models, operating temperatures, and maintenance records. The integration of these two data sources can construct a multi-dimensional knowledge system, supporting multi-factor analysis for fault diagnosis and risk assessment.

[0169] The microgrid holographic topology map integrates static topology, dynamic electrical status, and multi-dimensional equipment attributes, providing a panoramic data base for fault location and edge digital twin model simulation. Based on real-time operation data updates, it can ensure that it is synchronized with the actual power grid structure and operation status, avoiding decision-making errors caused by outdated data.

[0170] Specifically, a basic topology diagram representing the physical relationships between devices is constructed, including: edge aggregation nodes first loading a pre-configured microgrid model file based on the Common Information Modeling Standard. The microgrid model file describes the static physical information of the campus microgrid, including:

[0171] Equipment list: Identifiers, equipment models, rated power, and capacity of circuit devices. For example, the identifiers, equipment models, rated power, and capacity of photovoltaic inverter PV-INV-01, energy storage converter BESS-PCS-01, load Load-A, smart switch SW-01, smart switch SW-02, and smart switch SW-03.

[0172] Connection relationships: describes the physical electrical connections between devices; for example, SW-01 connects to the upstream power grid and the bus, PV-INV-01 is connected to the bus via SW-02, and Load-A is connected to the bus via SW-03.

[0173] Line parameters: the type and length of the cables connecting the devices, and from this, the line impedance parameters, including resistance and reactance, are calculated.

[0174] The edge aggregation node parses the microgrid model file and constructs a basic topology graph representing the physical connections between devices: circuit devices are used as nodes and assigned static attributes, including device ID and device type; physical electrical connections are used as edges to connect device nodes and assigned static attributes, including line impedance.

[0175] The edge aggregation node communicates with the field intelligent sensing terminals via an industrial Ethernet interface: based on the IEEE C37.118 protocol, it collects voltage and current phasor data from the phasor measurement unit at a frequency of 50 times per second; based on the Modbus TCP protocol, it reads the effective values ​​of voltage and current, active and reactive power, and cumulative energy data from the smart meter at a frequency of once per second; and through Modbus TCP, it reads temperature sensor data and the on / off status of the smart switch at a frequency of once every 5 seconds.

[0176] Edge aggregation nodes maintain time synchronization with the GPS clock source via a network time protocol and assign standard timestamps to the collected data. They perform validity checks on the collected data, such as removing null values ​​caused by communication anomalies and bad values ​​that are significantly outside the normal physical range, like 0 voltage and infinite current. Missing data points are then filled using linear interpolation of adjacent points. The cleaned real-time data is associated with device objects in the basic topology diagram. For example, voltage phasor data collected from the phasor measurement unit PMU-01 is dynamically mapped to the real-time attributes of the PV-INV-01 node in the basic topology diagram.

[0177] Specifically, global state estimation and electrical snapshot generation include:

[0178] The edge aggregation node uses an extended Kalman filter-based state estimation algorithm to construct a state vector containing voltage amplitude and phase angle. Taking a base topology map mapped to real-time measurement data as input, and measurement data from phasor measurement units and smart meters as observations, it iteratively performs prediction and correction calculations using line impedance parameters and Kirchhoff's laws in the base topology map.

[0179] A preliminary prediction is made, assuming that the state of the microgrid will not change drastically in the instant, that is, the state determined in the previous moment is taken as the predicted state in the current moment; an error covariance matrix is ​​added to represent the process noise, that is, the random disturbance that occurs in the system itself from the previous moment to the current moment; the Jacobian matrix representing the relationship between the state and the measurement in the microgrid is calculated, and the Kalman gain is calculated; the measurement residual between the actual measurement value and the theoretical measurement value calculated based on the predicted state is calculated, and the Kalman gain is used to weight it and add it back to the initial prediction value to obtain the updated state estimate and update the error covariance matrix.

[0180] After the algorithm converges, the global electrical state of the microgrid at a certain moment, such as 2025-10-24 01:21:00.120, is obtained, which is the electrical state snapshot; the electrical state snapshot includes the voltage phasors of the nodes and the power flow distribution of the branches.

[0181] Electrical state snapshots are fused with collected non-electrical dimension data to create real-time operational data with multi-dimensional dynamic attributes. This data is then labeled and updated on nodes and edges of the base topology graph. For example, at a certain moment, the BESS-PCS-01 node not only has a static device model but is also labeled with dynamic attributes, such as: electrical attributes: voltage amplitude = 381.2V, phase angle = -2.5°, output power = 150kW; non-electrical attributes: operating temperature = 45.2℃, maintenance record = "normal inspection". The above steps are repeated to construct and maintain a holographic topology graph of the microgrid that can characterize the multi-dimensional state of the microgrid.

[0182] This invention constructs a basic topology map, integrates periodically collected electrical and non-electrical multi-source heterogeneous data, and uses the Kalman filter algorithm for global state estimation, thereby realizing the description of multi-dimensional information of microgrids. It constructs a holographic topology map of microgrids that can characterize the multi-dimensional state of microgrids, providing a data foundation for subsequent graph neural network fault diagnosis and improving the situational awareness and decision support capabilities of intelligent microgrid monitoring systems.

[0183] As an optional solution, after the microgrid holographic topology map is constructed and updated in real time based on the electrical topology and real-time operating data of the microgrid, it also includes: collecting real-time operating data and comparing the real-time operating data with preset fault triggering conditions; when the real-time operating data triggers the fault triggering conditions, performing fault location based on the fault characteristics in the microgrid holographic topology map and real-time operating data through a graph neural network fault diagnosis model; sending isolation commands based on fault location and updating the microgrid holographic topology map.

[0184] like Figure 5 As shown, the edge aggregation node periodically samples and monitors real-time operating data to achieve microgrid fault diagnosis and isolation: it acquires real-time operating data of circuit devices and constructs or updates the holographic topology map of the microgrid; when fault characteristics are detected, it extracts the dynamic attribute sequence before and after the fault and inputs it into the graph neural network fault diagnosis model, outputs the node fault probability to determine the fault location; it identifies the smart switch required for isolation based on the topology map, issues isolation commands and monitors the execution status, and synchronously updates the status of the holographic topology map.

[0185] Edge aggregation nodes periodically collect real-time operating data of circuit devices through communication interfaces with intelligent sensing terminals, including phasor measurement units and smart meters. Voltage or current phasors, power, and energy data are collected at corresponding frequencies based on protocols such as Industrial Ethernet and Modbus TCP, and timestamps are synchronized using network time protocols to ensure timing consistency. Data preprocessing is then performed, removing communication anomalies and out-of-range values ​​(e.g., voltage 0, current infinite), and missing data points are filled using linear interpolation of adjacent points. Finally, the cleaned data is mapped to device objects in the basic topology diagram, providing data support for subsequent fault feature extraction and model input.

[0186] Preset fault triggering conditions include sudden drops in voltage amplitude, sharp increases in current amplitude, and abnormal frequency fluctuations. The system continuously analyzes real-time data uploaded by the sensor terminals. When any electrical quantity exceeds a threshold, the fault diagnosis process is automatically triggered. After a fault is triggered, the dynamic attributes of nodes and the connection status data of edges before and after the fault occurs are extracted from the real-time updated microgrid holographic topology map to form a dynamic attribute graph sequence. This sequence is completely consistent with the physical connection relationship of the microgrid holographic topology map, ensuring the spatial correlation of fault characteristics.

[0187] The fault characteristics are manifested as the spatiotemporal propagation correlation of electrical quantity abrupt changes. After the fault condition is triggered, based on the dynamic electrical attributes such as node voltage or current phasors and frequency recorded in the microgrid holographic topology map, combined with the abrupt change characteristics in the real-time operation data, such as a sharp increase in current and a sudden drop in voltage, the dynamic attribute map sequence before and after the fault occurs is extracted from the topology map. The dynamic attribute map sequence is the data source basis of the fault characteristics and serves as the input data of the graph neural network fault diagnosis model.

[0188] The system extracts the dynamic attribute graph sequence before and after the fault occurrence from the holographic topology map and uses it as input data for the graph neural network fault diagnosis model.

[0189] like Figure 6 As shown, the fault localization process of the graph neural network fault diagnosis model includes: first, after detecting the fault triggering condition, extracting the dynamic attribute sequence before and after the fault and inputting it into the GNN (Graph Neural Network) fault diagnosis model; the graph neural network fault diagnosis model iteratively aggregates neighbor features through graph convolutional layers to capture the spatial propagation correlation of the fault, learns the time dependency relationship through recurrent neural network layers, decodes the dynamic evolution pattern of the fault and generates a hidden state vector; then, the fault probability score is output through fully connected layers and Softmax classification, and finally the fault source is determined by comparing the probabilities and the fault localization result is output.

[0190] Specifically, fault triggering and data capture include: the edge aggregation node continuously analyzes real-time operational data collected from the sensing terminal. At a certain moment, it is detected that the data uploaded by the smart sensing terminal associated with SW-03 exhibits a preset fault trigger condition: the current amplitude instantly surges to more than 5 times the rated value, while the voltage amplitude drops sharply to below 0.9 pu; after the fault condition is triggered, a dynamic attribute map sequence is immediately captured from the real-time updated microgrid holographic topology map.

[0191] For example, based on the time of failure Centered on the node, 10 time steps are taken forward and 10 time steps are taken backward, with a time step length of 20ms, resulting in a dynamic attribute graph sequence containing 21 graph snapshots, which records the node's voltage and current phasors, frequency, and temperature.

[0192] Specifically, the feature extraction of the graph neural network fault diagnosis model consists of a stacked 2-layer graph attention network and a single-layer bidirectional long short-term memory network with 128 hidden units. The graph attention network is followed by the ReLU activation function. During training, the Adam optimizer is used with a learning rate of 0.001 and a weighted cross-entropy loss function. The training is conducted for 100 epochs, using a dataset containing simulation data of 10,000 fault scenarios under different operating conditions.

[0193] The feature extraction process includes: taking the extracted dynamic attribute graph sequence as input to the graph neural network fault diagnosis model; the rows in the node feature matrix correspond to the circuit device, and the feature vector is composed of voltage amplitude, voltage phase angle, current amplitude, current phase angle, frequency and operating temperature.

[0194] The adjacency matrix is ​​determined based on the physical and electrical connections of the basic topology graph and is a static matrix. The graph attention network captures the spatial distribution pattern of fault current propagation from the fault point to various parts of the power grid by weighted aggregation of the characteristics of each node itself and the characteristics of its directly connected neighbor nodes and branches.

[0195] For example, the features of Load-A node are aggregated with the features of SW-03 node; conversely, SW-03 also aggregates the features of Load-A and other nodes on the bus; through iterative calculation, the spatial distribution pattern of fault current flowing from the fault point Load-A through SW-03 to various parts of the power grid is captured.

[0196] After processing by the graph neural network, a new sequence of feature maps is obtained and fed into the long short-term memory network layer. The long short-term memory network processes 21 feature maps in chronological order and outputs the final hidden state vector.

[0197] Specifically, the output of fault classification and fault location includes:

[0198] The final hidden state vector is input into a fully connected layer for dimensionality transformation, and then passed through a Softmax classifier. The Softmax classifier outputs normalized fault probability scores for the nodes in the microgrid holographic topology map. The fault probability scores are between 0 and 1, and the sum of the fault probability scores of the nodes is 1. For example, Load-A is 0.96, SW-03 is 0.02, PV-INV-01 is 0.005, and the remaining nodes are all less than 0.001.

[0199] The intelligent microgrid monitoring system analyzes the output of Softmax to identify the circuit device with the highest fault probability score as the fault source. It then outputs the fault location, including the fault source's identifier and its position in the topology diagram. For example, Load-A's score is 96%, significantly higher than other nodes. Therefore, the system determines Load-A as the fault source and outputs the fault location, including the fault source's identifier and its position in the topology diagram.

[0200] As an optional approach, an isolation command is sent based on fault location, and the microgrid holographic topology map is updated. This includes: determining the isolation boundary device of the faulty component based on the fault location and the microgrid holographic topology map; wherein the isolation boundary device includes a smart switch that is directly electrically connected to the faulty component; generating an isolation command based on the isolation boundary device and sending it to the isolation boundary device; confirming the execution result of the isolation command based on the status information and real-time operating data of the isolation boundary device; and updating the microgrid holographic topology map based on the execution result.

[0201] After receiving the fault location results, the edge aggregation node searches upstream and downstream along the electrical connection path in the microgrid holographic topology map with the faulty component as the center. The selection rule is to select the nearest smart switch with controllable disconnection capability, thereby determining the isolation boundary device, minimizing the isolation of the fault area, and reducing the impact on the power supply of non-faulty areas.

[0202] For each identified isolation boundary device, a standardized control command message is generated, containing the device address, trip operation code, security authentication key, and execution timestamp. The security authentication uses a hash-based message authentication code (HMAC) to ensure the integrity, authenticity, and tamper-proof nature of the command, preventing malicious command attacks. The command message is broadcast via industrial Ethernet to ensure that the intelligent terminals of the isolation boundary devices can quickly receive, parse, and execute it.

[0203] After the edge aggregation node issues a command, it simultaneously initiates a dual verification mechanism to ensure the accurate execution of isolation actions. The dual verification mechanism refers to confirming the execution result through device status change verification and electrical characteristic verification.

[0204] When both verification conditions are met simultaneously, the isolation command is deemed to have been successfully executed. The system immediately updates the microgrid holographic topology map, changing the connection status attribute of the isolation boundary device from closed to open. This ensures that subsequent operations such as fault diagnosis and edge digital twin model simulation are based on the latest topology, forming a closed-loop control process of fault location, isolation execution, and topology update.

[0205] Specifically, the retrieval and identification of isolation boundary devices includes:

[0206] The edge aggregation node received fault location information: the fault source is located in the cable segment downstream of SW-03, specifically on the cable line connected to load Load-A. A search is performed in the microgrid holographic topology map, centering on the fault source and extending upstream and downstream along the electrical connection path to find the nearest smart switch node with controllable disconnection capabilities. The search results confirm that the nearest upstream device is SW-03, and since it is an end load, there are no other smart switches downstream. Therefore, SW-03 is identified as the boundary device for this fault isolation.

[0207] Specifically, the generation and issuance of isolation commands include:

[0208] The edge aggregation node generates standardized control command messages for SW-03. In this example, the edge aggregation node creates an IEC61850 GOOSE message, with the fields filled in as follows:

[0209] Device address / logical node: Points to the logical node of SW-03, such as IED_SW03 / CSWI1, which indicates the switch controller of SW-03;

[0210] Trip operation code: Setting the control data attribute Pos.ctlVal to false indicates a trip operation; Security authentication key: The message uses a hash-based message authentication code to ensure the integrity of the instruction and the authenticity of its source, preventing malicious attacks;

[0211] Execution timestamp: The message contains a timestamp, and the status change counter increments, indicating that this is a new control command.

[0212] The GOOSE message is encapsulated in an Ethernet frame and broadcast directly to the substation's local area network via industrial Ethernet. The SW-03's intelligent terminal receives and parses the instructions.

[0213] Specifically, the confirmation of isolation actions and topology updates include:

[0214] After the isolation command is issued, the edge aggregation node immediately begins listening for status change return information from SW-03; after SW-03 successfully executes the trip operation, it immediately publishes a new GOOSE message, in which the position status attribute Pos.stVal changes from true to false; the edge aggregation node captures the message, thus obtaining direct evidence that the switch has successfully operated; the edge aggregation node continuously processes the real-time data stream uploaded from the phasor measurement unit and smart meter, looking for electrical features for corroborating confirmation:

[0215] The fault current disappears: The current value measured by the sensor installed upstream of SW-03 should drop rapidly from 5 times the rated current value at the time of the fault to close to zero;

[0216] Voltage recovery in non-faulty areas: The voltage in non-faulty areas of the microgrid should quickly recover from the sudden drop during the fault to near the normal rated value.

[0217] When the status change return information of SW-03 is received simultaneously, and the electrical characteristics of the disappearance of fault current and restoration of system voltage are detected, the isolation action is confirmed to have been successfully executed; the microgrid holographic topology is updated, and the operating status attributes of the nodes and edges representing SW-03 are changed from closed to open.

[0218] This invention determines isolation boundaries by retrieving the electrical adjacency relationships of faulty components in a holographic topology map, and generates and issues control commands containing security authentication using standardized industrial communication protocols. This achieves automated, closed-loop control from fault location to isolation execution, which not only shortens fault isolation time and limits the scope of power outage impact, but also ensures the accuracy and reliability of isolation actions through multi-source data cross-verification, avoiding misoperation and failure to operate, and improving the self-healing capability and power supply continuity of the microgrid.

[0219] As an optional approach, before predicting the cost data for local execution and migration execution based on computing tasks and edge aggregation nodes, the following steps are also included: obtaining the expected computational load of the computing task based on the type of computing task, metadata, and the number of nodes and branches in the microgrid holographic topology map; obtaining the computing load of the edge aggregation node through periodic sampling and quantization calculations using the operating system kernel interface and hardware performance counters built into the edge aggregation node; calculating and summing the real-time power consumption of each hardware component of the edge aggregation node based on the power supply voltage and current data of the edge aggregation node to obtain the total operating power consumption of the edge aggregation node; and collecting power supply data through power management integrated circuits, constructing a power consumption model, and obtaining the transmission power consumption based on the power consumption model.

[0220] The computational complexity is quantified based on the type of computational task and metadata, combined with the node and branch scale of the microgrid holographic topology map. The types of computational tasks include state estimation and digital twin simulation. Metadata includes the number of iterations and accuracy requirements. For example, the computational task of simulating the edge digital twin model, involving power flow calculations across 100 nodes, is quantified as 1 billion CPU cycles. The expected computational load is used to accurately predict task execution time and energy consumption, providing a quantitative basis for computing power scheduling.

[0221] The quantification of computing load is achieved by running a system monitoring agent on the edge aggregation node. This agent calls the operating system kernel interface and hardware performance counters every 1 second to collect multi-dimensional metrics, including real-time utilization of CPU cores, used and available memory capacity, and the current length and waiting time of the task scheduling queue. The average load over the past 1 minute, 5 minutes, and 15 minutes is calculated, and the raw data is finally formatted into structured data packets.

[0222] For example, when CPU utilization is detected at 75%, this can be converted to an available computing speed of 1.5 billion cycles per second based on the processor's clock speed. This computing load data dynamically reflects the remaining computing resources of edge nodes and is a core indicator for judging the local execution capability of tasks and providing a basis for subsequent computing power scheduling decisions.

[0223] Total operating power consumption is obtained by real-time acquisition of the supply voltage and current of modules such as the motherboard, processor, and memory through the power management integrated circuit. The power consumption of each unit is calculated using the formula P=U×I, and then summed. For example, if the processor power consumption is measured to be 12W, the memory power consumption to be 5W, and the communication module power consumption to be 3W, the total operating power consumption is 20W. Total operating power consumption is directly related to the energy cost of computing tasks and is a key input for achieving intrinsic energy sensing.

[0224] The power consumption model for edge aggregation node network communication is established based on historical data from power management chips, fitting a functional relationship between transmission rate and power consumption. For example, the network card power consumption at a transmission rate of 100Mbps was measured to be 2W. The power consumption model provides a predictive benchmark for communication energy consumption during computing task migration, ensuring that computing power scheduling decisions take into account transmission energy overhead.

[0225] During the initialization phase of the edge aggregation node, power management integrated circuits are used to collect power consumption data of the network communication module at different transmission rates to build a transmission rate-power consumption mapping model. When predicting cost data, the power consumption model is called to output the corresponding transmission power consumption based on the current real-time network bandwidth, i.e., the transmission rate, to ensure consistency with the hardware power consumption acquisition logic described above.

[0226] In summary, this system constructs a complete resource and energy consumption awareness system by accurately quantifying the expected computational load of computing tasks, monitoring the computing load and total operating power consumption of edge aggregation nodes in real time, and establishing a transmission power consumption model. This lays a solid foundation for accurately predicting the cost data of local execution and migration execution, enabling the optimal decision-making based on computing power scheduling methods, and ultimately achieving efficient and energy-saving allocation and execution of computing tasks.

[0227] It should be noted that this embodiment also provides an optional implementation method, which will be described in detail below.

[0228] This embodiment provides a method for global state estimation using weighted least squares. Based on weighted least squares, a state estimation model is established and iteratively solved to obtain an electrical state snapshot. The specific technical solution is as follows:

[0229] Estimation Triggering and Data Snapshot Generation: The state estimation task is triggered when changes in the microgrid holographic topology and operating conditions are detected; at the triggering time, a measurement snapshot containing available measurement values ​​is extracted from the real-time data; the measurement value z includes the bus voltage amplitude, branch active and reactive power flow, and node injected active and reactive power.

[0230] Constructing a state estimation model: Define the state variable x to be solved, and the measurement value z is the sum of the power flow equation h(x) of the power network with respect to the state variable x and the measurement error vector e;

[0231] Constructing the weight matrix W: Based on the sensor information, construct a diagonal weight matrix W, where the diagonal element Wii is the reciprocal of the variance of the error of the i-th measurement value;

[0232] Iterative solution: The Gauss-Newton method is used to solve the problem. In each iteration, the Jacobian matrix is ​​calculated, which is the partial derivative of the measurement with respect to the state variable and the current residual. Then, the linear correction equation is solved to update the state variable x. The iteration stops when the correction of the state variable is less than the preset convergence threshold.

[0233] Bad data detection and removal: After the iteration converges, the normalized residual is calculated; if the normalized residual of a measurement is greater than other measurement values, for example, more than 3, the measurement is identified as bad data and removed from the measurement set, and the state estimation is re-executed.

[0234] Generate an electrical state snapshot: The final converged state variable x is the operating state of the microgrid at the target time; based on the obtained solution, the voltage phasors of the nodes and the power flow distribution of the branches are calculated to form an electrical state snapshot.

[0235] This invention employs weighted least squares for global state estimation and uses a weight matrix constructed based on sensors to differentiate measurement data from different sources. This enables static fitting and bad data removal of redundant measurement data on the computational cross-section. While ensuring the robustness and reliability of the state estimation results, it is applicable to the generation of power grid snapshots under steady-state and quasi-steady-state conditions, thus providing a data foundation.

[0236] It should be noted that this embodiment also provides an optional implementation method, which will be described in detail below.

[0237] This embodiment provides another implementation of the graph neural network fault diagnosis model, namely, a graph attention network fault diagnosis model based on graph attention networks and long short-term memory networks. The specific technical solution is as follows:

[0238] Furthermore, when a preset fault triggering condition is detected, a sequence of dynamic attribute graphs before and after the fault occurrence is extracted from the microgrid holographic topology map and input into the graph attention network fault diagnosis model; spatiotemporal feature extraction is performed based on the graph attention network and long short-term memory network, and the final feature vector is output; the final feature vector is input into the fully connected layer and the Softmax classifier, and the normalized fault probability score of the circuit device is output, and the circuit device with the highest score is identified as the fault source, thus obtaining the fault location.

[0239] Specifically, graph attention network diagnostic models include:

[0240] Model loading: Edge aggregation nodes load pre-trained fault diagnosis models based on graph attention networks and long short-term memory networks using offline simulation data.

[0241] Spatial Feature Differentiation Aggregation Layer: The extracted dynamic attribute graph sequence is input into the spatial feature differentiation aggregation layer of the graph attention network diagnostic model. For the graph snapshot at each time step in the dynamic attribute graph sequence, the graph attention network acts as a node in the graph, dynamically calculating the attention coefficients between the node and all its neighboring nodes to obtain a feature vector sequence representing the global state. The attention coefficients represent the correlation between the current node and its neighboring nodes when aggregating features. For example, if the fault occurs on the power cable - Cable05, when the graph attention network diagnostic model aggregates the features of the main bus - Bus01, the graph attention network will learn to assign high attention weights to the features from the power cable - Cable05, while assigning low weights to other normal lines connected to the same bus.

[0242] Time-dependent learning layer: The feature vector sequence is fed into the long short-term memory layer of the graph attention network diagnostic model, and the final hidden state vector is output.

[0243] This invention employs a graph attention network and introduces a self-attention mechanism in the feature aggregation stage. This enables differentiated and adaptive weighting of features of different nodes and branches along the fault propagation path, allowing the model to focus on electrical information. This improves the model's ability to capture fault features, its robustness to measurement noise, and the accuracy of fault location.

[0244] According to another aspect of the invention, a non-transitory machine-readable medium storing computer instructions for causing a computer to perform any of the methods described above is also provided.

[0245] According to another aspect of the present invention, a computer program product is also provided, comprising a computer program / instructions that, when executed by a processor, implement the method described above.

[0246] Embodiments of the present invention also provide an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, which, when executed by the at least one processor, causes the electronic device to perform the method of the embodiments of the present invention.

[0247] refer to Figure 7 The present invention will now describe a structural block diagram of an electronic device that can serve as an embodiment of the present invention, serving as an example of a hardware device applicable to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0248] like Figure 7 As shown, the electronic device includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 702 or a computer program loaded into a random access memory (RAM) 703 from a storage unit 708. The RAM 703 may also store various programs and data required for the operation of the electronic device. The computing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0249] Multiple components in the electronic device are connected to I / O interface 705, including: input unit 706, output unit 707, storage unit 708, and communication unit 709. Input unit 706 can be any type of device capable of inputting information into the electronic device. Input unit 706 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of the electronic device. Output unit 707 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 708 may include, but is not limited to, disks and optical discs. Communication unit 709 allows the electronic device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, and / or wireless communication transceivers, such as Bluetooth devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0250] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, CPUs, graphics processing units (GPUs), various special-purpose artificial intelligence (AI) computing units, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above. For example, in some embodiments, the method embodiments of the present invention can be implemented as computer programs tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on an electronic device via ROM 702 and / or communication unit 709. In some embodiments, the computing unit 701 can be configured to perform the methods described above by any other suitable means (e.g., by means of firmware).

[0251] Computer programs for implementing the methods of embodiments of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0252] In the context of embodiments of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable signal medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, or infrared systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0253] It should be noted that the term "comprising" and its variations used in the embodiments of this invention are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The modifications of "one" and "a plurality" mentioned in the embodiments of this invention are illustrative and not restrictive, and those skilled in the art should understand that unless explicitly indicated otherwise in the context, they should be understood as "one or more".

[0254] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this invention are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0255] The steps described in the method embodiments provided by the present invention can be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of protection of the present invention is not limited in this respect.

[0256] The term "embodiment" in this specification refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily imply the same embodiment, nor does it imply independence or alternativeity from other embodiments. The various embodiments in this specification are described in a related manner, with reference to each other for similar or identical parts. In particular, for apparatus, device, and system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, and relevant details are referred to in the description of the method embodiments.

[0257] The above-described embodiments are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of protection. It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.

Claims

1. An edge-computing-based intelligent microgrid control method, characterized in that, include: Upon receiving a control command, a computational task for simulation is generated based on the control command. Based on the computing task and the edge aggregation node, predict the cost data for local execution and migration execution; specifically, based on the expected computing volume of the computing task and the computing power load of the edge aggregation node, obtain the execution time of the computing task; The execution energy consumption is obtained based on the execution time and the total operating power consumption of the edge aggregation node; the transmission time of the computing task is obtained based on the data size of the computing task and the real-time bandwidth and latency of the computing task reaching the target edge aggregation node; the transmission energy consumption is obtained based on the transmission time and transmission power consumption; wherein, the cost data includes the execution time, the execution energy consumption, the transmission time, and the transmission energy consumption. Based on the cost data, a processing strategy is obtained through a computing power scheduling method; the processing strategy is used to determine whether the computing task is executed by a local edge aggregation node or a target edge aggregation node. When the computational task is performed at the local edge aggregation node, the control commands are simulated based on the microgrid holographic topology map and an edge digital twin model to obtain performance indicators; wherein, the microgrid holographic topology map is constructed and updated in real time based on the electrical topology and real-time operating data of the microgrid; wherein, the performance indicators include at least one of the following: maximum voltage offset, maximum frequency offset, stability margin, and available transmission capacity; When the target edge aggregation node performs the computing task, the computing task is sent to the target edge aggregation node, and the performance index returned by the target edge aggregation node is received. The target edge aggregation node is configured to simulate the control command based on the microgrid holographic topology map and the edge digital twin model to obtain the performance index. When the performance indicators meet the preset safety constraint set, the circuit devices in the microgrid are controlled by the control commands. 2.The edge computing based intelligent microgrid control method of claim 1, wherein, Based on the cost data, a processing strategy is obtained through a computing power scheduling method; the processing strategy is used to determine whether the computing task is executed by a local edge aggregation node or a target edge aggregation node, including: An execution cost function is established based on the execution time and energy consumption of the computation task; a migration cost function is established based on the transmission time and energy consumption of the computation task. Based on the execution cost function and the migration cost function, calculate the local execution cost of the local edge aggregation node and the migration execution cost of migrating to the target edge aggregation node, respectively. The processing strategy is determined based on the relationship between the local execution cost and the migration execution cost. 3.The edge computing based intelligent microgrid control method of claim 2, wherein, Based on the relationship between the local execution cost and the migration execution cost, the processing strategy is determined, including: If the local execution cost is less than or equal to the migration execution cost, a processing strategy is generated to execute the computation task at the local edge aggregation node; If the local execution cost is greater than the migration execution cost, a processing strategy is generated to migrate the computing task to the target edge aggregation node for execution. 4.The edge computing based intelligent microgrid control method of claim 1, wherein, Before obtaining performance indicators by simulating the control commands based on the microgrid holographic topology map and using an edge digital twin model, the following steps are also included: Based on the holographic topology of the microgrid and the mechanism model corresponding to the circuit device, an initial edge digital twin model is constructed; The real-time operating data is mapped to the initial edge digital twin model, and the dynamic state variables of the circuit device are updated to obtain the updated edge digital twin model. According to a preset cycle, the simulation operation data of the updated edge digital twin model is compared with the real-time operation data measured by the physical microgrid, and the deviation value is calculated using the recursive least squares method. Based on the deviation value and the preset deviation threshold, the physical parameters of the updated edge digital twin model are adjusted to obtain the optimized edge digital twin model. 5.The edge computing based intelligent microgrid control method of claim 1, wherein, Based on the holographic topology of the microgrid, the control commands are simulated using an edge digital twin model to obtain performance indicators, including: A state snapshot is obtained based on the state variables of the edge digital twin model synchronized with the physical microgrid at the current moment; Based on the control command, model parameter adjustment values ​​are obtained; wherein, the model parameter adjustment values ​​have a future timestamp. Based on the state snapshot and the model parameter adjustment values, the edge digital twin model is simulated to obtain the evolution trajectory of electrical state variables and generate a predicted state time series. Based on the predicted state time series, performance indicators are calculated. 6.The edge computing based intelligent microgrid control method of claim 5, wherein, Based on the state snapshot and the model parameter adjustment values, the edge digital twin model is simulated to obtain the evolution trajectory of electrical state variables and generate a predicted state time series, including: Based on the state snapshot, the edge digital twin model is solved by forward integration using a variable step size integration algorithm to reach the future timestamp and obtain the instantaneous model state. Based on the instantaneous model state and the model parameter adjustment values, the evolution trajectory is obtained through simulation using the edge digital twin model; The evolution trajectory is recorded at a rate higher than the Nyquist sampling frequency to obtain the predicted state time series. 7.The edge computing based intelligent microgrid control method of claim 1, wherein, When the performance indicators meet a preset set of safety constraints, the control commands control the circuit devices in the microgrid, including: The performance indicators are compared with the preset set of security constraints; An alarm is triggered when the performance index exceeds the corresponding preset safety constraint range, wherein the preset safety constraint set includes preset safety constraints corresponding to each performance index. When the performance indicators are within the range of the preset safety constraint set, the circuit device is controlled according to the control command. 8.The edge computing based intelligent microgrid control method of claim 1, wherein, The microgrid holographic topology map is constructed and updated in real time based on the electrical topology and real-time operating data of the microgrid, including: Using the circuit devices in the electrical topology as nodes and the electrical connections in the electrical topology as edges, a basic topology graph is constructed. The real-time operating data is mapped onto the basic topology diagram, and the Kalman filter algorithm is used to perform global state estimation of the microgrid to obtain an electrical state snapshot; The electrical state snapshot is fused with the non-electrical dimension data of the circuit device to obtain the holographic topology map of the microgrid; The microgrid holographic topology map is updated based on the real-time operating data. 9.The edge computing based intelligent microgrid control method of claim 1, wherein, The microgrid holographic topology map, constructed and updated in real time based on the microgrid's electrical topology and real-time operating data, also includes: Collect the real-time operating data and compare the real-time operating data with preset fault triggering conditions; When the fault triggering condition is triggered by the real-time operating data, the fault location is performed by a graph neural network fault diagnosis model based on the microgrid holographic topology map and the fault characteristics in the real-time operating data. Based on the fault location, an isolation command is sent, and the microgrid holographic topology is updated. 10.The edge computing based intelligent microgrid control method of claim 9, wherein, Based on the fault location, an isolation command is sent, and the microgrid holographic topology is updated, including: Based on the fault location and the microgrid holographic topology, the isolation boundary device of the faulty component is determined; wherein, the isolation boundary device includes a smart switch that is directly electrically connected to the faulty component; Based on the isolation boundary device, the isolation command is generated and sent to the isolation boundary device; Based on the status information of the isolation boundary device and the real-time operating data, confirm the execution result of the isolation command; Based on the execution results, the microgrid holographic topology map is updated. 11.The edge computing based intelligent microgrid control method of claim 1, wherein, Before predicting the cost data for local execution and migration execution based on the aforementioned computing tasks and edge aggregation nodes, the process also includes: Based on the type of computing task and metadata, and the number of nodes and branches in the microgrid holographic topology map, the expected computational load of the computing task is obtained. The computing load of the edge aggregation node is obtained through periodic sampling and quantization calculations using the operating system kernel interface and hardware performance counters built into the edge aggregation node. Based on the power supply voltage and current data of the edge aggregation node, the real-time power consumption of each hardware component of the edge aggregation node is calculated and summed to obtain the total operating power consumption of the edge aggregation node. Power supply data is collected through a power management integrated circuit, a power consumption model is constructed, and the transmission power consumption is obtained based on the power consumption model.

12. An electronic device comprising: A processor and a memory storing a program, characterized in that the program includes instructions that, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 11.

13. A non-transitory machine-readable medium having stored thereon computer instructions, wherein: The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 11.

14. A computer program product comprising computer programs / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method of any one of claims 1 to 11.

Citation Information

Patent Citations

  • Online available transmission capacity computing method based on distribution factor

    CN101895116A

  • Method and area electric power system detecting islanding by employing controlled reactive power injection by a number of inverters

    CN102170141A