This patent application claims the benefit and priority of Chinese Patent Application No. 2022114222632 filed on Nov. 14, 2022, the disclosure of which is incorporated by reference herein in its entirety as part of the present application.
The present disclosure relates to the technical field of blockchain, and more specifically, to a blockchain-based electricity trading method and system in a virtual power plant environment.
With the rapid popularization and development of distributed energy resources, traditional electricity consumers gradually transform into electricity prosumers with both electricity production and consumption. However, when the distributed energy resources operate independently, the output thereof are random, intermittent and fluctuating, and when a large amount of distributed energy resources are connected to a traditional large power system, the electricity supply safety and reliability of the power system will be threatened.
However, the key to the operation of existing virtual power plants lies in the flexible control of different distributed energy resources in the region. However, when faced with characteristics such as randomness, fluctuation and hard storage of distributed energy resources, it is often difficult to achieve an ideal utilization rate when controlling the distributed energy resources, that is, the energy utilization rate in an existing power system in a virtual power plant environment is low.
In view of the shortcomings of the prior art, the disclosure provides a blockchain-based electricity trading method and system in a virtual power plant environment, which solves the technical problem of low energy utilization in the existing electricity trading system in a virtual power plant environment.
In order to achieve the above object, the present disclosure is achieved by the following technical solutions:
In a first aspect, the disclosure provides a blockchain-based electricity trading method in a virtual power plant environment, and the method includes:
S1. based on a planned load demand of user i during t period, a distributed energy equipment output forecasting data of user i during t period, an energy storage device state of user i during a previous t period and a purchase price and a sale price of a trading with a virtual power plant during the previous t period, with a goal of minimizing a planned electricity cost of the user i during t period, optimizing a cost of the user participating in the electricity trading, determining a planned purchase electricity quantity or sale electricity quantity of the trading between the user and the virtual power plant, as well as a planned charging capacity or discharging capacity of the energy storage device, and obtaining an initial trading plan of user i during t period;
S2. based on the initial trading plan of the users in the virtual power plant, constructing a non-cooperative game model among multiple users and the virtual power plant, determining a purchase price, a sale price and a demand response compensation price of a trading among the users and the virtual power plant during t period;
S3. according to the purchase price, the sale price and the demand response compensation price of a trading among the users and the virtual power plant during t period, determining a final load demand of user i, a charging capacity or discharging capacity of the energy storage device, as well as a purchase electricity quantity or sale electricity quantity of a trading with the virtual power plant during t period, and forming a final trading scheme; and
S4. based on the final trading scheme during t period, matching both trading parties, generating a trading contract and performing a verification.
Preferably, a planned electricity cost function of user i is:
wherein, C′i, t is a planned electricity cost of user i during t period; C′i, tvpp is a planned electricity cost of a trading between user i and the virtual power plant during t period; C′i, tess is a planned energy storage cost of user i during t period; C′i, tder is a planned distributed energy equipment generation cost of user i during t period; πiess is a unit cost of energy storage of user i; P′i, tstatic is a planned energy storage state of user i during t period; πider is an unit cost of own distributed energy resources equipment output of user i; ηch and ηdis is a charging efficiency and discharging efficiency of the energy storage, respectively; Ēi is an maximum capacity limit of the energy storage device of user i; E′i, t is a planned energy storage capacity of user i during t period; Ei, t-Δt is an energy storage capacity of user i in the previous t period;
Preferably, the non-cooperative game model includes:
G=(L;S;U)
wherein, L, S and U are participants, strategies and utility of the game model, respectively;
Preferably, a utility function of the user is as follows:
U
i,t
=−C′
i,t
a utility function of the virtual power plant is as follows:
U
t
VPP
=C
t
sell
−C
t
buy
+C
t
grid
+C
t
e
wherein, UtVPP is an overall cost of the virtual power plant during t period; Ctbuy and Ctsell are an electricity purchase cost and an electricity sale cost from users participating in a trading to the virtual power plant, respectively; Cte is an incentive cost of compensation for users participating in demand response in the virtual power plant; Ctgrid is a cost of trading with the main grid; and the utility function of the virtual power plant operator is constrained as follows:
wherein, λtgs and λtgb are a sale price and a purchase price of a trading between the virtual power plant and the main grid during t period, respectively; ΔPi, ts is a translatable load of the user i during t period; ΔPi,tc is a reducible load of the user i during t period; i is the user; N is the number of users participating in the virtual power plant trading; Tis a total time period of users participating in the virtual power plant trading; λtvb, λtvs and λe are the purchase price, the sale price and the demand response compensation price of the trading among the users and virtual power plant during t period.
Preferably, the step S3 includes:
Preferably, a cost function of the user is as follow:
Preferably, before performing the step S1, the method further includes: S0. assigning a permission to the user to participate in electricity trading;
In a second aspect, the disclosure provides a blockchain-based electricity trading system in a virtual power plant environment, and the system includes:
In a third aspect, the disclosure provides a computer readable storage medium. The storage medium stores a computer program used for a blockchain-based electricity trading system in a virtual power plant environment, wherein the computer program enables a computer to execute the aforementioned blockchain-based electricity trading method in a virtual power plant environment.
In a fourth aspect, the disclosure provides an electronic device, including:
The disclosure provides a blockchain-based electricity trading method and system in a virtual power plant environment. Compared with the prior art, the disclosure has the following beneficial effects:
In the present disclosure, based on a planned load demand of user i during t period, a distributed energy equipment output forecasting data of user i during t period, an energy storage device state during a previous t period and a purchase price and a sale price of a trading with a virtual power plant during the previous t period, with a goal of minimizing a planned electricity cost of the user i during t period, a cost of the user participating in the electricity trading is optimized, a planned purchase electricity quantity or sale electricity quantity of the trading between the user and the virtual power plant, as well as a planned charging capacity or discharging capacity of the energy storage device are determined, and an initial trading plan of user i during t period is obtained; then, based on the initial trading plans of the users in the virtual power plant, a non-cooperative game model among multiple users and the virtual power plant is constructed, a purchase price, a sale price and a demand response compensation price of a trading among the users and the virtual power plant during t period are determined; then, according to the purchase price, the sale price and the demand response compensation price of a trading between the user and the virtual power plant during t period, a final load demand of user i, a charging capacity or discharging capacity of the energy storage device, as well as a purchase electricity quantity or sale electricity quantity of a trading with the virtual power plant during t period are determined, and a final trading scheme is formed; finally, based on the final trading scheme during t period, both trading parties are matched, a trading contract is generated and a verification is performed. In the embodiments of the present disclosure, based on trading information submitted by nodes participating in the trading to a blockchain in the blockchain-based power system, a supply demand plan can be obtained in real time, and an electricity generation plan of an electricity generation unit, particularly an electricity generation index of non-renewable energy sources, can be adjusted in real time, thereby an invalid production capacity is avoided and an energy utilization rate is improved.
In order to explain the embodiments of the present disclosure or the technical solutions in the prior art more clearly, the following drawings that need to be used in the description of the embodiments or the prior art are briefly introduced. Obviously, the drawings in the following description are only embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on the drawings disclosed without creative work.
In order to make the purpose, technical solutions and advantages of the embodiments of the disclosure clearer, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of them. Based on the embodiments of the disclosure, all other embodiments made by those skilled in the art without any creative effort should fall within the protection scope of the disclosure.
By providing a blockchain-based electricity trading method and system in a virtual power plant environment, the embodiments of the present disclosure solve the technical problem of low energy utilization in the existing power system in a virtual power plant environment, achieves real-time access to supply and demand plans, timely adjusts the electricity generation plan of the electricity generation unit, and improves the distributed energy utilization rate.
The technical solutions in the embodiments of the present disclosure are to solve the above technical problems, and the overall idea is as follows:
In order to implement coordination control and energy management of distributed energy resources, flexible control over a large number of distributed energy resources may be implemented by using a virtual power plant. With the support of advanced communication and adjustment technologies, a virtual power plant dynamically aggregates distributed energy resources, controllable loads and energy storage systems into a whole, which can participate in the electricity market and assistively service market operation, thereby implementing bidirectional exchange of power and information of trading subjects. However, with the incorporation of a large number of prosumers into a trading market, the operation of existing virtual power plants is faced with a relatively large challenge: (1) the virtual power plant is difficult to deal with characteristics such as randomness, fluctuation and intermittency of distributed energy resources, and therefore it is often difficult to achieve an ideal utilization rate and an overall profit when controlling distributed energy resources; (2) the benefit allocation mechanism of the existing blockchain-based electricity trading scheme in the virtual power plant is mostly based on the quotes of the users themselves, which is not conducive to promoting the initiatives and overall benefits of the users participating in the trading, and increases the trading cost and credit cost in the trading process; (3) the existing virtual power plants realize information and data scheduling among main bodies participating in a trading market, such as an electricity generation side and an electricity demand side, by means of a bidirectional communication technology. However, there is no guarantee system for information security of the virtual power plant, and there is a risk of unauthorized acquisition of data and malicious tampering.
In order to solve the above-described problems, the embodiments of the present disclosure provide a blockchain-based electricity trading method and system in a virtual power plant environment. The blockchain technology has the characteristics of decentralization, security, reliability, anonymization, etc., and provides a reliable environment for the problem of data interoperability and information security in grid connections of distributed energy resources in a virtual power plant.
The embodiments of the present disclosure provide a blockchain-based electricity trading method in a virtual power plant environment as shown in
S1. based on a planned load demand of user i during t period, a distributed energy equipment output forecasting data of user i during t period, an energy storage device state during a previous t period and a purchase price and a sale price of a trading with a virtual power plant during the previous t period, with a goal of minimizing a planned electricity cost of the user during t period, optimizing a cost of the user participating in the electricity trading, determining a planned purchase electricity quantity or sale electricity quantity of the trading between the user and the virtual power plant, as well as a planned charging capacity or discharging capacity of the energy storage device, and obtaining an initial trading plan of user i during t period;
S2. based on the initial trading plan of the user in the virtual power plant, constructing a non-cooperative game model among multiple users and the virtual power plant, determining a purchase price, a sale price and a demand response compensation price of a trading among the users and the virtual power plant during t period;
S3. according to the purchase price, the sale price and the demand response compensation price of a trading among the users and the virtual power plant during t period, determining a final load demand of user i, a charging capacity or discharging capacity of the energy storage device, as well as a purchase electricity quantity or sale electricity quantity of a trading with the virtual power plant during t period, and forming a final trading scheme; and
S4. based on the final trading scheme during t period, matching both trading parties, generating a trading contract and performing a verification.
Based on the trading information submitted to the blockchain by the nodes participating in the trading in the power system of the blockchain, the embodiments of the present disclosure can obtain the supply and demand plan in real time, adjust the electricity generation plan of the electricity generation unit in real time, especially the electricity production index of non-renewable energy, avoid invalid capacity, and improve the energy utilization rate.
Each step is described in detail below:
It should be noted that, in the embodiments of the present disclosure, the “user” and the “user node” may be interchanged, and both represent the nodes of the trading users in the blockchain. The power system in the embodiments of the present disclosure is a distributed electricity trading platform based on a blockchain.
It should be noted that, in the specific implementation process, when a user joins in the electricity trading system for the first time, the method further includes: S0. assigning a permission to the user to participate in electricity trading, specifically:
The user submits a registration application to the regulatory authority of the blockchain-based electricity trading system in the virtual power plant, then the electricity trading system assigns a permission to the user to participate in electricity trading, which includes a set of public key Kp, private key Ks and wallet addressee W.
In step S1, based on a planned load demand P′i, tload, of user i, a distributed energy equipment output forecasting data P′i, tder of user i, an energy storage device state Ei, t-Δt of user i during a previous t period and a purchase price Δt-Δtvb and sale price λt-Δtvs of a trading with a virtual power plant during the previous t period, aiming at minimizing a planned electricity cost of the user during t period, the cost of the user participating in the electricity trading is optimized, a planned purchase electricity quantity P′i, tvb or sale electricity quantity P′i, tvs of a trading between the user and the virtual power plant, as well as a planned charging capacity P′i, tch or discharging capacity P′i, tdis of the energy storage device are determined, and an initial trading plan <P′i, tload, P′i, tder, P′i, tch, P′i, tdis, P′i, tvb, P′i, tvs> of user i during t period is obtained. The specific implementation process is as follows:
Firstly, a planned load demand P′i, tload of user i during t period, a distributed energy equipment output forecasting data P′i, tder of user i during t period, an energy storage device state Ei, t-Δt user i during a previous t period and a purchase price λt-Δtvb and sale price λt-Δtvs of a trading with a virtual power plant during the previous t period are obtained.
Then, based on the planned load demand P′i, tload of user i during t period, the distributed energy equipment output forecasting data P′i, tder of user i during t period, the energy storage device state Ei, t-Δt of user i during the previous t period and the purchase price λt-Δtvb and sale price λt-Δtvs of the trading with the virtual power plant during the previous t period, aiming at minimizing a planned electricity cost C′i, t of the user i during t period, the cost of the user i participating in the electricity trading is optimized, a planned purchase electricity quantity P′i, tvb or sale electricity quantity P′i, tvs of a trading between the user and the virtual power plant and a planned charging capacity P′i, tch or discharging capacity P′i, tdis of the energy storage device of user i during t period are determined, and an initial trading plan <P′i, tload, P′i, tder, P′i, tch, P′i, tdis, P′i, tvb, P′i, tvs> of user i during t period is obtained.
A planned electricity cost function of user i is:
wherein, C′i, t is a planned electricity cost of user i during t period; C′i, tvpp is a planned cost of a trading between user i and the virtual power plant during t period; C′i, tess is a planned energy storage cost of user i during t period; C′i, tder is a planned distributed energy equipment generation cost of user i during t period; πiss is a unit cost of energy storage of user i; P′i, tstatic is a planned energy storage static state of user i during t period; πider is an unit cost of own distributed energy resources equipment output of user i; ηch and ηdis is a charging efficiency and discharging efficiency of the energy storage respectively; Ēi is an maximum capacity limit of the energy storage device of user i; E′i, t is a planned energy storage capacity of user i during t period; Ei, t-Δt is an energy storage capacity of user i in the previous t period;
In the specific implementation process, the user node submits its own initial trading plan <P′i, tload, P′i, tder, P′i, tch, P′i, tdis, P′i, tvb, P′i, tvs> to the blockchain rotation endorsing node based on the optimized results.
It should be noted that in the embodiments of the disclosure, the forecasting data such as the distributed energy equipment output forecasting data can be obtained through various existing forecasting methods, which will not be repeated here.
In step S2, based on the initial trading plans of the users in the virtual power plant, a non-cooperative game model among multiple users and the virtual power plant is constructed, a purchase price, a sale price and a demand response compensation price of a trading between the user and the virtual power plant during t period are determined. The specific implementation process is as follows:
After all user nodes submit the initial trading plan, a non-cooperative game model among multiple users and the virtual power plant is constructed. The virtual power plant controls the electricity trading among the users and the virtual power plant by adjusting the electricity trading price with each user, so as to reduce the peak-valley difference of the main grid and the electricity supply pressure of the main grid during the peak period of electricity consumption. By adjusting the trading price among the virtual power plant and the users, and aiming at minimizing the operation cost of all entities of the virtual power plant, the virtual power plant determines the sale price λtvs, purchase price λtvb and demand response compensation price λe of the trading between the user in the virtual power plant and the virtual power plant during t period, and adjusts the internal demand response and distributed energy equipment output of the system according to the obtained purchase price, sale price and demand response compensation price.
After all user nodes submit the initial trading plans, the virtual power plant operator and users, as different interest subjects, have different goals. The process of adjusting the electricity trading quantity and trading price and conducting electricity trading through rational decision-making is a typical non-cooperative game process. Therefore, the non-cooperative game model between the user and the virtual power plant is as follows:
G=(L;S;U)
wherein, L, S and U are the three elements of the game model: participants, strategies and utility. Participants refer to virtual power plant and user nodes submitting trading plans. A trading electricity quantity among users and virtual power plant during t period is as the game strategy, and a trading electricity price among virtual power plant and users is as the game strategy. a utility function of the user is as follows:
U
i,t
=−C′
i,t
a utility function of the virtual power plant is as follows:
U
t
VPP
=C
t
sell
−C
t
buy
+C
t
grid
+C
t
e
The virtual power plant considers its own utility and the operation stability of the power system when controlling the trading price with users, so the utility function of the virtual power plant mainly consists of the revenue from the sale of energy of the main grid and the demand response compensation for the volatility loss caused by users participating in the demand response, wherein, UtVPP is an overall cost of the virtual power plant during t period; Ctbuy and Ctsell are an electricity purchase cost and an electricity sale cost from users participating in a trading to the virtual power plant; Cte is an incentive cost of compensation for user participation in demand response in the virtual power plant; Ctgrid is a cost of trading with the main grid; and the utility function of the virtual power plant is constrained as follows:
wherein, λtgs and λtgb are sale price and purchase price of a trading between the virtual power plant and the main grid; ΔPi, ts is a translatable load of the user i during t period; ΔPi, tc is a reducible load of the user i during t period, Nis the number of users participating in the virtual power plant trading, and T is a total time period of users participating in the virtual power plant trading; λtvb, λtvs and λe are purchase price, sale price and demand response compensation price of the trading among users and virtual power plant during t period.
In step S3, according to the purchase price λi, tvb, the sale price λi, tvs and the demand response compensation price λe of a trading between the user and the virtual power plant during t period, a final trading scheme of the user i is determined. The specific implementation process is as follows:
Based on the given purchase price and sale price between the internal user and the virtual power plant, the distributed energy output and demand response of the user are optimized to obtain the final cost function of the user. Specifically:
Based on the optimization results of step S1 and step S2, according to the purchase price, the sale price and demand response compensation price of the trading between the user and the virtual power plant in a given t period, with the goal of minimizing the cost Ci, t of the user i, the distributed energy output and the demand response of the user i is optimized, the purchase electricity quantity Pi, tvb or sale electricity quantity Pi, tvs of the trading between the user and the virtual power plant, as well as the charging capacity Pi, tch or discharging capacity Pi, tdis of the energy storage device are determined. A cost function of the user i is as follows:
wherein, Ci, t is electricity cost of the user i during t period, Ci, tvpp is a cost of a trading between user i and the virtual power plant during t period; C′i, tess is an energy storage cost of user i during t period; Ci, tder is a distributed energy equipment generation cost of user i during t period; Ci, te is an incentive revenue obtained by user participating in the demand response during t period; Pi, tvb and Pi, tvs are the purchase electricity quantity and sale electricity quantity between user i and the virtual power plant during t period; Pi, tch and Pi, tdis are the charging capacity and discharging capacity of the energy storage device of user i during t period respectively; Pi, tload is the final load demand of user i during t period; Pi, tder is a distributed energy equipment output data of user i during t period.
According to the cost function of the individual user, the purchase electricity quantity Pi, tvb or sale electricity quantity Pi, tvb of the trading between the user and the virtual power plant, as well as the charging capacity Pi, tch or discharging capacity Pi, tdis of the energy storage device during t period are determined, and the final trading scheme <Pi, tload, Pi, tder, Pi, tch, Pi, tdis, Pi, tvb, Pi, tvs> of the user is formed.
In step S4, based on the final trading scheme during t period, both trading parties are matched, a trading contract is generated and a verification is performed. The specific implementation process is as follows:
According to the cost function of the individual user, the final trading scheme <Pi, tload, Pi, tder, Pi, tch, Pi, tdis, Pi, tvb, Pi, tvs> during t period is obtained. The user node submits the final trading role and the trading electricity quantity of this period to the blockchain rotation endorsing node. Based on the trading information submitted by the user, the both trading parties in the virtual power plant are matched and the trading contract is automatically generated. All the rotation endorsing nodes of the blockchain verify the trading contract and send the same to the orderer node of the blockchain where the trading subject is located. The orderer node packages all the passed trading contracts into blocks, and updates the blockchain where both parties of the trading subjects are located.
In the specific implementation process, the method further includes: S5. recording real-time trading data in a blockchain in a form of blocks, and executing a violation management and a payment management. The specific implementation process is as follows:
The user node conducts the trading based on the trading contract and records real-time trading data in the blockchain in the form of blocks. If the user node fails to perform the contract or breaches the contract during the trading process, the power system in the virtual power plant determines that the party at fault will bear the corresponding liability for breach of contract and pay high liquidated damages. If the trading contract is successfully performed, the power system will automatically transfer the trading cost based on the actual trading data information provided by the smart meter, and record the actual trading data in the blockchain in the form of blocks to complete the electricity trading.
The embodiments of the present disclosure further provide a blockchain-based power trading system in a virtual power plant environment, as shown in
It is understandable that the blockchain-based electricity trading system in a virtual power plant environment provided by the embodiments of the disclosure corresponds to the above blockchain-based electricity trading method in a virtual power plant environment, and the explanation, examples and beneficial effects of the relevant contents thereof may refer to the corresponding contents in the blockchain-based electricity trading method in a virtual power plant environment, which will not be repeated here.
The embodiments of the present disclosure further provide a computer readable storage medium. The storage medium stores a computer program used for a blockchain-based electricity trading system in a virtual power plant environment, wherein the computer program enables a computer to execute the aforementioned blockchain-based electricity trading method in a virtual power plant environment.
The embodiments of the present disclosure further provide an electronic device, including:
1. In the embodiments of the present disclosure, based on trading information submitted by nodes participating in the trading to a blockchain platform in the blockchain-based electricity trading system, a supply demand plan can be obtained in real time, and an electricity generation plan of a electricity generation unit, particularly an electricity generation index of non-renewable energy resources, can be adjusted in real time, thereby an invalid production capacity is avoided and an energy utilization rate is improved.
2. The power system of the embodiments of the present disclosure is a blockchain-based distributed trading system, and has the characteristics of decentralization, openness and transparency, and tamper resistance. Accurate trading information can help the stable scheduling of a virtual power plant, improving the process of peak cutting and valley filling of energy demand, and facilitating information transparency and stable scheduling of the virtual power plant.
3. In the embodiments of the present disclosure, trading data is encrypted by means of an encryption algorithm of a blockchain so as to implement protection, and is mutually authenticated by various nodes of the whole network. Each node in the blockchain backs up all the information in the blockchain, which effectively solves the hidden trouble of failure of the centralized data service, improves the robustness of the system, and protects the privacy security of user information.
4. The overall benefits of the virtual power plant are maximized while the trading cost of users are reduced as much as possible, which can effectively facilitate the users in the virtual power plant to actively participate in electricity trading and improve the economy of the virtual power plant at the same time.
It should be noted that, in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not require or imply any actual relationship or sequence between these entities or operations. Furthermore, the terms “comprise”, “include”, or any other variants thereof are intended to cover a non-exclusive inclusion, so that a process, a method, an article, or a device that includes a series of elements not only includes those elements, but also includes other elements that are not explicitly listed, or further includes elements inherent to the process, the method, the article, or the device. An element limited by “comprise a . . . ” does not exclude other same elements existing in a process, a method, an article, or a device that includes the element, unless otherwise specified.
The foregoing embodiments are merely intended to illustrate the technical solutions of the present disclosure, but not to limit the present disclosure. Although the present disclosure is described in detail with reference to the foregoing embodiments, persons of ordinary skill in the art should understand that they can still make modifications to the technical solutions described in the foregoing embodiments or make equivalent replacements to some technical features thereof, these modifications or replacements do not make the essence of the corresponding technical solutions depart from the spirit and scope of the technical solutions of the embodiments of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
2022114222632 | Nov 2022 | CN | national |