Next Article in Journal
MATRIX16: A 16-Channel Low-Power TDC ASIC with 8 ps Time Resolution
Previous Article in Journal
Discussion on IoT Security Recommendations against the State-of-the-Art Solutions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Credible Peer-to-Peer Trading with Double-Layer Energy Blockchain Network in Distributed Electricity Markets

1
State Key Laboratory of Alternate Electrical Power System with Renewable Energy Sources, School of New Energy, North China Electric Power University, Beijing 102206, China
2
School of Economics and Management, North China Electric Power University, Beijing 102206, China
3
Beijing Key Laboratory of New Energy and Low-Carbon Development, Beijing 102206, China
*
Author to whom correspondence should be addressed.
Electronics 2021, 10(15), 1815; https://doi.org/10.3390/electronics10151815
Submission received: 15 June 2021 / Revised: 22 July 2021 / Accepted: 26 July 2021 / Published: 28 July 2021
(This article belongs to the Special Issue Digitalization in Energy Applications)

Abstract

:
Blockchain-based peer-to-peer (P2P) energy trading is one of the most viable solutions to incentivize prosumers in distributed electricity markets. However, P2P energy trading through an open-end blockchain network is not conducive to mutual credit and the privacy protection of stakeholders. Therefore, improving the credibility of P2P energy trading is an urgent problem for distributed electricity markets. In this paper, a novel double-layer energy blockchain network is proposed that stores private trading data separately from publicly available information. This blockchain network is based on optimized cross-chain interoperability technology and fully considers the special attributes of energy trading. Firstly, an optimized ring mapping encryption algorithm is designed to resist malicious nodes. Secondly, a consensus verification subgroup is built according to contract performance, consensus participation and trading enthusiasm. This subgroup verifies the consensus information through the credit-threshold digital signature. Thirdly, an energy trading model is embedded in the blockchain network, featuring dynamic bidding and credit incentives. Finally, the Erenhot distributed electricity market in China is utilized for example analysis, which demonstrates the proposed method could improve the credibility of P2P trading and realize effective supervision.

1. Introduction

The global electricity market is undergoing drastic changes, and consumers are increasingly demanding renewable resources to reduce greenhouse gas emissions [1]. According to the commitment made by the Chinese government at the 75th UN General Assembly, China will strive to ensure their carbon dioxide emissions reach their peak by 2030 and achieve carbon neutrality by 2060 [2]. This development strategy would increase the share and utilization efficiency of renewable energy in energy production. It is predicted that by 2030, China’s total installed capacity of wind power and solar power will be more than double to 1.2 billion kW [3]. There is an impact on the safe operation of the grid, due to the intermittence and uncertainty of renewable energy power generation [4]. Moreover, a large number of renewable energy infrastructures has brought about a surplus of power supply and decline in the utilization rate of base stations, which need to be solved urgently [5,6].
In general, power grids are based on a centralized single current system, where power flows from large utility generators to user loads [7]. This kind of energy trading mode is not conducive to solving the problems caused by the large-scale integration of renewable energy [8,9]. In order to allow renewable energy and small-scale energy prosumers to participate more actively in the distributed electricity market, P2P energy trading has gradually become the next-generation energy management technology for smart grids [10]. As consumers control the formulation of transaction terms and the delivery of goods and services, it is expected that consumers could gain huge benefits from participating in P2P energy transactions [11]. Furthermore, the system composed of power generators, retailers, and distribution networks can also obtain significant benefits in reducing peak demand, suppressing generation uncertainty, minimizing backup demand, and improving power system reliability [12,13]. Especially in remote areas where the power grid cannot reach, P2P energy trading based on distributed renewable energy can guarantee a regional power supply and energy balance [14,15].
A more flexible and stable system is required to facilitate P2P energy trading [16]. The world’s first P2P energy trading based on blockchain was born in Brooklyn, New York, USA. The solar power generation on the roofs of five households was sold directly to five other nearby households through the blockchain network. The entire transaction was managed and recorded without personnel [17]. Energy blockchain practices in Europe also started earlier. In Germany, the power company Innogy, the financial company Share&Charge, and the blockchain technology company Maker DAO cooperated to use blockchain platform tokens to pay for electric vehicle charging [18]. In Japan, Kansai Electric Power Company, Mitsubishi Corporation, Tokyo University, etc., jointly initiated solar power generators to use blockchain networks to carry out P2P trading in order to promote the consumption of renewable energy [19]. A decentralized energy market was established in Singapore through a collaborative platform for consumers, commercial energy suppliers and private producers [20]. In Thailand, Bangkok’s T77 branch is conducting energy trading experiments on the electricity ledger platform, involving apartments, a shopping mall, a school, and a dental hospital [21]. The Latrobe Valley Microgrid project in Australia was launched in March 2018 to create a local energy market for dairy farmers, residents, as well as commercial and industrial customers [22]. In summary, the research on blockchain-based P2P energy trading has made phased progress, and typical cases are constantly emerging. However, the application of blockchain in energy trading has not been on a large scale so far. Credit insufficiency is the main challenge that restricts P2P energy trading, and it is manifested in the following aspects:
(1)
It is difficult to authenticate participants in plug-and-play energy blockchain networks. Some nodes could re-register their IDs (Identity Documents) and rejoin the system after performing malicious behaviors [23]. The distributed data structure also exposes the privacy of users to the risk of leakage and reduces enthusiasm to participate [24].
(2)
The credibility of the distributed electricity market is not guaranteed. In two-way auctions and matching transactions, participants with good credit behavior are not encouraged. Then, participants with malicious behavior also have no clear punishment measures. Ignoring rewards and penalties for credible behavior is not conducive to the large-scale implementation of blockchain-based P2P energy trading.
(3)
Ineffective supervision is also an urgent problem in the current P2P energy trading market. Some energy trading based on consortium blockchain isolates trading information from the outside, and leads to value islands [25]. Then, in the absence of supervision, energy sellers may underreport electricity to evade taxes, and industrial users may underreport electricity to falsify energy consumption targets.
To address these gaps, this paper proposes a double-layer energy blockchain network for credible P2P trading. The novelty and contributions of this article are as follows:
(1)
A double-layer energy blockchain network is proposed based on the cross-chain interoperability and notary scheme. This blockchain network that includes several Sub Chains and a Main Chain can ensure the effective separation and combination of different trading functions.
(2)
The ring mapping identity authentication and credit-threshold notary schemes are designed for P2P energy trading. The ring mapping gives each participant an accurate, traceable identity. In addition, the nodes with higher credit evaluation results are more credible as notaries to verify the system information.
(3)
A dynamic credit incentive trading model is embedded into the double-layer blockchain network. Different from previous studies, this two-way auction rewards or punishes participants according to their behaviors. This incentive model guarantees the rights and economic profits of credible prosumers.
(4)
A real case of Erenhot, China is simulated and analyzed to prove that the presented mode provides a reference for the effective implementation of credible P2P energy trading. The real case scenario is more convincing to demonstrate the credibility and value of this work.
Section 2 in this paper first presents a comprehensive literature review of state-of-the-art research on the P2P energy trading and blockchain-based energy management. Section 3 explains the proposed double-layer energy blockchain network and Section 4 introduces the energy trading model for distributed electricity markets. The case study and results are presented in Section 5. Conclusions are drawn in Section 6.

2. Literature Review

This section reviews and comments on existing academic studies on P2P energy trading and blockchain-based energy management.

2.1. Peer-to-Peer Energy Trading

