A method and related equipment for power system power flow analysis training data augmentation

CN121366057BActive Publication Date: 2026-08-11SOUTH CHINA UNIV OF TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0004](2)样本质量问题

Benefits of technology

[0111]综上所述,本发明与现有技术对比,至少包括以下优点及有益效果:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121366057B_ABST
    Figure CN121366057B_ABST
Patent Text Reader

Abstract

This invention discloses a method and related equipment for power system power flow analysis training data augmentation. The method includes the following steps: treating all buses in the power grid as nodes in the topology graph and all connected devices as edges in the topology graph to obtain the power grid structure graph. This structure graph is then used to generate samples using a sample augmentation method based on subgraph sampling and / or a sample augmentation method based on subgraph grafting, thereby enhancing the training data. This invention proposes a power system power flow analysis training data augmentation method based on subgraph sampling and subgraph grafting. By varying the node scale in actual power grid operation scenarios, the number of training samples is expanded, increasing the number of nodes and the richness of topology connections. This invention also proposes sample expansion methods based on subgraph sampling and subgraph grafting, which can respectively improve the model's adaptability to scenarios where the number of nodes decreases due to generator start-up and shutdown and increases due to power grid expansion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method and related equipment for enhancing training data for power flow analysis. Background Technology

[0002] Power flow analysis is fundamental to power system security and stability analysis, providing data support for routine power grid security scanning. With the increasing penetration of renewable energy sources, the dual uncertainties of renewable energy and load have significantly increased the complexity of power grid operation scenarios. Traditional numerical solutions based on Newton's method suffer from poor convergence and low computational efficiency. Against this backdrop, deep learning-based power flow analysis methods can overcome these problems and provide a new approach to power flow analysis. However, the training effect of deep learning models heavily depends on the quantity and quality of training samples, presenting the following difficulties in sample acquisition:

[0003] (1) Sample quantity problem. Taking a specific regional power grid as an example, if data is sampled once per hour, then 8760 training samples can be obtained in a year. This number of training samples is far from enough to support the training of the model.

[0004] (2) Sample quality issues. In actual power grid operation, the number of nodes in the power grid changes with the start-up and shutdown of generators and the expansion of the power grid. Current model training is generally based on power grids with a specific number of nodes, and only considers the opening and closing of some branches for sample augmentation. Although this augmentation method can expand the number of samples, it is difficult to take into account a more diverse number of nodes and topology wiring methods, resulting in serious model failure problems when the number of nodes in the power grid changes. Summary of the Invention

[0005] In order to at least partially solve one of the technical problems existing in the prior art, the present invention aims to provide a method and related equipment for power system power flow analysis training data enhancement based on subgraph sampling and subgraph grafting.

[0006] The first technical solution adopted in this invention is:

[0007] A method for augmenting training data for power system power flow analysis includes the following steps:

[0008] Treating all busbars in the power grid as nodes in the topology graph, and all transmission lines, transformers, and other connecting devices as edges in the topology graph, we obtain the structure diagram of the power grid, denoted as .

[0009] Based on structural graph Samples are generated to enhance the training data by employing sample augmentation methods based on subgraph sampling and / or sample augmentation methods based on subgraph grafting.

[0010] The sample augmentation method based on subgraph sampling includes:

[0011] A1. Set the number of nodes in the subgraph to N. sub Initialize the subgraph node set If a node is randomly selected from the power grid as the sampling starting point b0, then the subgraph node set is initialized as follows:

[0012] A2, in the structural diagram Search all related to The nodes connected to each other in the middle node form the boundary node set.

[0013] A3. Based on the set of boundary nodes Perform subgraph expansion: on the set of boundary nodes Randomly select a subset subset All nodes added middle;

[0014] A4. Repeat steps A2-A3 until... The number of elements in the middle is N sub Obtain subgraph

[0015] A5, Pair Diagram Power equivalence processing is performed to ensure that the power flow distribution of the sampled subgraph is similar to that of the original subgraph. Figure 1 To;

[0016] A6. Generate samples based on the sub-graphs after power equivalence processing to obtain sub-graph samples with different numbers of nodes and different wiring structures.

