A method, device and storage medium for calculating power flow of a power grid with a variable topology

By constructing a graph model and using a graph convolutional layer combined with a fully connected layer, the current calculation problem under the changes in the grid topology structure is solved, and the current prediction of different topology structures is achieved, and the calculation stability and accuracy are improved.

CN118659371BActive Publication Date: 2025-01-10STATE GRID SHANDONG ELECTRIC POWER COMPANY WEIFANG POWER SUPPLY +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411149604.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2025-01-10
Estimated Expiration
2044-08-21

AI Technical Summary

Technical Problem

The prior art is difficult to effectively perform trend calculations under the changes in the power grid topology, and deep learning models are difficult to cope with the dynamically adjusted power grid topology, which makes trend convergence often difficult to achieve.

Method used

The grid current calculation method adopts a variable topological structure, obtain node features by constructing a graph model, and use a pre-trained grid current prediction model, combining the graph convolutional layer and fully connected layer to predict the current situation of grid branches. The model structure includes the input layer , the graph convolution layer, fully connected layer and output layer of stacked structure, the activation function is relu or leaky_relu, and the output layer is designed as dropout fully connected network, suitable for trend prediction of different topological structures.

Benefits of technology

The current prediction and calculation of power grids with different topologies is realized, which can effectively adapt to the changes in the power grid topology and improve the stability and accuracy of current calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118659371B_ABST
    Figure CN118659371B_ABST
Patent Text Reader

Abstract

The present invention relates to a method, device and storage medium for calculating power grid flow of a variable topology structure, and to the technical field of power grid calculation. The present application constructs a graph according to the power grid topology structure to model the power grid, obtains the node characteristics of the graph, and the nodes in the graph represent the branches in the power grid topology structure; obtains the branch electrical characteristics of each branch in the power grid topology structure and the busbar electrical characteristics of each busbar, and splices the associated branch electrical characteristics and busbar electrical characteristics to obtain the node characteristics; predicts the power flow conditions of each branch in the power grid based on the node characteristics through a pre-trained power grid flow prediction model, and the power grid flow prediction model can adapt to different topologies, including: an input layer, the input layer is connected to a first fully connected layer, the first fully connected layer is connected to a graph convolution layer in a stacked structure, the graph convolution layer is connected to a second fully connected layer, the second fully connected layer is connected to an output layer, and the first fully connected layer, the graph convolution layer and the second fully connected layer are followed by an activation function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power grid flow calculation, and in particular to a power grid flow calculation method, device and storage medium with a variable topology structure. Background Art

[0002] The power grid is a very complex and important system. Research on how to operate the power grid effectively and stably is very important. With the large-scale access of distributed power supply nodes to the grid, the performance of the power system is becoming more and more dynamic. In order to adapt to the instability of distributed power grids, the power grid control system needs to adjust the power grid based on load demand, physical characteristics of the power grid, changes in distributed power supply, etc., and the power grid flow is of great significance to the power grid regulation process.

[0003] The power flow calculation of the power system is a set of high-order nonlinear equations. Iteration through optimization algorithms is an effective way to calculate such equations. Therefore, if you want to successfully perform the power flow calculation, you must ensure that it can converge, so that you can finally successfully calculate and give an answer. However, the rapid growth of science and technology economy has led to an increasing degree of urbanization, so the power grid has a larger scale and has been growing rapidly, making it often difficult to achieve power grid power flow convergence. Moreover, in the case that the power grid topology may be dynamically adjusted, a large amount of calculation is required for new optimization. Deep learning is applied to power system power flow calculation, such as using multi-layer perceptrons to model power grid power flow data. For fixed power grid topology, some deep learning models can well model the connection between power grid power flow data and make better predictions. However, they are difficult to cope with changes in power grid topology. Summary of the invention

[0004] In order to solve the above technical problem or at least partially solve the above technical problem, the present invention provides a method, device and storage medium for calculating power flow in a power grid with a variable topology structure.