P2P trading has emerged as a next-generation energy management technique for the smart grid that can enable the owners of small-scale energy producers or consumers—also known as prosumers—to actively participate in the distributed electricity market. With the prosumers able to trade energy within the neighborhood, it allows local funds to remain within the local electricity markets [26]. In this trading method, multiple prosumers in the system are connected to the distribution network. The combined load is subject to random coincidence of the individual loads, which averages stochastic fluctuations [27]. This means that the surplus electric energy in the area can be used by other distributed energy users [28].
The P2P trading is likely to bring higher economic benefits to consumers as well as provide a better distributed electricity and energy balance for the electricity system [29]. Based on a reverse auction model, Cintuglu et al. [30] created a competitive market environment for distributed energy suppliers in the microgrid. In this model, due to the competitive behavior of all energy suppliers, users can purchase energy at a lower transaction price. A multi-agent system was designed and implemented to verify the proposed method in the smart grid test system of Florida International University. Shamsi et al. [31] also proposed a distributed electricity market which targeted a grid-connected community microgrid. In this market, each prosumer is capable of trading electricity with others based on P2P energy trading. Paola et al. [32] proposed price-based schemes for the distributed coordination of flexible demand within a game theoretical framework. Even though this work did not consider distributed generation or energy storage systems, it also showed the advantages of P2P trading in the energy market.
Some scholars have carried out research on the P2P trading mechanism and bidding strategy to improve energy interaction efficiency. Zhou et al. [33] developed a systematic index system to evaluate the performance of various P2P energy-sharing mechanisms based on a multiagent-based simulation framework. The simulation framework is composed of three types of agents and three corresponding models. The proposed methods were applied to simulate and evaluate some existing P2P energy-sharing mechanisms for residential customers in current and future scenarios of Great Britain. This work assumes that all agents make decisions with perfect predictions about the future, and does not take into account mistrust between individuals. Long et al. [34] proposed a two-stage aggregated control to realize P2P energy trading in community microgrids, where only the measurements at the point of common coupling and one-way communication are required. This method has been applied to the microgrid of residential districts containing photovoltaic cell systems. The results show that compared with traditional P2G energy transaction, the P2P mode can reduce the energy cost of the community by 30%. Nguyen et al. [35] proposed an optimization model to maximize the economic benefits for rooftop PV-battery-distributed generation in a P2P energy trading environment. The goal of the proposed model was to investigate the feasibility of such renewable sources participating in P2P energy trading by examining the economic benefits. Moreover, the feasibility of the model was verified through simulation in a local community with 500 households. El-Baz et al. [36] described a novel discrete timely double-sided auction model that facilitates P2P energy trading between prosumers in near real-time and forward markets. The models of the integrated devices are based on either field tests or testbeds to ensure the accuracy of the integrated model. On the other hand, a probabilistic PV prediction system is integrated into the market model to show the mechanism of PV energy trading, given its generation uncertainty. E Lucchi et al. [37] provided an inspiring view on the need for environmental, economic and cultural sustainability in the field of heritage renovation and preservation, and addresses the importance of being aware of eco-friendly techniques and policies in heritage preservation. This work has a very valuable guiding role for P2P energy trade between buildings in Europe. However, the P2P energy trading will face real-time price fluctuations, a dynamically adjusted power consumption plan and frequent electricity fee settlements [38]. There must be a distributed and dependable energy management platform to handle the flexible and complex trading mode [39].

2.2. Blockchain-Based Energy Management

Blockchain technology is a distributed framework and computing paradigm using blockchain data structures to verify and store data, distributed node consensus algorithms to generate and update data, cryptography to ensure the security of data transmission and access, and smart contracts which are composed of automated script codes to program and manipulate data [40]. This distributed data structure integrates the technical characteristics of decentralization, security, and trustworthiness, which is compatible with the P2P energy trading mode [41]. The blockchain-based energy management platform is expected to provide a robust, efficient, and low-cost system for P2P energy trading.
From electricity trading to the energy industry, as the most promising application in the context of blockchains, smart contracts have implemented machine to machine energy management in the industry 4.0 environment. Wu et al. [42] proposed a method based on blockchains to manage the demand and transaction of grids. It realized the independent maintenance and management of transaction information through smart contracts of blockchain technology. Tsao et al. [43] proved that blockchain could reduce the default risk in distributed electricity markets and uncertainty on the energy demand side. Sikorski et al. [44] designed a novel trade on a blockchain including two power producers and one power consumer in the chemical industry background. This trading pattern uses electricity to exchange currency. Li et al. [45] also took advantage of blockchains and smart contracts, and designed a distributed renewable energy system with heterogeneous end-users. This system is aimed at energy demand-side management through P2P exchange of real-time energy information. Wang et al. [46] proposed an original bidding strategy for multi-energy trading based on blockchain network framework. This energy management mode ensures the theoretical model can be applied in practice, and facilitates the comprehensive utilization of renewable energy through free trading and real-time price. Hua et al. [47] proposed a novel blockchain-based P2P trading framework to trade energy and carbon allowance. The bidding/selling prices of prosumers can directly incentivize the reshaping of energy prosumers to achieve regional energy balance and carbon emissions mitigation. Zhang et al. [48] proposed a key management scheme for service providers and smart meters in smart grid systems. They introduced the concept of the blockchain to solve the centralization and data-tampering problems. Han et al. [49] presented a universal framework for a blockchain platform that enables P2P energy trading in the retail electricity market. This study adopted the double auction principle to enhance the vitality of the market. These research results expound the application value of blockchain technology in power systems from different angles.
With the increase in energy blockchain projects, the difficulty of data communication and value islands between blockchain networks have become open issues. Cross-chain interoperability technology is an important technical means for blockchains to realize interconnection and improve scalability [50]. Therefore, some scholars have begun to pay attention to the application of cross-chain technology in the field of energy, which could solve the problem of poor scalability and flexibility for existing energy blockchains. Pop et al. [51] proposed a technique for the tamper-evident registration of smart meters’ energy data and associated energy transactions using digital fingerprinting, which allows the energy transaction to be linked hashed-back on-chain, while the sensors’ data are stored off-chain. In the proposed architecture, the authors innovatively introduce cross-chain interaction into the energy scenario. In the current centralized IoT ecosystems, Firoozjaei et al. [52] proposed a hybrid blockchain with a subnetwork that aims to protect the privacy of users and provides a trusted workflow for billing and charging transactions. The information of users’ P2P energy transactions in this work is anonymized by the bridge and no private information is leaked to the main power grid. He et al. [53] used a structure of the Main Chain plus a side chain to achieve combined distributed photovoltaic power generation market and the carbon market. Wang et al. [54] proposed a dynamic adaptive cross-chain trading mode for multi-microgrid joint operation. This work can ensure the adaptive consistency of cross-chain information without changing the existing blockchain architecture of each system. Recently, a number of individuals proposed ideas on the application of cross-chain in P2P energy trading—especially the double-layer blockchain structure—in order to build flexible trading systems. Some of the proposals present worthy ideas to be explored, yet almost all of them lack some elements to make a feasible and practical implementation. The most significant is the lack of research on highly credible and effective supervision for energy blockchains. This is also one of the main reasons for the lack of large-scale application in the P2P energy trading field.

2.3. Conclusions from the Literature Review and Objectives

To summarize, P2P energy trading can stimulate the vitality of the distributed electricity market, especially in the distributed renewable energy-rich areas or remote areas where the grid cannot be extended. There are many studies on blockchain-based two-way auctions in electricity trading. These approaches mainly focus on designing auction models and bidding strategies to increase the electricity market economy or renewable energy consumption. However, P2P energy trading based on blockchain technology has not been implemented on a large scale so far. One of the main reasons is that the existing research pays more attention to economic benefits and ignores the improvement of the credibility of transactions. It is embodied in the lack of several aspects, including the accurate identification of the participants, credibility evaluation and incentive, punishment for bad trading behavior, and a lack of effective supervision. Therefore, we focus on the credibility and effective supervision of the electricity market and propose a two-way auction mode considering credibility incentives/punishments.
On the other hand, the P2P trading method requires a more flexible and efficient energy management system, and the blockchain distributed network has become one of the options available. Then, P2P energy trading through a public blockchain is not conducive to mutual credit and the privacy protection of stakeholders, and trading through a consortium blockchain would form data islands which result in ineffective supervision. In this context, an energy blockchain network often fails to operate efficiently and leads to P2P energy trading not being widely used in practice.
To address existing technical deficiencies, a ring mapping algorithm is used to give each energy prosumer an exclusive identity entity which can optimize the notary scheme to effectively verify the energy system information. In addition, the credit incentive feature can further ensure the credibility of the distributed electricity market. The original double-layer blockchain network could pave the way for the implementation of P2P energy trading and blockchain-based energy management.

3. Double-Layer Energy Blockchain Network

This section describes the novel double-layer energy blockchain network in distributed electricity markets. We illustrate the system structure of the proposed blockchain network. Next, we describe the ring mapping identity authentication and credit-threshold notary scheme, which improve the credibility of P2P energy trading.

3.1. System Structure

A double-layer energy blockchain network for information interaction is built on the basis of complete power transmission and distribution lines. The bottom layer comprises a number of independent Sub Chains, and the upper layer is a Main Chain. Each Sub Chain carries out energy management on the distributed electricity market in the region, and has the features of identity authentication, energy trading and credit evaluation. Through the cross-chain interoperability mechanism, Sub Chains periodically send data that do not involve privacy to the Main Chain. These data are publicized across the network after being verified by the consensus nodes group. The system structure of a double-layer energy blockchain network is shown in Figure 1, and the pseudocode is shown in Figure 2.
Each Sub Chain is a typical point-to-point energy trading platform, which aims to provide a standardized matching transaction, automatic execution, and reputation calculation, etc. These functions are implemented through smart contracts, which are jointly formulated by all energy prosumers on the platform. In order to improve the efficiency and overall revenue of energy trading, this study uses a double auction mechanism and dynamic bidding strategy to conduct P2P trading. In time slot t, each participant can publish the trading demand of time slot t + 1 through its network node and upload information to the distributed Sub Chain. Trading requirements include buying/selling energy quantities, bidding prices, etc. The platform sorts the bidding information of the buyer and the seller respectively according to the expected price. When the buyer’s highest bid is equal to or less than the seller’s lowest bid, a transaction protocol is reached. In the matching process, the buyer’s highest bidding price is matched with the seller’s lowest bidding price, and the transaction price is the average of the bidding prices of both parties. This process continues until the buyer’s highest bid is lower than the seller’s lowest bid. Each participant dynamically adjusts the bidding strategy based on the real-time information and the bidding mechanism mentioned in Section 4.1. If prosumers fail to reach a deal, they adjust the bidding strategy according to the market information to reach a transaction protocol in the next auction. This mode effectively shortens the time of the matching process and improves platform operating efficiency.
The Sub Chain also calculates credibility and gives an incentive mechanism, which is introduced in Section 4.2. The trading data and credit value in each Sub Chain are regularly sent to notaries for cross-chain verification. When information is verified correctly, it is protected and stored in the Main Chain in the form of blocks by using the Secure Hash Algorithm SHA-256. This kind of cross-chain interoperation uses the notary scheme to complete the anchoring of information from the Sub Chain to the Main Chain. The information on the Main Chain cannot be tampered with and is visible to the entire network broadcast. Therefore, any node can check the credibility and transaction status of all energy prosumers. Moreover, the privacy of prosumers in the P2P energy trading platform is not exposed, such as equipment models, energy usage rules, sources of funds, and real-time power dispatch data.
Based on the system structure, this study improves the credibility through two methods: the ring mapping identity authentication and credit-threshold notary scheme, which are illustrated in Section 3.2 and Section 3.3, respectively. The operation process of the double-layer energy blockchain network is shown in Figure 3, and the corresponding pseudocode is shown in Figure 4.