[0017] Furthermore, in step A3, the number of nodes in the subset is greater than 0, but after adding nodes from the subset, the subgraph... The number of nodes does not exceed N sub Subset The number of elements in the middle satisfies the constraint:

[0018]

[0019] In the formula, card() represents the number of elements in the set.

[0020] Furthermore, the paired graph Power equivalence processing is performed, including:

[0021] Let node i be a subgraph In the graph, node u is a subgraph. External nodes, P i Qi P represents the active and reactive power of the equivalent preceding node i. iu and Q iu These are the active power and reactive power flowing from the equivalent node i to the node u, respectively.

[0022] After equivalence, it does not belong to a subgraph. All nodes in the graph are deleted, and the connection power of subgraphs and boundary nodes is equivalent to load, i.e., the power of node i is reduced from P. i +jQ i Become (P) i -P iu )+j(Q i -Q iu ), j represents an imaginary number.

[0023] Further, step A6 includes:

[0024] In the equivalent subgraph, since only a portion of the power grid nodes are captured, the balancing node may not be in the subgraph. Therefore, a node is randomly selected from the subgraph as the balancing node.

[0025] To further enhance the diversity of the samples, the load of each node is considered to have a preset range of random fluctuations, and then the output of the generator is adjusted to balance the source load of the system. On this basis, the opening of 0 to 2 branches is additionally considered to improve the model's ability to cope with branch opening topologies. Finally, the power flow calculation tool is used to perform power flow calculation on the processed subgraph to form subgraph samples.

[0026] In sample generation, multiple different subgraph sampling operations are performed on all actual operating scenarios to obtain a large number of subgraph samples with different numbers of nodes and different wiring structures.

[0027] Furthermore, the sample augmentation method based on subgraph grafting includes:

[0028] B1. Set the number of nodes to be added to N. expand Initialize the subgraph node set

[0029] B2. In the structural diagram Search all related to The nodes connected to each other in the middle node form the boundary node set.

[0030] B3. Based on the set of boundary nodes Perform subgraph expansion: on the set of boundary nodes Randomly select a subset The number of subset nodes must satisfy subset All nodes added In;

[0031] B4. Repeat steps B2 - B3 until the number of elements in is N expand , obtaining a sub - graph

[0032] B5. Perform power processing on the boundary tie - lines of the sub - graph ;

[0033] B6. Perform sub - graph grafting on the sub - graph after power processing of the boundary tie - lines;

[0034] B7. Generate samples based on the sub - graph after sub - graph grafting, obtaining sub - graph samples.

[0035] Further, step B5 includes:

[0036] Let the number of tie - lines between the sub - graph ) and the external power grid be M;

[0037] Randomly select m tie - lines from the M tie - lines (0 ≤ m < M), and equivalent the power of the m selected tie - lines to load, while keeping the power of the remaining M - m tie - lines unchanged.

[0038] Further, step B6 includes:

[0039] e After power processing of the boundary tie - lines, the number of remaining unequilized tie - lines in the sub - graph is M - m. Therefore, M - m nodes need to be extracted from the complete topological graph of the power grid for grafting;

[0040] After grafting, an additional part of the load needs to be added to these M - m nodes to balance the source and load of the system.

[0041] The second technical solution adopted by the present invention is:

[0042] An electronic device, the electronic device includes a processor and a memory, and at least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a power system power flow analysis training data enhancement method as described above.

[0043] The third technical solution adopted by the present invention is:

[0044] A computer - readable storage medium, at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a power system power flow analysis training data enhancement method as described above.

[0045] The fourth technical solution adopted in this invention is:

[0046] A computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method for augmenting training data for power system power flow analysis.