[0005] In a first aspect, the present invention provides a method for calculating power flow in a power grid with a variable topology structure, comprising:

[0006] The power grid is modeled by constructing a graph according to the power grid topology structure to obtain node characteristics of the graph; the nodes in the graph represent branches in the power grid topology structure, the branch electrical characteristics of each branch in the power grid topology structure and the busbar electrical characteristics of each busbar are obtained, and the node characteristics are obtained by splicing the associated branch electrical characteristics and busbar electrical characteristics;

[0007] Predicting the power flow conditions of each branch in the power grid based on node features through a pre-trained power grid power flow prediction model, the power grid power flow prediction model includes: an input layer, the input layer is connected to a first fully connected layer, the first fully connected layer is connected to a graph convolution layer in a stacked structure, the graph convolution layer in a stacked structure is connected to a second fully connected layer, the second fully connected layer is connected to an output layer, and the first fully connected layer, the graph convolution layer, and the second fully connected layer are followed by an activation function;

[0008] Among them, for the input information , the graph convolutional layer performs information transfer and aggregation as follows:

[0009] The information is transmitted as follows:

[0010] ;

[0011] in, Display information In the The first graph convolutional sublayer The iteration value of the step, the number of iterations in each graph convolution sublayer is times, the total supply contains Graph convolution sublayers, represents a nonlinear activation function, , , and is the learnable weight matrix, is the normalized node adjacency matrix;

[0012] The information is aggregated as follows:

[0013] ;

[0014] in, represents the aggregation feature, Indicates The first graph convolutional sublayer The iteration value of the step.

[0015] Furthermore, modeling the power grid based on the power grid topology structure includes:

[0016] The power grid is divided into a busbar and branches connected to the busbar based on the power grid topology;

[0017] Graph nodes are used to represent branches, and graph lines are used to represent common buses between branches, thus forming a graph representing the topological structure of the power grid.

[0018] Furthermore, splicing the associated branch electrical characteristics and bus electrical characteristics to obtain the node characteristics includes: obtaining the branch electrical characteristics of each branch and the bus electrical characteristics of each bus in the power grid topology structure;

[0019] Set the existing branch , there is a busbar and busbar With branch If associated, then branch The branch electrical characteristics of are expressed as: Busbar The busbar electrical characteristics are expressed as: Busbar The busbar electrical characteristics are expressed as: ;

[0020] Then branch The node characteristics of the formed nodes are:

[0021] , represents the concatenation operation of features, Represents a branch The corresponding node.

[0022] Furthermore, the branch electrical characteristics include: resistance Reactance , Electron , the turns ratio of the transformer connected to the branch , Phase shift of the transformer connected to the branch , superscript Indicates a branch; the electrical characteristics of the bus include: voltage amplitude , voltage phase , active power , reactive power , Active output power of the power source connected to the bus , reactive output power of the power source connected to the bus , the conductance of the busbar shunt assembly , Susceptance of busbar shunt components , superscript Indicates busbar, superscript Indicates the power source connected to the busbar.

[0023] Furthermore, the activation function is any one of the following activation functions: relu activation function, leaky_relu activation function.

[0024] Furthermore, the output layer is a fully connected network using dropout design, and the output dimension is eight.

[0025] Furthermore, each node feature input through the input layer is processed by the first fully connected layer and the activation function into information representing the local state of the power grid, and the information is passed to the graph convolution layer for information transmission and aggregation. The second fully connected layer and the activation function map the aggregated features to the output layer. The output layer represents the real and imaginary parts of the inflow current, the real and imaginary parts of the outflow current, the real and imaginary parts of the inflow power, and the real and imaginary parts of the outflow power of the power grid branch based on the predicted eight-dimensional numerical representation of the aggregated features.

[0026] Furthermore, the training process of the power flow prediction model is as follows:

[0027] Acquire multiple groups of actual values ​​of branch electrical characteristics and bus electrical characteristics of the power grid from historical data of power grid operation or power grid simulation data, and calculate the power flow conditions of the power grid branches based on the historical data or simulation data of the power grid; construct the actual values ​​of branch electrical characteristics and bus electrical characteristics and the corresponding real power flow conditions into training data;

[0028] After the power flow prediction model is created, the training data is input into the power flow prediction model for prediction, the mean square error between the predicted power flow situation and the actual power flow situation is calculated, and the parameters of the power flow prediction model are adjusted by stochastic gradient descent according to the mean square error;

[0029] The parameters of the power grid power flow prediction model are adjusted iteratively until the mean square error between the predicted power flow situation and the actual power flow situation meets the requirements.

[0030] In a second aspect, the present invention provides a device for implementing a method for calculating power flow in a power grid with a variable topology structure, comprising: at least one processing unit, the processing unit being connected to a storage unit and a collection unit via a bus unit, the collection unit collecting parameters required by the method for calculating power flow in a power grid with a variable topology structure, the storage unit storing a computer program, and when the computer program is executed by the processing unit, the method for calculating power flow in a power grid with a variable topology structure is implemented.

[0031] In a third aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for calculating power flow in a power grid with a variable topology structure is implemented.

[0032] The above technical solution provided by the embodiment of the present invention has the following advantages compared with the prior art:

[0033] The graph in this application models the power grid into several homogeneous local power grids, and the local state of the power grid can be represented by node features. In the power grid flow prediction model of this application, the first fully connected layer and the graph convolution layer cooperate to perform correlation analysis on the information of the local state of the power grid represented by the node features. In the above process, the global information of the power grid is not associated. In fact, the correlation of the local state of the power grid with known local branches and bus conditions is modeled through the first fully connected layer and the graph convolution layer. Because in this application, the local state of the power grid comes from the node features of the same structure; in this way, the mutual influence between the local states of the power grid is mainly reflected in the relative position relationship between the local power grids. The graph convolution layer transmits the aggregated features to the second connection layer, and the second fully connected layer and the output layer cooperate to associate the various local power grids of the power grid, which is actually the mutual influence between the various local power grids from the global modeling. This makes the power grid flow prediction model of this application applicable to the flow prediction calculation of power grids with different topological structures. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0036] Figure 1 A flow chart of a method for calculating power flow in a power grid with a variable topology structure provided by an embodiment of the present invention;

[0037] Figure 2 A flowchart of constructing a graph according to the adjusted grid topology structure to model the grid and obtain node features of the graph provided in an embodiment of the present invention;

[0038] Figure 3 A schematic diagram of a diagram provided for an embodiment of the present invention;

[0039] Figure 4 A schematic diagram of a power grid flow prediction model provided by an embodiment of the present invention;

[0040] Figure 5 A schematic diagram of a graph convolutional layer provided in an embodiment of the present invention;

[0041] Figure 6 A schematic diagram of a device for implementing a method for calculating power flow in a power grid with a variable topology structure provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0044] Example 1

[0045] like Figure 1 As shown, the technology of the present invention implements a power flow calculation method for a variable topology structure, including:

[0046] The power grid is modeled by constructing a graph based on the power grid topology structure to obtain the node characteristics of the graph. Figure 2 As shown, including:

[0047] The power grid is divided into a busbar and branches connected to the busbar based on the power grid topology;

[0048] Use graph nodes to represent branches, and use graph lines to represent the common busbars between branches, to form a graph representing the topological structure of the power grid; Figure 3 As shown, in the diagram representing the power grid structure, the nodes of the diagram represent branches. Figure 3 The line between nodes 1 and 2 indicates that nodes 1 and 2 are connected to a common bus.

[0049] The branch electrical characteristics of each branch and the bus electrical characteristics of each bus in the power grid topology are obtained, and the associated branch electrical characteristics and bus electrical characteristics are spliced ​​to obtain the node characteristics. The node characteristics include the branch electrical characteristics of the branch represented by the node, and the bus electrical characteristics of the bus associated with the branch represented by the node.

[0050] The branch electrical characteristics include: resistance Reactance , Electron , the turns ratio of the transformer connected to the branch , Phase shift of the transformer connected to the branch , superscript Indicates a branch; the electrical characteristics of the bus include: voltage amplitude , voltage phase , active power , reactive power , Active output power of the power source connected to the bus , reactive output power of the power source connected to the bus , the conductance of the busbar shunt assembly , Susceptance of busbar shunt components , superscript Indicates busbar, superscript Indicates the power source connected to the busbar.

[0051] Set the existing branch , there is a busbar and busbar With branch If associated, then branch The branch electrical characteristics of are expressed as:

[0052] ;

[0053] Busbar The busbar electrical characteristics are expressed as:

[0054] ;

[0055] Busbar The busbar electrical characteristics are expressed as:

[0056] ;

[0057] Then branch The node characteristics of the formed nodes are:

[0058] , represents the concatenation operation of features, Represents a branch The corresponding node.

[0059] The diagram in this application models the power grid into several homogeneous power grid parts, and the state of the local power grid can be represented by node characteristics.

[0060] The pre-trained power flow prediction model is used to predict the power flow conditions of each branch in the power grid based on node characteristics.

[0061] like Figure 4As shown, the power grid flow prediction model includes: an input layer, the input layer is connected to the first fully connected layer, the first fully connected layer is connected to the graph convolution layer, the graph convolution layer is connected to the second fully connected layer, the second fully connected layer is connected to the output layer, and the first fully connected layer, the graph convolution layer and the second fully connected layer are followed by an activation function.

[0062] The structure of the power flow prediction model described in the present application includes a stacked graph convolution layer to obtain deeper features. To avoid the problem of gradient messages, the activation function uses any one of the following activation functions: relu activation function, leaky_relu activation function.

[0063] exist Figure 4 In the given example, the depth of the first fully connected layer and the second fully connected layer is two layers. The output layer is a fully connected network designed with dropout, and the output dimension is eight. Each node feature input through the input layer is processed by the first fully connected layer and the activation function into information representing the local state of the power grid, and the information is passed to the graph convolution layer for information transmission and aggregation. The second fully connected layer and the activation function map the aggregated features to the output layer. The output layer represents the real and imaginary parts of the inflow current, the real and imaginary parts of the outflow current, the real and imaginary parts of the inflow power, and the real and imaginary parts of the outflow power of the power grid branch based on the predicted eight-dimensional numerical representation of the aggregated features.

[0064] In the specific implementation process, the principle of information transmission and aggregation of the graph convolution layer is as follows:

[0065] The information is transmitted as follows:

[0066] ;

[0067] in, Display information In the The first graph convolutional sublayer The iteration value of the step, the number of iterations in each graph convolution sublayer is times, the total supply contains Graph convolution sublayers, represents a nonlinear activation function, , , and is the learnable weight matrix, is the normalized node adjacency matrix; an exemplary nonlinear activation function The sigmoid activation function is used.

[0068] The information is aggregated as follows:

[0069] ;

[0070] in, represents the aggregation feature, Indicates The first graph convolutional sublayer The iteration value of the step.

[0071] The structure of the graph convolution layer is as follows Figure 5 As shown, Figure 5 Each row in the structure represents an iteration The number of graph convolution sublayers is one step, which contains The iterative final values ​​of all graph convolution sublayers are aggregated through the average pooling layer to achieve information aggregation.

[0072] The training of the power flow prediction model is based on the stochastic gradient descent algorithm, using the mean square error between the predicted results and the actual results as the loss function. The specific training process is as follows:

[0073] The actual values ​​of multiple groups of branch electrical characteristics and bus electrical characteristics of the power grid are obtained from the historical data of the power grid operation or the power grid simulation data, and the real and imaginary parts of the inflow current, the real and imaginary parts of the outflow current, the real and imaginary parts of the inflow power, and the real and imaginary parts of the outflow power of the power grid branches are calculated based on the historical data or the simulation data of the power grid; the branch electrical characteristics and the bus electrical characteristics and the actual real and imaginary parts of the inflow current, the real and imaginary parts of the outflow current, the real and imaginary parts of the inflow power, and the real and imaginary parts of the outflow power are constructed into training data.

[0074] After the power flow prediction model is created, the training data is input into the power flow prediction model for prediction, the mean square error between the prediction result and the actual result is calculated, and the parameters of the power flow prediction model are adjusted by stochastic gradient descent according to the mean square error;

[0075] Iterate until the mean square error between the predicted results and the true results meets the requirements.

[0076] In the power grid flow prediction model of the present application, the first fully connected layer and the graph convolution layer cooperate to perform correlation analysis on the information of the local state of the power grid represented by the node characteristics. In the above process, the global information of the power grid is not associated. In fact, the correlation between the local state of the power grid with known local branches and bus conditions is modeled through the first fully connected layer and the graph convolution layer.

[0077] In this application, the local states of the power grid come from the node features of the same structure; thus, the mutual influence between the local states of the power grid is mainly reflected in the relative position relationship between the local power grids. The graph convolution layer transmits the aggregated features to the second connection layer, and the second fully connected layer cooperates with the output layer to associate the various local power grids of the power grid, which is actually the mutual influence between the various local power grids from a global modeling perspective. This makes the power grid flow prediction model applicable to the flow prediction of power grids with different topological structures.

[0078] Example 2

[0079] See also Figure 6 As shown, an embodiment of the present invention provides a device for implementing a method for calculating power flow of a power grid with a variable topology structure, comprising: at least one processing unit, the processing unit is connected to a storage unit and a collection unit through a bus unit, the collection unit collects parameters required by the method for calculating power flow of a power grid with a variable topology structure described in any one of claims 1-8, the storage unit is a computer-readable storage medium, and can be used to store software programs, computer executable programs, and modules, such as the software programs, computer executable programs, and modules corresponding to the method for calculating power flow of a power grid with a variable topology structure in an embodiment of the present invention. The processing unit implements the above-mentioned method for calculating power flow of a power grid with a variable topology structure by running the software programs, computer executable programs, and modules stored in the storage unit, comprising:

[0080] A graph is constructed according to the topology of the power grid to model the power grid and obtain node features of the graph; the nodes in the graph represent branches in the topology of the power grid, and the branch electrical features of each branch and the bus electrical features of each bus in the topology of the power grid are obtained. Based on the branch electrical features and the bus electrical features, node features are constructed for each node in the graph;

[0081] Predicting the power flow conditions of each branch in the power grid based on node features through a pre-trained power grid power flow prediction model, the power grid power flow prediction model includes: an input layer, the input layer is connected to a first fully connected layer, the first fully connected layer is connected to a graph convolution layer in a stacked structure, the graph convolution layer in a stacked structure is connected to a second fully connected layer, the second fully connected layer is connected to an output layer, and the first fully connected layer, the graph convolution layer, and the second fully connected layer are followed by an activation function;

[0082] Each node feature input through the input layer is processed by the first fully connected layer and the activation function into information representing the local state of the power grid. The information is transmitted to the graph convolution layer for information transmission and aggregation. The second fully connected layer and the activation function map the aggregated features to the output layer. The output layer predicts the real and imaginary parts of the inflow current, the real and imaginary parts of the outflow current, the real and imaginary parts of the inflow power, and the real and imaginary parts of the outflow power of the power grid branch based on the mapping of the aggregated features.

[0083] Among them, for the input information , the graph convolutional layer performs information transfer and aggregation as follows:

[0084] The information is transmitted as follows:

[0085] ;

[0086] in, Display information In the The first graph convolutional sublayer The iteration value of the step, the number of iterations in each graph convolution sublayer is times, the total supply contains Graph convolution sublayers, represents a nonlinear activation function, , , and is the learnable weight matrix, is the normalized node adjacency matrix;

[0087] The information is aggregated as follows:

[0088] ;

[0089] in, represents the aggregation feature, Indicates The first graph convolutional sublayer The iteration value of the step.

[0090] Of course, the computer program stored in the storage unit of the device for implementing the power grid flow calculation method with a variable topology structure provided by an embodiment of the present invention is not limited to the method operations described above, and can also execute related operations in the power grid flow calculation method with a variable topology structure provided by any embodiment of the present invention.

[0091] Example 3

[0092] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed, the method for calculating power flow of a power grid with a variable topology structure is implemented, including:

[0093] A graph is constructed according to the topology of the power grid to model the power grid and obtain node features of the graph; the nodes in the graph represent branches in the topology of the power grid, and the branch electrical features of each branch and the bus electrical features of each bus in the topology of the power grid are obtained. Based on the branch electrical features and the bus electrical features, node features are constructed for each node in the graph;

[0094] Predicting the power flow conditions of each branch in the power grid based on node features through a pre-trained power grid power flow prediction model, the power grid power flow prediction model includes: an input layer, the input layer is connected to a first fully connected layer, the first fully connected layer is connected to a graph convolution layer in a stacked structure, the graph convolution layer in a stacked structure is connected to a second fully connected layer, the second fully connected layer is connected to an output layer, and the first fully connected layer, the graph convolution layer, and the second fully connected layer are followed by an activation function;

[0095] Each node feature input through the input layer is processed by the first fully connected layer and the activation function into information representing the local state of the power grid. The information is transmitted to the graph convolution layer for information transmission and aggregation. The second fully connected layer and the activation function map the aggregated features to the output layer. The output layer predicts the real and imaginary parts of the inflow current, the real and imaginary parts of the outflow current, the real and imaginary parts of the inflow power, and the real and imaginary parts of the outflow power of the power grid branch based on the mapping of the aggregated features.

[0096] Among them, for the input information , the graph convolutional layer performs information transfer and aggregation as follows:

[0097] The information is transmitted as follows:

[0098] ;

[0099] in, Display information In the The first graph convolutional sublayer The iteration value of the step, the number of iterations in each graph convolution sublayer is times, the total supply contains Graph convolution sublayers, represents a nonlinear activation function, , , and is the learnable weight matrix, is the normalized node adjacency matrix;

[0100] The information is aggregated as follows:

[0101] ;

[0102] in, represents the aggregation feature, Indicates The first graph convolutional sublayer The iteration value of the step.

[0103] A computer-readable storage medium provided in an embodiment of the present invention stores a computer program which is not limited to the method operations described above, but can also execute related operations in a power grid flow calculation method with a variable topology structure provided in any embodiment of the present invention.

[0104] In the embodiments provided by the present invention, it should be understood that the disclosed structures and methods can be implemented in other ways. For example, the structural embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, structures or units, which can be electrical, mechanical or other forms.

[0105] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0106] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0107] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for calculating power flow in a power grid with a variable topology structure, characterized in that: include: The power grid is modeled by constructing a graph according to the power grid topology structure to obtain the node characteristics of the graph; wherein, based on the power grid topology structure, the power grid is divided into a busbar and branches connecting the busbars; the branches are represented by graph nodes, and the common busbars between the branches are represented by graph lines, so as to form a graph representing the power grid topology structure; the nodes in the graph represent the branches in the power grid topology structure, and the branch electrical characteristics of each branch and the busbar electrical characteristics of each busbar in the power grid topology structure are obtained, and the node characteristics are obtained by splicing the associated branch electrical characteristics and busbar electrical characteristics, wherein the branch electrical characteristics include: resistance Reactance , Electron , the turns ratio of the transformer connected to the branch , Phase shift of the transformer connected to the branch , superscript Indicates a branch; the electrical characteristics of the bus include: voltage amplitude , voltage phase , active power , reactive power , Active output power of the power source connected to the bus , reactive output power of the power source connected to the bus , the conductance of the busbar shunt assembly , Susceptance of busbar shunt components , superscript Indicates busbar, superscript Indicates the power source connected to the busbar; set the existence of branches , there is a busbar and busbar With branch If associated, then branch The branch electrical characteristics of are expressed as: , busbar The busbar electrical characteristics are expressed as: Busbar The busbar electrical characteristics are expressed as: ; then branch The node characteristics of the formed nodes are: , represents the concatenation operation of features, Represents a branch The corresponding graph node; Predicting the power flow conditions of each branch in the power grid based on node features through a pre-trained power grid power flow prediction model, the power grid power flow prediction model includes: an input layer, the input layer is connected to a first fully connected layer, the first fully connected layer is connected to a graph convolution layer in a stacked structure, the graph convolution layer in a stacked structure is connected to a second fully connected layer, the second fully connected layer is connected to an output layer, and the first fully connected layer, the graph convolution layer, and the second fully connected layer are followed by an activation function; Among them, for the input information , the graph convolutional layer performs information transfer and aggregation as follows: The information is transmitted as follows: ; in, Display information In the The first graph convolutional sublayer The iteration value of the step, the number of iterations in each graph convolution sublayer is times, the total supply contains Graph convolution sublayers, represents a nonlinear activation function, , , and is the learnable weight matrix, is the normalized node adjacency matrix; The information is aggregated as follows: ; in, represents the aggregation feature, Indicates The first graph convolutional sublayer The iteration value of the step; Each node feature input through the input layer is processed by the first fully connected layer and the activation function into information representing the local state of the power grid. The information is passed to the graph convolution layer for information transmission and aggregation. The second fully connected layer and the activation function map the aggregated features to the output layer. The output layer represents the real and imaginary parts of the inflow current, the real and imaginary parts of the outflow current, the real and imaginary parts of the inflow power, and the real and imaginary parts of the outflow power of the power grid branch based on the eight-dimensional numerical values ​​predicted by the aggregated features.

2. The method for calculating power flow of a power grid with a variable topology structure according to claim 1, characterized in that: The activation function is any one of the following activation functions: relu activation function and leaky_relu activation function.

3. The method for calculating power flow of a power grid with a variable topology structure according to claim 1, characterized in that: The output layer is a fully connected network designed with dropout, and the output dimension is eight.

4. The method for calculating power flow of a power grid with a variable topology structure according to claim 1, characterized in that: The training process of the power grid flow prediction model is as follows: Acquire multiple groups of actual values ​​of branch electrical characteristics and bus electrical characteristics of the power grid from historical data of power grid operation or power grid simulation data, and calculate the power flow conditions of the power grid branches based on the historical data or simulation data of the power grid; construct the actual values ​​of branch electrical characteristics and bus electrical characteristics and the corresponding real power flow conditions into training data; After the power grid flow prediction model is created, the training data is input into the power grid flow prediction model for prediction, the mean square error between the predicted power flow situation and the actual power flow situation is calculated, and the parameters of the power grid flow prediction model are adjusted by stochastic gradient descent according to the mean square error; The parameters of the power grid power flow prediction model are adjusted iteratively until the mean square error between the predicted power flow situation and the actual power flow situation meets the requirements.

5. A device for realizing a method for calculating power flow of a power grid with a variable topology structure, characterized in that: include: At least one processing unit, the processing unit is connected to a storage unit and a collection unit through a bus unit, the collection unit collects parameters required by the power grid flow calculation method for a variable topology structure as described in any one of claims 1-4, the storage unit stores a computer program, and when the computer program is executed by the processing unit, the power grid flow calculation method for a variable topology structure as described in any one of claims 1-4 is implemented.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for calculating power flow in a power grid with a variable topology structure according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Power grid load flow calculation method after line fault based on line graph convolutional neural network

    CN117892051A