3.2. Ring Mapping Identity Authentication

In 2001, Rivest, Shamir and Tauman proposed the concept of a ring signature. A ring signature is a simple group signature, which enables users to sign in a completely anonymous manner. The receiver of the message can only determine which group the signature comes from, not which user. Compared with previous group signatures, ring signatures no longer require the systematic establishment and revocation of administrators. Only the signer himself can recover the identity of the signer and realize the complete anonymity of the signer’s identity.
Traditional authentication schemes tend to use a centralized approach, whereby a central node manages all businesses requiring authentication. However, centralization means network security risks, and there are also problems of efficiency and privacy disclosure. The distributed data structure and decentralizing verification method of blockchain bring new value to ring mapping identity authentication.
Ring mapping is a corresponding behavior, which mainly abstracts things in reality into a special entity and corresponds to a fixed-size virtual ring space [55]. This is in order to avoid incredible prosumers joining the Sub Chain though re-registering ID (identity document). The entity mapping makes these IDs unable to be tampered with, and constructs a set including four basic pieces of information: their geographic location, account balance, credit value, and attributes. S e t i is shown in Equation (1).
S e t i = a i , b i ,   c i , d i
where a i denotes the geographical location of node i, and it can be considered immutable because energy facilities are not readily removed. b i , c i , and d i , respectively, denote the account balance, credit value, and other attributes.
The S e t i of every new node generates respective key pairs from the certification authority (CA), which obtains a valid public key signature and verifies consistency based on the RSA (Rivest–Shamir–Adleman) algorithm. Identity authentication is authenticated by the clockwise forward and backward nodes on the ring. The system calculates the corresponding hash value encrypted by the private key and sends the generated original signature and its own public key signature to the next ring node. The next ring node decrypts the signature with the sent public key to verify the consistency between the original signature and the target signature. Authentication is successful if the information is consistent, otherwise identity authentication fails. The ring mapping identity authentication diagram is shown in Figure 5.
The CA is generally held by local energy authorities and high-credit node groups, and its public key and private key are, respectively, I P K = E , N and I S K = D , N . The public and private keys of the user node are set to L P K = E , N and L S K = D , N . The new node joins the blockchain network and needs to submit identity information S e t i to CA for registration and obtain the corresponding key pair. CA equal to probability selects two very large prime number p and q , and the specific calculation formula is as follows:
N = p × q ,   p L n ,   q L n
L = l c m p 1 , q 1
1 < E < L   & & g c d E , L = 1
1 < D < L   & & E × D m o d L = 1
where E and D can generate random numbers between 1 and L, and obtain the public and private keys of ring nodes through verification, namely L P K = E , N and L S K = D , N . CA randomly selects integer values n i n t e g e r L n , and encrypts the public key of ring nodes with its private key to generate the digital signature S e t L . The ring node can decrypt the public key signature to verify through the public key of CA. The result of decryption verification is n i n t e g e r , and compares with n i n t e g e r . If these are the same, ring nodes save the public key signature in the system. The process is shown in Equations (6) and (7).
S e t L = n i n t e g e r m o d N
n i n t e g e r = S e t L E m o d N
According to the mapping space L n , the reference count of each ring node is initialized as n c o u n t . A new ring node appends the fill field pad to the end of message m to obtain the filled message m p a d . The ring node runs the collision-resistant hash function SHA-256 on the m p a d to generate the hash value H m of the message, and can be summarized as shown in Equation (8).
H m = S H A 256 m p a d
The ring node uses its own private key L S K = D , N to encrypt the hash value H m to generate the original signature S e t o r i , which can be generally expressed as Equation (9). Next, the data of m p a d , H m , and S e t L are sent to the next valid node in the clockwise direction. This valid node uses the public key signature S e t L of the current ring node to decrypt the original signature S e t o r i and output the target signature S e t t a r . The process can be summarized as shown in Equation (10). The new node is successful for identity authentication if the signature verification output value A { S e t i } is 1.
S e t o r i = H m D m o d N
S e t t a r = H o r i E m o d N
A { S e t i } = 1 ,   S e t o r i = S e t t a r 0 ,   S e t o r i S e t t a r

3.3. Credit-Threshold Notary Scheme

The selection of notaries is the key to the cross-chain notary mechanism and one of the methods to solve the decentralization degree. In this study, nodes with high reputations are selected to form a node group. This node group is a notary, which verifies the effectiveness of cross-chain information interaction.
Firstly, the threshold setting can reduce the number of notary nodes and effectively improve the operation efficiency of cross-chain communication. In the process of information cross-chain communication, the number of nodes in the verification node group directly affects the system operating efficiency. This viewpoint has been explained in existing research results. Therefore, this study selects a small number of privileged nodes through the threshold to form a node group to verify the cross-chain information, which can improve the operation efficiency of the energy system.
Next, these privileged nodes are dynamically selected based on the trusted behavior of each node. This credit evaluation includes three aspects: contract performance, participation, and trading. It is different from PoW based on hashrate and PoS based on stock rights. The notary nodes selected in this study are based on the comprehensive evaluation of behaviors in P2P energy trading.
In addition, the current cross-chain notary scheme does not specify the selection of notaries, which is not conducive to the credibility of cross-chain data transmission. In view of the defects of the existing consensus mechanism and cross-chain interoperability, this study selects nodes with high credit for energy trading to form a node group as a verification nodes subgroup (VNS). The VNS conducts real-time verification of the P2P energy trading data in each Sub Chain, and acts as a cross-chain notary to verify the information transmitted to the Main Chain. The nodes whose credit evaluation exceeds the threshold can enter the VNS and verify the consensus information through the blockchain digital signature [56]. The threshold digital signature verification process is shown in Equations (12)–(16).
VNS = V 1 V 2 V k ,   C i C t h r
VNS = n k   ( n k 0 )
k = 1 m n k = n   m 1
C P K v E T ,   t k   ,   n k = True ,   if   n k t k   t k False ,   otherwise
C P K v E T ,   t 1   ,   n 1 ; ;   t m   ,   n m ; t ,   n = True ,   if   n i t i   t i   i = 1 m t i t False ,   otherwise
The selection of VNS is the key process in the credit-threshold notary scheme. In this study, the energy blockchain network selects the verification nodes according to the credit evaluation of each energy prosumer. This credit evaluation includes three aspects: contract performance, consensus participation and trading enthusiasm. Contract performance is a smart contract signed by both parties to the transaction. After the physical power transmission time expires, one of the parties fails to follow the contract content, causing the other party to suffer economic losses. Consensus participation means that in the consensus process, the nodes do not legally participate in the consensus process and carry out illegal signatures or malicious voting [57]. Trading enthusiasm can promote regional energy balance and stimulate the vitality of distributed electricity markets.
An energy buyer would purchase the power shortage from the grid when the power actually provided by the seller in a certain time slot is lower than that specified in the contract. It causes economic losses to these buyers, since the grid price is generally higher than the contract price. Moreover, if the buyer’s actual power consumption is lower than the contract power consumption, the power provided by the seller cannot be fully utilized in this time slot, causing economic losses to the seller. Therefore, it would cause economic losses to the other party if the transaction protocol that is matched on the trading platform could not be fully implemented. Credit evaluation of contract performance can be described as Equations (17) and (18). It can be seen that the greater the gap between the quantity actually provided or used by prosumers and the contract, the more the credit value decreases.
C i , t s e l l , c o n = C i , t 1 s e l l , c o n Q i , j , t Q i , j , t a c t u a l / Q i , j , t ,   Q i , j , t > Q i , j a c t u a l C i , t 1 s e l l , c o n ,   Q i , j Q i , j a c t u a l
C j , t b u y , c o n = C j , t 1 b u y , c o n Q i , j , t Q i , j , t a c t u a l / Q i , j , t ,   Q i , j > Q i , j a c t u a l C j , t 1 b u y , c o n ,   Q i , j Q i , j a c t u a l
The trading behavior of each prosumer needs to form a block through a consensus mechanism on the Sub Chain, and build a chain structure through the sequence of timestamps. Prosumers would sign the block header during the consensus process, which verifies the block header and voting. There are two behaviors for consensus participation of network nodes, which are goodwill voting and malicious voting. Goodwill voting means that the node verifies that the block header meets the difficulty of the system and signs it legally. Malicious voting means that the node signs on block headers that do not comply with regulations. At the same time, the last node ignores the illegal signature and packs transaction data and node signatures into the block and broadcasts it to the entire network. When other nodes verify the signature or the block header is incorrect, it is stipulated that all nodes that sign the block are maliciously voting. In the process of building blocks and system operation, the credit of each node participating in the consensus is evaluated, as indicated by Equation (19).
C i , t c o n s e n s u s = 1 1 + e λ t = 0 N α t t = 0 N β t
where α t and β t denote the vicious vote and the virtuous vote within t time slots. N indicates the total number of time slots experienced. λ is a penalty factor. If the value of λ is greater, the tolerance of the system to vicious voting behavior is lower. In general, the number of λ is between 1 to 5 [54].
According to contract performance and consensus participation, the credit evaluation of sellers or buyers can be summarized as shown in Equations (20) and (21).
C i , t s e l l , b a s i c s = C i , t s e l l , c o n · C i , t c o n s e n s u s
C j , t b u y , b a s i c s = C j , t b u y , c o n · C j , t c o n s e n s u s
where C i , t s e l l , b a s i c s and C j , t b u y , b a s i c s denote the basics credit evaluation of a prosumer that does not consider the enthusiasm of nodes to participate in P2P energy trading. However, it would reduce the income of the distributed electricity market and the security of the blockchain network when prosumers are not motivated to participate in P2P energy trading. It is necessary to participate in block verification even if power sellers or buyers do not participate in the trading, since the more nodes participate in consensus verification and voting in the blockchain network, the stronger the security of the system. In order to ensure the activeness of participants, credit loss is introduced in the basic credit evaluation. As long as the node participates in the consensus or voting verification process of the blockchain, its credit value will not be reduced. The credit loss of sellers or buyers for participation enthusiasm can be calculated by Equations (22) and (23).
C i , t s e l l = C i , t 1 s e l l , b a s i c s e l
C j , t b u y = C j , t 1 s e l l , b a s i c s e l
where and , respectively, denote the penalty factor of electricity suppliers and users for not actively participating in market operating. In general, is bigger than because electricity suppliers make a profit directly from the market and they have more complete computing equipment. l indicates the number of time slots in continuous non-participation in the blockchain network operation.
A new node sets an initial credit value that joins the Sub Chain. After performing P2P trading and consensus verification t times, the node’s credit value can be calculated according to the above formula. The credit value of these nodes changes dynamically with the increase in transaction rounds. The continuous behavior impropriety of a node results in a credit value of zero, and this node is removed from the Sub Chain. Nodes with low credit values are not allowed to join other Sub Chains to ensure the trustworthiness of the P2P trading system. Furthermore, the upper limit of node credit value is set to 100, which does not increase after reaching this value. Since the growth of credit values is nonlinear, the higher the credit value, the slower the growth rate. Therefore, there is no situation where the node’s credit value is too high to affect the decentralization of the blockchain network.

