Next Article in Journal
Experimental Investigation of Performance, Emission and Combustion Characteristics of a Common-Rail Diesel Engine Fuelled with Bioethanol as a Fuel Additive in Coconut Oil Biodiesel Blends
Next Article in Special Issue
SmartLVGrid Platform—Convergence of Legacy Low-Voltage Circuits toward the Smart Grid Paradigm
Previous Article in Journal
Maintenance Strategy Optimization of a Coal-Fired Power Plant Cooling Tower through Generalized Stochastic Petri Nets
Previous Article in Special Issue
Microgrid Group Trading Model and Solving Algorithm Based on Blockchain
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Trusted Transactions in Micro-Grid Based on Blockchain

1
School of Information Engineering, Nanchang University, Nanchang 330031, China
2
School of Software, Nanchang University, Nanchang 330047, China
3
Jiangsu Linyang Energy Co. Ltd., Qidong 226200, China
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Energies 2019, 12(10), 1952; https://doi.org/10.3390/en12101952
Submission received: 17 April 2019 / Revised: 10 May 2019 / Accepted: 13 May 2019 / Published: 22 May 2019
(This article belongs to the Special Issue Intelligent Decentralized Energy Management in Microgrids )

Abstract

:
In order to build a local electricity market (LEM), community members can trade electricity peer-to-peer (P2P) with their neighbors. This paper proposes a Hierarchical Bidding and Transaction Structure based on blockchain (HBTS). First, combined with the multi-agents, each microgrid corrects the estimated cost probability distribution of other microgrids by Bayesian theorem, making its probability closer to the accurate probability. Second, for maximize the benefits of the microgrid, this paper uses the Nash equilibrium in the Cournot model to find the optimal quotation and output of different bidding strategies for the microgrid under different power demand conditions. Then the exchange of electricity translates into an exchange of digital proof of electricity purchases and sales of electricity on the Hyperledger Fabric, ensuring the security of the transaction process and the irreparable modification of ledgers. Finally, we verify the effectiveness of the bidding strategy through experiments, and analyze the transaction process.

1. Introduction

With the advocacy of renewable energy resources (REs) around the world, more and more renewable energy resources have been introduced into the current energy structure [1]. As a consequence, providers of RE have been participating increasingly in the free electricity market [2,3]. This facilitates the establishment of a local electricity market (LEM), which provides users with more choices but also brings the challenge of the transaction management [4]. For example, Li, Y. et al. [5,6,7] especially discussed the optimal scheduling of an isolated microgrid to minimize the cost of the microgrid and promoted transactions between users and the microgrid. Furthermore, ensuring the safe and autonomous trading of the LEM has received increasing attention.
REs are usually located in different regions and operate independently. In order to achieve a reasonable allocation of resources and sufficient flexibility, an integrated community energy system (ICES) has been proposed as an efficient approach to coordinate distributed energy resources and reorganize local energy systems [8]. However, this method relies too much on the processing performance of the central management organization, and the efficiency in clearing and settlement is low. As an emerging distributed database technology, blockchain technology has the data transparency and reliability that make it suitable for data analysis and decision making of decentralized system structures. Using blockchain to solve the existing problems in the power market has become a hot topic [9]. The transparency and traceability of blockchain can solve the trust problem between participants in smart grid [10]. In [11], Aitzhan et al. use blockchain to ensure the security and privacy of energy transactions. However, since the transaction is based on the public blockchain of Bitcoin, the consensus that proof-of-work takes most of the time. In combination with the transaction algorithm of power market, Mengelkamp et al. [12] realized a decentralized market trading platform by building a private Ethereum blockchain with a double auction mechanism, which to some extent improved the efficiency of trading, but did not give too much detail on how to deal with the problem of miners’ expenses. In [13], Mengelkamp also pointed out that blockchain technology can enable consumers and producers to trade their own energy in the microgrid energy market in the form of peer-to-peer (P2P), and the regulation needs to be adapted before microgrid energy markets can be commercially implemented.
Building on the current literature, this paper introduced in detail how to apply Hyperledger Fabric to the microgrid power market. In order to guide producers to make reasonable quotations and get maximum benefits, we proposed to use Bayesian correction to predict other microgrid bidding strategies more accurately, thus giving the optimal quotation and output suggestions. At the same time, the transfer mode of Hyperledger Fabric ensures the security of transactions.
Although there have been many studies on P2P transactions between microgrids, e.g., [14,15,16], they only provide descriptions of various P2P models for power networks [17], but ignore the discussion of transaction data security. Or, e.g., [10,11,12,13], they only illustrate the data security protection that blockchain technology can bring to the transactions between microgrids, but lack the bidding strategy guidance between microgrids to enable each microgrid to maximize their respective benefits and promote Transactions between microgrids. Therefore, to the best of our knowledge, the use of blockchain technology to build a trusted transaction platform between microgrids and to promote the development of microgrid through reasonable bidding strategy are yet to be investigated.
The main contributions of this work can be summarized as follows:
  • In view of the shortcomings of the existing microgrid transaction architecture model, this paper proposes a new model HBTS and illustrates the feasibility of the model in detail.
  • In order to maximize the revenue of each microgrid, this paper proposes an improved bidding algorithm based on Bayesian to provide more accurate bidding strategy guidance for microgrid providers when the total power of microgrid meets the market demand.
The rest of this paper is organised as follows. Section 2 gives some background on P2P transactions between microgrids and blockchain technology. In addition, a comparison between different existing architectures is described. Section 3 details the model proposed in this paper and the establishment of the bidding model. Section 4 reflects the test results conducted to evaluate the bidding method presented in this paper. Finally, Section 5 provides some conclusions.

2. Literature Review

2.1. P2P Transactions in LEM

With the continuous advancement of technology and the reduction of component costs, local energy generation is increasingly welcomed by energy consumers. This production facility in the consumer sector is known as the Microgrid (MG): a small-scale power network that can use its own energy resources to power one or more small communities. In [18], Wu et al. has pointed out that the existence of local energy market provides new opportunities for the energy consumers and the distributed energy sellers to perform the local energy trading in a cooperative manner such that they all can benefit. Nowadays, more and more families can generate their own energy through solar panels, wind turbines, or other renewable energy sources, instead of simply relying on the grid [19]. In order to facilitate the sale of the surplus electricity to other users who need to purchase electricity at a reasonable price, thereby ensuring the collective minimization of energy costs, and possibly maximizing personal interests. This development is setting the scene to a new paradigm: peer-to-peer electricity trading [19].
In fact, there are several P2P energy trading projects and experiments underway worldwide. As mentioned in literature [20], Piclo, Vandebron, Yeloha, SonnenCommunity, and others are all national or regional online platforms supporting P2P energy transactions. The owners of these platforms play the role of suppliers in the power industry. They only pay attention to the development of business models, but ignore the possibility of introducing these models into the smaller local energy market. Since P2P electricity trading is still at an early stage in business, studies are focused on what technology to use in that trading. In [21], Alam et al. used a centralized architecture Application platform to solve P2P transactions in the microgrid. However, adding a central entity to process information introduces unnecessary communication delays between nodes, and the central entity may change the price of electricity for its own benefit. To this end, users urgently need to provide autonomous services to help with complex decision-making tasks. The Multi-Agent system is widely recognized as an effective and promising tool for ensuring communication between existing smart grid systems [22]. In [23], Morstyn et al. implemented a P2P energy trading for real-time and forward markets of prosumers. Each agent’s preferences that capture upstream-downstream energy balance and forward market uncertainty are included in the proposed framework. In order to achieve a full P2P market, so that two peers can reach a transaction on a certain amount of energy and price without centralized supervision, Sorin et al. [24] proposed a full P2P market design between producers and consumers, which relies on a multi-bilateral economic dispatch. P2P structures include product differentiation, where consumers can express their preferences, such as local or green energy. In [25], Jogunola et al. discussed and compared different P2P architecture in energy network in detail, including structured and unstructured architecture, providing good reference value for micro-grid network planners to use P2P architecture to better construct or organize their networks. Structured models [26,27] usually build topologies through distributed hash table technology [28], which can theoretically provide fast and efficient information search capabilities for networks. However, consumer data privacy is vulnerable to attacks due to deterministic structured architecture; the nodes in the unstructured model [29,30] are randomly connected to each other, so the complete P2P structure can achieve high performance and the problem of Single Point of Failure (SPoF) can be solved. However, because nodes can join and leave at will, the network fluctuates and may be attacked by malicious nodes.

2.2. Blockchain-Based Microgrid

As described in [31], there are many other ways to realize P2P energy transaction. While blockchain technology is the backbone behind the cryptocurrencies that have appeared in recent years, it can be a key technology for the deployment of P2P market in the energy sector [32]. Blockchain technology is essentially a decentralized distributed data storage technology. Through point-to-point transmission, cryptography ensures that data records between blocks are correlated, making transaction records unforgeable and modifiable [33]. As a result, it has been widely used in the energy Internet in recent years.
In 2014, Mihaylov et al. [34] first applied the blockchain technology to the smart grid, and through the proposed new virtual currency, called NRGcoin. The locally produced renewable energy was directly converted into NRGcoin, through this new trading mechanism. Encourage consumers to balance production and consumption in their own interests to achieve demand response. In [13], Mengelkamp et al. designed a blockchain-based energy network concept and evaluated the case study of the Brooklyn microgrid, the world’s first project to promote P2P energy trading on the blockchain. Li et al. [35] proposes a credit-based payment scheme to support fast and frequent payment, and to solve the transaction restrictions caused by the acknowledgment delay on the blockchain during P2P energy transactions. In [12], Mengelkamp et al. provides a decentralized marketplace for energy producers and consumers through private chains, enabling local energy transactions without the need for a central intermediary. In [36], Munsing used the smart meters of each building to act as compute nodes in the blockchain network, build private Ethereum chains, and use smart contracts to solve trust, security and transparency issues. Promote decentralized coordination between untrusted agents, thereby avoiding the risk of monopolizing price manipulation and privacy issues.
All kinds of distributed consensus algorithms in these literatures provide unique characteristics, advantages and disadvantages. As summarized in [9], the methodology used for reaching consensus in blockchain networks determines to a large extent key performance characteristics such as scalability, transaction speed, transaction finality, security, and spending of resources such as electricity.

2.3. Consensus Mechanism in Blockchain

