You are currently viewing a new version of our website. To view the old version click .
Energies
  • Article
  • Open Access

21 November 2023

Research on Real-Time Trading Mechanism of Photovoltaic Microgrid Based on the Consortium Blockchain

,
,
and
School of Electronic and Information Engineering, Suzhou University of Science and Technology, Suzhou 215009, China
*
Author to whom correspondence should be addressed.
This article belongs to the Section F1: Electrical Power System

Abstract

With the popularity of solar Photovoltaic (PV) power generation, the real-time interaction between distributed microgrids and large grids has become a new hotspot of concern. In distributed PV power trading, we aim to achieve a dynamic balance between PV users and the grid. This involves real-time power prediction for users, secure blockchain-based recording and protection of trading data, and efficient matching of microgrid and large-grid trading information, including pricing details. System simulations and experimental data analysis have demonstrated the benefits of this transaction model, including enhanced real-time interaction between microgrid and grid. For the buyer, the cost of purchasing electricity can be reduced by about 6%, and for the seller, the income from selling electricity is 1.5 times that of direct Internet access, which has positive significance in improving the income from selling electricity and reducing the cost of electricity for users.

1. Introduction

Photovoltaic (PV) power generation, a crucial component of renewable energy, has gained widespread popularity among a majority of electricity consumers in recent years.
In the first half of 2022, China installed 30.88 million kilowatts of new PV power generation, accounting for 63.65% of the total new PV installations [1]. At present, distributed PV power generation mainly adopts the strategy of “self-use, surplus electricity online”, and customers cannot trade electricity directly with each other [2]. As a result, the traditional transaction model encounters the challenge of energy not being utilized in proximity, leading to duplicated energy scheduling and the inefficient use of resources. During microgrid transactions, issues related to equity among users and the protection of data security arise. The integration of blockchain technology into microgrid power transactions offers a novel transaction model for distributed PV microgrids. Blockchain technology possesses the traits of decentralization and tamper resistance, which can lead to cost reduction in the microgrid market, ensuring fairness, transparency, security, real-time capabilities, and programmability in microgrid transactions. This enhances the transparency of the microgrid market’s transaction process [3,4]. It enables dynamic adjustments within PV microgrids [5] and, ultimately, optimizes their power dispatch [6], thereby fostering the sustainable growth and widespread adoption of PV microgrids. With the increasing utilization of distributed PV equipment within microgrids, researchers from around the world have undertaken studies to develop optimization methods for the distribution of distributed energy in microgrid systems. Pei [7] analyzes the current status of the architecture and scenario applications of combining blockchain technology and electricity trading. In terms of information protection and data security of transaction users, the microgrid electric energy transaction method based on blockchain technology proposed in Qin [8] ensures the privacy and security of transactions. Zhang [9] proposes a privacy protection scheme for direct electricity transaction of microgrid based on Consortium blockchain and bilateral auction, which makes the transaction more secure. However, there is a deviation between the electricity consumption scheme and the actual volume of electricity consumption. Xue [10] proposed a user PV multilateral trading platform based on blockchain and combined with the reward mechanism to make the transaction more fair and secure. For the local consumption of distributed PV power generation, Jin [11] promotes the consumption of surplus PV power by time-shiftable load through the design of smart contracts and credit value mechanisms. Chen [12] proposes a control strategy to maximize the local absorption of PV in parks, which can effectively improve the degree of local absorption of distributed PV in parks. On the basis of considering microgrid users, distributed aggregators, grid market income, and other factors. Xu [13] established a microgrid group information interaction model based on blockchain and solved the model with an improved ant colony algorithm. Siqin [14] proposes a distributed energy optimization scheduling model based on cooperative game to ensure the normal operation of multi-community microgrid cooperative consortium.
To sum up, this paper studies how to realize effective nearby consumption of electric energy in distributed PV microgrid. At the same time, in order to realize decentralized transactions and ensure the security of user transaction information and data, this paper builds a PV microgrid transaction model based on consortium chain. The proposed transaction model can improve the flexibility and efficiency of the microgrid transaction process and ensure the security of the transaction, so as to optimize the energy scheduling strategy among microgrid users, avoid the waste of PV energy to the greatest extent, and ensure the reasonable distribution of multi-party interests.