4. Energy Trading Model

The distributed electricity market realizes the matching of electricity quantity and price between buyers and sellers through continuous double auction, and it carries out transaction settlements through blockchain technology. There are multiple distributed generations (DGs) and users in the electricity market. They submit quotations and transaction power to the double auction market in each transaction cycle, and the market automatically matches the quotations of both parties. In the matching process, the market continues to publish transaction information, including transaction prices, the current optimal selling price, the optimal buying price, etc. Participants who have not completed the matching adjust the quotation according to a certain bidding strategy, or else withdraw from the distributed electricity market and trade with the main grid directly. The electricity market and the main grid connected mode, can guarantee the electricity market clearing and energy conservation. The two parties that complete the matching transaction settle through the blockchain, and DGs transfer electricity quantity to the users that they trade through the blockchain, while the users transfer electricity purchase fees to the DGs that they trade through the blockchain. After the confirmation of each node in the whole network, it can be considered that the buyer and seller transactions are successful.
In this study, the energy trading model in the double-layer energy blockchain network includes two features, which are dynamic bidding and credit incentives. Energy prosumers actively adjust quotations to improve the economic profits. Credit incentives can guarantee the rights of credible prosumers in distributed electricity markets. This section describes the two trading features.

4.1. Dynamic Bidding Strategy

A bidding strategy is designed to dynamically adjust the bidding price according to the real-time information of the distributed electricity market. The sale and purchase price are restricted to a certain fixed value in the traditional electricity market, according to which, prosumers can only accept and conduct energy transactions. However, the real-time adjustment of the bidding strategy based on electricity market information can effectively improve transaction returns and market efficiency [58]. In this study, energy prosumers could adjust their energy quotation on the Sub Chain to increase their own trading profits.
The bidding price of energy sellers is a comprehensive consideration of the users’ purchasing, electricity output, and supply and demand relationship in the distributed electricity market. It uses real-time information to calculate the corresponding tendency factor through mathematical formulas and calculate the final bidding price of each round of matching transactions based on these tendency factors. The bidding price of an electricity seller can be calculated by Equations (24)–(28).
ε i , t , 1 s e l l = s u m Q t b u y m a x Q t b u y m a x Q t b u y
ε i , t , 2 s e l l = Q i , t s e l l s u m Q t s e l l Q i , t s e l l
ε i , t , 3 s e l l = s u m Q t b u y s u m Q t s e l l
δ i , t s e l l = ε i , t , 1 s e l l . ε i , t , 2 s e l l . ε i , t , 3 s e l l
P i , t + 1 s e l l = P i , m a x s e l l P i , m a x s e l l P i , m i n s e l l e δ i , t s e l l
where Equations (24)–(26), respectively, calculate the propensity factors taking into account users’ purchasing, electricity output, supply, and demand relationship. Equation (27) stands for the comprehensive propensity factor of prosumer i at time t, and the bidding price of power supplier i in t + 1 time can be calculated by Equation (28).
The general power users determine their bidding prices according to the historical transaction prices of the double auction. The electricity bidding price is mathematically formulated as indicated by Equations (29) and (30).
γ t + 1 = 1 Q t b u y 2 m a x Q b u y 2
P j , t + 1 b u y , b a s i c s = m i n m i n S P j , t b u y γ t + 1 + m a x S P j , t b u y 1 γ t + 1
where γ t + 1 is the rational choice function and determines the adjustment range of quoted prices by judging the ideal degree of the market environment. The value range of γ t + 1 is from 0 to 1 and means that users expect to complete the trading at the lowest price within the acceptable range to maximize the revenue.
As the demand-side response continues to deepen in the blockchain-based electricity market, some active users can revise their bidding prices according to the urgency of the power demand. Here, a tendency factor is set to reflect the degree of electricity demand, and the final bidding price of users is given by Equation (31).
P j , t + 1 b u y = P j , t + 1 b u y , b a s i c s · e ε j , t + 1 b u y
E t t o t a l This study selects trading profits (TP) and social welfare (SW) as the economic indicators to evaluate the bidding strategy for individuals and electricity markets. The TP of each prosumer refers to the difference between the transaction price and the reserve price multiplied by the electric quantity in each round of trading. SW is the sum of trading profits of buyers and sellers in all auctions. TP and SW can be generally expressed as Equations (32)–(34).
T P i s e l l = t = 1 N P i , t R B i s e l l Q i , j a c t u a l t = 1 N E i , t s e l l
T P j b u y = t = 1 N R B j b u y P j , t Q i , j a c t u a l t = 1 N E j , t b u y
S W = i = 1 I T P i s e l l + j = 1 J T P j b u y

4.2. Credit Incentives

There are economic incentives for nodes with a high credit value in order to encourage users’ credible behavior. P2P energy trading requires the maintenance of transmission lines and other infrastructure in any region. Taking China as an example, the maintenance costs of P2P trading facilities are paid to distribution network operators in the form of “grid-through fees”. This expenditure is calculated in accordance with the electricity transmission volume and transaction amount. Prosumers with a higher credit value in this study would be exempted from some expenditure, and this exempted expenditure would be paid by prosumers with poor credibility. The system maintenance expenditure charging electricity sellers and buyers in N time slots is indicated by Equations (35) and (37).
t = 1 N E i , t s e l l = t = 1 N ( k s e l l · V i , t s e l l · e C i , t s e l l / 100 )
t = 1 N E j , t b u y = t = 1 N ( k b u y · V j , t b u y · e C j , t b u y / 100 )
t = 1 N   E t t o t a l = t = 1 N E i , t s e l l + t = 1 N E j , t b u y
where V i , t s e l l and V j , t b u y , respectively, denote the trading volume of the electricity supplier and user in the time slot of t. k s e l l and k b u y denote the collection cost coefficient of energy prosumers for system operation. E t t o t a l denotes the total expense of electricity market operation, and it is jointly borne by all buyers and sellers according to their creditworthiness.
It should be noted that the initial credit value of each new prosumer is the same when they join the blockchain network. After several rounds of trading, the credit value changes and accordingly obtains the corresponding financial incentives. On the other hand, the distributed electricity market would set a minimum threshold, and when the credit value of a prosumer is lower than the minimum threshold, the energy prosumer is eliminated by the system.