Since there are many types of consensus mechanisms [9], we chose the top three for a brief introduction.
(1)
Proof of Work (PoW). In 2009, Satoshi Nakamoto applied the PoW in the Bitcoin blockchain network as the consensus mechanism for the whole network consistency. In this mechanism, each node on the network uses the SHA256 hash algorithm to compute the hash value of a constantly changing block header. The consensus is that the value must be equal to or less than a given value. In a distributed network, all participants need to use different random Numbers to continuously calculate the hash value until the target is reached. When one node has an exact value, all the other nodes must verify with each other that the value is correct. After that, the transactions in the new block will be verified to prevent fraud. The advantage of PoW is complete decentralization and distributed ledger. The disadvantages are also very obvious. Due to a large amount of resource waste caused by mining and a long time for PoW to reach a consensus, the 10-min block generation process makes it difficult to meet the requirements for commercial use.
(2)
Proof of Stake (PoS). Criticism to PoW led to an alternative algorithm being proposed broadly known as PoS. PoS is an energy saving alternative to PoW. It does not require users to find a random number in an unrestricted space. Instead, it is a system that provides corresponding interest according to the amount and time you hold certain digital coins. There are still some problems in mining, but the difficulty of mathematical problems is related to the age of the coinholder. In short, the longer coins are held by the holder, the simpler the puzzle becomes, thus shortening the time required for the blockchain consensus as a whole. However, the low cost of mining increases the possibility of attack, and nodes in the network still need nodes in the network for mining calculation in essence.
(3)
Practical Byzantine Fault Tolerance (PBFT). The practical Byzantine fault tolerance algorithm was proposed by MiguelCastro of MIT in 1999, it is the first practical consensus algorithm to realize Byzantine fault tolerance in asynchronous distributed network. Now the PBFT algorithm is a key component of building most modern blockchain systems using a voting-based consensus approach. Transactions are individually validated and signed by known validator nodes, which makes the PBFT more suitable for trusted environments than public permissionless ledger applications. When enough signatures have been collected, the transaction is considered valid and a consensus is reached. PBFT provides instant finality because blocks that have been globally validated cannot be reversed. Hyperledger, an open-source project led by the Linux foundation, currently uses just such a consensus mechanism.
The above listed studies prove that P2P is a suitable architecture for microgrid transactions. However, most of them have common limitations, including: (1) Focusing on the theoretical background of P2P architecture but neglecting the discussion of transaction security; (2) No description of important bid strategies that promote transactions between microgrids. Table 1 presents a summary of the literature reviewed.

3. The Proposed HBTS

3.1. Hierarchical Bidding and Trading System Based on Blockchain

In order to realize the secure transaction between microgrids and promote the use of local distributed clean energy, this paper proposes a bid-transaction model of hierarchical combined agents for fair bidding and Fabric security transactions between microgrids, as shown in Figure 1. It mainly consists of three layers: the user layer, the agent layer, and the blockchain layer. The details of each layer are as follows.
1. User layer
In this system, the user layer mainly has consumers, power producers, and main power grids, and consumers can also be power producers (when a certain resident has clean energy, there is still a surplus in satisfying their own needs). In order to complete the data collection of each user and sort out the needs of each user to facilitate the transaction of microgrid, we propose to introduce some advanced smart devices in each user, which is mainly used to obtain the user’s electricity information and submit it to the upper level for sorting out the user’s needs. In order to ensure the security and privacy of data, each smart device is equipped with an encryption module, which encrypts the information before transmission.
2. Agent layer
The traditional power grid adopts centralized control mode, and acts in accordance with the command and decision of the central node of the network. However, due to the heavy control and operation burden of the central node in normal operation mode, the centralized functional platform is difficult to respond to the personalized requirements of various devices in the micro grid, which reduces the flexibility of microgrid operation and limits the system scalability. Due to the strong autonomous ability of Agent, in the dynamic environment, multi-agent systems (MAS) can intelligently perceive changes in the field environment and make flexible responses to work requirements. Its basic structure is that each lower Agent has complete intelligence and can act independently. Several lower-level agents follow the instructions of one upper-level Agent, so that they can coordinate with the scheduling of the upper-level Agent to realize the overall action. This structure allows MAS to combine the advantages of a centralized and distributed platform.
The Agent layer plays a connecting role in the model proposed in this paper. In order to adapt to the characteristics of distributed energy in microgrid and the characteristics of blockchain, this paper proposes to use hierarchical multi-agent technology to coordinate the data processing of micro grid.
Each end user includes some Agents with different functions, namely Load Agent (LA), Distributed Generation Agent (DGA), and Grid Agent (GA). These agents and the specific interaction mode of the agent layer are shown in Figure 2.
The LA sends its own demands to the Micro-Grid Agent (MGA), while the DGA sends its own status parameters to the MGA. MGA is responsible for submitting the purchase demand and reasonable producer bidding strategy to the market mechanism Market Mechanism. In other words, the MGA is able to initiate transactions to the power market through user-defined rules to complete the electricity sale process of bidding strategy or the process of power purchase by the user. After MGA completes the matching process between the two parties, in order to ensure the safe and reliable transaction, the two parties will conduct the transaction on the platform based on Fabric and record the details of each transaction on the block chain.
3. Blockchain layer
The coverage and users of the local energy market are relatively certain. Based on this kind of credible environment, it is reasonable to set permission mode to enter the blockchain network. Transactions in the local energy market often involve large amounts of small and frequent transactions, so the investment in hardware, the waste of resources from mining, and the fees of confirming transactions are not negligible. Both Bitcoin and Ethereum have some insurmountable problems. For example, first of all, the transaction efficiency is low, and the entire network of Bitcoin can only support about 7 transactions per second. Second, the certainty of the transaction cannot be guaranteed. Finally, the mining mechanism used to reach consensus will result in a great waste of resources. Therefore, we propose to use Fabric as the platform for microgrid transactions. The transaction process of fabric can be summarized as Figure 3. Compared to other public chains, Fabric introduces member management services. The current model is based on a trusted third-party organization, the certification authority CA, to issue certificates. Therefore, each participant can only access the fabric system after providing the corresponding certificate to prove identity. That provides management convenience for us to establish a local microgrid trading market. In addition, each peer node connected to the fabric shared ledger holds a copy of the ledger. As shown in Figure 4, the ledger consists of two parts: the Block part of the chain structure and the World state part of the storage state data. Among them, the Block part stores information about all transactions, only the query can be added, and cannot be deleted. The World state section stores the most recent value of all variable key-value pairs in the transaction log. So the transaction completed on Hyperledger Fabric and will be record the details of it to ensure the system safety and reliability.
Through the detailed analysis of the model proposed in this paper, it can be seen that due to the flexible scalability of the agent layer MAS, new users, and their related facilities can be flexibly added without changing other infrastructure. For the blockchain layer, the peer node responsible for handling user transactions can also easily join the network. Therefore, the model proposed in this paper can be easily extended to transactions between microgrids in a wider range.
In a free market environment, sellers usually gain more benefits through game theory. In the traditional game competition, the transaction information of other e-commerce vendors need to wait for the unified release of the grid Trading center. The trading platform based on block chain technology, the transparency and traceability of information make market competition form a trusted distributed system without central dependence, which can quickly respond to market information, thus saving a lot of time and improving the flow rate of information. In other words, the agent layer MGA can quickly calculate the appropriate bidding strategy, thereby improving the efficiency of the whole system. The operation of the whole system can be summed up in Figure 5. Since bidding strategy plays an important role in the system, we will introduce it in detail in the next section.

3.2. Description of the Bidding Strategy

In the electricity market, producers can maximize their profits through strategic bidding. Considering the privacy of personal information, some producers may not want to share their accurate strategic information. Their bidding process can be described as a non-cooperative game process with incomplete information. Before the establishment of power market with microgrid, this paper assumes the following assumptions for the model.
  • The information of each microgrid is obtained through the electricity market trading center, and the information of the cost function of other microgrids is basically the same. Besides knowing their own real production cost, they do not know the production cost of other microgrids.
  • There is no collusion and cooperation among microgrids.
  • The total supply in the market equals the demand, i.e., the balance between supply and demand.
Assuming that there are N microgrids bidding for electricity in the current electricity market, and each microgrid only knows its own cost. A microgrid can know how many possible types of other bidding microgrid based on historical data, and estimate the probability distribution of competitors by publishing information.
Suppose the cost function of microgrid i is:
C P i = a i P i 2 + b i P i + c i
where P i is the output of the microgrid i, C P i is the total cost of the microgrid i, a i , b i , and c i are cost constant coefficients.
The profit of microgrid i is:
π P i = ρ P i C P i , i = 0 , 1 , , N 1
where ρ is the electricity price at that moment.
It is assumed that microgrid i has t different types, and each type corresponds to a production cost function. They are independent of each other. The probability distribution is as follows.
In order to make the probability prediction of other microgrids more close to the real probability, we propose to use Bayesian theorem to update the probability in Table 2.
p i j n m = p C j m | C i n = p C j m p C i n | C j m p C i n = p C j m p C i n | C j m l = 1 t p C j l p C i n | C j l
In this equation, p i j n m represents a posteriori probability. In other words, when the cost function of type n is selected for micro grid i, the probability under type m cost function of micro grid j is re-evaluated. p C j m denotes a prior probability of selecting a cost function of type m for microgrid j. p C i n | C j m is a conditional probability, which can be estimated by historical data of transactions. Therefore, in the case of microgrid i choosing type n cost function, the above Table 2 can be updated as Table 3.
Take microgrid 0 as an example, let the selected cost function be type 1, the cost function is known as:
C P 0 = a 0 P 0 2 + b 0 P 0 + c 0
Then the cost expectation of the microgrid i is:
E C i = l = 1 t P i l C i l P i = a i ¯ P i 2 + b i ¯ P i + c i ¯ , i = 1 , 2 , , N 1
At this point, according to the Harsanyi transformation [37], the game model has changed from an incomplete information game to a complete information imperfect game model. In this complete information game, the Nash equilibrium can be used to solve it. From Equation (1), the profit function of the microgrid i is:
π P i = ρ P i a i ¯ P i 2 + b i ¯ P i + c i ¯
In the Formula (1), ρ is the electricity price for this moment.
From the equilibrium conditions of the Cournot model:
π P i P i = ρ 2 a 0 P 0 + b 0 = 0
π P i P i = ρ 2 a i ¯ P i + b i ¯ = 0 , i = 1 , 2 , , N 1
According to the assumption of supply and demand balance, the total output power P of all microgrids is determined by the coincidence prediction of the time given by the power market trading center.
P = P 0 + i = 1 N 1 P i
From Equations (7)–(9), the microgrid 0 obtains its own optimal bidding power after estimating other power plant conditions:
P 0 = P + i = 1 N 1 b i ¯ 2 a i ¯ i = 1 N 1 b 0 2 a i ¯ 1 + i = 1 N 1 a 0 a i ¯
According to the cost function, the expected value of the marginal cost price of the microgrid 0 can be obtained, and this is the opt quotation.
ρ 0 = ρ = C P 0 P 0 = 2 a 0 P 0 + b 0
So, ρ 0 , P 0 is the best bidding strategy of the microgrid 0.

4. Case Study

4.1. Pre-Set the Parameters of Microgrid

Because it is difficult to collect the data of power market with microgrid, based on the analysis and study of the bidding strategy of microgrid and considering the fluctuation of the bidding strategy of microgrid, we assume that the microgrid data is as shown in Table 4. Each microgrid has the accurate probability under high, medium and low cost functions and the probability of being guessed by other microgrids.
With microgrid 1 as the reference object, microgrid 2 and microgrid 3 are competitors. According to the historical data analysis of microgrid 1 transaction, when other microgrids choose different cost types, the corresponding conditional probability of microgrid 1 is shown in Table 5.

4.2. Results

Take microgrid 1 as an example. According to Bayesian theorem as Equation (3), when microgrid 1 chooses high bidding strategy, the probability of microgrid 2 choosing high bidding strategy can be updated as shown in Equation (12), while the probability of microgrid 2 choosing low bidding strategy can be updated as shown in Equation (13).
p 12 H H = p C 2 H | C 1 H = p C 2 H p C 1 H | C 2 H p C 1 H = 0.25 × 0.60 0.40 = 0.375
p 12 H L = p C 2 L | C 1 H = p C 2 L p C 1 H | C 2 L p C 1 H = 0.25 × 0.20 0.40 = 0.125
The specific probability updates of the microgrid 1 are as shows in Table 6.
By using the posterior probability in Table 6 and Equation (3), the estimated bidding cost parameters of each microgrid in the selection of cost function in Microgrid 1 can be obtained as shown in Table 7.
Considering the load of 160 MW and 280 MW respectively, we can see how to choose the optimal bidding strategy for microgrid 1. The results at a load of 160 MW are shown in Figure 6 and Figure 7, and the results at a load of 280 MW are shown in Figure 8 and Figure 9. It can be seen that whether it is a different market demand situation or a different cost function bidding strategy can get a suitable quotation and output. In addition, from Figure 6, we can see that the higher the bidding strategy is, the higher the bidding price will be. However, the output is not the same rule, and the output is the highest when the medium bidding strategy is adopted. From Figure 7, we can see that the profit is the highest when using the medium cost function. Similar conclusions can also be drawn from Figure 8 and Figure 9. Therefore, before participating in electricity sales, producers can optimize the internal generation plan of the microgrid according to the guidance of bidding strategy, so as to promote the stable operation of the microgrid and maintain higher revenue.
To further illustrate the effectiveness of the improved Bayesian algorithm proposed in this paper, we compare the general method (Guessing probability in Table 4), the actual situation (accurate probability in Table 4), and this study (the probability based on Bayesian calculation in this paper). Similarly, when the demand for power supply is 160 MW, the detailed comparison of bidding strategy and revenue is shown in Table 8. It can be seen that the general estimation method can easily lead to excessive electricity production, thus preventing the actual income from reaching the calculated income, but because of excessive electricity production, the production cost is seriously increased. The method of bidding strategy proposed in this paper is closer to the actual situation than the general estimation method, and can provide effective guidance for producers.

4.3. Analysis of Microgrid Transaction Settlement Process

After the microgrid gives its own quotation information through our proposed bidding strategy, the purchaser can initiate a transaction on the Hyperledger Fabric platform according to their needs. In order to complete the exchange of electricity purchase costs and digital certificates of electricity sales, this paper proposes that the digital currency Electricity Energy Coin (EEC) is issued by a third-party trusted token issuing institution. The EEC can be circulated as shown in Figure 10. The specific settlement process is as follows:
1.
Identify users of the joined Hyperledger Fabric network
In order to ensure that the users participating in the microgrid transaction are real and reliable, the member services provided by Hyperledger Fabric can filter whether users can join to avoid maliciously disrupting the market order.
2.
Issues the appropriate amount of EEC
According to the specific needs of the market, the token issuing institution issues the EEC, and each user can buy and sell the EEC as shown in Figure 10.
3.
Customers initiate EEC transfer transactions to purchase electricity
In order to purchase electricity, the customer needs to first check whether his EEC is sufficient. If it is insufficient, he needs to purchase enough EEC from the coinbase. Then select a power seller to match, and transfer the EEC through the Hyperledger Fabric in exchange for power supply. After the Hyperledger Fabric verifies the transaction information structure integrity check and the endorsement strategy, the Order node sorts the transactions, constructs the blocks, and finally adds them to the ledger of each peer node to complete a transaction.

5. Conclusions

Nowadays, the scale of microgrid is growing, and how to establish a complete microgrid trading platform is particularly important. In this paper, Hyperledger Fabric, the current frontier blockchain technology, combined with bidding strategy, provides an important reference value for the use of block chain technology to solve microgrid market transactions.

Author Contributions

All authors of the paper have made significant contributions to this work. Y.Y. and Y.G. contributed equally to this paper, conceived the idea of work, implemented algorithms, analyzed the experiment data, and wrote the manuscript. W.M. led the project, directed the writing, and revised the paper. F.Z. collected the original data of the experiment and participated in programming.

Funding

This research was supported by the Internationed S&T Cooperation Program of China (ISTCP:2014DFG72240), Natural Science Foundation of China (Grand No. 61563034, No. 61762061), and the Natural Science Foundation of Jiangxi Province, China (Grant No. 20161ACB20004).

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

MGsMicrogrids
DERsDistributed energy resources
DGsDistributed generations
LEMLocal electricity market
P2PPeer to peer
HBTSHierarchical bidding and transaction structure based on blockchain
REsRenewable energy resources
ICESIntegrated community energy system
MGMicrogrid
SPoFSingle Point of Failure
MASMulti-agent systems
LALoad Agent
DGADistributed Generation Agent
GAGrid Agent
MGAMicro-Grid Agent
EECElectricity Energy Coin

References

  1. Zhang, T.; Pota, H.; Chu, C.C.; Gadh, R. Real-time renewable energy incentive system for electric vehicles using prioritization and cryptocurrency. Appl. Energy 2018, 226, 582–594. [Google Scholar] [CrossRef]
  2. Lv, T.; Ai, Q. Interactive energy management of networked microgrids-based active distribution system considering large-scale integration of renewable energy resources. Appl. Energy 2016, 163, 408–422. [Google Scholar] [CrossRef]
  3. Coester, A.; Hofkes, M.W.; Papyrakis, E. Economics of renewable energy expansion and security of supply: A dynamic simulation of the German electricity market. Appl. Energy 2018, 231, 1268–1284. [Google Scholar] [CrossRef]
  4. Rosen, C.; Madlener, R. An auction design for local reserve energy markets. Decis. Support Syst. 2013, 56, 168–179. [Google Scholar] [CrossRef]
  5. Li, Y.; Yang, Z.; Li, G.; Mu, Y.; Zhao, D.; Chen, C.; Shen, B. Optimal scheduling of isolated microgrid with an electric vehicle battery swapping station in multi-stakeholder scenarios: A bi-level programming approach via real-time pricing. Appl. Energy 2018, 232, 54–68. [Google Scholar] [CrossRef] [Green Version]
  6. Li, Y.; Yang, Z.; Li, G.; Zhao, D.; Tian, W. Optimal Scheduling of an Isolated Microgrid With Battery Storage Considering Load and Renewable Generation Uncertainties. IEEE Trans. Ind. Electron. 2019, 66, 1565–1575. [Google Scholar] [CrossRef]
  7. Li, Y.; Yang, Z.; Zhao, D.; Lei, H.; Cui, B.; Li, S. Incorporating energy storage and user experience in isolated microgrid dispatch using a multi-objective model. IET Renew. Power Gener. 2019, 13. [Google Scholar] [CrossRef]
  8. 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]
  9. Andoni, M.; Robu, V.; Flynn, D.; Abram, S.; Geach, D.; Jenkins, D.; McCallum, P.; Peacock, A. Blockchain technology in the energy sector: A systematic review of challenges and opportunities. Renew. Sustain. Energy Rev. 2019, 100, 143–174. [Google Scholar] [CrossRef]
  10. Dong, Z.; Luo, F.; Liang, G. Blockchain: A secure, decentralized, trusted cyber infrastructure solution for future energy systems. J. Mod. Power Syst. Clean Energy 2018, 6, 958–967. [Google Scholar] [CrossRef]
  11. Aitzhan, N.Z.; Svetinovic, D. Security and privacy in decentralized energy trading through multi-signatures, blockchain and anonymous messaging streams. IEEE Trans. Dependable Secur. Comput. 2018, 15, 840–852. [Google Scholar] [CrossRef]
  12. Mengelkamp, E.; Notheisen, B.; Beer, C.; Dauer, D.; Weinhardt, C. A blockchain-based smart grid: Towards sustainable local energy markets. Comput. Sci. Res. Dev. 2018, 33, 207–214. [Google Scholar] [CrossRef]
  13. 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]
  14. Barwar, N.C.; Rajesh, B. Network Performance Analysis of Startup Buffering for Live Streaming in P2P VOD Systems for Mesh-Based Topology. In Proceedings of the International Congress on Information and Communication Technology; Satapathy, S.C., Bhatt, Y.C., Joshi, A., Mishra, D.K., Eds.; Springer: Singapore, 2016; pp. 271–279. [Google Scholar]
  15. Tran, M.H.; Ha, S.V.U.; Nguyen, V.S. Decentralized online social network using peer-to-peer technology. REV J. Electron. Commun. 2016, 5. [Google Scholar] [CrossRef]
  16. Suri, N.; Benincasa, G.; Tortonesi, M.; Stefanelli, C.; Kovach, J.; Winkler, R.; Kohler, U.S.R.; Hanna, J.; Pochet, L.; Watson, S. Peer-to-peer communications for tactical environments: Observations, requirements, and experiences. IEEE Commun. Mag. 2010, 48, 60–69. [Google Scholar] [CrossRef]
  17. Beitollahi, H.; Deconinck, G. Peer-to-peer networks applied to power grid. In Proceedings of the International Conference on Risks and Security of Internet and Systems (CRiSIS)’ in Conjunction with the IEEE GIIS’07, Marrakech, Morocco, 2–5 July 2007; p. 8. [Google Scholar]
  18. Wu, Y.; Tan, X.; Qian, L.; Tsang, D.H.; Song, W.Z.; Yu, L. Optimal Pricing and Energy Scheduling for Hybrid Energy Trading Market in Future Smart Grid. IEEE Trans. Ind. Inform. 2015, 11, 1585–1596. [Google Scholar] [CrossRef]
  19. Lüth, A.; Zepter, J.M.; del Granado, P.C.; Egging, R. Local electricity market designs for peer-to-peer trading: The role of battery flexibility. Appl. Energy 2018, 229, 1233–1243. [Google Scholar] [CrossRef] [Green Version]
  20. Zhang, C.; Wu, J.; Long, C.; Cheng, M. Review of Existing Peer-to-Peer Energy Trading Projects. Energy Procedia 2017, 105, 2563–2568. [Google Scholar] [CrossRef]
  21. Alam, M.R.; St-Hilaire, M.; Kunz, T. An optimal P2P energy trading model for smart homes in the smart grid. Energy Effic. 2017, 10, 1475–1493. [Google Scholar] [CrossRef]
  22. Coelho, V.N.; Cohen, M.W.; Coelho, I.M.; Liu, N.; Guimarães, F.G. Multi-agent systems applied for energy systems integration: State-of-the-art applications and trends in microgrids. Appl. Energy 2017, 187, 820–832. [Google Scholar] [CrossRef]
  23. Morstyn, T.; Teytelboym, A.; Mcculloch, M.D. Bilateral Contract Networks for Peer-to-Peer Energy Trading. IEEE Trans. Smart Grid 2019, 10, 2026–2035. [Google Scholar] [CrossRef]
  24. Sorin, E.; Bobo, L.; Pinson, P. Consensus-Based Approach to Peer-to-Peer Electricity Markets with Product Differentiation. IEEE Trans. Power Syst. 2019, 34, 994–1004. [Google Scholar] [CrossRef]
  25. Jogunola, O.; Ikpehai, A.; Anoh, K.; Adebisi, B.; Hammoudeh, M.; Gacanin, H.; Harris, G. Comparative Analysis of P2P Architectures for Energy Trading and Sharing. Energies 2017, 11, 62. [Google Scholar] [CrossRef]
  26. Stoica, I.; Morris, R.; Karger, D.; Kaashoek, M.F.; Balakrishnan, H. Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications. In Proceedings of the 2001 Conference on Applications, Technologies, Architectures, and Protocols for Computer Communications (SIGCOMM ’01), San Diego, CA, USA, 27–31 August 2001; pp. 149–160. [Google Scholar] [CrossRef]
  27. Maymounkov, P.; Mazieres, D. Kademlia: A peer-to-peer information system based on the xor metric. In Peer-to-Peer Systems; Springer: Berlin/Heidelberg, Germany, 2002; pp. 53–65. [Google Scholar]
  28. Navimipour, N.J.; Milani, F.S. A comprehensive study of the resource discovery techniques in peer-to-peer networks. Peer Netw. Appl. 2015, 8, 474–492. [Google Scholar] [CrossRef]
  29. Chawathe, Y.; Ratnasamy, S.; Breslau, L.; Lanham, N.; Shenker, S. Making gnutella-like p2p systems scalable. In Proceedings of the 2003 Conference on Applications, Technologies, Architectures, and Protocols for Computer Communications, Karlsruhe, Germany, 25–29 August 2003; pp. 407–418. [Google Scholar]
  30. Ripeanu, M. Peer-to-peer architecture case study: Gnutella network. In Proceedings of the First International Conference on Peer-to-Peer Computing, Linkoping, Sweden, 27–29 August 2001; pp. 99–100. [Google Scholar] [CrossRef]
  31. Sousa, T.; Soares, T.; Pinson, P.; Moret, F.; Baroche, T.; Sorin, E. Peer-to-peer and community-based markets: A comprehensive review. Renew. Sustain. Energy Rev. 2019, 104, 367–378. [Google Scholar] [CrossRef] [Green Version]
  32. Sabounchi, M.; Wei, J. Towards resilient networked microgrids: Blockchain-enabled peer-to-peer electricity trading mechanism. In Proceedings of the 2017 IEEE Conference on Energy Internet and Energy System Integration (EI2), Beijing, China, 26–28 November 2017; pp. 1–5. [Google Scholar] [CrossRef]
  33. Zyskind, G.; Nathan, O.; Pentland, A. Decentralizing Privacy: Using Blockchain to Protect Personal Data. In Proceedings of the 2015 IEEE Security and Privacy Workshops, San Jose, CA, USA, 21–22 May 2015; pp. 180–184. [Google Scholar] [CrossRef]
  34. Mihaylov, M.; Jurado, S.; Avellana, N.; Van Moffaert, K.; de Abril, I.M.; Nowé, A. NRGcoin: Virtual currency for trading of renewable energy in smart grids. In Proceedings of the 2014 11th International Conference on the European Energy Market (EEM), Krakow, Poland, 28–30 May 2014; pp. 1–6. [Google Scholar]
  35. 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. 2018, 14, 3690–3700. [Google Scholar] [CrossRef]
  36. Münsing, E.; Mather, J.; Moura, S. Blockchains for decentralized optimization of energy resources in microgrid networks. In Proceedings of the 2017 IEEE Conference on Control Technology and Applications (CCTA), Mauna Lani, HI, USA, 27–30 August 2017; pp. 2164–2171. [Google Scholar]
  37. Harsanyi, J.C.; Selten, R. A General Theory of Equilibrium Selection in Games; MIT Press: Cambridge, MA, USA, 1988; p. xviii+378. [Google Scholar]