3. Real-Time Trading Model of PV Microgrid Based on Consortium Blockchain

In distributed PV power trading, there is a dynamic balance between buyers and sellers. The use of blockchain technology can achieve the establishment of a decentralized system for buyers and sellers, making electricity market transactions more flexible and efficient. Realize the matching of electricity sellers and consumers according to the current electricity consumption plan and the price of electricity sold in the trading market. The following is a modeling analysis of the microgrid user state model, local consumption real-time interaction benefit model, and constraint conditions established in the transaction model.

3.1. Microgrid User State Model

The load characteristics of different users are naturally different. Using the characteristics of distributed data storage of blockchain technology, the historical electricity consumption and power generation data of different users can be analyzed to reasonably predict the production load, PV power generation power and other information of users in the next phase before trading.
(1)
With  N  PV users, each with a different power generation. Using one hour as a trading session, The power generated by the  i  customer in time interval,  P i ( t ) , is expressed as:
P i t = P 1 1 , P 2 2 , , P N p v t
In the formula:  N P V  presents the user number in the microgrid  i = { 1,2 , , N P V } t = { 1,2 , , 24 } .
(2)
For load systems, the power consumed by each user varies, and the load characteristics vary greatly. The electricity load  P L , i t  for the  i  customer can be expressed as:
P L , i t = P L , i 1 , P L , i 2 , , P L , i t
In the formula:  i = { 1,2 , , N }
(3)
For user  i , the net output power  P n e t , i t  in a given time  t  is expressed as:
P n e t , i t = P i t P L , i t
In the formula:  t = { 1,2 , , 24 }
(4)
In a given trading session  t , the total purchased power  P T P P t , and the total sold power  P T S P t  for all customers are shown below.
P T P P t = k = 1 N B P n e t , k t P n e t , k t < 0
P T S P t = j = 1 N S P n e t , j t P n e t , j t 0
In the formula: when  P n e t , k t < 0 , user transaction for power purchase status, marked as power purchase user; when  P n e t , j t 0 N B  denotes the number in the set of purchased power user groups, and  N S  denotes the number in the set of electricity sales customer groups.

3.2. Real-Time Interaction Benefit Model for Local Consumption

Considering the imbalance between user load and PV output, the purchasing and selling strategy needs to be adjusted accordingly.
(1)
When  P T S P t > P T P P t , the total power sold is greater than the total power purchased, when there is an oversupply and a buyer’s market. The PV output of the user is preferentially consumed by its own power, and the remaining power is traded through internal pricing and other users or sold to the large power grid. When setting the internal tariff, the customers will adjust their electricity consumption behavior in order to obtain higher returns. In order to measure the balance between power consumption and power sales of both parties, the user transaction benefit model is introduced, which can be expressed as:
W i = k i ln 1 + P L , i t + P s P i t P L , i t
In the formula:  W i  indicates the overall benefit of user  i i N S k i  indicates the efficiency parameter of the  i  electricity sales customer, which is adjusted at different times according to the changes in customer load and electricity consumption strategy;  P s  denoted as internal tariff of microgrid,  P s  should be higher than the purchased electricity price  P g s  of the large grid and cannot be lower than the sold electricity price  P g b , otherwise users will choose to trade directly with the big grid. That is, the microgrid internal electricity price  P s  satisfies the following relationship.
p g s < p 1 P s p h < p g b
In the formula:  p 1  indicates the minimum tariff within the microgrid;  p h  indicates the maximum price of electricity within the microgrid.
(2)
When  P T S P t = P T P P t , the total power sold is equal to the total power purchased, and the microgrid users trade directly with each other without the need to trade with the grid, the internal transaction price is shown as follows:
P s = P g s + P g b 2
(3)
When  P T S P t < P T P P t , the total power sold is less than the total power purchased. At this time the power market is in a state of oversupply, a seller’s market. Customers with insufficient PV capacity need to purchase electricity directly from the grid at price  P g b . For buyers, the purchase cost is expected to be the lowest, and the purchase cost of the buyer comes from the power purchase of the microgrid and the grid. Therefore, the buyer’s purchase cost is expressed as follows:
C k t = x k t P s + P L , i t P i t x k t p g b
In the formula:  k N B C k t  is denoted as the cost of electricity purchased by the  k  customer at time  t .
To sum up, buyers and sellers in the microgrid constitute a multi-player game model, as follows:
G = N B N s , E i i N s , W i i N s , P , C
In the formula:  E i  indicates the set of electricity consumption strategies for electricity sales customer  i W i  indicates the benefits of electricity consumption by electricity sales customers;  P  denotes the set of microgrid internal tariff strategies.  C  denotes the total cost of electricity purchased by the group of electricity purchasers, expressed as:
C = k N B C K = P i N S [ p i ( t ) p L , i ( t ) ] + P g s [ k N B ( p L , k ( t ) p k ( t ) ) i N S ( p i ( t ) p L , i ( t ) ) ]
The requirement is satisfied when  C  is the lowest, at this time, the cost of purchasing electricity for each customer is also at its lowest.