5. Case Study

A case study is presented to prove the advantage of the proposed method based on a scenario in Erenhot, which is a remote city rich in distributed renewable energy. The overview of the scenario set and basic data are shown in Section 5.1 and Section 5.2. The blockchain system design and implementation are illustrated in Section 5.3. The operation results and discussion are described in Section 5.4 and Section 5.5.

5.1. Scenario Set

Erenhot is an important border port city in northern China. Due to remote geographical location, main power grid lines are difficult to extend. The distributed electricity market for P2P trading can effectively guarantee energy supply and improve regional economic benefits. This city has created 70 MW of renewable energy to supply regional electricity demand, including wind power generation (50 MW) and distributed photovoltaic (20 MW). This study divides wind power into 20 MW and 30 MW, which is operated by two power suppliers, namely Seller 1 and Seller 2. According to different geographical locations, distributed photovoltaic is divided into three power suppliers with powers of 10 MW, 6 MW and 4 MW, namely Seller 3, Seller 4 and Seller 5.
Five power users are also selected on the energy demand side, namely Buyer 1 to 5. Buyer 1 and 2 are commercial data centers with large and stable electricity loads. Buyer 3 and 4 are two typical community residents. Buyer 5 is a typical commercial user. The simulation scenario is the real distributed electricity market situation in Erenhot, and the geographical location of each electricity seller and buyer is shown in Figure 6.

5.2. Basic Data

The simulation introduces real-life trading data located in Erenhot to show the operation performance of the proposed trading model. The system maintenance expenditure charged by the distribution network is 20% of the transaction income from P2P trading prosumers. This maintenance expenditure reflects the general distribution electricity market in China.
The prosumers predict the output power of the next time slot based on historical data, resulting in possible errors between the actual power value and predicted value. In order to ensure power supply on the demand side, the distributed electricity market is connected to the distribution network, which relies on existing transmission lines. According to the actual situation in Erenhot, the electricity price of distribution networks fluctuates and changes regularly throughout the day, which can play a role in peak shaving and valley filling. The peak power consumption is at 10:00–14:00 and 18:00–20:00, whose peak electricity price during this time period is USD 163.65/MWh. The valley electricity is at 23:00–6:00, whose price is USD 58.37/MWh. The rest of the day is the normal electricity period, whose electricity price is USD 101.24/MWh. The initial bidding prices and reserve prices of prosumers are shown in Table 1, which also includes the assumed credit value in one day. It is necessary to note that the credit value is the initial setting, and it will be updated the next day according to the daily credit evaluation.
According to the power change data of one day in summer in Erenhot, we counted the power changes of 10 electricity buyers and sellers on that day. Wind power output (Seller 1 and 2) is larger in two periods of a day. Photovoltaic power generation (Seller 3,4,5) starts from 8:00, and reaches the peak between 12:00 and 14:00, and there is no power output at about 20:00. On the electricity demand side, data centers (Buyer 1 and 2) have a large electricity demand and stable load. For community residents (Buyer 3 and 4), load demand is not big in the daytime, but at night there is a greater demand for electricity. Buyer 5 is a typical commercial user, and its electricity consumption is relatively low at night and increases from 9 a.m. and peaks at 12 a.m. The one-day output power of these energy prosumers is shown in Figure 7.

5.3. System Design and Implementation

The proposed credible P2P trading with double-layer energy blockchain network is performed in the form of a smart contract on the Ethereum, which was established in 2014 by Vitalik Buterin through a crowdfunding project. Ethereum is a turing-complete scripting language that supports developers in creating and publishing any decentralized application on this platform. Especially, smart contracts executed on the Ethereum have a user interface (UI), facilitating users to perform transactions and query the credit value of prosumers.
With the increase in distributed renewable energy and more a flexible power market, each user could become a prosumer at the same time, selling excess electricity when energy is rich. Currently, in the model formulation, the energy blockchain network guarantees credible P2P trading and effective supervision, and the network is designed according to the scenario in Erenhot. Each new prosumer in the Sub Chain can obtain a specific account, which includes four basic pieces of information: geographical location, account balance, credit value, and attributes. The key computer code and UI for new users to join the system based on the proposed ring mapping identity authentication are shown in Figure 8.
The double-layer energy blockchain network not only enables energy prosumers to conduct real-time P2P trading, but also realizes credit evaluation and effective supervision. First, the users of the Sub Chain can submit trading demands to the blockchain network and match transactions based on Section 4. Each user can access all bidding information and historical transaction records. These real-time updated data are only developed for the nodes in the Sub Chain, so that they can adjust the bidding strategy in a timely manner to obtain a higher trading income. Figure 9 shows the transaction from Seller 2 to Buyer 3 when their bid information meets transaction conditions. Next, the trading power and credit evaluation results in the Sub Chain are sent daily to the notary nodes group composed of relevant government departments, in which power information is based on statistics of smart meters in distribution networks. The information passed by the notary node group review is published on the Main Chain and visible throughout the network. The UI of the Main Chain only contains information that does not involve privacy, as shown in Figure 10. The geographical location (latitude and longitude) of each prosumer is also disclosed to prevent malicious nodes from rejoining P2P trading by registering new IDs. In summary, the double-layer energy blockchain network is implemented through a credit-threshold digital signature, timestamps, smart contracts and cross-chain interoperability.

5.4. Operation Results

The simulation introduces a real-life trading datum located in Erenhot to showcase the operation performance of the proposed trading model. The system maintenance expenditure charged by the distribution network is 20% of the transaction income from P2P trading prosumers. Basic parameters are shown in Section 4.1, such as output power, credit value and bidding parameters of all prosumers. Figure 11 compares the one-day electricity trading profits of 10 sellers and buyers in three bidding modes, including fixed bidding price, dynamic bidding price, and dynamic bidding price with credit incentive. It can be concluded that the trading profits of the dynamic bidding price strategy is significantly higher than the fixed bidding price strategy. Especially for wind power suppliers Sellers 1 and 2, fixed bidding prices make it impossible for them to sell electricity because they have no price advantage when the distribution network is in valley electricity. In the dynamic bidding price strategy, Seller 1 and 2 can adjust the bidding strategy according to market conditions in real time to obtain higher trading profits and promote renewable energy consumption. Meanwhile, in the dynamic bidding considering credit incentive, the trading profits of the prosumer with higher credit value increases, and vice versa.
To verify the feasibility of the presented dynamic bidding strategy in this study, social welfare and renewable energy consumption are simulated, including fixed bidding price, the adaptive aggressiveness (AA) strategy, dynamic bidding price and dynamic bidding price with credit incentive. The AA strategy takes the frequent price fluctuations into account in the continuous auction market, which divides bidders into three rigid categories [59].
Figure 12 and Figure 13 compare the one-day simulation of social welfare and renewable energy consumption in the different bidding modes. The simulation result based on one day demonstrates that the proposed dynamic bidding mode has an obvious advantage in social welfare which is 34.3% higher than the fixed bidding mode, and is 11.9% higher than the AA strategy. When considering the credit incentive, social welfare only increases by 2.7%, which can be regarded as unchanged. This is because the economic incentives for higher credit prosumers is mainly due to the punishment of lower credit prosumers. However, these credit incentives can protect the interests of prosumers with high credit value and promote the honesty and trustworthiness of various stakeholders in the electricity market.
Furthermore, the efficiency of renewable energy utilization can be improved by the dynamic bidding price. The proposed dynamic bidding mode has an obvious advantage in renewable energy consumption which is 50.1% higher than the fixed bidding mode and is 12.9% higher than the AA strategy. Especially when the grid price is low, the dynamic pricing mechanism can actively adjust the quotation to increase the renewable energy consumption in the distributed electricity market. Moreover, the AA strategy divides bidders into three rigid categories which limits its flexibility in the market. The proposed bidding method adjusts the tendency parameters according to the real-time market information and has better transaction adaptability.

5.5. Discussion

