- 1Metrology Center of Guangxi Power Grid Co., Ltd, Nanning, China
- 2Electric Power Research Institute, CSG, Guangzhou, China
- 3Key Laboratory of Intelligent Measurement and Advanced Measurement Enterprises of Guangdong Power Grid, Guangzhou, China
In recent years, the residents’ demands for power supply is increasing. The load resource trading system responds to the demands through intelligent scheduling, which can effectively relieve the severe power load pressure. The load resource trading system is a type of nonlinear system because the trading price is adjustable with user’s credit, instead of being linear to the power trading volume. The adjustable load resource trading is faced with the challenges of large demands, strong user autonomy, and secure and tamper-proof transaction data. The blockchain technology has been widely concerned by industrial and academic domains due to its decentralization, strong encryption of account information, and traceability of transaction behaviour. In this paper, we propose a credible and adjustable load resource trading framework based on blockchain, which uses blockchain to achieve credible grid load resource trading. Firstly, we propose a two-layer blockchain architecture based on the alliance chain. The main chain maintains all the data of the system, and the station-area nodes constitute the alliance chain. We design a distributed trading processing mechanism based on hybrid consensus and sharding technologies, which promotes the speed of cross-station transaction consensus. Next, we propose a two-level bidding model, which determines the trading price of load resources based on the maximum benefit of users and the lowest cost of grid companies. The results of extensive experiments shows that our proposed framework can achieve the promising result.
1 Introduction
The current social power resource distribution is unbalanced, and the urban power burden is increasing day by day. Especially, residents’ demands for stable and flexible power supply are increasing with the improvement of quality of life. For example, during the summer power peak, the peak load of the grid continues to climb, but the duration is very short. High peak-valley difference brings great challenges to the stability of the power network and economic operation. Credible and adjustable load resource trading can start, stop, and adjust the operation status of the power supply equipment and the energy storage equipment, according to electricity price and transaction information. It alleviates the contradiction between supply and demand, and ensures the stable and efficient operation of the large smart grid.
Targets for credible and adjustable load resource trading include decentralized autonomy and reliable transactions. Decentralized autonomy refers to that grid companies only need to publish relevant power consumption control indicators, and do not need to participate in residents’ power load management in depth. Users are allowed to trade electricity, manage their peak power consumption range, and monitor the specific electricity consumption of each household appliance. To achieve decentralized autonomy, grid participants from all regions need to spontaneously coordinate, respond, and jointly maintain the operation of the low-voltage interactive response management platform. This can not only reduces the business burden of grid companies but also makes power load resource scheduling more flexible and improves the utilization of sustainable power resources. Reliable transactions refer to the integrity, consistency and accuracy of electricity and transaction data. All data cannot be tampered with. Specifically, data records shall truly reflect the actual operation or process. Original data shall be directly and synchronously recorded into the formal record according to the corresponding procedures or regulations at the time when it is generated or observed. Transaction can be traced to the creator of the data through the signature and other information in the record.
Traditional load resource trading relies on third-party central institutions or trusted intermediaries, which manage and endorse user data in the form of central nodes or service platforms. However, the third-party central institutions will not only increase the data processing and trading costs, but also may cause a reduction in service quality and even a crisis of trust. Blockchain technology provides decentralized services, with the characteristics of strong encryption of account information and traceability of transaction behaviour [1,2]. Blockchain stores, verifies, transmits transaction data through distributed nodes of the network, and ensures the tamper-proof and consistency of transaction data through consensus technology and Merkle hash tree, thereby having attracted extensive attention from industry and academia. Although some researchers have applied blockchain technology to the smart grid, such as data trading [3–5], electric vehicle charging and discharging management [6,7], and micro-grid energy auction [8], it is still in its infancy and needs to be improved.
Therefore, we propose a framework on credible and adjustable load resource trading based on blockchain, which employs blockchain technology to achieve reliable grid load resource trading, and encourages users to actively respond and participate in reasonable power resource scheduling. The blockchain adopts the bookkeeping method of distributed ledger, and blockchain data are transparent and open and cannot be tampered with, which can prevent the power demand response business from recording false and wrong accounts. As shown in Figure 1, the low-voltage interactive response terminal collects the power consumption data of each smart home appliance in the user’s home, and sends part of the data to the IoT platform through the WiFi module, and controls the smart home appliances to realize information interaction with users. At the same time, all the collected information is transmitted to the low-voltage interactive response management platform through the blockchain encryption link, and the acquired data are synchronized to the station-area node. The station-area node collects the data of all low-voltage interactive response terminals in the station area and makes consensus with other station-area nodes in the station area. The transaction data between different station areas are agreed and stored by the selected special station-area nodes. As the full node of the blockchain, the master station is responsible for synchronizing the node data of station areas and storing all the data in the whole system. There are four roles in the system: low-voltage users, grid companies, load aggregators, and regulators. Low-voltage users are the main participants in the trading. The grid company is mainly responsible for making decisions on electricity prices and smart contract writing. The load aggregator is responsible for aggregating user demand responses and other information. The regulatory authority supervises and manages the whole process.
Based on the blockchain architecture, we propose a reliable synchronous diffusion mechanism of transaction data based on sharding. Full nodes of the grid master station maintain a main chain, and the station-area node forms an alliance chain. The data of the alliance chain consensus is synchronously spread to full nodes of the master station, and full nodes maintain all data of the system. We design a hybrid consensus mechanism of “response strength + PoW + PBFT”. Then the distributed trading processing is implemented based on the sharding technology to improve the scalability of the system. At last, we build a transaction system of users’ low-voltage load demand response, and design a two-layer bidding model based on the maximization of users’ interests and the lowest cost of grid companies. The upper level model is designed for the transaction matching stage, and the goal is to maximize the interests of all groups of users participating in demand response transactions. The lower level model corresponds to the settlement stage. It runs smart contracts, and achieves information release, transaction matching, transaction settlement, price incentive and other trading processes.The goal is to minimize the cost of the grid company.
To sum up, our main contributions are as follows.
• We propose a framework for credible and adjustable load resource trading, which uses blockchain technology to achieve reliable grid load resource scheduling and power resource trading for low-voltage users.
• We propose a two-layer blockchain architecture based on the alliance chain. We design the mixed consensus mechanism and distributed trading processing based on sharding, in order to achieve reliable synchronization of blockchain node data.
• For grid load trading, we design the trading rules and a two-layer bidding model, with the goal of making balance between different groups.
• We conduct extensive experiments on blockchain prototype system. The experimental results show the effectiveness of our proposed framework.
The remainder of this paper is organized as follows. We summarize the related work in Section 2. The system model is presented in Section 3. We discuss about the synchronous diffusion mechanism of transactions in Section 4. We present the low-voltage load demand response trading scheme in Section 5. The experimental design and results are presented in Section 6. Finally, Section 7 presents the conclusion.
2 Related work
Recently, researchers begin to use the alliance blockchain framework for credible and adjustable load resource trading. In [9,10], an alliance blockchain based system is proposed for reviewing and verifying transaction data. The schemes in [3–5] enable secure data sharing and storage in the internet of vehicles as well as the reliability and integrity of data transmission. In [6,7], an alliance chain for building a secure energy trading and an electric power trading system are proposed. [11] proposed a P2P energy blockchain system in the energy transaction scenario of the industrial Internet of things. [8] proposed a micro-grid energy auction method based on alliance blockchain to protect the privacy information of each participant. [12] proposed a security privacy protection scheme based on medical health network.
A large number of researchers have begun to increase the throughput of transactions on blockchain via sharding and improving the consensus mechanism. [13] proposed to use a three-tier architecture of shards to ensure the availability of consumers’ data, limit competitors’ access, and provide scalability for processing transaction loads. [14] proposed a polynomial coding sharding scheme, which realized the information’s theoretical upper limit of storage efficiency, system throughput and trust. [15] proposed a novel two-layer scalable blockchain architecture. In the upper layer of the chain, sharing-oriented shards are used to achieve safe and efficient processing of macro-transactions on the chain. Off-chain layer is designed for handling real-time shared transactions. [16] proposed the membership-based hierarchical sharding system. [17] designed a layered and fragmented consensus based on the collaboration between multiple partitions.
For the demand response system, many researchers begin to pay a lot of attention to the competition model that maximizes the interests of all parties. For instance, an interactive system is designed in the context of power trading market using distributed controllers and centralized auction trading markets in [18–21]. [22] studied the operation models of multiple virtual power plants. [23] designed a distributed iterative algorithm that converges to the variational decomposition of the generalized nash equilibrium problem and a supplementary demand side management program. [24] proposed the optimal bidding model of electric vehicle aggregator based on the relationship between market price and bidding price. [25] proposed an optimal bidding strategy model for implementing the demand response program. [26] formed a daily demand curve or minimize peak demand. [27] modelled demand response bidding in the real-time balanced market. [28] proposed to manage the power distribution (charging and discharging) of plug-in electric vehicles that support vehicles to the power grid. [29] proposed an optimal control strategy and an optimal bidding strategy. [30] proposed a one-way adjustment algorithm for aggregators. [31] proposed a new scheme to optimize virtual power plant operation and bidding strategy. [32] devised a short-term planning framework that predicts the load under dynamic electricity prices via building a bidding curve. [33] proposed a robust optimal bidding strategy based on risk measurement. [34] proposed the concepts of just-in-time transmission and process-gate bidding. [35] proposed a compensation mechanism of load aggregators to perform the direct thermostat control program. [36] proposed a two-stage process based on robust optimization. [37] established a new method in to analyze the economic impact of vehicle-to-grid regulatory reserves.
3 System model
The blockchain system in smart grid consists of a main chain and alliance chains. The main chain is composed of nodes in the cloud data center of the grid company. Each node is a full node in the blockchain and stores all data of the whole system. An alliance chain is composed of station-area nodes, where each station-area node manages the low-voltage users of the corresponding zone and stores all the transaction data of those users. Each household uses intelligent terminal equipment to manage household power consumption and join the alliance chain as a lightweight node. It is noted that the number of low-voltage users is huge, and various power load transactions and incentive response businesses incur a considerable amount of data. If the traditional blockchain is used, all nodes need to broadcast data to the whole system to reach a consensus before they can successfully add data to the main chain. This will not only consume a lot of computing resources, but also affect the data transmission efficiency. In order to improve the throughput and scalability of the entire blockchain system, we take the main chain of the grid company as the beacon chain, and build an alliance chain for each station area. A station area contains multiple station-area nodes. Each station-area node manages multiple lightweight low-voltage user nodes. Each lightweight low-voltage user node conducts various business transactions with the station-area node by controlling the low-voltage interactive response terminal equipped by the family. The alliance chain diffuses the data to the main chain, and the main chain performs the data synchronization of the whole network. The advantage of designing lightweight interactive nodes for users lies in their strong real-time performance, which can accurately record the electric energy transactions of low-voltage users in a timely manner. The data transmission mechanism optimized layer by layer by vertical structure can improve the operation efficiency of the blockchain system.
The blockchain system in smart grid takes smart contract as the main body. The main chain has strict requirements on data integrity, privacy, security, and supervision, because it involves all data of power consumption and demand response. The business responses of the grid companies, load aggregators, lightweight low-voltage users and other implementation entities must be uploaded to the regional alliance chain before being synchronized to the main chain network. The function of the alliance chain is to connect a large number of demand response terminals, at the same time, collect the demand response services of various low-voltage users, thereby improving the data throughput and scalability of the entire system.
As shown in Figure 2, the blockchain-based smart grid is mainly divided into three layers: hardware layer, core layer and application layer.
3.1 The hardware layer
The hardware layer is composed of intelligent appliances, gateways, low-voltage interactive response terminals, station-area nodes and master stations. The main control chip inside the intelligent gateway uploads the collected data such as voltage, current, power, household appliance switching time and household appliance status to the terminal. Considering the hardware storage and performance problems, the low-voltage interactive response terminal only stores the power consumption information related to the home, and joins the alliance chain where the station area is located as a lightweight node. In general, the user’s transaction, electricity information and other data are synchronously diffused from the low-voltage interactive response terminal to the station-area nodes in this station area. One station-area node manages multiple intelligent terminal devices. Each terminal device is bound to each user. Finally, the data is synchronously spread from the station-area node to full nodes of the master station.
3.2 The core layer
The station-area nodes are organized into an alliance chain according to geographical regions. Each alliance chain stores and maintains all transactions and data of users associated with low-voltage interactive response terminals in the chain, and runs its own consensus mechanism independently. These alliance chains will synchronously spread all data to full nodes of the main chain, make consensus on the main chain and store it on the chain. The main chain, as a beacon chain, sends corresponding demand response instructions to the network and records the response results of all station-area nodes. Full nodes of the main chain will audit and evaluate the response effect according to the implementation requirements of the deployed smart contract, and maintain the data of the entire system. All data information stored on the chain cannot be changed. Users can view their own related transactions, electricity and other information on the chain. To improve the efficiency of the whole blockchain-based grid system, we also adopt blockchain sharding technology to design a reliable synchronization mechanism for cross-station-area transactions, which enables users from different station areas to conduct trusted transactions.
At the core level, there are three entity roles: load aggregator, grid company and regulatory authority. The load aggregator is responsible for aggregating the demand response and other information of low-voltage users. The grid company is mainly responsible for making decisions on electricity price and smart contract. The regulatory authority supervises and manages the whole trading process and the operation of the grid system. When the grid company needs to release new power data, it will synchronously spread the data to each low-voltage user’s intelligent interactive device with the help of blockchain network broadcast service information, and feed back to the user through the low-voltage interactive response APP on the mobile terminal. Similarly, when users conduct transactions, the information needs to be uploaded to the main chain, which integrates the transactions and power consumption data within a period of time and broadcasts them to the whole network. In this process, the regulatory authority can meet user needs at any time to view and trace relevant transaction data to ensure the security of data on the chain.
3.3 The application layer
The low-voltage interactive response APP receives the interactive response demand from the grid company, collects and reports the bidding response information from users in a unified way, and realizes the low-voltage user interactive response business processing, interactive response strategy generation, user management, and data query and display. Low-voltage users will generate their own independent user codes when accessing the blockchain network, and control the low-voltage interactive response terminals loaded in the home through the low-voltage interactive response APP, so as to meet the needs of low-voltage users in the same or another station area. For example, a low-voltage user works overtime tonight, so the household electricity load is small during this period. After this situation is reported to the system, the system will release the invitation information and distribute the power to other low-voltage users who have successfully bid; The low-voltage interactive response APP will reward or punish users according to their performance, thus reducing the peak pressure of power consumption in the whole grid. Users can view their own uplink historical data, which cannot be changed or deleted. However, to protect the privacy of each low-voltage user, users cannot view others’ uplink data. When the system generates a new block, it also generates a large number of rewards, that is, power incentive points. The points will be managed by the grid company in a unified way. Low-voltage users can reasonably allocate their own peak power consumption interval by participating in the inductive load reduction compensation notice invitation sent by the power supplier, so as to reduce the power load and respond to the power supply, thus ensuring the stability of the grid. On the other hand, in combination with the incentive compatibility demand in the new energy electric vehicle Internet, the battery of the electric vehicle is used as a distributed energy storage system to select discharge at the peak load and charge at the low load, balance the peak load of energy, reduce the fluctuation level of resource supply, and realize the scheduling and commercial use of intelligent energy. In addition, photovoltaic new energy technology is used to realize the self-use of photovoltaic power generation. Excess electricity can be sold to grid companies at the discretion of low-voltage users. Each low-voltage user will have the credit value of his/her own account. By actively responding to the energy-saving incentive plan, accurately reporting electricity information, and conducting power resource transactions among users in good faith, high credit points can be maintained. Reliable users with integrity will get more preferential rights and interests, while users with low integrity will not only be included in the credit file, but also have some impact on personal daily electricity use.
4 Synchronous diffusion mechanism of transaction data based on sharding
In this section, we study the synchronous diffusion mechanism of transaction data. We make full use of the tamper-resistant feature of the blockchain to ensure the accuracy of transactions, and achieve reliable synchronization of blockchain data. All nodes of the power grid master station maintain a main chain, and the low-voltage interactive response terminal synchronously diffuses the generated comprehensive energy service data to the nodes of the local station area. Nodes of the same station area reach a consensus on the data. Each alliance chain is associated with the main chain, and the data are synchronously diffused from the station-area node to all nodes of the master station. All nodes agree and store the data in the main chain, which can ensure the synchronous diffusion of demand response transaction data in the station area. When the block is coming out, the grid company will calculate the demand response strength of each station according to the detailed information of the demand response report during the block out period and the user feedback data, and determine the bookkeeping node in each station area.
4.1 Design of consensus mechanism
The grid system is based on the alliance chain. The nodes themselves have independent identification codes and have certain credibility with each other. We design a hybrid consensus mechanism of “response strength + PoW + PBFT”, which groups the nodes according to the transaction granularity, reduces the number of nodes participating in the consensus, and improves the consensus efficiency. The response mechanism of the station-area nodes is based on the response value of the station-area node within the station area to the business needs of grid companies. If a user actively participates in the energy conservation incentive plan of the grid, he/she will obtain high response value. The higher the response value, the more incentive points, and the higher the credit certificate. The full name of PoW is Proof of Work. All nodes in the station region use their computing power to solve a mathematical problem. The nodes that get the correct results will be eligible to generate new blocks, thus obtaining the accounting right of the block. PBFT is a distributed system consensus algorithm that can tolerate Byzantine errors. Its purpose is to improve the node fault tolerance of the blockchain network and improve the throughput of cross-region transactions.
In the hybrid consensus mechanism, because of the credibility provided by the alliance chain, the station-area node does not need to do more PoW consensus proof, which can avoid the formation of computing power competition and resource waste in the whole network and reduce the computing pressure of nodes. The rewards obtained from the blocks will be uniformly recovered and managed by the grid, and then a certain amount of power incentive points will be issued according to the credit value and the response business strength. Considering the strong interconnection of the station-area nodes on the physical equipment, in order to get a better experience when users interact with the blockchain grid using lightweight interactive terminals, nodes in the blockchain can be divided into groups via the sharding technology. Each partition processes transactions in parallel, which can significantly improve the throughput and scalability of the blockchain.
4.2 Trading process within the station area
The transactions within the station are all in the same alliance chain. Each user node only stores the transaction data related to itself. The station-area node stores the data of the entire station. The synchronization consensus is completed within the station area. In order to facilitate users to manage and operate their own nodes in the mobile device and lightweight network environment, the low-voltage interactive response terminal will only store key information related to users, such as user name, password, power equipment, and power quota statistics, and redundant data will be uploaded to the station. For example, in a certain period of time, low-voltage users A and B conduct demand response transactions: A has a small demand for electricity, which is reported to the system to respond to, and B purchases the electricity. If two users are judged to belong to the same station, user B confirms whether A’s credit value is lower than the penalty threshold and whether his balance is sufficient. After confirmation, both parties can quickly conduct transactions. A needs to save the submitted response power within this time period. After the transaction is completed, the smart contract will compare the response value submitted by user A with the actual load of user A obtained from the low-voltage interactive response terminal, in order to determine whether user A performs. According to the performance of users, corresponding rewards and punishments will be given.
4.3 Cross-area Trading process
We propose the reliable synchronous blockchain model for cross-area transactions based on blockchain sharding. Existing blockchain sharding methods can be divided into two types: full sharding and partial sharding. In the full sharding model, each node only stores the transaction data in its own shard. Hence cross-shard transactions will incurs large time and communication overhead. In the partial sharding model, cross-shard nodes store data of multiple shards. Even if the sender and receiver of a transaction are located in two different shards, the cross-shard nodes can verify the legitimacy and atomicity of the transaction based on their own kept data, without the cross-shard communication. In this way, the cross-shard transactions are transformed into intra-shard transactions, thereby reducing time cost. Therefore, we choose partial shards. The nodes in each state area comprise a shard. We divide the station-area nodes into two categories. The station-area nodes used for cross-area interaction are called cross-nodes, and other nodes are called normal-nodes. Cross-nodes store data of different shards, and they are not resident. They are selected by the credit mechanism and then re-selected periodically in the area. Power incentive points will be awarded to corresponding lightweight users.
According to the total credit value and the variance of credit value of users in the station area, we combine the two factors to select the station-area node with a stable upward trend in credit value. These key nodes use the client driven mechanism to submit cross-area transactions, store all cross-area transaction data, and complete cross-area consensus, storage, and communication. As shown in Figure 3, when a user sends a request for the cross-area transaction, the node of the area where the user belongs to will initiate a cross-area consensus and call a universal smart contract that supports cross-area transactions.
A cross-area transaction means that both low-voltage users of the transaction are not in the same station area. If both parties to the transaction are judged to be located in different areas, they will initiate a transaction request at the cross-node in their respective station. It is worth mentioning that since transactions in different areas are asynchronous, data synchronization across areas is required. In addition, the atomicity of cross-area transactions must be guaranteed. The process of cross-area transactions is as follows.
(1) After a low-voltage user node in area A sends a cross-area transaction request, he/she broadcasts the request to the alliance chain of A. For example, if user B works overtime tonight and does not use electricity at home, he/she will report the situation to the system and distribute electricity to the user A in different areas.
(2) Cross-nodes i and j, both located in areas A and B, will initially verify the legitimacy and atomicity of the transaction after receiving the request. Atomicity means that the sender has enough balance, so that the sender has enough expenses to pay. The receiver actually saved the response power within the specified time according to the content agreed in the smart contract. Therefore, the alliance chain of the sender must confirm that there is enough balance in user A’s account to pay, and the alliance chain of the receiver must confirm that user B has saved the response power in this period of time. If the user fails to perform, the user can be warned and powered off.
(3) After the transaction, all nodes of the grid company will judge whether user B performs according to the provisions of the smart contract, and give corresponding rewards or punishments to users according to the performance. Finally, the two cross-nodes, i and j, will package all the transaction data into blocks after completing the consensus of the A’s and B’s areas, and broadcast them to the alliance chains to complete the synchronization of cross region data. At the same time, the cross-node will synchronize the block to all nodes of the main chain, and the block will recorded on the main chain after all nodes have reached a consensus.
4.4 Tracing and querying blockchain Transactions
To ensure the authenticity and reliability of transaction data, we have provided low-voltage users with query services for tracing blockchain transactions, blocks, transaction time, by making use of the openness and transparency of blockchain data. For business transaction data in question, low-voltage users can first submit a query service request to nodes of their own areas. In order to protect the privacy of other low-voltage users, the data queried are limited to those existing with them. If it is found that the sender or receiver of the transaction to be queried is not in this area, the relevant request shall be submitted to the regulatory authority, which will view the main chain information of the grid company and feed back the detailed transaction data records on the user chain.
To achieve transaction traceability, it is necessary to increase the transparency of data governance. The trusted and queriable transaction system can open the door to new digital reliability sharing services. All online data are processed with encryption technology to fully protect the privacy of low-voltage users. A transaction chain governance model is established to provide network supervision, so as to optimize the reliable synchronous diffusion mechanism of the entire transaction data.
5 Low-voltage load demand response trading
Low-voltage load demand response of users refers to the power consumption adjustment made by users according to the demand response of the grid when the power consumption peak or low peak occurs due to the unbalanced load of the grid. The user completes the demand response transaction based on the principle of signing a contract before demand response and clearing after demand response according to the point to point transaction power consumption time and load of his own demand. Low-voltage load demand response of users is realized by running the smart contract in the lightweight blockchain system. The grid companies, low-voltage users, aggregators and regulators in the system run the smart contract to achieve information release, transaction matching, transaction settlement, price incentive and other functions to complete the trading process. The trading system consists of three modules: low-voltage side adjustable capacity resource pool, trading rules and price incentive mechanism. Among them, the response volume and expected price provided by users during bidding form a low-voltage side adjustable capacity resource pool, which together with the terminal equipment provides the data source for the smart contract. When users run the smart contract, they will match and conduct point-to-point transactions according to the data and transaction rules of the resource pool, and settle after the end of the demand response cycle. The transaction matching and transaction settlement constitute a two-level bidding model with the goal of maximizing the interests of users and systems. After the demand response cycle is completed, the price incentive mechanism will be implemented when verifying whether the user performs the contract. A corresponding proportion of price incentives will be given to the users who perform the contract, and economic penalties will be given to the users who break the contract.
In the low-voltage load demand response trading system, the grid company issues demand response signals according to the load dispatching demand; low-voltage users independently choose to participate in the demand response trading process according to the optimal strategy provided by the signal and bidding model. The aggregator conducts transaction settlement with the goal of maximizing the return of users and grid demand response. The regulatory authority is responsible for formulating trading rules and supervising the process of trading. The specific transaction system is shown in Figure 4.
We present a two-level bidding model in subsection 5.1. As shown in Figure 4, this model is used for transaction matching and transaction settlement. Next, we present the details of the trading process based on smart contracts. The two-level bidding model is the theoretical basis of transaction processing.
5.1 A Two-level bidding model to maximize the interests of users and minimize the cost of grid companies
The bidding model consists of two levels: the upper level corresponds to the transaction matching stage, with the goal of maximizing the interests of all groups of users participating in demand response transactions; The lower level model corresponds to the settlement stage, and the optimization goal is to minimize the cost of the grid company.
5.1.1 The upper level model
The upper level model aims to maximize the interests of group users under the constraints of communication cost, signing and actual power load, signing and actual power price. We use Iusers to denote the income of low-voltage users. We use a and b to denote the buyer and seller of point-to-point transactions, respectively. i and j denote the number of the station where low-voltage users are located. t denotes the time. C denotes the comfort cost. Wtia represents the load signed by the seller in the i station at time t. ptia denotes the unit price of the seller’s contracted electricity in the i station at time t, and
5.1.2 The lower level model
The lower level model aims to minimize the cost of grid companies under the constraint of marginal generation cost price. We use ICSG to denote the cost of the grid company, ptjm to denote the generation price of the grid beyond the demand response plan, and β to denote the real-time price adjustment coefficient. If all users fulfill the agreement, the cost of the grid will just offset the settlement amount of the user’s participation in the demand response. However, in the settlement stage, when a user defaults, there may be two situations: excessive power consumption and failure to reach the agreed power load. Therefore, we use
5.2 Trading process
The trading process can be generally divided into five stages: user registration, information release, transaction matching, transaction settlement and price incentive. The specific trading process is shown in Figure 5.
5.2.1 User registration stage
Firstly, all roles involved in the user low-voltage load demand response trading system are registered in the blockchain system, including grid companies, aggregators, regulatory companies, and low-voltage users. According to the different roles of registration, they perform different functions in the low-voltage load response trading system. After registering in the blockchain system, users can participate in demand response through smart contracts.
5.2.2 Release demand response stage
The initialization function Initial(): according to the load scheduling demand, the grid company sends a demand signal to all users in the blockchain system through the Initial() function. A global variable of boolean type will be set in the function. If the variable is true, it means that it is allowed to participate in this demand response.
Information collection function GetUsersInformation(): the aggregator collects the information of low-voltage users participating in this demand response point-to-point transaction using the information collection function GetUsersInformation(). The information collected is divided into two parts: buyer information and seller information. The information collected from these two parties is used to calculate the maximum profit of the user in the transaction matching of the bidding model. The buyer information includes the demand load, the price acceptable to the user, the desired response time, and the station area where the user is located. The seller information includes the load, price, response time, user’s station area and user’s credit value that the seller intends to provide.
Qualification verification function QualificationVerification(): at the same time, it is necessary to ensure that the seller is qualified to provide demand response quantity, so it should be verified by the function QualificationVerification().
5.2.3 Transaction matching stage
Profit maximization function for low-voltage users MaxUsersProfit(): At this stage, the aggregator calculates the maximum profit of the user through the function MaxUsersProfit() and lists the matching pairs of transactions under the condition of maximizing the benefits. This trading pair is fed back to the user so that the user can decide whether to choose the trading matching result, which is implemented by the bidding model. The variables calculated by the user are from the information collection function.
Submission function Confirmtransaction(): After the aggregator calculates the user’s maximum profit, the Confirmtransaction() function is required for the user to submit.
Confirmation function Confirm(): To ensure the user’s privacy, the confirmation function Confirm() needs to be confirmed by the buyer and the seller respectively. After the buyer and the seller confirm respectively, the aggregator collects the confirmation results and submits them to the blockchain system for the next stage of transaction settlement.
5.2.4 Transaction settlement stage
Credit value settlement function SettlementCredit(): according to the comparison between the data obtained from the user intelligent terminals of the buyer and the seller after the completion of the demand response phase and the electricity quantity in the contract, if the contract is performed, the credit value of the user in this transaction will be increased by two points. If the contract is breached, the credit value will be decreased by four points for the settlement of credit value.
Amount settlement function SettlementAmount(): the load and price at the time of signing the demand response contract and after the completion of the demand response phase are compared. The point-to-point trading parties settle the transaction amount. The real-time electricity price at the time of demand response is priced by the grid company with the lowest cost as the optimization goal.
5.2.5 Price incentive stage
Price incentive function PriceIncentives(): in this stage, according to the credit value obtained by the user whether to perform the contract in the transaction settlement and the real-time electricity price in response, the reward and penalty prices for normal electricity use in the later period are calculated by the RP price incentive model based on the user’s credit value.
Penalty function Punish(): according to the user’s credit value when completing the transaction, it can judge whether the low-voltage user has reached the power outage threshold. That is, if the credit value is lower than 50, the intelligent terminal will be controlled to power off.
6 Evaluation
In the evaluation, we test the reliable synchronous blockchain model. Notice that this synchronous blockchain model is built on partial sharding where cross-nodes store transactions of different station areas. Hence, we compare the partial sharding with the full sharding technique.
6.1 Experiment settings
Experimental data sets. The experimental settings are shown in Table 1 s represents the number of shards, n represents the number of nodes, and m represents the number of transactions. The number of shards varies in [2,3,4,5,6,7,8,9,10], and the number of nodes varies in [2,3,4,5]. In the storage overhead experiment, assuming that the number of transactions stored in different shards is the same. The number of transactions in each shard varies in [250,500,750,1000]. The number of slices varies in [2,3,4]. The blockchain accounts participating in the power points transaction are distributed in different shards according to the station area they are located in. The cross-node stores transactions in their own regions and cross-district transactions, while a normal-node only stores cross-sharding transactions in their own regions and related transactions. Transactions are generated by a blockchain prototype systems 1.
Metrics. Time cost and storage cost are used to evaluate the performance of the methods. In terms of time cost, when the number of shards is fixed, the more nodes, the more consensus time may be required, and the time cost will increase accordingly. When the number of nodes is fixed, the more shards there are, the more consensus time may be required. In terms of storage overhead, since a cross-node needs to store two or more pieces of data, the storage overhead will be much higher than that of a cross-node in the sharding. As the number of shards increases, the storage overhead of the cross-node will increase accordingly.
Experimental environment. A blockchain prototype system has been built for the evaluation. The prototype system runs in a server with a 12th Gen Intel® Core™ i7-12700F processor and 128 GB memory. We use the Ubuntu22.04 operating system. All algorithms were coded with Java. Multiple virtual nodes were generated with Docker.
Competitors. We tested the time cost and the storage cost. We tested the influence of the number of nodes and the number of shards. We compare two sharding methods: full sharding and partial sharding. The sharding methods used in this paper is partial shard. We also tested the storage overhead of the two types of nodes, that is, normal-node and cross-node, in the partial sharding method. The full sharding storage model only contains normal-nodes, and the entire blockchain ledger is divided into several disjoint ledgers and stored in normal-nodes. Each shard maintains its own ledger, and all shards of the entire blockchain network have a complete ledger together. In the partial sharding storage model, a cross-node stores data of multiple shards and processes cross-sharding transactions, so as to shorten the consensus time, but this may bring a huge storage.
6.2 Results of the experiments
6.2.1 Influence of the number of nodes on time cost
In this experiment, we fixed the number of shards as 2,3,4,5,6,7,8,9, and 10, respectively. We tested the time cost required for full shards and partial shards, respectively. The experimental results are shown in Figures 6–8.
From the experimental results, we can see that the time cost of full shards is much higher than that of partial shards, and with the increase of the number of nodes, the time cost shows an overall upward trend. The main reason is that the increase in the number of nodes will affect the consensus time. We use s = 2 as an example. When n = 2, the time cost of partial shards is 54.3% of that of full shards. When n = 3, the time cost of partial shards is 51.9% of that of full shards. When n = 4, the time cost of partial shards is 54.3% of that of full shards. When n = 5, the time cost of partial shards is 75.5% of that of full shards.
6.2.2 Influence of the number of shards on time cost
In this experiment, we fixed the number of nodes as 2, 3, and 4, respectively. When the number of shards is in [2,3,4,5]. We compare the time cost of the cross-chain transaction between full shards and partial shards. Figure 9 shows the impact of the number s of shards on the time cost of cross-chain transactions of full shards and partial shards. The time cost of cross-chain transactions of full shards is much higher than that of partial shards. With the increase in the number of shards, the time cost of full shards is on the rise as a whole, while the partial shards are relatively stable. The main reason is that the increase in the number of shards involved in cross-chain transactions will lead to an increase in consensus and communication time for full shards. However, because partial shards use cross-nodes to store multiple pieces of data, the consensus needs to be conducted only once. We use n = 2 as an example. When s = 2, the time cost of partial shards is 47.5% of that of full shards. When s = 3, the time cost of partial shards is 28.7% of that of full shards. When s = 4, the time cost of partial shards is 16.6% of that of full shards. When s = 5, the time cost of partial shards is 17.1% of that of full shards.
6.2.3 Storage overhead
We compare the storage overhead required by a normal-node and a cross-node in partial sharding model. The number of transactions is in [250,500,750,1000]. We assume that each shard stores the same number of transactions. The results of the experiment are shown in Figure 10. We can see that the storage overhead of a cross-node is much higher than that of a normal-node. With the increase in the number of partitions, the storage overhead of a cross-node will continue to increase. This is because a cross-node will store all the data of the shards, so the storage overhead must be higher than that of a normal-node. When s = 2, the storage overhead of a normal-node is 50% of that of a cross-node. When s = 3, the storage overhead of the a normal-node is 33.5% of that of a cross-node. When s = 4, the storage overhead of a normal-node is 25% of that of a cross-node.
6.2.4 Conclusion of the experiments
With respect to the time cost, for full shards, with the increase of the number of nodes or the number of shards, the time cost becomes larger. For partial sharding, the time cost increases slightly with the number of nodes. When the number of shards involved in cross-chain transactions is more, the time cost of partial shards will be far less than that of full shards. Therefore, partial sharding performs better than full sharding. With the increase in the number of shards, the storage of a cross-node will become larger.
7 Conclusion
We have proposed a credible and adjustable load resource trading framework based on blockchain. The blockchain system uses the master station as the full node and the intelligent interactive terminal/module as the lightweight node. To realize the reliable synchronization of blockchain data, we have proposed a synchronous diffusion mechanism. Combined with the low-voltage side adjustable capacity resource pool and market trading rules, We have constructed the user low-voltage load demand response trading system. A two-level bidding model based on maximizing the interests of users and minimizing the cost of grid companies is proposed. The upper-level model corresponds to the transaction matching stage, and the lower-level model corresponds to the settlement stage. We have tested the proposed method on the blockchain platform, and the experimental results demonstrates the effectiveness of our method.
Data availability statement
The original contributions presented in the study are included in the article/supplementary material further inquiries can be directed to the corresponding author.
Author contributions
WJ, XL, and ZY contributed to conception and design of the study. YX, KZ, BQ, and MZ organized the database and performed the statistical analysis. All authors contributed to manuscript writing, revision, and approved the submitted version.
Funding
This work was supported by the Science and Technology Project of Guangxi Power Grid Co., Ltd (044400KK52200003).
Acknowledgments
The authors would like to thank all of the people who participated in the studies.
Conflict of interest
Authors WJ, ZY, and KZ were employed by the Metrology Center of Guangxi Power Grid Co., Ltd.
The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
Footnotes
1https://github.com/reveup/myproject.git
References
1. Zheng Z, Xie S, Dai H-N, Chen X, Wang H. Blockchain challenges and opportunities: A survey. Int J web grid Serv (2018) 14:352–375. doi:10.1504/IJWGS.2018.10016848
2. Nofer M, Gomber P, Hinz O, Schiereck D. Blockchain. Business Inf Syst Eng (2017) 59:183–7. doi:10.1007/s12599-017-0467-3
3. Zhou Z, Wang B, Guo Y, Zhang Y. Blockchain and computational intelligence inspired incentive-compatible demand response in internet of electric vehicles. IEEE Trans Emerging Top Comput Intelligence (2019) 3:205–16. doi:10.1109/TETCI.2018.2880693
4. Kang J, Yu R, Huang X, Wu M, Maharjan S, Xie S, et al. Blockchain for secure and efficient data sharing in vehicular edge computing and networks. IEEE Internet Things J (2018) 6:4660–70. doi:10.1109/JIOT.2018.2875542
5. Zhang X, Chen X. Data security sharing and storage based on a consortium blockchain in a vehicular ad-hoc network. IEEE Access (2019) 7:58241–54. doi:10.1109/ACCESS.2018.2890736
6. Li M, Hu D, Lal C, Conti M, Zhang Z. Blockchain-enabled secure energy trading with verifiable fairness in industrial internet of things. IEEE Trans Ind Inform (2020) 16:6564–74. doi:10.1109/TII.2020.2974537
7. Guo J, Ding X, Wu W. A blockchain-enabled ecosystem for distributed electricity trading in smart city. IEEE Internet Things J (2020) 8:2040–50. doi:10.1109/JIOT.2020.3015980
8. Hassan MU, Rehmani MH, Chen J. Deal: Differentially private auction for blockchain-based microgrids energy trading. IEEE Trans Serv Comput (2019) 13:1–275. doi:10.1109/TSC.2019.2947471
9. Chen C, Wu J, Lin H, Chen W, Zheng Z. A secure and efficient blockchain-based data trading approach for internet of vehicles. IEEE Trans Vehicular Tech (2019) 68:9110–21. doi:10.1109/TVT.2019.2927533
10. Gai K, Wu Y, Zhu L, Qiu M, Shen M. Privacy-preserving energy trading using consortium blockchain in smart grid. IEEE Trans Ind Inform (2019) 15:3548–58. doi:10.1109/TII.2019.2893433
11. Li Z, Kang J, Yu R, Ye D, Deng Q, Zhang Y. Consortium blockchain for secure energy trading in industrial internet of things. IEEE Trans Ind Inform (2017) 14:1–3700. doi:10.1109/TII.2017.2786307
12. Zhang A, Lin X. Towards secure and privacy-preserving data sharing in e-health systems via consortium blockchain. J Med Syst (2018) 42:140–18. doi:10.1007/s10916-018-0995-5
13. Malik S, Kanhere SS, Jurdak R. Productchain: Scalable blockchain framework to support provenance in supply chains. In: 2018 IEEE 17th International Symposium on Network Computing and Applications (NCA) (IEEE); 01-03 November 2018; Cambridge, MA, USA (2018). 1–10. doi:10.1109/NCA.2018.8548322
14. Li S, Yu M, Yang C-S, Avestimehr AS, Kannan S, Viswanath P. Polyshard: Coded sharding achieves linearly scaling efficiency and security simultaneously. IEEE Trans Inf Forensics Security (2020) 16:249–61. doi:10.1109/TIFS.2020.3009610
15. Cai T, Chen W, Psannis KE, Goudos SK, Yu Y, Zheng Z, et al. Scalable on-chain and off-chain blockchain for sharing economy in large-scale wireless networks. IEEE Wireless Commun (2022) 29:32–8. doi:10.1109/MWC.004.2100616
16. Wang E, Cai J, Yang Y, Liu W, Wang H, Yang B, et al. Trustworthy and efficient crowdsensed data trading on sharding blockchain. IEEE J Selected Areas Commun (2022) 40:3547–61. doi:10.1109/JSAC.2022.3213331
17. Hong Z, Guo S, Li P, Chen W. Pyramid: A layered sharding blockchain system. In: IEEE INFOCOM 2021-IEEE Conference on Computer Communications (IEEE); 10-13 May 2021; Vancouver, BC, Canada (2021). p. 1–10. doi:10.1109/INFOCOM42981.2021.9488747
18. Fuller JC, Schneider KP, Chassin D. Analysis of residential demand response and double-auction markets. In: 2011 IEEE power and energy society general meeting (IEEE); 24-28 July 2011; Detroit, MI, USA (2011). p. 1–7. doi:10.1109/PES.2011.6039827
19. Ansari M, Al-Awami AT, Sortomme E, Abido M. Coordinated bidding of ancillary services for vehicle-to-grid using fuzzy optimization. IEEE Trans Smart Grid (2014) 6:261–70. doi:10.1109/TSG.2014.2341625
20. Li N, Chen L, Dahleh MA. Demand response using linear supply function bidding. IEEE Trans Smart Grid (2015) 6:1827–38. doi:10.1109/TSG.2015.2410131
21. Nekouei E, Alpcan T, Chattopadhyay D. Game-theoretic frameworks for demand response in electricity markets. IEEE Trans Smart Grid (2014) 6:748–58. doi:10.1109/TSG.2014.2367494
22. Wang Y, Ai X, Tan Z, Yan L, Liu S. Interactive dispatch modes and bidding strategy of multiple virtual power plants based on demand response and game theory. IEEE Trans Smart Grid (2015) 7:510–9. doi:10.1109/TSG.2015.2409121
23. Atzeni I, Ordóñez LG, Scutari G, Palomar DP, Fonollosa JR. Noncooperative day-ahead bidding strategies for demand-side expected cost minimization with real-time adjustments: A gnep approach. IEEE Transactions Signal Process. (2014) 62:2397–412. doi:10.1109/TSP.2014.2307835
24. Yang H, Zhang S, Qiu J, Qiu D, Lai M, Dong Z. Cvar-constrained optimal bidding of electric vehicle aggregators in day-ahead and real-time markets. IEEE Trans Ind Inform (2017) 13:2555–65. doi:10.1109/TII.2017.2662069
25. Wang F, Ge X, Li K, Mi Z. Day-ahead market optimal bidding strategy and quantitative compensation mechanism design for load aggregator engaging demand response. IEEE Trans Industry Appl (2019) 55:5564–73. doi:10.1109/TIA.2019.2936183
26. Rassaei F, Soh W-S, Chua K-C. Demand response for residential electric vehicles with random usage patterns in smart grids. IEEE Trans Sustain Energ (2015) 6:1367–76. doi:10.1109/TSTE.2015.2438037
27. Vlachos AG, Biskas PN. Demand response in a real-time balancing market clearing with pay-as-bid pricing. IEEE Trans Smart Grid (2013) 4:1966–75. doi:10.1109/TSG.2013.2256805
28. Rassaei F, Soh W-S, Chua K-C. Distributed scalable autonomous market-based demand response via residential plug-in electric vehicles in smart grids. IEEE Trans Smart Grid (2016) 9:3281–90. doi:10.1109/TSG.2016.2629515
29. Xu B, Shi Y, Kirschen DS, Zhang B. Optimal battery participation in frequency regulation markets. IEEE Trans Power Syst (2018) 33:6715–25. doi:10.1109/TPWRS.2018.2846774
30. Sortomme E, El-Sharkawi MA. Optimal charging strategies for unidirectional vehicle-to-grid. IEEE Trans Smart Grid (2010) 2:131–8. doi:10.1109/TSG.2010.2090910
31. Tang W, Yang H-T. Optimal operation and bidding strategy of a virtual power plant integrated with energy storage systems and elasticity demand response. IEEE Access (2019) 7:79798–809. doi:10.1109/ACCESS.2019.2922700
32. Song M, Amelin M. Purchase bidding strategy for a retailer with flexible demands in day-ahead electricity market. IEEE Trans Power Syst (2016) 32:1839–50. doi:10.1109/TPWRS.2016.2608762
33. Thatte AA, Xie L, Viassolo DE, Singh S. Risk measure based robust bidding strategy for arbitrage using a wind farm and energy storage. IEEE Trans Smart Grid (2013) 4:2191–9. doi:10.1109/TSG.2013.2271283
34. Hedman KW, O’Neill RP, Fisher EB, Oren SS. Smart flexible just-in-time transmission and flowgate bidding. IEEE Trans Power Syst (2010) 26:93–102. doi:10.1109/TPWRS.2010.2047660
35. Chen S, Chen Q, Xu Y. Strategic bidding and compensation mechanism for a load aggregator with direct thermostat control capabilities. IEEE Trans Smart Grid (2016) 9:1–2336. doi:10.1109/TSG.2016.2611611
36. Rahimiyan M, Baringo L. Strategic bidding for a virtual power plant in the day-ahead and real-time markets: A price-taker robust optimization approach. IEEE Trans Power Syst (2015) 31:2676–87. doi:10.1109/TPWRS.2015.2483781
Keywords: blockchain networks, nonlinear systems, data security, load resource trading, bidding
Citation: Jiang W, Lin X, Yang Z, Xiao Y, Zhang K, Zhou M and Qian B (2023) A credible and adjustable load resource trading system based on blockchain networks. Front. Phys. 11:1145361. doi: 10.3389/fphy.2023.1145361
Received: 16 January 2023; Accepted: 07 February 2023;
Published: 16 February 2023.
Edited by:
Fei Yu, Changsha University of Science and Technology, ChinaReviewed by:
Xin Yao, Central South University, ChinaShiwen Zhang, Hunan University of Science and Technology, China
Copyright © 2023 Jiang, Lin, Yang, Xiao, Zhang, Zhou and Qian. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Xiaoming Lin, 411833214@qq.com