3.3. Constraint Condition

In order to achieve the lowest possible cost of electricity purchase expected by the electricity purchaser, the electricity seller expects the highest revenue from the sale of electricity. The equilibrium of the game model G is the optimal solution to the problem, resulting in the optimal price. Electricity sellers adjust their electricity consumption strategy according to the price.
When  0 P T S P t < P T P P t , the electricity needs to be purchased from the large grid, and it is a seller’s market at this time. Considering the highest efficiency of electricity sales and in order to ensure the long-term stable operation of the grid, the fairness of microgrid transactions should be maintained as much as possible, and the total electricity sales should be allocated according to the total demand of electricity purchases. For electricity sales customer  k , the share of electricity sales is:
x k = P T P P P i P L , i P T S P
When  P T S P t > P T P P t , the PV user strategy  P * , P s *  within the blockchain is the game equilibrium point, and the constraints of inequalities (14) and (15) need to be satisfied.
W i P * , P s * W i P L , i , P L , i * , P s * i N s , P L , i E i  
C P * , P s * C P * , P s P s P
In the formula:  P * = [ P L , 1 , P L , 2 , , P L , N s ] P i * = [ P L , 1 , P L , 2 , , P L , i 1 , P L , i + 1 , , P L , N s ] .

3.4. Trading Process

(1)
The user predicts the PV output power and user power load for the next phase based on the previous power generation data situation. Presenting supply and demand plans and giving relevant quotations, and matching transactions at eligible users;
(2)
Determining the transaction price and volume through the transaction model based on the successfully matched users;
(3)
According to the net output power of the user, it is divided into buyer’s market and seller’s market. For power sales users, excess power is sold to the purchasing user after there is surplus PV, sold to the grid. For power purchasers, if there is a shortage of power users, priority is given to internal tariff purchases from power purchasers, followed by power purchases from the grid;
(4)
Finally, transaction contracts are established via the blockchain, The trading mechanism of trading power and trading tariff is recorded into the system at the moment of real-time trading, which is accessible and cannot be tampered with. The specific transaction process is shown in Figure 4.
Figure 4. Transaction process.

4. Example Analysis

4.1. Scenario Simulation