Figure 1. Hierarchical bidding and trading system based on blockchain.
Figure 1. Hierarchical bidding and trading system based on blockchain.
Energies 12 01952 g001
Figure 2. Multi-agent coordination strategy in hierarchical bidding and transaction structure based on blockchain (HBTS).
Figure 2. Multi-agent coordination strategy in hierarchical bidding and transaction structure based on blockchain (HBTS).
Energies 12 01952 g002
Figure 3. Transaction Architecture of Fabric.
Figure 3. Transaction Architecture of Fabric.
Energies 12 01952 g003
Figure 4. Struture of Fabric shared ledger.
Figure 4. Struture of Fabric shared ledger.
Energies 12 01952 g004
Figure 5. Sequence diagram of HBTS.
Figure 5. Sequence diagram of HBTS.
Energies 12 01952 g005
Figure 6. Bidding strategy.
Figure 6. Bidding strategy.
Energies 12 01952 g006
Figure 7. Cost and profit.
Figure 7. Cost and profit.
Energies 12 01952 g007
Figure 8. Bidding strategy.
Figure 8. Bidding strategy.
Energies 12 01952 g008
Figure 9. Cost and profit.
Figure 9. Cost and profit.
Energies 12 01952 g009
Figure 10. Electricity Energy Coin (EEC) circulation.
Figure 10. Electricity Energy Coin (EEC) circulation.
Energies 12 01952 g010
Table 1. Review on Transaction Model between Microgrids.
Table 1. Review on Transaction Model between Microgrids.
ModelFully P2PSPoFFlexibilityData PrivacyBidding StrategyRef.
Centralizednoyesnovulnerablemaybe[20,21]
Structurednoyesnovulnerableno[26,27]
Unstructuredyesnomaybethreatenedno[29,30]
Blockchainyesnoyessafetyno[12,13,34,35,36]
HTBSyesnoyessafetyyesthis study
Table 2. Probability Distribution of Production Cost for the i t h Microgrid.
Table 2. Probability Distribution of Production Cost for the i t h Microgrid.
Cost C i 1 C i 2 C i t
probability p i 1 p i 2 p i t j = 1 t p i j = 1
Table 3. Posterior Probability of Microgrid j for Selecting Type n Cost Function of Microgrid i.
Table 3. Posterior Probability of Microgrid j for Selecting Type n Cost Function of Microgrid i.
Cost C j 1 C j 2 C j t
probability p i j n 1 p i j n 2 p i j n t l = 1 t p i j n l = 1
Table 4. Hypothetical Parameters of Microgrids.
Table 4. Hypothetical Parameters of Microgrids.
MicrogridTypeabcMax
Output/MW
Min
Output/MW
Accurate
Probability
Guessing
Probability
1H0.18230.04615000.400.35
M0.15826.04015000.400.50
L0.13422.03415000.200.15
2H0.24028.555100100.300.25
M0.21025.350100100.500.50
L0.18021.542100100.200.25
3H0.17033.927100500.250.30
M0.14029.523100500.350.30
L0.12025.020100500.400.40
Table 5. Conditional Probability of Microgrid 1.
Table 5. Conditional Probability of Microgrid 1.
C 1 n HML
C 2 m HMLHMLHML
p C 1 n | C 2 m 0.600.400.200.200.600.200.300.200.10
C 3 m HMLHMLHML
p C 1 n | C 3 m 0.600.400.250.500.300.400.100.300.20
Table 6. Posteriori Probability Obtained by Microgrid 1.
Table 6. Posteriori Probability Obtained by Microgrid 1.
C 1 n HML
C 2 m HMLHMLHML
C 12 nm 0.3750.500.1250.1250.750.1250.3750.500.125
C 3 m HMLHMLHML
C 13 nm 0.450.300.250.3750.2250.400.150.450.40
Table 7. Bidding Cost Parameters of Other Microgrids Estimated by Microgrid 1.
Table 7. Bidding Cost Parameters of Other Microgrids Estimated by Microgrid 1.
C 1 n HML
parameter a i ¯ b i ¯ c i ¯ a i ¯ b i ¯ c i ¯ a i ¯ b i ¯ c i ¯
microgrid 20.2226.0350.880.3125.2349.630.2226.0350.88
microgird 30.1530.3624.050.1429.3523.300.1428.3622.40
Table 8. Comparison of Bidding Strategies under Different Methods with a Load of 160 MW.
Table 8. Comparison of Bidding Strategies under Different Methods with a Load of 160 MW.
MethodsPrice ($•MW−1)Output (MW)Cost ($)Profit ($)
General method55.3069.53010.11833.24
Actual situation44.7840.61564.00254.07
This study48.0949.71986.56443.77

Share and Cite

MDPI and ACS Style

Yu, Y.; Guo, Y.; Min, W.; Zeng, F. Trusted Transactions in Micro-Grid Based on Blockchain. Energies 2019, 12, 1952. https://doi.org/10.3390/en12101952

AMA Style

Yu Y, Guo Y, Min W, Zeng F. Trusted Transactions in Micro-Grid Based on Blockchain. Energies. 2019; 12(10):1952. https://doi.org/10.3390/en12101952

Chicago/Turabian Style

Yu, Yunjun, Yanghui Guo, Weidong Min, and Fanpeng Zeng. 2019. "Trusted Transactions in Micro-Grid Based on Blockchain" Energies 12, no. 10: 1952. https://doi.org/10.3390/en12101952

APA Style

Yu, Y., Guo, Y., Min, W., & Zeng, F. (2019). Trusted Transactions in Micro-Grid Based on Blockchain. Energies, 12(10), 1952. https://doi.org/10.3390/en12101952

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