An experiment scenario conducted on Erenhot’s typical P2P electricity market for 24 h is used to verify the effectiveness of the proposed methodology. The dynamic bidding mode has an obvious advantage in social welfare opposed to the traditional fixed bidding mode. On the basis of dynamic bidding, giving economic incentives according to the credit evaluation can improve the trading profits of these high-credit prosumers. The prosumers with low credit are punished to a certain extent, and even excluded from the P2P trading platform.
It is worth noting that the experiment scenario and parameter settings are based on a typical distributed electricity market of China. With the different basic parameters of market design and the different simulation regions, the trading profits and social welfare are different. However, there is an international consensus that developing P2P trading has emerged as a next-generation energy management technique for the smart grid that can enable the prosumers to actively participate in distributed electricity markets. A large number of pilot projects have also been established in the USA, Europe, and Australia. Therefore, the experimental background of this case is representative to some extent.
All the above trading processes can be completed automatically through the double-layer energy blockchain network. In summary, the benefits of double-layer energy blockchains for prosumers involved in the distributed electricity market include but are not limited to the following aspects: firstly, a ring mapping algorithm is added to each Sub Chain so that energy prosumers with low credibility cannot join the distributed electricity market. Secondly, the nodes with higher credit value form a VNS to verify information in the Sub Chain, and improve the real-time energy interaction efficiency through the optimized consensus mechanism. Thirdly, the important and not privacy-related data are transmitted through the Sub Chain to the Main Chain by VNS, which include the transacted electricity quantity and credit evaluation. The Main Chain data are open to the whole network to achieve the effective supervision of P2P trading. Finally, the flexible use of blockchain technology can facilitate the implementation of P2P trading in the distributed electricity market.
The simulation results of the dynamic credit incentive trading model in this study are validated. Their effectiveness and representativeness involved in the distributed electricity market include but are not limited to the following aspects: first of all, Erenhot’s distributed electricity market has established good grid infrastructure, and local data centers and ordinary users can directly purchase electricity from renewable energy power generation enterprises. Secondly, the case study is based on the real distributed electricity market in Erenhot, China. The power installed capacity, power generation and basic price are the actual data of the local electricity market. Thirdly, the double-layer energy blockchain network has been actually developed and is playing a role in the local electricity market. Fourthly, different credit value is a very common phenomenon, and the simulation of prosumers with different credit values is feasible. In addition, it is also credible that the real-time adjustment of the bidding strategy according to market information is more economic and environmentally friendly than fixed bidding and inactive bidding.

6. Conclusions

In this paper, a trading mode is designed based on a double-layer energy blockchain network to fill the gap between creditable P2P trading and blockchain technologies. Compared to the state of the art, this study introduces a new method that facilitates the implementation of P2P trading in distributed electricity markets. The proposed method and its novelties can be summarized as follows:
(1)
Blockchain structure: This paper designs a double-layer energy blockchain network for distributed electricity markets to ensure privacy protection and effective supervision. The blockchain structure is constructed by cross-chain interoperability technology, and the credit-threshold notary scheme and blockchain digital signature separates P2P trading data from the information to be made public.
(2)
Identity authentication: The ring mapping algorithm is innovatively introduced into distributed electricity markets, allowing each energy prosumer to have a proprietary identity in the energy blockchain network. This mapping identity authentication makes entity identity traceable so that uncredible nodes are excluded from the trading platform.
(3)
Information verification: Credit evaluation and sorting are according to contract performance, consensus participation, and trading enthusiasm of energy prosumers. The VNS is formed by high-credit nodes, which verifies the energy trading data on each Sub Chain and the Main Chain. This mode makes the formation of new blocks with high credibility.
(4)
Trading model: The proposed bidding strategy can adjust quotation dynamically according to real-time market information so that the P2P trading has higher social welfare and renewable energy consumption. Moreover, the credit incentives can incite the credit behavior of energy prosumers.
(5)
Research value: This study is expected to solve the technical problems of insufficient credit and unregulated P2P energy trading, which can promote the application of P2P trading and blockchain technology.
This study is of strong scientific value for the energy community. First of all, the local electricity markets in most regions of China conduct distributed electricity transactions according to the case scenario of this study. Next, we discuss the economic benefits of different credit value nodes under the proposed trading model. Because of the incentive mechanism, highly credible prosumers can not only verify cross-chain information, but also obtain practical economic benefits. Then, the blockchain-distributed database enables each prosumer to obtain real-time information. The blockchain system makes it possible for the proposed bidding strategy to actively adjust the quotation to obtain better returns. In summary, with the development of P2P energy trading, the double-layer energy blockchain network and the novel trading model proposed in this paper provides references for the scientific community.

Author Contributions

Conceptualization, L.W. and M.L.; Methodology, L.W. and M.L.; Software, L.W.; Validation, S.J. and M.L.; Formal Analysis, Y.X., D.Z., J.L. and M.L.; Investigation, L.W., D.Z., J.L. and M.L.; Resources, Y.Z. and M.L.; Data Curation, L.W., Y.X. and M.L.; Writing—Original Draft Preparation, L.W., D.Z. and Y.X.; Writing—Review and Editing, L.W., Y.X., D.Z., J.L., S.J. and M.L.; Visualization, Y.X.; Supervision, Y.Z. and M.L.; Project Administration, L.W., Y.Z. and M.L.; Funding Acquisition, Y.Z. and M.L. All authors have read and agreed to the published version of the manuscript.

Funding

This work is supported partially by the National Natural Science Foundation of China (Grant nos. 71974055, and 51772096), Project Supported by Science and Technology Project of SGCC (SGJX0000KXJS1900321), Beijing Science and Technology Project (Z181100005118002), Par-Eu Scholars Program, Science and Technology Beijing 100 Leading Talent Training Project, the Fundamental Research Funds for the Central Universities (2020FR002, 2020MS023, 2020MS028) and the NCEPU “Double First-Class” Program.

Data Availability Statement

The data presented in this study are available on request from the corresponding author. The data are not publicly available due to the project is not completed.

Acknowledgments

The authors wish to acknowledge Meicheng Li and Yan Zhang. Their guidance is important to the successful completion of this study. In addition, thank each member of the research team.

Conflicts of Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Nomenclature

a i address information of node i
b i account balance of node i
c i credit value of node i
d i other attributes of node i
I P K = E , N public key of CA
I S K = D , N private key of CA
L P K = E , N public key of the ring node
L S K = D , N private key of the ring node
p and q random large prime number
S e t L private key to generate digital signature
L n ring mapping space
n i n t e g e r selecting random number of CA
n i n t e g e r result of decryption verification
m p a d filled message from new node
H m hash value
S e t o r i original signature
S e t t a r target signature
n k number of all nodes in VNS
t k   minimum number required to pass a verification
t k actual number pass a verification
C P K v public key of the verification nodes
C i , t s e l l , c o n credit evaluation of contract performance by supplier i in time t
C i , t 1 s e l l , c o n credit evaluation of contract performance by supplier i in time t-1
C j , t b u y , c o n credit evaluation of contract performance by user j in time t
C j , t 1 b u y , c o n credit evaluation of contract performance by user j in time t-1
Q i , j , t power quantity of smart contract in time t
Q i , j , t a c t u a l actual power quantity in time t
C i , t c o n s e n s u s credit evaluation of consensus participation in time t
α t vicious vote in time t
β t virtuous vote in time t
λ penalty factor
C i , t s e l l , b a s i c s basics credit evaluation of supplier i in time t
C j , t b u y , b a s i c s basics credit evaluation of user j in time t
penalty factor of supplier for not actively participating in market operating
penalty factor of user for not actively participating in market operating
l number of time slots in continuous non-participation in the system operation
C i , t s e l l credit evaluation of supplier i in time t
C j , t b u y credit evaluation of user j in time t
ε i , t , 1 s e l l propensity factor for users’ purchasing
ε i , t , 2 s e l l propensity factor for electricity output
ε i , t , 3 s e l l propensity factor for supply and demand relationship
δ i , t s e l l comprehensive propensity factor of supplier i in time t
m a x Q t b u y maximum power quantity of users at time t
s u m Q t b u y total power of all users at time t
s u m Q t s e l l total power of all prosumers at time t
Q i , t s e l l power quantity of prosumer i at time t
P i , m a x s e l l highest selling prices of prosumer i
P i , m i n s e l l lowest selling prices of prosumer i
γ t + 1 rational choice function
ε j , t + 1 b u y degree of urgent need for electricity in time t
P j , t + 1 b u y bidding price of power user
P j , t + 1 b u y , b a s i c s basics bidding price of power user
m i n S P j , t b u y minimum of user’s bidding price sequence up to round t
m a x S P j , t b u y maximum of user’s bidding price sequence up to round t
P t transaction price of round t
R B i s e l l reserve price of power supplier i
R B j b u y reserve price of power user j
V i , t s e l l trading volume of supplier i in time t
V j , t b u y trading volume of user j in time t
E t t o t a l total expense of electricity market operation

