A Privacy-Preserving, Two-Party, Secure Computation Mechanism for Consensus-Based Peer-to-Peer Energy Trading in the Smart Grid
Abstract
:1. Introduction
- We propose a novel P2P negotiation mechanism that incorporates the power transfer distribution factor (PTDF) model into the consensus + innovation (C + I) method, which can simultaneously maximize social welfare and comply with physical line constraints. By introducing line prices into the update process, agents are encouraged not to transfer power over congested lines.
- Although the C + I method exchanges a minimum amount of information, there is still a risk of revealing private information. We analyze how individual private information (e.g., coefficients of generation, utility functions, and power limits) can be stolen and computed through a collusion attack by a group of collusive neighboring agents in the context of the P2P negotiation mechanism based on the C + I method.
- The security objective and novelty of this paper are to protect the information exchanged between each pair of agents in the energy-trading negotiation process. We propose a novel, secure, two-party computation mechanism for the energy price update between each pair of agents based on the SC and Paillier encryption algorithm, which is known as an efficient additive HE method. Moreover, we propose a ZKP protocol to prove that the decrypted plaintext matches the ciphertext computed by SC.
2. Problem Formulation
2.1. Peer-to-Peer Trading
2.2. Line Flow Constraints of Power Network
2.3. Social Welfare Maximization Problem
3. Blockchain-Based P2P Negotiation Mechanism for Energy Trading
3.1. C + I-Based Decentralized Negotiation Mechanism
3.1.1. Local Optimization Problem
3.1.2. Primal Variable Updates
3.1.3. Dual Variable Updates
3.1.4. Condition of Convergence
3.2. Implementation of P2P Energy Trading by Smart Contracts
- In the first step, all agents initiate a pair of energy prices and quantities in parallel and send it to neighboring agents. Then, each agent updates its quantities and prices for its neighbors using (15) and (17), respectively. The update process is automatically performed by SC, which is installed on each agent.
- After updating each agent, all agents send their traded energy to LM, which calculates the power flows and line prices on each line using (6) and (18), also from SC.
- Then, LM sends the line flow prices to the corresponding agents using the particular line for power transmission. By applying these line usage price signals, the agents will try to trade energy with nearby ones, which can reduce power losses.
- After each iteration, each agent and LM send the updated results to MO, who will check if the stopping criteria are met (19).
- Finally, after the market converges, MO collects all transactions and stores them in the blockchain.
4. Privacy-Friendly P2P Computation Framework
4.1. Collusion Attack
- 1.
- If agent n is a producer, all neighboring agents (consumers) can intentionally increase the purchase price little by little until remains unchanged between two iterations. In this case, the output of agent n has reached the upper bound . After that, all neighboring agents can communicate with each other to sum all and obtain the private information . Similarly, a group of malicious neighboring agents can cooperatively lower the purchase price to obtain the lower bound .
- 2.
4.2. Homomorphic Encryption/Decryption Mechanism
4.3. Two-Party, Secure Computation
- Agent n generates an individual public key and a secret key . The public key is sent to agent m for encryption.
- Agent n performs an aggregation operation , and an encryption is sent to SC on Agent n.
- Agent m also first performs an aggregation operation and an encryption using agent n’s public key and sends it to SC.
- After collecting the information from two agents, SC computes . From (17), we have . Thus, according to the additive homomorphic encryption property, the result is , which will be sent to agent n and m.
- Agent n executes to obtain the decryption and sends it to Agent m.
- Agent n generates and sends a ZKP to Agent m to prove that the plaintext is correct with the ciphertext computed by SC. Details of the construction of the ZKP are provided in Appendix A.
4.4. Security and Privacy Analysis
5. Results
5.1. Simulation Setup
5.2. Convergence Performance of the Negotiation Mechanism
5.3. Performance of Line Congestion Management
5.4. Performance of Scalability
5.5. Encryption Algorithm Computation Performance Analysis
5.6. Computational Performance under Different Mechanisms
5.7. Blockchain-Based P2P Energy-Trading Platform
6. Discussion
7. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Nomenclature
Production cost or utility function of agent n | |
Indices for buses | |
Indices for agents | |
l | Index for power lines |
Boundaries of power | |
Coefficients of the quadratic function of agent n | |
Set of lines | |
Set of buses | |
Set of agents | |
Set of energy producers | |
Set of energy consumers | |
Set of neighboring agents | |
Energy prices provided by n to m | |
Power injection or total traded quantity of agent n | |
Traded energy quantity from n to m | |
Power flow of line l | |
Power transfer distribution factor of line l connecting bus i and j | |
Injection shift factor in line l for bus i | |
A | Branch to node incidence matrix |
Diagonal branch susceptance matrix | |
C | Reduced nodal susceptance matrix |
Maximum capacity of line l | |
Upper bound and lower bound prices of l | |
Dual variables for power boundaries | |
Asymptotically proportional factor | |
Sequences of positive factors at iteration k | |
Tuning parameter | |
Stopping criterion | |
Aggregation Information | |
Public key and secret key of agent n |
Appendix A
Algorithm A1: Protocol for proving is an encryption of zero | |
Input: , | |
1 | Prover P calculate: and such that |
2 | P chooses v at random in and sends to Verifier V |
3 | V chooses e, a random t bit number, and sends e to P. |
4 | P sends to V. |
5 | V checks that , a, z are prime to N and , and accepts if and |
only if this is the case. |
References
- Hussain, S.; Kim, Y.C. Fault resilient communication network architecture for monitoring and control of wind power farms. In Proceedings of the 2016 18th International Conference on Advanced Communication Technology (ICACT), PyeongChang, Republic of Korea, 31 January–3 February 2016; pp. 685–692. [Google Scholar]
- Hussain, S.; Thakur, S.; Shukla, S.; Breslin, J.G.; Jan, Q.; Khan, F.; Kim, Y.S. A two-layer decentralized charging approach for residential electric vehicles based on fuzzy data fusion. J. King Saud Univ. Comput. Inf. Sci. 2022, 34, 7391–7405. [Google Scholar] [CrossRef]
- Hussain, S.; Mohammad, F.; Kim, Y.C. Communication network architecture based on logical nodes for electric vehicles. In Proceedings of the 2017 International Symposium on Information Technology Convergence, Shijiazhuang, China, 18–20 October 2017; pp. 19–21. [Google Scholar]
- Hussain, S.; Kim, Y.S.; Thakur, S.; Breslin, J.G. Optimization of waiting time for electric vehicles using a fuzzy inference system. IEEE Trans. Intell. Transp. Syst. 2022, 23, 15396–15407. [Google Scholar] [CrossRef]
- Cao, Y.; Kaiwartya, O.; Zhuang, Y.; Ahmad, N.; Sun, Y.; Lloret, J. A decentralized deadline-driven electric vehicle charging recommendation. IEEE Syst. J. 2018, 13, 3410–3421. [Google Scholar] [CrossRef] [Green Version]
- Hassan, A.N.; Abdullah, A.H.; Kaiwartya, O.; Cao, Y.; Sheet, D.K. Multi-metric geographic routing for vehicular ad hoc networks. Wirel. Netw. 2018, 24, 2763–2779. [Google Scholar] [CrossRef]
- Schollmeier, R. A definition of peer-to-peer networking for the classification of peer-to-peer architectures and applications. In Proceedings of the First International Conference on Peer-to-Peer Computing, Linkoping, Sweden, 27–29 August 2001; pp. 101–102. [Google Scholar]
- Tushar, W.; Saha, T.K.; Yuen, C.; Morstyn, T.; McCulloch, M.D.; Poor, H.V.; Wood, K.L. A motivational game-theoretic approach for peer-to-peer energy trading in the smart grid. Appl. Energy 2019, 243, 10–20. [Google Scholar] [CrossRef]
- Tushar, W.; Chai, B.; Yuen, C.; Smith, D.B.; Wood, K.L.; Yang, Z.; Poor, H.V. Three-party energy management with distributed energy resources in smart grid. IEEE Trans. Ind. Electron. 2014, 62, 2487–2498. [Google Scholar] [CrossRef] [Green Version]
- Kursawe, K.; Danezis, G.; Kohlweiss, M. Privacy-friendly aggregation for the smart-grid. In International Symposium on Privacy Enhancing Technologies Symposium; Springer: Berlin/Heidelberg, Germany, 2011; pp. 175–191. [Google Scholar]
- Ács, G.; Castelluccia, C. I have a dream! (differentially private smart metering). In International Workshop on Information Hiding; Springer: Berlin/Heidelberg, Germany, 2011; pp. 118–132. [Google Scholar]
- Hong, Y.; Liu, W.M.; Wang, L. Privacy preserving smart meter streaming against information leakage of appliance status. IEEE Trans. Inf. Forensics Secur. 2017, 12, 2227–2241. [Google Scholar] [CrossRef]
- Shukla, S.; Thakur, S.; Hussain, S.; Breslin, J.G. A Blockchain-Enabled Fog Computing Model for Peer-To-Peer Energy Trading in Smart Grid. In International Congress on Blockchain and Applications; Springer: Berlin/Heidelberg, Germany, 2021; pp. 14–23. [Google Scholar]
- Dang, C.; Zhang, J.; Kwong, C.P.; Li, L. Demand side load management for big industrial energy users under blockchain-based peer-to-peer electricity market. IEEE Trans. Smart Grid 2019, 10, 6426–6435. [Google Scholar] [CrossRef]
- Luo, F.; Dong, Z.Y.; Liang, G.; Murata, J.; Xu, Z. A distributed electricity trading system in active distribution networks based on multi-agent coalition and blockchain. IEEE Trans. Power Syst. 2018, 34, 4097–4108. [Google Scholar] [CrossRef]
- Kang, J.; Yu, R.; Huang, X.; Maharjan, S.; Zhang, Y.; Hossain, E. Enabling localized peer-to-peer electricity trading among plug-in hybrid electric vehicles using consortium blockchains. IEEE Trans. Ind. Inform. 2017, 13, 3154–3164. [Google Scholar] [CrossRef]
- Yang, X.; Wang, G.; He, H.; Lu, J.; Zhang, Y. Automated demand response framework in ELNs: Decentralized scheduling and smart contract. IEEE Trans. Syst. Man Cybern. Syst. 2019, 50, 58–72. [Google Scholar] [CrossRef]
- Wang, S.; Taha, A.F.; Wang, J.; Kvaternik, K.; Hahn, A. Energy crowdsourcing and peer-to-peer energy trading in blockchain-enabled smart grids. IEEE Trans. Syst. Man Cybern. Syst. 2019, 49, 1612–1623. [Google Scholar] [CrossRef] [Green Version]
- 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]
- AlSkaif, T.; Crespo-Vazquez, J.L.; Sekuloski, M.; van Leeuwen, G.; Catalão, J.P. Blockchain-based fully peer-to-peer energy trading strategies for residential energy systems. IEEE Trans. Ind. Inform. 2021, 18, 231–241. [Google Scholar] [CrossRef]
- Zhang, M.; Eliassen, F.; Taherkordi, A.; Jacobsen, H.A.; Chung, H.M.; Zhang, Y. Demand–Response Games for Peer-to-Peer Energy Trading With the Hyperledger Blockchain. IEEE Trans. Syst. Man Cybern. Syst. 2021, 52, 19–31. [Google Scholar] [CrossRef]
- AlAshery, M.K.; Yi, Z.; Shi, D.; Lu, X.; Xu, C.; Wang, Z.; Qiao, W. A blockchain-enabled multi-settlement quasi-ideal peer-to-peer trading framework. IEEE Trans. Smart Grid 2020, 12, 885–896. [Google Scholar] [CrossRef]
- 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]
- Acar, A.; Aksu, H.; Uluagac, A.S.; Conti, M. A survey on homomorphic encryption schemes: Theory and implementation. ACM Comput. Surv. (CSUR) 2018, 51, 1–35. [Google Scholar] [CrossRef]
- Cheng, Z.; Ye, F.; Cao, X.; Chow, M.Y. A homomorphic encryption-based private collaborative distributed energy management system. IEEE Trans. Smart Grid 2021, 12, 5233–5243. [Google Scholar] [CrossRef]
- Yi, H.; Lin, W.; Huang, X.; Cai, X.; Chi, R.; Nie, Z. Energy trading IoT system based on blockchain. Swarm Evol. Comput. 2021, 64, 100891. [Google Scholar] [CrossRef]
- Liu, N.; Wang, C.; Cheng, M.; Wang, J. A privacy-preserving distributed optimal scheduling for interconnected microgrids. Energies 2016, 9, 1031. [Google Scholar] [CrossRef] [Green Version]
- Lu, Y.; Zhu, M. Privacy preserving distributed optimization using homomorphic encryption. Automatica 2018, 96, 314–325. [Google Scholar] [CrossRef] [Green Version]
- Lu, Y.; Lian, J.; Zhu, M. Privacy-preserving transactive energy system. In Proceedings of the 2020 American Control Conference (ACC), Denver, CO, USA, 1–3 July 2020; pp. 3005–3010. [Google Scholar]
- Day, R.H. Rational choice and economic behavior. Theory Decis. 1971, 1, 229–251. [Google Scholar] [CrossRef]
- Guo, Z.; Pinson, P.; Chen, S.; Yang, Q.; Yang, Z. Chance-constrained peer-to-peer joint energy and reserve market considering renewable generation uncertainty. IEEE Trans. Smart Grid 2020, 12, 798–809. [Google Scholar] [CrossRef]
- Guo, Z.; Pinson, P.; Chen, S.; Yang, Q.; Yang, Z. Online optimization for real-time peer-to-peer electricity market mechanisms. IEEE Trans. Smart Grid 2021, 12, 4151–4163. [Google Scholar] [CrossRef]
- Khorasany, M.; Mishra, Y.; Ledwich, G. A decentralized bilateral energy trading system for peer-to-peer electricity markets. IEEE Trans. Ind. Electron. 2019, 67, 4646–4657. [Google Scholar] [CrossRef] [Green Version]
- Liu, M.; Gross, G. Role of distribution factors in congestion revenue rights applications. IEEE Trans. Power Syst. 2004, 19, 802–810. [Google Scholar] [CrossRef]
- Sorin, E.; Bobo, L.; Pinson, P. Consensus-based approach to peer-to-peer electricity markets with product differentiation. IEEE Trans. Power Syst. 2018, 34, 994–1004. [Google Scholar] [CrossRef] [Green Version]
- Baroche, T.; Pinson, P.; Latimier, R.L.G.; Ahmed, H.B. Exogenous cost allocation in peer-to-peer electricity markets. IEEE Trans. Power Syst. 2019, 34, 2553–2564. [Google Scholar] [CrossRef] [Green Version]
- Moret, F.; Pinson, P. Energy collectives: A community and fairness based approach to future electricity markets. IEEE Trans. Power Syst. 2019, 34, 3994–4004. [Google Scholar] [CrossRef]
- Paillier, P. Public-key cryptosystems based on composite degree residuosity classes. In Proceedings of the International Conference on the Theory and Applications of Cryptographic Techniques, Prague, Czech Republic, 2–6 May 1999; Springer: Berlin/Heidelberg, Germany, 1999; pp. 223–238. [Google Scholar]
- Ma, Y.; Qiu, J.; Sun, X.; Tao, Y. A Multi-Stage Information Protection Scheme for CDA-Based Energy Trading Market in Smart Grids. IEEE Trans. Smart Grid 2021, 13, 2305–2317. [Google Scholar] [CrossRef]
- Damgård, I.; Jurik, M.; Nielsen, J.B. A generalization of Paillier’s public-key system with applications to electronic voting. Int. J. Inf. Secur. 2010, 9, 371–385. [Google Scholar] [CrossRef]
Agent | Bus | an (USD/kW2) | bn (USD/kW) | (kW) | (kW) |
---|---|---|---|---|---|
S1 | 2 | 0.04 | 1 | 1 | 7 |
S2 | 5 | 0.046 | 1 | 1 | 4 |
S3 | 8 | 0.04 | 1 | 1 | 6 |
S4 | 10 | 0.05 | 1 | 1 | 5 |
B1 | 3 | 0.05 | 3 | −7 | −1 |
B2 | 4 | 0.056 | 3 | −6 | −1 |
B3 | 9 | 0.05 | 3 | −8 | −1 |
B1 | B2 | B3 | |
---|---|---|---|
S1 | 1.75 kW/1.21 USD/kW | 1.50 kW/1.19 USD/kW | 2.00 kW/1.24 USD/kW |
S2 | 1.33 kW/2.74 USD/kW | 1.27 kW/2.72 USD/kW | 1.37 kW/2.74 USD/kW |
S3 | 1.75 kW/1.21 USD/kW | 1.50 kW/1.19 USD/kW | 2.00 kW/1.24 USD/kW |
S4 | 1.67 kW/2.66 USD/kW | 1.50 kW/1.24 USD/kW | 1.75 kW/2.65 USD/kW |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Li, Z.; Xu, H.; Zhai, F.; Zhao, B.; Xu, M.; Guo, Z. A Privacy-Preserving, Two-Party, Secure Computation Mechanism for Consensus-Based Peer-to-Peer Energy Trading in the Smart Grid. Sensors 2022, 22, 9020. https://doi.org/10.3390/s22229020
Li Z, Xu H, Zhai F, Zhao B, Xu M, Guo Z. A Privacy-Preserving, Two-Party, Secure Computation Mechanism for Consensus-Based Peer-to-Peer Energy Trading in the Smart Grid. Sensors. 2022; 22(22):9020. https://doi.org/10.3390/s22229020
Chicago/Turabian StyleLi, Zhihu, Haiqing Xu, Feng Zhai, Bing Zhao, Meng Xu, and Zhenwei Guo. 2022. "A Privacy-Preserving, Two-Party, Secure Computation Mechanism for Consensus-Based Peer-to-Peer Energy Trading in the Smart Grid" Sensors 22, no. 22: 9020. https://doi.org/10.3390/s22229020
APA StyleLi, Z., Xu, H., Zhai, F., Zhao, B., Xu, M., & Guo, Z. (2022). A Privacy-Preserving, Two-Party, Secure Computation Mechanism for Consensus-Based Peer-to-Peer Energy Trading in the Smart Grid. Sensors, 22(22), 9020. https://doi.org/10.3390/s22229020