[0047] The beneficial effects of this invention are as follows: This invention proposes a method for enhancing training data in power system flow analysis based on subgraph sampling and subgraph grafting. By varying the node size in actual power grid operation scenarios, the number of training samples is expanded, increasing the richness of the number of nodes and topology connections in the samples. This invention proposes a sample expansion method based on subgraph sampling and subgraph grafting, which can respectively improve the model's adaptability to scenarios where the number of nodes decreases due to generator start-up and shutdown and where the number of nodes increases due to power grid expansion. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following description is provided with accompanying drawings of the relevant technical solutions in the embodiments of the present invention or the prior art. It should be understood that the accompanying drawings described below are only for the purpose of clearly illustrating some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 This is a flowchart of the sample augmentation method based on subgraph sampling in an embodiment of the present invention;

[0050] Figure 2 This is a schematic diagram of the subgraph and boundary nodes in an embodiment of the present invention;

[0051] Figure 3 This is a schematic diagram of the power equivalence method in an embodiment of the present invention;

[0052] Figure 4 This is a schematic diagram of boundary link power processing in an embodiment of the present invention;

[0053] Figure 5 This is a schematic diagram of the additional load after grafting in an embodiment of the present invention;

[0054] Figure 6 This is a schematic diagram of the reference scene topology in an embodiment of the present invention;

[0055] Figure 7 This is a schematic diagram of the subgraph sampling results in an embodiment of the present invention;

[0056] Figure 8 This is a schematic diagram of the subgraph sample topology in an embodiment of the present invention;

[0057] Figure 9 This is a schematic diagram of the grafting sub-graph sampling results in an embodiment of the present invention;

[0058] Figure 10 This is a schematic diagram of the grafted topology in an embodiment of the present invention;

[0059] Figure 11 This is a schematic diagram of the topological structure of the sample after subgraph grafting in an embodiment of the present invention. Detailed Implementation

[0060] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application. The step numbers in the following embodiments are set only for ease of explanation, and there is no limitation on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.

[0061] The terminology used in the embodiments of this application is for the purpose of describing specific embodiments only and is not intended to limit the embodiments of this application. The singular forms "a," "described," and "the" used in the embodiments of this application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. Furthermore, unless otherwise expressly limited, terms such as "set," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.

[0062] In the description of this application, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0063] In the description of this application, "several" means one or more, "more than" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.

[0064] In the description of this application, "and / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the related objects before and after it are in an "or" relationship.

[0065] To enhance the adaptability of deep learning-based power flow analysis models to scenarios involving changes in the number of power grid nodes and to enrich the training sample, this invention proposes a power flow analysis training data augmentation method based on subgraph sampling and subgraph grafting. The method expands the number of training samples by varying the node size in actual power grid operation scenarios, increasing the richness of the number of nodes and topology connections. The proposed sample expansion methods based on subgraph sampling and subgraph grafting can respectively improve the model's adaptability to scenarios involving a decrease in the number of nodes due to generator start-up and shutdown and an increase in the number of nodes due to power grid expansion.

[0066] Example 1

[0067] This embodiment provides a method for augmenting training data for power system power flow analysis, including the following steps:

[0068] S1. Treat all busbars in the power grid as nodes in the topology graph, and all transmission lines, transformers, and other connecting devices as edges in the topology graph, to obtain the structure diagram of the power grid, denoted as...

[0069] S2, Based on Structure Diagram Samples are generated to enhance the training data by employing sample augmentation methods based on subgraph sampling and / or sample augmentation methods based on subgraph grafting.

[0070] Sample augmentation methods based on subgraph sampling and subgraph grafting both require a known power grid operation scenario and aim to increase sample richness by varying the number of nodes. If all buses in the power grid are considered nodes in a topology graph, and all transmission lines, transformers, and other connecting devices are considered edges in the topology graph, then the structure of the power grid can be abstracted as a graph, denoted as [Graph 1]. The sample augmentation methods based on subgraph sampling and subgraph grafting are explained in detail below with reference to the accompanying drawings and specific embodiments.

[0071] (1) Sample augmentation method based on subgraph sampling

[0072] join Figure 1 The steps of the sample augmentation method based on subgraph sampling include:

[0073] A1: Initialize the subgraph node set. Set the number of nodes in the subgraph to N. sub If a node is randomly selected from the power grid as the sampling starting point, and the selected node is denoted as b0, then the subgraph node set is initialized as follows:

[0074] A2: Boundary search. In Search all related to The nodes connected to each other in the middle node form the boundary node set. A schematic diagram of the boundary nodes is shown below. Figure 2 As shown, All nodes in the subgraph are not in the current subgraph, but are directly connected to nodes in the subgraph.

[0075] A3: Subgraph expansion. In Randomly select a subset The number of elements in the subset satisfies the constraint Will All nodes added In other words, the number of nodes in the subset is greater than 0, but after adding nodes from the subset, the number of nodes in the subgraph does not exceed N. sub .

[0076] A4: Repeat A2-A3 until... The number of elements in the middle is N sub Obtain subgraph

[0077] A5: Power equivalence. To ensure the power flow distribution of the subgraph after sampling is the same as the original... Figure 1 Therefore, it is necessary to convert all tie-line power into load at the boundary locations of the subgraph. The conversion process is as follows: Figure 3 As shown. Figure 3 In the diagram, i, j, u, and v represent nodes in the power grid, and P... i Q i P represents the active and reactive power of the equivalent preceding node i. iu and Q iu These represent the power flowing from node i to node u before the equivalence. After the equivalence, it does not belong to the subgraph. All nodes in the graph are deleted, and the connection power of subgraphs and boundary nodes is equivalent to load, i.e., the power of node i is reduced from P. i +jQ i Become (P) i -P iu )+j(Qi -Q iu ),同理 for node j.

[0078] A6: Data generation. In the equivalent subgraph, since only a part of the nodes in the power grid are intercepted, it may cause the slack node not to be in the subgraph. Therefore, for convenience, a node is randomly selected from the subgraph as the slack node. In addition, to further improve the diversity of the samples, a 20% random fluctuation is considered for the load of each node, and then the output of the generator is adjusted to balance the system's source and load. On this basis, the opening and closing of 0 to 2 branches are additionally considered to improve the model's ability to handle the branch-opening topology. Finally, a power flow calculation tool is used to perform power flow calculations on the processed subgraph to form subgraph samples.

[0079] In sample generation, by performing multiple different subgraph sampling operations on all actual operating scenarios, a large number of subgraph samples with different numbers of nodes and different wiring structures can be obtained.

[0080] (2) Sample enhancement method based on subgraph grafting

[0081] [ [[ID=IS]]The sample enhancement method based on subgraph grafting is used to create a series of operating scenarios with an increasing number of nodes to improve the adaptability of the deep learning model to the increasing number of nodes in the power grid. The sample enhancement method based on subgraph grafting is as follows:

[0082] C1. Initialization. Set the number of nodes to be added as N expand , and generate a subgraph with the number of nodes N according to steps A1 - A4 of the subgraph sampling method mentioned in the previous section expand , denoted as

[0083] C2. Boundary tie-line power processing. After the subgraph is extracted, denote the number of tie-lines between the subgraph and the external power grid as M. To improve the richness of the power flow after subgraph grafting, in this embodiment, m (0 ≤ m < M) tie-lines are randomly selected from the M tie-lines, and the power of these m tie-lines is equivalent to the load, while the power of the remaining M - m tie-lines remains unchanged. Figure 4 is an example of boundary tie-line power processing. Assume that the number of nodes N of the subgraph to be extracted expand = 9. After extraction, the subgraph is as shown in the middle figure. The number of tie-lines between the subgraph and the external power grid M = 3. Denote the powers flowing from nodes i, j, and k on the three groups of tie-lines to the external power grid as P iG + jQ iG , P jG + jQ jG and P kG + jQ kGFrom three sets of tie lines, m tie lines are randomly selected for load equivalence. Assuming m = 1 and the selected tie lines are from node i to the external power grid, then the power of node i after equivalence is (P... i -P iG )+j(Q i -Q iG The power of the other two nodes j and k and their tie line power remain unchanged.

[0084] C3. Subgraph Grafting. After step C2, the number of remaining ineffective tie lines in the subgraph is Mm. Therefore, Mm nodes need to be extracted from the complete topology of the power grid for grafting. After grafting, additional load needs to be added to these Mm nodes to balance the source and load of the system. Figure 5 To illustrate the additional load after grafting, assuming nodes u and v are selected for grafting, then after grafting, node k will send P to node u. kG +jQ kG The power, node j transmits P to node v jG +jQ jG The power of node u. To balance the source and load of the system, nodes u and v need to be additionally loaded. After the load is added, the power of node u is modified to (P). u -P kG )+j(Q u -Q kG The power of node v is modified to (P) v -P jG )+j(Q v -Q jG ).

[0085] C4. Data Generation. Similar to the sample augmentation method for subgraph sampling, after completing the new graph construction and power balance, a 20% random fluctuation in node load is considered, and generator output is adjusted to balance the system power. In addition, the opening and closing of 0-2 branches are considered, and power flow calculations are used to simulate and generate training samples after subgraph grafting.

[0086] (3) Case Test

[0087] This embodiment uses the IEEE 39-node system for subgraph sampling and subgraph grafting case analysis. Before subgraph sampling, a baseline scenario needs to be generated. In this embodiment, the normalized load of 19 nodes in the actual power grid for one year is used to assign values ​​to the 19 load nodes in the system. Then, after randomly considering the shutdown of 0-3 generators or the expansion of 1-2 generators, the generator output is randomly arranged to ensure the source-load balance of the system. Finally, the reactive power compensation of the nodes is adjusted to make the scenario converge. After this step, a total of 8760 baseline scenarios are obtained, of which the topology structure and the complete power flow results of all nodes of one baseline scenario are as follows. Figure 6As shown in Table 1.

[0088] Table 1 Power flow results for the baseline scenario

[0089]

[0090]

[0091] The following section describes how to perform data augmentation on the baseline scene using the subgraph sampling and subgraph grafting method proposed in this embodiment.

[0092] 3.1) Subgraph Sampling Case