References

  1. Sorknæs, P.; Lund, H.; Skov, I.R.; Djørup, S.; Skytte, K.; Morthorst, P.E.; Fausto, F. Smart Energy Markets—Future electricity, gas and heating markets. Renew. Sustain. Energy Rev. 2020, 119, 109655. [Google Scholar] [CrossRef]
  2. Leaders Spar at UN General Assembly Amid Global Crisis. Available online: https://edition.cnn.com/2020/09/22/world/un-general-assembly-trump-bolsonaro-intl/index.html (accessed on 20 December 2020).
  3. China to Bring Total Installed Capacity of Wind, Solar Power to over 1.2 bln kW by 2030: Xi. Available online: http://www.xinhuanet.com/english/2020-12/12/c_139584740.html (accessed on 20 December 2020).
  4. Mararakanye, N.; Bekker, B. Renewable energy integration impacts within the context of generator type, penetration level and grid characteristics. Renew. Sustain. Energy Rev. 2019, 108, 441–451. [Google Scholar] [CrossRef]
  5. Tabar, V.S.; Abbasi, V. Energy management in microgrid with considering high penetration of renewable resources and surplus power generation problem. Energy 2019, 189, 116264. [Google Scholar] [CrossRef]
  6. Andrea, P.; Ridoy, D.; Yue, W.; Zunaib, A.; Richard, K.; Ghanim, P.; Roberto, T. Micro market based optimisation framework for decentralised management of distributed flexibility assets. Renew. Energy 2021, 163, 1595–1611. [Google Scholar]
  7. Ahmadi, M.; Adewuyi, O.B.; Danish, M.S.S.; Mandal, P.; Yona, A.; Senjyu, T. Optimum coordination of centralized and distributed renewable power generation incorporating battery storage system into the electric distribution network. Int. J. Electr. Power Energy Syst. 2021, 125, 106458. [Google Scholar] [CrossRef]
  8. Kumar, G.V.B.; Sarojini, R.K.; Palanisamy, K.; Padmanaban, S.; Holm-Nielsen, J.B. Large Scale Renewable Energy Integration: Issues and Solutions. Energies 2019, 12, 1996. [Google Scholar] [CrossRef] [Green Version]
  9. Kyoungsoo, B.; Sunyong, P.; Jongtae, L.; Jaesoo, Y. Mobile P2P-Based Skyline Query Processing over Delay-Tolerant Networks. Electronics 2019, 8, 1276. [Google Scholar]
  10. Gijs, V.L.; Tarek, A.; Madeleine, G.; Wilfried, V.S. An integrated blockchain-based energy management platform with bilateral trading for microgrid communities. Appl. Energy 2020, 263, 114613. [Google Scholar]
  11. Guerrero, J.; Chapman, A.C.; Verbič, G. Decentralized P2P Energy Trading Under Network Constraints in a Low-Voltage Network. IEEE Trans. Smart Grid 2019, 10, 5163–5173. [Google Scholar] [CrossRef] [Green Version]
  12. Noor, S.; Yang, W.; Guo, M.; van Dam, K.H.; Wang, X. Energy Demand Side Management within micro-grid networks enhanced by blockchain. Appl. Energy 2018, 228, 1385–1398. [Google Scholar] [CrossRef]
  13. Mahmud, K.; Nizami, M.S.H.; Ravishankar, J.; Hossain, M.J.; Siano, P. Multiple Home-to-Home Energy Transactions for Peak Load Shaving. IEEE Trans. Ind. Appl. 2020, 56, 1074–1085. [Google Scholar] [CrossRef]
  14. Das, S.; Ray, A.; De, S. Optimum combination of renewable resources to meet local power demand in distributed generation: A case study for a remote place of India. Energy 2020, 209, 118473. [Google Scholar] [CrossRef]
  15. Hasan, M. Peer-to-peer home energy management incorporating hydrogen storage system and solar generating units. Renew. Energy 2020, 156, 183–192. [Google Scholar]
  16. Foti, M.; Vavalis, M. Blockchain based uniform price double auctions for energy markets. Appl. Energy 2019, 254, 113604. [Google Scholar] [CrossRef]
  17. Mengelkamp, E.; Gärttner, J.; Rock, K.; Kessler, S.; Orsini, L.; Weinhardt, C. Designing microgrid energy markets: A case study: The Brooklyn Microgrid. Appl. Energy 2018, 210, 870–880. [Google Scholar] [CrossRef]
  18. Tushar, W.; Yuen, C.; Saha, T.K.; Morstyn, T.; Chapman, A.C.; Alam, M.J.E. Peer-to-peer energy systems for connected communities: A review of recent advances and emerging challenges. Appl. Energy 2021, 282, 116131. [Google Scholar] [CrossRef]
  19. Japanese Blockchain Consortium Researches Electricity Trading. Available online: https://www.ledgerinsights.com/japanese-blockchain-consortium-researches-electricity-trading/ (accessed on 25 December 2020).
  20. $20 Million Research Programme to Boost Singapore’s Power Engineering Capabilities. Available online: https://www.ema.gov.sg/media_release.aspx?news_sid=20181029wBCLGRF7Apau (accessed on 25 December 2020).
  21. Power Ledger P2P Platform Goes across the Meter with BCPG at T77 Precinct, Bangkok. 2020. Available online: https://medium.com/power-ledger/powerledger-p2p-platform-goes-across-the-meter-with-bcpg-at-t77-precinct-bangkok-62df5aba3d0a (accessed on 20 December 2020).
  22. Lin, J.; Pipattanasomporn, M.; Rahman, S. Comparative analysis of auction mechanisms and bidding strategies for P2P solar transactive energy markets. Appl. Energy 2019, 255, 113687. [Google Scholar] [CrossRef]
  23. Lwin, M.T.; Yim, J.; Ko, Y.-B. Blockchain-Based Lightweight Trust Management in Mobile Ad-Hoc Networks. Sensors 2020, 20, 698. [Google Scholar] [CrossRef] [Green Version]
  24. Sheikh, M.I.; Mariusz, N.; Roshan, J.; Ashish, K.M. Security Aspects of Blockchain Technology Intended for Industrial Applications. Electronics 2021, 10, 951. [Google Scholar]
  25. Trabucchi, D.; Moretto, A.; Buganza, T.; Alan, M. Disrupting the Disruptors or Enhancing Them? How Blockchain Re-Shapes Two-Sided Platforms. In Proceedings of the 26th Innovation and Product Development Management Conference, Leicester, UK, 6–9 June 2019; pp. 1–17. [Google Scholar]
  26. Koirala, B.P.; Koliou, E.; Friege, J.; Hakvoort, R.A.; Herder, P.M. Energetic communities for community energy: A review of key issues and trends shaping integrated community energy systems. Renew. Sustain. Energy Rev. 2016, 56, 722–744. [Google Scholar] [CrossRef] [Green Version]
  27. Luthander, R.; Widén, J.; Nilsson, D.; Palm, J. Photovoltaic self-consumption in buildings: A review. Appl. Energy 2016, 142, 80–94. [Google Scholar] [CrossRef] [Green Version]
  28. Lehlogonolo, P.I.L.; Gerhard, P.H.; Sherrin, J.I.; Hein, S.V. Smart Microgrid Energy Market: Evaluating Distributed Ledger Technologies for Remote and Constrained Microgrid Deployments. Electronics 2021, 10, 714. [Google Scholar]
  29. Lu, Z.; Wang, J.; Yong, W.; Tang, Z.; Yang, M.; Zhang, B. Coordinated P2P electricity trading model with aggregated alliance and reserve purchasing for hedging the risk of deviation penalty. Energy Reports 2021, 7 (Suppl. 1), 426–435. [Google Scholar] [CrossRef]
  30. Cintuglu, M.H.; Martin, H.; Mohammed, O.A. Real-time implementation of multiagent-based game theory reverse auction model for microgrid market operation. IEEE Trans. Smart Grid 2015, 6, 1064–1072. [Google Scholar] [CrossRef]
  31. Shamsi, P.; Xie, H.; Longe, A.; Joo, J.-Y. Economic dispatch for an agent-based community microgrid. IEEE Trans. Smart Grid 2016, 7, 2317–2324. [Google Scholar] [CrossRef]
  32. De Paola, A.; Angeli, D.; Strbac, G. Price-based schemes for distributed coordination of flexible demand in the electricity market. IEEE Trans. Smart Grid 2017, 8, 3104–3116. [Google Scholar] [CrossRef]
  33. Zhou, Y.; Wu, J.; Long, C. Evaluation of peer-to-peer energy sharing mechanisms based on a multiagent simulation framework. Appl. Energy 2018, 222, 993–1022. [Google Scholar] [CrossRef]
  34. Long, C.; Wu, J.; Zhou, Y.; Jenkins, N. Peer-to-peer energy sharing through a two-stage aggregated battery control in a community Microgrid. Appl. Energy 2018, 226, 261–276. [Google Scholar] [CrossRef]
  35. Nguyen, S.; Peng, W.; Sokolowski, P.; Alahakoon, D.; Yu, X. Optimizing rooftop photovoltaic distributed generation with battery storage for peer-to-peer energy trading. Appl. Energy 2018, 228, 2567–2580. [Google Scholar] [CrossRef]
  36. El-Baz, W.; Tzscheutschler, P.; Wagner, U. Integration of energy markets in microgrids: A double-sided auction with device-oriented bidding strategies. Appl. Energy 2019, 241, 625–639. [Google Scholar] [CrossRef]
  37. Lucchi, E.; Lopez, C.S.P.; Franco, G. A conceptual framework on the integration of solar energy systems in heritage sites and buildings. IOP Conf. Ser. Mater. Sci. Eng. 2020, 949, 012113. [Google Scholar] [CrossRef]
  38. Mohan, V.; Bu, S.; Jisma, M.; Rijinlal, V.; Thirumala, K.; Thomas, M.S.; Xu, Z. Realistic energy commitments in peer-to-peer transactive market with risk adjusted prosumer welfare maximization. Int. J. Electr. Power Energy Syst. 2020, 124, 106377. [Google Scholar] [CrossRef]
  39. Ghatikar, G.; Mashayekh, S.; Stadler, M.; Yin, R.; Liu, Z. Distributed energy systems integration and demand optimization for autonomous operations and electric grid transactions. Appl. Energy 2016, 167, 432–448. [Google Scholar] [CrossRef] [Green Version]
  40. Dongjun, N.; Sejin, P. Fusion Chain: A Decentralized Lightweight Blockchain for IoT Security and Privacy. Electronics 2021, 10, 391. [Google Scholar]
  41. Zhang, Y.; Wang, L.; Wu, J.; Yuan, R.; Li, M. Blockchain and integrated energy system: Application and prospect. Natl. Nat. Sci. Found. China 2020, 34, 35–41. [Google Scholar]
  42. Wu, X.; Duan, B.; Yan, Y.; Zhong, Y. M2M blockchain: The case of demand side management of smart grid. In Proceedings of the 2017 IEEE 23rd International Conference on Parallel and Distributed Systems (ICPADS), Shenzhen, China, 15–17 December 2017. [Google Scholar]
  43. Tsao, Y.C.; Thanh, V.V. Toward blockchain-based renewable energy microgrid design considering default risk and demand uncertainty. Renew. Energy 2021, 163, 870–881. [Google Scholar] [CrossRef]
  44. Sikorski, J.J.; Haughton, J.; Kraft, M. Blockchain technology in the chemical industry: Machine-to-machine electricity market. Appl. Energy 2017, 195, 234–246. [Google Scholar] [CrossRef]
  45. Li, Y.; Yang, W.; He, P.; Chen, C.; Wang, X. Design and management of a distributed hybrid energy system through smart contract and blockchain. Appl. Energy 2019, 248, 390–405. [Google Scholar] [CrossRef]
  46. Wang, L.; Liu, J.; Yuan, R.; Wu, J.; Zhang, D.; Zhang, Y.; Li, M. Adaptive bidding strategy for real-time energy management in multi-energy market enhanced by blockchain. Appl. Energy 2020, 279, 115866. [Google Scholar] [CrossRef]
  47. Hua, W.; Jiang, J.; Sun, H.; Wu, J. A blockchain based peer-to-peer trading framework integrating energy and carbon markets. Appl. Energy 2020, 279, 115539. [Google Scholar] [CrossRef]
  48. Zhang, H.; Wang, J.; Ding, Y. Blockchain-based decentralized and secure keyless signature scheme for smart grid. Energy 2019, 180, 955–967. [Google Scholar] [CrossRef]
  49. Han, D.; Zhang, C.; Ping, J.; Yan, Z. Smart contract architecture for decentralized energy trading and management based on blockchains. Energy 2020, 199, 117417. [Google Scholar] [CrossRef]
  50. Schulte, S.; Sigwart, M.; Frauenthaler, P.; Borkowski, M. Towards blockchain interoperability. In Proceedings of the International Conference on Business Process Management, Vienna, Austria, 1–6 September 2019. [Google Scholar]
  51. Pop, C.; Antal, M.; Cioara, T.; Anghel, I.; Sera, D.; Salomie, I. Blockchain-based scalable and tamper-evident solution for registering energy data. Sensors 2019, 19, 3033. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  52. Daghmehchi, F.M.; Ghorbani, A.; Kim, H.; Song, J. Hy-Bridge: A hybrid blockchain for privacy-preserving and trustful energy transactions in Internet-of-Things platforms. Sensors 2020, 20, 928. [Google Scholar] [CrossRef] [Green Version]
  53. He, H.; Luo, Z.; Wang, Q.; Chen, M.; He, H.; Gao, L.; Zhang, H. Joint Operation Mechanism of Distributed Photovoltaic Power Generation Market and Carbon Market Based on Cross-Chain Trading Technology. IEEE Access 2020, 8, 66116–66130. [Google Scholar] [CrossRef]
  54. Wang, L.; Wu, J.; Yuan, R.; Zhang, D.; Liu, J.; Jiang, S.; Zhang, Y.; Li, M. Dynamic Adaptive Cross-Chain Trading Mode for Multi-Microgrid Joint Operation. Sensors 2020, 20, 6096. [Google Scholar] [CrossRef] [PubMed]
  55. Ma, C. Research on Improved Consensus Mechanism of Delegated Proof of Stake in Blockchain. Ph.D. Thesis, Liaoning University, Shenyang, China, 2020. [Google Scholar]
  56. Qiao, R.; Luo, X.; Zhu, S.; Liu, A.; Yan, X.; Wang, Q. Dynamic Autonomous Cross Consortium Chain Mechanism in e-Healthcare. IEEE J. Biomed. Health Inform. 2020, 24, 2157–2168. [Google Scholar] [CrossRef] [PubMed]
  57. Qin, J.; Sun, W.; Li, Z.; Zhu, Y. Credit Consensus Mechanism for Microgrid Blockchain. Autom. Electr. Power Syst. 2020, 44, 15. [Google Scholar]
  58. He, Y.X.; Liu, P.L.; Li, Z.; Yan, Z.; Yang, L. Competitive model of pumped storage power plants participating in electricity spot Market—In case of China. Renew. Energy 2021, 173, 164–176. [Google Scholar] [CrossRef]
  59. Wang, J.; Wang, Q.; Zhou, N.; Chi, Y. A Novel Electricity Transaction Mode of Microgrids Based on Blockchain and Continuous Double Auction. Energies 2017, 10, 1971. [Google Scholar] [CrossRef] [Green Version]