The distributed PV selected for this paper consists of four users, each with a PV system and a smart meter. PV systems and smart meters have the same parameters and different customer installed capacities. Smart meters are used to record the amount of electricity sold and purchased by customers. The initial load and PV power real-time status of each user in a township microgrid in Shanxi are shown in Figure 5 and Figure 6. Considering the fluctuation of PV power and customer load, 1 hour is chosen as a time period for calculation. The 1 h interval is used in microgrid transactions because it is suitable for capturing electricity market price fluctuations, renewable generation forecasts, operational efficiency, and matches the electricity market settlement cycle. This time interval allows the microgrid to better cope with price and energy fluctuations in real-time transactions. The price for local PV users is 0.77 RMB and the grid price is 0.85 RMB.
Figure 5. PV output power.
Figure 6. Customer electricity load.
As shown in Figure 7, the PV output power of MG1 and MG2 is much greater than the customer load and the net PV power is greater than 0. Therefore, MG1 and MG2 are sellers. The PV output power of MG3 and MG4 is less than the load and the net PV is less than 0. Therefore, MG3 and MG4 are the purchasers. All sellers are classified as seller user groups and all buyers are classified as buyer user groups. The traded power varies in each time period, and the total power purchased by the buyer customer group, and the total power sold by the seller customer group are shown in Table 1.
Figure 7. Net PV power.
Table 1. Electricity sold and total electricity purchased.
From Table 1, it can be seen periods 5 and 17 represent trading periods when  P T S P t = P T P P t , indicating when customers need to purchase electricity directly from the grid at price  P g b ; time periods 6, 7, 8, and 16 are trading periods where  P T S P t < P T P P t , when the PV power sold by the seller is less than the power purchased by the buyer, the buyer first purchases part of the power from the seller at the internal tariff, and the remaining load needs to purchase power directly from the grid at price  P g b ; and the  P T S P t > P T P P t  trading session is from Session 9 to 15. At this time, the PV power surplus, the buyer user to the internal lowest price  p 1  from the power sales user to buy power, the purchase of power users can not consume the remaining PV power at the price  p g s  sold to the grid.

4.2. Analysis of Data

The optimal internal tariff and the electricity traded by customers for each time period for residents in the region are shown in Table 2. The analysis is divided into three cases according to the different transactions of total electricity consumption and total electricity sales in different time periods. The table below shows that during periods of electricity demand, the price of electricity increases accordingly. In order to generate more revenue, sellers adjust their electrical loads accordingly.
Table 2. P T S P t < P T P P t  Hourly tariffs and trading volumes.
In the trading period  P T S P t < P T P P t , when the electricity seller sells PV power to the electricity purchaser. Since the total amount of electricity sold by customers is less than the total amount of electricity purchased, the supply exceeds the demand, so customers who purchase electricity also need to purchase the missing electricity from the grid.
From Table 3, it can be seen that the internal electricity price is greater than 0.77 CNY/(kw·h) in the trading period of  P T S P t > P T P P t  for both the electricity selling and purchasing customers. At this point, the total power sold is greater than the total power purchased, and the power purchasers in the microgrid purchase power from the power sellers at the internal tariff. The excess PV power needs to be sold to the grid at a “residual feed-in” tariff. Since the internal tariff of microgrid is between the “surplus feed-in” price and the grid sales price, the cost of purchasing electricity is reduced and the benefit of selling electricity is increased.
Table 3. P T S P t > P T P P t  Hourly tariffs and trading volumes.

4.3. Comparison and Analysis of Results

The cost of power purchase and benefits of power sales before and after optimization of the proposed trading model and the direct grid trading model are shown below.
From the comparison before and after optimization in Figure 8, the results for the cost of purchased electricity show that the cost of power purchase in the proposed trading model is lower than the cost of direct grid power purchase. The results in Figure 9 show that the benefits of electricity sales obtained through the “direct feed-in” approach are much smaller than those obtained by the model proposed in this paper. The results of comparing our model with microgrid transactions without blockchain are presented in Table 4.
Figure 8. Comparison of power purchase costs.
Figure 9. Comparison of electricity sales benefits.
Table 4. Comparison of Microgrid Transactions with and without Blockchain.
In summary, the simulation results of the model show that the microgrid power trading model based on the federated chain technology saves the profits of intermediaries, thus reducing the cost of power purchase for power purchase customers and increasing the benefits for power sales customers. It can effectively solve the problem of local consumption of distributed power in microgrids, thus also reducing the impact of direct feed-in on the grid.

5. Conclusions

In this study, the real-time trading model of the microgrid market under the consortium blockchain is constructed and the transaction scenario is simulated. The results are analyzed as follows.
(1)
The proposed PV microgrid trading model based on consortium blockchain is more efficient and secure than the grid trading under direct “surplus electricity online” and reduces the cost of electricity purchase for consumers and increases the benefit of electricity sales. For the buyer, the cost of purchasing electricity can be reduced by about 6%, and for the seller, the income from selling electricity is 1.5 times that of directly accessing the Internet. Therefore, in order to attain higher profit, sellers will adjust their power load;
(2)
The problem of local consumption of distributed generation can be solved in the power trading of microgrid market. After adopting the trading model, the local or nearby consumption of PV power has been improved, and the benefit of users has been enhanced. Preference for electricity purchases from electricity sellers in the microgrid. When the output power is insufficient, then the power shortage is purchased from the grid, while the impact of the microgrid on the grid can be reduced.

