Cross-regional power grid carbon emission distributed calculation method, system and equipment

By adopting a cross-regional grid carbon emission distributed calculation method in the power system and using a multi-level node structure for iterative calculations, the problem of large data volume and difficulty in sharing is solved, fast and accurate cross-regional carbon emission calculation is achieved, and guaranteed Data security.

CN118780485APending Publication Date: 2024-10-15STATE GRID INFORMATION & TELECOMM BRANCH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410893598.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Existing technologies face problems such as large amounts of data, long calculation time, and difficulty in data sharing when calculating cross-regional carbon emissions from power systems. In particular, there are challenges in high-frequency calculations and data aggregation.

Method used

A cross-regional power grid carbon emission distributed calculation method is adopted, and a multi-level structure of secondary master nodes and slave nodes is set to perform iterative calculations and data transmission, reducing calculation time and ensuring data security. Specific steps include receiving the information forwarded by the secondary master node from the slave node and performing iterative updates to form a regional carbon emission factor, and calculating the carbon emissions of the cross-regional power grid by combining the power generation and input power through the primary master node.

Benefits of technology

It achieves rapid calculation of large-scale node carbon emission flows, reduces calculation time, and obtains accurate solutions without sharing power flow information, ensuring the security of data from each power grid company.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118780485A_ABST
    Figure CN118780485A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-regional power grid carbon emission distributed calculation method, system and device, and the method comprises the steps: setting a terminal in a region as a secondary master node, and setting other terminals as slave nodes; setting primary and secondary master nodes in the large area as primary master nodes, wherein the large area comprises a plurality of areas; reading information sent by each slave node through a secondary master node, forwarding the information to each slave node, and broadcasting all the slave nodes after receiving iteration ending information sent by the slave nodes after finishing convergence; receiving the information forwarded by the secondary master node through the slave node, and carrying out iterative updating on the power carbon emission factor of the local power grid to obtain a regional carbon emission factor; and obtaining cross-regional power grid carbon emission by combining regional carbon emission factors through the primary main node based on the generating capacity of each secondary main node and the electric quantity input into the region. According to the method, a one-master multi-slave distributed computing framework is adopted, the computing time is shortened, the data security is ensured, and time sequence synchronization and process control of the cooperative computing process are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of carbon emission accounting for power systems, and in particular to a distributed calculation method, system and device for carbon emission of cross-regional power grids. Background Art

[0002] In the power system, carbon emissions mainly come from the combustion of fossil energy in power plants. This part of carbon emissions flows to the user side with the transmission of the power system, constituting the carbon emissions generated by the use of electricity on the user side. According to the GHG protocol, this part of carbon emissions belongs to Scope 2 (indirect carbon emissions) in the corporate carbon emission accounting system. The power system is complex, which brings challenges to the accurate calculation of carbon emissions on the user side. According to the characteristics of the power system and based on the flow tracking technology, the "carbon flow theory" measures direct carbon emissions from the source of power generation and distributes them to the power consumption side according to the flow. This method can be used to calculate the carbon emission factor of electricity at each node (station) of the power grid. By multiplying this factor by the load power of the node, the carbon emissions of the node can be obtained. According to the frequency of using flow data, this method can calculate the emission factor with a frequency of 15 minutes. This method has simple assumptions and a solid theoretical basis. It has become a hot topic of research in recent years and can promote the improvement of the carbon emission accounting system.

[0003] However, there are still challenges in the calculation process:

[0004] First, this method faces the problem of large data volume and long calculation time. It is necessary to obtain the topological structure and flow information of the power grid, and the amount of data is very large. For a provincial power grid, the topological information contains an average of 3000-15000 main grid nodes (35kV and above stations) and 5000-20000 lines; in terms of time, the power grid energy management system collects gateway electricity once every 5 minutes, and collects 288 points a day. The huge amount of information challenges the processing capacity of the calculation model built based on the carbon flow theory, especially when it is required to calculate the factors of each node and line of the power grid at a high frequency.

[0005] Second, this method requires the aggregation of national power flow data, which poses a challenge to data aggregation. With the establishment of UHV lines, inter-regional power exchange has become increasingly frequent, and the power grids in each region have influenced each other. In order to accurately calculate the carbon flow factors of each province, it is necessary to clearly calculate the carbon flow of each region and the influence between them, so the power flow and power grid topology data of each region are aggregated. However, power flow and power grid topology data are important detailed data for each power grid company, and the power grid companies are not willing to share them. Therefore, when calculating, each power grid company cannot obtain the carbon emission information of other companies' input electricity, and cannot grasp the impact of input carbon emissions on itself, resulting in the inability to accurately calculate the carbon emission factors of each power grid node. Summary of the invention

[0006] In order to solve the problem that the existing technology cannot obtain the carbon emission information of other companies' input electricity, cannot grasp the impact of input carbon emissions on itself, and cannot accurately calculate the carbon emission factors of each grid node, the present invention proposes a cross-regional grid carbon emission distributed calculation method, including: setting one of the terminals in the region as a secondary master node, and the other terminals as slave nodes; and setting the secondary master node of one area in a large area as a primary master node, wherein the large area includes multiple areas;

[0007] The secondary master node reads the information sent by each slave node and forwards the information to each slave node. When the iteration end information sent by the slave node after completing convergence is received, it is broadcast to all slave nodes;

[0008] By receiving information forwarded by the secondary master node from the slave node, the local power grid carbon emission factor is iteratively updated to obtain the regional carbon emission factor, which is then uploaded to the secondary master node;