[0093] The sample augmentation method based on subgraph sampling proposed in this embodiment is used to perform subgraph sampling on the above-mentioned benchmark scene, and the number of subgraph nodes N is set. sub =20, the subgraph result obtained after subgraph sampling is as follows Figure 7 As shown.

[0094] According to the sampling results of the subgraph, the connection lines between the subgraph and the external power grid include 9 lines: 16-21, 16-24, 16-17, 19-33, 19-20, 18-17, 2-25, 2-30, and 2-1. The power of these 9 lines in the baseline scenario is shown in Table 2.

[0095] Table 2 Power of Subgraph Nodes and External Power Grid Connections

[0096] Serial Number First node End node Line active power / MW Line reactive power / Mvar 1 16 21 85.8 -26.0 2 16 24 182.8 -16.0 3 16 17 -151.2 -13.2 4 19 33 -129.9 -73.0 5 19 20 -169.6 29.9 6 18 17 122.2 -23.9 7 2 25 -165.8 8.2 8 2 30 -121.6 148.5 9 2 1 -72.5 14.4

[0097] Based on the tie-line power in Table 2, power equivalence is performed on nodes 16, 19, 18, and 2. The power of the nodes before and after equivalence is shown in Table 3.

[0098] Table 3 Results of Node Power Equivalence Before and After

[0099]

[0100] Finally, considering the 20% fluctuation in load power at all nodes, the generator power is rearranged to balance the source and load power of the system. Simultaneously, considering the interruptions of lines 4-14 and 7-8, a subgraph sample is generated. The power flow results for all nodes in the subgraph sample are shown in Table 4, and the subgraph topology is as follows: Figure 8 As shown.

[0101] Table 4 Power flow results of subgraph samples after subgraph sampling enhancement.

[0102] Node name Active power P / MW Reactive power Q / Mvar Voltage amplitude V / pu Phase angle θ / ° 2 424.0 -115.7 0.981 3.026 3 -137.2 58.2 0.993 -0.821 4 -243.5 -89.6 0.998 -2.056 5 0.0 0.0 1.013 -1.050 6 0.0 0.0 1.015 -0.932 7 -143.6 41.7 1.018 -1.681 8 -216.2 19.7 1.015 -0.696 9 0.0 0.0 1.014 4.892 10 0.0 0.0 1.046 -0.954 11 0.0 0.0 1.035 -0.969 12 -4.6 -48.0 1.035 -1.358 13 0.0 0.0 1.043 -1.678 14 0.0 0.0 1.037 -3.472 15 -158.0 -2.4 1.023 -7.378 16 -416.1 -114.8 1.016 -8.270 18 -185.2 7.4 0.993 -2.263 19 240.0 34.6 1.029 -5.749 31 217.8 -214.5 0.957 2.282 32 357.4 363.4 1.045 3.058 39 276.5 -125.9 0.998 8.846

[0103] 3.2) Subgraph grafting case

[0104] The sample augmentation method based on subgraph grafting proposed in this embodiment is used to perform subgraph grafting augmentation on the above-mentioned benchmark scene, and the number of grafted subgraph nodes N is set. expand =5, the subgraph result obtained after subgraph sampling is as follows Figure 9 As shown, the subgraph includes nodes 21, 22, 23, 35 and 36, where node 21 transmits power to the external power grid of (-85.8-j1.2) MVA and node 23 transmits power to the external power grid of (62.2-j35.0) MVA.

[0105] The interconnection lines between the subgraph and the external power grid have M=2. Random sampling is performed on these interconnection lines for load equivalence. Assuming the node with m=1 that requires load equivalence is node 23, the power passing through the equivalent node 23 is modified from (-137.1+j51.6)MVA to (-199.3+j86.6)MVA. Next, the above 5 nodes are renumbered, with their sequence numbers set to 40-44 to ensure that node names are not repeated in subsequent processes.

[0106] Next, the extracted subgraph is grafted onto node 13 in the graph, as follows: Figure 10 As shown, the power transmitted from node 40 to the outside is equivalent to that of node 13, and the power of node 13 is changed from (0.0+j0.0)MVA to (85.8+j1.2)MVA.

[0107] Finally, considering a 20% fluctuation in load across all nodes, the unit power is redistributed to balance the system source and load. The training samples are then grafted using subgraphs generated by the disconnection of branches 4-14 and 5-6. The sample topology is as follows: Figure 11 As shown in Table 5, the node power flow output is as follows.

[0108] Table 5 shows the power flow results of the samples after subgraph grafting.

[0109] Node name Active power P / MW Reactive power Q / Mvar Voltage amplitude V / pu Phase angle θ / ° 1 0.0 0.0 1.027 1.718 2 0.0 98.4 1.045 -1.489 3 -142.3 65.2 1.051 -4.057 4 -248.1 -91.3 1.042 -4.664 5 0.0 0.0 1.037 -3.722 6 0.0 0.0 1.035 -3.476 7 -186.7 29.7 1.037 -4.095 8 -197.8 30.1 1.037 -3.940 9 0.0 0.0 1.024 0.535 10 0.0 0.0 1.060 -3.588 11 0.0 0.0 1.051 -3.551 12 -4.2 -43.0 1.052 -3.595 13 79.3 1.1 1.057 -3.582 14 0.0 0.0 1.052 -4.322 15 -150.6 5.4 1.052 -5.335 16 -236.9 -133.1 1.050 -5.024 17 0.0 0.0 1.052 -5.086 18 -75.6 -14.4 1.051 -4.894 19 0.0 0.0 1.063 -0.575 20 -333.8 39.5 1.000 0.164 21 -223.4 -5.6 1.050 -4.982 22 0.0 0.0 1.049 -3.302 23 -121.8 56.9 1.047 -3.348 24 -256.3 10.3 1.050 -5.461 25 -102.2 77.0 1.046 -0.797 26 -69.7 -107.8 1.051 -4.053 27 -255.9 -13.6 1.050 -5.591 28 -51.3 -51.0 1.050 -3.209 29 -129.0 9.8 1.050 -2.532 30 27.6 -142.4 0.994 -1.206 31 295.1 -287.2 0.957 0.797 32 6.5 283.9 1.045 -3.515 33 356.6 79.1 1.006 2.297 34 428.2 -28.6 0.987 4.697 35 240.8 -1.4 1.023 -1.418 36 225.9 -115.3 1.015 0.000 37 446.7 -98.7 0.995 5.094 38 261.4 -81.9 1.013 -0.244 39 368.5 -326.1 0.998 3.770 40 -168.1 18.5 1.055 -3.122 41 0.0 0.0 1.048 -1.403 42 -198.1 16.1 1.041 -2.001 43 357.1 9.4 1.023 1.394 44 74.8 -96.9 1.015 -0.872

[0110] (4) Advantages and beneficial effects

[0111] In summary, compared with the prior art, the present invention has at least the following advantages and beneficial effects:

[0112] 1) This invention proposes a method for enriching training samples based on changes in the number of nodes. By expanding the number of nodes in the annual operation scenarios of the power grid, a series of virtual operation scenarios conforming to the local topology wiring rules of the power grid are formed, thereby increasing the quantity and richness of training samples for the deep learning model.

[0113] 2) This invention proposes a sample augmentation method based on subgraph sampling. By extracting a local operating topology of the power grid, a series of training samples with fewer nodes than the actual operating topology of the nodes are formed, thereby improving the adaptability of the deep learning model to scenarios with reduced node numbers, such as generator start-up and shutdown.

[0114] 3) This invention proposes a sample augmentation method based on subgraph grafting. Small-scale local topologies are extracted from the power grid and randomly grafted onto the completed power grid structure to form a series of training samples with a larger number of nodes than the actual operating topology, thereby improving the adaptability of deep learning models to scenarios with increased node numbers, such as power grid expansion.

[0115] Example 2

[0116] This invention also provides an electronic device, which includes a processor and a memory. The memory stores at least one instruction, at least one program, a code set, or an instruction set. The at least one instruction, the at least one program, the code set, or the instruction set are loaded and executed by the processor to implement a power system power flow analysis training data augmentation method as shown in Embodiment 1.

[0117] It is understood that the memory may include random access memory (RAM) or read-only memory. Optionally, the memory may include non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the various method embodiments described above, etc.; the stored data area may store data created according to the use of the server, etc.

[0118] A processor may include one or more processing cores. The processor connects to various parts of the server via various interfaces and lines, executing instructions, programs, code sets, or instruction sets stored in memory, and accessing data stored in memory to perform various server functions and process data. Optionally, the processor may be implemented using at least one of the following hardware forms: Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor may integrate one or more of the following: Central Processing Unit (CPU) and Modem. The CPU primarily handles the operating system and applications; the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor.

[0119] Since this electronic device is the electronic device corresponding to the power system power flow analysis training data enhancement method in the embodiment of the present invention, and the principle of solving the problem by this electronic device is similar to that of the method, the implementation of this electronic device can refer to the implementation process of the above method embodiment, and the repeated parts will not be described again.

[0120] Example 3

[0121] This invention also provides a computer-readable storage medium storing at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement a power system power flow analysis training data augmentation method as shown in Embodiment 1.

[0122] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0123] Since the storage medium is the storage medium corresponding to the power system power flow analysis training data enhancement method in the embodiment of the present invention, and the principle of the storage medium in solving the problem is similar to that of the method, the implementation of the storage medium can refer to the implementation process of the above method embodiment, and the repeated parts will not be described again.

[0124] Example 4

[0125] In some possible implementations, various aspects of the methods of the embodiments of the present invention can also be implemented as a program product comprising program code that, when run on a computer device, causes the computer device to perform the steps of a power system power flow analysis training data augmentation method according to various exemplary embodiments of this application as described above. The executable computer program code or "code" used to perform the various embodiments can be written in high-level programming languages ​​such as C, C++, Python, Smalltalk, Java, JavaScript, Visual Basic, Structured Query Language (e.g., Transact-SQL), Perl, or in various other programming languages.

