Pure direct current network bidirectional transaction routing method and system based on graph theory
By constructing a graph theory model in the power system trading network and using the Dijkstra algorithm, the problem of pure DC network carrying capacity in multi-pair transactions is solved, security verification and optimal path search are realized, meeting real-time transaction requirements and reducing power transmission costs cost.
Patent Information
- Application Number
- CN202410668675.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-09-17
AI Technical Summary
Existing technology cannot effectively handle the carrying capacity and optimal path search of a pure DC network for multiple pairs of transactions, resulting in underutilization of network resources and security supply risks.
Use a method based on graph theory to construct a power system transaction network diagram, use the Dijkstra algorithm to solve the shortest path in the optimization model, consider transmission prices and losses, establish a loss weight matrix and a cost weight matrix, and perform physical checks on multiple pairs of transactions. , verify whether the system can carry multiple transactions at the same time.
It realizes security verification and optimal path search for multiple pairs of transactions, maximizes the utilization of line resources, meets the two-way transaction needs of the real-time spot market, and reduces power transmission costs.
Smart Images

Figure CN118657268A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system transaction network routing, and in particular to a pure direct current network bidirectional transaction routing method and system based on graph theory. Background Art
[0002] For regions with strong complementarity between economic structure and energy distribution, electricity demand and power generation capacity, seasonal characteristics of electricity load and natural characteristics of primary energy supply, the power grid is required to have the ability to optimize configuration over a larger range to adapt to the reverse distribution characteristics of energy resources. Wind, solar and other new energy power generation has unstable characteristics such as volatility, intermittency, and reverse peak regulation. In addition, the uneven electricity load and peak-to-valley deviations exceed the safety threshold limit, which poses certain safety supply risks.
[0003] A key to inter-regional trading is to search and optimize the trading path. At present, the research on the power market is mainly based on graph theory methods and optimization algorithms related to the field of artificial intelligence. For example, the article "Research on ATC Calculation Method Considering Inter-provincial Spot Trading Path" uses genetic algorithm to optimize the trading path by ATC calculation. The optimal path search algorithms based on graph theory mainly include Floyd method, Dijkstra method, A-star algorithm, Edmond-Karp algorithm, unified cost search method, etc. Floyd-related methods are currently widely used in robot path finding, urban power grid planning, etc. "Research on Flow Transfer Path Search Based on Floyd Algorithm with Weighted Network" solves the flow transfer path after the system fails based on Floyd algorithm, and plans and solves the network graph with weights. The article "Research on Power Grid Partitioning Method Based on Dijkstra Algorithm" proposes a power grid partitioning method based on Dijkstra algorithm. This method uses network impedance as weight, uses Dijkstra to find the station closest to the initial point and then completes the partition. Its concept can be applied to power trading optimization. The "Transmission Pricing Strategy for New Energy Cross-Regional Trading Paths Based on Graph Theory Network Flow Algorithm" uses the Edmond-Karp algorithm to search for augmented paths between sources and sinks, and effectively and quickly evaluates the maximum transmission amount of the trading path. The existing graph-based path-finding methods mentioned above can meet the optimal path search for two-way trading pairs in pure DC networks, but they are only applicable to path-finding for single trading pairs. When faced with multiple pairs of transactions in the same network at the same time, the network constraints and the optimization of multiple pairs of transactions need to be considered, and the above methods cannot meet the path-finding requirements.
[0004] The existing technology only uses several methods based on graph theory to find paths for bidirectional transactions in pure DC networks, but the algorithms in graph theory are all algorithms for finding paths for single-pair transactions and cannot consider the network's carrying capacity when multiple pairs of transactions are carried out simultaneously. Carrying out multiple pairs of transactions one by one according to graph theory methods may make it impossible to fully utilize the network's carrying capacity, leaving a large margin. Summary of the invention
[0005] The purpose of the present invention is to provide a pure DC network bidirectional transaction routing method and system based on graph theory to solve at least one technical problem existing in the above-mentioned background technology.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides a pure DC network bidirectional transaction path finding method based on graph theory, comprising:
[0008] Constructing a power system trading network diagram; the power system trading network diagram is composed of a number of nodes and edges between nodes, the nodes represent various trading units of the power system, the bidirectional trading DC system includes bus nodes of various trading areas, and the edges represent the mutual relationship and effect between elements, and the bidirectional trading DC system represents various DC transmission channels;
[0009] After adding the transaction, an optimization model is constructed based on the transaction network graph, with the maximum flow limit of each branch as a constraint. If the optimization model has a solution, it means that the safety check has passed. After that, the path search using the graph theory algorithm for a single pair of transactions will be charged separately.
[0010] Based on the optimization model, the transmission price or loss on each line is used as the weight of each line on the transmission line map, which constitutes a single-source shortest path search problem. The Dijkstra algorithm is used to solve the optimization model and obtain the optimal path.
[0011] Furthermore, since the power system network line flow can be transmitted in both directions, the network diagram is set as an undirected graph; since it is necessary to consider transmission losses and transmission costs, the network is set as a weighted graph, and the loss weight matrix and cost weight matrix are established respectively; when the transaction power between lines exceeds ATC, the line will be deleted from the transaction network diagram and the transaction network diagram will be updated.
[0012] Furthermore, when the Dijkstra algorithm solves the optimal path, it first needs to generate a graph and then find the path based on the generated graph; the adjacency matrix is a matrix that represents the adjacent relationship between vertices. The non-zero entries in the adjacency matrix represent the edges between two nodes, and the entry values represent the weights of the edges. The diagonal elements of the adjacency matrix are usually zero, but non-zero diagonal elements represent self-loops or nodes connected to themselves by edges.
[0013] Furthermore, the Dijkstra algorithm includes:
[0014] When calculating the shortest path in graph G through Dijkstra, you need to specify a source point s;
[0015] Introduce two arrays S and VS; S is used to record the vertices whose shortest paths have been found, while VS is used to record the vertices whose shortest paths have not yet been found;
[0016] Initially, the array S contains only the source point s; the array VS contains the vertices other than the source point s, and the array VS records the distance from each vertex to the source point s; if the vertex is not adjacent to the source point s, the distance is infinite;
[0017] Find the vertex k with the shortest path from the array VS and add it to the array S; at the same time, remove the vertex k from the array VS; then, update the distance from each vertex in the array VS to the source point s;
[0018] Until all vertices are traversed.
[0019] Furthermore, when multiple transactions occur simultaneously, it is necessary to physically check the power flow of each line in the pure DC network to verify whether the system can carry out multiple transactions simultaneously and meet the lowest transmission cost. The physical check of multiple transactions at the same time adopts the method of constructing a linear optimization model.
[0020] Furthermore, the optimal path refers to the path with the smallest cumulative weight among all paths from node i to node j in the weighted transaction network graph G, which is called the optimal path between nodes i and j.
[0021] In a second aspect, the present invention provides a pure DC network bidirectional transaction routing system based on graph theory, comprising:
[0022] The first construction module is used to construct a power system transaction network diagram; the power system transaction network diagram is composed of a number of nodes and edges between nodes, the nodes represent various transaction units of the power system, the bidirectional transaction DC system includes bus nodes of various transaction areas, and the edges represent the mutual relationship and effect between elements, and the bidirectional transaction DC system represents various DC transmission channels;
[0023] The second construction module is used to build an optimization model based on the transaction network graph after adding the transaction, with the maximum flow limit of each branch as a constraint. If the optimization model has a solution, it means that the safety check has passed. After that, the path search using the graph theory algorithm for a single pair of transactions will be charged separately;
[0024] The solution module is used to construct a single-source shortest path search problem based on the optimization model, using the transmission price or loss on each line as the weight of each line on the transmission line map, and using the Dijkstra algorithm to solve the optimization model to obtain the optimal path.
[0025] In a third aspect, the present invention provides a non-transitory computer-readable storage medium, which is used to store computer instructions. When the computer instructions are executed by a processor, the graph-theory-based pure DC network bidirectional transaction routing method as described in the first aspect is implemented.
[0026] In a fourth aspect, the present invention provides a computer device comprising a memory and a processor, wherein the processor and the memory communicate with each other, the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the graph theory-based pure DC network bidirectional transaction routing method as described in the first aspect.
[0027] In a fifth aspect, the present invention provides an electronic device, comprising: a processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the pure DC network bidirectional transaction routing method based on graph theory as described in the first aspect.
[0028] The beneficial effects of the present invention are as follows: multiple pairs of transactions in a pure DC network are simultaneously safety checked and it is given how to allocate the currents of each branch to obtain the lowest transmission cost, and the path of each pair of transactions is clearly marked, which can meet the needs of two-way transactions in the real-time spot market.
[0029] Additional advantages of the present invention will be more clearly given in the following description or learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0031] Figure 1 This is a schematic diagram of a transaction network according to an embodiment of the present invention.
[0032] Figure 2 This is a schematic diagram of a graph generated when solving the optimal path according to an embodiment of the present invention.
[0033] Figure 3This is a flow chart of a pure DC network bidirectional transaction routing method based on graph theory described in an embodiment of the present invention.
[0034] Figure 4 A decision variable flow chart is generated for a pure DC network according to an embodiment of the present invention.
[0035] Figure 5 A node constraint flow chart for constructing a pure DC network according to an embodiment of the present invention.
[0036] Figure 6 This is a flowchart of the path finding for one-to-one transactions according to an embodiment of the present invention.
[0037] Figure 7 The present invention is an overall flowchart of the security verification of multiple pairs of transactions according to an embodiment of the present invention.
[0038] Figure 8 This is a topological diagram of a 26-node example described in an embodiment of the present invention.
[0039] Fig. 9 This is the optimal path tracking graph for transaction pair 1 described in the embodiment of the present invention.
[0040] Fig.10 This is the optimal path tracking graph for transaction pair 2 described in the embodiment of the present invention.
[0041] Fig.11 This is the optimal path tracking graph for transaction pair 3 described in the embodiment of the present invention.
[0042] Fig.12 This is a schematic diagram of the flow of each branch at the original operating point of the system according to an embodiment of the present invention.
[0043] Fig.13 This is a schematic diagram of the flow of each branch after a transaction according to an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below by the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0045] It should be understood by those skilled in the art that unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this invention belongs.
[0046] It should also be understood that terms, such as those defined in commonly used dictionaries, should be understood to have a meaning consistent with that in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless as defined herein.
[0047] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements and / or groups thereof.
[0048] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0049] To facilitate understanding of the present invention, the present invention is further explained below with reference to specific embodiments in conjunction with the accompanying drawings, and the specific embodiments do not constitute a limitation on the embodiments of the present invention.
[0050] Those skilled in the art should understand that the drawings are merely schematic diagrams of embodiments, and the components in the drawings are not necessarily necessary for implementing the present invention.
[0051] While ensuring the consumption of new energy sources such as wind and light, the interests of different power sources are coordinated. In the context of large-scale grid connection of new energy sources, traditional power sales nodes may also be transformed into power purchase nodes, and power purchase nodes may also become power sales nodes. On this basis, the present invention studies the technology of tracking the flow path of the current generated by each pair of transactions when a pure DC network conducts two-way transactions at the original operating point, which can be more reasonable under the premise of ensuring the safety and stability of the system. The present invention takes into account that it is impossible to find paths for multiple pairs of transactions at the same time using only a single graph theory method and the controllability of the DC network current has a large decision-making space. The present invention adds an optimization method to create an optimization model for the DC network while using graph theory to find paths. The power balance of the node is added to the constraints of the optimization model. The current during the transaction can be allocated and the transaction can be safely checked. If the optimization model has a solution, it means that there is an optimal solution. The Dijkstra method algorithm in graph theory is then used to find paths for transactions.
[0052] Example 1
[0053] In this embodiment 1, a pure DC network bidirectional transaction path-finding system based on graph theory is first provided, including: a first construction module, used to construct a power system transaction network diagram; the power system transaction network diagram is composed of a number of nodes and edges between nodes, the nodes represent various transaction units of the power system, the bidirectional transaction DC system includes bus nodes of various transaction areas, and the edges represent the mutual relationship and interaction between elements, and the bidirectional transaction DC system represents various DC transmission channels; a second construction module, used to construct an optimization model based on the transaction network diagram after adding transactions, with the maximum flow limit of each branch as a constraint, and the solution of the optimization model represents that the safety check has passed, and then the path search is performed for a single pair of transactions using a graph theory algorithm and a separate charge; a solution module, used to use the transmission price or loss on each line as the weight of each line on the transmission line diagram based on the optimization model, constitute a single-source shortest path search problem, and use the Dijkstra algorithm to solve the optimization model to obtain the optimal path.
[0054] In this embodiment, a pure DC network bidirectional transaction path finding method based on graph theory is practiced based on the above-mentioned system, including: constructing a power system transaction network diagram; the power system transaction network diagram is composed of a number of nodes and edges between nodes, the nodes represent various transaction units of the power system, the bidirectional transaction DC system includes bus nodes of various transaction areas, and the edges represent the mutual relationship and interaction between elements, and the bidirectional transaction DC system represents various DC transmission channels; based on the transaction network diagram, an optimization model is constructed after adding transactions, with the maximum flow limit of each branch as a constraint, and a solution to the optimization model means that the safety check has passed, and then a single pair of transactions is charged separately for path search using a graph theory algorithm; based on the optimization model, the transmission price or loss on each line is used as the weight of each line on the transmission line diagram, constituting a single-source shortest path search problem, and the Dijkstra algorithm is used to solve the optimization path.
[0055] Since the power system network line flow can be transmitted in both directions, the network diagram is set as an undirected graph; since it is necessary to consider transmission losses and transmission costs, the network is set as a weighted graph, and the loss weight matrix and cost weight matrix are established respectively; when the transaction power between lines exceeds ATC, the line will be deleted from the transaction network diagram and the transaction network diagram will be updated.
[0056] When the Dijkstra algorithm solves the optimal path, it first needs to generate a graph and then find the path based on the generated graph; the adjacency matrix is a matrix that represents the adjacent relationship between vertices. The non-zero entries in the adjacency matrix represent the edges between two nodes, and the entry values represent the weights of the edges. The diagonal elements of the adjacency matrix are usually zero, but non-zero diagonal elements represent self-loops or nodes connected to themselves by edges.
[0057] Dijkstra's algorithm includes:
[0058] When calculating the shortest path in graph G through Dijkstra, you need to specify a source point s;
[0059] Introduce two arrays S and VS; S is used to record the vertices whose shortest paths have been found, while VS is used to record the vertices whose shortest paths have not yet been found;
[0060] Initially, the array S contains only the source point s; the array VS contains the vertices other than the source point s, and the array VS records the distance from each vertex to the source point s; if the vertex is not adjacent to the source point s, the distance is infinite;
[0061] Find the vertex k with the shortest path from the array VS and add it to the array S; at the same time, remove the vertex k from the array VS; then, update the distance from each vertex in the array VS to the source point s;
[0062] Until all vertices are traversed.
[0063] When multiple transactions occur at the same time, it is necessary to physically check the power flow of each line in the pure DC network to verify whether the system can carry out multiple transactions at the same time and meet the lowest transmission cost. The physical check of multiple transactions at the same time adopts the method of building a linear optimization model.
[0064] The optimal path refers to the path with the smallest cumulative weight among all paths from node i to node j in the weighted transaction network graph G. It is called the optimal path between nodes i and j.
[0065] In this embodiment, the Dijkstra method based on graph theory can search for the optimal path for the transaction pairs, and at the same time, the method of establishing an optimization model can be used to perform security verification when multiple pairs of transactions are carried out simultaneously, thereby realizing the optimal path search and network security verification for multiple pairs of transactions in two-way transactions, and at the same time, it can also maximize the use of line resources. This is different from the previous transaction scheduling that relied on experience-based transactions, which resulted in a large safety margin for the line and could not fully utilize the line's transmission capacity.
[0066] Example 2
[0067] like Figures 1 to 13As shown, in this embodiment 2, a pure DC network bidirectional transaction path finding method based on graph theory and optimization method is provided, including the following calculation framework design scheme:
[0068] The currents of each branch in a pure DC network can be controlled manually. In this way, various optimal path finding methods based on graph theory can be considered to be added to the optimal path finding method for two-way transactions in a pure DC network. It is only necessary to follow the path found. However, a single path finding method has a defect, that is, it is impossible to add multiple pairs of transactions at the same time and it is impossible to verify whether the network can withstand multiple pairs of transactions at the same time. On this basis, this embodiment adds an optimization method, adds multiple pairs of transactions that are carried out simultaneously to the optimization constraints to verify the solution of this optimization model. If the optimization model has a solution, it means that the system can withstand multiple pairs of transactions added at the same time.
[0069] The overall path-finding method is divided into two parts. The first part is to build an optimization model. The specific steps are to set the lowest transmission cost as the objective function, and to build equation constraints for each node according to Kirchhoff's law. If there are nodes participating in the transaction, the power balance of the nodes will be converted to a new balance, and if there are no nodes participating in the transaction, the original node power balance equation will be maintained. If the model is verified, it means that the safety check has passed. Next, the Dijkstra algorithm in graph theory will be used to find the optimal path for each pair of transactions. First, a weighted graph that can be stored by a computer should be constructed according to the topological diagram of the network. This embodiment uses the adjacency matrix method to construct a weighted graph. After the graph is constructed, the power selling nodes and power purchasing nodes of each pair of transactions are given in a loop, and the Dijkstra algorithm is used in turn to obtain the optimal transaction path.
[0070] The path finding method is as follows:
[0071] When the trading network is a pure DC network, the pure DC network exists in most cases when a cross-regional trading channel model is constructed. There are cross-regional DC channels between regions, so it is necessary to study the problem of two-way trading in a pure DC network. The power flow in a pure DC network is different from the power flow in a pure AC network. The distribution of power flow in a pure AC network cannot be artificially controlled and is distributed spontaneously according to physical laws. In a pure DC network, we can use technical means to artificially control the distribution of power flow in the network, so there is a lot of room for adjustment and optimization of transactions in a pure DC network. On this basis, the present invention takes into account that the power flow of each line in a pure DC network can be used as a decision quantity, so that when finding the optimal power flow path, an optimization model can be constructed for safety verification and the Dijkstra algorithm can be used for path finding.
[0072] The power system is a typical complex network, which consists of several nodes and edges between nodes. In the power market environment, nodes represent the various trading units of the power system, and the bidirectional trading DC system contains busbar nodes in various provinces, while edges represent the mutual connection and interaction between elements, and the bidirectional trading DC system represents various DC transmission channels. Assigning corresponding weights to each edge of the complex network to describe the strength of the connection between nodes can more completely express the structure of the complex network.
[0073] Since the power system network line flow can be transmitted in both directions, the network diagram is set as an undirected graph. Since the transmission loss and transmission cost need to be considered, the network is set as a weighted graph, and the loss weight matrix and cost weight matrix are established respectively. When the transaction power between lines exceeds ATC, the line is deleted from the graph and the network diagram is updated, such as Figure 1 shown.
[0074] The optimal path refers to the path with the smallest cumulative weight among all paths from node i to node j in the weighted network graph G. It is called the shortest path / optimal path between nodes i and j.
[0075] Unlike AC lines, DC lines can have power flows that can be controlled manually. Once both parties to the transaction have confirmed the transaction, there will be multiple transmission paths, and the optimal DC transmission path can be selected for transmission based on the transmission cost or loss on each transmission line.
[0076] When performing a safety check, all transactions are added to the original operating point at the same time. In order to prevent the system from having safety limit violations, an optimization model can be constructed for the entire network after the transactions are added, with the maximum flow limit of each branch as a constraint. If the optimization model has a solution, it means that the safety check has passed. After that, a graph theory algorithm is used to perform path search for a single pair of transactions, which is charged separately.
[0077] The transmission price or loss on each line can be used as the weight of each line on the transmission line map, thus forming a single-source shortest path search problem. The Dijkstra algorithm can be used to solve the optimal path. The Dijkstra algorithm is a shortest path algorithm from one vertex to the remaining vertices, and solves the shortest path problem in a weighted graph. The main feature of the Dijkstra algorithm is that it starts from the starting point and uses a greedy algorithm strategy to traverse the adjacent nodes of the vertex that is closest to the starting point and has not been visited each time until it expands to the end point. It mainly solves the single-source shortest path search problem.
[0078] When the Dijkstra algorithm is used to solve the optimal path, it is necessary to first generate a graph and then find the path based on the generated graph. The graph can be stored in the following ways: adjacency matrix, adjacency list, cross linked list, adjacency multi-list, etc. The adjacency matrix is a matrix that represents the adjacency relationship between vertices. The non-zero entries in the adjacency matrix represent the edge between two nodes, and the entry value represents the weight of the edge. The diagonal elements of the adjacency matrix are usually zero, but the non-zero diagonal elements represent self-loops or nodes connected to themselves through edges. The adjacency matrix of a network graph is defined as:
[0079] In the formula, the element e[i][j] at position [i][j] is expressed as:
[0080]
[0081] For example Figure 2 The generated graph shown, the adjacency matrix of this graph is:
[0082]
[0083] The optimal path refers to the path with the smallest cumulative weight among all paths from node i to node j in the weighted network graph G. It is called the shortest path / optimal path between nodes i and j.
[0084] Dijkstra algorithm, also known as Dijkstra algorithm, is a shortest path algorithm from one vertex to the rest of the vertices. It solves the shortest path problem in a weighted graph. The main feature of Dijkstra algorithm is that it starts from the starting point and adopts the strategy of greedy algorithm. Each time, it traverses to the adjacent nodes of the vertex that is closest to the starting point and has not been visited, until it expands to the end point. It mainly solves the single-source shortest path search problem. Its basic ideas are as follows:
[0085] 1) When calculating the shortest path in graph G using Dijkstra, you need to specify a source point s (i.e., start the calculation from vertex s).
[0086] 2) In addition, two arrays S and VS are introduced. S is used to record the vertices whose shortest paths have been found (and the corresponding shortest path lengths), while VS is used to record the vertices whose shortest paths have not yet been found (and the distance from the vertex to the starting point D).
[0087] 3) Initially, the array S contains only the source point s; the array VS contains the vertices other than the source point s, and the array VS records the distance from each vertex to the source point s. If the vertex is not adjacent to the source point s, the distance is infinite.
[0088] 4) Then, find the vertex k with the shortest path from the array VS and add it to the array S; at the same time, remove the vertex k from the array VS. Then, update the distance from each vertex in the array VS to the source point s.
[0089] 5) Repeat step 4 until all vertices are traversed.
[0090] Security verification of multiple transactions
[0091] When multiple transactions occur at the same time, it is necessary to physically check the power flow of each line in the pure DC network to verify whether the system can carry out multiple transactions at the same time and meet the lowest transmission cost. The physical check of multiple transactions at the same time adopts the method of building a linear optimization model.
[0092] Objective Function
[0093]
[0094] In formula (4-20), P ij DC is the power flow on the DC line ij, is the optimization quantity; P ij ori is the original operating point power flow on DC line ij is the collection of DC lines in the system; is the unit transmission power price from node i to node j in the DC line ij.
[0095] Constraint Function
[0096] Inequality constraints:
[0097] -RATE DC ij ≤p DC ij ≤RATE DC ij (4-21)
[0098] In formula (4-21), is the available transmission capacity of the DC line ij in the system.
[0099] Equality constraints:
[0100]
[0101] In formula (4-22) K is the DC line i J on trend; For DC line JK i On the trend; K i For the electricity purchase and sales node, K i The power of electricity purchased or sold at the node. If it is purchased, it is negative, if it is sold, it is positive. If it is not a node for purchasing or selling electricity, it is zero. is the original operating power of the node.
[0102] Example 3
[0103] The power system is a typical complex network, which consists of several nodes and edges between nodes. In the power market environment, nodes represent the various trading units of the power system, and the bidirectional trading DC system contains busbar nodes in various provinces, while edges represent the mutual connection and interaction between elements, and the bidirectional trading DC system represents various DC transmission channels. Assigning corresponding weights to each edge of the complex network to describe the strength of the connection between nodes can more completely express the structure of the complex network.
[0104] Since the power system network line flow can be transmitted bidirectionally, the network diagram is set as an undirected graph. Since the transmission loss and transmission cost need to be considered, the network is set as a weighted graph, and the loss weight matrix and cost weight matrix are established respectively. When the transaction power between lines exceeds ATC, the line is deleted from the graph and the network diagram is updated.
[0105] The optimal path refers to the path with the smallest cumulative weight among all paths from node i to node j in the weighted network graph G. It is called the shortest path / optimal path between nodes i and j.
[0106] Unlike AC lines, DC lines can have power flows that can be controlled manually. Once both parties to the transaction have confirmed the transaction, there will be multiple transmission paths, and the optimal DC transmission path can be selected for transmission based on the transmission cost or loss on each transmission line.
[0107] When performing safety checks, all transactions are added to the original operating point at the same time. Since the DC power flow can be controlled, in order to prevent the system from having safety limit violations, an optimization model can be constructed for the entire network after the transactions are added, with the maximum power flow limit of each branch as a constraint. If the optimization model has a solution, it means that the safety check has passed. Graph theory algorithms can be used for path search for single pairs of transactions and a separate charge will be made.
[0108] The transmission price or loss on each line can be used as the weight of each line on the transmission line map, thus forming a single-source shortest path search problem. The Dijkstra algorithm can be used to solve the optimal path. The Dijkstra algorithm is a shortest path algorithm from one vertex to the remaining vertices, which solves the shortest path problem in a weighted graph. The main feature of the Dijkstra algorithm is that it starts from the starting point and adopts a greedy algorithm strategy, traversing the adjacent nodes of the vertex closest to the starting point and not visited each time until it expands to the end point. It mainly solves the single-source shortest path search problem.
[0109] When the Dijkstra algorithm is used to solve the optimal path, it is necessary to first generate a graph and then find the path based on the generated graph. The graph can be stored in the following ways: adjacency matrix, adjacency list, cross linked list, adjacency multi-list, etc. The adjacency matrix is a matrix that represents the adjacency relationship between vertices. The non-zero entries in the adjacency matrix represent the edge between two nodes, and the entry value represents the weight of the edge. The diagonal elements of the adjacency matrix are usually zero, but the non-zero diagonal elements represent self-loops or nodes connected to themselves through edges. The adjacency matrix of a network graph is defined as:
[0110] In the formula, the element e[i][j] at position [i][j] is expressed as:
[0111]
[0112] For example Figure 2 The generated graph shown, the adjacency matrix of this graph is:
[0113]
[0114] The optimal path refers to the path with the smallest cumulative weight among all paths from node i to node j in the weighted network graph G. It is called the shortest path / optimal path between nodes i and j.
[0115] Dijkstra algorithm, also known as Dijkstra algorithm, is a shortest path algorithm from one vertex to the rest of the vertices. It solves the shortest path problem in a weighted graph. The main feature of Dijkstra algorithm is that it starts from the starting point and adopts the strategy of greedy algorithm. Each time, it traverses to the adjacent nodes of the vertex that is closest to the starting point and has not been visited, until it expands to the end point. It mainly solves the single-source shortest path search problem. Its basic ideas are as follows:
[0116] 1) When calculating the shortest path in graph G using Dijkstra, you need to specify a source point s (i.e., start the calculation from vertex s).
[0117] 2) In addition, two arrays S and VS are introduced. S is used to record the vertices whose shortest paths have been found (and the corresponding shortest path lengths), while VS is used to record the vertices whose shortest paths have not yet been found (and the distance from the vertex to the starting point D).
[0118] 3) Initially, the array S contains only the source point s; the array VS contains the vertices other than the source point s, and the array VS records the distance from each vertex to the source point s. If the vertex is not adjacent to the source point s, the distance is infinite.
[0119] 4) Then, find the vertex k with the shortest path from the array VS and add it to the array S; at the same time, remove the vertex k from the array VS. Then, update the distance from each vertex in the array VS to the source point s.
[0120] 5) Repeat step 4 until all vertices are traversed.
[0121] Security verification of multiple transactions
[0122] When multiple transactions occur at the same time, it is necessary to physically check the power flow of each line in the pure DC network to verify whether the system can carry out multiple transactions at the same time and meet the lowest transmission cost. The physical check of multiple transactions at the same time adopts the method of building a linear optimization model.
[0123] Objective Function
[0124]
[0125] In formula (4-20), P ij DC is the power flow on the DC line ij, is the optimization quantity; P ij ori is the original operating point power flow on DC line ij is the collection of DC lines in the system; is the unit transmission power price from node i to node j in the DC line ij.
[0126] Constraint Function
[0127] Inequality constraints:
[0128] -RATE DC ij ≤P DC ij ≤RATE DC ij (4-21)
[0129] In formula (4-21), is the available transmission capacity of the DC line ij in the system.
[0130] Equality constraints:
[0131]
[0132] In formula (4-22) K is the DC line i J on trend; For DC line JK i On the trend; K i For the electricity purchase and sales node, K i The power of electricity purchased or sold at the node. If it is purchased, it is negative, if it is sold, it is positive. If it is not a node for purchasing or selling electricity, it is zero. is the original operating power of the node.
[0133] In this embodiment, the above-mentioned path finding method is applied to a self-built example of all 26 nodes, in order to verify the effectiveness of the calculation method.
[0134] As shown in Table 1 and Table 2, the transaction was analyzed by constructing a 26-node example. There were three pairs of test transactions, namely, from area 1 to area 2, selling 100MW of electricity; from area 3 to area 4, selling 150MW of electricity; from area 5 to area 6, selling 200MW of electricity. This test transaction pair was carried out under the original running node of the system. Under this condition, the DC network constructed by this example can simultaneously perform these three pairs of transactions. The path finding results and example data are all displayed in the form of attached figures. In this embodiment, the path search time for the 26-node example search time under the 12th Gen Intel(R)Core(TM)i7-12800HX operating system is within 200ms, which can meet the requirements of real-time path finding for two-way transactions.
[0135] Table 1
[0136]
[0137] Table 2
[0138]
[0139]
[0140] In summary, the sensitivity factor-based two-way transaction routing algorithm provided in this embodiment can adjust transactions and quickly find a path for each pair of transactions under the premise of ensuring system security in a pure AC system.
[0141] Example 5
[0142] This embodiment 5 provides a non-transitory computer-readable storage medium, which is used to store computer instructions. When the computer instructions are executed by a processor, the graph-theory-based pure DC network bidirectional transaction routing method as described above is implemented.
[0143] Example 6
[0144] This embodiment 6 provides a computer device, including a memory and a processor, the processor and the memory communicate with each other, the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the pure DC network bidirectional transaction routing method based on graph theory as described above.
[0145] Example 7
[0146] This embodiment 7 provides an electronic device, including: a processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the pure DC network bidirectional transaction routing method based on graph theory as described above.
[0147] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative work on the basis of the technical solution disclosed in the present invention should be included in the scope of protection of the present invention.
Claims
1. A bidirectional transaction path finding method for pure DC network based on graph theory, characterized in that: include: Constructing a power system trading network diagram; the power system trading network diagram is composed of a number of nodes and edges between nodes, the nodes represent various trading units of the power system, the bidirectional trading DC system includes bus nodes of various trading areas, and the edges represent the mutual relationship and effect between elements, and the bidirectional trading DC system represents various DC transmission channels; After adding the transaction, an optimization model is constructed based on the transaction network graph, with the maximum flow limit of each branch as a constraint. If the optimization model has a solution, it means that the safety check has passed. After that, the path search using the graph theory algorithm for a single pair of transactions will be charged separately. Based on the optimization model, the transmission price or loss on each line is used as the weight of each line on the transmission line map, which constitutes a single-source shortest path search problem. The Dijkstra algorithm is used to solve the optimization model and obtain the optimal path.
2. The pure DC network bidirectional transaction routing method based on graph theory according to claim 1 is characterized in that: Since the power system network line flow can be transmitted in both directions, the network diagram is set as an undirected graph; since it is necessary to consider transmission losses and transmission costs, the network is set as a weighted graph, and the loss weight matrix and cost weight matrix are established respectively; when the transaction power between lines exceeds ATC, the line will be deleted from the transaction network diagram and the transaction network diagram will be updated.
3. The pure DC network bidirectional transaction routing method based on graph theory according to claim 1 is characterized in that: When the Dijkstra algorithm solves the optimal path, it first needs to generate a graph and then find the path based on the generated graph; the adjacency matrix is a matrix that represents the adjacent relationship between vertices. The non-zero entries in the adjacency matrix represent the edges between two nodes, and the entry values represent the weights of the edges. The diagonal elements of the adjacency matrix are usually zero, but non-zero diagonal elements represent self-loops or nodes connected to themselves by edges.
4. The pure DC network bidirectional transaction routing method based on graph theory according to claim 3 is characterized in that: Dijkstra's algorithm includes: When calculating the shortest path in graph G through Dijkstra, you need to specify a source point s; Introduce two arrays S and VS; S is used to record the vertices whose shortest paths have been found, while VS is used to record the vertices whose shortest paths have not yet been found; Initially, the array S contains only the source point s; the array VS contains the vertices other than the source point s, and the array VS records the distance from each vertex to the source point s; if the vertex is not adjacent to the source point s, the distance is infinite; Find the vertex k with the shortest path from the array VS and add it to the array S; at the same time, remove the vertex k from the array VS; then, update the distance from each vertex in the array VS to the source point s; Until all vertices are traversed.
5. The pure DC network bidirectional transaction routing method based on graph theory according to claim 4 is characterized in that: When multiple transactions occur at the same time, it is necessary to physically check the power flow of each line in the pure DC network to verify whether the system can carry out multiple transactions at the same time and meet the lowest transmission cost. The physical check of multiple transactions at the same time adopts the method of building a linear optimization model.
6. The pure DC network bidirectional transaction routing method based on graph theory according to claim 1 is characterized in that: The optimal path refers to the path with the smallest cumulative weight among all paths from node i to node j in the weighted transaction network graph G. It is called the optimal path between nodes i and j.
7. A pure DC network bidirectional transaction routing system based on graph theory, characterized in that: include: The first construction module is used to construct a power system transaction network diagram; the power system transaction network diagram is composed of a number of nodes and edges between nodes, the nodes represent various transaction units of the power system, the bidirectional transaction DC system includes bus nodes of various transaction areas, and the edges represent the mutual relationship and effect between elements, and the bidirectional transaction DC system represents various DC transmission channels; The second construction module is used to build an optimization model based on the transaction network graph after adding the transaction, with the maximum flow limit of each branch as a constraint. If the optimization model has a solution, it means that the safety check has passed. After that, the path search using the graph theory algorithm for a single pair of transactions will be charged separately; The solution module is used to construct a single-source shortest path search problem based on the optimization model, using the transmission price or loss on each line as the weight of each line on the transmission line map, and using the Dijkstra algorithm to solve the optimization model to obtain the optimal path.
8. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by the processor, the pure DC network bidirectional transaction routing method based on graph theory is implemented as described in any one of claims 1-6.
9. A computer device, characterized in that: It includes a memory and a processor, the processor and the memory communicate with each other, the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the pure DC network bidirectional transaction routing method based on graph theory as described in any one of claims 1-6.
10. An electronic device, characterized in that: include: A processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the graph-theory-based pure DC network bidirectional transaction routing method as described in any one of claims 1-6.
