A master micro multi-layer flexibility coordination planning method and device

CN122456482BActive Publication Date: 2026-09-11TIANJIN TIANDIAN RUILIAN ENERGY TECH CO LTD +4
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610921441.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-25
Publication Date
2026-09-11
Estimated Expiration
2046-06-25

AI Technical Summary

Technical Problem

[0005]为解决现有供电或配电系统中主网、配电网和微电网规划过程中模型割裂、事故场景筛选计算量较大、配网转供能力和微网自治能力难以反馈至上层规划决策的问题,本发明提供一种主配微多层韧性协同规划方法及装置

Benefits of technology

[0019]In summary, this application uses a three-layer graph model to uniformly represent the main grid, distribution network, and microgrid. It uses a graph neural network to select representative high-risk scenarios from candidate disturbance scenarios. It decomposes and coordinates the main grid's power supply capacity, the distribution network's power transfer capacity, and the microgrid's islanded autonomy capacity under the representative high-risk scenarios. Furthermore, it uses a resilience contribution factor to feed back the contribution of planned resources to maintaining critical loads, reducing power outages, shortening recovery times, and ensuring continuous islanded power supply to the planning variable update process. This results in a joint planning outcome for microgrid access location, tie switch configuration, energy storage capacity, backup channels, and main grid boundary exchange power.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122456482B_ABST
    Figure CN122456482B_ABST
Patent Text Reader

Abstract

This invention relates to the field of resilience planning technology for power supply or distribution systems and energy storage systems, and discloses a multi-layered resilience collaborative planning method and device for main grid, distribution network, and microgrid. The method acquires equipment parameters, operating parameters, and candidate disturbance scenarios for the main grid, distribution network, and microgrid, and constructs a three-layer graph model including the main grid layer, distribution network layer, and microgrid layer. It then uses a graph neural network to screen representative high-risk scenarios; under the screened scenarios, it calculates the power supply bottleneck after a main grid failure, the reconfigurable topology and transfer capacity of the distribution network, and the sustainable power supply time of the microgrid islands; it updates the main grid-distribution boundary exchange power, microgrid access location, tie switch configuration, energy storage capacity, and backup channels through decomposition, coordination, and optimization, and corrects the planning variables based on resilience contribution factors. This invention enables the main grid power supply capacity, distribution network transfer capacity, and microgrid autonomy to be coordinated and matched in the same planning process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of power supply or distribution systems, energy storage systems and power system operation optimization technology, specifically to a resilient collaborative planning method and device under multi-layer coupling conditions of main grid, distribution network and microgrid. Background Technology

[0002] With the increasing scale of new energy power plants, energy storage stations, flexible loads, and microgrids, the scope of power system planning is gradually expanding from a single main grid or distribution network to a multi-layered system involving the main grid, distribution network, and microgrids. On the main grid side, attention is typically focused on substation power supply capacity, main-distribution boundary exchange power, and post-fault power supply bottlenecks. On the distribution network side, attention is focused on feeder power flow constraints, tie switch configuration, topology reconfiguration, and power transfer capacity. On the microgrid side, attention is focused on new energy output, energy storage status, critical load assurance, and islanded sustainable power supply time.

[0003] Existing planning methods often model and solve these objects separately, lacking a unified expression among the power supply capacity, distribution network transfer capacity, and microgrid autonomy after a main grid failure. Some methods can perform main grid-distribution coordination or microgrid scheduling, but they typically focus on coordinating operating power and struggle to simultaneously provide planning results for microgrid access locations, tie switch configurations, energy storage capacity, backup channels, and main grid-distribution boundary exchange power. Other methods perform planning verification by enumerating failure scenarios, but when faced with complex disturbances such as multiple faults, renewable energy fluctuations, load changes, and extreme weather, the large number of scenarios makes it difficult to balance computational efficiency and representativeness.

[0004] Therefore, a technical solution is needed that can uniformly describe the constraints of the main grid, the power flow constraints of the distribution network, and the autonomous constraints of the microgrid, and can collaboratively optimize multiple types of planning variables in high-risk scenarios, so that the islanding support capability of the microgrid and the power transfer capability of the distribution network can be fed back to the main grid and distribution network collaborative planning process. Summary of the Invention

[0005] To address the problems of fragmented models, large computational burdens in fault scenario screening, and difficulty in feeding back distribution network transfer capacity and microgrid autonomy capabilities to upper-level planning decisions in existing power supply or distribution systems, this invention provides a multi-layer resilient collaborative planning method and device for main grid, distribution network, and microgrids. This method takes the main grid boundary, feeder connections, microgrid access, energy storage stations, and backup power supply channels as planning objects. It maps main grid constraints, distribution network power flow constraints, and microgrid autonomy constraints into a unified three-layer graph model. A graph neural network is used to screen candidate disturbance scenarios for risk. Under the selected representative high-risk scenarios, the power supply bottleneck after a main grid fault, the reconfigurable topology and transfer capacity of the distribution network, and the sustainable power supply time of microgrid islands are calculated. Then, through decomposition, coordination, optimization, and the feedback of resilience contribution factors, iterative updates of planning variables are formed, enabling the main grid boundary exchange power, microgrid access location, interconnection switch configuration, energy storage capacity, and backup channels to be collaboratively determined in the same planning process.

[0006] One aspect of this invention provides a multi-layered resilience collaborative planning method for the main grid, distribution network, and microgrid. This method first obtains the equipment parameters, operating parameters, load parameters, renewable energy output parameters, energy storage parameters, switch status parameters, and candidate disturbance scenarios for the main grid, distribution network, and microgrid. The main grid's equipment and operating parameters may include substation capacity, main grid line capacity, main grid channel availability status, main grid node load, upper limit of main-distribution boundary switching power, main grid power supply capacity after a fault, and main grid geographical risk status. The distribution network's equipment and operating parameters may include feeder topology, line impedance, line capacity, node voltage constraints, node load, sectionalizing switch status, tie switch status, feeder affiliation, radial constraints, and remaining power supply margin of adjacent feeders. The microgrid's equipment and operating parameters may include microgrid access point location, access capacity, predicted renewable energy output, energy storage capacity, energy storage state of charge, energy storage charging and discharging power, critical load demand, flexible load reduction ratio, and islanded operation power balance constraints. The candidate disturbance scenarios can be formed by a combination of multiple faults caused by main grid line outages, reduced power supply capacity of substations, distribution network feeder faults, unavailability of tie switches, low output of new energy sources, peak load, limited initial energy of energy storage, and extreme weather.

[0007] After obtaining the above parameters, a three-layer graph model is constructed based on the equipment parameters, operating parameters, load parameters, renewable energy output parameters, energy storage parameters, and switch status parameters. The three-layer graph model includes a main grid layer, a distribution network layer, and a microgrid layer, connected by boundary coupling relationships. Nodes in the three-layer graph model include substations, feeders, tie switches, microgrid access points, energy storage stations, flexible loads, and renewable energy sites. Edges include main-distribution boundary edges, feeder tie edges, distribution-microgrid access edges, and backup channel edges. The main grid layer is used to express substation capacity, main grid channel capacity, power supply capacity after a main grid accident, upper limit of main-distribution boundary exchange power, and main grid geographical risk status. The distribution network layer is used to express feeder affiliation, line capacity, node load, sectionalizing switch status, tie switch status, voltage constraints, radial constraints, and the range of loads that can be transferred. The microgrid layer is used to express microgrid access capacity, renewable energy predicted output, energy storage state of charge, energy storage charging and discharging power, critical load demand, adjustable proportion of flexible loads, and islanding operation constraints. The main-distribution boundary edge is used to connect substation nodes in the main grid layer and feeder nodes in the distribution network layer. The feeder tie edge is used to express the reconfigurable connection relationship between different feeders formed by tie switches. The microgrid access edge is used to express the support relationship between the microgrid access point and the distribution network node. The backup channel edge is used to express the planned candidate backup power supply path. After per-unitization, missing value correction, and operation state encoding, the node attributes and edge attributes in the three-layer graph model form graph structure data that can be jointly invoked by graph neural networks and decomposition coordination optimization.

[0008] After constructing a three-layer graph model, the model and candidate disturbance scenarios are input into a graph neural network to obtain resilience risk scores for each scenario and select representative high-risk scenarios. The graph neural network includes a node feature encoding layer, an edge type encoding layer, a cross-layer message passing layer, a scenario disturbance fusion layer, and a risk score output layer. The node feature encoding layer encodes the features of different types of nodes, such as substations, feeders, tie switches, microgrid access points, energy storage stations, flexible loads, and new energy power plants. The edge type encoding layer encodes the edge attributes of main-distribution boundary edges, feeder tie edges, distribution-microgrid access edges, and backup channel edges. The cross-layer message passing layer transmits information such as power supply capacity, power flow constraints, access capacity, and islanding support capacity between the main grid layer, distribution network layer, and microgrid layer. The scenario disturbance fusion layer encodes equipment outages, output changes, load changes, and disaster impacts from candidate disturbance scenarios into the three-layer graph model. The risk score output layer outputs the resilience risk scores corresponding to the candidate disturbance scenarios.

[0009] During graph neural network training, historical fault records, power flow simulation results, distribution network reconfiguration results, microgrid islanding operation results, and recovery time records are used as training samples. The comprehensive resilience loss resulting from power outages, critical load loss ratios, recovery times, and microgrid islanding failure times is used as supervision labels. To ensure the model reflects the actual coupling relationships within the main grid, distribution network, and microgrid multi-layer system, each scenario in the training samples is associated with the corresponding three-layer graph node attributes, edge attributes, and disturbance vectors. In application, the graph neural network outputs a resilience risk score for each candidate disturbance scenario and selects representative high-risk scenarios based on the resilience risk score and graph embedding distance. By simultaneously considering the risk score and graph embedding distance, the selected scenarios are prevented from concentrating on a single fault type, ensuring that the selected scenarios cover different disturbance types such as main grid bottlenecks, limited distribution network power transfer, and insufficient microgrid autonomy.

[0010] Under the representative high-risk scenarios, the upper layer calculates the main grid power supply capacity and the power supply bottleneck after an accident. During the upper layer calculation, based on the substation capacity, line capacity, backup channel capacity, safety verification results, and main-distribution boundary load demand of the main grid layer, the available power supply capacity of each main-distribution boundary under the representative high-risk scenarios is determined. For the power supply bottleneck index B_b,s of the b-th main-distribution boundary in scenario s, it can be calculated as B_b,s = max(0, D_b,s - C_b,s) / max(D_b,s, ε), where D_b,s represents the power supply demand of the b-th main-distribution boundary in scenario s, C_b,s represents the available power supply capacity of the b-th main-distribution boundary in scenario s, and ε represents a positive number to prevent the denominator from being zero. The power supply bottleneck index is used to return boundary power constraints to the distribution network layer and to determine the power supply areas that need to be transferred from the distribution network, supported by microgrid islands, or reinforced by backup channels.

[0011] In the representative high-risk scenario, the mid-level calculation of the distribution network's reconfigurable topology and transfer capacity is performed. During the mid-level calculation, the opening and closing states of tie switches and sectionalizing switches are used as topology reconfiguration variables, and the load recovery amount and transfer path of feeders are used as transfer variables. Under the conditions of satisfying distribution network radial constraints, node power balance constraints, line capacity constraints, node voltage constraints, switch operation count constraints, and main-distribution boundary power constraints, the tie switch configuration and transfer path for the representative high-risk scenario are determined. The transfer capacity T_f,s of feeder f in scenario s can be determined based on the available tie switch capacity, spare channel capacity, remaining power supply margin of adjacent feeders, transfer path voltage constraints, and fault isolation range. If the boundary power requested by the distribution network layer exceeds the power supply capacity returned by the main grid layer, the tie switch configuration and transfer path are adjusted to allow the distribution network layer to recover more load within the available boundary power range. If a critical load gap still exists after adjustment, the gap amount and gap location are transferred to the microgrid layer for islanding support calculation.

[0012] Under the aforementioned representative high-risk scenario, the lower-level calculation determines the sustainable power supply time of each microgrid island. During the calculation, the sustainable power supply time of each microgrid after disconnection from the distribution network is determined based on the microgrid access point location, predicted renewable energy output, energy storage state of charge, energy storage capacity, energy storage charging and discharging efficiency, critical load power, flexible load reduction ratio, and islanding power balance constraints. For the m-th microgrid, the energy storage energy can be updated within the discrete time period t according to E_m,t+1=E_m,t+η_ch·P_m,t^ch·Δt-P_m,t^dis·Δt / η_dis, where E_m,t represents the energy storage energy, P_m,t^ch represents the charging power, P_m,t^dis represents the discharging power, η_ch represents the charging efficiency, η_dis represents the discharging efficiency, and Δt represents the time step. The sustainable power supply time τ_m of a microgrid island is the longest time that can be maintained continuously when the constraints of energy storage, charging and discharging power, new energy output and flexible load reduction are all met, and the power supply ratio of critical loads is not lower than the preset ratio.

[0013] The calculation results from the upper, middle, and lower layers are used for decomposition, coordination, and optimization. During decomposition and coordination optimization, the global planning problem is decomposed into a main grid sub-problem, a distribution network sub-problem, and a microgrid sub-problem. The main grid sub-problem determines the main-distribution boundary exchange power and the post-fault power supply capacity. The distribution network sub-problem determines the tie switch configuration, reconfigurable topology, power transfer paths, and the availability of backup channels. The microgrid sub-problem determines the microgrid access location, energy storage capacity, islanding support strategy, and flexible load shedding. The three sub-problems are iterated using the main-distribution boundary exchange power, distribution-microgrid access capacity, unrecovered critical loads, and microgrid support power as coordination variables, gradually matching the upper-level main grid supply capacity, the middle-level distribution network power transfer demand, and the lower-level microgrid support capacity under the same set of boundary conditions.

[0014] The objective function F for decomposition and coordination optimization can be constructed as F = C_inv + C_op + α·EENS + β·T_rec - γ·R_micro, where C_inv represents the planned resource allocation cost, C_op represents the operating cost, EENS represents the expected amount of unsupplied power, T_rec represents the recovery time index, R_micro represents the microgrid autonomy contribution index, and α, β, and γ represent weighting coefficients. The planned resource allocation cost can correspond to the construction of microgrid access points, energy storage capacity configuration, tie switch configuration, and backup channel construction. The expected amount of unsupplied power is used to characterize the degree of load not being restored under representative high-risk scenarios. The recovery time index is used to characterize the time from the occurrence of an accident to the restoration of critical loads. The microgrid autonomy contribution index is used to characterize the microgrid's continuous support capability for critical loads in islanded mode. Decomposition and coordination optimization convergence is determined when the changes in the objective function, the main-distribution boundary exchange power, and the main planning variables in two adjacent rounds are all less than a preset threshold.