Author Contributions

Methodology, L.W. and W.J.; Data curation, L.W.; Writing—original draft, L.W.; Writing—review & editing, B.F. and B.J. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by National Natural Science Foundation (NNSF), grant number 61672371, 61803279, 61876217, 62203316.

Data Availability Statement

No new data were created or analyzed in this study. Data sharing is not applicable to this article.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. China’s grid-connected installed capacity of PV power generation has exceeded 300 million kilowatts, ranking first in the world for seven consecutive years. China Environ. Superv. 2022, 6. Available online: https://kns.cnki.net/kcms2/article/abstract?v=j6HAoO1nZAxdkHtNyiCGte-bN4bUjih2Tcd0Xx6XGS5joS5-pXszEakP0gdWkfFTPh03XDBc6nJot3Ac3dHo3qVm-ycJ1TH-Digobym-PL4lo1cZag6HWpwr3avMqXymRCSeoNvHyF1Bi8L_3I2WWQ==&uniplatform=NZKPT&language=CHS (accessed on 14 November 2023).
  2. Lu, J.; Wang, Z.; Yang, Q.; Wang, J.; Lv, H.T.; Song, T.T. Research on game model of PV micro-grid trans action based on block chain. Electr. Meas. Instrum. 2020, 57, 80–86. [Google Scholar]
  3. Lucas, A.; Geneiatakis, D.; Soupionis, Y.; Nai-Fovino, I.; Kotsakis, E. Blockchain Technology Applied to Energy Demand Response Service Tracking and Data Sharing. Energies 2021, 14, 1881. [Google Scholar] [CrossRef]
  4. Zia, M.F.; Elbouchikhi, E.; Benbouzid, M. Microgrids energy management systems: A critical review on methods, solutions, and prospects. Appl. Energy 2018, 222, 1033–1055. [Google Scholar] [CrossRef]
  5. He, Q.; Wu, M.; Sun, P.; Guo, J.; Chen, L.; Jiang, L.; Zhang, Z. Research on a Charging Mechanism of Electric Vehicles for PV Nearby Consumption Strategy. Electronics 2022, 11, 3407. [Google Scholar] [CrossRef]
  6. Hua, W.; Jiang, J.; Sun, H.; Teng, F.; Strbac, G. Consumer-centric decarbonization framework using Stackelberg game and Blockchain. Appl. Energy 2022, 309, 118384. [Google Scholar] [CrossRef]
  7. Pei, F.; Cui, J.; Dong, C.; Wang, H.; Jiang, H.; He, C. The Research Field and Current State-of-art of Blockchain in Distributed Power Trading. Proc. CSEE 2021, 41, 1752–1771. [Google Scholar]
  8. Jinlei, Q.I.N.; Wenqiang, S.U.N.; Youchan, Z.H.U. Energy transaction method of microgrid based on blockchain. Electr. Power Autom. Equip. 2020, 40, 130–138. [Google Scholar]
  9. Zhang, S.; Pu, M.; Wang, B.; Dong, B. A Privacy Protection Scheme of Microgrid Direct Electricity Transaction Based on Consortium Blockchain and Continuous Double Auction. IEEE Access 2019, 7, 151746–151753. [Google Scholar] [CrossRef]
  10. Xue, W.Q.; Li, P.Q.; Wang, J.F.; Mu, L.; Gao, Y.; Meng, L. Design and Implementation of Household-use PV Multi-lateral Trading Platform Based on Blockchain. Proc. CSU-EPSA 2021, 33, 142–150. [Google Scholar]
  11. Jin, K.; Yang, J.; Chen, Z. Blockchain-based Transaction Model of Distributed PV Generation for Local Power Consumption. Electr. Power 2021, 54, 8–16. [Google Scholar]
  12. Chen, Z.; Yang, J.H.; Jin, K.Y.; Hou, B.; Wang, W.Z. Control strategy of time-shift facility agriculture load and PV local consumption based on energy blockchain. Electr. Power Autom. Equip. 2021, 41, 47–55. [Google Scholar]
  13. Xu, Z.; Wang, Y.; Dong, R.; Li, W. Research on multi-microgrid power transaction process based on blockchain Technology. Electr. Power Syst. Res. 2022, 213, 108649. [Google Scholar] [CrossRef]
  14. Siqin, Z.; Niu, D.; Li, M.; Gao, T.; Lu, Y.; Xu, X. Distributionally robust dis patching of multi-community integrated energy system considering energy sharing and profit allocation. Appl. Energy 2022, 321, 119202. [Google Scholar] [CrossRef]
  15. Dai, C.C.; Luan, H.J.; Yang, X.Y.; Guo, X.B.; Lu, Z.H.; Niu, B.F. Overview of Blockchain Technology. Comput. Sci. 2021, 48, 500–508. [Google Scholar]
  16. Yin, H.; Zhang, Z.; He, J.; Ma, L.; Zhu, L.; Li, M.; Khoussainov, B. Proof of Continuous Work for Reliable Data Storage Over Permissionless Blockchain. IEEE Internet Things J. 2022, 9, 7866–7875. [Google Scholar] [CrossRef]
  17. He, Y.; Xiong, W.; Yang, B.Y.; Zhang, R.; Cui, M.L.; Feng, T.T.; Sun, Y.E. Distributed Energy Transaction Model Based on the Alliance Blockchain in Case of China. J. Web Eng. 2021, 20, 359–385. [Google Scholar] [CrossRef]
  18. Panda, S.S.; Jena, D.; Mohanta, B.K.; Ramasubbareddy, S.; Daneshmand, M.; Gandomi, A.H. Authentication and Key Management in Distributed IoT Using Blockchain Technology. IEEE Internet Things J. 2021, 8, 12947–12954. [Google Scholar] [CrossRef]
  19. Wang, J.; Wang, S.; Zhang, Q.; Deng, Y. A two-layer consortium blockchain with transaction privacy protection based on sharding technology. J. Inf. Secur. Appl. 2023, 74, 103452. [Google Scholar] [CrossRef]
  20. Zhou, L.; Zhang, S.; Hou, F.; Zhang, L. Construction of carbon trading pattern based on blockchain. Sci. Soil Water Conserv. 2020, 18, 139–145. [Google Scholar]
  21. Yan, Z.; Li, J. Research on carbon emissions trading and monitoring mechanism based on blockchain technology. Enterp. Econ. 2020, 39, 31–37. [Google Scholar]
  22. He, Q.; Ai, Q. The application prospects of blockchain technology in virtual power plants. Electr. Appl. Energy Effic. Manag. Technol. 2017, 14–18. [Google Scholar] [CrossRef]
  23. Zeng, M.; Cheng, J.; Wang, Y.; Li, Y.; Yang, Y.; Dou, J. Primarily research for multi module cooperative autonomous mode of energy internet under blockchain framework. Electr. Eng. 2017, 37, 3672–3681. [Google Scholar]
  24. Yang, Q.; Wang, H.; Wang, T.; Zhang, S.; Wu, X.; Wang, H. Blockchain-based decentralized energy management platform for residential distributed energy resources in a virtual power plant. Appl. Energy 2021, 294, 117026. [Google Scholar] [CrossRef]
  25. Xu, Z.; Yang, D.; Li, W. Microgrid group trading model and solving algorithm based on blockchain. Energies 2019, 12, 1292. [Google Scholar] [CrossRef]
  26. Zhao, S.; Zhu, S.; Wu, Z.; Jaing, B. Cooperative energy dispatch of smart building cluster based on smart contracts. Int. J. Electr. Power Energy Syst. 2022, 138, 107896. [Google Scholar] [CrossRef]
  27. van Leeuwen, G.; AlSkaif, T.; Gibescu, M.; van Sark, W. An integrated blockchain-based energy management platform with bilateral trading for microgrid communities. Appl. Energy 2020, 263, 114613. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.