[0126] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0127] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0128] The above embodiments are merely illustrative of the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent changes or modifications made based on the essence of the content of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A method for augmenting training data in power system power flow analysis, characterized in that, Includes the following steps: Treating all buses in the power grid as nodes in the topology graph and all connected devices as edges in the topology graph, we obtain the structure diagram of the power grid, denoted as . ; Based on structural graph Samples are generated to enhance the training data by employing sample augmentation methods based on subgraph sampling and / or sample augmentation methods based on subgraph grafting. The sample augmentation method based on subgraph sampling includes: A1. Set the number of nodes in the subgraph to... Initialize the subgraph node set ; A2, in the structural diagram Search all related to The nodes connected to each other in the middle node form the boundary node set. ; A3. Based on the set of boundary nodes Perform subgraph expansion: on the set of boundary nodes Randomly select a subset subset All nodes added middle; A4. Repeat steps A2-A3 until... The number of elements in the middle is Obtain subgraph ; A5, Pair Diagram Perform power equivalence processing to ensure that the power flow distribution of the sampled subgraph is consistent with the original graph; A6. Generate samples based on the sub-graphs after power equivalence processing to obtain sub-graph samples with different numbers of nodes and different wiring structures; In step A3, the number of nodes in the subset is greater than 0, but after adding nodes from the subset, the number of nodes in the subgraph does not exceed [a certain value]. Subset The number of elements in the middle satisfies the constraint: In the formula, Indicates the number of elements in the set; Step A6 includes: In the equivalent subgraph, since only a portion of the power grid nodes are captured, the balancing node will not be in the subgraph. Therefore, a node is randomly selected from the subgraph as the balancing node. For the load of each node, random fluctuations within a preset range are considered, and then the output of the generator is adjusted to balance the source load of the system. On this basis, the opening of 0 to 2 branches is additionally considered to improve the model's ability to cope with branch opening topologies. Finally, power flow calculation tools are used to perform power flow calculations on the processed subgraph to form subgraph samples. In sample generation, multiple different subgraph sampling operations are performed on all actual operating scenarios to obtain a large number of subgraph samples with different numbers of nodes and different wiring structures. The sample augmentation method based on subgraph grafting includes: B1. Set the number of nodes to be added. Initialize the subgraph node set ; B2. In the structural diagram Search all related to The nodes connected to each other in the middle node form the boundary node set. ; B3. Based on the set of boundary nodes Perform subgraph expansion: on the set of boundary nodes Randomly select a subset subset All nodes added middle; B4. Repeat steps B2-B3 until... The number of elements in the middle is Obtain subgraph ; B5. Pair Diagram Perform power processing on boundary tie lines; B6. Perform subgraph grafting on the subgraph after power processing of the boundary tie line; B7. Generate samples based on the subgraph after grafting to obtain subgraph samples.

2. The method for augmenting training data for power system power flow analysis according to claim 1, characterized in that, The pair graph Power equivalence processing is performed, including: Set nodes i For subgraph Nodes in the middle, nodes u For subgraph External nodes, P i , Q i For equivalent pre-node i Active power and reactive power, P iu and Q iu Equivalent pre-nodes i Flow to Node u Active power and reactive power; After equivalence, it does not belong to a subgraph. All nodes in the graph are deleted, and the connection power of subgraphs and boundary nodes is equivalent to the load, i.e., the nodes. i The power from P i +jQ i Become ( P i -P iu )+ j ( Q i -Q iu ), j Represents an imaginary number.

3. The method for augmenting training data for power system power flow analysis according to claim 1, characterized in that, Step B5 includes: Subgraph The number of interconnection lines with the external power grid is M ; from M Randomly selected from the communication lines m One connection line, to be extracted m The power of the tie line is equivalent to the load, and the rest... M - m The power of each connecting line remains constant.

4. The method for augmenting training data for power system power flow analysis according to claim 1, characterized in that, Step B6 includes: After processing the boundary tie line power, the number of remaining inequivalent tie lines in the subgraph is: M - m Therefore, it is necessary to extract from the complete topology map of the power grid. M - m Grafting is performed on each node; After grafting, it is necessary to... Mm Each node adds an extra load to balance the source and load of the system.

5. An electronic device, characterized in that, The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the method as described in any one of claims 1 to 4.

6. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the method as described in any one of claims 1 to 4.

7. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a processor, are used to perform the method as described in any one of claims 1 to 4.