[0015] During the decomposition and coordination optimization process, the resilience contribution factor of each planned resource is calculated, and this resilience contribution factor is fed back to the next round of planning variable update process. When calculating the resilience contribution factor, microgrid access points, energy storage stations, tie switches, backup channels, and flexible load resources are respectively considered as candidate planned resources. For each candidate planned resource, the system resilience index when the resource is included and the system resilience index when the resource is not configured are calculated, and the resilience contribution factor of the resource is obtained based on the difference between the two and the resource configuration cost. For the q-th candidate planned resource, the resilience contribution factor RCF_q can be calculated according to RCF_q=(R_all-R_without_q) / max(C_q, ε), where R_all represents the system resilience index when the q-th candidate planned resource is included, R_without_q represents the system resilience index when the q-th candidate planned resource is not configured, C_q represents the configuration cost or capacity cost of the q-th candidate planned resource, and ε represents a positive number used to prevent the denominator from being zero. The system resilience index is determined by a weighted average of critical load retention capability, power outage reduction capability, recovery time reduction capability, and islanded continuous power supply capability.

[0016] When the resilience contribution factor is fed back to the next round of planning variable updates, the candidate retention weight and capacity refinement priority of resources with higher contribution factors are increased, while the allocation weight of resources with lower contribution factors is decreased, and decomposition and coordination optimization is re-executed. Through this feedback process, microgrid access points, energy storage stations, tie switches, backup channels, and flexible load resources are no longer merely lower-level constraints or static candidate resources, but participate in the main and distribution microplanning variable updates based on their marginal contribution to system resilience. This allows the autonomy of lower-level microgrids and the transfer capacity of mid-level distribution networks to inversely influence the main and distribution boundary exchange power and resource allocation results.

[0017] Another aspect of the present invention provides a multi-layered resilience collaborative planning device for main grid, distribution network, and microgrid. This device includes a data acquisition module, a three-layer graph construction module, a scenario filtering module, a main grid power supply capacity calculation module, a distribution network reconfiguration and transfer calculation module, a microgrid island autonomy calculation module, a decomposition and coordination optimization module, a resilience contribution factor feedback module, and a planning result output module. The data acquisition module is used to acquire equipment parameters, operating parameters, load parameters, renewable energy output parameters, energy storage parameters, switch status parameters, and candidate disturbance scenarios for the main grid, distribution network, and microgrid. The three-layer graph construction module is used to construct a three-layer graph model including the main grid layer, distribution network layer, and microgrid layer, and generate main-distribution boundary edges, feeder interconnection edges, distribution-microgrid access edges, and backup channel edges. The scenario filtering module is used to input the three-layer graph model and candidate disturbance scenarios into a graph neural network to obtain resilience risk scores and filter representative high-risk scenarios. The main grid power supply capacity calculation module is used to calculate the main grid power supply capacity and post-fault power supply bottlenecks. The distribution network reconfiguration and transfer calculation module is used to calculate the reconfigurable topology of the distribution network, interconnection switch configuration, and transfer capacity. The microgrid islanding autonomy calculation module is used to calculate the sustainable power supply time of the microgrid island. The decomposition and coordination optimization module is used to iteratively update the main distribution boundary exchange power, microgrid access location, tie switch configuration, energy storage capacity, and backup channels. The resilience contribution factor feedback module is used to calculate the resilience contribution factor of each planned resource and feed it back to the next round of planning variable update process. The planning result output module is used to output the main distribution microgrid multi-layer resilience collaborative planning results.

[0018] This invention also provides an electronic device. The electronic device includes a processor, a memory, and a communication interface. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned multi-layer resilience collaborative planning method for the main grid, distribution network, and microgrid. The communication interface is used to receive equipment parameters, operating parameters, load parameters, renewable energy output parameters, energy storage parameters, switch status parameters, and candidate disturbance scenarios from the main grid, distribution network, and microgrid sides. It is also used to output microgrid access location, tie switch configuration, energy storage capacity, backup channels, main-distribution boundary exchange power, representative high-risk scenarios, post-accident power supply bottlenecks, distribution network power transfer paths, and the ranking results of microgrid island sustainable power supply time and resilience contribution factors. The electronic device can be deployed on a power grid planning calculation platform, a distribution automation master station, a microgrid energy management system, or a regional energy management platform, and completes resilience collaborative planning under multi-layer coupling conditions of the main grid, distribution network, and microgrid by executing the computer program.

[0019] In summary, this application uses a three-layer graph model to uniformly represent the main grid, distribution network, and microgrid. It uses a graph neural network to select representative high-risk scenarios from candidate disturbance scenarios. It decomposes and coordinates the main grid's power supply capacity, the distribution network's power transfer capacity, and the microgrid's islanded autonomy capacity under the representative high-risk scenarios. Furthermore, it uses a resilience contribution factor to feed back the contribution of planned resources to maintaining critical loads, reducing power outages, shortening recovery times, and ensuring continuous islanded power supply to the planning variable update process. This results in a joint planning outcome for microgrid access location, tie switch configuration, energy storage capacity, backup channels, and main grid boundary exchange power.

[0020] Compared to planning methods that model the main grid, distribution network, and microgrid separately, this application can express the cross-layer coupling relationships between substations, feeders, tie switches, microgrid access points, energy storage stations, flexible loads, and new energy power plants within the same graph structure. This allows for coordination of the main grid's power supply capacity after a fault, the distribution network's transferable power range, and the microgrid's islanding support capability under unified constraints. Instead of enumerating and verifying all candidate disturbance scenarios one by one, this application utilizes graph neural networks to perform risk screening on candidate disturbance scenarios. This concentrates subsequent precise optimization on representative high-risk scenarios, reducing the computational burden of repetitive scenarios and ensuring that the scenario set covers different fault types and operational constraints. Compared to schemes that only output a single energy storage capacity, a single tie switch location, or a single operating power, this application can simultaneously output the microgrid access location, tie switch configuration, energy storage capacity, backup channels, and main-distribution boundary exchange power. This enables the planning results to cover multiple levels, including power supply capacity, grid reconfiguration, islanding support, and resource contribution feedback. Attached Figure Description

[0021] To more clearly illustrate the technical solution of this application, the accompanying drawings are briefly described below. The following drawings are used to illustrate the three-layer graph model, scene selection, decomposition coordination optimization, resilience contribution factor feedback, device structure, application scenarios and technical effects of this application, and do not constitute a limitation on the physical location of each module, the number of connections, the data interface form, the equipment scale or the scale of the illustration.

[0022] Figure 1 A schematic diagram of the overall process of the primary-secondary-micro multilayer resilience collaborative planning method provided in this application.

[0023] Figure 2 A schematic diagram of the three-layer graph model structure consisting of the main grid layer, distribution network layer and microgrid layer provided in this application.

[0024] Figure 3 This is a schematic diagram of the graph neural network scene selection process provided in this application.

[0025] Figure 4A schematic diagram illustrating the decomposition, coordination, optimization, and interaction of the main grid, distribution network, and microgrid provided in this application.

[0026] Figure 5 A schematic diagram illustrating the backhaul of resilience contribution factors and the updating of planning variables provided for this application.

[0027] Figure 6 A schematic diagram of the functional module structure of the main and auxiliary micro multilayer toughness collaborative planning device provided in this application.

[0028] Figure 7 A schematic diagram of the regional primary and secondary micro-coordinated planning application scenario provided for this application.

[0029] Figure 8 A comparative analysis diagram of the planning effects provided for this application. Detailed Implementation

[0030] The technical solution of this application will be clearly and completely described below with reference to the accompanying drawings. The specific embodiments described are used to illustrate the implementation process of this application and are not intended to limit the scope of protection of this application. In the absence of conflict, the technical features of the following specific embodiments can be combined with each other. For ease of explanation, the following description takes a regional power system containing main grid substations, distribution feeders, tie switches, microgrid access points, energy storage stations, flexible loads and new energy power plants as the object. The main grid layer is used to characterize the power supply capacity of the upper-level power source and the main distribution boundary, the distribution network layer is used to characterize the feeder topology, switch status and transfer path, and the microgrid layer is used to characterize the autonomous capability of distributed new energy, energy storage and critical loads in islanded state.

[0031] Example 1 This embodiment provides a primary-secondary-micro multilayer toughness collaborative planning method. (Refer to...) Figure 1 This method can be executed by a power grid planning and calculation platform, a distribution automation master station, a microgrid energy management system, or a regional energy management platform, or by an electronic device with a processor, memory, and communication interface. The electronic device receives data from the main grid side, the distribution grid side, and the microgrid side through the communication interface, executes program instructions in the memory through the processor, and outputs the multi-layer resilience collaborative planning results of the main grid, distribution grid, and microgrid.

[0032] In this embodiment, the method includes steps S101 to S107. Step S101 is used to obtain basic data and candidate disturbance scenarios for the main grid, distribution network, and microgrid. Step S102 is used to construct a three-layer graph model consisting of the main grid layer, distribution network layer, and microgrid layer. Step S103 is used to use a graph neural network to screen the candidate disturbance scenarios for resilience risk. Step S104 is used to calculate the main grid power supply capacity, distribution network transfer capacity, and microgrid island sustainable power supply time under representative high-risk scenarios. Step S105 is used to decompose, coordinate, and optimize the main grid sub-problem, distribution network sub-problem, and microgrid sub-problem. Step S106 is used to calculate the resilience contribution factor of the planned resources and feed it back to the next round of planning variable update process. Step S107 is used to output planning results such as microgrid access location, tie switch configuration, energy storage capacity, backup channel, and main-distribution boundary exchange power.

[0033] In step S101, the equipment parameters, operating parameters, load parameters, renewable energy output parameters, energy storage parameters, switch status parameters, and candidate disturbance scenarios of the main grid, distribution network, and microgrid are acquired. Main grid data may include substation rated capacity, transformer available capacity, main grid line capacity, main grid line operating status, upper limit of main-distribution boundary exchange power, main grid security verification results, and main grid geographical risk status. Distribution network data may include feeder topology, line impedance, line capacity, node load, sectionalizing switch status, tie switch status, feeder affiliation, node voltage upper and lower limits, fault isolation range, and remaining power supply margin of adjacent feeders. Microgrid data may include microgrid access candidate locations, microgrid access capacity, predicted output of distributed renewable energy, energy storage capacity, energy storage state of charge, energy storage charging and discharging power limits, critical load power, flexible load reduction ratio, and islanded operation power balance constraints.

[0034] Candidate disturbance scenarios can be generated based on historical fault records, meteorological disaster data, equipment status assessment results, renewable energy forecasting deviations, and load forecasting deviations. For regional power systems, candidate disturbance scenarios can include main grid line outages, substation power supply capacity reductions, distribution network feeder faults, unavailability of tie switches, low renewable energy output, peak loads, limited initial energy of energy storage, and composite scenarios of multiple faults caused by extreme weather. To enable data from different sources to participate in the calculation of the same planning period, the system can perform time alignment, unit unification, missing value correction, and outlier removal on the collected data. For continuous data, per-unit processing can be performed; for switch status, equipment availability status, and fault status, discrete state encoding can be performed; for geographical risk, disaster exposure, and equipment health status, risk feature values ​​can be mapped to preset levels.

[0035] In step S102, a three-layer graph model is constructed based on the data obtained in step S101. (Refer to...) Figure 2The three-layer graph model includes a main grid layer, a distribution network layer, and a microgrid layer. These three layers are coupled across layers via main-distribution boundary edges and distribution-microgrid access edges. Nodes in the main grid layer can include substation nodes, main grid bus nodes, and main grid channel nodes. Edges in the main grid layer can represent the power supply relationships between substations or main grid channels. Nodes in the distribution network layer can include feeder nodes, load nodes, sectionalizing switch nodes, tie switch nodes, and switchyard nodes. Edges in the distribution network layer can represent feeder connections, switch connections, and transferable power connections. Nodes in the microgrid layer can include microgrid access point nodes, renewable energy plant nodes, energy storage station nodes, flexible load nodes, and critical load nodes. Edges in the microgrid layer can represent the internal energy supply relationships within the microgrid and the access relationships between the microgrid and the distribution network.

[0036] The three-layer graph model can be represented as G = {G_T, G_D, G_M, E_TD, E_DM}, where G_T represents the main grid layer graph, G_D represents the distribution network layer graph, G_M represents the microgrid layer graph, E_TD represents the main-distribution boundary edge between the main grid layer and the distribution network layer, and E_DM represents the distribution-microgrid access edge between the distribution network layer and the microgrid layer. The main-distribution boundary edge expresses the power supply capacity and boundary exchange power constraints between substation nodes and feeder nodes. The feeder tie edge expresses the reconfigurable connection relationship formed between different feeders through tie switches. The distribution-microgrid access edge expresses the support capacity of the microgrid access point for the distribution network nodes. The backup channel edge expresses the planned candidate backup power supply path. Through the above graph structure, the power supply capacity after a main grid failure, the distribution network topology reconfiguration constraints, and the microgrid islanding autonomy constraints can be expressed in the same data structure.

[0037] In step S103, the three-layer graph model and candidate perturbation scenarios are input into the graph neural network to obtain the resilience risk score of each candidate perturbation scenario, and representative high-risk scenarios are selected. (Refer to...) Figure 3 A graph neural network can include a node feature encoding layer, an edge type encoding layer, a cross-layer message passing layer, a scenario disturbance fusion layer, and a risk score output layer. The node feature encoding layer maps different types of nodes, such as substations, feeders, tie switches, microgrid access points, energy storage stations, flexible loads, and new energy power plants, into node vectors of a unified dimension. The edge type encoding layer maps main-distribution boundary edges, feeder tie edges, distribution-microgrid access edges, and backup channel edges into edge type vectors. The cross-layer message passing layer transmits information such as power supply capacity, power flow constraints, access capacity, and islanding support capacity between the main grid layer, distribution network layer, and microgrid layer. The scenario disturbance fusion layer incorporates disturbance features such as equipment outages, output reductions, load increases, and disaster impacts into the graph representation. The risk score output layer outputs resilience risk scores for candidate disturbance scenarios.

[0038] During graph neural network training, historical fault records, power flow simulation results, distribution network reconfiguration results, microgrid islanding operation results, and recovery time records can be used as training samples. Each training sample includes a three-layer graph model, a scenario disturbance vector, and a resilience loss label. The resilience loss label can be weighted based on the amount of power lost, the proportion of critical load loss, recovery time, and microgrid islanding failure time. For the s-th candidate disturbance scenario, its resilience risk score can be expressed as r_s = f_θ(G, z_s), where G represents the three-layer graph model, z_s represents the disturbance vector of the s-th candidate disturbance scenario, f_θ represents the graph neural network, and θ represents the model parameters. In application, the system sorts the candidate disturbance scenarios according to r_s and performs redundancy removal screening based on graph embedding distance, ensuring that the selected representative high-risk scenarios include both high-risk scenarios and different types of main grid bottlenecks, distribution network power transfer restrictions, and insufficient microgrid autonomy.