[0009] The cross-regional power grid carbon emissions are obtained by combining the power generation of each secondary master node and the power input into the region with the regional carbon emission factor through the primary master node.

[0010] Optionally, the step of iteratively updating the local power grid carbon emission factor by receiving information forwarded by the secondary master node from the slave node to obtain the regional carbon emission factor includes:

[0011] The slave node forms a power generation information matrix with the power generation information of the secondary nodes and slave nodes in the region;

[0012] The slave node forms an exchange power matrix with the interactive power between each secondary node and the slave node in the region;

[0013] The slave node calculates the power flow information matrix composed of all secondary nodes and slave nodes in the area by using the power generation information matrix and the exchange power matrix;

[0014] A vector is formed by the injected carbon emissions of each slave node and secondary master node in the region;

[0015] The injected carbon emissions from cross-region injection into the region constitute the cross-region injection vector;

[0016] The relationship between the power flow information matrix composed of all nodes in the region and the vector and the cross-regional injection vector is iteratively calculated using an iterative algorithm until the regional carbon emission factor no longer changes or the rate of change of the regional carbon emission factor is less than a set threshold, thereby obtaining the regional carbon emission factor.

[0017] Optionally, the power flow information matrix formed by all nodes in the area is calculated as follows:

[0018]

[0019] Where M k is the power flow information matrix composed of all nodes in region k, E k is the power generation information matrix composed of the power generation of each node in the k region, P k is the power exchange matrix of each node in region k, The dimension is N k A vector of all 1s, N k is the number of grid nodes contained in the region, and k is the number of regions.

[0020] Optionally, the regional carbon emission factor is calculated as follows:

[0021]

[0022] In the formula, λ k is the regional carbon emission factor, is the matrix composed of the carbon emission factors of each node in region k calculated without taking into account the carbon emissions carried by external input electricity, ρ l,k,j,i is the active value from node k in region l to node i in region j, λ l,j is the carbon emission factor of the jth node in the external region l, N l is the number of regions, l is the sequence number of the region, and K is the total number of regions.

[0023] Optionally, the iterative algorithm includes: Gauss-Seidel iterative method and Jacobi iterative method.

[0024] Optionally, it also includes: when there is a transmission timeout or congestion in parallel data transmission, a retry mechanism is adopted.

[0025] On the other hand, the present application also provides a cross-regional power grid carbon emission distributed computing system, including:

[0026] A hierarchical division module is used to set one of the terminals in the area as a secondary master node and the other terminals as slave nodes; and set the secondary master node of one area in a large area as a primary master node, wherein the large area includes multiple areas;

[0027] The secondary node is used to read the information sent by each slave node and forward the information to each slave node. After receiving the iteration end information sent by the slave node after completing convergence, it broadcasts it to all slave nodes.

[0028] The slave node is used to receive information forwarded by the secondary master node, iteratively update the carbon emission factor of the local power grid, obtain the regional carbon emission factor, and upload it to the secondary master node;

[0029] The primary master node is used to obtain the cross-regional power grid carbon emissions based on the power generation of each secondary master node and the power input into the region, combined with the regional carbon emission factor.

[0030] Optionally, the slave node is specifically used for:

[0031] The slave node forms a power generation information matrix with the power generation information of the secondary nodes and slave nodes in the region;

[0032] The slave node forms an exchange power matrix with the interactive power between each secondary node and the slave node in the region;

[0033] The slave node calculates the power flow information matrix composed of all secondary nodes and slave nodes in the area by using the power generation information matrix and the exchange power matrix;

[0034] A vector is formed by the injected carbon emissions of each slave node and secondary master node in the region;

[0035] The injected carbon emissions from cross-region injection into the region constitute the cross-region injection vector;

[0036] The relationship between the power flow information matrix composed of all nodes in the region and the vector and the cross-regional injection vector is iteratively calculated using an iterative algorithm until the regional carbon emission factor no longer changes or the rate of change of the regional carbon emission factor is less than a set threshold, thereby obtaining the regional carbon emission factor.

[0037] Optionally, the power flow information matrix formed by all nodes in the area is calculated as follows:

[0038]

[0039] Where M k is the power flow information matrix composed of all nodes in region k, E k is the power generation information matrix composed of the power generation of each node in the k region, P k is the power exchange matrix of each node in region k, The dimension is N k A vector of all 1s, N k is the number of grid nodes contained in the region, and k is the number of regions.

[0040] Optionally, the regional carbon emission factor is calculated as follows:

[0041]

[0042] In the formula, is the matrix composed of the carbon emission factors of each node in region k calculated without taking into account the carbon emissions carried by external input electricity, ρ l,k,j,i is the active value from node k in region l to node i in region j, λl,j is the carbon emission factor of the jth node in the external region l, N l is the number of regions, l is the sequence number of the region, and K is the total number of regions.

[0043] Optionally, the iterative algorithm includes: Gauss-Seidel iterative method and Jacobi iterative method.

[0044] Optionally, a retry module is also included, which is used to adopt a retry mechanism when there is a transmission timeout or congestion in parallel data transmission.

[0045] In another aspect, the present application further provides a computing device, comprising: at least one processor and a memory;

[0046] The memory is used to store one or more programs;

[0047] When the one or more programs are executed by the at least one processor, a distributed calculation method for cross-regional power grid carbon emissions as described above is implemented.

[0048] On the other hand, the present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed, it implements a cross-regional power grid carbon emission distributed computing method as described above.

[0049] Compared with the prior art, the present invention has the following beneficial effects:

[0050] The present invention provides a distributed calculation method for cross-regional power grid carbon emissions, including: setting one of the terminals in the region as a secondary master node, and the other terminals as slave nodes; setting the secondary master node of one region in a large region as a primary master node, wherein the large region includes multiple regions; reading the information sent by each slave node through the secondary master node, and forwarding the information to each slave node, and broadcasting to all slave nodes after receiving the iteration end information sent by the slave node after completing convergence; receiving the information forwarded by the secondary master node through the slave node, iteratively updating the local power grid carbon emission factor, obtaining the regional carbon emission factor, and uploading it to the secondary master node; obtaining the cross-regional power grid carbon emissions through the primary master node based on the power generation of each secondary master node and the power input into the region, combined with the regional carbon emission factor. The present invention adopts distributed computing with a multi-level structure of primary master nodes, secondary master nodes and slave nodes, reduces the calculation time, and minimizes the sharing of power grid nodes and flow data to ensure the data security of each power grid company. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 A flow chart of a distributed calculation method for cross-regional power grid carbon emissions according to the present invention;

[0052] Figure 2It is a schematic diagram of the regional division of the present invention;

[0053] Figure 3 It is a regional transmission schematic diagram of the present invention;

[0054] Figure 4 This is a schematic diagram of a one-master-multiple-slave architecture of the present invention;

[0055] Figure 5 It is a schematic diagram of the fully connected architecture of the present invention;

[0056] Figure 6 A schematic diagram of a computer device according to the present invention. DETAILED DESCRIPTION

[0057] The present invention proposes a cross-regional power grid carbon emission distributed computing method, which adopts decentralized distributed computing, reduces the computing time, and shares as few power grid nodes and flow data as possible to ensure the data security of each power grid company.

[0058] In order to better understand the present invention, the content of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0059] Embodiment 1:

[0060] A distributed calculation method for carbon emissions of cross-regional power grids, such as Figure 1 As shown, including:

[0061] Step S1, setting one of the nodes in the area as a secondary master node, and the other nodes as slave nodes; and setting the secondary master node of one area in the large area as a primary master node, wherein the large area includes multiple areas;

[0062] Step S2: The secondary master node reads the information sent by each slave node and forwards the information to each slave node. When the iteration end information sent by the slave node after the convergence is received, it is broadcast to all slave nodes.

[0063] Step S3: By receiving information forwarded by the secondary master node from the slave node, the local power grid carbon emission factor is iteratively updated to obtain the regional carbon emission factor, and the regional carbon emission factor is uploaded to the secondary master node;

[0064] Step S4: The cross-regional power grid carbon emissions are obtained by combining the regional carbon emission factor with the power generation of each secondary master node and the power input into the region through the primary master node.

[0065] Before introducing step S1, it also includes constructing a power grid topology structure.

[0066] The area of ​​the station and line is determined according to the regional code, and the line of cross-regional transmission is determined by the starting point of the line in different areas. The transmission lines in the region are determined by the grid topology, flow and other information. These lines connect different stations and users to form a network for power transmission and distribution. For each line and each station, the maximum power allowed is agreed upon. It is determined based on the capacity of the line, the rated power of the equipment and the stability requirements of the system.

[0067] The division of regions can be based on geographical locations. For example, a province can be used as a region, or the power supply area of ​​the same power supply company can be used as a region. Of course, the regions can also be divided by setting the number of nodes. The set number can be determined based on the requirements for the computing rate, or it can be determined manually.

[0068] Identify all stations and lines in the power grid and determine the relationship between them, and build the power grid topology with stations and users as nodes and lines as edges.

[0069] Step S1, setting one of the nodes in the area as a secondary master node, and the other nodes as slave nodes; and setting the secondary master node of one area in the large area as a primary master node, specifically including:

[0070] The present invention adopts a multi-level master-slave structure, that is, one node is designated as a secondary master node in a region, and the other nodes are slave nodes;

[0071] The master node of a certain area in a large area is a primary master node. The large area here can be composed of multiple areas belonging to the same power supply provider, or can also be composed of multiple areas belonging to different power supplies.

[0072] The present invention adopts a block-iterative method for calculating the carbon emission flow of a power grid, and proves that the method can ensure the rapid calculation of the carbon emission flow of large-scale nodes, and an accurate solution can be obtained without sharing the flow information.

[0073] The specific steps of step S1 are as follows:

[0074] The overall architecture is implemented in two ways: "one master and multiple slaves" architecture and "distributed" architecture. Figure 4 As shown, it is controlled by a master server, each slave node represents a terminal in a zone, and the master server distributes and receives the interactive information between nodes. The master node receives the node factors sent by each slave node, queries the exchange line table between slave nodes in each zone, and sends the factors to the corresponding other slave nodes. The present invention adopts the "one master and multiple slaves" architecture. In the "distributed" architecture, each terminal is connected using a full connection method. Figure 5As shown, they communicate with each other, query the nodes they have connected to during the iteration process, and send the corresponding factors to the other party's terminal.

[0075] A connection relationship of the topological network structure is established for each area, and shared stations and lines are divided between areas. The division principles are as follows:

[0076] (1) Nodes (stations) within this area belong to this area;

[0077] (2) The lines output to the external area are not considered as the topology of this area;

[0078] (3) For the lines input into this area, the equivalent units are the points connected to this area;

[0079] (4) Initial carbon emission factor ε of equivalent unit m Recorded as 0.

[0080] Step S2: read the information sent by each slave node through the secondary master node, and forward the information to each slave node. After receiving the iteration end information sent by the slave node after completing convergence, broadcast it to all slave nodes, specifically including:

[0081] The present invention adopts a hierarchical distributed computing framework with one master and multiple slaves, in which the slave node sends information to the secondary master node, and the secondary master node forwards the information to other slave nodes. After receiving the iteration end information sent by the slave node after convergence, it broadcasts to all slave nodes to solve the timing synchronization and process control of the collaborative computing process.

[0082] Step S3, by receiving information forwarded by the secondary master node from the slave node, iteratively updating the local power grid carbon emission factor, obtaining the regional carbon emission factor, and uploading it to the secondary master node, specifically includes:

[0083] According to the grid topology, the matrix elements indicate whether the nodes are connected, and a separate matrix E is created for each area. k , if node i and node j are connected in region 1, then the element in the i-th row and j-th column of the matrix in region 1 is the transmitted power P 1,i,j , construct the power transmission matrix E for each area k , the matrix is ​​spliced ​​diagonally, and the points outside the regional matrix are external input power. If there is an external input point in region 1 node i and there is a connection between region 2 node j, then the element in the matrix in region 1 row i and region 2 column j is the transmission power value P 2,1,i,j , otherwise it is 0. The elements of the adjacency matrix can represent the direction and capacity information of the line.

[0084] Initialize the initial carbon emission factor of each internal point in the region According to the transportation conditions between regions, the carbon emission factor and electricity information of the cross-regional input node are calculated. The carbon factor of the external input node is λ l,j , send it to the input area, using the formula An iterative update is performed until each regional factor no longer changes, or the rate of change of the regional factor is less than a threshold T.

[0085] Each area is calculated separately within the area Value, without considering external input, calculation is performed, and the calculation result is sent to other areas. Each area is both a client and a server. For example, area 1 sends a connection request and a security key to other areas that have lines to be transmitted to the external area. After receiving the request for connection, the server of the external area verifies the validity of the request and generates a unique session identifier. After other areas return the connection confirmation to area 1, the session identifier is recorded for subsequent communication. Then enter the next stage, area 1 sends authentication information to other areas to prove the identity and authority of area 1. Other areas verify the information to ensure legitimacy and integrity. After the verification is completed, other areas send authentication success information to area 1, indicating that the authentication is passed. After area 1 receives the verification success information from other areas, it sends data. Each area performs sending and calculation in parallel. After waiting for all areas to complete the calculation, the sending operation is executed in a loop.

[0086] First, without considering external input, the initial carbon emission factor of each node is calculated based on the points inside the current area. Then, according to the transmission conditions between regions, the carbon emission factors and electricity information of the corresponding cross-regional output nodes are sent to the input province, and then iterated once through formula (14) until the regional factors no longer change or the rate of change of the regional factors is less than a threshold T. The time complexity of using this method is only Among them, O is the time complexity, represents the average number of points inside each region, is the average number of external input lines in each region, D is the average number of iterations, and K is the number of regions contained in the large region. The algorithm's operation speed will be very fast, less than and if parallel execution is adopted, the K regions will be calculated on their own terminals respectively, which will be faster. Then the time complexity of the algorithm is O(N max 3 +D max V max 2 ), where N max Indicates the situation with the most points in the region, V max Indicates the maximum number of input lines in the area, D maxIndicates the maximum number of iterations required. Usually

[0087] The specific iteration formula is:

[0088]

[0089] The above iteration method is Jacobi iteration method. is the vector of carbon emission factors of electricity in region k after n+1 iterations, is the jth factor of region l after n iterations, N l is the l region, and K is the number of regions contained in the large region.

[0090] If the Gauss-Seidel iteration rule is used,

[0091]

[0092] The Gauss-Seidel iteration needs to be performed sequentially.

[0093] Step S4: The cross-regional power grid carbon emissions are obtained by combining the regional carbon emission factor with the power generation of each secondary master node and the power input into the region through the primary master node, specifically including:

[0094] The cross-regional power grid carbon emissions are obtained by multiplying the amount of electricity input into the region by the regional carbon emission factor and adding the carbon emissions generated by the power generation of the secondary master node.

[0095]

[0096] where c k,i represents the carbon emissions generated by the unit connected to node i in region k, E k,i is the power generation of the unit, E k,j,i is the amount of electricity delivered from grid node j to grid node i, λ k,j is the carbon emission factor of electricity at node j, λ k,i is the electricity carbon emission factor of node i, i and j are node numbers, and k is the region number.

[0097] Embodiment 2:

[0098] The present invention will be further introduced below:

[0099] (I) Basic principles of carbon flow

[0100] Assume that a large area (such as the whole country) contains K regions (such as provinces), each region is governed by its own power grid company, and the number of power grid nodes in each region is N. kThe total number of nodes in a large area is N. Considering that each power grid company may have duplicate known power grid nodes, N≠∑N k For each grid node, we have:

[0101]

[0102] where c k,i represents the carbon emissions generated by the unit connected to node i in region k, E k,i is the power generation of the unit, E k,j,i is the amount of electricity delivered from grid node j to grid node i, λ k,j is the carbon emission factor of electricity at node j, λ k,i is the electricity carbon emission factor of node i, i and j are both node numbers, k is the region number, then the electricity carbon emission injected into the grid by node i is:

[0103] c k,i =E k,i ε m (4)

[0104] where ε m It represents the marginal carbon emission factor of the unit, that is, the carbon emission generated by the unit power generation connected to the node, reflecting the carbon emission efficiency of the unit. For all grid nodes in the entire area, without considering external input, by solving the system of equations (3), we can get

[0105] Mλ=c (5)

[0106] Among them, M is the power flow information matrix of a large area, λ is the matrix composed of the power carbon emission factors of each node in the area, and c is the vector composed of the power carbon emissions injected by the units connected to the nodes in the area. and

[0107] M=E+diag{Pξ}-P (6)

[0108] Among them, λ 1,1 is the electricity carbon emission factor of the first node in region 1, is the electricity carbon emission factor of the N1th node in region 1, λ K,1 is the electricity carbon emission factor of the first node in region K, is the Nth K The carbon emission factor of electricity per node, c 1,1 is the carbon emission of electricity connected to the first node in region 1, is the carbon emission of electricity connected to the N1th node in region 1, c K,1 is the carbon emission of electricity connected to the first node in region K, For K regions connected to N K The carbon emissions of electricity of each node, E is the power generation information matrix composed of the power generation of each node, P is the power exchange matrix of each node, and ξ is a full-one column vector;

[0109]

[0110]

[0111] In the formula, E 1,1 is the power generation of the first node in region 1, is the power generation of the N1th node in region 1, E K,1 is the power generation of the first node in the K region, For K regions connected to N K nodes. The Nth k The amount of electricity transmitted from node to node N1 in area 1, For K region from Nth K The amount of electricity transmitted from one point to the first node, N1 is the number of nodes in area 1, N K is the number of nodes in region K, is transmitted from the N1th node in region 1 to the Nth node in region K K The power of a node.

[0112] If k and l are used to represent the region number, for P, where P k,i,j represents the active power from node i to node j in region k, P k,l,i,j represents the active value from node i in region k to node j in region l. The carbon emission factor λ of each node is obtained by solving equation group (5): k,i This method is slow when the matrix M is very large, and requires a time complexity of O(N 3 ) is the matrix inverse operation.

[0113] (II) Calculation using distributed computing methods

[0114] For each region, the carbon emissions contained in the electricity imported from the external region is equal to the input electricity multiplied by the carbon emission factor on the input station line, which is equal to the carbon emission factor of the electricity at the station at the beginning of the line. Figure 2 As shown, the input of area 2 is P 1,2,6,2 , then the carbon emission of input area 2 is P 1,2,6,2 λ 1,6 For region k, only its internal stations and lines are known. The carbon emission factor of the electricity of station j of the input line of the external region l is unknown, so the initial value can be set And the external input electricity is equivalent to the power generation of the unit connected to the i-th node in the k-th region, and the unit carbon emission factor is equal to the initial carbon emission factor, that is, For region k, we have:

[0115] M k λ k =c k +c k,l,j (9)

[0116] Among them, M k is the power flow information matrix composed of all nodes in area k, λ k is the vector of electricity carbon emission factors of all nodes in region k, c k is the vector of injected carbon emissions of each node in region k, c k,l,j is the vector of injected carbon emissions from node j in region l outside the region to region k, c l,k,j,i is the injected carbon emission from node j in region l to node i in region k. And

[0117]

[0118] Among them, E k is the power generation information matrix of region k, P k is the exchange power matrix between nodes in region k, The dimension is N k A vector of all 1s.

[0119]

[0120] In the formula, For region k from the Nth k Node to Nth k-1 The transmission power of each node is

[0121]

[0122] in, is the matrix composed of the carbon emission factors of each node in region k calculated without taking into account the carbon emissions carried by external input electricity, λ l,j is the carbon emission factor of the jth node in the external region l, ρ k,l,j,i Only the corresponding position has the value -P l,k,j,i The rest are all zero vectors. If other points in region l or points in other regions have carbon emissions transported to k, c k,l,j,i is the carbon emission vector from node j in region k to node i in region l, P l,k,j,i is the power from node j in region l to node i in region k, then:

[0123]

[0124] You can use the iterative update method. First, ignore the external input and only calculate the initial carbon emission factor of each node based on the points inside the current area. Then, according to the transmission conditions between regions, the carbon emission factors and electricity information of the corresponding cross-regional output nodes are sent to the input province, and then iterated once through formula (14) until the regional factors no longer change or the rate of change of the regional factors is less than a threshold T. The time complexity of this method is in represents the average number of points inside each region, is the average number of external input lines in each region. D is the average number of iterations. The algorithm's operation speed will be very fast, less than and if parallel execution is adopted, the K regions will be calculated on their own terminals respectively, which will be faster. Then the time complexity of the algorithm is O(N max 3 +D max V max 2 ), where N max Indicates the situation with the most points in the region, V max Indicates the maximum number of input lines in the area, D max Indicates the maximum number of iterations required. Usually

[0125] The specific iteration formula is:

[0126]

[0127] The above iteration method is Jacobi iteration method. is the vector of carbon emission factors of electricity in region k after n+1 iterations, is the jth factor of region l after n iterations, N l is the number of regions contained in the l-region and K-large-scale region.

[0128] If the Gauss-Seidel iteration rule is used,

[0129]

[0130] The Gauss-Seidel iteration needs to be performed sequentially.

[0131] 3. Distributed computing software architecture

[0132] The area of ​​the station and line is determined according to the province code of the region, and the line of cross-regional transmission is determined by the starting point of the line in different regions. The transmission lines in the region are determined by the grid topology, flow and other information. These lines connect different stations and users to form a network for power transmission and distribution. For each line and each station, the maximum power allowed is agreed upon. It is determined according to the capacity of the line, the rated power of the equipment and the stability requirements of the system.

[0133] Identify all stations and lines in the power grid and determine the relationship between them. According to the topology of the power grid, the matrix elements indicate whether the nodes are connected. A separate matrix E is created for each area. k , if node i and node j are connected in region 1, then the element in the i-th row and j-th column of the matrix in region 1 is the transmitted power P 1,i,j , construct the power transmission matrix E for each area k , the matrix is ​​spliced ​​diagonally, and the points outside the regional matrix are external input power. If there is an external input point in region 1 node i and there is a connection between region 2 node j, then the element in the matrix in region 1 row i and region 2 column j is the transmission power value P 2,1,i,j , otherwise it is 0. The elements of the adjacency matrix can represent the direction and capacity information of the line.

[0134] Initialize the initial carbon emission factor of each internal point in the region According to the transportation conditions between regions, the carbon emission factor and electricity information of the cross-regional input node are calculated. The carbon factor of the external input node is λ l,j , send it to the input area, using the formula An iterative update is performed until each regional factor no longer changes, or the rate of change of the regional factor is less than a threshold T.

[0135] Each area is calculated separately within the area Value, calculate without considering external input, and send the calculation result to other areas. Each area is both a client and a server. For example, area 1 sends connection requests and security keys to other external areas with existing lines. After the server of the external area receives the request for connection, it verifies the validity of the request and generates a unique session identifier. After other areas return the connection confirmation to area 1, the session identifier is recorded for subsequent communication. Then enter the next stage. Area 1 sends identity authentication information to other areas to prove the identity and authority of area 1. Other areas verify the information to ensure the legitimacy and integrity. After the verification is completed, other areas send identity authentication success information to area 1, indicating that the authentication is successful. After area 1 receives the verification success information from other areas, it sends data. Each area performs sending and calculation in parallel. After waiting for all areas to complete the calculation, the sending operation is executed in a loop.

[0136] There are problems such as transmission timeout and congestion in parallel data transmission. If the time from the sent data packet to the received confirmation packet exceeds the transmission timeout, it will be considered as packet loss, which may cause data loss. For this problem, a retry mechanism can be used. In the case of data timeout, the sending operation can be re-executed multiple times to improve the reliability of data transmission and ensure that the data can be successfully transmitted. Data congestion may occur during the transmission process, which will cause the data to be unable to be sent normally, affect the calculation of the λ value, and cause deviations in the λ calculation results. Control the flow to limit the rate of data sent by the sender to control network traffic and avoid sending too much data to cause network congestion.

[0137] The overall architecture is implemented in two ways: "one master and multiple slaves" and "distributed". The one master and multiple slaves architecture is controlled by a master server. Each slave node represents a terminal in a zone. The master server distributes and receives information exchanged between nodes. The master node receives the factors of each node sent by each node. The master node queries the exchange line table between nodes in each zone and sends the factors to the corresponding other nodes. In the "distributed" architecture, each terminal is connected in a fully connected manner and communicates with each other. During the iteration process, it queries the nodes with which it is connected and sends the corresponding factors to the other terminal. Different iteration forms are as follows: Figure 4 , Figure 5 shown.

[0138] (IV) Implementation process

[0139] (1) Constructing the topological structure of each region

[0140] A connection relationship of the topological network structure is established for each area, and shared stations and lines are divided between areas. The division principles are as follows:

[0141] (5) Nodes (stations) within this area belong to this area;

[0142] (6) The lines output to the external area are not considered as the topology of this area;

[0143] (7) For the lines input into this area, the equivalent units are the points connected to this area;

[0144] (8) Initial carbon emission factor ε of equivalent unit m The release is recorded as 0;

[0145] (2) Constructing the equation set based on the flow information

[0146] Construct each area matrix M through power flow information k and inject carbon emission vector c k, solve for the initial carbon emission factor

[0147]

[0148] (3) Start iteration based on the initial factor

[0149] Using formula (14), construct the vector ρ according to the input line l,k,j,i , and start iterating. The iterative process is as follows:

[0150] (1) Send a request to the area that has an input line to itself, and the request contains the following information:

[0151] 1) Enter the name of the line;

[0152] 2) The number of iterations.

[0153] (2) After receiving the request, return information according to the request, including:

[0154] 1) The name of the line;

[0155] 2) Electricity carbon emission factor;

[0156] 3) Active power value on the line;

[0157] 4) The number of iterations.

[0158] (3) After receiving the reply, the above information is updated using formula (14) to obtain the iterative electricity carbon emission factor At the same time, the number of iterations d is increased by 1.

[0159] (4) Determine whether to stop iteration

[0160] For each external input, if after d iterations there is

[0161]

[0162] Then the iteration is stopped, and the value of T can be a relatively small number such as 0.00001, or directly 0. If there are still input electricity carbon emission factors in the area that have not converged, repeat step 3. If the electricity carbon emission factors in the area have converged, the terminal in the area will no longer send data to terminals in other areas.

[0163] The calculation of the present invention can sink the calculation of the carbon emission factor of electricity in a large area (such as the whole country) to the terminals in each region (such as the province), realize distributed computing, greatly shorten the calculation time, and use less memory to complete the calculation. In addition, the terminals in each region only need to provide a small amount of detailed data, such as the line active power and carbon emission factor input to the other party, to complete the calculation, ensure the privacy of their own data, and the calculation results are consistent with the calculation effect of the linkage calculation of the national field station nodes.

[0164] like Figure 3 As shown, the power generation matrices E1, E2, and E3 of each node in area 1 and areas 2 and 3 are constructed, the input power of other internal nodes in area 1 is P1, and the internal nodes in areas 2 and 3 construct input power matrices P2 and P3.

[0165] Using the formula Get the M1 matrix of region 1 using The M2 matrix of region 2, M3 in zone 3.

[0166] Obtain the injected carbon emissions C1, C2, and C3 of the three regions, and calculate the initial carbon emission factor of the node based on the regional plant and line information According to the formula Use the inverse matrix of M1 of region 1 itself to multiply the carbon emission vector of region 1 to obtain the initial carbon emission factor of region 1 Area 2 Pass Calculate the initial carbon emission factor value for region 2 Area 3 Pass Calculated initial carbon emission factor value for region 3

[0167] Areas 1, 2, and 3 will calculate the results The related nodes are sent to each other. Area 1 accepts the request verification of areas 2 and 3, verifies the security keys of areas 2 and 3 and returns a session identifier to areas 2 and 3. Areas 2 and 3 receive the session identifier and send identity and authority information to area 1. Area 1 verifies and starts accepting after successful verification. Regions 1, 2, and 3 execute sending and verification in parallel, and calculate after receiving the carbon factor values ​​of other regions. After regions 1, 2, and 3 have completed the calculation, they execute a new round of sending requests.

[0168] According to the transportation conditions between regions, the carbon emission factor of the corresponding cross-regional output node is calculated through the formula Calculate the overall λ1 value of other areas transported to area 1, and area 2 by the formula Calculate the overall λ2 value of other regions transported to region 2, region 3 by the formula Calculate the overall λ3 value of the transport from other regions to region 3, is the carbon factor value of the region without considering external input, λ i,j Is an external area The carbon factor value sent to its own area in , and the lambda value is sent to each other between different areas through multiple iterations.

[0169] Check whether the overall changes of carbon emission factors λ1, λ2, and λ3 of regions 1, 2, and 3 are less than the set threshold T (the set value in this patent is 0.00001). After d iterations, according to the formula If the conditions are not met, the iteration results will continue to be updated. If the conditions are met, the iteration will be stopped. λ1, λ2, and λ3 in the three regions are calculated. The final results are shown in Table 1.

[0170] Table 1 Examples of carbon emission factors

[0171]

[0172] Example 3

[0173] The present invention based on the same inventive concept also provides a cross-regional power grid carbon emission distributed computing system, comprising:

[0174] A hierarchical division module is used to set one of the terminals in the area as a secondary master node and the other terminals as slave nodes; and set the secondary master node in one area of ​​the same power supplier as a primary master node;

[0175] The secondary node is used to read the information sent by each slave node and forward the information to each slave node. After receiving the iteration end information sent by the slave node after completing convergence, it broadcasts it to all slave nodes.

[0176] The slave node is used to receive information forwarded by the secondary master node, iteratively update the carbon emission factor of the local power grid, obtain the regional carbon emission factor, and upload it to the secondary master node;

[0177] The primary master node is used to obtain the cross-regional power grid carbon emissions based on the power generation of each secondary master node and the power input into the region, combined with the regional carbon emission factor.

[0178] Optionally, the slave node is specifically used for:

[0179] The slave node forms a power generation information matrix with the power generation information of the secondary nodes and slave nodes in the region;

[0180] The slave node forms an exchange power matrix with the interactive power between each secondary node and the slave node in the region;

[0181] The slave node calculates the power flow information matrix composed of all secondary nodes and slave nodes in the area by using the power generation information matrix and the exchange power matrix;

[0182] A vector is formed by the injected carbon emissions of each slave node and secondary master node in the region;

[0183] The injected carbon emissions from cross-region injection into the region constitute the cross-region injection vector;

[0184] The relationship between the power flow information matrix composed of all nodes in the region and the vector and the cross-regional injection vector is iteratively calculated using an iterative algorithm until the regional carbon emission factor no longer changes or the rate of change of the regional carbon emission factor is less than a set threshold, thereby obtaining the regional carbon emission factor.

[0185] Optionally, the power flow information matrix formed by all nodes in the area is calculated as follows:

[0186]

[0187] Where M k is the power flow information matrix composed of all nodes in region k, E k is the power generation information matrix composed of the power generation of each node in the k region, P k is the power exchange matrix of each node in region k, The dimension is N k A vector of all 1s, N k is the number of grid nodes contained in the region, and k is the number of regions.

[0188] Optionally, the regional carbon emission factor is calculated as follows:

[0189]

[0190] In the formula, is the matrix composed of the carbon emission factors of each node in region k calculated without taking into account the carbon emissions carried by external input electricity, ρ l,k,j,i is the active value from node k in region l to node i in region j, λ l,j is the carbon emission factor of the jth node in the external region l, N l is the number of regions, l is the sequence number of the region, and K is the total number of regions.

[0191] Optionally, the iterative algorithm includes: Gauss-Seidel iterative method and Jacobi iterative method.

[0192] Optionally, a retry module is also included, which is used to adopt a retry mechanism when there is a transmission timeout or congestion in parallel data transmission.

[0193] Example 4

[0194] like Figure 6 As shown, the present invention also provides an electronic device, which may be a computer device, a single-chip device, an intelligent mobile device, etc. The electronic device in this embodiment may include a processor, a memory, a transceiver component, etc. The memory, the processor, and the transceiver component are connected via a bus; the memory may be used to store an execution program, and an exemplary execution program may include instructions; the processor is used to execute the instructions stored in the memory. The memory may also be used to store data, which may be called and / or modified when the instructions are executed.

[0195] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in a storage medium to implement the corresponding method flow or corresponding functions, so as to implement the steps of a distributed calculation method for cross-regional power grid carbon emissions in the above-mentioned embodiment.

[0196] Example 5

[0197] Based on the same inventive concept, the present invention also provides a readable storage medium, specifically an electronic device readable storage medium (Memory), which is a memory device in an electronic device for storing programs and data. It can be understood that the storage medium here can include both built-in storage media in electronic devices and, of course, extended storage media supported by electronic devices. The storage medium provides a storage space that stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by a processor are also stored in the storage space, and these instructions can be one or more execution programs (including program codes). It should be noted that the storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage. The processor loads and executes one or more instructions stored in the storage medium, which can implement the steps of a distributed calculation method for cross-regional power grid carbon emissions in the above embodiment.

[0198] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0199] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0200] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0201] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0202] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of the claims of the present invention to be approved.

Claims

1. A distributed calculation method for carbon emissions of cross-regional power grids, characterized in that: include: Set one of the terminals in the area as the secondary master node and the other terminals as slave nodes; and setting a secondary master node of one area in the large area as a primary master node, wherein the large area includes multiple areas; The secondary master node reads the information sent by each slave node and forwards the information to each slave node. When the iteration end information sent by the slave node after completing convergence is received, it is broadcast to all slave nodes; By receiving information forwarded by the secondary master node from the slave node, the local power grid carbon emission factor is iteratively updated to obtain the regional carbon emission factor, which is then uploaded to the secondary master node; The cross-regional power grid carbon emissions are obtained by combining the power generation of each secondary master node and the power input into the region with the regional carbon emission factor through the primary master node.

2. The method according to claim 1, characterized in that The information forwarded by the secondary master node is received from the slave node, and the carbon emission factor of the local power grid is iteratively updated to obtain the regional carbon emission factor, including: The slave node forms a power generation information matrix with the power generation information of the secondary nodes and slave nodes in the region; The slave node forms an exchange power matrix with the interactive power between each secondary node and the slave node in the region; The slave node calculates the power flow information matrix composed of all secondary nodes and slave nodes in the area by using the power generation information matrix and the exchange power matrix; A vector is formed by the injected carbon emissions of each slave node and secondary master node in the region; The injected carbon emissions from cross-region injection into the region constitute the cross-region injection vector; The relationship between the power flow information matrix composed of all nodes in the region and the vector and the cross-regional injection vector is iteratively calculated using an iterative algorithm until the regional carbon emission factor no longer changes or the rate of change of the regional carbon emission factor is less than a set threshold, thereby obtaining the regional carbon emission factor.

3. The method according to claim 2, characterized in that The power flow information matrix composed of all nodes in the area is calculated as follows: Where M k is the power flow information matrix composed of all nodes in region k, E k is the power generation information matrix composed of the power generation of each node in the k region, P k is the power exchange matrix of each node in region k, The dimension is N k A vector of all 1s, N k is the number of grid nodes contained in the region, and k is the number of regions.

4. The method according to claim 3, characterized in that The regional carbon emission factor is calculated as follows: In the formula, λ k is the regional carbon emission factor, is the matrix composed of the carbon emission factors of each node in region k calculated without taking into account the carbon emissions carried by external input electricity, ρ l,k,j,i is the active value from node k in region l to node i in region j, λ l,j is the carbon emission factor of the jth node in the external region l, N l is the number of regions, l is the sequence number of the region, and K is the total number of regions.

5. The method according to claim 2, characterized in that The iterative algorithms include: Gauss-Seidel iterative method and Jacobi iterative method.

6. The method according to claim 1, characterized in that Also includes: When data is sent in parallel and there is a transmission timeout or congestion, a retry mechanism is used.

7. A cross-regional power grid carbon emission distributed computing system, characterized in that: include: A hierarchical division module is used to set one of the terminals in the area as a secondary master node and the other terminals as slave nodes; and setting a secondary master node of one area in the large area as a primary master node, wherein the large area includes multiple areas; The secondary node is used to read the information sent by each slave node and forward the information to each slave node. After receiving the iteration end information sent by the slave node after completing convergence, it broadcasts it to all slave nodes. The slave node is used to receive information forwarded by the secondary master node, iteratively update the carbon emission factor of the local power grid, obtain the regional carbon emission factor, and upload it to the secondary master node; The primary master node is used to obtain the cross-regional power grid carbon emissions based on the power generation of each secondary master node and the power input into the region, combined with the regional carbon emission factor.

8. The system according to claim 7, characterized in that The slave node is specifically used for: The slave node forms a power generation information matrix with the power generation information of the secondary nodes and slave nodes in the region; The slave node forms an exchange power matrix with the interactive power between each secondary node and the slave node in the region; The slave node calculates the power flow information matrix composed of all secondary nodes and slave nodes in the area by using the power generation information matrix and the exchange power matrix; A vector is formed by the injected carbon emissions of each slave node and secondary master node in the region; The injected carbon emissions from cross-region injection into the region constitute the cross-region injection vector; The relationship between the power flow information matrix composed of all nodes in the region and the vector and the cross-regional injection vector is iteratively calculated using an iterative algorithm until the regional carbon emission factor no longer changes or the rate of change of the regional carbon emission factor is less than a set threshold, thereby obtaining the regional carbon emission factor.

9. An electronic device, characterized in that: include: at least one processor and memory; The memory and the processor are connected via a bus; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, a distributed calculation method for cross-regional power grid carbon emissions as described in any one of claims 1 to 6 is implemented.

10. A readable storage medium, characterized in that: An execution program is stored thereon, and when the execution program is executed, a distributed calculation method for cross-regional power grid carbon emissions as described in any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Carbon flow calculation method based on electricity-carbon interaction relationship

    CN120106344A