Blockchain-based decentralized energy trading system for interconnected photovoltaic microgrid clusters
By using a blockchain-based decentralized trading system for interconnected photovoltaic microgrid clusters, the single-point failure risk and high operating costs of centralized energy trading systems have been resolved. This has enabled efficient and secure energy trading, dynamically balancing supply and demand, and improving the stability and efficiency of the power trading network.
Patent Information
- Application Number
- CN202510055663.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-01-14
AI Technical Summary
Traditional centralized energy trading systems suffer from single-point-of-failure risks, are vulnerable to attacks, and have high operating costs. They also struggle to handle the high-frequency trading requests from distributed renewable energy sources, resulting in low trading efficiency.
A decentralized trading system based on blockchain interconnected photovoltaic microgrid clusters is adopted. The photovoltaic microgrid clusters are bidirectionally connected to the blockchain energy trading platform. Energy trading is realized through information collection module, prediction function module and block verification module. A multi-round matching mechanism and electricity price adjustment rules are adopted. The security and efficiency of the transaction are ensured by combining PoR and Ripple cascade consensus mechanism.
It has improved the stability and efficiency of energy trading, realized the self-production, self-consumption and self-sales of photovoltaic power generation, dynamically balanced supply and demand, avoided the impact of power generation intermittency and volatility on the grid connection of the power grid, and ensured the stability and efficiency of the power trading network.
Smart Images