[0039] In step S104, upper-layer, middle-layer, and lower-layer calculations are performed under representative high-risk scenarios. The upper-layer calculation calculates the main grid power supply capacity and the power supply bottleneck after the accident. For the power supply bottleneck index B_b,s of the b-th main distribution boundary in scenario s, it can be calculated as B_b,s=max(0,D_b,s-C_b,s) / max(D_b,s,ε), where D_b,s represents the power supply demand of the b-th main distribution boundary in scenario s, C_b,s represents the available power supply capacity of the b-th main distribution boundary in scenario s, and ε represents a positive number used to prevent the denominator from being zero. The larger B_b,s is, the larger the power supply gap of the main distribution boundary in the current scenario. The upper-layer calculation results return boundary power constraints to the distribution network layer to ensure that the distribution network reconfiguration and power transfer calculations do not exceed the actual power supply capacity of the main grid after the accident.

[0040] The middle layer calculates the reconfigurable topology and transfer capacity of the distribution network. Using the open / closed states of tie switches and sectionalizing switches as topology reconfiguration variables, and feeder load recovery and transfer paths as transfer variables, the middle layer determines the tie switch configuration and transfer paths for representative high-risk scenarios, while satisfying radial constraints, node power balance constraints, line capacity constraints, node voltage constraints, switch operation count constraints, and main-distribution boundary power constraints. The transfer capacity T_f,s of feeder f in scenario s can be determined based on available tie switch capacity, spare channel capacity, remaining power margin of adjacent feeders, transfer path voltage constraints, and fault isolation range. When the main-distribution boundary power requested by the distribution network layer exceeds the power supply capacity returned by the main network layer, the system adjusts the tie switch configuration and transfer paths; if a critical load gap still exists after adjustment, the gap amount and location are transmitted to the microgrid layer.

[0041] The lower layer calculates the sustainable power supply time of the microgrid island. For the m-th microgrid, the energy storage energy can be updated within the discrete time period t according to E_m,t+1=E_m,t+η_ch·P_m,t^ch·Δt-P_m,t^dis·Δt / η_dis, where E_m,t represents the energy storage energy, P_m,t^ch represents the charging power, P_m,t^dis represents the discharging power, η_ch represents the charging efficiency, η_dis represents the discharging efficiency, and Δt represents the time step. The sustainable power supply time τ_m of the microgrid island is the longest time that can be continuously maintained when the energy storage energy, charging and discharging power, renewable energy output, and flexible load reduction all meet the constraints, and the power supply ratio of critical loads is not lower than the preset ratio. Through this calculation, the lower layer can return information such as the microgrid's supporting power, the amount of critical loads it can support, and the islanding duration to the middle and upper layers.

[0042] In step S105, decomposition and coordination optimization are performed based on the calculation results of the upper, middle, and lower layers. (Refer to...) Figure 4 The global planning problem is decomposed into three sub-problems: the main grid sub-problem, the distribution network sub-problem, and the microgrid sub-problem. The main grid sub-problem determines the main-distribution boundary exchange power and the post-fault power supply capacity. The distribution network sub-problem determines the tie switch configuration, reconfigurable topology, power transfer paths, and the availability of backup channels. The microgrid sub-problem determines the microgrid access location, energy storage capacity, islanding support strategy, and flexible load shedding. The three sub-problems are iterated using the main-distribution boundary exchange power, distribution-microgrid access capacity, unrecovered critical loads, and microgrid support power as coordination variables.

[0043] The objective function F can be constructed as F = C_inv + C_op + α·EENS + β·T_rec - γ·R_micro, where C_inv represents the planning resource allocation cost, C_op represents the operating cost, EENS represents the expected amount of unsupplied power, T_rec represents the recovery time index, R_micro represents the microgrid autonomy contribution index, and α, β, and γ represent weighting coefficients. In one iteration, the main grid subproblem first gives the power supply capacity and boundary power constraints of the main and distribution boundaries. The distribution network subproblem calculates the reconfigurable topology and transfer paths under the boundary constraints. The microgrid subproblem calculates the access location, energy storage capacity, and islanding support strategy based on the amount of unrecovered critical loads. If the boundary power demand of the distribution network layer still exceeds the main grid power supply capacity, the system further adjusts the tie switch configuration, backup channels, and microgrid support strategies. If the microgrid islanding duration is insufficient, the system adjusts the energy storage capacity, flexible load reduction ratio, or microgrid access location. When the changes in the objective function, the changes in the main and distribution boundary exchange power, and the changes in the main planning variables in two adjacent iterations are all less than the preset thresholds, the decomposition coordination optimization is considered to have converged.

[0044] In step S106, the resilience contribution factor of each planning resource is calculated and fed back to the next round of planning variable update process. (Refer to...) Figure 5 Planning resources can include microgrid access points, energy storage stations, tie switches, backup channels, and flexible load resources. For the q-th candidate planning resource, the resilience contribution factor RCF_q can be calculated as RCF_q = (R_all - R_without_q) / max(C_q, ε), where R_all represents the system resilience index when the q-th candidate planning resource is included, R_without_q represents the system resilience index when the q-th candidate planning resource is not configured, C_q represents the configuration cost or capacity cost of the q-th candidate planning resource, and ε represents a positive number used to prevent the denominator from being zero. The system resilience index can be determined by a weighted average of critical load retention capability, out-of-power reduction capability, recovery time reduction capability, and islanded continuous power supply capability.

[0045] When resilience contribution factors are fed back, the system increases the candidate retention weight and capacity refinement priority of resources with higher contribution factors, while decreasing the configuration weight of resources with lower contribution factors. If a microgrid access point can significantly reduce the amount of critical loads without power and extend the islanded power supply time in multiple representative high-risk scenarios, then that microgrid access point will receive a higher retention weight in the next round of planning. If a tie switch or backup channel only plays a role in a few low-risk scenarios and contributes little to reducing power supply gaps, then its configuration weight will be reduced. Through this feedback mechanism, the selection of planned resources is no longer determined solely by the result of a single optimization, but rather updated based on the marginal contributions of resilience across multiple scenarios.

[0046] In step S107, the results of the multi-layer resilience collaborative planning for the main-distribution-microgrid system are output. The planning results may include microgrid access location, tie switch configuration, energy storage capacity, backup channels, main-distribution boundary exchange power, representative high-risk scenarios, post-fault power supply bottlenecks, distribution network power transfer paths, and the ranking of microgrid island sustainable power supply time and resilience contribution factors. The output results can be used for regional power grid planning, distribution network automation upgrades, microgrid access scheme design, energy storage capacity configuration, and backup power supply channel construction. (Refer to...) Figure 7 In the application scenario of regional main-distribution-micro coordinated planning, the system can determine the main-distribution boundary that needs to be strengthened based on the power supply bottleneck after the main grid accident, determine the configuration of tie switches and backup channels based on the reconfigurable transfer capacity of the distribution network, determine the microgrid access point and energy storage capacity based on the sustainable power supply time of the microgrid island, and form a resilient planning scheme for multiple representative high-risk scenarios.

[0047] Example 2 This embodiment, based on Embodiment 1, further illustrates the specific implementation methods for constructing the three-layer graph model and selecting graph neural network scenes. (Refer to...) Figure 2 and Figure 3This embodiment expresses the main grid constraints, distribution network power flow constraints, and microgrid autonomy constraints through a unified graph structure, and uses a graph neural network to screen candidate disturbance scenarios for risks, so that subsequent decomposition, coordination, and optimization focus on representative high-risk scenarios.

[0048] In this embodiment, the construction of the three-layer graph model begins with the standardization of data objects. The system first maps equipment objects in the main grid, distribution network, and microgrid to node objects, and maps electrical connections, switchable connections, access relationships, and backup power supply relationships between devices to edge objects. For the main grid layer, substations, main grid buses, and main grid channels can serve as main grid layer nodes. Node attributes include rated capacity, current available capacity, available capacity after an accident, backup capacity, upper limit of the main / distribution boundary power, historical failure rate, geographical risk level, and equipment availability status. For the distribution network layer, feeders, switching stations, sectionalizing switches, tie switches, distribution transformers, and load nodes can serve as distribution network layer nodes. Node attributes include feeder affiliation, load power, load level, line capacity, voltage upper and lower limits, switch status, transferable power ratio, fault isolation status, and remaining power supply margin of adjacent feeders. For the microgrid layer, microgrid access points, renewable energy power plants, energy storage stations, flexible loads, and critical loads can be used as microgrid layer nodes. Node attributes include access capacity, renewable energy predicted output, energy storage capacity, energy storage state of charge, energy storage charging and discharging power limits, critical load power, flexible load reduction ratio, islanded operation status, and microgrid support power limit.

[0049] When constructing node attributes, the system can standardize data of different dimensions. Capacity, voltage, current, power, energy storage energy, and load power can be normalized based on the regional planning benchmark capacity, rated voltage, rated current, or equipment rated value, respectively. Switch status, equipment availability status, fault isolation status, and microgrid connection / disconnection status can be represented by discrete state values. Geographic risk level, equipment health status, and disaster exposure can be converted into continuous risk characteristics according to a preset mapping relationship. For temporarily missing data, the system can correct it based on the historical average of similar equipment, the status of adjacent nodes, or data from the previous planning period, and attach a confidence label to the attribute, enabling the graph neural network and optimization model to identify data uncertainty.

[0050] Edge objects are used to represent the electrical connections and planning coupling relationships between nodes. The main-distribution boundary edge connects substation nodes in the main grid layer and feeder nodes in the distribution network layer. Its edge attributes include the upper limit of boundary exchange power, available power after a fault, boundary power direction, boundary equipment availability status, and main-distribution interface reliability. The feeder tie edge connects nodes in different feeders or different power supply zones in the distribution network layer. Its edge attributes include tie switch capacity, switch initial state, permissible operating state, transfer path impedance, transfer capacity, and switch operation cost. The distribution-microgrid access edge connects distribution network layer nodes and microgrid layer access point nodes. Its edge attributes include access capacity, access point voltage level, microgrid supportable power, grid-connected / off-grid switching status, and island support availability status. The backup channel edge connects nodes that can serve as backup power supply paths after a fault. Its edge attributes include backup capacity, activation conditions, channel distance, line capacity, and construction availability status.

[0051] In one possible implementation, the three-layer graph model can be represented as G = {V_T, V_D, V_M, E_T, E_D, E_M, E_TD, E_DM, E_B}. Here, V_T represents the set of nodes in the main grid layer, V_D represents the set of nodes in the distribution network layer, V_M represents the set of nodes in the microgrid layer, E_T represents the set of internal edges in the main grid layer, E_D represents the set of internal edges in the distribution network layer, E_M represents the set of internal edges in the microgrid layer, E_TD represents the set of edges at the main-distribution boundary, E_DM represents the set of edges connecting the distribution network and microgrid, and E_B represents the set of edges on the backup channels. For any node v, its node feature vector can be represented as x_v = [x_v^cap, x_v^load, x_v^state, x_v^risk, x_v^type], where x_v^cap represents capacity-related features, x_v^load represents load or output-related features, x_v^state represents operating state-related features, x_v^risk represents risk-related features, and x_v^type represents node type encoding. For any edge e, its edge feature vector can be represented as a_e = [a_e^limit, a_e^state, a_e^imp, a_e^type], where a_e^limit represents capacity or power limitation features, a_e^state represents edge availability, a_e^imp represents impedance or connection cost, and a_e^type represents edge type encoding.

[0052] The three-layer graph model is used not only for graph neural network scenario selection but also for generating constraint mapping relationships in subsequent decomposition and coordination optimization. The main-distribution boundary edge corresponds to the boundary power coordination variables between the main network subproblem and the distribution network subproblem. The feeder tie edge corresponds to the tie switch opening and closing variables in the distribution network subproblem. The microgrid access edge corresponds to the access capacity, islanding support power, and critical load support variables in the microgrid subproblem. The backup channel edge corresponds to the backup channel activation variables in the distribution network or main-distribution coordinated planning. Through these mappings, the nodes and edges of the three-layer graph model can directly correspond to planning variables, constraints, and output results, avoiding inconsistencies caused by using different data structures in the graph neural network selection and optimization solution stages.

[0053] During the candidate disturbance scenario generation phase, the system constructs a disturbance vector based on equipment outages, output fluctuations, load changes, and disaster impacts. For the s-th candidate disturbance scenario, the disturbance vector z_s can include the main grid equipment outage identifier, distribution network fault location, renewable energy output reduction factor, load growth factor, tie switch unavailability status, energy storage initial state of charge reduction factor, and disaster impact range code. If the scenario involves a single equipment fault, the corresponding equipment outage identifier in the disturbance vector is set to the fault state. If the scenario involves multiple faults caused by extreme weather, the disturbance vector can simultaneously include multiple equipment outage identifiers, disaster area codes, and equipment geographical risk amplification factors. If the scenario involves a superposition of low renewable energy output and peak load, the renewable energy output reduction factor and load growth factor in the disturbance vector are updated simultaneously.

[0054] The node feature encoding layer of the graph neural network receives node feature vectors from the three-layer graph model and encodes them with a unified dimension according to node type. For substation nodes, the encoding process focuses on power supply capacity, post-fault availability, and geographical risk. For feeder and tie switch nodes, the encoding process focuses on topological location, line capacity, switch availability status, and transfer capacity. For microgrid access points, energy storage stations, flexible loads, and renewable energy plant nodes, the encoding process focuses on islanding support capacity, energy storage status, renewable energy output, and load adjustability. After encoding, different types of nodes form an initial node embedding h_v^0 with the same dimension, enabling subsequent message passing layers to process cross-layer information in the same representation space.

[0055] The edge type coding layer receives edge feature vectors from the three-layer graph model and generates edge embeddings based on the edge type. The edge embedding of the main-distribution boundary edge reflects the capacity of the main grid to supply power to the distribution network and its availability after a fault. The edge embedding of the feeder tie edge reflects the distribution network's power transfer path and the operational capability of tie switches. The edge embedding of the microgrid access edge reflects the microgrid's support capability for distribution network nodes. The edge embedding of the backup channel edge reflects the backup power supply capacity that can be activated after a fault. Edge embeddings are used as weights or modulation factors in cross-layer message passing, constraining information transmission between adjacent nodes by edge capacity, edge state, and edge type.