Figure 1. System structure of the double-layer energy blockchain network.
Figure 1. System structure of the double-layer energy blockchain network.
Electronics 10 01815 g001
Figure 2. System structure pseudocode of the double-layer energy blockchain network.
Figure 2. System structure pseudocode of the double-layer energy blockchain network.
Electronics 10 01815 g002
Figure 3. The operation process of the double-layer energy blockchain network.
Figure 3. The operation process of the double-layer energy blockchain network.
Electronics 10 01815 g003
Figure 4. The operation process pseudocode of the double-layer energy blockchain network.
Figure 4. The operation process pseudocode of the double-layer energy blockchain network.
Electronics 10 01815 g004
Figure 5. Ring mapping identity authentication diagram.
Figure 5. Ring mapping identity authentication diagram.
Electronics 10 01815 g005
Figure 6. Geographical location of each electricity seller and buyer.
Figure 6. Geographical location of each electricity seller and buyer.
Electronics 10 01815 g006
Figure 7. One-day output power of energy prosumers.
Figure 7. One-day output power of energy prosumers.
Electronics 10 01815 g007
Figure 8. Ring mapping identity authentication for new prosumers: (a) key procedure code of smart contracts; (b) operation in UI.
Figure 8. Ring mapping identity authentication for new prosumers: (a) key procedure code of smart contracts; (b) operation in UI.
Electronics 10 01815 g008
Figure 9. Operating UI of P2P energy trading in Sub Chain.
Figure 9. Operating UI of P2P energy trading in Sub Chain.
Electronics 10 01815 g009
Figure 10. Operating UI of information query in Main Chain.
Figure 10. Operating UI of information query in Main Chain.
Electronics 10 01815 g010
Figure 11. Trading profits with different bidding strategies.
Figure 11. Trading profits with different bidding strategies.
Electronics 10 01815 g011
Figure 12. Social welfare with different bidding strategies.
Figure 12. Social welfare with different bidding strategies.
Electronics 10 01815 g012
Figure 13. Renewable energy consumption with different bidding strategies.
Figure 13. Renewable energy consumption with different bidding strategies.
Electronics 10 01815 g013
Table 1. Bidding parameters and credit values.
Table 1. Bidding parameters and credit values.
ProsumerInitial Bidding Price
(USD/MWh)
Reserve Price
(USD/MWh)
Credit Value
Seller 167.4547.2290
Seller 266.5046.4570
Seller 370.6349.5050
Seller 470.5048.4530
Seller 570.3548.3010
Buyer 151.8566.70100
Buyer 252.0067.6080
Buyer 350.0065.0060
Buyer 451.0066.5040
Buyer 551.5065.0020
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Wang, L.; Xie, Y.; Zhang, D.; Liu, J.; Jiang, S.; Zhang, Y.; Li, M. Credible Peer-to-Peer Trading with Double-Layer Energy Blockchain Network in Distributed Electricity Markets. Electronics 2021, 10, 1815. https://doi.org/10.3390/electronics10151815

AMA Style

Wang L, Xie Y, Zhang D, Liu J, Jiang S, Zhang Y, Li M. Credible Peer-to-Peer Trading with Double-Layer Energy Blockchain Network in Distributed Electricity Markets. Electronics. 2021; 10(15):1815. https://doi.org/10.3390/electronics10151815

Chicago/Turabian Style

Wang, Longze, Yu Xie, Delong Zhang, Jinxin Liu, Siyu Jiang, Yan Zhang, and Meicheng Li. 2021. "Credible Peer-to-Peer Trading with Double-Layer Energy Blockchain Network in Distributed Electricity Markets" Electronics 10, no. 15: 1815. https://doi.org/10.3390/electronics10151815

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop