Decentralized microgrid energy transaction method based on two-way auction mechanism
By adopting a decentralized energy trading method based on a two-way auction mechanism in the microgrid, the problem of difficult to adapt to the energy demand in the microgrid is solved, efficient allocation of local energy and energy use balance, and the interests between production and consumers are protected.
Patent Information
- Application Number
- CN202411516289.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-03-18
AI Technical Summary
The existing centralized microgrid management methods are difficult to adapt to the large-scale and diverse energy demands in the microgrid. In addition, there are too many orders and decentralization of energy transactions between consumers, and lack of a suitable trading platform, resulting in the transaction process being unable to be completed directly.
The decentralized microgrid energy trading method based on the two-way auction mechanism is adopted to establish a local energy trading model, and the bidding and load scheduling tasks of P2P energy transactions are automatically completed through the home energy management system. The decentralized electricity trading is used to protect the interests of both parties.
It realizes efficient allocation of local energy, effectively balances the energy consumption needs of the microgrid, provides a decentralized energy trading platform, protects the interests of manufacturers and consumers, and promotes the stable operation of the microgrid.
Smart Images

Figure CN119648352A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power systems, and in particular relates to a decentralized microgrid energy trading method based on a double auction mechanism. Background Art
[0002] As fossil energy is increasingly depleted around the world, the development of renewable energy technology is receiving widespread attention. However, due to the uncertainty of renewable energy generation, its large-scale access to the power grid will have an adverse impact on the stability of the power grid, resulting in the fact that large-scale renewable energy generation has not yet been fully applied. With the promotion and popularization of microgrid technology, distributed renewable energy generation has been widely used. Through the dispatch of microgrids, the local consumption of distributed renewable energy generation can be promoted, which can effectively avoid the uncertainty of new energy generation and reduce the impact on the stability of the power grid. The existing centralized microgrid management method is difficult to adapt to the large-scale and diverse energy needs within the microgrid, which has become a constraint. Key factors in the construction of microgrids; as distributed power generation producers and consumers can conduct electricity market transactions, a large number of electricity transactions will appear in microgrids. However, energy transactions between producers and consumers have characteristics such as too many orders and decentralization. There is a lack of a suitable energy trading platform between the two parties, and the transaction process cannot be completed directly; therefore, a microgrid electricity trading method is urgently needed to complete the efficient allocation of power resources, which is the focus of microgrid reform; therefore, it is very necessary to provide a decentralized microgrid energy trading method based on a two-way auction mechanism to establish a local energy trading model, effectively balance its energy demand, adopt a decentralized electricity trading method, and protect the interests of both parties. Summary of the invention
[0003] 1. Technical issues
[0004] In view of the above-mentioned existing technical status, this application mainly addresses the following technical problems:
[0005] 1. The existing centralized microgrid management method is difficult to adapt to the large-scale and diverse energy needs within the microgrid;
[0006] 2. However, energy transactions between producers and consumers have characteristics such as too many orders and decentralization. There is a lack of a suitable energy trading platform between the two parties, and the transaction process cannot be completed directly.
[0007] (II) Technical solution
[0008] The purpose of the present invention is to overcome the shortcomings of the prior art and to provide a decentralized microgrid energy trading method based on a two-way auction mechanism to establish a local energy trading model, effectively balance its energy demand, adopt a decentralized electricity trading method, and protect the interests of both parties.
[0009] The object of the present invention is achieved by: a decentralized microgrid energy trading method based on a double auction mechanism, the method comprising the following steps:
[0010] Step 1: Establish a local energy trading model to automatically complete the bidding and load scheduling tasks of P2P energy trading;
[0011] Step 2: Establish a decentralized electricity trading method, use tokens for transactions, and realize the information exchange of electricity ownership.
[0012] Furthermore, the local energy trading model constructed in step 1 includes: residential users and microgrid managers; wherein the microgrid manager maintains a P2P energy trading market; each residential user is equipped with a home energy management system, and each residential user is divided into buyers and sellers according to the power shortage and power surplus conditions. Both parties can quote in the P2P trading market, and the market adopts a two-way auction market method to clear quotations, thereby prompting users to reach transactions. Users who fail in the auction will trade with the power grid to balance their energy needs.
[0013] Furthermore, the specific steps of the double auction market are as follows:
[0014] a) Sort the seller's bids in ascending order according to the unit price they expect to sell: Buyer bids are sorted in descending order according to the unit price they expect to buy:
[0015] b) According to the sorted bids, if the buyer's expected buying price is greater than the seller's expected selling price, the two parties reach a deal and the transaction price is satisfy:
[0016] c) After the transaction is concluded, the transaction quantity of both parties is determined In the formula, at time t, the bid of the user participating in the auction is in is the expected transaction price; is the expected transaction quantity; when , it means that the user wants to buy, that is, as a buyer; the buyer's bid is re-marked as in is the expected buying price; is the quantity of goods purchased by the buyer; , it means that the user wants to sell, that is, as a seller; the seller's bid is re-marked as in The expected selling price; The quantity of goods to be sold;
[0017] d) After the transaction is concluded, if the buyer's purchase demand is not met or the seller has goods to sell, a new bid is made and inserted into the bid to be cleared, and steps a) to d) are repeated until no new transaction can be concluded.
[0018] Furthermore, the double auction market is to apply the multi-agent reinforcement learning method, and it is necessary to describe the P2P local energy trading problem settled by the double auction mechanism into the form of a partially observable Markov game POMG; the specific steps of the partially observable Markov game are as follows:
[0019] 1) Observation: At time t, the state that the agent can observe is: In the formula, is the state of charge of the energy storage device of house i; P t tot,i is the total load of house i; They are the price at which users buy electricity from the grid, the price at which users sell electricity to the grid, and the average clearing price of the P2P local energy trading market at the previous moment;
[0020] 2) Action: At time t, agent i selects an action based on the observed value: In the formula, The expected transaction price parameter for P2P market pricing is is the expected transaction quantity; is the energy storage charging and discharging parameter of the residence, that is, the energy storage charging and discharging power for: In the formula, p ess,i is the rated power of the energy storage; is the energy storage charging and discharging parameters of house i;
[0021] 3) State transfer function: At time t, the state of the residential microgrid is mainly related to the energy storage system in the house. The state transfer equation of the energy storage system is: In the formula, is the state of charge of the energy storage device of house i; η ch,i , η dis,i are the energy storage charging and discharging efficiency of house i respectively; is the maximum energy storage capacity of house i; Δt is the time change;
[0022] 4) Reward function: The reward value obtained by agent i is calculated by its reward function. Consider the actual energy consumption cost of the residence as the reward function, that is: In the formula, Profits from P2P local energy trading; To generate revenue from trading with the power grid.
[0023] Furthermore, in step 4), when the P2P transaction contract is reached, the residential users of both parties to the transaction will dispatch local energy, and after the dispatch is completed, the P2P transaction contract will be settled according to the actual transaction volume, that is: In the formula, is the actual transaction power between the two parties; ε is the penalty ratio; is the tradable electricity for residential i; is the tradable electricity for residential j; Satisfaction relationship Indicates that the current user is a seller; otherwise, Indicates that the current user is the buyer; the revenue of the transaction between house i and the power grid is: In the formula, is the power of house i interacting with the grid; [·] - ,[·] + They represent the operation symbols min{·,0} and max{·,0} respectively.
[0024] Furthermore, the decentralized power trading method in step 2 is as follows: assuming that A is a consumer purchasing power, B is a producer and consumer selling power, and C is a blockchain system administrator, the specific steps are as follows:
[0025] First, energy prediction is performed: To protect privacy, A and B use the corresponding public and private keys to create a pair of new addresses: TAddr and MAddr; at the beginning of the auction, C predicts that B can sell electricity E, which is equal to the predicted production minus the predicted consumption; C generates two unique keys b corresponding to B's energy E. α and b β And record it in the database, C uses MAddrC to send b to B's address MAddrB α and b β Message, B uses MAddrB to broadcast the auction information to the entire network. The broadcast function is: BROADCAST(E,P,TAddrB,MAddrB), which includes the saleable energy E, the reserved price P, the transaction address TAddrB and the anonymous message stream address MAddrB;
[0026] Secondly, transaction matching is performed: A participates in the bidding for B's electric energy according to his own needs, then A sends a message to C through the address MAddrA to enable B to verify the ownership certificate of energy E. C verifies the database record and replies whether the result is true or false;
[0027] Next, a multi-signature transaction is performed: After the power auction is completed, C will broadcast the auction results to the entire network;
[0028] Finally, the ownership key is changed: B will use MAddrB to send the power ownership proof key bα With pubKeyPPB to A's anonymous message address MAddrA, A sends a request H(b) to C to change the ownership key. α ,pubKeyPPB,unlock,update), C receives the information and verifies b α , unlock the electric energy and generate a new pair of keys α α and α β Replace b accordingly α and b β .
[0029] (III) Beneficial effects
[0030] 1. The residential microgrid model considered in the present invention includes residential users and microgrid managers;
[0031] 2. The P2P energy trading market is maintained by the microgrid manager; each residential user is equipped with a home energy management system (HEMS), which is responsible for automatically completing the bidding and load scheduling tasks of P2P energy trading;
[0032] 3. Residential users are divided into buyers and sellers according to the power shortage and power surplus. Both parties can make bids in the P2P trading market. The market uses a two-way auction method to clear bids and encourage users to reach a deal. Users who fail in the auction will trade with the power grid to balance their energy needs.
[0033] 4. The present invention utilizes blockchain technology to complete decentralized electricity transactions, thus protecting the interests of both parties. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 Schematic diagram of the double auction mechanism of the present invention.
[0035] Figure 2 It is a flow chart of the double auction mechanism of the present invention.
[0036] Figure 3 It is the overall flow chart of the present invention. DETAILED DESCRIPTION
[0037] At present, there is an urgent need to design a microgrid electricity trading method to complete the efficient allocation of power resources, which is the focus of microgrid reform. In order to ensure the safe and effective operation of microgrids, blockchain technology can be applied to microgrid transactions; the present invention proposes a decentralized microgrid energy transaction based on a two-way auction mechanism, which uses tokens for transactions, realizes the information exchange of electricity ownership, protects the data privacy of both parties to the transaction, and safeguards the interests of both parties to the transaction.
[0038] The present invention is further described below in conjunction with embodiments and / or drawings.
[0039] Example 1
[0040] like Figure 1-3 As shown, a decentralized microgrid energy trading method based on a double auction mechanism comprises the following steps:
[0041] Step 1: Establish a local energy trading model to automatically complete the bidding and load scheduling tasks of P2P energy trading;
[0042] In the present invention, the local energy trading model constructed is: Figure 1 As shown in the figure, it includes residential users and microgrid managers; the P2P energy trading market is maintained by the microgrid manager; each residential user is equipped with a home energy management system (HEMS), which is responsible for automatically completing the bidding and load scheduling tasks of P2P energy trading; each residential user is divided into buyers and sellers according to the power shortage and power surplus situation, and both parties can quote in the P2P trading market. The market adopts a two-way auction method to clear the quotes and encourage users to reach a transaction. Users who fail in the auction will trade with the power grid to balance their energy demand.
[0043] The above-mentioned double auction market (DA Market) usually includes multiple buyers and sellers, and both parties can bid freely in the market. The steps of the double auction are as follows:
[0044] a) Sort the seller's bids in ascending order according to the unit price they expect to sell: Buyer bids are sorted in descending order according to the unit price they expect to buy:
[0045] b) According to the sorted bids, if the buyer's expected buying price is greater than the seller's expected selling price, the two parties reach a deal and the transaction price is satisfy: The present invention adopts the average unit price method, that is:
[0046] c) After the transaction is concluded, the transaction quantity of both parties is determined In the formula, at time t, the bid of the user participating in the auction is in is the expected transaction price; is the expected transaction quantity; when , it means that the user wants to buy, that is, as a buyer; the buyer's bid is re-marked as in is the expected buying price; is the quantity of goods purchased by the buyer; , it means that the user wants to sell, that is, as a seller; the seller's bid is re-marked as in The expected selling price; The quantity of goods to be sold;
[0047] d) After the transaction is concluded, if the buyer's purchase demand is not met or the seller has goods to sell, a new bid is made and inserted into the bid to be cleared, and steps a) to d) are repeated until no new transaction can be concluded.
[0048] In addition, in order to apply the multi-agent reinforcement learning method, it is necessary to describe the P2P local energy trading problem settled by the double auction mechanism as a partially observable Markov game (POMG). The partially observable Markov game is: POMG can be represented by a tuple, that is, {n,S,A1,...,A n ,O1,...,O n ,P,r1,...,r n}, where n is the number of agents; S is the state set of the environment in which all agents are located; A1,...,A n are the action sets of each agent; O1,...,O n are the states that each agent can observe; P is the state transition function; r1,...,r n is the reward function of each agent; specifically, agent i observes the environment state in a distributed manner and obtains the private observation value related to state S According to the observed value, according to the random strategy Select Action Distributed Execution After that, the environment state is transferred to a new state according to the state transfer function P; after that, the agent i can obtain the reward value r associated with it. t i ; The optimization goal of each agent is to maximize its own cumulative reward value Where γ is the discount coefficient; T is the end time; the specific steps are as follows:
[0049] 1) Observation: At time t, the state that the agent can observe is: In the formula, is the state of charge of the energy storage device of house i; P t tot,i is the total load of house i; are the prices at which users buy electricity from the grid, such as the feed-in tariff (FiT), the prices at which users sell electricity to the grid, such as the time-of-use price (ToU), and the average clearing price of the P2P local energy trading market at the previous moment; is defined as follows:
[0050] 2) Action: At time t, agent i selects an action based on the observed value: In the formula, The expected transaction price parameter for P2P market pricing is is the expected transaction quantity; is the energy storage charging and discharging parameter of the residence, that is, the energy storage charging and discharging power for: In the formula, p ess,i is the rated power of the energy storage; is the energy storage charging and discharging parameters of house i;
[0051] 3) State transfer function: At time t, the state of the residential microgrid is mainly related to the energy storage system in the house. The state transfer equation of the energy storage system considered in the present invention is: In the formula, is the state of charge of the energy storage device of house i; η ch,i , η dis,i are the energy storage charging and discharging efficiency of house i respectively; is the maximum energy storage capacity of house i; Δt is the time change;
[0052] 4) Reward function: The reward value obtained by agent i is calculated by its reward function. Consider the actual energy consumption cost of the residence as the reward function, that is: In the formula, Profits from P2P local energy trading; To trade with the power grid; when the P2P transaction contract is reached, the residential users of both parties will dispatch local energy. After the dispatch is completed, the P2P transaction contract will be settled according to the actual transaction volume, that is: In the formula, is the actual transaction power between the two parties; ε is the penalty ratio, which is 5%; is the tradable electricity for residential i; is the tradable electricity for residential j; Satisfaction relationship Indicates that the current user is a seller; otherwise, Indicates that the current user is a buyer;
[0053] The income of house i from trading with the grid is: In the formula, is the power of house i interacting with the grid; [·] - ,[·] + They represent the operation symbols min{·,0} and max{·,0} respectively.
[0054] Step 2: Establish a decentralized electricity trading method, use tokens for transactions, and realize the information exchange of electricity ownership.
[0055] The present invention is a decentralized microgrid energy trading method based on a two-way auction mechanism. In use, the residential microgrid model considered by the present invention includes residential users and microgrid managers; the P2P energy trading market is maintained by the microgrid manager; each residential user is installed with a home energy management system (HEMS), which is responsible for automatically completing the bidding and load scheduling tasks of P2P energy trading; each residential user is divided into buyers and sellers according to the power shortage and power surplus situation, and both parties can quote in the P2P trading market. The market adopts a two-way auction method to clear the quotes and encourage users to reach a transaction. Users who fail in the auction will trade with the power grid to balance their energy demand; blockchain technology is used to complete decentralized electricity trading and protect the interests of both parties; the present invention has the advantages of establishing a local energy trading model, effectively balancing its energy demand, adopting a decentralized electricity trading method, and protecting the interests of both parties.
[0056] Example 2
[0057] like Figure 1-3 As shown, a decentralized microgrid energy trading method based on a double auction mechanism comprises the following steps:
[0058] Step 1: Establish a local energy trading model to automatically complete the bidding and load scheduling tasks of P2P energy trading;
[0059] Step 2: Establish a decentralized electricity trading method, use tokens for transactions, and realize the information exchange of electricity ownership.
[0060] In the present invention, the decentralized electric energy trading method is as follows: assuming that A is a consumer purchasing electric energy, B is a prosumer selling electric energy, and C is a blockchain system administrator;
[0061] First, energy prediction is performed: To protect privacy, A and B use the corresponding public and private keys to create a pair of new addresses: TAddr (for executing transactions) and MAddr (for sending messages);
[0062] At the beginning of the auction, C predicts that B can sell electricity E, which is equal to the predicted production minus the predicted consumption. C generates two unique keys b corresponding to B's energy E. α and b β And record it in the database, C uses MAddrC to send b to B's address MAddrB α and b β Message, B uses MAddrB to broadcast the auction information to the entire network. The broadcast function is: BROADCAST(E,P,TAddrB,MAddrB), which includes the saleable energy E, the reserved price P, the transaction address TAddrB and the anonymous message stream address MAddrB;
[0063] Secondly, transaction matching is performed: A participates in the bidding for B's electric energy according to his own needs, then A sends a message to C through the address MAddrA to enable B to verify the ownership certificate of energy E. C verifies the database record and replies whether the result is true or false;
[0064] Next, a multi-signature transaction is performed: After the power auction is completed, C will broadcast the auction results to the entire network;
[0065] Finally, the ownership key is changed: B will use MAddrB to send the power ownership proof key b α With pubKeyPPB to A's anonymous message address MAddrA, A sends a request H(b) to C to change the ownership key. α ,pubKeyPPB,unlock,update), C receives the information and verifies b α , unlock the electric energy and generate a new pair of keys α α and α β Replace b accordingly α and b β .
[0066] The present invention is a decentralized microgrid energy trading method based on a two-way auction mechanism. In use, the residential microgrid model considered by the present invention includes residential users and microgrid managers; the P2P energy trading market is maintained by the microgrid manager; each residential user is installed with a home energy management system (HEMS), which is responsible for automatically completing the bidding and load scheduling tasks of P2P energy trading; each residential user is divided into buyers and sellers according to the power shortage and power surplus situation, and both parties can quote in the P2P trading market. The market adopts a two-way auction method to clear the quotes and encourage users to reach a transaction. Users who fail in the auction will trade with the power grid to balance their energy demand; blockchain technology is used to complete decentralized electricity trading and protect the interests of both parties; the present invention has the advantages of establishing a local energy trading model, effectively balancing its energy demand, adopting a decentralized electricity trading method, and protecting the interests of both parties.
Claims
1. A decentralized microgrid energy trading method based on a double auction mechanism, characterized by: The method comprises the following steps: Step 1: Establish a local energy trading model to automatically complete the bidding and load scheduling tasks of P2P energy trading; Step 2: Establish a decentralized electricity trading method, use tokens for transactions, and realize the information exchange of electricity ownership.
2. A decentralized microgrid energy trading method based on a double auction mechanism as claimed in claim 1, characterized in that: The local energy trading model constructed in step 1 includes: residential users and microgrid managers; the microgrid manager maintains a P2P energy trading market; each residential user is equipped with a home energy management system, and each residential user is divided into buyers and sellers according to the power shortage and power surplus. Both parties can quote in the P2P trading market, and the market adopts a two-way auction market method to clear quotations and encourage users to reach transactions. Users who fail in the auction will trade with the power grid to balance their energy needs.
3. A decentralized microgrid energy trading method based on a double auction mechanism as claimed in claim 2, characterized in that: The specific steps of the double auction market are as follows: a) Sort the seller's bids in ascending order according to the unit price they expect to sell: Buyer bids are sorted in descending order according to the unit price they expect to buy: b) According to the sorted bids, if the buyer's expected buying price is greater than the seller's expected selling price, the two parties will reach a deal and the transaction price satisfy: c) After the transaction is concluded, the transaction quantity of both parties is determined In the formula, at time t, the bid of the user participating in the auction is in is the expected transaction price; is the expected transaction quantity; when , it means that the user wants to buy, that is, as a buyer; the buyer's bid is re-marked as in is the expected buying price; is the quantity of goods purchased by the buyer; , it means that the user wants to sell, that is, as a seller; the seller's bid is re-marked as in The expected selling price; The quantity of goods to be sold; d) After the transaction is concluded, if the buyer's purchase demand is not met or the seller has goods to sell, a new bid is made and inserted into the bid to be cleared, and steps a) to d) are repeated until no new transaction can be concluded.
4. A decentralized microgrid energy trading method based on a double auction mechanism as claimed in claim 3, characterized in that: The double auction market is an application of multi-agent reinforcement learning methods. It is necessary to describe the P2P local energy trading problem settled by the double auction mechanism as a partially observable Markov game POMG. The specific steps of the partially observable Markov game are as follows: S1) Observation: At time t, the state that the agent can observe is: In the formula, is the state of charge of the energy storage device of house i; is the total load of house i; The prices at which users buy electricity from the grid, the prices at which users sell electricity to the grid, and the average clearing price of the P2P local energy trading market at the last moment are respectively; S2) Action: At time t, agent i selects an action based on the observed value: In the formula, The expected transaction price parameter for P2P market pricing is is the expected transaction quantity; is the energy storage charging and discharging parameter of the residence, that is, the energy storage charging and discharging power for: In the formula, p ess,i is the rated power of the energy storage; is the energy storage charging and discharging parameters of house i; S3) State transfer function: At time t, the state of the residential microgrid is mainly related to the energy storage system in the house. The state transfer equation of the energy storage system is: In the formula, is the state of charge of the energy storage device of house i; η ch,i , η dis,i are the energy storage charging and discharging efficiency of house i respectively; is the maximum energy storage capacity of house i; Δt is the time change; S4) Reward function: The reward value obtained by agent i is calculated by its reward function. Considering the actual energy consumption cost of the residence as the reward function, that is: In the formula, Profits from P2P local energy trading; To generate revenue from trading with the power grid.
5. A decentralized microgrid energy trading method based on a double auction mechanism as claimed in claim 4, characterized in that: In step S4), when the P2P transaction contract is reached, the residential users of both parties will dispatch the local energy. After the dispatch is completed, the P2P transaction contract will be settled according to the actual transaction volume, that is: In the formula, is the actual transaction power between the two parties; ε is the penalty ratio; is the tradable electricity for residential i; is the tradable electricity for residential j; Satisfaction relationship Indicates that the current user is a seller; otherwise, Indicates that the current user is the buyer; the revenue of the transaction between house i and the power grid is: In the formula, is the power of house i interacting with the grid; [·] - ,[·] + They represent the operation symbols min{·,0} and max{·,0} respectively.
6. A decentralized microgrid energy trading method based on a double auction mechanism as claimed in claim 1, characterized in that: The decentralized electricity trading method in step 2 is: assuming that A is a consumer purchasing electricity, B is a producer and consumer selling electricity, and C is a blockchain system administrator, the specific steps are as follows: First, energy prediction is performed: To protect privacy, A and B use the corresponding public and private keys to create a pair of new addresses: TAddr and MAddr; at the beginning of the auction, C predicts that B can sell electricity E, which is equal to the predicted production minus the predicted consumption; C generates two unique keys b corresponding to B's energy E. α and b β And record it in the database, C uses MAddrC to send b to B's address MAddrB α and b β Message, B uses MAddrB to broadcast the auction information to the entire network. The broadcast function is: BROADCAST(E,P,TAddrB,MAddrB), which includes the saleable energy E, the reserved price P, the transaction address TAddrB and the anonymous message stream address MAddrB; Secondly, transaction matching is performed: A participates in the bidding for B's electric energy according to his own needs, then A sends a message to C through the address MAddrA to enable B to verify the ownership certificate of energy E. C verifies the database record and replies whether the result is true or false; Next, a multi-signature transaction is performed: After the power auction is completed, C will broadcast the auction results to the entire network; Finally, the ownership key is changed: B will use MAddrB to send the power ownership proof key b α With pubKeyPPB to A's anonymous message address MAddrA, A sends a request H(b) to C to change the ownership key. α ,pubKeyPPB,unlock,update), C receives the information and verifies b α , unlock the electric energy and generate a new pair of keys α α and α β Replace b accordingly α and b β .
Citation Information
Cited By
Microgrid P2P electric energy transaction bidding and matching optimization method
CN121660769A