[0056] The cross-layer message passing layer is used to update node embeddings. For node v, in the k-th layer message passing, the message m_uv^k can be calculated based on its neighboring nodes u, edge features a_uv, and the embedding h_u^(k-1) of the node in the previous layer, and h_v^k is updated after aggregating messages from neighboring nodes. This process can be represented as m_uv^k=φ_k(h_u^(k-1), h_v^(k-1), a_uv), h_v^k=ψ_k(h_v^(k-1), Σ_u∈N(v)m_uv^k), where φ_k represents the message function, ψ_k represents the update function, and N(v) represents the set of neighboring nodes of node v. For cross-layer edges, the message passing direction can be set according to electrical constraints and support relationships. For example, the main-distribution boundary edge can pass the available capacity after a main grid failure to the distribution network feeder nodes, or it can pass the distribution network load restoration demand in reverse to the main grid layer. The microgrid access edge can transfer the islanding support capability of the microgrid to the load nodes of the distribution network, and can also transfer the amount of critical loads that have not been restored to the microgrid layer.

[0057] The scenario disturbance fusion layer combines the disturbance vector z_s of candidate disturbance scenarios with node and edge embeddings. For equipment outage disturbances, the system adjusts the available state of the corresponding node or edge to a fault state and enhances the risk characteristics of that node or edge in the disturbance fusion layer. For low output disturbances from renewable energy sources, the system updates the output characteristics of renewable energy power station nodes according to a reduction factor. For peak load disturbances, the system updates the load demand characteristics of load nodes and critical load nodes according to a growth factor. For extreme weather disturbances, the system applies risk characteristic adjustments to the main grid channels, distribution feeders, tie switches, and renewable energy power stations within the disaster impact range. Through the scenario disturbance fusion layer, the graph neural network can generate different scenario graph representations for the same basic three-layer graph under different disturbance scenarios.

[0058] The risk scoring output layer is used to output the resilience risk score of candidate disturbance scenarios. The system first performs hierarchical pooling on all node embeddings to obtain the main network layer representation g_T,s, the distribution network layer representation g_D,s, and the microgrid layer representation g_M,s, respectively. Then, these three representations, along with the scenario disturbance vector, are input into the scoring function to obtain r_s. This process can be expressed as r_s = σ(W_r[g_T,s, g_D,s, g_M,s, z_s] + b_r), where σ represents the normalization function, W_r represents the weight matrix, and b_r represents the bias term. r_s can be normalized to the range of 0 to 1; a larger value indicates a higher potential impact of the candidate disturbance scenario on the system's resilience.

[0059] When training the graph neural network, the system can construct a training set based on historical operation records and offline simulation results. The input to the training samples includes a basic three-layer graph model, a perturbation vector, and updated scenario graph attributes. The output label is the comprehensive resilience loss. The comprehensive resilience loss L_s can be determined by weighting the power outage amount EENS_s, the critical load failure rate KLS_s, the recovery time T_rec,s, and the microgrid islanding failure time T_fail,s. For example, L_s = w_1·EENS_s + w_2·KLS_s + w_3·T_rec,s + w_4·T_fail,s, where w_1, w_2, w_3, and w_4 represent weight coefficients. The training objective is to ensure that the resilience risk score output by the graph neural network is consistent with the comprehensive resilience loss ranking. Mean squared error loss, ranking loss, or a combination of both can be used during training. To avoid the model learning only a single type of fault, the training set can be stratified and sampled according to main grid faults, distribution network faults, insufficient microgrid support, low renewable energy output, and complex disaster scenarios.

[0060] During the model application phase, the system calculates resilience risk scores for all candidate disturbance scenarios and selects representative high-risk scenarios. If only the top K scenarios are selected based on risk score ranking, the selected scenarios may be concentrated on the same feeder fault or the same area of ​​the main grid bottleneck. Therefore, the system introduces graph embedding distance constraints based on risk score ranking. For a set of selected scenarios S*, the selection priority of candidate scenario s can be determined by its risk score r_s and its minimum embedding distance d_s with the set of selected scenarios. d_s can be determined based on the Euclidean distance, cosine distance, or weighted topological distance between the scenario graph representations. The system prioritizes scenarios with higher risk scores and greater differences from the selected scenarios, ensuring that the final representative high-risk scenario set covers different fault locations, different power supply bottlenecks, different power transfer constraints, and different microgrid autonomy deficiencies.

[0061] In one possible implementation, the total number of candidate disturbance scenarios is N. The system first selects the top N_1 candidate scenarios based on resilience risk scores to form a candidate pool, and then selects K representative high-risk scenarios from the candidate pool based on graph embedding distance. N_1 can be greater than K to retain a sufficient range of high-risk candidates. K can be set according to computational resources and planning accuracy requirements, such as based on the number of candidate scenarios, the number of scenario types, and optimization solution time. If the planning period is long and computational resources are sufficient, K can be increased to improve scenario coverage; if a preliminary planning scheme needs to be formed quickly, K can be decreased and the priority of high-risk scenarios can be increased. All of the above values ​​can be adjusted according to the actual system scale and do not constitute a limitation on the protection scope.

[0062] Through the three-layer graph model and graph neural network scenario selection method in this embodiment, main grid power supply bottlenecks, distribution network topology reconfiguration, and microgrid island support can be expressed in the same graph structure. Candidate disturbance scenarios can be directly associated with the operating states of nodes and edges in the graph. The graph neural network can learn the risk propagation relationships between different levels and select scenarios that are both high-risk and representative from a large number of candidate disturbance scenarios. This processing method provides input conditions that are structurally consistent, have a controllable number of scenarios, and cover different disturbance types for subsequent decomposition, coordination, and optimization.

[0063] Example 3 This embodiment, based on Embodiments 1 and 2, further illustrates the specific implementation methods of the decomposed coordination optimization of the main grid, distribution network, and microgrid, as well as the feedback of resilience contribution factors. (Refer to...) Figure 4 and Figure 5 This embodiment breaks down the multi-layer resilience collaborative planning problem of main grid, distribution grid and microgrid into a main grid sub-problem, a distribution grid sub-problem and a microgrid sub-problem. It iterative coordination is carried out through boundary exchange power, distribution microgrid access capacity, unrecovered critical load amount and microgrid support power. At the same time, the resilience contribution of planning resources under multiple representative high-risk scenarios is fed back to the next round of planning variable update process.

[0064] In this embodiment, the inputs to the decomposition and coordination optimization include a three-layer graph model, a set of representative high-risk scenarios, node and edge attributes of the main grid layer, node and edge attributes of the distribution network layer, node and edge attributes of the microgrid layer, candidate microgrid access locations, candidate energy storage capacities, candidate tie switch configurations, candidate backup channels, and flexible load resource parameters. The outputs of the decomposition and coordination optimization include microgrid access locations, tie switch configurations, energy storage capacity, backup channels, main-distribution boundary exchange power, distribution network transfer paths, and the ranking results of microgrid island sustainable power supply time and resilience contribution factors.

[0065] The overall planning objective can be expressed as reducing the planned resource allocation cost, operational cost, expected power outage volume, and recovery time indicators under a representative set of high-risk scenarios, while incorporating the microgrid's autonomous contribution indicator into the objective function. The objective function F can be expressed as F = C_inv + C_op + α·EENS + β·T_rec - γ·R_micro, where C_inv represents the planned resource allocation cost, C_op represents the operational cost, EENS represents the expected power outage volume, T_rec represents the recovery time indicator, R_micro represents the microgrid's autonomous contribution indicator, and α, β, and γ represent weighting coefficients. The planned resource allocation cost C_inv can be formed based on microgrid access point construction, energy storage capacity configuration, tie switch configuration, and backup channel construction. The operational cost C_op can be formed based on power flow losses, switching operation costs, energy storage charging and discharging costs, and flexible load shedding costs under representative high-risk scenarios. The expected power outage volume EENS can be formed by weighting the scenario weights and unrestored load volumes of each representative high-risk scenario. The recovery time metric T_rec can be calculated based on the time required for fault isolation, power transfer operations, microgrid disconnection, and load restoration. The microgrid autonomy contribution metric R_micro can be calculated based on the microgrid islanding time, critical load retention rate, and microgrid support power.

[0066] The main network subproblem uses the main network layer diagram as a constraint and is primarily used to calculate the power supply capacity of each main and distribution boundary under representative high-risk scenarios and the power supply bottleneck after an accident. For the b-th main and distribution boundary and the s-th representative high-risk scenario, the main network subproblem determines the power supply capacity C_b,s based on the substation capacity, line capacity, backup channel capacity, accident outage status, and safety verification results, and calculates the power supply bottleneck index B_b,s based on the power supply demand D_b,s returned from the distribution network layer. The power supply bottleneck index B_b,s can be expressed as B_b,s=max(0,D_b,s−C_b,s) / max(D_b,s,ε), where ε represents a positive number used to prevent the denominator from being zero. The main network subproblem returns C_b,s and B_b,s to the distribution network subproblem, enabling the distribution network subproblem to perform topology reconfiguration and power transfer calculations under boundary power constraints.

[0067] The distribution network subproblem uses the distribution network layer diagram as a constraint object, mainly used to determine tie switch configuration, reconfigurable topology, power transfer paths, and the activation status of backup channels. Decision variables in the distribution network subproblem can include feeder side activation status x_e, tie switch status x_l, backup channel activation status x_bak, node load recovery ratio ρ_i, and power transfer path selection variable y_p. The distribution network subproblem needs to satisfy radial constraints, node power balance constraints, line capacity constraints, node voltage constraints, switch operation count constraints, and primary / distribution boundary power constraints. For node i, node power balance can be established according to the balance relationship between injected power, power transfer, microgrid support power, and load recovery power. For line or switch side e, active and reactive power flows do not exceed their capacity limits. For node voltage V_i, V_i is between preset upper and lower limits. For tie switches, the number of switch operations does not exceed the number allowed by the planning or operating procedures.

[0068] In the distribution network subproblem, if a feeder fault causes partial load loss, the system first isolates the faulty section based on the fault isolation range, and then searches for a transferable path based on the tie switch status and the availability of backup channels. The transfer capacity T_f,s of feeder f in scenario s can be determined based on the available tie switch capacity, backup channel capacity, remaining power margin of adjacent feeders, voltage constraints on the transfer path, and the fault isolation range. If the distribution network subproblem can restore all critical loads under the primary distribution boundary power constraints, a lower support requirement is passed to the microgrid subproblem. If the distribution network subproblem still has a critical load gap under the primary distribution boundary power constraints and transfer path constraints, the gap amount, gap location, restoration priority, and available microgrid nodes are passed to the microgrid subproblem.

[0069] The microgrid subproblem uses the microgrid layer diagram as a constraint and is mainly used to determine the microgrid access location, energy storage capacity, islanding support strategy, and flexible load shedding. Decision variables in the microgrid subproblem may include microgrid access decision u_m, energy storage capacity E_cap,m, energy storage charging and discharging power P_m,t^ch and P_m,t^dis, renewable energy absorption power P_m,t^ren, critical load power supply ratio λ_m,t, and flexible load shedding P_m,t^flex. The microgrid subproblem needs to satisfy constraints on energy storage renewal, energy storage charging and discharging power, energy storage state of charge upper and lower limits, renewable energy output, critical load power supply ratio, flexible load shedding, and islanding power balance.

[0070] For the m-th microgrid, within the discrete time period t, the energy storage capacity can be updated according to E_m,t+1=E_m,t+η_ch·P_m,t^ch·Δt-P_m,t^dis·Δt / η_dis, where E_m,t represents the energy storage capacity, P_m,t^ch represents the charging power, P_m,t^dis represents the discharging power, η_ch represents the charging efficiency, η_dis represents the discharging efficiency, and Δt represents the time step. Microgrid islanding power balance can be established based on renewable energy output, energy storage discharging power, energy storage charging power, critical load power, flexible load reduction, and internal microgrid losses. The sustainable power supply time τ_m for microgrid islanding is the longest time that can be continuously maintained when energy storage capacity, charging and discharging power, renewable energy output, and flexible load reduction all meet the constraints, and the power supply ratio of critical loads is not lower than a preset ratio. The microgrid subproblem returns τ_m, microgrid support power, and energy storage capacity requirements to the distribution network subproblem and the main grid subproblem.

[0071] During the decomposition and coordination process, the main grid subproblem, distribution network subproblem, and microgrid subproblem iterate using coordination variables. These variables include the main-distribution boundary exchange power P_TD,b,s, the distribution-microgrid access capacity P_DM,m,s, the unrestored critical load L_un,s, and the microgrid support power P_micro,m,s. In the initial iteration, initial coordination variables can be set based on the main-distribution boundary power under normal operating conditions, the existing tie switch status, and the existing microgrid access capacity. The main grid subproblem calculates the post-fault power supply capacity and bottlenecks based on P_TD,b,s. The distribution network subproblem updates the tie switch configuration and transfer paths based on the boundary power constraints returned from the main grid and calculates the unrestored critical load. The microgrid subproblem updates the microgrid access location, energy storage capacity, and islanding support strategy based on the unrestored critical load and distribution-microgrid access constraints. Subsequently, the distribution network subproblem and microgrid subproblem return the updated power demand and support capacity to the main grid subproblem for the next iteration.

[0072] In one possible implementation, decomposition and coordination optimization can take the form of multiplier update, cut plane update, or penalty function update. If the boundary exchange power requested by the distribution network sub-problem exceeds the boundary power that the main network sub-problem can provide, the penalty coefficient of the boundary power excess term is increased, causing the next round of distribution network sub-problem to tend to reduce the boundary power demand through transfer, microgrid support, or load reduction. If the islanded sustainable power supply time returned by the microgrid sub-problem is lower than the critical load support requirement, the weight of the corresponding microgrid access point or energy storage capacity variable is increased, causing the next round of optimization to prioritize improving the microgrid support capability of that area. If a backup channel can reduce the amount of unrestored critical load in multiple high-risk scenarios, the candidate weight for activating or constructing the backup channel is increased. Through the above coordination mechanism, the constraint conflicts between the main grid, distribution network, and microgrid can be gradually alleviated in the iteration.

[0073] The convergence criterion can be determined jointly based on changes in the objective function, changes in the exchange power at the main and distribution boundaries, and changes in the main planning variables. For the k-th iteration, if |F^kF^(k-1)| / max(|F^(k-1)|,ε_F) is less than the convergence threshold of the objective function, and the changes in the exchange power at each main and distribution boundary are less than the boundary power convergence threshold, and the main planning variables such as microgrid access location, tie switch configuration, energy storage capacity, and backup channels have not changed substantially in several consecutive iterations, then the decomposition coordination optimization is considered to have converged. If the convergence criterion is not fully satisfied even after reaching the maximum number of iterations, candidate schemes that currently meet the constraints to a higher degree can be output, and boundaries or scenarios that have not fully converged can be marked for subsequent local adjustments.

[0074] After completing one round of decomposition, coordination, and optimization, the system calculates the resilience contribution factor of the planned resources. Planned resources may include microgrid access points, energy storage stations, tie switches, backup channels, and flexible load resources. For the q-th candidate planned resource, the system calculates the system resilience index R_all when the resource is included and the system resilience index R_without_q when the resource is not configured, and obtains the resilience contribution factor RCF_q based on the resource configuration cost or capacity cost C_q. RCF_q can be expressed as RCF_q = (R_all - R_without_q) / max(C_q, ε), where ε represents a positive number to prevent the denominator from being zero.

[0075] System resilience indicators can be determined by weighting the critical load holding capacity, the ability to reduce power outages, the ability to shorten recovery time, and the ability to provide continuous power supply to islanded areas. For the s-th representative high-risk scenario, the system resilience indicator R_s can be expressed as R_s = μ_1·K_s + μ_2·ΔEENS_s + μ_3·ΔT_s + μ_4·τ_s, where K_s represents the critical load holding capacity indicator, ΔEENS_s represents the power outage reduction indicator, ΔT_s represents the recovery time shortening indicator, τ_s represents the microgrid islanding continuous power supply capacity indicator, and μ_1, μ_2, μ_3, and μ_4 represent weighting coefficients. The system resilience indicators under multiple representative high-risk scenarios can be weighted and summed according to the scenario weights. The scenario weights can be obtained by normalizing the resilience risk score output by the graph neural network, or they can be determined by the risk score and the probability of scenario occurrence.

[0076] When calculating R_without_q, the system can remove or disable the q-th candidate planned resource while keeping other planned resources unchanged, and recalculate the load recovery amount, recovery time, islanding support time, and critical load maintenance ratio under representative high-risk scenarios. For microgrid access points, removing the resource means not connecting the corresponding node to the microgrid or setting its support power to zero. For energy storage stations, removing the resource means setting the corresponding energy storage capacity to zero or excluding it from islanding support capacity. For tie switches, removing the resource means the tie switch cannot participate in topology reconfiguration. For standby channels, removing the resource means the channel does not participate in post-fault power supply. For flexible load resources, removing the resource means the load does not participate in load shedding or transfer. By comparing R_all and R_without_q, the marginal contribution of this resource to system resilience can be obtained.

[0077] When the resilience contribution factor is fed back, the system adjusts the planning variables for the next round based on RCF_q. For resources with high RCF_q, their candidate retention weight, local search priority, and capacity refinement priority are increased. For resources with low RCF_q and high configuration costs, their configuration weight is reduced or they are removed from the candidate set. For resources with negative or near-zero RCF_q, the system determines that they have not generated effective resilience contributions in the current representative high-risk scenario and can reduce their planning priority. For resources that contribute highly in one type of scenario but less in another, the system retains their scenario applicability identifier, enabling subsequent planning to selectively configure based on scenario type. Through feedback processing, the updates to the planning variables can reflect the relationship between multiple scenarios, multi-layered constraints, and marginal resource contributions.

[0078] Reference Figure 5 The resilience contribution factor feedback is used not only to adjust whether resources are retained, but also to adjust resource capacity and location. For microgrid access points, if their corresponding areas have high critical load gaps in both main grid failure and distribution network fault scenarios, and microgrid access can improve islanded power supply time, the system increases the candidate weight of the access point and searches for local access locations in its neighboring nodes. For energy storage stations, if increasing energy storage capacity can significantly extend islanded power supply time but further expansion reduces the contribution, the system can refine the capacity near the current capacity to avoid under- or over-configuration. For tie switches and backup channels, if they can improve power transfer capabilities in multiple scenarios, the system increases their configuration weight; if they only change the power flow path but do not reduce the amount of power lost or recovery time, their priority is reduced.

[0079] In a specific iterative process, the system first performs a decomposition and coordination optimization based on a representative set of high-risk scenarios to obtain the first round of planning schemes. Subsequently, the system calculates a resilience contribution factor for each candidate planning resource and updates the candidate set based on this factor. The updated candidate set then enters the second round of decomposition and coordination optimization. If the primary-distribution boundary switching power, microgrid access location, and energy storage capacity change during the second round of optimization, the system recalculates the resilience contribution factor and continues to transmit it back. This process is repeated until the decomposition and coordination optimization converges, or the ranking of resilience contribution factors remains stable over several consecutive rounds. Through this process, the system can gradually select resource combinations that contribute more to resilience improvement from a large number of candidate resources and form an implementable planning result.

[0080] Through the decomposition, coordination, optimization, and resilience contribution factor feedback method in this embodiment, the power supply bottleneck after a main grid failure can constrain the distribution network's power transfer process. The failure of the distribution network to restore critical loads can trigger microgrid islanding support calculations. The continuous power supply capability of microgrid islands can inversely affect energy storage capacity and access location. The resilience contribution factor can further feed back the marginal contribution of resources to the next round of planning variable update process. This approach forms a closed-loop planning relationship between the main grid, distribution network, and microgrids, enabling the coordinated determination of microgrid access location, tie switch configuration, energy storage capacity, backup channels, and main-distribution boundary exchange power under the same representative high-risk scenario set.

[0081] Example 4 This embodiment provides a primary-secondary multilayer toughness collaborative planning device. (Refer to...) Figure 6 This device can be deployed in power grid planning and calculation platforms, distribution automation master stations, regional energy management platforms, or microgrid energy management systems. It can also function as an independent planning and calculation server, interacting with the main grid dispatching system, distribution automation system, microgrid control system, energy storage management system, and new energy forecasting system. The device includes a data acquisition module, a three-layer graph construction module, a scenario selection module, a main grid power supply capacity calculation module, a distribution network reconfiguration and transfer calculation module, a microgrid islanded autonomous calculation module, a decomposition and coordination optimization module, a resilience contribution factor feedback module, and a planning result output module. Information is exchanged between these modules via an internal data bus, shared storage area, or message interface.

[0082] The data acquisition module is used to acquire equipment parameters, operating parameters, load parameters, renewable energy output parameters, energy storage parameters, switch status parameters, and candidate disturbance scenarios from the main grid, distribution network, and microgrid. The data received by this module includes the capacity of main grid substations, the availability status of main grid channels, the upper limit of the main-distribution boundary switching power, the topology of distribution network feeders, line capacity, node load, sectionalizing switch status, tie switch status, candidate locations for microgrid access, predicted renewable energy output, energy storage capacity, energy storage status of charge, critical load demand, the proportion of flexible load that can be reduced, and historical fault and meteorological disaster data. The data acquisition module also performs time alignment, missing value correction, outlier removal, unitization, and status coding on the collected data, enabling data from different systems to participate in calculations within the same planning period.

[0083] The three-layer graph construction module is used to construct a three-layer graph model consisting of the main grid layer, distribution network layer, and microgrid layer based on the parameters output by the data acquisition module. This module maps substations, feeders, tie switches, microgrid access points, energy storage stations, flexible loads, and new energy power plants as graph nodes, and maps the main-distribution boundary relationships, feeder tie relationships, distribution-microgrid access relationships, and backup channel relationships as graph edges. It also configures attributes such as capacity, load, status, risk, access capability, power transfer capability, and islanding support capability for nodes and edges. The three-layer graph construction module is also used to establish the mapping relationship between the graph model and planning variables, enabling the main-distribution boundary edges to correspond to the main-distribution boundary exchange power variable, the feeder tie edges to correspond to the tie switch opening / closing variable, the distribution-microgrid access edges to correspond to the microgrid access capacity and supporting power variable, and the backup channel edges to correspond to the backup channel activation or construction variable.

[0084] The scenario selection module inputs a three-layer graph model and candidate disturbance scenarios into a graph neural network to obtain resilience risk scores for each candidate disturbance scenario. Based on these scores and graph embedding distance, representative high-risk scenarios are selected. This module includes a node feature encoding unit, an edge type encoding unit, a cross-layer message passing unit, a scenario disturbance fusion unit, and a risk score output unit. The node feature encoding unit performs unified dimensional encoding on different types of nodes. The edge type encoding unit encodes edge attributes for main-distribution boundary edges, feeder connection edges, distribution-microgrid access edges, and backup channel edges. The cross-layer message passing unit transmits power supply capacity, transfer capacity, and islanding support capacity between the main grid layer, distribution network layer, and microgrid layer. The scenario disturbance fusion unit integrates equipment outages, output reductions, load increases, and disaster impacts into the graph representation. The risk score output unit outputs the resilience risk scores for candidate disturbance scenarios.

[0085] The main grid power supply capacity calculation module is used to calculate the main grid power supply capacity and post-accident power supply bottlenecks under representative high-risk scenarios. Based on the substation capacity, main grid line capacity, backup channel capacity, accident outage status, safety verification results, and the main-distribution boundary power supply demands returned from the distribution network layer, this module determines the available power supply capacity of each main-distribution boundary and calculates power supply bottleneck indicators. The boundary available power supply capacity and power supply bottleneck indicators output by this module are passed to the distribution network reconfiguration and transfer calculation module to constrain the boundary power requests and transfer path selection of the distribution network layer.

[0086] The distribution network reconfiguration and transfer calculation module is used to calculate the reconfigurable topology, tie switch configuration, and transfer capacity of the distribution network under representative high-risk scenarios. Based on the feeder topology, line capacity, node load, sectionalizer status, tie switch status, node voltage constraints, radial constraints, and primary / distribution boundary power constraints in the distribution network layer, this module determines the transferable paths and load restoration schemes after fault isolation. The module uses the open / closed states of tie switches and sectionalizer switches as topology reconfiguration variables, and load restoration amount and transfer paths as transfer variables, calculating the transfer capacity of each feeder while satisfying power flow constraints, voltage constraints, and switch operation constraints. If a critical load gap still exists after distribution network reconfiguration, this module transfers the gap location, gap capacity, and restoration priority to the microgrid islanded autonomous calculation module.

[0087] The microgrid islanding autonomy calculation module is used to calculate the sustainable power supply time of a microgrid island under representative high-risk scenarios. Based on the microgrid connection point location, predicted renewable energy output, energy storage state of charge, energy storage capacity, energy storage charge / discharge efficiency, critical load power, flexible load reduction ratio, and islanding power balance constraints, this module determines the microgrid's support capacity for critical loads after disconnection from the distribution network. The module calculates the energy storage changes in each discrete time period according to the energy storage update relationship, and, while satisfying the upper and lower limits of energy storage, charge / discharge power, renewable energy output, and critical load power supply ratio constraints, obtains the microgrid islanding sustainable power supply time, microgrid support power, and energy storage capacity requirements.

[0088] The decomposition and coordination optimization module coordinates the outputs of the main grid power supply capacity calculation module, the distribution network reconfiguration and transfer calculation module, and the microgrid islanding autonomy calculation module. This module decomposes the global planning problem into main grid sub-problems, distribution network sub-problems, and microgrid sub-problems, and iterates using the main-distribution boundary exchange power, distribution-microgrid access capacity, unrestored critical loads, and microgrid support power as coordination variables. The decomposition and coordination optimization module updates the microgrid access location, tie switch configuration, energy storage capacity, backup channels, and main-distribution boundary exchange power according to the objective function F=C_inv+C_op+α·EENS+β·T_rec-γ·R_micro, and determines whether the iteration converges based on changes in the objective function, boundary power, and key planning variables.

[0089] The resilience contribution factor feedback module calculates the resilience contribution factor of planned resources and feeds it back to the next round of planning variable update. This module uses microgrid access points, energy storage stations, tie switches, backup channels, and flexible load resources as candidate planned resources. It calculates the system resilience index with and without these resources, and obtains the resilience contribution factor based on the difference and resource allocation cost. Based on the resilience contribution factor, this module increases the candidate retention weight and capacity refinement priority of resources with higher contributions, decreases the allocation weight of resources with lower contributions, and then passes the updated candidate resource set to the decomposition and coordination optimization module.

[0090] The planning results output module is used to output the results of the multi-layer resilience collaborative planning for main, distribution, and microgrids. The output results include microgrid access locations, tie switch configurations, energy storage capacity, backup channels, main-distribution boundary exchange power, representative high-risk scenarios, post-accident power supply bottlenecks, distribution network power transfer paths, and the ranking of microgrid island sustainable power supply time and resilience contribution factors. The planning results output module can output results in the form of planning reports, data tables, graphical files, interface messages, or database records, and provide these results to power grid planners, distribution network transformation systems, microgrid access assessment systems, or energy storage capacity configuration systems.

[0091] In practical implementation, the data acquisition module can communicate with external systems through a data interface adapter unit. For main grid data, the data interface adapter unit can receive substation capacity, line capacity, load forecast, and safety verification results from dispatch automation systems, energy management systems, or planning databases. For distribution network data, the data interface adapter unit can receive feeder topology, switch status, line parameters, and load data from distribution automation master stations, geographic information systems, and distribution network asset systems. For microgrid data, the data interface adapter unit can receive energy storage status, renewable energy output forecasts, critical load demand, and flexible load adjustability from microgrid energy management systems, energy storage management systems, and renewable energy forecasting systems. The data acquisition module can set data quality identifiers to mark delayed, missing, and abnormal data, enabling subsequent modules to adjust calculation weights based on data reliability.

[0092] The three-layer graph construction module can be configured with a graph node generation unit, a graph edge generation unit, an attribute encoding unit, and a variable mapping unit. The graph node generation unit generates main grid layer nodes, distribution network layer nodes, and microgrid layer nodes based on equipment objects. The graph edge generation unit generates main-distribution boundary edges, feeder connection edges, distribution-microgrid access edges, and backup channel edges based on electrical connection relationships, switchable connection relationships, access relationships, and backup power supply relationships. The attribute encoding unit encodes capacity, load, voltage, power, risk, switch status, and equipment availability status. The variable mapping unit maps nodes and edges in the graph structure to planning and optimization variables, making the graph model not only an input to the neural network but also a data foundation for optimization solutions.

[0093] The graph neural network for the scenario selection module can be deployed in the planning computing platform after offline training. During the offline training phase, the module reads historical fault records, power flow simulation results, distribution network reconfiguration results, microgrid islanding operation results, and recovery time records to form training samples containing a three-layer graph model, disturbance vectors, and resilience loss labels. In the online application phase, after receiving candidate disturbance scenarios, the module calls the trained graph neural network to output resilience risk scores and combines this with graph embedding distance to select representative high-risk scenarios. To improve selection stability, the module can retain scenario type identifiers, ensuring that the final selected scenarios cover different types such as main grid accidents, distribution network faults, low renewable energy output, peak loads, and combined disasters.

[0094] The main grid power supply capacity calculation module can be implemented through a safety verification unit and a bottleneck identification unit. The safety verification unit determines the main grid's power supply capacity under representative high-risk scenarios based on the main grid equipment outage status, line capacity, and substation capacity. The bottleneck identification unit calculates power supply bottleneck indicators based on the main and distribution boundary power supply requirements and available power supply capacity, and outputs the main and distribution boundary where the bottleneck is located and the corresponding gap. The output of this module can serve as a boundary constraint for the distribution network reconfiguration and transfer calculation module, and can also be used as the post-accident power supply bottleneck result in the planning result output module.

[0095] The distribution network reconfiguration and transfer calculation module can be implemented through a fault isolation unit, a topology reconfiguration unit, a transfer capacity calculation unit, and a constraint verification unit. The fault isolation unit determines the power outage range and isolation boundary based on the faulty feeder or faulty section. The topology reconfiguration unit generates candidate reconfiguration topologies based on the status of tie switches and standby channels. The transfer capacity calculation unit calculates the recoverable load and transfer path under each candidate topology. The constraint verification unit verifies radial load distribution, line capacity, node voltage, and the number of switch operations. Topologies and transfer paths that meet the constraints are passed to the decomposition and coordination optimization module; candidate topologies that do not meet the constraints are deleted or downweighted.

[0096] The microgrid islanding autonomous calculation module can be implemented through an islanding state generation unit, an energy storage evolution unit, a critical load maintenance unit, and a flexible load adjustment unit. The islanding state generation unit determines the microgrids that need to be included in the islanding support calculation based on the gap locations transmitted from the distribution network layer and the microgrid access edge status. The energy storage evolution unit calculates the energy storage changes over discrete time periods based on the initial state of charge, storage capacity, charging and discharging power, and efficiency. The critical load maintenance unit determines the critical load power supply ratio based on critical load demand and the available power of the microgrid. The flexible load adjustment unit adjusts the islanding power balance according to the flexible load reduction ratio. These units work together to obtain the sustainable power supply time and microgrid support capability of the microgrid island.

[0097] The decomposition and coordination optimization module can be implemented by an optimization model generation unit, a sub-problem solving unit, a coordination variable updating unit, and a convergence judgment unit. The optimization model generation unit generates main grid sub-problems, distribution network sub-problems, and microgrid sub-problems based on the three-layer graph model and representative high-risk scenarios. The sub-problem solving unit solves each of the three sub-problems and generates results such as main-distribution boundary exchange power, tie switch configuration, energy storage capacity, and microgrid access location. The coordination variable updating unit updates coordination variables or penalty coefficients based on inconsistencies between sub-problems. The convergence judgment unit determines whether to stop iteration based on changes in the objective function, changes in main-distribution boundary exchange power, and changes in key planning variables. If convergence is not achieved, the decomposition and coordination optimization module continues to call the main grid power supply capacity calculation module, the distribution network reconfiguration and transfer calculation module, and the microgrid island autonomy calculation module for the next round of calculations.

[0098] The resilience contribution factor feedback module can be implemented through a resource elimination assessment unit, a resilience index calculation unit, a contribution factor ranking unit, and a candidate set update unit. The resource elimination assessment unit, while keeping other planned resources unchanged, evaluates the removal or disabling of candidate microgrid access points, energy storage stations, tie switches, backup channels, and flexible load resources. The resilience index calculation unit calculates the critical load retention capacity, power outage reduction capacity, recovery time shortening capacity, and islanded continuous power supply capacity with and without the resource. The contribution factor ranking unit ranks candidate resources according to the resilience contribution factor. The candidate set update unit adjusts the retention weight, capacity refinement priority, and configuration weight of resources in the next round of planning based on the ranking results.

[0099] The planning results output module can be configured with a report generation unit, a chart generation unit, and an interface output unit. The report generation unit generates text descriptions and parameter tables based on the planning results. The chart generation unit generates planning schematic diagrams and effect analysis diagrams based on microgrid access locations, tie switch configurations, energy storage capacity, backup channels, and main / distribution boundary switching power. The interface output unit outputs the planning results to external systems in the form of database records, structured files, or interface messages. For planning schemes requiring manual review, the planning results output module can simultaneously output a list of representative high-risk scenarios, main constraint boundaries, locations of unrestored loads, and a ranking of resilience contribution factors, enabling planners to verify the scheme formation process.

[0100] In this embodiment, each module can be implemented by a software program executed by the same processor, or by multiple processors, servers, or control nodes working together. For a centralized deployment, all modules can be deployed on the same planning computing server, supported by a unified database. For a distributed deployment, the main grid power supply capacity calculation module can be deployed on the main grid side computing node, the distribution network reconfiguration and transfer calculation module can be deployed on the distribution network side computing node, the microgrid island autonomy calculation module can be deployed on the microgrid side computing node, and the decomposition coordination optimization module and resilience contribution factor feedback module can be deployed on the regional collaborative planning node. The computing nodes exchange information through coordination variables such as main-distribution boundary exchange power, distribution-microgrid access capacity, unrestored critical loads, and microgrid support power.

[0101] Through the device structure of this embodiment, the method steps in Embodiments 1 to 3 can be executed by the corresponding modules. The data acquisition module corresponds to the data acquisition and scenario input process; the three-layer graph construction module corresponds to the three-layer graph model construction process; the scenario selection module corresponds to the graph neural network scenario selection process; the main grid power supply capacity calculation module, the distribution network reconfiguration and transfer calculation module, and the microgrid islanded autonomy calculation module correspond to the upper, middle, and lower layer calculation processes; the decomposition, coordination, and optimization module corresponds to the main grid, distribution network, and microgrid coordination solution process; the resilience contribution factor feedback module corresponds to the resource contribution assessment and planning variable feedback process; and the planning result output module corresponds to the final planning result output process. This device can complete resilience collaborative planning under multi-layer coupling conditions of the main grid, distribution network, and microgrid within a unified computing framework.

[0102] Example 5 This embodiment, using a regional primary-secondary micro-cooperative planning scenario, provides a detailed explanation of the implementation process of the technical solution of this application. (Refer to...) Figure 7The regional power system includes a 110kV / 10kV substation, six 10kV distribution feeders, several sectionalizing switches and tie switches, two microgrid candidate access areas, distributed photovoltaic power plants, energy storage candidate sites, flexible load resources, and critical loads such as hospitals, communication equipment rooms, water supply pumping stations, and emergency command centers. The 110kV / 10kV substation supplies power to the six 10kV feeders through the main distribution boundary. These feeders supply power to residential, industrial, commercial, and critical loads respectively. Some feeders are interconnected via normally open tie switches, enabling power transfer in case of an accident. The two microgrid candidate access areas are located at the ends and middle of feeders with high load density and high concentration of critical loads, respectively. This scenario illustrates how to achieve coordinated planning results for microgrid access location, tie switch configuration, energy storage capacity, backup channels, and main distribution boundary exchange power under conditions of main grid accidents, distribution network feeder faults, low renewable energy output, limited initial energy of energy storage, and overlapping peak loads.

[0103] In this embodiment, the basic conditions for the planned object can be set as follows: The 110kV / 10kV substation includes two main transformers, each with a rated capacity of 50MVA. Under normal operation, the total active power supply capacity that the main and distribution boundaries can provide to the distribution network is 80MW to 90MW. Considering the impact of main transformer maintenance, upstream line accidents, or extreme weather, the power supply capacity after an accident may decrease to 50MW to 65MW. The six 10kV feeders are designated as F1 to F6. The normal power supply capacity of a single feeder can be set to 8MW to 15MW according to the line cross-section and operating procedures. The voltage at the end of the feeder must be kept within the allowable range. Tie switches can be set between F1 and F2, F2 and F3, F3 and F4, F4 and F5, and F5 and F6. Some of these tie switches are currently in the normally open state and can be used as transfer paths after an accident. The total capacity of critical loads is approximately 8MW to 12MW, of which the hospital load is approximately 3MW, the communication equipment room load is approximately 1MW, the water supply pumping station load is approximately 2MW, and the emergency command center and other critical loads are approximately 2MW to 6MW. The above figures are used to illustrate the application method of this application. In actual projects, they can be replaced according to the equipment ledger of the planning area, load forecasts, and operating procedures.

[0104] The two candidate microgrid access areas are designated as M1 and M2. M1 is located at the end of feeder F2, near a hospital, communication equipment room, and some commercial loads. The area can accommodate approximately 2MW to 4MW of photovoltaic capacity, 4MWh to 10MWh of energy storage candidate capacity, and can reduce capacity by approximately 0.5MW to 1.5MW for flexible loads. M2 is located in the middle of feeder F5, near a water pumping station and emergency command center. The area can accommodate approximately 1MW to 3MW of photovoltaic capacity, 3MWh to 8MWh of energy storage candidate capacity, and can reduce capacity by approximately 0.3MW to 1.2MW for flexible loads. The state-of-charge (SOC) operating range of the energy storage system can be set from 20% to 90%, the charge / discharge efficiency can be set from 0.90 to 0.96, and the maximum charge / discharge power can be determined according to the energy storage capacity and converter capacity. Critical loads need to maintain a continuous power supply of no less than a preset percentage after an accident; for example, the power supply ratio for the hospital and communication equipment room should be no less than 90%, and the power supply ratio for the water pumping station and emergency command center should be no less than 80%. The above parameters are used to construct the island support constraints of the microgrid layer.

[0105] Before planning calculations begin, the planning calculation platform receives data from the main grid dispatching system, distribution automation master station, distribution network geographic information system, microgrid energy management system, new energy forecasting system, and energy storage management system via communication interfaces or data import methods. The main grid dispatching system provides substation capacity, main transformer availability status, main grid line availability status, upper limit of main-distribution boundary switching power, and post-fault power supply capacity verification results. The distribution automation master station provides feeder topology, sectionalizing switch status, tie switch status, node load, line impedance, line capacity, node voltage constraints, and fault isolation range. The distribution network geographic information system provides feeder routing, equipment geographic location, disaster exposure, and candidate backup paths. The microgrid energy management system provides microgrid access candidate locations, microgrid internal loads, critical load list, flexible load reduction ratio, and islanding operation strategy. The new energy forecasting system provides photovoltaic output forecast curves and low-output scenarios. The energy storage management system provides candidate energy storage capacity values, initial state of charge, charging and discharging power constraints, charging and discharging efficiency, and availability status.

[0106] The planning and calculation platform preprocesses the aforementioned data. For continuous quantities such as main grid capacity, feeder capacity, load power, energy storage capacity, and renewable energy output, the system standardizes them using the baseline capacity of the planning area. For discrete quantities such as switch status, equipment fault status, tie switch operability status, and microgrid grid connection / disconnection status, the system uses a status coding method. For meteorological disasters, geographical risks, and equipment health status, the system generates risk characteristic values ​​according to a preset mapping relationship. If a feeder load data is temporarily missing, the system can correct it based on the historical load curve of the same node and the load change trend of adjacent nodes, and reduce the reliability of the data. If a switch status data conflicts with the topology logic, the system marks the corresponding edge of that switch as a state requiring verification and reduces its available weight in subsequent power transfer path searches.

[0107] After data preprocessing, the system constructs a three-layer graph model. In the main grid layer, 110kV / 10kV substations are mapped as substation nodes, and main transformers and main grid channels are mapped as main grid power supply capacity nodes or edges. Node attributes include rated capacity, post-fault power supply capacity, reserve capacity, equipment availability status, and geographical risk level. In the distribution network layer, feeders F1 to F6 are mapped as feeder nodes, and sectionalizing switches and tie switches are mapped as switching nodes or switchable edges. Load nodes are coded according to general loads and critical loads, and node attributes include load capacity, load level, voltage constraints, feeder affiliation, transferable power ratio, and fault isolation status. In the microgrid layer, microgrid access points, photovoltaic power plants, energy storage stations, flexible loads, and critical loads in areas M1 and M2 are mapped as nodes. Node attributes include access capacity, predicted renewable energy output, energy storage status of charge, energy storage capacity, critical load demand, flexible load reduction ratio, and islanded power supply capacity.

[0108] The edges in the three-layer graph model include main distribution boundary edges, feeder tie edges, distribution-microgrid access edges, and backup channel edges. Main distribution boundary edges connect substation nodes to feeder nodes F1 to F6, and edge attributes include the upper limit of main distribution boundary exchange power, available power after a fault, and boundary reliability. Feeder tie edges connect adjacent feeders or feeders that can be transferred to another feeder; for example, the tie edge between F2 and F3 indicates that the load can be transferred via a tie switch after a fault, and edge attributes include tie switch capacity, initial switch state, operational permission status, transfer path impedance, and switch operation cost. Distribution-microgrid access edges connect nodes related to feeder F2 in area M1, and nodes related to feeder F5 in area M2, and edge attributes include access capacity, microgrid support power, grid-connected / off-grid switching status, and islanded support availability status. Backup channel edges represent backup power supply paths that can be planned for construction or activated after a fault, and edge attributes include backup capacity, activation conditions, channel length, construction feasibility status, and available time period.

[0109] During the candidate disturbance scenario generation phase, the system combines historical faults, meteorological disasters, and operational forecasts to generate a scenario library. Candidate disturbance scenarios can include: scenarios where the main transformer or upstream lines are restricted, causing the power supply capacity at the main distribution boundary to decrease to 60MW; scenarios where a fault in feeder F2 causes power outages in the power supply area where hospitals and communication equipment rooms are located; scenarios where a fault in feeder F5 causes power outages in the area where water pumping stations and emergency command centers are located; scenarios where the interconnection switch between F3 and F4 is unavailable, resulting in limited power transfer paths; scenarios where photovoltaic output is 30% to 60% lower than predicted; scenarios where peak loads cause a 10% to 25% increase in load at key nodes; scenarios where the initial state of charge of energy storage is only 30% to 40%; and composite scenarios where extreme weather causes a decrease in main grid power supply capacity, partial feeder faults, and low output from renewable energy sources to occur simultaneously. Each scenario is represented as a disturbance vector, which records equipment outage identifiers, output reduction coefficients, load growth coefficients, switch unavailability status, initial energy reduction coefficients for energy storage, and disaster area codes.

[0110] The system inputs candidate disturbance scenarios and a three-layer graph model into a graph neural network. The graph neural network encodes node features for substations, feeders, tie switches, microgrid access points, energy storage stations, flexible loads, and renewable energy plants. It also encodes edge types for main-distribution boundary edges, feeder tie edges, distribution-microgrid access edges, and backup channel edges. Through a cross-layer message passing layer, it transmits power supply capacity, transfer capacity, and islanding support capacity between the main grid layer, distribution network layer, and microgrid layer. For scenarios where the main-distribution boundary power supply capacity decreases, information about the reduced power supply capacity in the main grid layer is transmitted to the distribution network layer via the main-distribution boundary edge, enhancing the boundary power constraint characteristics of feeder nodes. For the F2 feeder fault scenario, the fault isolation range and critical load gap are transmitted to the distribution-microgrid access edge in the M1 region via the distribution network layer, affecting the microgrid support capacity in the M1 region's risk score. For renewable energy low-output scenarios, output reduction information from photovoltaic plant nodes is transmitted to energy storage stations and critical load nodes, increasing the risk of unsustainable power supply in microgrid islands.

[0111] The graph neural network outputs resilience risk scores for each candidate disturbance scenario. The system can first select a group of candidate scenarios with higher risk scores to form a candidate pool, and then select representative high-risk scenarios from the candidate pool based on graph embedding distance. If multiple scenarios in the candidate pool correspond to F2 feeder faults, but the disturbance types and impact ranges are similar, the system only retains the scenarios with higher risk scores and stronger representativeness, while also retaining different types of scenarios such as F5 feeder faults, reduced power supply capacity at the main distribution boundary, low output of renewable energy combined with peak load, and compound faults caused by extreme weather. Through this processing, the representative high-risk scenario set includes high-risk scenarios while avoiding the concentration of all scenarios on the same feeder or the same fault type.

[0112] In representative high-risk scenarios, the system performs calculations for main grid power supply capacity, distribution network reconfiguration and power transfer, and microgrid islanding autonomy. In scenarios where the power supply capacity at the main grid / distribution boundary decreases, the main grid power supply capacity calculation module determines the upper limit of the boundary power available to each feeder based on the post-fault power supply capacity. If the critical load demand in the areas where F2 and F5 are located is high, but the power supply capacity at the main grid / distribution boundary is insufficient, the power supply bottleneck index increases. The power supply bottleneck index can be calculated as B_b,s = max(0, D_b,s - C_b,s) / max(D_b,s, ε), where D_b,s is the boundary power supply demand and C_b,s is the post-fault power supply capacity. The system returns the power supply bottleneck index to the distribution network layer, constraining the distribution network layer from simply increasing power intake at the main grid / distribution boundary to restore all loads.

[0113] In the F2 feeder fault scenario, the distribution network reconfiguration and transfer calculation module first cuts off the faulty section based on the fault isolation range, and then searches whether the tie switches between F1 and F2, and between F2 and F3, can be used for transfer. If the remaining power supply margin of feeder F1 is 3MW, the remaining power supply margin of feeder F3 is 2MW, and the critical load demand in the F2 faulty section is 4MW to 5MW, then relying solely on transfer from F1 and F3 may still result in a shortfall. The system further verifies the line capacity and node voltage on the transfer path. If a transfer path causes the line power flow to exceed the capacity or the terminal voltage to fall below the allowable range, then the path is deleted or its priority is reduced. If there is still a 1MW to 2MW critical load shortfall after transfer via tie switches, the distribution network reconfiguration and transfer calculation module transmits the shortfall location and capacity to the autonomous calculation module of the M1 regional microgrid island.

[0114] In the F5 feeder fault scenario, the system calculates the transfer capacity of the interconnecting switches between F4 and F5, and between F5 and F6, in the same manner. If the water pumping station and emergency command center are located in the middle of F5, and the adjacent feeders of F4 or F6 have insufficient remaining margin during peak load, the system will transfer the corresponding gap to the microgrid islanding autonomous calculation module in the M2 area. If the backup channel connects the planned candidate path between F3 and F5, the system will evaluate the recoverable load, path capacity, and voltage constraints after the backup channel is activated in the transfer calculation. If the backup channel can reduce the critical load gap in multiple scenarios, it will receive a higher weight in the subsequent resilience contribution factor feedback.

[0115] The microgrid islanding autonomy calculation module calculates the island's sustainable power supply time based on the renewable energy output, energy storage state of charge, candidate energy storage capacity, critical load demand, and the proportion of flexible loads that can be reduced in regions M1 and M2. Taking region M1 as an example, if the initial state of charge of energy storage is 60% at the time of the accident, the candidate energy storage capacity is 6MWh, the charge-discharge efficiency is 0.94, the critical loads of the hospital and communication equipment room total approximately 4MW, photovoltaic power can provide 0.5MW to 1.2MW under low-output scenarios, and the flexible load can be reduced by 0.8MW, then the system updates the energy storage energy according to discrete time periods and calculates the maximum time that power can be maintained under the condition that the power supply ratio of critical loads is not less than 90%. If the calculated island sustainable power supply time is lower than the planning requirements, the system increases the energy storage capacity of region M1 or adjusts the location of the microgrid access point during the decomposition and coordination optimization. Taking the M2 area as an example, if the critical load of the water supply pumping station and the emergency command center is about 3MW, the candidate energy storage capacity is 5MWh, the photovoltaic power output can provide 0.4MW to 0.9MW, and the flexible load can reduce 0.5MW, then the system will also calculate the island sustainable power supply time of the M2 area and feed the results back to the optimization model.

[0116] The decomposition and coordination optimization module iterates based on the above calculation results. In the first iteration, the system can configure tie switches based on the existing network structure, set the energy storage capacity of regions M1 and M2 based on the initial candidate capacity, and set the main distribution boundary exchange power based on the normal operation power flow. The first round of calculation may find that, under the scenario of reduced main distribution boundary power supply capacity and F2 feeder fault superimposed, the critical load gap in region F2 is large, and the islanding duration in region M1 is insufficient. The system then increases the candidate retention weight of the microgrid access point in region M1 and raises the candidate value of energy storage capacity from a low capacity to a medium capacity range, while adjusting the tie switch configuration between F1 and F2, and between F2 and F3. In the second iteration, the distribution network transfer capacity increases, and the islanding power supply time in region M1 is extended. However, if the main distribution boundary exchange power still exceeds the post-fault power supply capacity, the system continues to adjust the transfer path and flexible load reduction. After multiple iterations, the main distribution boundary exchange power gradually converges to the post-fault power supply capacity range, the amount of unrecovered critical load decreases, and the microgrid islanding duration meets the planning requirements.

[0117] The resilience contribution factor feedback module evaluates candidate planning resources after each round of optimization. For the M1 area microgrid access point, the system calculates the system resilience index with and without the access point. If the M1 area microgrid access point is not configured, the critical load gap for the hospital and communication equipment room increases significantly under the F2 fault scenario, the recovery time is prolonged, and the island support time is reduced. Therefore, R_all-R_without_q is larger, and the resilience contribution factor of the M1 area microgrid access point is higher. For the M2 area energy storage station, if it can maintain continuous power supply to the water pumping station and emergency command center under the overlapping scenarios of F5 fault and peak load, its resilience contribution factor is also higher. For a certain tie switch, if it only participates in power transfer in a single scenario and the reduction in power supply after transfer is limited by line capacity, its resilience contribution factor is lower. Based on this, the system increases the candidate retention weight and capacity refinement priority of high-contribution resources and decreases the configuration weight of low-contribution resources.

[0118] Under specific comparative conditions, a traditional hierarchical planning scheme can be used as a reference. This scheme first determines the boundary power based on the main grid's post-fault power supply capacity, then determines the tie-off switch configuration based on the local distribution network structure, and finally performs a post-hoc verification of the microgrid's islanding capability. In this approach, the microgrid's islanding sustainability typically cannot negatively influence the tie-off switch configuration and the main-distribution boundary power allocation, and energy storage capacity is often determined based on empirical values ​​of local loads. When adopting the scheme proposed in this application, the microgrid access location, energy storage capacity, tie-off switch configuration, backup channels, and main-distribution boundary exchange power are iteratively updated under the same representative high-risk scenario set, and the resilience contribution factor provides feedback correction to the resource allocation.

[0119] In a set of exemplary simulation results, the average critical load shortfall of the traditional hierarchical planning scheme in six representative high-risk scenarios can be set as a baseline value of 1.00. After three-layer graph modeling, scenario selection, decomposition coordination optimization, and resilience contribution factor backpropagation, the average critical load shortfall of the proposed scheme can be reduced to the range of 0.55 to 0.70. The average recovery time of the traditional hierarchical planning scheme can be set as a baseline value of 1.00, while the average recovery time of the proposed scheme can be reduced to the range of 0.60 to 0.80. In the traditional scheme, the sustainable power supply time of the M1 and M2 microgrid islands may be less than 2 hours in some low-output scenarios. After refining the energy storage capacity and adjusting the flexible load reduction constraints, the proposed scheme can increase the sustainable power supply time of the M1 and M2 microgrid islands in the same scenarios to the range of 3 to 5 hours. The above results are only used to illustrate the effect of the technical solution of this application; the specific values ​​are related to the regional load scale, energy storage capacity, photovoltaic output, fault location, and dispatching procedures.

[0120] Reference Figure 8The technical effects of this embodiment can be demonstrated by combining multiple subgraphs. Figure 8 (a) Show the changes in critical load gaps under different representative high-risk scenarios. The horizontal axis is the scenario number and the vertical axis is the critical load gap ratio. The curves represent the traditional hierarchical planning scheme and the scheme of this application, respectively. The curves corresponding to the scheme of this application are lower than those of the traditional scheme under the scenarios of primary and secondary boundary constraints, F2 failure, F5 failure and compound disaster. Figure 8 (b) Show the iterative convergence process of the main and distribution boundary exchange power. The horizontal axis represents the iteration round, and the vertical axis represents the boundary exchange power. Each curve corresponds to a different main and distribution boundary. The curves gradually converge to within the upper limit of the power supply capacity after the accident. Figure 8 (c) Show the range of sustainable power supply time of microgrid islands in areas M1 and M2 under different scenarios. The horizontal axis is the microgrid access area, and the vertical axis is the sustainable power supply time of islands. The range curves reflect the range of changes under the conditions of low output of new energy and limited initial energy of energy storage. Figure 8 (d) Show the trend of the resilience contribution factor of microgrid access point, energy storage station, tie switch, backup channel and flexible load resources as the iteration round changes. Resources with higher contribution maintain higher weight after iteration, while resources with lower contribution gradually have their weight reduced.

[0121] Further reference Figure 8 (a) Representative high-risk scenarios S1 to S6 correspond to scenarios such as reduced power supply capacity at the main distribution boundary, feeder fault F2, feeder fault F5, low output of new energy sources combined with peak load, limited initial energy of energy storage, and compound faults caused by extreme weather. This sub-graph uses the standard value of critical load gap as the vertical axis indicator. The standard value can be determined by the ratio of the amount of unrecovered critical load in each scenario to the baseline amount of unrecovered critical load. In the figure, the curve of the traditional hierarchical planning scheme still maintains a high gap level in scenarios S2 to S6. The curve of the scheme in this application shifts to a lower gap level in the same scenario, indicating that when the power of the main distribution boundary is limited, the distribution network transfer capacity is limited, and the microgrid island support capacity is insufficient, the planning results obtained by the three-layer graph model, the screening of representative high-risk scenarios, and the decomposition and coordination optimization can reduce the amount of unrecovered critical load. This sub-diagram corresponds to the gap transmission process of critical loads such as the hospital and communication equipment room in area F2 and the water supply pumping station and emergency command center in area F5 in the embodiment. It reflects the effect of the distribution network layer transmitting the gap location and gap capacity to the microgrid layer, and the microgrid layer in turn affecting the configuration of tie switches, energy storage capacity and the activation status of backup channels.

[0122] Further reference Figure 8(b) The convergence curve of the main-distribution boundary exchange power is used to represent the process of satisfying the power constraints of boundaries B1 and B2 during the decomposition and coordination optimization. The horizontal axis of this sub-graph represents the iteration round, and the vertical axis represents the standard value of the boundary power. The standard value of the boundary power can be determined by the ratio of the boundary exchange power in the current round to the upper limit of the power supply capacity after the accident. The dashed line represents the standard value of 1.00 corresponding to the upper limit after the accident. In the initial round, the standard values ​​of boundaries B1 and B2 are higher than the upper limit after the accident, indicating that according to the traditional local transfer or the initial planning results, the power demand of the main-distribution boundary may exceed the power supply capacity after the accident. As the main grid sub-problem returns to the power supply bottleneck index, the distribution network sub-problem adjusts the transfer path, and the microgrid sub-problem adjusts the island support strategy, the curves of boundaries B1 and B2 gradually approach and remain near the upper limit after the accident, indicating that the main-distribution boundary exchange power can meet the power supply capacity constraints of the main grid after the accident after multiple rounds of coordination.

[0123] Further reference Figure 8 (c) The continuous power supply time curves for microgrid islanding are used to represent the changes in islanding support capacity of regions M1 and M2 under typical scenario combinations. In the figure, M1-S2, M1-S4, and M1-S6 represent the calculation results of microgrid M1 under the scenarios of F2 feeder fault, low output of new energy superimposed with peak load, and combined fault, respectively. M2-S3, M2-S5, and M2-S6 represent the calculation results of microgrid M2 under the scenarios of F5 feeder fault, limited initial energy of energy storage, and combined fault, respectively. The vertical axis represents the continuous power supply time in hours. The curve before optimization corresponds to the islanding power supply time without energy storage capacity refinement, flexible load reduction constraint adjustment, and access location feedback. The curve after optimization corresponds to the islanding power supply time after decomposition and coordination optimization and resilience contribution factor feedback. This sub-diagram shows that, under the same critical load power supply ratio constraint, the islanded continuous power supply time of the optimized M1 and M2 regions is extended, and a longer continuous power supply time can still be maintained in scenarios where the output of new energy sources is low or the initial energy of energy storage is limited, thereby providing post-accident support for the hospital, communication equipment room, water supply pumping station and emergency command center in the embodiment.

[0124] Further reference Figure 8(d) The iterative change curve of the resilience contribution factor is used to represent the marginal contribution ranking process of different candidate planning resources in multiple rounds of optimization. In the figure, the microgrid access point, energy storage station, tie switch, and backup channel correspond to the candidate microgrid access resources, energy storage capacity resources, feeder tie switch resources, and backup power supply path resources, respectively. The contribution factor on the vertical axis can be obtained by normalizing the difference between the system resilience index when the resource is included and the system resilience index when the resource is not configured, combined with the resource capacity cost. As the iteration progresses, the contribution factors of the microgrid access point and energy storage station remain at a high level, indicating that they make a significant comprehensive contribution to the ability to maintain critical loads, reduce power outages, shorten recovery time, and provide continuous power supply to isolated areas. The contribution factors of the tie switch and backup channel remain at a medium level, indicating that they mainly contribute to system resilience by improving the availability of transfer paths and backup paths. This sub-figure is consistent with the working process of the resilience contribution factor feedback module, indicating that the system can increase the candidate retention weight and capacity refinement priority of high-contribution resources based on the contribution factor, and reduce the configuration weight of low-contribution resources.

