A consortium blockchain based energy trading scheme for Electric Vehicles in smart cities

https://doi.org/10.1016/j.jisa.2021.102998Get rights and content

Abstract

The real time Vehicle-to-Grid (V2G) and Vehicle-to-Vehicle (V2V) energy trading have ameliorated the smart city environment. Electric Vehicles (EVs) in smart cities have made it possible to balance the energy demand and supply without burdening the power grids. They also help in minimizing both the heap amounts of pollution and the greenhouse gas emissions. EVs not only charge their batteries from Charging Stations (CSs), but when the smart city faces energy deficiency, they supply their surplus energy to the power grids to fulfill energy demand as well. In addition, EVs also balance the energy demand and supply through energy trading at the local level during peak hours, which strengthens V2V energy trading. However, some issues, such as security threats and privacy leakage prevent EVs from participating in the energy trading process. In addition, the lack of incentives and knowledge about the cost of reaching the energy trading place within minimum time are also big challenges. Therefore, to solve the aforementioned challenges, a secure and efficient scheme for V2V and V2G energy trading is proposed in this paper. The proposed scheme also helps in promoting environmental friendliness and making the smart cities sustainable and reliable. In the proposed scheme, energy trading transactions are secured using consortium blockchain, wherein the Local Aggregators (LAGs) are selected as authorized nodes. LAGs perform their role as energy brokers and are responsible for validating the energy trading requests using Proof of Authority (PoA) consensus mechanism. Moreover, a solution to find accurate distance with required expenses and time to reach the charging destination is also proposed, which effectively guides EVs to reach the relevant CSs and encourages energy trading. Besides, we propose a fair payment mechanism using a smart contract to avoid financial irregularities. An incentive provisioning mechanism is also given in the proposed work to prevent EVs from acting selfishly. The efficient power flow having minimized losses in the vehicular network is of much importance. Therefore, the energy losses incurred in both V2G and V2V are discussed in this work. Furthermore, Oyente is used for smart contract’s security analysis and for testing Ethereum’s resilience against different security flaws. Two attacker models are proposed and the security analyses of the models are also provided. The analyses show that the proposed system is robust against the double spending and Sybil attacks. Finally, the efficient performance of our proposed scheme is validated and analyzed. The simulation results proved that our proposed work outperforms existing work in terms of providing a secure and efficient energy trading platform for both V2G and V2V environments.

Introduction

A rapid increase in the awareness of efficient use of energy and tackling the increasing amounts of pollution has led to the demand for reliable, secure and sustainable power grids. The demand further leads to the evolution of the traditional grids into smart grids [1]. With the advancement in information and communication technologies, the smart grid gets the benefit of the two-way flow of electricity and information. Smart grids generate energy using renewable energy resources [2], which are of intermittent nature. Therefore, energy management plays a very important role in maintaining the sustainability and reliability of the smart grid. Electric Vehicles (EVs) are considered an integral part of energy management systems. They play a key role in balancing the demand and supply of energy in smart grids. They rely on the usage of electricity rather than conventional fossil fuels, which remarkably reduces environmental pollution and minimizes greenhouse gas emissions. The aforementioned factors help in making the cities smart, green and sustainable [3]. For energy trading, Vehicle-to-Grid (V2G) and Vehicle-to-Vehicle (V2V) energy trading systems have emerged drastically, which enable better utilization of energy in the presence of scarce energy resources [4]. EVs have the ability to act both as energy suppliers and energy consumers in the smart transportation infrastructure. This ability of EVs helps in fostering reliability and sustainability in smart cities [5]. EVs sense and transmit the data about their environment using different communication technologies in a smart transportation system [6]. The built-in On-Board Unit (OBU) allows EVs to interact with each other for information sharing [7]. EVs can transmit energy trading requests to other EVs for buying and selling energy, price prediction, load forecasting, and optimal energy consumption scheduling [5].

The development of EVs has led the masses towards the smart transportation sector as they are providing various benefits apart from the transportation services [8]. To balance energy demands in the smart city, energy trading systems need to be managed efficiently and EVs must practice self-sustainability in the smart city [8]. EVs not only get energy from Charging Stations (CSs), but also from other EVs to reduce load during peak hours through V2V energy trading [9] at the Parking Lots (PRKs). Moreover, they supply the surplus energy back to the CSs (V2G energy trading), when the smart city faces an energy deficiency [8], [9]. However, there are various challenges in both energy trading environments, such as security threats and privacy leakage. Therefore, to address the security issues, authors in [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12] have used blockchain technology. Blockchain is an emerging Peer-to-Peer (P2P) distributed and decentralized network [13] in which data is shared among network nodes. This technology has been widely used in different fields, such as Wireless Sensor Networks (WSNs) [14], Internet of Things (IoT) [15], Vehicular Ad-Hoc Networks (VANETs) [16], [17], cloud environment [18], energy and smart grids [19], [20], healthcare, agriculture [21], etc., for secure, distributed, transparent, immutable and auditable storage of transactions records.

Apart from the aforementioned issues, EVs with surplus energy are not motivated to participate as energy sellers in the energy trading environment due to the lack of incentive provisioning. It causes imbalance in energy demand and supply in the smart city. Therefore, motivating them for energy trading is a vital challenge. Zhou et al. [4] proposed an incentive mechanism using contract theory for V2G energy trading. In this scheme, EVs receive a higher reward to discharge their energy at CSs. Kang et al. [2] proposed a localized P2P energy trading model for local energy trading among EVs to achieve demand response and balance localized energy demand by providing an incentive mechanism using an iterative double auction method with a consortium blockchain. However, finding the nearest CSs’ information (such as price, distance, time slot) for EVs remains an important issue, which needs to be tackled. Authors in [8] and [22] proposed energy trading models to address this issue. Jindal et al. [8] proposed a mechanism for EVs to find the nearest CSs. However, they used equal-sized blocks of the smart city, which are not suitable when dealing with random-sized blocks. Chaudhary et al. [22] proposed a blockchain-based secure energy trading scheme for EVs. The proposed schemes of [2], [4], [8], [22] do not involve well-defined payment mechanisms and are prone to attacks.

Motivated by the aforementioned developed energy trading schemes, we develop such a V2V and V2G energy trading environment for EVs and CSs, which leverages consortium blockchain with Proof of Authority (PoA) consensus mechanism and smart contract for efficient energy trading. Consortium blockchain provides features of both the public and private blockchains. PoA mechanism requires less computational power as compared to Proof of Work (PoW) and has maximum throughput with less latency. In our scenario, four major entities are involved: Registration Authority (RA), EVs, CSs, and Local Aggregators (LAGs). Blockchain is deployed on LAGs to keep track of energy trading transactions of EVs and CSs.

Many researchers provide solutions to manage energy demand in smart cities by trading energy in V2V and V2G manner. In the V2G energy trading environment, EVs charge and discharge their batteries at CSs; whereas, in V2V, energy trading occurs among EVs locally. However, EVs and CSs face various challenges in energy trading environments, such as security threats, privacy leakage, finding the nearest energy trading place, and lack of incentives.

Trust and security have always been the biggest challenges in the transportation sector. In energy trading, it is very important to authenticate energy trading requests. In addition, the malicious attacks by the malicious nodes are also a challenge in this area because some adversaries modify the transactions for their benefits, which results in the financial loss of both the CSs and the EVs. In the literature, blockchain is widely used in WSNs, VANETs and smart grid network scenarios to address security, data tampering, and request tampering challenges. The authors in [8], [22] proposed blockchain-based energy trading mechanisms for EVs. In [8], Jindal et al. proposed an edge-as-a-service framework for energy trading in the V2G environment to reduce delay in energy trading decisions taken at remote control centers. They also proposed a model to find the nearest CSs for an EV to save both energy and traveling time. Chaudhary et al. [22] proposed a blockchain-based secure energy trading and minimum distance finding scheme for EVs. However, both schemes failed to achieve accurate distance in the random-sized city blocks. In both schemes, the authors selected the EVs as miner nodes to validate the energy trading requests using the PoW consensus mechanism. However, EVs cannot perform the role of miners due to their limited resources [23]. Moreover, the PoW consensus mechanism also requires a huge amount of computational power. Apart from that, the proposed schemes do not involve well-defined payment mechanisms and are prone to attacks. Additionally, no incentive mechanism is provided in [22] to motivate EVs to sell their surplus energy to CS while meeting the energy demand. Kang et al. [2] proposed a localized P2P energy trading model for local energy trading among EVs to balance localized energy demand by providing an incentive mechanism using iterative double auction method with a consortium blockchain. In [2] and [22], Transaction Server Controller (TSC) aggregates the requests of energy sellers and buyers from the local server and selects the pairs of sellers and buyers based on the auction price. However, no mechanism is specified to determine the locations of buyers and sellers to check either they are requesting from the same area or from different areas. We have discussed solutions to the aforementioned challenges in Section 3.

Our contributions in this paper are summarized as follows:

  • consortium blockchain is deployed along with PoA consensus mechanism on the LAGs for secure energy trading,

  • smart contracts are designed to ensure fair payment between EVs. Moreover, an incentive mechanism is proposed to encourage EVs to participate in energy trading. Besides, a punishment mechanism is developed to prevent EVs from acting maliciously,

  • an algorithm is developed for energy trading in which EVs find the list of the nearby CSs or PRKs with information about distance, required time and energy expenses to reach the destination in both V2V and V2G energy trading environments,

  • the power flow in the vehicular network and the associated energy losses are discussed and

  • this study designs two attacker models based on the double spending and Sybil attacks. Security analyses of the models show that the proposed system is robust against both attacks. Also, Oyente symbolic execution tool is used for smart contract’s security analysis, which is able to test common and well-known latest security flaws of Ethereum with Ethereum Virtual Machine (EVM) byte code.

In Section 2, the literature review of existing work on blockchain based energy trading is discussed. Section 3 describes our system model and problem formulation. Whereas, security objectives and analysis, and attacker models are given in Section 4. Simulation and discussion of results are given in Section 5. Finally, the conclusion of this paper is presented in Section 6.

Section snippets

Related work

During the past few decades, researchers are actively working in the area of the intelligent transportation system in research with the development of smart cities. The major aim behind this research is to make the cities smarter and greener. Using electricity instead of conventional fossil fuels helps in cutting down the heap amounts of pollution and greenhouse gas emissions. It leads to reliability and sustainability of the cities. In the literature, many solutions are proposed related to

System model

In this section, we describe the proposed system model in detail, as shown in Fig. 1.

Security objectives and analysis, and attacker models of the proposed system

In this section, we first discuss the security objectives of our proposed energy trading scheme. After that, we evaluate the security analysis of the proposed smart contract using the Oyente tool. Finally, two attacker models are formulated.

Simulation results

In this section, the mathematical results are presented in tabular form. Table 4 gives the values of the losses incurred in V2G charging of EVs. Whereas, Table 5 provides the values of losses incurred in V2V charging. The results are obtained using three different values of SoC, i.e., 50%, 60% and 70%. The values are taken from [47] and [48]. It is observed that the loss values decrease with the increase in SoC values.

Conclusion

We have implemented V2V and V2G energy trading environments in a smart city using consortium blockchain and smart contracts for a fair payment mechanism where EVs and CSs can trade energy without reliance on the third party. Blockchain technology is deployed on authorized LAGs, which work as energy brokers to carry out the energy trading requests. We have used the PoA consensus mechanism instead of PoW because it uses less computational power as compared to PoW and provides maximum throughput

CRediT authorship contribution statement

Rabiya Khalid: Conception and design of study, Writing – original draft. Muhammad Waseem Malik: Conception and design of study, Writing – review & editing. Turki Ali Alghamdi: Analysis and/or interpretation of data. Nadeem Javaid: Acquisition of data, Writing – review & editing.

Declaration of Competing Interest

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

Acknowledgment

All authors approved the version of the manuscript to be published.

Rabiya Khalid received the M.C.S. degree from the Mirpur University of Science and Technology, Mirpur, Pakistan, in 2014, and the M.S. degree in computer science with a specialization in energy management in smart grid from the Communications Over Sensors (ComSens) Research Laboratory, COMSATS University Islamabad, Islamabad, Pakistan, in 2017, under the supervision of Dr. Nadeem Javaid, where she is currently pursuing the Ph.D. degree under the same supervision. She is also working as a

References (49)

  • ZhouZ. et al.

    Blockchain and computational intelligence inspired incentive-compatible demand response in internet of electric vehicles

    IEEE Trans Emerg Top Comput Intell

    (2019)
  • GaoF. et al.

    A blockchain-based privacy-preserving payment mechanism for vehicle-to-grid networks

    IEEE Netw

    (2018)
  • LiuH. et al.

    Blockchain-enabled security in electric vehicles cloud and edge computing

    IEEE Netw

    (2018)
  • ZhengD. et al.

    A traceable Blockchain-based access authentication System with Privacy Preservation in VANETs

    IEEE Access

    (2019)
  • LiZ. et al.

    Consortium blockchain for secure energy trading in industrial internet of things

    IEEE Trans Ind Inf

    (2017)
  • AitzhanN.Z. et al.

    Security and privacy in decentralized energy trading through multi-signatures, blockchain and anonymous messaging streams

    IEEE Trans Dependable Secure Comput

    (2016)
  • YahayaA.S. et al.

    Blockchain based sustainable local Energy Trading considering home Energy Management and demurrage Mechanism

    Sustainability

    (2020)
  • SamuelO. et al.

    Leveraging Blockchain Technology for secure energy trading and least-cost evaluation of decentralized contributions to electrification in Sub-Saharan Africa

    Entropy

    (2020)
  • NakamotoS.

    Bitcoin: A Peer-to-Peer electronic cash system

    (2019)
  • SheW. et al.

    Blockchain trust model for malicious node detection in wireless sensor networks

    IEEE Access

    (2019)
  • SultanaT. et al.

    Data sharing system integrating access control mechanism using blockchain-based smart contracts for IoT devices

    Appl Sci

    (2020)
  • FengQ. et al.

    BPAS: Blockchain-assisted privacy-preserving authentication system for vehicular Ad-Hoc Networks

    IEEE Trans Ind Inf

    (2019)
  • JavedM.U. et al.

    Blockchain-based secure data storage for Distributed Vehicular Networks

    Appl Sci

    (2020)
  • GaiK. et al.

    Privacy-preserving energy trading using consortium blockchain in smart grid

    IEEE Trans Ind Inf

    (2019)
  • Cited by (15)

    View all citing articles on Scopus

    Rabiya Khalid received the M.C.S. degree from the Mirpur University of Science and Technology, Mirpur, Pakistan, in 2014, and the M.S. degree in computer science with a specialization in energy management in smart grid from the Communications Over Sensors (ComSens) Research Laboratory, COMSATS University Islamabad, Islamabad, Pakistan, in 2017, under the supervision of Dr. Nadeem Javaid, where she is currently pursuing the Ph.D. degree under the same supervision. She is also working as a Research Associate with the ComSens Research Laboratory, COMSATS University Islamabad. She has authored more than 20 research publications in well reputed technical journals and international conferences. Her research interests include data science and blockchain in smart/micro grids.

    Muhammad Waseem Malik is currently pursuing the M.S. degree in computer science in the Department of Computer Science, COMSATS University Islamabad, Islamabad, Pakistan. He has five research publications in well reputed international journals and conferences. His research interests include data science, smart grid, blockchain, and financial market.

    Turki Ali Alghamdi received the bachelor’s degree in computer science from King Abdulaziz University, Jeddah, Saudi Arabia, the master’s degree in in Distributed Systems and Networks from the University of Hertfordshire, Hatfield, United Kingdom, in 2006 and the Ph.D degree from the University of Bradfsord, United Kingdom, in 2010. He is a Professor in Computer Science Department, Faculty of Computer and Information Systems, University of Umm Al-Qura in Makkah (UQU), and the Founding Director of UQU Smart Campus Center (SCC). He has more than 15 years of research and development, academia and project management experience in IT. He has previously been Vice Dean of Technical Affairs for IT Deanship in Umm Al-Qura University and Dean of eLearning and IT in Taif university. He holds CDCDP and CDCMP certificates. He is passionate about developing the translational and collaborative interface between industry and academia. Turki’s research, focusing on Wireless Sensor Networks, Energy and QoS Aware Routing Protocols, Network Security, IoT and Smart Cities.

    Nadeem Javaid (S’8, M’11, SM’16) received the bachelor degree in computer science from Gomal University, Dera Ismail Khan, Pakistan, in 1995, the master degree in electronics from Quaid-i-Azam University, Islamabad, Pakistan, in 1999, and the Ph.D. degree from the University of Paris-Est, France, in 2010. He is currently an Associate Professor and the Founding Director of the Communications Over Sensors (ComSens) Research Laboratory, Department of Computer Science, COMSATS University Islamabad, Islamabad. He is also working as visiting professor at the School of Computer Science, University of Technology, Sydney, Australia. He has supervised 137 master and 24 Ph.D. theses. He has authored over 900 articles in technical journals and international conferences. His research interests include energy optimization in smart grids and in wireless sensor networks using data analytics and blockchain. He was recipient of the Best University Teacher Award from the Higher Education Commission of Pakistan, in 2016, and the Research Productivity Award from the Pakistan Council for Science and Technology, in 2017. He is also Associate Editor of IEEE Access and Editor of Sustainable Cities and Society journals.

    View full text