A method for allocating line losses when distributed power sources are connected to a distribution network
Through blockchain technology and the Aumann_Shapley method, combined with the POS consensus mechanism and smart contracts, the problem of data security and fairness in the process of distributed power network loss allocation is solved, and the fairness, security, efficiency and transparency of distributed power network losses are achieved. of apportionment.
Patent Information
- Application Number
- CN202111293520.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-03
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-11-03
AI Technical Summary
In the existing technology, after distributed power sources are connected to the distribution network, there are problems in the network loss sharing process such as over-centralization of data processing, insecure data storage, and unguaranteed fairness, making it difficult to achieve fair, safe, efficient and transparent network losses. apportionment.
Using blockchain technology and the Aumann_Shapley method, the bookkeeper node is selected through the POS consensus mechanism to verify and confirm the transaction data. The smart contract calculates the line self-coupling loss and mutual coupling loss, and uses the Aumann_Shapley method of cooperative game to calculate the line loss sharing value. , realize automatic execution of line loss allocation of funds.
It achieves fairness, security and transparency in the distribution of distributed power network losses, ensures the openness and traceability of the distribution process, and improves the fairness and security of distribution.
Smart Images

Figure CN114021958B
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of line loss allocation and blockchain technology, and in particular to a line loss allocation method for connecting a distributed power source to a distribution network. Background Art
[0002] With the reform of the power market, a large number of distributed power sources have been incorporated into the distribution network and participated in the power transaction, which has led to changes in the distribution network flow and network loss. Loss allocation is an important way for power supply companies to recover loss costs. However, how to fairly, impartially, accurately and reasonably allocate to each power generation source and power load is a very complex issue. The traditional proportional allocation method is complex in calculation, has large errors, and lacks economic signals for the grid connection of distributed power sources. The use of cooperative game theory to allocate network losses can safeguard individual interests and play a good guiding role in the market configuration of distributed power sources. However, the network loss allocation process still has problems such as over-centralized data processing, insecure data storage, and inability to ensure fairness. Therefore, adopting a reasonable network loss allocation plan and ensuring the fairness and reliability of the allocation calculation process are of great practical significance for promoting the reasonable configuration of distributed power sources and building a fair, safe, efficient and transparent distributed power network loss allocation system.
[0003] The access of distributed generation to the distribution network to participate in electricity trading has changed the power distribution of the distribution network and has affected the operating costs of the power grid. Considering multiple influencing factors, quantifying this impact fairly and impartially, and maintaining a balance of interests among all parties are important means to promote the rational allocation of distributed generation and the healthy development of the electricity market.
[0004] In view of this, the present invention provides a line loss allocation method for distributed power sources connected to a distribution network based on blockchain technology and the Aumann_Shapley method. Considering the fairness and security of network loss allocation, under the support of the blockchain technology framework, the network loss is allocated using a cooperative game method, and finally a network loss allocation scheme after the distributed power sources are connected to the distribution network is obtained, thereby achieving fairness, security, efficiency and transparency in the distributed power source network loss allocation. Summary of the invention
[0005] The purpose of the present invention is to provide a line loss allocation method for a distributed power source connected to a power distribution network, which is characterized by comprising the following steps:
[0006] Step 1: Select the "bookkeeper" node that writes data through the blockchain's POS consensus mechanism, verify and confirm the transaction data, and write the correct data into the blockchain;
[0007] Step 2: The smart contract calculates the line autocoupling loss and mutual coupling loss caused by power trading;
[0008] Step 3: The smart contract calculates the expected line loss allocation value based on the Aumann_Shapley method of cooperative game;
[0009] Step 4: Store the calculation model of line loss allocation after the distributed power source is connected to the distribution network in the smart contract, and automatically execute the fund allocation for line loss allocation.
[0010] The step 1 specifically includes the following sub-steps:
[0011] Step 11: Select distributed power nodes and load nodes as participants to join the blockchain;
[0012] Step 12: Upload the node’s reputation value in the temporary data pool And computing power And the nodes within the line loss allocation time section for the seller nodes participating in the transaction i 、Buyer node b i 、Transaction volume p i and transaction time t i , and use the private key to sign the message as follows:
[0013] T i =[s i ,b i ,p i ,t i ,sk i ] (1)
[0014] Where j represents the jth line loss allocation calculation, k represents the kth node participating in line loss allocation, T i Indicates the information of the i-th transaction in this line loss allocation period, s i represents the seller node, b i represents the buyer node, p i Represents the transaction power, t i Indicates transaction time, sk i Indicates the hash digital string generated after signing with the private key;
[0015] Step 13: Evaluate the historical reputation and computing power of the participants based on the POS consensus mechanism; the specific evaluation method is as follows:
[0016]
[0017]
[0018] in, represents the comprehensive score of node k after the jth round of transactions, e leader Indicates whether the account holder is the account holder in this round of transactions and e leader ∈(0,1), e faultIndicates whether the transaction has uploaded error information and e fault ∈(-1,1), e fail Indicates whether the transaction in this round has failed to participate in the verification and e fail ∈(-1,1), The node computing power is divided into three levels: 0.8, 1 and 1.2;
[0019] Step 14: Sort the evaluations in step 13 and select the node with the highest score as the "accountant" node for this round of line loss allocation calculation; expressed as follows:
[0020]
[0021] Among them, Leader j+1 (k) indicates that in round j+1, node k will serve as the “bookkeeper” node; if the scores are equal, As a criterion, if If the two nodes are still equal, one of them is randomly selected as the "bookkeeper" node;
[0022] Step 15: The "accounting person" node reads the information in the temporary data pool, attaches its own signature, and packages it to broadcast to all nodes. All participants jointly verify the identity of the "accounting person" node, the identity of the data uploader, and the authenticity of the data; the signature is [T j ,a j-1 ,d j-1 ,sk leader ], T j represents the transaction set of line loss allocation in round j, a j-1 represents the set of reputation values updated in the previous round, d j-1 is the updated computing power value set, sk leader Sign the leader's private key;
[0023] Step 16: If one of the information fails to be verified, the data verification is considered to have failed. If the failure rate is less than 50%, the data verification is passed and is written into the block by the account holder. At the same time, the e of the node that determines that the data verification failed is fail = -1, and the rest of the nodes are recorded as 1; if the failure rate is greater than 50%, the data verification fails, and the signature of the failed information is fault Record as -1, and other nodes as 1, and re-execute steps 12 and 15 until the verification is successful;
[0024] Step 17: All participants synchronously update their blocks.
[0025] The step 2 specifically includes the following sub-steps:
[0026] Step 21: Calculate the line autocoupling loss caused by a single loss; based on the superposition theorem, all distributed power nodes and load nodes in the network are equivalent to current sources, and the injected current of each node is represented by a vector [I1, I2, …, I n ],in:
[0027]
[0028] in, represents the power flowing out of power supply k, represents the terminal voltage of power supply k;
[0029] Suppose any branch l in the network has its first and last nodes n and m respectively, and its impedance is z l =z nm =r nm +jx nm , where z l is the impedance of branch l, z nm is the impedance between nodes n and m, r nm is the resistance between nodes n and m, x nm is the reactance between nodes n and m; under the action of current source k, the voltage drops between nodes n and m and power supply k are U nk and U mk ,in:
[0030]
[0031]
[0032] Among them, Z nk is the impedance between nodes n and k, Z mk is the impedance between nodes m and k;
[0033] therefore:
[0034]
[0035]
[0036] in, is the voltage at node n, is the voltage of node m;
[0037] When the current source k acts alone, the self-coupling power flowing from node n to node m is:
[0038]
[0039] Substituting equation (6) and equation (7) into equation (10), we get:
[0040]
[0041] in, It represents the self-coupling power flowing from node n to node m when current source k acts alone; similarly, the self-coupling power flowing from node m to node n when current source k acts alone is obtained; superposition can be obtained:
[0042]
[0043] in, r nk 、x nk are the resistance and reactance between nodes n and k, respectively, r mk 、x mk are the resistance and reactance between nodes m and k respectively;
[0044] Step 22: Calculate the line mutual coupling loss of the two transactions; when the current source k and the current source f perform energy transactions at the same time and couple with each other, the loss of branch l is calculated in the following two aspects:
[0045] The first aspect:
[0046]
[0047]
[0048]
[0049] in, is the power contribution of f to the power flowing from node n to node m on branch l when two power sources act simultaneously; is the power contribution of f to the power flowing from node m to node n on branch l when two power sources act simultaneously; is the total contribution of source f to the mutual coupling loss in branch l;
[0050] The second aspect:
[0051]
[0052]
[0053]
[0054] in, is the power contribution of k to the power flowing from node n to node m when two power sources act simultaneously; is the power contribution of k to the power flowing from node m to node n when two power sources act simultaneously; is the total contribution of source k to the mutual coupling losses in branch l;
[0055] The mutual coupling loss of the two power supplies is obtained by summing equation (15) and equation (18):
[0056]
[0057] in:
[0058] B=(r nk -r mk )(r nf -r mf )+(x nk -x mk )(x nf -x mf );
[0059] C=(r nk -r mk )(x nf -x mf )-(r nk -r mk )(x nf -x mf );
[0060] I ks ,I fs are the real parts of the current injected by current source k and current source f, I kx ,I fx are the imaginary parts of the current injected by current source k and current source f respectively;
[0061] I ks is the real part of the current injected by the current source k, I kx is the imaginary part of the current injected by the current source k;
[0062] Step 23: Calculate the total network loss of all transactions; under the combined effect of all power sources, the power loss on branch l is:
[0063]
[0064] Where K represents the total number of distributed generation. represents the self-coupling power loss of branch l, represents the mutual coupling power loss;
[0065] Therefore, during the entire line loss allocation period, the total network loss of all transactions is:
[0066]
[0067] The step 3 specifically includes the following sub-steps:
[0068] Step 31: Allocate the line loss of the coupling part according to the Aumann-Shapley method of cooperative game; use the Aumann-Shapley value method to obtain the unit participation factor and
[0069]
[0070]
[0071] Step 32: Obtain the share of the power loss of the entire network by a single transaction; the share of the loss of the current source k on the branch l is:
[0072]
[0073] The line loss contribution of the current source k to the entire network is:
[0074]
[0075] The beneficial effects of the present invention are:
[0076] The present invention is based on cooperative game, with all operation processes open and transparent, all data traceable, and higher fairness and security. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 This is a flow chart of the line loss allocation method for distributed power sources connected to a distribution network based on blockchain technology and Aumann_Shapley of the present invention;
[0078] Figure 2 The present invention is a flow chart of network loss allocation calculation based on the Aumann-Shapley method;
[0079] Figure 3 This is the IEEE9 node system topology diagram of the distributed power source participating in the power transaction of the present invention. DETAILED DESCRIPTION
[0080] The present invention provides a line loss allocation method for connecting a distributed power source to a power distribution network. The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0081] To facilitate understanding of this embodiment, firstly, a line loss allocation strategy for distributed power sources connected to a distribution network based on blockchain technology and Aumann_Shapley method disclosed in an embodiment of the present invention is described in detail:
[0082] Figure 1A flow chart of a line loss allocation strategy for accessing a distributed power source to a distribution network based on blockchain technology and the Aumann_Shapley method provided in Example 1 of the present invention.
[0083] Reference Figure 1 , the line loss allocation strategy for distributed power sources connected to the distribution network based on blockchain technology and Aumann_Shapley method includes the following steps:
[0084] Step 1: Establish an improved Proof of Stake (POS) consensus mechanism to select representatives who write necessary information into the block, namely "bookkeepers", verify and confirm transaction data, and write correct data into the blockchain;
[0085] Step 2: The smart contract calculates the line autocoupling loss and mutual coupling loss caused by the power transaction;
[0086] Step 3: The smart contract calculates the expected line loss allocation value based on the Aumann_Shapley method of cooperative game;
[0087] Step 4: The smart contract automatically executes the transfer of funds for network loss sharing.
[0088] Among them, in the line loss allocation strategy of distributed power sources connected to the distribution network based on blockchain technology and Aumann_Shapley method, first, step 1 can be implemented by the following steps, including:
[0089] Step 11, the distributed power supply nodes and load nodes join the blockchain system as participants;
[0090] Step 12: upload the node credit value, node computing power value, and the seller node number, buyer node number, transaction power and transaction time of the node pair participating in the transaction within the network loss sharing time section in the temporary data pool;
[0091] Step 13: Based on the POS consensus mechanism, evaluate the historical reputation and computing power of the participants;
[0092] Step 14: Evaluate and rank, and determine the "accountant" for this round of network loss allocation calculation;
[0093] Step 15: The "account keeper" reads the information in the temporary data pool, packages and broadcasts it to all nodes. All participants jointly verify the identity of the "account keeper", the identity of the data uploader, and the authenticity of the data;
[0094] Step 16: If the verification is successful, the "bookkeeper" will write the information into a new block. If it fails, steps 12 and 15 will be executed again.
[0095] Step 17: All participants update this block synchronously.
[0096] Step 11 is implemented as follows: the node server obtains the node identification code and key pair, broadcasts the public key to the entire network, and the remaining node servers store the public key. The blockchain system is initialized, and this step does not need to be repeated each time the network loss allocation calculation process is completed.
[0097] Step 12 is implemented as follows: the node updates the reputation value in the temporary data pool Hashrate After the energy transaction is completed, the node server uploads the transaction information and signs the information with the private key:
[0098] T i =[s i ,b i ,p i ,t i ,sk i ] (26)
[0099] Where j represents the jth network loss allocation calculation, k represents the kth node participating in network loss allocation, T i Indicates the information of the ith transaction in this network loss sharing period, s i represents the seller node, b i represents the buyer node, p i Represents the transaction power, t i Indicates transaction time, sk i Represents the hash string generated after signing with a private key.
[0100] Step 13 is implemented as follows: a comprehensive score of historical reputation and computing power is used.
[0101]
[0102]
[0103] in, represents the comprehensive score of node k after the jth round of transactions, e leader Indicates whether the accountant is acting as the accountant in this round of transactions, e leader ∈(0,1), e fault Indicates whether the transaction in this round has uploaded error information. fault ∈(-1,1), e fail Indicates whether the transaction in this round has failed verification. fail ∈(-1,1), The node computing power is divided into three levels: 0.8, 1 and 1.2.
[0104] Step 14 is implemented as follows: by sorting the scores, the node with the highest score is selected as the accountant node for the current round of network loss sharing calculation.
[0105]
[0106] Among them, Leader j+1 (k) indicates that node k is the accountant in round j+1. If the scores are equal, As a criterion, if If the two numbers are still equal, one of them will be randomly selected as the bookkeeper.
[0107] Step 15 is implemented as follows: The "bookkeeper" reads the information in the temporary data pool and attaches his own signature: j ,a j-1 ,d j-1 ,sk leader ] and broadcast the information on the network.
[0108] Among them, T j represents the transaction set for network loss allocation in round j, a j-1 represents the set of reputation values updated in the previous round, d j-1 is the updated computing power value set, sk leader Sign the leader's private key.
[0109] Step 16 is implemented as follows: the other participants use the public key to jointly verify the identity of the "bookkeeper", the identity of the data uploader, and the authenticity of the data. If one of the information fails to be verified, it is considered that the data verification has failed. If the failure rate is greater than 50%, the data will be uploaded again and the signature of the failed information will be sent to the e fault = is recorded as -1, and the rest of the nodes are recorded as 1. If the failure rate is less than 50%, the data passes the verification and is written into the block by the accountant. At the same time, the e of the node that determines that the data verification fails is fail The node with the highest reputation is recorded as -1, and the other nodes are recorded as 1. The reputation score can increase the node loyalty and the responsibility for information judgment.
[0110] Step 17 is for all participants to synchronously update this block.
[0111] Figure 2 The network loss allocation calculation flow chart based on the Aumann-Shapley method provided in the first embodiment of the present invention. The above-mentioned line loss allocation strategy for distributed power sources connected to the distribution network based on blockchain technology and the Aumann-Shapley method, step 2 can be implemented by the following steps, including:
[0112] Step 21, calculating the line autocoupling loss caused by a single loss;
[0113] Step 22, calculating the line mutual coupling loss of the two transactions;
[0114] Step 23, calculate the total network loss of all transactions;
[0115] Specifically, step 21 is implemented as follows. Based on the superposition theorem, all distributed power sources and load nodes in the network are equivalent to current sources. The injection current of each node is known and represented by a vector: [I1, I2, …, I n ],in:
[0116]
[0117] in, represents the power flowing out of power supply k, Represents the terminal voltage of power supply k.
[0118] Suppose any branch l in the network has its first and last nodes n and m respectively, and its impedance is z l =z nm =r nm +jx nm , where z l is the impedance of branch l, z nm is the impedance between nodes n and m, r nm is the resistance between nodes n and m, x nm is the reactance between nodes n and m. According to the superposition theorem of linear circuits, the voltage at each node is the sum of the voltages of the current sources. Under the action of current source k, according to the node voltage equation, the voltage drops between nodes n and m and power source k are U nk and U mk ,in:
[0119]
[0120]
[0121] Among them, Z nk is the impedance between nodes n and k, Z mk is the impedance between nodes m and k.
[0122] therefore:
[0123]
[0124]
[0125] in, is the voltage at node n, is the voltage at node m.
[0126] When the current source k acts alone, the self-coupling power flowing from node n to node m is:
[0127]
[0128] Substituting equation (6) and (7) into equation (6) yields:
[0129]
[0130] in, It represents the self-coupled power flowing from node n to node m when current source k acts alone.
[0131] Similarly, the self-coupling power flowing from node m to node n when current source k acts alone is obtained.
[0132] Superposition gives:
[0133]
[0134] in, r nk 、x nk are the resistance and reactance between nodes n and k, respectively, r mk 、x mk are the resistance and reactance between nodes m and k respectively.
[0135] Step 22 is implemented in the following manner: when the current source k and the current source f perform electric energy trading at the same time and are coupled with each other, the calculation of the loss of the branch l includes the following two aspects.
[0136] One aspect:
[0137]
[0138]
[0139]
[0140] in, It is the power contribution of f to the power flowing from node n to node m on branch l when two power sources act simultaneously. It is the power contribution of f to the power flowing from node m to node n on branch l when two power sources act simultaneously. It is the total contribution of power supply f to the mutual coupling loss in branch l.
[0141] Another aspect:
[0142]
[0143]
[0144]
[0145] in, It is the power contribution of k to the power flowing from node n to node m when two power sources act simultaneously. It is the power contribution of k to the power flowing from node m to node n when two power sources act simultaneously. is the total contribution of power supply k to the mutual coupling loss in branch l.
[0146] The sum of the mutual coupling losses of the two power supplies is:
[0147]
[0148] in:
[0149] B=(r nk -r mk )(r nf -r mf )+(x nk -x mk )(x nf -x mf );
[0150] C=(r nk -r mk )(x nf -x mf )-(r nk -r mk )(x nf -x mf );
[0151] I ks ,I fs are the real parts of the current injected by current source k and current source f, I kx ,I fx are the imaginary parts of the current injected by current source k and current source f respectively.
[0152] Step 23 is implemented as follows: Under the combined action of all power sources, the power loss on branch 1 is:
[0153]
[0154] Where K represents the total number of distributed generation sources, the first half of equation (20) represents the self-coupling power loss of branch l, and the second half represents the mutual coupling power loss.
[0155] Therefore, during the entire network loss sharing period, the total network loss of all transactions is:
[0156]
[0157] The above implementation takes into account the multi-scenario maximum energy supply capacity model of the electrical and thermal interconnected system of energy storage components and wind turbines. Step 3 can be implemented by the following steps, including:
[0158] Step 31, allocating the line loss of the coupling part according to the Aumann_Shapley method of cooperative game;
[0159] Step 32, obtaining the amount of power loss of the entire network that is shared by a single transaction;
[0160] Step 31 is implemented as follows: Using the Aumann-Shapley value method to obtain the unit participation factor and
[0161]
[0162] Similarly:
[0163]
[0164] Step 32 is implemented as follows: the loss sharing amount of the current source k to the branch l is:
[0165]
[0166] The network loss contribution of current source k to the entire network is:
[0167]
[0168] Step 4: The smart contract automatically executes the transfer of funds for network loss sharing.
[0169] Among them, in the line loss sharing strategy of distributed power sources connected to the distribution network based on blockchain technology and Aumann_Shapley method, first, step 4 is to calculate the specific sharing amount of each participant according to the network loss sharing amount, network loss sharing pricing, and relevant policies, and transfer funds to the participant's wallet.
[0170] The above steps 2, 3 and 4 can all be written into the smart contract platform in the form of code for automatic execution.
[0171] For example, the feasibility and effectiveness of the proposed model are verified based on the improved IEEE 6-bus power system. The topology diagram is shown in the attached figure. Figure 3 As shown. Using MATLAB R2016a simulation, simulation analysis is performed for the following three scenarios:
[0172] (1) Detection of the correctness of network loss allocation based on blockchain technology and Aumann-Shapley method (compared with other network loss allocation methods under real data);
[0173] (2) Security detection of network loss allocation based on blockchain technology and Aumann-Shapley method (computational simulation comparison after malicious tampering of data at a certain node)
[0174] (3) The comprehensive score ranking of multiple rounds of shared calculations (computation simulation after malicious data tampering at a certain node);
[0175] The improved IEEE 6-bus power system consists of three distributed power sources and three loads. Bilateral agreements are signed between all loads and power sources. The system parameters are shown in Table 1.
[0176] Table 1 Six-node system parameters
[0177]
[0178]
[0179] Assume that there are three bilateral transactions in the system at time T, and the transaction status is shown in Table 2.
[0180] Table 2 Bilateral transactions
[0181] trade power supply load Trading Volume <![CDATA[T1]]> <![CDATA[G1]]> <![CDATA[L5]]> 60 <![CDATA[T2]]> <![CDATA[G2]]> <![CDATA[L6]]> 60 <![CDATA[T3]]> <![CDATA[G3]]> <![CDATA[L4]]> 60
[0182] (1) Network loss allocation based on blockchain technology and Aumann-Shapley method:
[0183] The network loss allocation is calculated based on blockchain technology, Aumann-Shapley method and non-cooperative game network loss increment method, and cooperative game Z-Bus allocation method, as shown in Table 3.
[0184] Table 3 Comparison of network loss allocation
[0185]
[0186] As can be seen from Table 3, in the allocation results of the latter two methods, transaction T3, which has the same transaction volume as transactions T1 and T2, is allocated to the largest transmission loss. This is because the power supply and load are not considered as a transaction as a whole, and the influence of cross-current is not considered. The system's transmission loss is allocated to all nodes in the system based on the system current. The blockchain technology and Aumann-Shapley method are used to consider the two parties of the transaction as a whole while considering the influence of system current and cross-current, and reflect it in the allocation results. Therefore, although the positions of the two nodes of transaction T3 in the system are not good (this can also be seen from the allocation results of the Z-Bus allocation method), the existence of the entire transaction T3 as a whole brings a large reverse current to the system, making the system's operating point flow in the direction of reducing transmission losses, so less network losses are allocated.
[0187] (2) Network loss allocation security detection based on blockchain technology and Aumann-Shapley method:
[0188] Assuming that after the transaction, there are some errors in the data reported by the participants, the information uploaded by G3 to the network loss sharing calculation link is modified from the transaction volume of 60MW to 55MW. The results calculated based on the blockchain smart contract are shown in Table 4.
[0189] Table 4 Network loss allocation results for period T
[0190]
[0191] In Table 4, the verification result 1 indicates that the information is passed, 0 indicates that the information is not passed, the error reason 0 indicates that there is no error, 1 indicates that the correct participant uploaded the wrong information, and -1 indicates that the non-system correct participant uploaded the information. This round of prompts requires re-uploading of information for calculation.
[0192] (3) Comprehensive score ranking after multiple rounds of apportionment calculation:
[0193] Assuming that the system performs three network loss allocation calculations, the above error occurs in the second calculation, and an error occurs in the third round of G1 verification, the initial scores of system participants and the changes in the accountants and scoring scores during the calculation process are shown in Table 5.
[0194] Table 5 Changes in accountants and rating scores
[0195]
[0196] The line loss allocation strategy for distributed power sources connected to the distribution network based on blockchain technology and Aumann_Shapley method provided in the embodiment of the present invention takes into account the fairness and security of network loss allocation. Under the support of the blockchain technology framework, a cooperative game method is used to allocate the network loss, and finally a network loss allocation plan after the distributed power sources are connected to the distribution network is obtained, thereby achieving fair, safe, efficient and transparent distributed power network loss allocation.
[0197] This embodiment is only a preferred specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for allocating line losses when a distributed power source is connected to a distribution network, characterized in that: The following steps are involved: Step 1: The "bookkeeper" node that writes data is selected through the blockchain's POS consensus mechanism, the transaction data is verified and confirmed, and the correct data is written into the blockchain; The step 1 specifically includes the following sub-steps: Step 11: Select distributed power nodes and load nodes as participants to join the blockchain; Step 12: Upload the node's reputation value in the temporary data pool and computing power And the nodes within the time section of this line loss sharing are the seller nodes participating in the transaction s i Buyer node b i 、Transaction volume p i and transaction time t i , and use the private key to sign the message as follows: T i =[with i ,b i ,p i ,t i ,sk i ] (1) Where j represents the jth line loss allocation calculation, k represents the kth node participating in line loss allocation, T i Indicates the information of the i-th transaction in this line loss allocation period, s i represents the seller node, b i represents the buyer node, p i Indicates the transaction power, t i Indicates transaction time, sk i Indicates the hash string generated after signing with the private key; Step 13: Evaluate the historical reputation and computing power of the participants based on the POS consensus mechanism; the specific evaluation method is as follows: in, represents the comprehensive score of node k after the jth round of transactions, e leader Indicates whether the current round of transactions is performed by the account holder and e leader ∈(0,1),e fault Indicates whether the transaction in this round has uploaded error information and e fault ∈(-1,1),e fail Indicates whether this round of transactions has failed to participate in verification and e fail ∈(-1,1), Divide node computing power into three levels: 0.8, 1, and 1.2; Step 14: Sort the evaluations from step 13 and select the node with the highest score as the "bookkeeper" node for this round of line loss allocation calculation; this is expressed as follows: Among them, Leader j+1 (k) indicates that in round j+1, node k will serve as the "bookkeeper" node; if the scores are equal, As a criterion, if If the two nodes are still equal, one of them will be randomly selected as the "bookkeeper" node; Step 15: The "bookkeeper" node reads the information in the temporary data pool, attaches its own signature, packages it and broadcasts it to all nodes. All participants jointly verify the identity of the "bookkeeper" node, the identity of the data uploader and the authenticity of the data; the signature is [T j ,a j-1 ,d j-1 ,sk leader ], T j represents the transaction set of line loss allocation in round j, a j-1 Represents the set of reputation values updated in the previous round, d j-1 is the updated computing power value set, sk leader Sign the leader's private key; Step 16: If one of the information fails to be verified, the data verification is considered to have failed. If the failure rate is less than 50%, the data verification is passed and the account holder writes it into the block. At the same time, the e of the node that determines that the data verification failed is fail Recorded as -1, and the rest of the nodes are recorded as 1; if the failure rate is greater than 50%, the data verification fails, and the signature of the failed information is e fault Record it as -1, and the rest of the nodes as 1. Repeat steps 12 and 15 until the verification is successful. Step 17: All participants synchronously update their blocks; Step 2: The smart contract calculates the line autocoupling loss and mutual coupling loss caused by the power transaction; Step 3: The smart contract calculates the expected line loss allocation value based on the Aumann-Shapley method of cooperative game; Step 4: Store the calculation model of line loss allocation after the distributed power generation is connected to the distribution network in the smart contract, and automatically execute the fund allocation for line loss allocation.
2. The line loss allocation method for distributed power supply access to the distribution network according to claim 1, characterized in that: The step 2 specifically includes the following sub-steps: Step 21: Calculate the line autocoupling loss caused by a single loss; based on the superposition theorem, all distributed power nodes and load nodes in the network are equivalent to current sources, and the injected current of each node is represented by a vector [I1, I2, …, I n ],in: in, represents the power flowing out of the power supply k, represents the terminal voltage of power supply k; Assume that any branch l in the network has its first and last nodes n and m respectively, and its impedance is z l =z nm =r nm +jx nm , where z l is the impedance of branch l, z nm is the impedance between nodes n and m, r nm is the resistance between nodes n and m, x nm is the reactance between nodes n and m; under the action of current source k, the voltage drops between nodes n and m and power supply k are U nk and U mk ,in: Among them, Z nk is the impedance between nodes n and k, Z mk is the impedance between nodes m and k; therefore: in, is the voltage at node n, is the voltage at node m; When the current source k acts alone, the self-coupled power flowing from node n to node m is: Substituting equations (6) and (7) into equation (10), we get: in, represents the self-coupling power flowing from node n to node m when current source k acts alone; similarly, the self-coupling power flowing from node m to node n when current source k acts alone is obtained; superposition yields: in, r nk 、x nk are the resistance and reactance between nodes n and k, respectively, r mk 、x mk are the resistance and reactance between nodes m and k respectively; Step 22: Calculate the mutual coupling loss of the two transactions. When current sources k and f are simultaneously trading energy and coupling with each other, calculating the loss of branch l involves the following two aspects: The first aspect: in, is the power contribution of f to the power flowing from node n to node m on branch l when two power sources act simultaneously; is the contribution of f to the power flowing from node m to node n on branch l when two power sources act simultaneously; is the total contribution of the power supply f to the mutual coupling loss in branch l; The second aspect: in, is the power contribution of k to the power flowing from node n to node m when two power sources act simultaneously; is the power contribution of k to the power flowing from node m to node n when two power sources act simultaneously; is the total contribution of power supply k to the mutual coupling loss in branch l; The sum of equations (15) and (18) gives the mutual coupling loss of the two power supplies: in: B=(r nk -r mk )(r nf -r mf )+(x nk -x mk )(x nf -x mf ); C=(r nk -r mk )(x nf -x mf )-(r nk -r mk )(x nf -x mf ); I ks , I fs are the real parts of the current injected by current source k and current source f, I kx , I fx are the imaginary parts of the currents injected by current sources k and f respectively; I ks is the real part of the current injected by the current source k, I kx is the imaginary part of the current injected by the current source k; Step 23: Calculate the total network loss due to all transactions. Under the combined effect of all power sources, the power loss on branch l is: Where K represents the total number of distributed power sources, represents the self-coupling power loss of branch l, represents the mutual coupling power loss; Therefore, during the entire line loss allocation period, the total network loss caused by all transactions is:
3. The line loss allocation method for accessing a distributed power source to a distribution network according to claim 1, characterized in that: The step 3 specifically includes the following sub-steps: Step 31: Allocate the line loss of the coupled part according to the Aumann-Shapley method of cooperative game; use the Aumann-Shapley value method to calculate the unit participation factor and Step 32: Calculate the contribution of a single transaction to the power loss of the entire network; the contribution of current source k to the loss of branch l is: The line loss contribution of current source k to the entire network is:
