Power grid flow planning method and device, storage medium and product
By constructing a spatiotemporal graph neural network and optimizing the trend path planning scheme, the problem of insufficient accuracy in the power grid trend planning is solved, and higher trend path planning accuracy and grid stability are achieved.
Patent Information
- Application Number
- CN202411974049.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-30
AI Technical Summary
Traditional grid current planning methods have low accuracy when dealing with dynamic changes and space-time coupling effects, resulting in the stable operation of the power grid.
By building a spatiotemporal graph neural network, collecting real-time and historical operation data, training the trend path planning model, generating the initial trend path planning scheme, and obtaining the target trend path planning scheme through optimization to adjust the current distribution and voltage state of the power grid.
It improves the accuracy of trend path planning, enhances the adaptability of the power grid to dynamic changes and space-time coupling effects, and ensures the stable operation and optimal performance of the power grid.
Smart Images

Figure CN119765355A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of power grid dispatching, and in particular to a power grid flow planning method, device, storage medium and product. Background Art
[0002] With the transformation of the global energy structure and the rapid development of renewable energy, the power grid is facing increasingly complex operating environments and challenges. As the power grid integrates a large number of distributed energy and renewable energy, the power flow planning problem of the power grid becomes complicated. Reasonable power flow planning can keep the voltage stable, distribute the load stably, reduce the occurrence of power grid failures, and ensure the stable operation of the power grid.
[0003] Traditional power grid flow planning methods mainly rely on linear programming, heuristic algorithms, etc. Although these methods can provide flow planning solutions, they have poor adaptability to dynamic changes in power grid operation and spatiotemporal coupling effects in power grids, resulting in low accuracy of the provided flow planning solutions, which may affect the stable operation of the power grid. Summary of the invention
[0004] The present invention provides a power grid flow planning method, equipment, storage medium and product, which are used to improve the accuracy of flow path planning.
[0005] In a first aspect, an embodiment of the present invention provides a power grid flow planning method, including:
[0006] Construct a space-time graph of the space-time graph neural network based on the topological structure of the power grid;
[0007] Collecting real-time operation data and historical operation data according to the space-time diagram;
[0008] Training the spatiotemporal graph neural network according to the historical operation data to obtain a power flow path planning model;
[0009] Inputting the real-time operation data into the power flow path planning model for processing to obtain an initial power flow path planning scheme for the power grid;
[0010] Optimizing the initial power flow path planning scheme to obtain a target power flow path planning scheme for the power grid;
[0011] The power flow distribution and voltage state in the power grid are adjusted according to the target power flow path planning scheme.
[0012] In a second aspect, an embodiment of the present invention further provides a power grid flow planning device, including:
[0013] A space-time graph construction module is used to construct a space-time graph of a space-time graph neural network according to the topological structure of the power grid;
[0014] An operation data collection module, used for collecting real-time operation data and historical operation data according to the space-time diagram;
[0015] A neural network training module, used for training the spatiotemporal graph neural network according to the historical operation data to obtain a power flow path planning model;
[0016] An initial scheme acquisition module, used for inputting the real-time operation data into the power flow path planning model for processing to obtain an initial power flow path planning scheme for the power grid;
[0017] An initial scheme optimization module, used for optimizing the initial power flow path planning scheme to obtain a target power flow path planning scheme of the power grid;
[0018] A power grid regulation module is used to regulate the power flow distribution and voltage state in the power grid according to the target power flow path planning scheme.
[0019] In a third aspect, an embodiment of the present invention further provides a computer device, the computer device comprising:
[0020] one or more processors;
[0021] A storage device for storing one or more programs;
[0022] When the one or more programs are executed by the one or more processors, the one or more processors implement the power grid flow planning method provided in the first aspect of the present invention.
[0023] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the power grid flow planning method provided in the first aspect of the present invention.
[0024] In a fifth aspect, an embodiment of the present invention further provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the power grid flow planning method provided in the first aspect of the present invention is implemented.
[0025] In the embodiment of the present invention, a space-time graph of a space-time graph neural network is constructed according to the topological structure of the power grid, real-time operation data and historical operation data are collected according to the space-time graph, the space-time graph neural network is trained according to the historical operation data, a flow path planning model is obtained, the real-time operation data is input into the flow path planning model for processing, an initial flow path planning scheme of the power grid is obtained, the initial flow path planning scheme is optimized, a target flow path planning scheme of the power grid is obtained, and the flow distribution and voltage state in the power grid are adjusted according to the target flow path planning scheme. The space-time graph neural network is constructed by the topological structure of the power grid, and the spatial and temporal dynamic relationship of the power grid is converted into a graph structure, which improves the adaptability of the dynamic changes in the operation of the power grid and the spatiotemporal coupling effect in the power grid, and also provides accurate basic data for the power grid flow planning. Real-time operation data and historical data are collected, and the flow path planning model can learn the changing law of the power grid state from the historical data, and the real-time data is input into the flow path planning model to generate the initial flow path planning scheme. The optimization method is used to adjust the initial flow path planning scheme to obtain the target flow path planning scheme, which can effectively reduce the potential error of the scheme and consider the nonlinear and time-varying factors in the operation of the power grid. The power flow distribution and voltage state of the power grid are adjusted according to the optimized plan to ensure the stable operation and optimal performance of the power grid. While dealing with the complex dynamic relationships of the power grid, the accuracy of power flow path planning is improved to ensure the stable operation of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A flowchart of a power grid flow planning method provided in Embodiment 1 of the present invention;
[0027] Figure 2 A structural block diagram of a power grid flow planning device provided in Embodiment 2 of the present invention;
[0028] Figure 3 A schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme 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 only 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 should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can cover sequential implementations other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] Embodiment 1
[0032] See also Figure 1 , shows a flow chart of a power flow planning method provided by the first embodiment of the present invention, the method can be executed by a power flow planning device, the power flow planning device can be implemented in the form of hardware and / or software, and the power flow planning device can be configured in a computer device. Figure 1 As shown, the method includes:
[0033] Step 101: construct a space-time graph of a space-time graph neural network according to the topological structure of the power grid.
[0034] The topology of a power grid refers to the connection pattern or layout between the various components in the grid, including how substations, power stations, load points, transmission lines, etc. are connected to each other through cables, switches and other electrical equipment. The topology describes how the various nodes and edges in the grid (i.e. the various types of electrical equipment in the grid and their connections) interact with each other.
[0035] Spatiotemporal graph neural network (ST-GNN) is a method that combines graph neural network (GNN) and time series analysis, aiming to simultaneously capture the spatial structure information of graph data and the dynamic characteristics of time series data. In the application of power grid, graph neural network can effectively process the topological information of the power grid (i.e., the connection relationship between nodes and the characteristics of edges), while the temporal convolution layer can capture the evolution of the power grid state over time. Spatiotemporal graph neural network is suitable for processing complex power grids with dual spatial and temporal dependencies.
[0036] The space-time graph is an extension of the traditional graph concept. In addition to the spatial information of the nodes and edges of the graph, it also considers the time dimension. The state of each node depends not only on the state of other nodes (spatial relationship), but also on the time series. The space-time graph not only focuses on the connection relationship between nodes (such as the connection between substations in the power grid), but also considers how these connection relationships change over time.
[0037] In this embodiment, the topological structure of the power grid reflects the connection relationship between each substation, load point and transmission line in the power grid. The core purpose of constructing the space-time graph is to convert this structured connection relationship into a form that can be processed by the space-time graph neural network, so as to use the graph structure to capture the electrical interaction between nodes (such as substations and load points).
[0038] In one embodiment of the present invention, step 101 may include the following steps:
[0039] Step 1011: Take the substations and load points in the power grid as nodes, and assign the first eigenvectors to the nodes.
[0040] In this embodiment, substations and load points in the power grid are taken as nodes, and the physical properties of these nodes (voltage amplitude, voltage phase angle, active input power, reactive input power, active output power and reactive output power) are taken as the first eigenvectors to fully describe the state of the nodes. These first eigenvectors not only reflect the electrical state of the nodes, but also change over time. Using time series data to model the behavior of these nodes can better capture the dynamic characteristics of the power grid.
[0041] Exemplarily, the first eigenvector is expressed as:
[0042]
[0043] Where, X i (t) is the first eigenvector, V i (t) is the voltage amplitude of the node at time t, θ i (t) is the voltage phase angle of the node, is the active input power of the node, is the reactive input power of the node, is the active output power of the node, is the reactive output power of the node.
[0044] Step 1012: Calculate a first dynamic weight of the node based on at least part of the first eigenvector.
[0045] In this embodiment, the calculation of the first dynamic weight is to reflect the impact of node changes on the power grid flow and the importance and operating status of the node in the space-time diagram. In power grid flow planning, the electrical parameters of the node (such as active power, reactive power, voltage, etc.) will change over time, and the first dynamic weight can help the power flow path planning model dynamically adjust the importance of the node according to these changes. By using the voltage amplitude and power information in the time series data, a weight value can be assigned to each node in the space-time diagram of the power grid, representing the impact of the node on the power grid flow at a specific moment.
[0046] Exemplarily, the first dynamic weight is expressed as:
[0047]
[0048] In the formula, w i (t) is the first dynamic weight, γ i For node n i The weight coefficient takes into account the topological position and historical operation data of the node in the power grid. For node n i The active input power, For node n i Active output power, V i (t) is node n i The voltage amplitude at time t, It represents the ratio of the power imbalance to the voltage of the node, reflecting the load fluctuation of the node.
[0049] Step 1013: Take the transmission lines between the nodes as edges and assign the second eigenvectors to the edges.
[0050] In this embodiment, the transmission lines in the power grid are used as the edges connecting the nodes, and the second eigenvectors of the edges include resistance, reactance, susceptance, and power flow. These second eigenvectors change with time, and the state and characteristics of each transmission line change dynamically in the space-time graph. By using these time-dependent parameters as the second eigenvectors of the edges, the operating state of the transmission lines in different time periods and their impact on the power grid flow can be accurately described. These parameters help simulate how electricity flows through different transmission lines in the power grid, and how different transmission lines cooperate and influence each other.
[0051] Exemplarily, the second eigenvector is expressed as:
[0052] A ij (t) = [R ij ,X ij ,B ij ,S ij (t)];
[0053] S ij (t) = P ij (t)+Q ij (t);
[0054] In the formula, A ij (t) is the second eigenvector, R ij For transmission line ij The resistance, X ij is the reactance of the transmission line, B ij is the susceptance of the transmission line, S ij(t) is the power flow of the transmission line at time t, P ij (t) is the active power, Q ij (t) is the reactive power.
[0055] Step 1014: Calculate a second dynamic weight of the edge based on at least part of the second eigenvector.
[0056] In this embodiment, similar to the first dynamic weight of the node, the second dynamic weight of the edge reflects the transmission capacity and actual performance of the transmission line at different time points. The load capacity, transmission capacity and electrical characteristics (such as resistance and reactance) of the transmission lines in the power grid will change over time. By calculating the second dynamic weight of each transmission line, the time-varying load and power transmission capacity of each transmission line can be taken into account when calculating the power grid flow. The second dynamic weights of these edges enable the power flow path planning model to respond more flexibly and in real time to changes in the power grid, such as those caused by load fluctuations, transmission line losses or other changes in the operating conditions of the power grid. The second dynamic weight highlights transmission lines with high transmission loads and low transmission efficiency, so that the spatiotemporal graph neural network pays more attention to transmission lines that may become bottlenecks, and optimizes the power flow path planning to avoid line overload and excessive losses.
[0057] Exemplarily, the second dynamic weight is expressed as:
[0058]
[0059] In the formula, w ij (t) is the second dynamic weight, δ ij For transmission line ij The weight coefficient is set based on the importance of the line and the historical failure rate. ij (t)| is the modulus of the power flow of the transmission line at time t, is the rated maximum power transmission capacity of the transmission line, R ij For transmission line ij The resistance, X ij is the reactance of the transmission line, It represents the admittance modulus of the transmission line, reflecting the transmission efficiency of the transmission line.
[0060] Step 1015: construct a spatiotemporal graph based on the nodes, the first eigenvectors, the first dynamic weights, the edges, the second eigenvectors and the second dynamic weights.
[0061] In this embodiment, the space-time graph is a graph structure that connects the nodes and edges of the power grid according to the relationship between time and space. By adding the feature vectors of nodes and edges and the dynamic weights of nodes and edges to the space-time graph, the space-time graph can effectively represent the time-varying characteristics and structure of the power grid. The space-time graph can not only reflect the topological structure of the power grid, but also dynamically adapt to the operation of the power grid in different time periods.
[0062] Exemplarily, the space-time diagram is represented as:
[0063] G(t)=(V,E,X i (t),A ij (t),W(t));
[0064] In the formula, G(t) is the space-time graph, V is the set of nodes, E is the set of transmission lines, and X i (t) is the first eigenvector, A ij (t) is the second eigenvector, and W(t) is the set between the first dynamic weight and the second dynamic weight.
[0065] Step 102: Collect real-time operation data and historical operation data based on the space-time diagram.
[0066] In this embodiment, the real-time operation data can reflect the actual operation status of the power grid at the current moment, while the historical operation data helps the power flow path planning model learn and summarize the laws and trends of the power grid flow to ensure the accuracy and reliability of the prediction. By collecting and analyzing both real-time operation data and historical operation data, the spatiotemporal graph neural network can fully grasp the dynamic characteristics of the power grid, so that the power flow path planning model can better adapt to real-time and future changes when predicting the power flow path, improve the adaptability and stability of the power grid, and help power grid managers make real-time adjustments and optimization decisions based on actual and predicted data.
[0067] Exemplarily, real-time operation data and historical operation data are collected for nodes (such as substations and load points) and edges (such as transmission lines) in the space-time graph in order to more accurately reflect each component of the power grid and their interrelationships. Both real-time operation data and historical operation data contain node data and variable data. Node data include voltage, current, active power and reactive power of substations. These node data reflect the power status of substations and load points; edge data include power flow of transmission lines, which characterizes the transmission of power between different nodes. The collection of these real-time operation data and historical operation data can help understand the power characteristics of each node and transmission line and its dynamic characteristics over time. The power output power of new energy power stations is collected in real time and integrated into the real-time operation data set. The power output power of new energy power stations affects the power balance and power flow distribution of the power grid. Converting these real-time and historical data into a format that is compatible with the space-time graph neural network is to ensure that the data can be correctly input into the neural network for training and prediction. The spatiotemporal graph neural network processes graph data, converting all relevant node and edge information into a data format suitable for the graph structure, allowing the spatiotemporal graph neural network to efficiently perform graph convolution operations, thereby correctly learning spatial relationships and time dependencies, improving the training effect and prediction ability of the power flow path planning model, and enabling it to plan and optimize the power grid power flow path in real time and accurately in practical applications.
[0068] The power output of a renewable energy power station can be defined as in:
[0069] Represents node n i The power output power of the renewable energy power station at time t is used to capture the volatility of renewable energy power generation in real time and reflect the degree of renewable energy access of nodes at different times.
[0070] The format of real-time running data adapted to the spatiotemporal graph neural network can be expressed as:
[0071]
[0072] A(t)={S ij (t)|e ij ∈E};
[0073] In the formula, X(t) represents the data set of the node, Node data representing real-time operation data, including voltage, current, active power and reactive power of the substation, n i represents a node, N represents a set of nodes, A(t) represents a data set of edges, S ij (t) represents the edge data of real-time operation data, which includes the power flow of the transmission line, eij Represents a transmission line, and E represents a set of transmission lines. The format of historical data adapted to the spatiotemporal graph neural network is consistent with the format of real-time operation data adapted to the spatiotemporal graph neural network.
[0074] Step 103: Train the spatiotemporal graph neural network based on historical operation data to obtain a flow path planning model.
[0075] In this embodiment, a power flow path planning model is established that can dynamically adjust and optimize the power flow path of the power grid. This process combines historical operation data with deep learning technology, and uses the structure of the spatiotemporal graph neural network to accurately predict the power flow distribution and voltage state of the power grid under different conditions, thereby providing an optimized scheduling solution for the power grid. The spatiotemporal graph neural network includes a graph convolution layer, a temporal convolution layer, and a fully connected layer.
[0076] The graph convolution layer is used to capture the power transmission relationship between nodes in the power grid topology, and establish a structured graph representation of the power grid through the feature information of the nodes and the feature information of the edges.
[0077] The temporal convolution layer is used to extract the dynamic change characteristics of nodes and transmission lines, capture the dynamic characteristics of the power grid over time, and analyze the timing characteristics of nodes and edges.
[0078] The full connection is used to integrate and map the analysis results of the graph convolution layer with the tomography results of the temporal convolution layer.
[0079] In one embodiment of the present invention, step 103 may include the following steps:
[0080] Step 1031: Add a flow path planning tag to the historical operation data.
[0081] In this embodiment, before training the spatiotemporal graph neural network, flow path planning labels are added to the historical operating data. A correct output (i.e., the initial flow path planning scheme) is specified for each historical data point. These labels are usually determined based on the ideal operating state of the power grid under certain operating conditions (such as power flow, load balance, etc.). By adding labels, the spatiotemporal graph neural network can calculate the error by comparing the predicted results with the actual results, and update the weights through back propagation to ensure that the flow path planning model gradually learns how to accurately predict the flow path of the power grid.
[0082] Step 1032: Input the historical operation data into the graph convolution layer, and calculate the node features of the nodes in the spatiotemporal graph according to the node feature formula.
[0083] In this embodiment, the historical operation data will be input into the graph convolution layer of the spatiotemporal graph neural network for processing. The graph convolution layer is used to extract feature information from nodes (such as substations and load points) in the spatiotemporal graph. The node feature formula calculates the feature vector of the node based on the specific electrical quantities of each node in the power grid, such as voltage amplitude, current, active and reactive power, etc. These feature vectors reflect the state of the power grid and capture the role of each node in the power grid and its relationship with other nodes. The role of the graph convolution layer is to propagate and aggregate the information of the nodes through the adjacency relationship of the spatiotemporal graph structure, so that the characteristics of each node can effectively reflect its dynamic interaction in the entire power grid.
[0084] Exemplarily, the node feature formula is expressed as:
[0085]
[0086] In the formula, is the node n in the l+1th layer of the graph convolutional layer i , σ is the node feature, α is the activation function, used to introduce nonlinearity, ij For node n i and node n j The attention weight between them reflects the information transmission strength between the two nodes, W (l) is the trainable weight matrix of the lth layer, j is the domain node, and N(i) is the node n i The neighborhood set of is the node n in the lth layer of the graph convolution layer j Node features.
[0087] Step 1033: In the time convolution layer, extract node time series features from the node features according to the time feature formula.
[0088] In this embodiment, in the time convolution layer, the historical data of each node at multiple time points are integrated through the time convolution kernel weight matrix to extract the node time series features. The time feature formula performs convolution operations on the node features of the nodes at different time points, so that the spatiotemporal graph neural network can capture possible changing trends in the time series, such as fluctuations in the power grid load and time lags in the system response. This helps the power flow path planning model understand the operating laws of the power grid under different time states and improves the prediction accuracy.
[0089] Exemplarily, the time characteristic formula is expressed as:
[0090]
[0091] In the formula, Z i is the node timing characteristic, V t is the temporal convolution kernel weight matrix, which is used to learn the changing trend of node features at different times.i (t) is node n i The node feature at time t, ∈ is the bias term, which is used for offset adjustment of the power flow path planning model.
[0092] Step 1034: Map the node features and the node time series features in the fully connected layer to obtain a mapping result.
[0093] In this embodiment, multi-dimensional information such as node features and node timing features are fused in the fully connected layer through linear transformation and nonlinear activation function to generate a comprehensive feature representation (i.e., mapping result). The fully connected layer integrates features at different levels through a weight matrix, so that the output of each node can comprehensively consider its current state and historical dynamics to form a comprehensive understanding of the power grid state. Ultimately, this mapping result will be used to predict the power flow path planning scheme. This mapping process ensures that the spatiotemporal graph neural network can learn the most appropriate power grid power flow state prediction model.
[0094] Step 1035: Calculate the total loss value based on the mapping result and the power flow path planning label.
[0095] In this embodiment, the total loss value is calculated by comparing the prediction results (i.e., the current path planning scheme) output by the current path planning model and the actual current path planning label. The loss value is a measure of the performance of the current path planning model, which represents the error between the prediction results of the current path planning model and the true label. The total loss value is calculated in a weighted manner, so that the spatiotemporal graph neural network can pay more attention to different nodes and important parts of the spatiotemporal relationship. The size of the total loss value provides an optimization direction for the spatiotemporal graph neural network. Through the back propagation of the total loss value, the spatiotemporal graph neural network can adjust the weights and gradually optimize its prediction accuracy.
[0096] Step 1036: Update the spatiotemporal graph neural network according to the total loss value to obtain a flow path planning model.
[0097] In this embodiment, the parameters (weights and biases) of the spatiotemporal graph neural network are updated through the back propagation algorithm according to the calculated total loss value. The purpose is to minimize the total loss value so that the power flow path planning model can better fit the actual power flow path of the power grid when processing new data. Through multiple iterations and training, the spatiotemporal graph neural network continuously adjusts its internal parameters and gradually improves the accuracy of power flow path planning, so that it can provide efficient and accurate solutions for power grid dispatching in practical applications.
[0098] Exemplarily, the total loss value is expressed as:
[0099]
[0100] In the formula, is the node n in the lth layer of the graph convolution layer i The node characteristics, W (l) is the trainable weight matrix of the lth layer, j is the domain node, and N(i) is the node n i The neighborhood set of is the node n in the lth layer of the graph convolution layer j The node characteristics, Z i is the node time series feature, L is the total loss value, y i For node n i The power flow load label, f(Z i ) is node n i The sample power flow load is , N is the total number of nodes, p and q are the norms of loss calculation, β is the neighborhood smoothing parameter, K is the total number of trainable weight matrices, is the node n in layer l j The trainable weight matrix, is the node n in layer l i The trainable weight matrix is λ, where λ is the regularization parameter. is a neighborhood smoothing term, which is used to constrain the smoothness of the features between adjacent nodes to ensure the continuity of the power transmission relationship. is a regularization term used to prevent the model from overfitting.
[0101] Step 104: input the real-time operation data into the power flow path planning model for processing to obtain an initial power flow path planning solution for the power grid.
[0102] In this embodiment, real-time operation data is input into a trained power flow path planning model for processing, and the power grid is modeled using a spatiotemporal graph neural network to accurately calculate the voltage and power flow load distribution of the power grid, thereby obtaining an initial power flow path planning scheme for the power grid.
[0103] In one embodiment of the present invention, step 104 may include the following steps:
[0104] Step 1041: Input the real-time operation data into the graph convolution layer to calculate the optimal voltage value of the node in the space-time graph.
[0105] In this embodiment, the real-time operation data is input into the graph convolution layer, and the role of the graph convolution layer is to extract the characteristics of each node (substation and load point) in the power grid through the graph structure of the spatiotemporal graph neural network. These characteristics include voltage amplitude, current, active and reactive power, etc., which reflect the operating status of each node. Through the graph convolution operation, the characteristics of the node are converted into the optimal voltage value, which is a calculation result that describes the most appropriate voltage state of the node at a specific point in time. Based on the current power grid topology and operation data, the optimal voltage value of each node at time t is predicted to ensure the stability and reliability of voltage control.
[0106] Exemplarily, the optimal voltage value is expressed as:
[0107]
[0108] In the formula, For node n i The optimal voltage value at time t, f θ is the output function of the power flow path planning model, V j (t) is node n i The voltage value of the neighboring node, α ij is the weight, reflecting the power transmission relationship between nodes, j is the domain node, N(i) is the node n i The neighborhood set of Run the data for the target.
[0109] Step 1042: In the time convolution layer, the optimal power flow load of the transmission line between the nodes is calculated according to the optimal voltage value.
[0110] In this embodiment, after obtaining the optimal voltage value of the node, the optimal power flow load of the transmission line is calculated based on these optimal voltage values. This process is completed through the time convolution layer, which combines the node timing characteristics (i.e., the changing trend of the voltage value) with the physical characteristics of the transmission line (such as resistance, reactance, admittance, etc.) to calculate the optimal power flow load between the connected nodes, that is, the power flow direction and intensity of the transmission line at each moment, to ensure that the power transmission of the power grid is within the range of safety and efficiency. The calculation of the optimal power flow load not only takes into account the voltage level, but also the electrical characteristics of each transmission line in the power grid to ensure that the power transmission of the power grid does not exceed its carrying capacity.
[0111] Exemplarily, the optimal power flow load is expressed as:
[0112]
[0113] In the formula, is the optimal power flow load of the transmission line at time t, For node n i The optimal voltage value is For node n j The optimal voltage value, G ij is the real part of the admittance of the transmission line, B ij is the imaginary part of the admittance of the transmission line, R ij is the resistance of the transmission line, X ij is the reactance of the transmission line;
[0114] Step 1043: Map the optimal voltage value and the optimal power flow load in the fully connected layer to obtain an initial power flow path planning solution.
[0115] In this embodiment, the optimal voltage value and the optimal power flow load are input into the fully connected layer, which is mainly used to integrate the feature information from different layers and make the final decision or prediction. Through the mapping process, the optimal voltage value of the node and the optimal power flow load of the transmission line are combined to obtain the initial power flow path planning scheme of the power grid. This initial power flow path planning scheme will reflect the voltage distribution and power flow direction of the power grid, providing a basis for subsequent optimization.
[0116] Exemplarily, the initial power flow path planning scheme is expressed as:
[0117]
[0118] In the formula, Ω * (t) represents the initial power flow path planning scheme at time t, represents the set of optimal voltage values of all nodes, represents the set of optimal power flow loads of all transmission lines, i represents a node, N represents the set of nodes, e ij represents a transmission line, and E represents a set of transmission lines.
[0119] Step 105: Optimize the initial power flow path planning scheme to obtain a target power flow path planning scheme for the power grid.
[0120] In this embodiment, the initial power flow path planning scheme may not meet the actual operation requirements of the power grid, especially for the imbalance of load distribution. Optimizing the initial power flow path planning scheme is a step to ensure stable, economical and safe operation of the power grid. The goal is to optimize the initial power flow path planning scheme to ensure a more balanced power distribution in the power grid, avoid overloading of certain transmission lines or nodes in the power grid, and maximize the overall efficiency to obtain the target power flow path planning scheme.
[0121] In one embodiment of the present invention, step 105 may include the following steps:
[0122] Step 1051: Calculate the load rate of the power transmission lines of the power grid according to the initial power flow path planning scheme.
[0123] In this embodiment, the load rate refers to the ratio between the power actually transmitted by the transmission line and its maximum carrying capacity. Calculating the load rate is the basis for optimizing the power flow path, and the load rate directly affects the operating efficiency and safety of the power grid. By calculating the load rate of each transmission line in the initial power flow path planning scheme, it is possible to assess whether the power grid is at risk of overload. If the load rate of some lines is too high, it means that these lines may face overload, or even equipment failure or shutdown. Therefore, the calculation of the load rate is a prerequisite for judging the health status of the power grid, and can provide specific data support for subsequent optimization steps.
[0124] Exemplarily, the load factor is expressed as:
[0125]
[0126] In the formula, ρ ij (t) is the transmission line e ij The load rate at time t, For transmission line ij The norm of the optimal power flow load at time t is, For transmission line ij Rated power transfer capacity.
[0127] Step 1052: Calculate the fairness index of the load factor.
[0128] In this embodiment, a fairness index (such as Jain's fairness index) measures the balance of load distribution in the power grid. By calculating the fairness index of the load rate, the distribution of the loads of each transmission line in the power grid can be understood. If the load rate of some transmission lines is much higher than that of other lines, it means that the load distribution is uneven, which may cause some lines to be overloaded, thereby affecting the reliability and stability of the power grid. The calculation of the fairness index helps identify the parts of the power grid with uneven load distribution and provides an adjustment direction for subsequent optimization. The fairness index is usually directly related to the fairness of load distribution and is an important indicator to measure whether the power grid operation has reached the optimal balance state.
[0129] Exemplarily, the fairness index is expressed as:
[0130]
[0131] Where J(t) is the fairness index, ρ ij (t) is the transmission line e ij The load factor at time t, N is the total number of transmission lines, and E is the set of transmission lines.
[0132] Step 1053: If the fairness index is greater than or equal to the preset load threshold, the initial power flow path planning scheme is determined as the target power flow path planning scheme.
[0133] In this embodiment, when the calculated fairness index is greater than or equal to the preset load threshold (i.e., the fairness index is greater than or equal to 1), it indicates that the load distribution of the power grid is sufficiently balanced, and the load of the transmission line is not excessively concentrated on certain lines. Therefore, the initial power flow path planning scheme can be directly used as the target power flow path planning scheme. At this point, the power grid has met the load balancing requirements, and further optimization operations may not bring significant benefits, so there is no need for additional complex optimization.
[0134] Step 1054: If the fairness index is less than the preset load threshold, an optimization operation is performed on the initial power flow path planning scheme to optimize the initial power flow path planning scheme into a target power flow path planning scheme.
[0135] In this embodiment, if the fairness index is lower than the preset load threshold, it means that the load distribution of the power grid is unbalanced, some lines may be overloaded, and there is a risk of power grid instability or excessive loss. At this time, the initial power flow path planning scheme needs to be optimized. The purpose of the optimization operation is to adjust the power distribution of the power grid so that the load of each transmission line is more uniform, thereby improving the efficiency of the power grid, reducing the risk of overload, and preventing transmission line failure or power loss.
[0136] For example, the objective function is constructed with the goal of optimizing the total power consumption of the power grid and the fairness index. Optimizing the total power consumption of the power grid can effectively reduce energy consumption, reduce the operating cost of the power grid, and improve the economy and environmental friendliness of the power grid. The optimization of the fairness index focuses on improving the balance of the power grid load, avoiding overload of individual transmission lines or nodes, and ensuring that each part of the power grid does not produce excessive load fluctuations or voltage instability during operation, thereby improving the reliability and safety of the power grid; by solving the minimum value of the objective function and optimizing the initial flow path planning scheme to the target flow path planning scheme, the dynamic needs of the power grid at different times and under different operating conditions can be met, thereby providing more scientific guidance for the intelligent scheduling, load forecasting and resource allocation of the power grid.
[0137] Among them, the objective function is expressed as:
[0138] U(t)=α1·P total (t)-β1·J(t);
[0139]
[0140] Where U(t) is the objective function, α1 and β1 are weight coefficients, and P total (t) is the total power consumption of the power grid, R ij is the resistance of the transmission line, is the modulus of the optimal power flow load of the transmission line at time t, J(t) is the fairness index, ρ ij (t) is the load rate, eij is the transmission line, and E is the set of transmission lines.
[0141] Solving the minimum value of the objective function is expressed as:
[0142]
[0143] Where Ω′(t) represents the target power flow path planning scheme at time t. The target path planning scheme is found by minimizing the objective function U(t) and balancing power consumption and load balancing.
[0144] Step 106: Adjust the power flow distribution and voltage state in the power grid according to the target power flow path planning scheme.
[0145] In this embodiment, the target power flow path planning scheme is used to adjust the power flow distribution and voltage state, so that the load of each transmission line and substation in the power grid can be effectively distributed, avoiding overload or voltage instability and reducing the risk of system failure. This process can balance the load of each part of the power grid and ensure the efficient transmission and use of electricity.
[0146] When a transmission line failure or equipment abnormality occurs in the power grid, the emergency power flow path planning process is immediately started. The online computing capability of the power flow path planning model is used to quickly generate an emergency power flow path planning plan based on the current power grid status. The Jain's fairness index method is used to evaluate the load balancing of the emergency plan to avoid line overload or system instability caused by fault propagation.
[0147] In the embodiment of the present invention, a space-time graph of a space-time graph neural network is constructed according to the topological structure of the power grid, real-time operation data and historical operation data are collected according to the space-time graph, the space-time graph neural network is trained according to the historical operation data, a flow path planning model is obtained, the real-time operation data is input into the flow path planning model for processing, an initial flow path planning scheme of the power grid is obtained, the initial flow path planning scheme is optimized, a target flow path planning scheme of the power grid is obtained, and the flow distribution and voltage state in the power grid are adjusted according to the target flow path planning scheme. The space-time graph neural network is constructed by the topological structure of the power grid, and the spatial and temporal dynamic relationship of the power grid is converted into a graph structure, which improves the adaptability of the dynamic changes in the operation of the power grid and the space-time coupling effect in the power grid, and also provides accurate basic data for the power grid flow planning. Real-time operation data and historical data are collected, and the flow path planning model can learn the changing law of the power grid state from the historical data, and the real-time data is input into the flow path planning model to generate the initial flow path planning scheme. The optimization method is used to adjust the initial flow path planning scheme to obtain the target flow path planning scheme, which can effectively reduce the potential error of the scheme and consider the nonlinear and time-varying factors in the operation of the power grid. The power flow distribution and voltage state of the power grid are adjusted according to the optimized plan to ensure the stable operation and optimal performance of the power grid. While dealing with the complex dynamic relationships of the power grid, the accuracy of power flow path planning is improved to ensure the stable operation of the power grid.
[0148] Embodiment 2
[0149] Figure 2 A schematic diagram of the structure of a power grid flow planning device provided in the second embodiment of the present invention is shown in FIG. Figure 2 As shown, the device comprises:
[0150] A space-time graph construction module 201 is used to construct a space-time graph of a space-time graph neural network according to the topological structure of the power grid;
[0151] An operation data collection module 202, used to collect real-time operation data and historical operation data according to the spatiotemporal graph;
[0152] A neural network training module 203 is used to train the spatiotemporal graph neural network according to the historical operation data to obtain a power flow path planning model;
[0153] An initial scheme acquisition module 204 is used to input the real-time operation data into the power flow path planning model for processing to obtain an initial power flow path planning scheme for the power grid;
[0154] An initial scheme optimization module 205 is used to optimize the initial power flow path planning scheme to obtain a target power flow path planning scheme for the power grid;
[0155] The power grid regulation module 206 is used to regulate the power flow distribution and voltage state in the power grid according to the target power flow path planning scheme.
[0156] In one embodiment of the present invention, the spatiotemporal graph construction module 201 includes:
[0157] A node screening module, used for taking substations and load points in the power grid as nodes, and assigning a first characteristic vector to the nodes; the first characteristic vector includes voltage amplitude, voltage phase angle, active input power, reactive input power, active output power and reactive output power;
[0158] A first weight calculation module, configured to calculate a first dynamic weight of the node based on at least part of the first feature vector;
[0159] An edge screening module, used for taking the transmission line between the nodes as an edge and assigning a second eigenvector to the edge; the second eigenvector includes resistance, reactance, susceptance, and power flow;
[0160] A second weight calculation module, configured to calculate a second dynamic weight of the edge according to at least part of the second eigenvector;
[0161] a space-time graph acquisition module, configured to construct a space-time graph according to the node, the first feature vector, the first dynamic weight, the edge, the second feature vector and the second dynamic weight;
[0162] Wherein, the first feature vector is expressed as:
[0163]
[0164] Where, X i (t) is the first eigenvector, V i (t) is the voltage amplitude of the node at time t, θ i (t) is the voltage phase angle of the node, is the active input power of the node, is the reactive input power of the node, is the active output power of the node, is the reactive output power of the node;
[0165] The first dynamic weight is expressed as:
[0166]
[0167] In the formula, w i (t) is the first dynamic weight, γ i For the node n i The weight coefficient of For the node n i The active input power, For the node n i The active output power, V i (t) is the node n i the voltage amplitude at time t;
[0168] The second eigenvector is expressed as:
[0169] A ij (t) = [R ij ,X ij ,B ij ,S ij (t)];
[0170] S ij (t) = P ij (t)+Q ij (t);
[0171] In the formula, A ij (t) is the second eigenvector, R ij For the transmission line e ij The resistance, X ij is the reactance of the transmission line, B ij is the susceptance of the transmission line, S ij (t) is the power flow of the transmission line at time t, P ij (t) is the active power, Q ij (t) is reactive power;
[0172] The second dynamic weight is expressed as:
[0173]
[0174] In the formula, w ij (t) is the second dynamic weight, δ ij For the transmission line e ij The weight coefficient, |S ij (t)| is the modulus of the power flow of the transmission line at time t, is the rated maximum power transmission capacity of the transmission line, R ij For the transmission line e ij The resistance, X ij is the reactance of the transmission line;
[0175] The space-time diagram is represented as:
[0176] G(t)=(V,E,X i (t),Aij (t),W(t));
[0177] Where G(t) is the space-time graph, V is the set of nodes, E is the set of transmission lines, and X i (t) is the first eigenvector, A ij (t) is the second eigenvector, and W(t) is the set between the first dynamic weight and the second dynamic weight.
[0178] In one embodiment of the present invention, the operation data acquisition module 202 includes:
[0179] A data collection module, used to collect real-time operation data and historical operation data for the nodes and edges in the space-time graph, respectively; the real-time operation data and the historical operation data both include the voltage, current, active power and reactive power of the substation, and the power flow of the transmission line;
[0180] A power station collection module, used for collecting the power output of the new energy power station and writing the power output into the real-time operation data;
[0181] A format conversion module is used to convert the real-time operation data and the historical operation data into a format compatible with the spatiotemporal graph neural network.
[0182] In one embodiment of the present invention, the spatiotemporal graph neural network includes a graph convolution layer, a temporal convolution layer and a fully connected layer; the neural network training module 203 includes:
[0183] A label adding module, used for adding a flow path planning label to the historical operation data;
[0184] A node feature calculation module, used to input the historical operation data into the graph convolution layer, and calculate the node features of the nodes in the spatiotemporal graph according to the node feature formula;
[0185] A node time series feature extraction module, used for extracting node time series features from the node features according to the time feature formula in the time convolution layer;
[0186] A mapping result acquisition module, used for mapping the node features and the node time series features in a fully connected layer to obtain a mapping result;
[0187] A total loss value calculation module, used to calculate the total loss value according to the mapping result and the flow path planning label;
[0188] A model training module, used to update the spatiotemporal graph neural network according to the total loss value to obtain a power flow path planning model;
[0189] Wherein, the node characteristic formula is expressed as:
[0190]
[0191] In the formula, is the node n of the l+1th layer of the graph convolution layer i Node features, σ is the activation function, α ij For the node n i and the node n j The attention weight between (l) is the trainable weight matrix of the lth layer, j is the domain node, N(i) is the node n i The neighborhood set of is the node n of the lth layer of the graph convolution layer j The node characteristics of
[0192] The time characteristic formula is expressed as:
[0193]
[0194] In the formula, Z i is the node timing characteristic, V t is the temporal convolution kernel weight matrix, H i (t) is the node n i The node feature at time t, ∈ is the bias term;
[0195] The total loss value is expressed as:
[0196]
[0197] In the formula, is the node n of the lth layer of the graph convolution layer i The node characteristics, W (l) is the trainable weight matrix of the lth layer, j is the domain node, N(i) is the node n i The neighborhood set of is the node n of the lth layer of the graph convolution layer j The node characteristics, Z i is the node timing feature, L is the total loss value, y i For the node n i The power flow load label, f(Z i ) is the node n i The sample power flow load, N is the total number of nodes, p and q are the norms of loss calculation, β is the neighborhood smoothing parameter, K is the total number of trainable weight matrices, is the node n of the lth layer j The trainable weight matrix, is the node n of the lth layer i The trainable weight matrix is , and λ is the regularization parameter.
[0198] In one embodiment of the present invention, the initial solution acquisition module 204 includes:
[0199] A voltage value calculation module, used for inputting the real-time operation data into the graph convolution layer to calculate the optimal voltage value of the node in the space-time graph;
[0200] A power flow load calculation module, used to calculate the optimal power flow load of the transmission line between the nodes according to the optimal voltage value in the time convolution layer;
[0201] An initial scheme mapping module, used for mapping the optimal voltage value and the optimal power flow load in the fully connected layer to obtain an initial power flow path planning scheme;
[0202] Wherein, the optimal voltage value is expressed as:
[0203]
[0204] In the formula, For the node n i The optimal voltage value at time t, f θ is the output function of the power flow path planning model, V j (t) is the node n i The voltage value of the neighboring node, α ij is the weight, j is the domain node, N(i) is the node n i The neighborhood set of running data for said objectives;
[0205] The optimal power flow load is expressed as:
[0206]
[0207] In the formula, is the optimal power flow load of the transmission line at time t, For the node n i The optimal voltage value, For the node n j The optimal voltage value, G ij is the real part of the admittance of the transmission line, B ij is the imaginary part of the admittance of the transmission line, R ij is the resistance of the transmission line, X ij is the reactance of the transmission line;
[0208] The initial power flow path planning scheme is expressed as:
[0209]
[0210] In the formula, Ω * (t) represents the initial power flow path planning scheme at time t, represents the set of the optimal voltage values of all the nodes, represents the set of the optimal power flow loads of all the transmission lines, i represents the node, N represents the set of the nodes, e ij represents the transmission line, and E represents the set of the transmission lines.
[0211] In one embodiment of the present invention, the initial solution optimization 205 includes:
[0212] A load rate calculation module, used to calculate the load rate of the transmission line of the power grid according to the initial power flow path planning scheme;
[0213] A fairness index calculation module, used to calculate the fairness index of the load rate;
[0214] A target solution determination module, configured to determine the initial power flow path planning solution as a target power flow path planning solution if the fairness index is greater than or equal to a preset load threshold;
[0215] A target solution acquisition module is used to perform an optimization operation on the initial power flow path planning solution to optimize the initial power flow path planning solution to a target power flow path planning solution if the fairness index is less than a preset load threshold;
[0216] Wherein, the load rate is expressed as:
[0217]
[0218] In the formula, ρ ij (t) is the transmission line e ij The load rate at time t, For the transmission line e ij The modulus of the optimal power flow load at time t is, For the transmission line e ij Rated power transmission capacity;
[0219] The fairness index is expressed as:
[0220]
[0221] Where J(t) is the fairness index, ρ ij (t) is the transmission line e ijThe load rate at time t, N is the total number of the transmission lines, and E is the set of the transmission lines.
[0222] In one embodiment of the present invention, the target solution acquisition module includes:
[0223] An objective function building module, used to build an objective function with the goal of optimizing the total power consumption of the power grid and the fairness index;
[0224] An objective function calculation module, used for optimizing the initial power flow path planning scheme into a target power flow path planning scheme by solving the minimum value of the objective function;
[0225] Wherein, the objective function is expressed as:
[0226] U(t)=α1·P total (t)-β1·J(t);
[0227]
[0228] Where U(t) is the objective function, α1 and β1 are weight coefficients, P total (t) is the total power consumption of the power grid, R ij is the resistance of the transmission line, is the modulus of the optimal power flow load of the transmission line at time t, J(t) is the fairness index, ρ ij (t) is the load rate, e ij is a transmission line, and E is a set of the transmission lines.
[0229] The power grid flow planning device provided in the embodiment of the present invention can execute the power grid flow planning method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the power grid flow planning method.
[0230] Embodiment 3
[0231] See also Figure 3 , showing a schematic diagram of the structure of a computer device provided by an embodiment of the present invention. The computer device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, blade servers, mainframe computers, and other suitable computers. The computer device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0232] like Figure 3As shown, the computer device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the computer device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0233] A number of components in the computer device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the computer device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0234] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the power grid flow planning method.
[0235] In some embodiments, the power grid flow planning method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the computer device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the power grid flow planning method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the power grid flow planning method in any other appropriate manner (e.g., by means of firmware).
[0236] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0237] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0238] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0239] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0240] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0241] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0242] Embodiment 4
[0243] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the power grid flow planning method provided by any embodiment of the present invention is implemented.
[0244] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0245] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0246] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A power grid flow planning method, characterized in that: include: Construct a space-time graph of the space-time graph neural network based on the topological structure of the power grid; Collecting real-time operation data and historical operation data according to the space-time diagram; Training the spatiotemporal graph neural network according to the historical operation data to obtain a power flow path planning model; Inputting the real-time operation data into the power flow path planning model for processing to obtain an initial power flow path planning scheme for the power grid; Optimizing the initial power flow path planning scheme to obtain a target power flow path planning scheme for the power grid; The power flow distribution and voltage state in the power grid are adjusted according to the target power flow path planning scheme.
2. The method according to claim 1, characterized in that: The construction of a spatiotemporal graph of a spatiotemporal graph neural network based on the topological structure of the power grid includes: The substations and load points in the power grid are taken as nodes, and a first eigenvector is assigned to the nodes; the first eigenvector includes voltage amplitude, voltage phase angle, active input power, reactive input power, active output power and reactive output power; Calculating a first dynamic weight of the node based on at least part of the first feature vector; The transmission line between the nodes is used as an edge, and a second eigenvector is assigned to the edge; the second eigenvector includes resistance, reactance, susceptance, and power flow; Calculating a second dynamic weight of the edge based on at least part of the second eigenvector; constructing a spatiotemporal graph according to the node, the first feature vector, the first dynamic weight, the edge, the second feature vector and the second dynamic weight; Wherein, the first feature vector is expressed as: Where, X i (t) is the first eigenvector, V i (t) is the voltage amplitude of the node at time t, θ i (t) is the voltage phase angle of the node, is the active input power of the node, is the reactive input power of the node, is the active output power of the node, is the reactive output power of the node; The first dynamic weight is expressed as: In the formula, w i (t) is the first dynamic weight, γ i For the node n i The weight coefficient of For the node n i The active input power, For the node n i The active output power, V i (t) is the node n i the voltage amplitude at time t; The second eigenvector is expressed as: A ij (t)=[R ij ,X ij ,B ij ,S ij (t)]; S ij (t)=P ij (t)+Q ij (t); In the formula, A ij (t) is the second eigenvector, R ij For the transmission line e ij The resistance, X ij is the reactance of the transmission line, B ij is the susceptance of the transmission line, S ij (t) is the power flow of the transmission line at time t, P ij (t) is the active power, Q ij (t) is reactive power; The second dynamic weight is expressed as: In the formula, w ij (t) is the second dynamic weight, δ ij For the transmission line e ij The weight coefficient, |S ij (t)| is the modulus of the power flow of the transmission line at time t, is the rated maximum power transmission capacity of the transmission line, R ij For the transmission line e ij The resistance, X ij is the reactance of the transmission line; The space-time diagram is represented as: G(t)=(V,E,X i (t),A ij (t),W(t)); Where G(t) is the space-time graph, V is the set of nodes, E is the set of transmission lines, and X i (t) is the first eigenvector, A ij (t) is the second eigenvector, and W(t) is the set between the first dynamic weight and the second dynamic weight.
3. The method according to claim 2, characterized in that The collecting of real-time operation data and historical operation data according to the space-time graph includes: Real-time operation data and historical operation data are collected for the nodes and edges in the space-time graph respectively; the real-time operation data and the historical operation data both include the voltage, current, active power and reactive power of the substation, and the power flow of the transmission line; Collecting the power output of the new energy power station, and writing the power output into the real-time operation data; The real-time operation data and the historical operation data are converted into a format compatible with the spatiotemporal graph neural network.
4. The method according to claim 1, characterized in that: The spatiotemporal graph neural network includes a graph convolution layer, a temporal convolution layer and a fully connected layer; the spatiotemporal graph neural network is trained according to the historical operation data to obtain a flow path planning model, including: Adding a power flow path planning tag to the historical operation data; Input the historical operation data into the graph convolution layer, and calculate the node features of the nodes in the spatiotemporal graph according to the node feature formula; In the time convolution layer, the node time series features are extracted from the node features according to the time feature formula; The node features and the node time series features are mapped in a fully connected layer to obtain a mapping result; Calculating a total loss value based on the mapping result and the flow path planning label; The spatiotemporal graph neural network is updated according to the total loss value to obtain a power flow path planning model; The node characteristic formula is expressed as: In the formula, is the node n of the l+1th layer of the graph convolution layer i Node features, σ is the activation function, α ij For the node n i and the node n j The attention weight between (l) is the trainable weight matrix of the lth layer, j is the domain node, N(i) is the node n i The neighborhood set of is the node n of the lth layer of the graph convolution layer j The node characteristics of The time characteristic formula is expressed as: In the formula, Z i is the node timing characteristic, V t is the temporal convolution kernel weight matrix, H i (t) is the node n i The node feature at time t, ∈ is the bias term; The total loss value is expressed as: In the formula, is the node n of the lth layer of the graph convolution layer i The node characteristics, W (l) is the trainable weight matrix of the lth layer, j is the domain node, N(i) is the node n i The neighborhood set of is the node n of the lth layer of the graph convolution layer j The node characteristics, Z i is the node timing feature, L is the total loss value, y i For the node n i The power flow load label, f(Z i ) is the node n i The sample power flow load is , N is the total number of nodes, p and q are the norms of loss calculation, β is the neighborhood smoothing parameter, K is the total number of trainable weight matrices, is the node n of the lth layer j The trainable weight matrix, is the node n of the lth layer i The trainable weight matrix is , and λ is the regularization parameter.
5. The method according to claim 4, characterized in that The step of inputting the real-time operation data into the power flow path planning model for processing to obtain an initial power flow path planning scheme for the power grid includes: Inputting the real-time operation data into the graph convolution layer to calculate the optimal voltage value of the node in the spatiotemporal graph; In the time convolution layer, the optimal power flow load of the power transmission line between the nodes is calculated according to the optimal voltage value; Mapping the optimal voltage value and the optimal power flow load in the fully connected layer to obtain an initial power flow path planning scheme; Wherein, the optimal voltage value is expressed as: In the formula, For the node n i The optimal voltage value at time t, f θ is the output function of the power flow path planning model, V j (t) is the node n i The voltage value of the neighboring node, α ij is the weight, j is the domain node, N(i) is the node n i The neighborhood set of running data for said objectives; The optimal power flow load is expressed as: In the formula, is the optimal power flow load of the transmission line at time t, For the node n i The optimal voltage value, For the node n j The optimal voltage value, G ij is the real part of the admittance of the transmission line, B ij is the imaginary part of the admittance of the transmission line, R ij is the resistance of the transmission line, X ij is the reactance of the transmission line; The initial power flow path planning scheme is expressed as: In the formula, Ω * (t) represents the initial power flow path planning scheme at time t, represents the set of the optimal voltage values of all the nodes, represents the set of the optimal power flow loads of all the transmission lines, i represents the node, N represents the set of the nodes, e ij represents the transmission line, and E represents the set of the transmission lines.
6. The method according to any one of claims 1 to 5, characterized in that: The step of optimizing the initial power flow path planning scheme to obtain a target power flow path planning scheme for the power grid includes: Calculating the load rate of the transmission line of the power grid according to the initial power flow path planning scheme; calculating a fairness index of the load ratio; If the fairness index is greater than or equal to a preset load threshold, determining the initial power flow path planning scheme as the target power flow path planning scheme; If the fairness index is less than a preset load threshold, performing an optimization operation on the initial power flow path planning scheme to optimize the initial power flow path planning scheme into a target power flow path planning scheme; Wherein, the load rate is expressed as: In the formula, ρ ij (t) is the transmission line e ij The load rate at time t, For the transmission line e ij The modulus of the optimal power flow load at time t is, For the transmission line e ij Rated power transmission capacity; The fairness index is expressed as: Where J(t) is the fairness index, ρ ij (t) is the transmission line e ij The load rate at time t, N is the total number of the transmission lines, and E is the set of the transmission lines.
7. The method according to claim 6, characterized in that If the fairness index is less than a preset load threshold, performing an optimization operation on the initial power flow path planning scheme to optimize the initial power flow path planning scheme to a target power flow path planning scheme, including: An objective function is constructed with the goal of optimizing the total power consumption of the power grid and the fairness index; By solving the minimum value of the objective function, the initial power flow path planning scheme is optimized to a target power flow path planning scheme; Wherein, the objective function is expressed as: U(t)=α1·P total (t)-β1·J(t); Where U(t) is the objective function, α1 and β1 are weight coefficients, P total (t) is the total power consumption of the power grid, R ij is the resistance of the transmission line, is the modulus of the optimal power flow load of the transmission line at time t, J(t) is the fairness index, ρ ij (t) is the load rate, e ij is a transmission line, and E is a set of the transmission lines.
8. A computer device, characterized in that: The computer device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the power grid flow planning method as described in any one of claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the power grid flow planning method as described in any one of claims 1 to 7 is implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the power grid flow planning method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Power transmission network planning method and system based on line power flow distribution
CN110707706A
Regional power generation prediction method and system based on dynamic random graph neural network
CN116151473A
Active power distribution network fault section positioning method based on space-time diagram neural network
CN119104834A
Method for Optimizing Power Flows in Electric Power Networks
US20140244059A1
Cited By
Power grid business planning method and device based on artificial intelligence, and storage medium
CN122089517A
An artificial intelligence-based power grid service planning method and device, and a storage medium
CN122089517B