Figure CN120070051B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of energy trading technology, and in particular to a decentralized energy trading system for interconnected photovoltaic microgrid clusters based on blockchain. Background Technology
[0002] With the development and utilization of various distributed renewable energy sources, such as photovoltaics and wind power, the power grid is gradually evolving from a centralized smart grid to a distributed new power system. However, the traditional centralized energy trading mechanism has exposed a series of serious problems, and new solutions are urgently needed to overcome these challenges.
[0003] The drawbacks of existing technologies are as follows: First, centralized systems are susceptible to single points of failure; if the central node fails, the entire system will be paralyzed, affecting business continuity. Second, centralized systems are more vulnerable to attacks, as attackers only need to compromise one node to prevent the entire system from operating normally, causing significant losses. Third, the maintenance and operation of centralized systems require high costs, especially with the increasing penetration of various distributed renewable energy sources. The massive volume of energy trading data and the high frequency of transaction requests will lead to low energy trading efficiency across the entire system. Summary of the Invention
[0004] This invention provides a decentralized energy trading system for interconnected photovoltaic microgrid clusters based on blockchain, which effectively improves the stability and efficiency of the power trading network.
[0005] To achieve the above objectives, the present invention provides a decentralized energy trading system for interconnected photovoltaic microgrid clusters based on blockchain, the key of which is: the photovoltaic microgrid cluster and the blockchain energy trading platform are set up, and the photovoltaic microgrid cluster and the blockchain energy trading platform are bidirectionally connected;
[0006] The photovoltaic microgrid group includes N photovoltaic microgrids, where N≥3. Each photovoltaic microgrid is equipped with an information collection module, a prediction function module, a transaction function module, and a block verification module connected in sequence.
[0007] The information collection module is connected to a meteorological sensor network, at least two power users, and at least two photovoltaic power stations. The information collection module is used to collect the electricity consumption information of all power users and the power generation information of all photovoltaic power stations in the current photovoltaic microgrid coverage area at the current transaction time. It also uses the meteorological sensor network deployed in the current photovoltaic microgrid coverage area to collect environmental meteorological information. Then, the electricity consumption information, power generation information, and environmental meteorological information are stored in the edge server and used as the historical dataset for training the prediction function module.
[0008] The prediction module is used to predict the photovoltaic power generation and electricity demand at the next transaction time based on the historical dataset, obtain the photovoltaic power generation and electricity demand information of the current photovoltaic microgrid at the next transaction time, and calculate the net load based on the photovoltaic power generation and electricity demand information.
[0009] The transaction function module is used to execute peer-to-peer energy transactions in the blockchain energy trading platform based on the energy deficit or surplus information generated by the net load, to buy or sell energy on demand, and to generate smart contracts.
[0010] The block verification module is responsible for executing the blockchain consensus mechanism to realize block verification or generation of energy trading smart contracts.
[0011] Through the above design, each network node, i.e., the physical layer of the photovoltaic microgrid, consists of several decentralized small-scale photovoltaic power stations integrating photovoltaic and energy storage, and electricity users. At the energy proxy layer, each network node is equipped with an edge server and a communication network, performing functions such as information collection, forecasting, trading, and block verification. Based on the decentralized and tamper-proof characteristics of blockchain technology, this invention enables spontaneous energy trading among photovoltaic microgrids, balancing their net load and achieving self-production, self-consumption, and self-sale of energy. This achieves the technical effect of improving the stability of the energy trading market and promoting the development of clean energy such as photovoltaic power generation; it also realizes the trading architecture of photovoltaic microgrid clusters of different scales, thereby improving the stability and efficiency of the power trading network.
[0012] Preferably, the information collection module is connected and communicates with the prediction function module through a programmable interface, and the information collection module is equipped with a user electricity consumption information collection module, a photovoltaic power generation information collection module and a climate condition information collection module.
[0013] The user electricity consumption information collection module is used to collect and record the historical electricity consumption information of all users in the current photovoltaic microgrid area, so as to provide a reference for the price setting of subsequent transactions;
[0014] The photovoltaic power generation information collection module is used to collect and record the historical power generation information of all distributed photovoltaic power stations in the current photovoltaic microgrid area, providing a reference for the price setting of subsequent transactions;
[0015] The climate condition information collection module is used to collect and record historical environmental meteorological information within the current photovoltaic microgrid area, providing a meteorological dataset for subsequent photovoltaic power generation prediction models.
[0016] Preferably, the environmental meteorological information includes, but is not limited to, information on irradiance, temperature, humidity, and wind speed within the microgrid area.
[0017] The climate condition information collection module is specifically used to measure relevant meteorological conditions affecting photovoltaic power generation, such as irradiance, temperature, humidity, and wind speed, within the photovoltaic microgrid area. After obtaining the relevant information, it is stored as a dataset according to the specific geographical location to guide the establishment of photovoltaic power stations and the prediction of photovoltaic power generation in the entire area.
[0018] Preferably, the prediction function module is equipped with a deep neural network (DNN) and a long short-term memory network (LSTM). The DNN and LSTM are used to extract the time and spatial features from the historical dataset and output the photovoltaic power generation and electricity demand information of the current photovoltaic microgrid at the next transaction time.
[0019] The prediction module is specifically used to predict user electricity consumption information and photovoltaic power generation information for the next moment. After obtaining relevant information, it calculates the net load of electricity to guide the power adjustment and trading strategies of the entire region.
[0020] As a preferred embodiment, the transaction function module is equipped with a unit for verifying the identities of both parties to the transaction, a unit for adjusting the transaction price, and a unit for matching transactions.
[0021] The transaction party identification unit is used to generate a corresponding smart contract for purchasing or selling a photovoltaic microgrid based on the current energy deficit or surplus information of the photovoltaic microgrid.
[0022] The transaction price adjustment unit is used to adjust the electricity transaction price at each transaction time according to the electricity price adjustment mechanism, divide the transaction cycle according to the peak and off-peak periods of electricity transactions, and then obtain the initial electricity sales price based on the electricity demand and sales demand at the next time.
[0023] The transaction matching unit is used to adjust its own contract price during the matching process of generated purchase smart contracts and sale smart contracts on the blockchain energy trading platform. In order to avoid malicious manipulation or vicious competition in the energy trading market, the blockchain energy trading platform adopts a double-blind form for contract matching in which the two parties to the transaction do not share prices. The blockchain energy trading platform conducts multiple rounds of matching. When a transaction is not completed in each round, the buyer and seller respectively raise and lower their contract prices.
[0024] As a preferred embodiment, the transaction cycle division rule is as follows:
[0025] The aforementioned trading cycle division is primarily due to the intermittent and fluctuating nature of photovoltaic power output. To improve the practicality of the trading mechanism, more refined and unequal trading cycles are adopted for transaction settlement. The main output time for photovoltaic power generation is from 6 AM to 6 PM, with almost no output at other times. For off-grid photovoltaic microgrids, electricity demand can only be met by dispatching the stored energy of the energy storage system. Since the stored energy of the energy storage system is relatively stable, the trading cycle can be appropriately extended. Furthermore, users' electricity consumption fluctuates significantly between 6 AM and 6 PM.
[0026] To establish more reasonable electricity prices during peak and off-peak periods, the following more refined and unequal trading cycle division rule is adopted: Using a 24-hour day as a unit, the two off-peak periods of 0-6 AM and 18-24 AM are divided into 6 trading cycles, each lasting 2 hours, denoted as h in chronological order. 1 ,h 2 ,h 3 and h 28 ,h 29 ,h 30 The peak electricity consumption period is from 6:00 AM to 6:00 PM. To ensure more accurate energy allocation, this period is divided into 24 trading cycles, each lasting 0.5 hours, denoted as h in chronological order. 4 ,h 5 ,…,h 27 Therefore, a day is divided into 30 trading periods.
[0027] The identification of photovoltaic microgrids is primarily due to the deployment of edge servers in each microgrid. These servers utilize built-in forecasting modules to predict energy demand and photovoltaic power generation during the trading period based on historical electricity consumption and photovoltaic power generation data. Generally, the energy demand and photovoltaic power generation of different photovoltaic microgrids change dynamically across different trading periods.
[0028] The identification unit for both parties in the transaction will identify the i-th photovoltaic microgrid during the transaction period t∈{h}. 1 ,h 2 ,…,h 30 The predicted energy demand and photovoltaic power generation are denoted as P. i,l (t),P i,g (t), i=1,…,N, calculate the net load P by calculating the difference between energy demand and photovoltaic power generation. i,net (t)=P i,l (t)-P i,g (t), i = 1, ..., N;
[0029] P i,net (t)<0 indicates that the photovoltaic microgrid i has an energy surplus, P i,net(t)>0 indicates the energy deficit of photovoltaic microgrid i, P i,net (t) = 0 indicates that the energy supply and demand of photovoltaic microgrid i are in balance;
[0030] For P i,net (t)≠0,t∈{h 1 ,h 2 ,…,h 30 For all trading periods, the prediction module will P i,net (t) The information is forwarded to the transaction function module. The transaction function module identifies photovoltaic microgrids with negative net load as energy sellers and generates a sell smart contract; it identifies photovoltaic microgrids with positive net load as energy buyers and generates a buy smart contract, i.e.:
[0031]
[0032] Contract matching and electricity price adjustment mechanisms are primarily viewed from an economic perspective. In any transaction, the interests of the buyer and seller are in conflict. On the one hand, buyers will try to lower their bids as much as possible to reduce energy costs. On the other hand, sellers will try to raise their bids as much as possible to maximize sales revenue. To facilitate a transaction, both parties need to adjust their bids.
[0033] The interconnected photovoltaic microgrid clusters form a multi-agent peer-to-peer network. The blockchain energy trading platform is based on the net load P in the sold smart contracts and purchased smart contracts. i,net (t), employing a multi-round matching process to execute contract pairing; the seller, representing a photovoltaic microgrid with energy surplus, provides a pre-determined smart contract for sale, with the quoted price denoted as... For photovoltaic microgrids with energy deficits, the buyer provides a pre-determined smart contract for purchase, with the quoted price denoted as...
[0034] The goal of both buyers and sellers is to match and execute their contracts to meet their respective net load requirements. The contract matching process is as follows:
[0035] Step 1: The seller starts from the initial offer. Initially, offer increasingly lower selling prices to potential buyers; buyers move from the initial offer... Initially, increasingly higher purchase offers were made to potential sellers;
[0036] Step 2: For the r-th round of matching, consider the following scenarios for autonomous contract matching: If The contract is The price was agreed upon; if The buyer moves on to the next seller contract and continues the contract matching process; if there are unmatched contracts after this round of transactions, the seller lowers the selling price; the buyer raises the buying price and continues to the next round of matching.
[0037] Step 3: Once all contracts are matched, the trading for this trading period ends.
[0038] Preferably, the electricity price adjustment mechanism includes seller's electricity price adjustment rules and buyer's electricity price adjustment rules; taking the i-th photovoltaic microgrid as an example, for simplicity, the photovoltaic microgrid index i is omitted in the following description.
[0039] The seller's electricity price adjustment is based on the fact that if surplus energy is not sold, it can only be stored or discarded; if a transaction cannot be completed, losses from energy discarding must be incurred, thus appropriately lowering the sales price is necessary. Furthermore, because the power generation of photovoltaic power plants and the electricity consumption of users are real-time, and the charging and discharging behavior of energy storage devices within a transaction period is random, the specific charging and discharging rates are not considered. Instead, the degradation costs caused by overcharging and discharging of energy storage devices on the equipment's lifespan are converted into the depreciation costs of the photovoltaic equipment.
[0040] The seller's electricity price adjustment rules are as follows:
[0041] During the transaction period t, if P i,net If (t) < 0, then the photovoltaic microgrid i is identified as the energy seller, and the following settings are made. The transaction module generates a smart contract for sale, which includes the surplus energy to be sold and the selling price;
[0042] The selling offer in the rth round of matching The calculation expression is as follows:
[0043]
[0044] in, It is the initial selling price, C bss It is the operating cost of energy storage equipment, P batt It refers to the capacity of the energy storage device, C. life It is the depreciation cost of photovoltaic equipment, P ini C represents the installed capacity of photovoltaic equipment. cur C represents the cost of energy waste, α represents the proportion of energy waste; tr It is the cost of energy transmission, which depends on the distance and quantity of energy transmitted; {A} a,b} is the transmission distance matrix of the photovoltaic microgrid group, where a is the buyer index and b is the seller index; A a,b The distance between buyer a and seller b represents the transmission distance; tanh(r) is an inverse proportional function, representing a trend in price calculation.
[0045] Initial sales price This is determined based on the following rule: According to economic principles, price is inversely proportional to supply and demand; when supply exceeds demand, price decreases; when supply falls short of demand, price increases. In the interconnected photovoltaic microgrid energy trading market, sellers attempt to sell energy at prices higher than the grid company's export price to obtain higher profits. To ensure market stability and prevent sellers from manipulating prices, the initial sales price should have a maximum threshold set with reference to the grid company's export price. Currently, many energy markets mainly adopt time-of-use pricing rules. In contrast, this invention takes into account the changes in time and electricity consumption, and further calculates the supply-demand ratio based on the photovoltaic power generation and electricity demand of all 30 trading periods divided into peak and off-peak periods.
[0046] The initial selling price is determined based on market economy principles. The calculation expression is as follows:
[0047]
[0048] Where min is the minimum value function. This indicates the export electricity price of the power grid company. This indicates the grid company's entry electricity price. The function tanh(x) represents the initial selling price at a given moment. x -e -x ) / (e x +e -x ), e is a constant, and SDR represents the day-ahead energy supply-demand ratio of a photovoltaic microgrid, defined as This represents the total supply, or surplus, of energy over 30 trading cycles. This represents the total demand, or energy deficit, over 30 trading cycles.
[0049] If the submitted smart contract is not matched in the first round, the seller will lower the sales offer based on factors such as the operating cost of the energy storage equipment, the depreciation cost of the photovoltaic equipment, and the energy transmission cost.
[0050] The rules for adjusting the buyer's electricity price are as follows:
[0051] The adjustment of the buyer's electricity price is based on the fact that if one does not purchase deficit energy, one must either obtain energy supplementation from energy storage devices or shut down electrical equipment to balance the net load, so it is necessary to appropriately increase the purchase price.
[0052] During the transaction period t, if P i,net If (t)>0, the photovoltaic microgrid i is identified as the energy buyer, and settings are configured. The transaction module generates a smart contract for purchasing energy, which includes the required deficit energy and the purchase price.
[0053] Purchase offer matched in round r The calculation expression is as follows:
[0054]
[0055] in, This is the initial purchase price, C bss It is the operating cost of energy storage equipment, P batt It refers to the capacity of the energy storage device, C. life It is the depreciation cost of photovoltaic equipment, P ini C represents the installed capacity of photovoltaic equipment. sh This represents the cost of offloading loads, where β is the proportion of load offloading. Only when there is a deficit in energy... Load shedding only occurs when the energy storage capacity exceeds the energy stored in each round of energy storage equipment. The load shedding amount in each round is...
[0056] Initial purchase price The following rules apply to the interconnected photovoltaic microgrid energy trading market: Buyers attempt to purchase energy at a price lower than the grid company's inbound electricity price to reduce their electricity costs. To ensure market stability and prevent buyer price manipulation, initial purchase bids should be set with a minimum threshold based on the grid company's inbound electricity price.
[0057] Further, based on the photovoltaic power generation and electricity demand of all 30 trading periods prior to the date, the supply-demand ratio (SDR) is calculated, and the initial purchase price is determined based on market economy principles. The calculation expression is as follows:
[0058]
[0059] Where max is the maximum value function. This indicates the initial purchase price at a given moment.
[0060] If the submitted smart contract is not matched in the first round, the buyer will increase the purchase offer based on factors such as the operating cost of the energy storage equipment, the depreciation cost of the photovoltaic equipment, and the cost of load shedding.
[0061] Preferably, the block verification module is equipped with a contract data encryption unit, a blockchain transaction settlement unit, and a consensus mechanism verification unit.
[0062] The contract data encryption unit is used to encrypt the electricity and price information in the smart contract generated by the transaction function module. The encrypted smart contract is then uploaded to the blockchain energy trading platform for matching. Only smart contracts uploaded by authorized and legitimate photovoltaic microgrids have the corresponding decryption key that meets a specific set of attributes, and the contract matching operation is performed. This method not only protects data privacy and security, but also ensures the legality and compliance of the transaction.
[0063] The consensus mechanism verification unit is used to verify the successfully matched smart contract using a consensus mechanism, confirm the validity and legality of the smart contract, and then connect the blockchain generated by the verified legal smart contract to the blockchain.
[0064] The blockchain transaction settlement unit generates a ledger copy based on the distributed ledger of the blockchain, and then sends the ledger copy to the photovoltaic microgrid, which acts as a verification node. Each verification node maintains a ledger copy.
[0065] The distributed ledger consists of blocks linked together on a blockchain. Each block contains detailed information about the final smart contract successfully matched from the blockchain energy trading platform, including the network addresses of the buyer and seller, transaction volume, contract execution price, contract execution timestamp, and hash value from the previous block, thus enabling trusted settlement of energy transactions.
[0066] Through the above design, the decentralized and tamper-proof characteristics of blockchain technology are used to generate a distributed ledger of the contract information of the transaction, which is then propagated to each verification node for consensus voting. Finally, the valid blockchain that has been verified is connected to the blockchain.
[0067] Preferably, the consensus mechanism is a blockchain consensus mechanism based on PoR and Ripple cascade. The PoR mechanism selects a subset of photovoltaic microgrids with high transaction activity from all photovoltaic microgrids, and then uses these selected microgrids as verification nodes for the Ripple consensus mechanism, as detailed below:
[0068] First, the PoR mechanism is executed. Each photovoltaic microgrid, i.e., network node, calculates its own reputation value based on the number of transactions and the proportion of transactions it participates in during the current transaction period in all transactions, and broadcasts its own reputation value to all network nodes. Each network node sorts all network nodes, including itself, according to its reputation value, and selects a group of network nodes with high reputation values as the set of validator nodes. Network nodes in the set of validator nodes have the opportunity to participate in consensus verification and block generation.
[0069] Then, the Ripple algorithm is executed. Based on Proof-of-Reform (PoR), all validator nodes selected use a voting mechanism to verify the newly generated blocks. The consensus process is as follows: First, transaction verification: After a node in the validator node set receives transaction information (i.e., a successfully matched smart contract), it verifies the validity of the transaction information through its local ledger data. Only valid transactions are accepted and enter the consensus process. Second, proposal broadcasting: The validator node packages the verified transaction information to be confirmed into a proposal and broadcasts it to other nodes in the validator node set. Third, voting and confirmation: The validator nodes that receive the proposal verify the transaction information in the proposal. The consensus mechanism involves several steps: First, each node votes based on its ledger status. If more than 50% of the validators approve a proposal, the transaction is confirmed and enters the next round of consensus. Proposals with less than 50% approval are left to be confirmed in the next round of consensus. Second, the voting threshold is gradually increased to ensure that enough validators participate in the consensus process, thereby improving the security and credibility of transaction information. Third, final confirmation occurs when a proposal receives more than 80% of the votes from validators. The blockchain network reaches a consensus, the proposal is officially confirmed, and a new block is generated by the validator that initially formed the proposal and linked to the blockchain.
[0070] As a preferred approach: The purpose of implementing the PoR mechanism is to select a set of validator nodes from all network nodes based on their reputation values. The reputation value of the i-th network node during transaction period t is expressed as follows:
[0071]
[0072] Where κ represents the penalty indicator. To avoid the centralization trend of validator nodes, when a node becomes a validator node for three consecutive times, κ is set to 0 for the fourth calculation of the node's reputation value. M(t-1) represents the total number of transactions of all network nodes in the transaction period t-1, m i (t-1) represents the number of transactions made by network node i during transaction period t-1; P total (t-1) represents the total transaction volume of all network nodes during the transaction period t-1, P i (t-1) represents the transaction volume of network node i during transaction period t-1.
[0073] The beneficial effects of this invention are as follows: First, based on historical power generation data and electricity demand information, the net load of the microgrid in the next trading period is predicted. Based on the energy supply-demand ratio, initial bids from both buyers and sellers are calculated, and an electricity price adjustment mechanism is designed. Multi-round matching is employed to promote successful energy transactions and maximize win-win outcomes. Second, a consensus mechanism based on PoR and Ripple cascading is designed to ensure the security of transaction settlement and the integrity of transaction information. This enables the implementation of trading architectures for photovoltaic microgrid clusters of different scales, thereby improving the stability and efficiency of the power trading network.
[0074] A photovoltaic microgrid is formed by multiple adjacent administrative villages, and all photovoltaic microgrids eventually form an off-grid interconnected photovoltaic microgrid group. This invention takes into account the intermittent and fluctuating characteristics of photovoltaic power output, and uses more refined and unequal trading cycles to execute energy trading, realizing self-production, self-consumption, and self-sale of energy. Through energy sharing, a dynamic balance between supply and demand is achieved, which can not only ensure the electricity needs of residential and industrial users in the region, but also avoid the grid connection impact of the intermittent and fluctuating photovoltaic power generation on the main power grid. Attached Figure Description
[0075] Figure 1 This is a framework diagram of a blockchain-based decentralized energy trading system for interconnected photovoltaic microgrid clusters, as shown in the embodiment.
[0076] Figure 2 This is a schematic diagram of the transaction mechanism process in the embodiment. Detailed Implementation
[0077] The present invention will be further described in detail below with reference to the accompanying drawings and specific examples. The following embodiments or drawings are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0078] A decentralized energy trading system for interconnected photovoltaic microgrid clusters based on blockchain is provided, comprising a photovoltaic microgrid cluster and a blockchain energy trading platform, wherein the photovoltaic microgrid cluster and the blockchain energy trading platform are bidirectionally connected;
[0079] The photovoltaic microgrid group includes N photovoltaic microgrids, where N≥3. Each photovoltaic microgrid is equipped with an information collection module, a prediction function module, a transaction function module, and a block verification module connected in sequence.
[0080] The information collection module is connected to a meteorological sensor network, at least two power users, and at least two photovoltaic power stations. The information collection module is used to collect the electricity consumption information of all power users and the power generation information of all photovoltaic power stations in the current photovoltaic microgrid coverage area at the current transaction time. It also uses the meteorological sensor network deployed in the current photovoltaic microgrid coverage area to collect environmental meteorological information. Then, the electricity consumption information, power generation information, and environmental meteorological information are stored in the edge server and used as the historical dataset for training the prediction function module.
[0081] The prediction module is used to predict the photovoltaic power generation and electricity demand at the next transaction time based on the historical dataset, obtain the photovoltaic power generation and electricity demand information of the current photovoltaic microgrid at the next transaction time, and calculate the net load based on the photovoltaic power generation and electricity demand information.
[0082] The transaction function module is used to execute peer-to-peer energy transactions in the blockchain energy trading platform based on the energy deficit or surplus information generated by the net load, to buy or sell energy on demand, and to generate smart contracts.
[0083] The block verification module is responsible for executing the blockchain consensus mechanism to realize block verification or generation of energy trading smart contracts.
[0084] like Figure 1 As shown: The physical layer of the photovoltaic microgrid mainly consists of several decentralized photovoltaic-storage integrated small photovoltaic power stations and power users; the energy proxy layer of the photovoltaic microgrid mainly consists of an edge server and a communication network, used to perform functions such as information collection, prediction, transaction and block verification; the blockchain layer mainly utilizes the decentralized and tamper-proof characteristics of blockchain technology to generate a distributed ledger of the contract information of the transaction, propagate it to each verification node for consensus mechanism voting, and finally connect the verified valid blockchain to the blockchain.
[0085] To save on construction costs, each photovoltaic-storage integrated photovoltaic power station has a limited local energy storage battery capacity, so it is necessary to achieve the goal of zero net load through cooperation between all photovoltaic microgrids.
[0086] Furthermore, the information collection module is connected and communicates with the prediction function module through a programmable interface. The information collection module is equipped with a user electricity consumption information collection module, a photovoltaic power generation information collection module, and a climate condition information collection module.
[0087] The user electricity consumption information collection module is used to collect and record the historical electricity consumption information of all users in the current photovoltaic microgrid area, so as to provide a reference for the price setting of subsequent transactions;
[0088] The photovoltaic power generation information collection module is used to collect and record the historical power generation information of all distributed photovoltaic power stations in the current photovoltaic microgrid area, providing a reference for the price setting of subsequent transactions;
[0089] The climate condition information collection module is used to collect and record historical environmental meteorological information within the current photovoltaic microgrid area, providing a meteorological dataset for subsequent photovoltaic power generation prediction models.
[0090] Furthermore, the environmental meteorological information includes irradiance, temperature, humidity, and wind speed information within the microgrid area.
[0091] The prediction module not only utilizes historical electricity consumption information but also incorporates relevant climate conditions as feature inputs, which can increase the accuracy and interpretability of predictions. For example, in hot summer weather, users' air conditioners, fans, and other electrical appliances will increase their usage time and intensity as the temperature rises.
[0092] Furthermore, the prediction function module is equipped with a deep neural network (DNN) and a long short-term memory network (LSTM). The DNN and LSTM are used to extract the time and spatial features from the historical dataset and output the photovoltaic power generation and electricity demand information of the current photovoltaic microgrid at the next transaction time.
[0093] Furthermore, the transaction function module includes a unit for verifying the identities of both parties, a unit for adjusting the transaction price, and a unit for matching transactions.
[0094] The transaction party identification unit is used to generate a corresponding smart contract for purchasing or selling a photovoltaic microgrid based on the current energy deficit or surplus information of the photovoltaic microgrid.
[0095] The transaction price adjustment unit is used to adjust the electricity transaction price at each transaction time according to the electricity price adjustment mechanism, divide the transaction cycle according to the peak and off-peak periods of electricity transactions, and then obtain the initial electricity sales price based on the electricity demand and sales demand at the next time.
[0096] The transaction matching unit is used to adjust its own contract price during the matching process of generated purchase smart contracts and sale smart contracts on the blockchain energy trading platform. In order to avoid malicious manipulation or vicious competition in the energy trading market, the blockchain energy trading platform adopts a double-blind form for contract matching in which the two parties to the transaction do not share prices. The blockchain energy trading platform conducts multiple rounds of matching. When a transaction is not completed in each round, the buyer and seller respectively raise and lower their contract prices.
[0097] During the contract matching process, if the seller knows the buyer's bid information in advance, they can manipulate the transaction in the following ways: first, if they know the buyer will raise their bid due to energy demand, they can raise the selling price and wait for a higher price; second, they can lower the contract selling price to weaken competitors and execute more contracts. The opposite is true for buyers who manipulate purchase prices. Therefore, to avoid market manipulation, in this invention, the buyer and seller do not share price information.
[0098] Furthermore, the rules for dividing the transaction cycle are as follows:
[0099] Using a 24-hour day as a unit, the two non-peak electricity consumption periods of 0-6 AM and 18-24 AM are divided into 6 trading cycles, each lasting 2 hours, and denoted as h in chronological order. 1 ,h 2 ,h 3 and h 28 ,h 29 ,h 30 The peak electricity consumption period is from 6:00 AM to 6:00 PM. To ensure more accurate energy allocation, this period is divided into 24 trading cycles, each lasting 0.5 hours, denoted as h in chronological order. 4 ,h 5 ,…,h 27 Therefore, a day is divided into 30 trading periods;
[0100] The identification unit for both parties in the transaction will identify the i-th photovoltaic microgrid during the transaction period t∈{h}. 1 ,h 2 ,…,h 30 The predicted energy demand and photovoltaic power generation are denoted as P. i,l (t),P i,g (t), i=1,…,N, calculate the net load P by calculating the difference between energy demand and photovoltaic power generation. i,net (t)=P i,l (t)-P i,g (t), i = 1, ..., N;
[0101] P i,net (t)<0 indicates that the photovoltaic microgrid i has an energy surplus, P i,net (t)>0 indicates the energy deficit of photovoltaic microgrid i, P i,net (t) = 0 indicates that the energy supply and demand of photovoltaic microgrid i are in balance;
[0102] For P i,net (t)≠0,t∈{h 1 ,h 2 ,…,h 30 For all trading periods, the prediction module will P i,net (t) The information is forwarded to the transaction function module. The transaction function module identifies photovoltaic microgrids with negative net load as energy sellers and generates a sell smart contract; it identifies photovoltaic microgrids with positive net load as energy buyers and generates a buy smart contract, i.e.:
[0103]
[0104] The blockchain energy trading platform is based on the net load P in the sold smart contract and the purchased smart contract. i,net(t), employing a multi-round matching process to execute contract pairing; the seller, representing a photovoltaic microgrid with energy surplus, provides a pre-determined smart contract for sale, with the quoted price denoted as... For photovoltaic microgrids with energy deficits, the buyer provides a pre-determined smart contract for purchase, with the quoted price denoted as...
[0105] like Figure 2 As shown, the goal of both buyers and sellers is to match and execute their contracts to meet their respective net load requirements. The contract matching process is as follows:
[0106] Step 1: The seller starts from the initial offer. Initially, offer increasingly lower selling prices to potential buyers; buyers move from the initial offer... Initially, increasingly higher purchase offers were made to potential sellers;
[0107] Step 2: For the r-th round of matching, consider the following scenarios for autonomous contract matching: If The contract is The price was agreed upon; if The buyer moves on to the next seller contract and continues the contract matching process; if there are unmatched contracts after this round of transactions, the seller lowers the selling price; the buyer raises the buying price and continues to the next round of matching.
[0108] Step 3: Once all contracts are matched, the trading for this trading period ends.
[0109] The electricity trading proposed in this invention involves pre-contracting transactions. The electricity demand and power generation used to reach the transaction contract are based on the results of the next trading cycle predicted by the forecasting module. This trading behavior helps improve the user's electricity experience and adjust energy dispatching strategies. Each trading cycle occurs every half hour, which can effectively regulate the imbalance between supply and demand caused by changes in photovoltaic power generation capacity due to climate change.
[0110] Furthermore, the electricity price adjustment mechanism includes seller's electricity price adjustment rules and buyer's electricity price adjustment rules;
[0111] The seller's electricity price adjustment rules are as follows:
[0112] During the transaction period t, if P i,net If (t) < 0, then the photovoltaic microgrid i is identified as the energy seller, and the following settings are made. The transaction module generates a smart contract for sale, which includes the surplus energy to be sold and the selling price;
[0113] The selling offer in the rth round of matching The calculation expression is as follows:
[0114]
[0115] in, It is the initial selling price, C bss It is the operating cost of energy storage equipment, P batt It refers to the capacity of the energy storage device, C. life It is the depreciation cost of photovoltaic equipment, P ini C represents the installed capacity of photovoltaic equipment. cur Let C be the energy waste cost, α be the energy waste ratio, and C be the energy waste cost. tr It is the cost of energy transmission; {A a,b} is the transmission distance matrix of the photovoltaic microgrid group, where a is the buyer index and b is the seller index; A a,b This represents the transmission distance between buyer a and seller b; tanh(r) is an inverse proportional function, representing a trend in price calculation.
[0116] Initial selling price The calculation expression is as follows:
[0117]
[0118] Where min is the minimum value function. This indicates the export electricity price of the power grid company. This indicates the grid company's entry electricity price. The function tanh(x) represents the initial selling price at a given moment. x -e -x ) / (e x +e -x ), e is a constant, and SDR represents the day-ahead energy supply-demand ratio of a photovoltaic microgrid, defined as This represents the total supply, or surplus, of energy over 30 trading cycles. This represents the total demand, or energy deficit, over 30 trading cycles.
[0119] The rules for adjusting the buyer's electricity price are as follows:
[0120] During the transaction period t, if P i,net If (t)>0, the photovoltaic microgrid i is identified as the energy buyer, and settings are configured. The transaction module generates a smart contract for purchasing energy, which includes the required deficit energy and the purchase price.
[0121] Purchase offer matched in round r The calculation expression is as follows:
[0122]
[0123] in, This is the initial purchase price, Cbss It is the operating cost of energy storage equipment, P batt It refers to the capacity of the energy storage device, C. life It is the depreciation cost of photovoltaic equipment, P ini C represents the installed capacity of photovoltaic equipment. sh This represents the cost of load shedding, where β is the load shedding ratio.
[0124] Initial purchase price The calculation expression is as follows:
[0125]
[0126] Where max is the maximum value function. This indicates the initial purchase price at a given moment.
[0127] Furthermore, the block verification module is equipped with a contract data encryption unit, a blockchain transaction settlement unit, and a consensus mechanism verification unit;
[0128] The contract data encryption unit is used to encrypt the electricity and price information in the smart contract generated by the transaction function module. The encrypted smart contract is then uploaded to the blockchain energy trading platform for matching. Only smart contracts uploaded by authorized and legitimate photovoltaic microgrids have the corresponding decryption key that meets a specific set of attributes, and the contract matching operation is performed. This method not only protects data privacy and security, but also ensures the legality and compliance of the transaction.
[0129] The consensus mechanism verification unit is used to verify the successfully matched smart contract using a consensus mechanism, confirm the validity and legality of the smart contract, and then connect the blockchain generated by the verified legal smart contract to the blockchain.
[0130] The blockchain transaction settlement unit generates a ledger copy based on the distributed ledger of the blockchain, and then sends the ledger copy to the photovoltaic microgrid, which acts as a verification node. Each verification node maintains a ledger copy.
[0131] The distributed ledger consists of blocks linked together on a blockchain. Each block contains detailed information about the final smart contract successfully matched from the blockchain energy trading platform, including the network addresses of the buyer and seller, transaction volume, contract execution price, contract execution timestamp, and hash value from the previous block, thus enabling trusted settlement of energy transactions.
[0132] Furthermore, the consensus mechanism is a blockchain consensus mechanism based on PoR and Ripple cascade. The PoR mechanism selects a subset of photovoltaic microgrids with high transaction activity from all photovoltaic microgrids, and then uses these selected microgrids as verification nodes for the Ripple consensus mechanism, as detailed below:
[0133] First, the PoR mechanism is executed. Each photovoltaic microgrid, i.e., network node, calculates its own reputation value based on the number of transactions and the proportion of transactions it participates in during the current transaction period in all transactions, and broadcasts its own reputation value to all network nodes. Each network node sorts all network nodes, including itself, according to its reputation value, and selects a group of network nodes with high reputation values as the set of validator nodes. Network nodes in the set of validator nodes have the opportunity to participate in consensus verification and block generation.
[0134] Then, the Ripple algorithm is executed. Based on Proof-of-Reform (PoR), all validator nodes selected use a voting mechanism to verify the newly generated blocks. The consensus process is as follows: First, transaction verification: After a node in the validator node set receives transaction information (i.e., a successfully matched smart contract), it verifies the validity of the transaction information through its local ledger data. Only valid transactions are accepted and enter the consensus process. Second, proposal broadcasting: The validator node packages the verified transaction information to be confirmed into a proposal and broadcasts it to other nodes in the validator node set. Third, voting and confirmation: The validator nodes that receive the proposal verify the transaction information in the proposal. The consensus mechanism involves several steps: First, each node votes based on its ledger status. If more than 50% of the validators approve a proposal, the transaction is confirmed and enters the next round of consensus. Proposals with less than 50% approval are left to be confirmed in the next round of consensus. Second, the voting threshold is gradually increased to ensure that enough validators participate in the consensus process, thereby improving the security and credibility of transaction information. Third, final confirmation occurs when a proposal receives more than 80% of the votes from validators. The blockchain network reaches a consensus, the proposal is officially confirmed, and a new block is generated by the validator that initially formed the proposal and linked to the blockchain.
[0135] Furthermore, the reputation value of the i-th network node during transaction period t is expressed as follows:
[0136]
[0137] Where κ represents the penalty indicator. To avoid the centralization trend of validator nodes, when a node becomes a validator node for three consecutive times, κ is set to 0 for the fourth calculation of the node's reputation value. M(t-1) represents the total number of transactions of all network nodes in the transaction period t-1, m i (t-1) represents the number of transactions made by network node i during transaction period t-1; P total (t-1) represents the total transaction volume of all network nodes during the transaction period t-1, P i (t-1) represents the transaction volume of network node i during transaction period t-1.
[0138] The node reputation value mentioned in this invention is primarily used for selecting verification nodes in the consensus mechanism. Since all nodes in the entire transaction network are equal, node reputation value is used to select verification nodes that are trusted by all nodes. Furthermore, because blockchain platform transactions are distributed, a penalty mechanism is added to prevent high-capacity nodes from repeatedly becoming verification nodes in multiple transactions, thus concentrating verification power. Specifically, if a node has served as a verification node three times consecutively, it will be excluded from the fourth verification node selection.
[0139] For interconnected photovoltaic (PV) microgrids operating in off-grid mode, a decentralized energy trading mechanism is proposed. A blockchain-based decentralized energy trading framework for interconnected PV microgrids is designed, modeled as a multi-agent peer-to-peer network architecture. The basic functions of each agent are defined, including forecasting, trading, information collection, and block verification. Given the intermittent, volatile, and unstable characteristics of PV power output, more refined and unequal trading cycles are adopted for transaction settlement, improving the practicality of the trading mechanism. The energy supply-demand ratio under different trading cycles is analyzed, and a pricing mechanism more in line with market economics is proposed. Price matching is performed by ensuring that the trading parties do not share prices, which improves the efficiency of transactions between buyers and sellers and avoids the risk of market price manipulation. The use of PoR and Ripple cascaded consensus mechanisms ensures the security of transaction settlement and the integrity of transaction information. This enables the implementation of trading architectures for PV microgrids of different sizes, thereby improving the stability and efficiency of the power trading network.
[0140] In China's existing energy trading market, centralized energy trading systems require energy agents to meet certain energy capacity thresholds. However, some small-scale photovoltaic (PV) power plants deployed in certain regions have low energy capacities, making them unsuitable as energy agents. For example, Lingchuan County in Shanxi Province, located in the Taihang Mountains, has dense ecological protection red lines in its eastern region and lacks grid corridor resources. To meet the electricity needs of residents in this area, a number of integrated photovoltaic-storage (PV-S) small-scale PV power plants are planned. For ease of management, PV microgrids are formed by multiple adjacent administrative villages. All PV microgrids eventually form an off-grid interconnected PV microgrid cluster, achieving self-production, self-consumption, and self-sales of energy. This can guarantee the electricity needs of residents and industrial / commercial users in the region while mitigating the grid connection impact of the intermittent and fluctuating nature of PV power generation on the main grid. However, due to the imbalance between energy supply and demand in different PV microgrids, some experience insufficient energy supply while others have excess energy supply. Therefore, it is necessary to establish a PV microgrid alliance and innovate energy trading mechanisms to achieve dynamic supply and demand balance through energy sharing. This is particularly suitable for regions where connecting to the main grid is difficult or the transaction costs are high.
[0141] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A decentralized energy trading system for interconnected photovoltaic microgrid clusters based on blockchain, characterized in that: The system is equipped with a photovoltaic microgrid cluster and a blockchain energy trading platform, with the photovoltaic microgrid cluster and the blockchain energy trading platform being bidirectionally connected. The photovoltaic microgrid group includes N photovoltaic microgrids, and each photovoltaic microgrid is equipped with an information collection module, a prediction function module, a transaction function module and a block verification module connected in sequence. The information collection module is connected to a meteorological sensor network, at least two power users, and at least two photovoltaic power stations. The information collection module is used to collect the electricity consumption information of all power users and the power generation information of all photovoltaic power stations in the current photovoltaic microgrid coverage area at the current transaction time. It also uses the meteorological sensor network deployed in the current photovoltaic microgrid coverage area to collect environmental meteorological information. Then, the electricity consumption information, power generation information, and environmental meteorological information are stored in the edge server and used as the historical dataset for training the prediction function module. The prediction module is used to predict the photovoltaic power generation and electricity demand at the next transaction time based on the historical dataset, obtain the photovoltaic power generation and electricity demand information of the current photovoltaic microgrid at the next transaction time, and calculate the net load based on the photovoltaic power generation and electricity demand information. The transaction function module is used to identify photovoltaic microgrids with positive net load (i.e., energy deficit) as energy buyers and photovoltaic microgrids with negative net load (i.e., energy surplus) as energy sellers based on the energy deficit or surplus information generated by the net load. It then executes peer-to-peer energy transactions in the blockchain energy trading platform, buys or sells energy as needed, and generates smart contracts. The block verification module is responsible for executing the blockchain consensus mechanism to realize block verification or generation of energy trading smart contracts.
2. The decentralized energy trading system for interconnected photovoltaic microgrid clusters based on blockchain according to claim 1, characterized in that: The information collection module is connected and communicates with the prediction function module through a programmable interface. The information collection module is equipped with a user electricity consumption information collection module, a photovoltaic power generation information collection module, and a climate condition information collection module. The user electricity consumption information collection module is used to collect and record the historical electricity consumption information of all users in the current photovoltaic microgrid area; The photovoltaic power generation information collection module is used to collect and record the historical power generation information of all distributed photovoltaic power stations in the current photovoltaic microgrid area; The climate condition information collection module is used to collect and record historical environmental meteorological information within the current photovoltaic microgrid area.
3. The decentralized energy trading system for interconnected photovoltaic microgrid clusters based on blockchain according to claim 1 or 2, characterized in that: The environmental meteorological information includes, but is not limited to, information on irradiance, temperature, humidity, and wind speed within the microgrid area.
4. The decentralized energy trading system for interconnected photovoltaic microgrid clusters based on blockchain according to claim 1, characterized in that: The prediction module is equipped with a deep neural network (DNN) and a long short-term memory network (LSTM). The DNN and LSTM are used to extract the time and spatial features from the historical dataset and output the photovoltaic power generation and electricity demand information of the current photovoltaic microgrid at the next transaction time.
5. The decentralized energy trading system for interconnected photovoltaic microgrid clusters based on blockchain according to claim 1, characterized in that: The transaction function module includes a unit for verifying the identities of both parties, a unit for adjusting transaction prices, and a unit for matching transactions. The transaction party identification unit is used to generate a corresponding smart contract for purchasing or selling a photovoltaic microgrid based on the current energy deficit or surplus information of the photovoltaic microgrid. The transaction price adjustment unit is used to adjust the electricity transaction price at each transaction time according to the electricity price adjustment mechanism, divide the transaction cycle according to the peak and off-peak periods of electricity transactions, and then obtain the initial electricity sales price based on the electricity demand and sales demand at the next time. The transaction matching unit is used to adjust its own contract price during the matching process of generated purchase smart contracts and sale smart contracts on the blockchain energy trading platform. The blockchain energy trading platform adopts a double-blind method for contract matching in which the two parties to the transaction do not share prices. The blockchain energy trading platform conducts multiple rounds of matching. When a transaction is not completed in each round, the buyer and seller respectively raise and lower their contract prices.
6. The decentralized energy trading system for interconnected photovoltaic microgrid clusters based on blockchain according to claim 5, characterized in that: The rules for dividing the transaction cycle are as follows: Using a 24-hour day as a unit, the two non-peak electricity consumption periods of 0-6 AM and 18-24 AM are divided into 6 trading cycles, each lasting 2 hours, and denoted as h in chronological order. 1 ,h 2 ,h 3 and h 28 ,h 29 ,h 30 The peak electricity consumption period is from 6:00 AM to 6:00 PM, which is divided into 24 trading cycles, each lasting 0.5 hours. These cycles are denoted as h in chronological order. 4 ,h 5 ,…,h 27 Therefore, a day is divided into 30 trading periods; The identification unit for both parties in the transaction will identify the i-th photovoltaic microgrid during the transaction period t∈{h}. 1 ,h 2 ,…,h 30 The predicted energy demand and photovoltaic power generation are denoted as P. i,l (t),P i,g (t), i=1,…,N, calculate the net load P by calculating the difference between energy demand and photovoltaic power generation. i,net (t)=P i,l (t)-P i,g (t), i = 1, ..., N; P i,net (t)<0 indicates that the photovoltaic microgrid i has an energy surplus, P i,net (t)>0 indicates the energy deficit of photovoltaic microgrid i, P i,net (t) = 0 indicates that the energy supply and demand of photovoltaic microgrid i are in balance; For P i,net (t)≠0,t∈{h 1 ,h 2 ,…,h 30 For all trading periods, the prediction module will P i,net (t) The information is forwarded to the transaction function module. The transaction function module identifies photovoltaic microgrids with negative net load as energy sellers and generates a sell smart contract; it identifies photovoltaic microgrids with positive net load as energy buyers and generates a buy smart contract, i.e.: The blockchain energy trading platform is based on the net load P in the sold smart contract and the purchased smart contract. i,net (t), employing a multi-round matching process to execute contract pairing; the seller, representing a photovoltaic microgrid with energy surplus, provides a pre-determined smart contract for sale, with the quoted price denoted as... For photovoltaic microgrids with energy deficits, the buyer provides a pre-determined smart contract for purchase, with the quoted price denoted as... The goal of both buyers and sellers is to match and execute their contracts to meet their respective net load requirements. The contract matching process is as follows: Step 1: The seller starts from the initial offer. Initially, offer increasingly lower selling prices to potential buyers; buyers move from the initial offer... Initially, increasingly higher purchase offers were made to potential sellers; Step 2: For the r-th round of matching, consider the following scenarios for autonomous contract matching: If The contract is The price was agreed upon; if The buyer moves to the next seller contract and continues the contract matching process; if there are unmatched contracts after this round of transactions, the seller lowers the selling price; the buyer raises the buying price and continues to the next round of matching. Step 3: Once all contracts are matched, the trading for this trading period ends.
7. The decentralized energy trading system for interconnected photovoltaic microgrid clusters based on blockchain according to claim 6, characterized in that: The electricity price adjustment mechanism includes rules for adjusting the seller's electricity price and rules for adjusting the buyer's electricity price; The seller's electricity price adjustment rules are as follows: During the transaction period t, if P i,net If (t) < 0, then the photovoltaic microgrid i is identified as the energy seller, and the following settings are made. The transaction module generates a smart contract for sale, which includes the surplus energy to be sold and the selling price; The selling offer in the rth round of matching The calculation expression is as follows: in, It is the initial selling price, C bss It is the operating cost of energy storage equipment, P batt It refers to the capacity of the energy storage device, C. life It is the depreciation cost of photovoltaic equipment, P ini C represents the installed capacity of photovoltaic equipment. cur Let C be the energy waste cost, α be the energy waste ratio, and C be the energy waste cost. tr It is the cost of energy transmission; {A a,b } is the transmission distance matrix of the photovoltaic microgrid group, where a is the buyer index and b is the seller index; A a,b This represents the transmission distance between buyer a and seller b; tanh(r) is an inverse proportional function, representing a trend in price calculation. Initial selling price The calculation expression is as follows: Where min is the minimum value function. This indicates the export electricity price of the power grid company. This indicates the grid company's entry electricity price. The function tanh(x) represents the initial selling price at a given moment. x -e -x ) / (e x +e -x ), e is a constant, and SDR represents the day-ahead energy supply-demand ratio of a photovoltaic microgrid, defined as This represents the total supply, or surplus, of energy over 30 trading cycles. This represents the total demand, or energy deficit, over 30 trading cycles. The rules for adjusting the buyer's electricity price are as follows: During the transaction period t, if P i,net If (t)>0, the photovoltaic microgrid i is identified as the energy buyer, and settings are configured. The transaction module generates a smart contract for purchasing energy, which includes the required deficit energy and the purchase price. Purchase offer matched in round r The calculation expression is as follows: in, This is the initial purchase price, C bss It is the operating cost of energy storage equipment, P batt It refers to the capacity of the energy storage device, C. life It is the depreciation cost of photovoltaic equipment, P ini C represents the installed capacity of photovoltaic equipment. sh This represents the cost of load shedding, where β is the load shedding ratio. Initial purchase price The calculation expression is as follows: Where max is the maximum value function. This indicates the initial purchase price at a given moment.
8. The decentralized energy trading system for interconnected photovoltaic microgrid clusters based on blockchain according to claim 1, characterized in that: The block verification module is equipped with a contract data encryption unit, a blockchain transaction settlement unit, and a consensus mechanism verification unit. The contract data encryption unit is used to encrypt the electricity and price information in the smart contract generated by the transaction function module with a key, and then upload the encrypted smart contract to the blockchain energy trading platform for matching. Only the smart contracts uploaded by authorized and legitimate photovoltaic microgrids have the corresponding decryption key and can be matched. The consensus mechanism verification unit is used to verify the successfully matched smart contract using a consensus mechanism, confirm the validity and legality of the smart contract, and then connect the blockchain generated by the verified legal smart contract to the blockchain. The blockchain transaction settlement unit generates a ledger copy based on the distributed ledger of the blockchain, and then sends the ledger copy to the photovoltaic microgrid, which acts as a verification node. Each verification node maintains a ledger copy. The distributed ledger consists of blocks linked together in a blockchain. Each block contains detailed information about the final smart contract that was successfully matched from the blockchain energy trading platform, including the network addresses of the buyer and seller, transaction volume, contract execution price, contract execution timestamp, and hash value from the previous block.
9. The decentralized energy trading system for interconnected photovoltaic microgrid clusters based on blockchain according to claim 8, characterized in that: The consensus mechanism is a blockchain consensus mechanism based on PoR and Ripple cascade. The PoR mechanism selects a subset of photovoltaic microgrids with high transaction activity from all photovoltaic microgrids, and then uses these selected microgrids as verification nodes for the Ripple consensus mechanism, as detailed below: First, the PoR mechanism is executed. Each photovoltaic microgrid, i.e., network node, calculates its own reputation value based on the number of transactions and the proportion of transactions it participates in during the current transaction period in all transactions, and broadcasts its own reputation value to all network nodes. Each network node sorts all network nodes, including itself, according to its reputation value, and selects a group of network nodes with high reputation values as the set of validator nodes. Network nodes in the set of validator nodes have the opportunity to participate in consensus verification and block generation. Then, the Ripple algorithm is executed. Based on PoR, all validator nodes selected use a voting mechanism to verify the newly generated blocks. The consensus process is as follows: First, transaction verification: After a node in the validator node set receives transaction information (i.e., a successfully matched smart contract), it verifies the validity of the transaction information through local ledger data. Only legitimate transactions are accepted and enter the consensus process. Second, proposal broadcasting: The validator node packages the verified transaction information to be confirmed into a proposal and broadcasts it to other nodes in the validator node set. Third, voting and confirmation: The verification nodes that receive the proposal verify the transaction information in the proposal and vote according to their own ledger status. If more than 50% of the verification nodes vote in favor of the proposal, the transaction is confirmed and enters the next round of consensus process. Proposals with less than 50% approval are left to be confirmed in the next round of consensus process. Fourth, increase the voting threshold: gradually increase the voting threshold in each round of consensus to ensure that enough validator nodes participate in the consensus process; Fifth, final confirmation: when a proposal receives more than 80% of the votes from validator nodes, the blockchain network reaches a consensus, the proposal will be officially confirmed, and a new block will be generated by the validator node that initially formed the proposal and linked to the blockchain.
10. The decentralized energy trading system for interconnected photovoltaic microgrid clusters based on blockchain according to claim 9, characterized in that: The reputation value of the i-th network node during transaction period t is expressed as follows: Where κ represents the penalty instruction, M(t-1) represents the total number of transactions by all network nodes during the transaction period t-1, and m i (t-1) represents the number of transactions made by network node i during transaction period t-1; P total (t-1) represents the total transaction volume of all network nodes during the transaction period t-1, P i (t-1) represents the transaction volume of network node i during transaction period t-1.
Citation Information
Patent Citations
Photovoltaic microgrid transaction method based on block chain technology
CN108711077A
Block chain-based micro-grid distributed energy transaction method and system
CN113643131A