[0125] pass Figure 8 The four sub-graphs can mutually corroborate each other in terms of scenario effects, constraint convergence, microgrid autonomy, and resource contribution. Changes in critical load gaps illustrate the impact of planning results on load recovery; convergence of primary and secondary boundary switching power indicates that planning results meet the power supply capacity constraints after upper-level accidents; the continuous power supply time of microgrid islands demonstrates that lower-level autonomy can participate in the formation of planning results; and iterative changes in resilience contribution factors show that the retention of planning resources and capacity refinement have traceable basis. The above diagrams correspond to the data access, three-layer graph model construction, scenario selection, decomposition coordination optimization, and resilience contribution factor feedback processes in this embodiment, illustrating the technical effects of this application's scheme compared to traditional hierarchical planning schemes in terms of multi-layer constraint coordination, scenario representativeness, boundary power feasibility, and microgrid support capacity feedback.

[0126] As can be seen from this application scenario, the implementation process of this application includes a series of steps such as data access, three-layer graph model construction, candidate disturbance scenario generation, graph neural network risk screening, main grid power supply bottleneck calculation, distribution network reconfiguration and power transfer calculation, microgrid islanding power supply time calculation, decomposition and coordination optimization, resilience contribution factor feedback, and planning result output. Each step has clear data input, processing logic, and output results. After a main grid failure, the power supply bottleneck can be transmitted to the distribution network layer through the main-distribution boundary edge. The critical load gap in the distribution network layer can be transmitted to the microgrid layer through the distribution-microgrid access edge. The islanding support capacity and energy storage capacity requirements of the microgrid layer can, in turn, influence the next round of tie switch configuration, backup channel activation, and main-distribution boundary power allocation. Therefore, this application can form a closed-loop collaborative planning process between the main grid, distribution network, and microgrid in specific regional power grid planning.

[0127] The numerical values, capacities, load ratios, energy storage capacity ranges, and number of scenarios described in this embodiment are only for illustrating the application of the technical solution of this application and are not intended to limit the scope of protection of this application. For regional power systems with different voltage levels, different numbers of feeders, different microgrid scales, different energy storage types, and different proportions of new energy access, node attributes, edge attributes, disturbance scenarios, optimization constraints, and weighting coefficients can be adjusted according to actual equipment parameters, planning cycles, operating procedures, and load characteristics. As long as a three-layer graph model is used to uniformly express the constraints of the main grid, distribution network, and microgrid, representative high-risk scenarios are selected through graph neural networks, planning variables are determined through decomposition and coordination optimization, and resource allocation priorities are adjusted through resilience contribution factors, the technical solution of this application can be implemented.

[0128] The above description is merely a specific embodiment of this application and is not intended to limit the scope of protection of this application. For those skilled in the art, without departing from the technical concept of this application, equivalent substitutions or combinations can be made to the node types, edge types, graph neural network structure, decomposition coordination optimization algorithm, resilience contribution factor calculation method, and output format of the three-layer graph model, and all such equivalent substitutions or combinations should fall within the scope of protection of this application.

Claims

1. A primary-secondary-micro multilayer toughness collaborative planning method, characterized in that, include: Acquire equipment parameters, operating parameters, load parameters, renewable energy output parameters, energy storage parameters, switch status parameters, and candidate disturbance scenarios for the main grid, distribution network, and microgrid; A three-layer graph model is constructed based on the equipment parameters, operating parameters, load parameters, new energy output parameters, energy storage parameters, and switch status parameters. The three-layer graph model includes a main grid layer, a distribution network layer, and a microgrid layer. Nodes include substations, feeders, tie switches, microgrid access points, energy storage stations, flexible loads, and new energy power plants. Edges include main grid boundary edges, feeder tie edges, distribution-microgrid access edges, and backup channel edges. The three-layer graph model and candidate perturbation scenarios are input into the graph neural network to obtain the resilience risk score of each candidate perturbation scenario, and representative high-risk scenarios are selected. In the aforementioned representative high-risk scenarios, the upper layer calculates the main grid's power supply capacity and post-accident power supply bottlenecks, the middle layer calculates the reconfigurable topology and transfer capacity of the distribution network, and the lower layer calculates the sustainable power supply time of microgrid islands. Based on the calculation results of the upper, middle and lower layers, decomposition, coordination and optimization are carried out to update the main distribution boundary switching power, microgrid access location, tie switch configuration, energy storage capacity and backup channel; Calculate the resilience contribution factor of the planned resources corresponding to the microgrid access location, tie switch configuration, energy storage capacity and backup channel, and transmit the resilience contribution factor back to the next round of planning variable update process, and output the primary, distribution and microgrid multi-layer resilience collaborative planning results.

2. The primary-supporting-micro multilayer toughness collaborative planning method according to claim 1, characterized in that, When constructing a three-layer graph model, the main grid layer is used to express substation capacity, main grid channel capacity, power supply capacity after a main grid accident, upper limit of main-distribution boundary exchange power, and main grid geographical risk status. The distribution network layer is used to express feeder affiliation, line capacity, node load, sectionalizing switch status, tie switch status, voltage constraints, radial constraints, and the range of loads that can be transferred. The microgrid layer is used to express microgrid access capacity, predicted output of new energy sources, energy storage charge status, energy storage charging and discharging power, critical load demand, adjustable proportion of flexible load, and islanding operation constraints. The main-distribution boundary edge is used to connect substation nodes in the main grid layer and feeder nodes in the distribution network layer. The feeder tie edge is used to express the reconfigurable connection relationship between different feeders formed by tie switches. The distribution-microgrid access edge is used to express the support relationship between microgrid access points and distribution network nodes. The backup channel edge is used to express the planned candidate backup power supply path. After the node attributes and edge attributes in the three-layer graph model are normalized, missing value correction, and operating status encoding, they form graph structure data jointly called by graph neural network and decomposition coordination optimization.

3. The primary-supporting-micro multilayer toughness collaborative planning method according to claim 1, characterized in that, Candidate disturbance scenarios include main grid line outages, substation power supply capacity reductions, distribution network feeder faults, unavailability of tie switches, low output of renewable energy sources, peak loads, limited initial energy of energy storage, and multi-point fault composite scenarios caused by extreme weather. The graph neural network includes a node feature encoding layer, an edge type encoding layer, a cross-layer message passing layer, a scenario disturbance fusion layer, and a risk score output layer. During training, historical fault records, power flow simulation results, distribution network reconfiguration results, microgrid islanding operation results, and recovery time records are used as training samples. The comprehensive resilience loss formed by the amount of power not supplied, the proportion of critical load loss, recovery time, and microgrid islanding failure time is used as a supervision label. During application, the graph neural network outputs a resilience risk score for each candidate disturbance scenario and selects representative high-risk scenarios based on the resilience risk score and graph embedding distance, so that the selected scenarios cover different disturbance types such as main grid bottlenecks, limited distribution network power transfer, and insufficient microgrid autonomy.

4. The primary-supporting-micro multilayer toughness collaborative planning method according to claim 1, characterized in that, When calculating the main grid power supply capacity and power supply bottlenecks after an accident, the upper layer determines the power supply capacity of each main distribution boundary under representative high-risk scenarios based on the substation capacity, line capacity, backup channel capacity, safety verification results, and main distribution boundary load demand of the main grid layer. For the power supply bottleneck index B_b,s of the b-th main distribution boundary in scenario s, it is calculated according to B_b,s=max(0,D_b,s-C_b,s) / max(D_b,s,ε), where D_b,s represents the power supply demand of the b-th main distribution boundary in scenario s, C_b,s represents the power supply capacity of the b-th main distribution boundary in scenario s, and ε represents a positive number used to prevent the denominator from being zero. The power supply bottleneck index is used to return boundary power constraints to the distribution network layer and to determine the power supply areas that need to be transferred from the distribution network, supported by microgrid islands, or reinforced by backup channels.

5. The primary-secondary-micro multilayer toughness collaborative planning method according to claim 1, characterized in that, When calculating the reconfigurable topology and transfer capacity of the distribution network at the intermediate layer, the opening and closing states of tie switches and sectionalizing switches are used as topology reconfiguration variables, and the load recovery amount of feeders and transfer paths are used as transfer variables. Under the conditions of satisfying the distribution network radiality constraints, node power balance constraints, line capacity constraints, node voltage constraints, switch operation number constraints, and main distribution boundary power constraints, the tie switch configuration and transfer path under representative high-risk scenarios are determined. For the transfer capacity T_f,s of feeder f in scenario s, it is determined based on the available tie switch capacity, backup channel capacity, remaining power supply margin of adjacent feeders, transfer path voltage constraints, and fault isolation range. If the boundary power requested by the distribution network layer exceeds the power supply capacity returned by the main grid layer, the tie switch configuration and transfer path are adjusted. If there is still a critical load gap after adjustment, the gap amount and gap location are transferred to the microgrid layer for island support calculation.

6. The primary-secondary-micro multilayer toughness collaborative planning method according to claim 1, characterized in that, When calculating the sustainable power supply time of a microgrid island, the lower layer determines the sustainable power supply time of each microgrid after disconnection from the distribution network based on the microgrid access point location, predicted output of new energy sources, energy storage state of charge, energy storage capacity, energy storage charging and discharging efficiency, critical load power, flexible load reduction ratio, and island operation power balance constraints. For the m-th microgrid, the energy storage energy is updated within the discrete time period t according to E_m,t+1=E_m,t+η_ch·P_m,t^ch·Δt-P_m,t^dis·Δt / η_dis, where E_m,t represents the energy storage energy, P_m,t^ch represents the charging power, P_m,t^dis represents the discharging power, η_ch represents the charging efficiency, η_dis represents the discharging efficiency, and Δt represents the time step. The sustainable power supply time τ_m of the microgrid island is the longest time that can be continuously maintained when the energy storage energy, charging and discharging power, new energy output, and flexible load reduction all meet the constraints, and the power supply ratio of critical loads is not lower than the preset ratio.

7. The primary-supporting-micro multilayer toughness collaborative planning method according to claim 1, characterized in that, During decomposition and coordination optimization, the global planning problem is decomposed into a main grid sub-problem, a distribution network sub-problem, and a microgrid sub-problem. The main grid sub-problem is used to determine the main-distribution boundary exchange power and the power supply capacity after an accident. The distribution network sub-problem is used to determine the tie switch configuration, reconfigurable topology, power transfer path, and backup channel activation status. The microgrid sub-problem is used to determine the microgrid access location, energy storage capacity, islanding support strategy, and flexible load reduction. The three sub-problems are iterated using the main-distribution boundary exchange power, distribution-microgrid access capacity, unrecovered critical load, and microgrid support power as coordination variables. The objective function F is constructed according to F=C_inv+C_op+α·EENS+β·T_rec-γ·R_micro, where C_inv represents the planning resource allocation cost, C_op represents the operating cost, EENS represents the expected unsupply, T_rec represents the recovery time index, R_micro represents the microgrid autonomous contribution index, and α, β, and γ represent weighting coefficients. When the changes in the objective function, the main-distribution boundary exchange power, and the main planning variables in two adjacent rounds are all less than the preset threshold, the decomposition and coordination optimization is considered to have converged.

8. The primary-secondary-micro multilayer toughness collaborative planning method according to claim 1, characterized in that, When calculating the resilience contribution factor, microgrid access points, energy storage stations, tie switches, backup channels, and flexible load resources are considered as candidate planning resources. For each candidate planning resource, the system resilience index is calculated when the resource is included and when it is not configured. The resilience contribution factor of the resource is obtained based on the difference between the two and the resource configuration cost. For the q-th candidate planning resource, the resilience contribution factor RCF_q is calculated according to RCF_q=(R_all-R_without_q) / max(C_q,ε), where R_all represents the system resilience index when the q-th candidate planning resource is included. The resilience index, R_without_q, represents the system resilience index when the q-th candidate planning resource is not configured, C_q represents the configuration cost or capacity cost of the q-th candidate planning resource, and ε represents a positive number used to prevent the denominator from being zero. The system resilience index is determined by weighting the critical load retention capability, the ability to reduce power outages, the ability to shorten recovery time, and the ability to provide continuous power supply to islanded areas. When the resilience contribution factor is fed back to the next round of planning variable update process, the candidate retention weight and capacity refinement priority of resources with higher contribution factors are increased, the configuration weight of resources with lower contribution factors is reduced, and the decomposition coordination optimization is re-executed.

9. A primary-secondary multilayer toughness collaborative planning device, characterized in that, The system includes a data acquisition module, a three-layer graph construction module, a scenario filtering module, a main grid power supply capacity calculation module, a distribution network reconfiguration and transfer calculation module, a microgrid islanding autonomy calculation module, a decomposition and coordination optimization module, a resilience contribution factor feedback module, and a planning result output module. The data acquisition module acquires equipment parameters, operating parameters, load parameters, renewable energy output parameters, energy storage parameters, switch status parameters, and candidate disturbance scenarios from the main grid, distribution network, and microgrid. The three-layer graph construction module constructs a three-layer graph model including the main grid layer, distribution network layer, and microgrid layer, and generates main-distribution boundary edges, feeder connection edges, distribution-microgrid access edges, and backup channel edges. The scenario filtering module inputs the three-layer graph model and candidate disturbance scenarios into the graph processing module. The network generates resilience risk scores and selects representative high-risk scenarios. The main grid power supply capacity calculation module calculates the main grid power supply capacity and power supply bottlenecks after an accident. The distribution network reconfiguration and transfer calculation module calculates the reconfigurable topology of the distribution network, tie switch configuration, and transfer capacity. The microgrid island autonomy calculation module calculates the sustainable power supply time of the microgrid island. The decomposition, coordination, and optimization module iteratively updates the main grid boundary exchange power, microgrid access location, tie switch configuration, energy storage capacity, and backup channels. The resilience contribution factor feedback module calculates the resilience contribution factors of each planning resource and feeds them back to the next round of planning variable update. The planning result output module outputs the main grid, distribution network, and microgrid multi-layer resilience collaborative planning results.

10. An electronic device, characterized in that, The system includes a processor, a memory, and a communication interface. The memory stores a computer program. When the processor executes the computer program, it implements the multi-layer resilience collaborative planning method for the main grid, distribution network, and microgrid as described in any one of claims 1 to 8. The communication interface is used to receive equipment parameters, operating parameters, load parameters, renewable energy output parameters, energy storage parameters, switch status parameters, and candidate disturbance scenarios from the main grid side, distribution network side, and microgrid side. It is also used to output the microgrid access location, tie switch configuration, energy storage capacity, backup channel, main grid boundary exchange power, representative high-risk scenarios, post-accident power supply bottlenecks, distribution network transfer paths, microgrid island sustainable power supply time, and resilience contribution factor ranking results. The electronic equipment can be deployed on a power grid planning calculation platform, a distribution automation master station, a microgrid energy management system, or a regional energy management platform, and completes the resilience collaborative planning under multi-layer coupling conditions of the main grid, distribution network, and microgrid by executing the computer program.

Citation Information

Patent Citations

  • Method for dividing island of micro-grid and actively supporting power restoration of power distribution network in fault state

    CN116505579A

  • Power distribution network double-layer planning method based on reinforcement learning

    CN121257986A