Next Article in Journal
Thermal Performance and Energy Saving Analysis of Indoor Air–Water Heat Exchanger Based on Micro Heat Pipe Array for Data Center
Previous Article in Journal
Brittleness Evaluation in Shale Gas Reservoirs and Its Influence on Fracability
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Research on Bidding Mechanism for Power Grid with Electric Vehicles Based on Smart Contract Technology

1
College of Energy and Electrical Engineering, Hohai University, Nanjing 211100, China
2
State Grid Zhejiang Electric Power Research Institute, Hangzhou 310014, China
*
Author to whom correspondence should be addressed.
Energies 2020, 13(2), 390; https://doi.org/10.3390/en13020390
Submission received: 19 December 2019 / Revised: 7 January 2020 / Accepted: 10 January 2020 / Published: 13 January 2020
(This article belongs to the Section A1: Smart Grids and Microgrids)

Abstract

:
To promote coordinated development of electric vehicles (EVs) and power grid under open power selling, a bidding mechanism using blockchain smart contract technology was proposed. By demand respone management (DRM) on and off the blockchain, based on different driving characteristics of EV subgroups, various charging–discharging demands and constraints were fully considered between EV user subgroups and agent. Purchase–sale transaction relationship and unit commitment plan were fully considered between the EV agent and power dispatching center under economic dispatching. Aiming at the lowest power purchase cost of EV users, the highest profit of EV agent and the lowest cost of power economic dispatching, smart contract models with optimal benefits were established among the three. The smart contract models were solved by combining the internal and external optimization relationship of particle swarm and genetic algorithms. The charging–discharging price was optimized by DRM to realize the reasonable allocation of charging–discharging resources of EVs. An example analysis shows that this bidding mechanism can achieve peak–cutting and valley–filling for power load. At the same time, it can effectively protect the benefits of EV users, agent, and power dispatching center. This result can provide a reference for the application of smart contract in bidding of EVs to the power grid.

Graphical Abstract

1. Introduction

In the recent years, the opening of the electricity side and the deepening of the concept of the energy Internet have further promoted the integration of various energy systems and the allocation of plug–in energy resources [1]. A large number of distributed power generators, distributed energy storage systems, intelligent electrical equipments, and other players participate in the power market [2]. Through smart grid technology, traditional subjects have transformed from mere energy consumers into ‘energy prosumers’ that integrate energy production and consumption. They are capable of generating new energy, responding to power demand and participating in active distribution network [3]. Especially, in a diversified market structure, large–scale EVs with flexible charging–discharging characteristics will become an important component of smart grid construction [4].
EVs can be regarded as load when they are being charged and can be used as distributed power sources when they are idle. EVs can be connected to the grid and send the energy back to the grid by V2G (vehicle–to–grid). Appropriate charging–discharging control cannot only restrain the adverse impact of EVs on the power grid but also support peak shifting, frequency modulation, rotary standby, and other services to coordinate the development of EVs and the power grid [5]. Therefore, EV agent can act as a mediation between users and the power grid. It can facilitate centrally dispatch the charging–discharging resources of EVs on behalf of the huge and dispersed users. This will help EV users, agent, and the power grid realize potential benefits. For this system to work, the game competition among the three needs a safe, transparent, and secure trading mechanism [6].
Due to the scattered load resources and high uncertainty of EVs, they need to enter the network through an agent. Flexible trading contracts can be signed between them to ensure the balance of interests. Accordingly, the agent also needs to sign the corresponding transaction contracts with the power grid company through the power dispatching center. However, at present, the traditional power transaction mode mostly adopts centralized configuration to dispatch resources. This leads to the following problems among market subjects [7]: (a) transaction information is tampered with each other; (b) information between the parties can be asymmetric; (c) high transaction costs.
Blockchain technology has a decentralized accounting mechanism and a smart contract system for automatic and secure transactions, which can guarantee decentralization, verification, and integrity. Nowadays it is applicable to various fields, including smart grids and distributed energy trading [8]. Therefore, the smart contract technology of blockchain can be introduced into the mechanism of EVs to the power grid, which achieves distributed decentralized scheduling and demand response. This mechanism can meet the users’ requirements of trustworthiness, fairness, privacy, and other aspects, making up the deficiency of traditional scheduling mechanism.
There are several existing works on power market by blockchain in the literature. For demand response with power trading, Ref. [9] integrates the distributed ledger with smart contracts to ensure the balance demand–production and validate the timely adjustments of demand response based on Ethereum. Ref. [10] presents a decentralized cooperative demand response framework to manage the energy exchanges within smart buildings, which benefits all the participants. Ref. [11] proposes an energy trading platform to solve the security problem. It implements the point–to–point system that enhances the transparency and immutability under smart contracts.
For the specific application of EV energy transaction, Ref. [12] proposes a novel EV participation charging scheme, to minimize the power fluctuation level in the grid and the total charging cost for EV users. Ref. [13] proposes a real–time system that contains the concepts of prioritization and cryptocurrency. This can incentivize EV users to collectively charge with an energy–friendly schedule. Ref. [14] approaches the problem of an agent bidding into electricity market with the objective of minimizing charging costs while satisfying the EV demand. Ref. [15] proposes a multistage stochastic model of an EV agent to participate electricity market under several uncertainties such as the behaviour of users and electricity prices. The results of this model can effectively increase the agent’s profit.
Although the above literatures have established a relatively complete blockchain trading mechanism under the demand response to a certain extent, the research on the advantages of the demand resources for EVs especially in the economic market is less involved. Most of literatures are based on the deterministic electricity price model, which only realizes the charge–discharge energy interaction between EVs and other subjects. Moreover, most of the proposed bidding mechanisms only realize the win–win situation between users and agent or between agent and the power grid. There is a lack of bidding research involving discharging. Under the background of blockchain, there are few studies on achieving economic win–win among users, agent, and power grid by fully exploiting the demand response of charging–discharging resources of EVs. Therefore, how to use the blockchain smart contract technology to build a reasonable and effective bidding mechanism among the three parties is worth studying.
This paper combines the EV participating in bidding mechanism with the blockchain smart contract technology. Firstly, a bidding mechanism framework for EVs on and off the chain is built. The mechanism off the chain includes the design of cluster classification methods for EVs with different driving demands and the demand of unit commitment between generator sets and energy plans. The mechanism on the chain includes the design of the transaction under the smart contracts between the users, the agent, and the power dispatching center, which is divided into two aspects to establish a complete DRM: On the one hand, the smart contract model between the users and the agent can be achieved with the goal of minimum electricity purchase cost for the users and maximum revenue for the agent. On the other hand, the smart contract model between the agent and the power dispatching center is achieved with the aim of minimizing the load variance of the power grid and the cost of power economic dispatching. After that, the combination of particle swarm and genetic algorithm is used to realize the above two aspects of smart contract models. Then, the results are recorded in the blockchain distributed ledger. Finally, an example is given to verify the effectiveness of the bidding mechanism and DRM, which achieves economic win–win among several aspects.
The contributions and innovations of this paper are as follows:
(a)
Different from the traditional blockchain trading architecture with a single chain, this paper innovatively proposes the on and off chain architecture considering the applicability and bottleneck of smart contract technology. The bidding relationship among market subject is only used as the logic of contract on the chain to realize distributed trading. Off the chain, EV cluster classification and unit commitment still adopt centralized dispatching.
(b)
Different from the traditional centralized bidding of EVs, this paper classifies EVs with different driving characteristics in a unified cluster and adopts a different DRM. This method fully excavates the diverse charging–discharging demands of different users and provides a more real demand response for bidding in the market.
(c)
Based on the literatures [16,17], the traditional user–side and grid–side DRM have been extended to introduce the concept of EV agent. The smart contract interaction between EV users and agent is taken as the user side in a broad sense. The smart contract interaction between EV agent and power dispatching center is taken as the power grid side in a broad sense. On the whole, this paper will achieve economic win–win results based on the demand response of the three parties.
(d)
Based on the traditional EV charging bidding, the demand response and economic impact brought by discharging are considered. Moreover, a reasonable and effective bidding mechanism and algorithm are designed, which obtains better optimal scheduling and economic benefit than bidding only containing charging.

2. Materials and Methods

2.1. Overview of System Model

2.1.1. Relationship between Blockchain and Smart Contract

Blockchain is a series of data in the block list, and each block is recorded within a certain period of time based on the transaction data. This technology uses the asymmetric encryption technology between the public and private key of an account, Merckle tree data structure guaranteed by Hash algorithm, peer–to–peer distributed network architecture, consensus mechanism for building trust between blocks, and other technologies. However, smart contract was put forward earlier than blockchain, which is a computer–processed automatic trading protocol that can execute the contract terms required by each trader [18]. Due to the lack of corresponding supporting system and technology, smart contract was not previously carried out. With the birth of blockchain technology, smart contract has gained support and gradually become an important extension of blockchain technology. The two are complementary: The underlying blockchain technology provides a practical, safe, and fair platform for the application of smart contract. Smart contract provides procedural guarantee for the legal execution of a trader’s rights and obligations. On the whole, it constitutes a decentralized trading system. On the premise of no third–party central institution participating, on the one hand, it fully guarantees the privacy and data security of each market subject. On the other hand, it gives all subjects a flexible and diverse smart contract logic, which can realize the maximization of resources and interests in a balanced way based on the DRM.

2.1.2. Overall Framework of Trading Mechanism

Smart contract is mostly embedded in transaction logic with automated scripting language, which is insufficient for dealing with large–scale complex optimization problems in the power system [19]. Therefore, in order to give full play to the advantages of smart contract, this paper combines distributed transactions on the chain with centralized scheduling off the chain. Its overall framework is shown in Figure 1.
Market subjects participate in the transaction mechanism on the chain including EV users, agent, and power dispatching center. They form independent node layers in the blockchain, and then form a point–to–point distributed transaction network as each node layer. Each market subject, according to their own interest, requests to the blockchain network trading pool based on the node that contains encrypted information such as IP address, public key, and private key [20]. Considering driving demand, discharging compensation, and other requests, the users’ layer and the agent layer reach a smart contract with the goal of minimizing the electricity purchase cost of the users and maximizing the charging–discharging profit of the agent. Considering the power grid of the company’s interests in purchase–sale, unit state, and other requested information, the agent layer and the power dispatching center layer reach a smart contract with the goal of the minimum variance of power grid load and cost of power economic dispatching. Through the process of the two smart contracts reached, DRM is realized in both.
EVs are connected to the network through smart charging piles to participate in DRM, forming a data collection and classification layer off the chain. A variety of user subgroups are formed based on the remaining power of EVs and the driving time of users. Then, corresponding smart contracts are reached with the agent in turn. According to the power generation plan issued by the power dispatching center on the chain, the operation state of units is dispatched centrally to participate in DRM, forming the unit commitment layer off the chain.
On the whole, the optimal scheduling load containing EV charging–discharging resources is embedded between each market subject and on–off the hierarchy of blockchain. With EV charging–discharging electricity price as the economic dispatching lever, smart contracts containing charging–discharging contract volume and price information are mutually achieved as the result of DRM. The corresponding transactions of charging–discharging resource are automatically executed and recorded in the underlying blockchain distributed ledger to form a mutually agreed, tamper–proof, secure, and transparent block data structure. From on to off, this framework realizes the dynamic balance of supply–demand DRM and guarantees the security, trust, and transparency of the whole bidding process.

2.2. Smart Contract Model between EV Users and Agent

2.2.1. Classification Method of EVs

EVs with different driving characteristics have different charging–discharging demand. If similar charging–discharging control is carried out on large–scale EVs one by one, it will not only fail to provide personalized scheduling for users with different electricity demands, but also cause a computational dimension disaster [21]. Therefore, it is particularly important to make a reasonable classification and scheduling system.
The randomness of a single EV is strong, but the driving characteristics of a large number of EVs are regular. The travel rule of the users is the moment when the EVs are connected and detached from the charging piles, which determines the schedulable duration and the time when the EVs start dispatching. Meanwhile, the initial state of charge (SOC) also has a key impact on the charging–discharging. Therefore, this paper takes the time for EVs to access and leave the charging piles as a clustering feature, and takes EVs with similar SOC as another classification standard. Finally, charging piles connected to EVs with similar driving characteristics will be taken as the unified user node to integrate large–scale charging–discharging resources. Thus, users can participate in the realization of the agent’s smart contracts and optimal scheduling.

2.2.2. Analysis of Demand Contract

Constraints of EV Users

In the process of reaching smart contracts with the agent, users should first consider different constraints of each user subgroup to match different demand responses. Its specific analysis is as follows.
1. Constraints of users travel demand.
S exp , min < S need ( k , i ) < S exp , max
where, S need ( k , i ) is the power demand SOC of the vehicle i in the user subgroup k; S exp , min and S exp , max are the minimum and maximum power demand SOC expected by the users, respectively.
2. Constraints of charging–discharging state.
x ( k , i , t ) = { 1 , Charging 0 , idle 1 , Discharging ,     t [ T s ( k , i ) , T e ( k , i ) ]
where, x ( k , i , t ) is the charging–discharging state of the vehicle i in the user subgroup k in time period t: 1 is charging and 0 is idle and −1 is discharging; T s ( k , i ) and T e ( k , i ) are respectively the starting and ending scheduling time of the vehicle i in the user subgroup k, namely the time when the EVs arrive and leave the charging piles.
3. Constraints of battery charging–discharging.
{ S ( k , i , t ) = S ( k , i , t 1 ) + { p ch ( k , i , t ) · Δ t / B , x ( k , i , t ) = 1 0 , x ( k , i , t ) = 0 p dc ( k , i , t ) · Δ t / B , x ( k , i , t ) = 1 S need ( k , i ) S ( k , i , T e ( k , i ) )
where, t [ T s ( k , i ) , T e ( k , i ) ] ; S ( k , i , t ) is the SOC of the vehicle i in the user subgroup k at the end of time period t; p ch ( k , i , t ) and p dc ( k , i , t ) are the charging and discharging power of the vehicle i in the user subgroup k in time period t, respectively; B is the capacity of the battery; Δt is the length of a scheduling period.

Analysis of Demand Contract for EV Users

Users mainly buy electricity volume from power grid company through an agent. The battery will be charged and discharged several times, which will cause additional cost. Its specific analysis is as follows.
1. Cost of electricity purchasing for users.
C buy AtoU ( k ) = t = 1 T ev i = 1 N k p ch ( k , i , t ) · Δ t · W ch ( t ) , x ( k , i , t ) = 1 ,     t [ T s ( k , i ) , T e ( k , i ) ]
where, C buy AtoU ( k ) is the purchasing power cost of the user subgroup k from the agent; T ev is the total number of scheduling hours in a day; W ch ( t ) is the contract charging price within time period t; N k is the number of EVs in the user subgroup k.
2. Cost of battery loss for users.
C loss U ( k ) = t = 1 T ev i = 1 N k | p dch ( k , i , t ) | · W loss ( t ) , p dch ( k , i , t ) = { p ch ( k , i , t ) x ( k , i , t ) = 1 p dc ( k , i , t ) x ( k , i , t ) = 1
where, C loss U ( k ) is the battery loss cost of the user subgroup k; W loss ( t ) is the unit loss cost of the battery in time period t ; p dch ( k , i , t ) is the charging or discharging power of the vehicle i in the user subgroup k in time period t .
3. Employment cost of the agent entrusted by the users.
C agent UtoA ( k ) = N k · W agent
where, C agent UtoA ( k ) is the cost of hiring agent for the user subgroup k; W agent is the dispatch hire fee that the users gives the agent per vehicle.

Analysis of Demand Contract for EV Agent

As the intermediate layer, the agent purchases the electricity demand on behalf of the users and feeds the volume back to the grid under certain constraints to obtain part of the discharging revenue. At the same time, the cost of energy storage and operation should be considered. Therefore, the users should be compensated economically for the discharging part. Its specific analysis is as follows.
1. Discharging revenue of agent.
R sell AtoG ( k ) = t = 1 T ev i = 1 N k p dc ( k , i , t ) · Δ t · W dc ( t ) , x ( k , i , t ) = 1 ,     t [ T s ( k , i ) , T e ( k , i ) ]
where, R sell AtoG ( k ) is the agent’s revenue from discharging electricity into the grid through the user subgroup k; W dc ( t ) is the contract discharging price within time period t.
2. Energy storage and operation cost of agent.
C run A ( k ) = t = 1 T ev i = 1 N k p ch ( k , i , t ) · W run ( t ) , x ( k , i , t ) = 1 ,     t [ T s ( k , i ) , T e ( k , i ) ]
where, C run A ( k ) is the energy storage and operation cost of agent after purchasing electricity for the user subgroup k; W run ( t ) is the unit cost of energy storage and operation of agent after purchasing electricity in time period t.
3. Discharging compensation of agent.
C comp AtoU ( k ) = t = 1 T ev i = 1 N k p dc ( k , i , t ) · W comp ( t ) , x ( k , i , t ) = 1 ,     t [ T s ( k , i ) , T e ( k , i ) ]
where, C comp AtoU ( k ) is the agent’s discharging compensation for the user subgroup k; W comp ( t ) is the unit compensation of discharging within time period t.

2.2.3. Analysis of Target Contract

In order to fully mobilize the enthusiasm of users, a certain proportion of profit sharing is introduced between the agent and the users’ target contract. Therefore, both parties can develop a flexible benefit distribution plan while maximizing the benefits. Its specific analysis is as follows.
1. Target contract of agent.
max R total A ( k ) = ( C agent UtoA ( k ) + R sell AtoG ( k ) C run A ( k ) C comp AtoU ( k ) ) · ( 1 r )
where, R total A ( k ) is the agent’s total revenue to the user subgroup k; r is the profit sharing proportion that the agent gives to the users. If the agent loses money, there will be no profit sharing.
2. Target contract of users.
{ min C total U ( k ) = C buy AtoU ( k ) + C loss U ( k ) + C agent UtoA ( k ) C comp AtoU ( k ) R bonus AtoU ( k ) R bonus AtoU ( k ) = R total A ( k ) / ( 1 r ) · r
where, C total U ( k ) is the total power purchase cost of the user subgroup k; R bonus AtoU ( k ) is the profit sharing that the agent gives to the user subgroup k.

2.3. Smart Contract Model of EV Agent and Power Dispatching Center

2.3.1. Analysis of Target Contract

Agent integrates the users’ various demands and interacts with the power grid through the power dispatching center. The goal of the power dispatching center is to optimize the power grid load and the power grid company’s interests.
The charging–discharging resources of the EVs can not only be used as an important scheme for load peak–cutting and valley–filling, but also provide flexible dispatching response for the unit commitment under load optimization. This mechanism can reduce the cost of system operation, and realize the optimal cost of the whole economic dispatching. The specific analysis is as follows.
1. Target contract 1 of power dispatching center.
Take the minimum variance of power grid load as the target contract:
{ min D load ( k ) = 1 T ev t = 1 T ev ( P base ( t ) + i = 1 N k p dch ( k , i , t ) P av ) 2 P av = 1 T ev t = 1 T ev ( P base ( t ) + i = 1 N k p dch ( k , i , t ) )
where, D load ( k ) is the grid load variance containing the user subgroup k; P base ( t ) is the load value of the basic power grid excluding EVs in time period t; P av is the average load value of the grid containing EVs in the total time period.
2. Target contract 2 of power dispatching center.
On the one hand, the power dispatching center protects the interests of the power grid company and agent from being damaged. On the other hand, by assigning a power generation load plan, it minimizes the increased cost of unit commitment due to the entry of EVs into the network. It will achieve the optimal cost of overall economic dispatching. In order to simplify the model and highlight the transactions on the distribution side of blockchain, the electricity purchase cost of the power grid company from the power generation market is simplified. It is expressed as the increased cost because of the unit commitment in the analysis off the chain, regardless of the specific relationship between the units and the power grid company.
Taking the lowest cost of power economic dispatching as the target contract, that is
{ min C E = ( C G C G ) + [ k = 1 N k C buy AtoG ( k ) k = 1 N k R sell GtoA ( k ) ] C buy AtoG ( k ) = R sell AtoG ( k ) R sell GtoA ( k ) = C buy AtoU ( k )
where, C E is cost of the whole power economic dispatching; C G is the unit commitment cost of the power system excluding EVs; C G is the unit commitment cost of the power system containing EVs; C buy AtoG ( k ) is the cost of the grid company by purchasing discharging volume from the user subgroup k through the agent; R sell GtoA ( k ) is the revenue of the grid company by selling the charging volume to the user subgroup k through the agent.

2.3.2. Analysis of Demand Contract

The unit commitment layer of the blockchain is extended based on the traditional unit commitment model [22]. According to the load generation plan issued by the power dispatching center, the model of centralized optimal dispatching of each unit is adopted. The cost of unit commitment containing EVs is expressed as
{ C G = t = 1 T uc j = 1 N G { F j [ Y j ( t ) ] + S j · [ 1 I j ( t 1 ) ] } · I j ( t ) , F j [ Y j ( t ) ] = a j + b j · Y j ( t ) + c j · Y j 2 ( t ) , S j = { S j hot , T j Loff [ T j Moff , T j Moff + T j cold ] S j cold , T j Loff [ T j Moff + T j cold , + ]
where, C G is the system total cost of the unit commitment, consisting of fuel cost and startup cost; T uc is the total optimization time of the unit commitment; N G is the number of thermal power units involved in optimization; F j [ Y j ( t ) ] is the fuel cost function of the unit j. Y j ( t ) is the unit output of the unit j in the time period t; a j , b j , c j is the fuel cost coefficient of the unit j; S j is the startup cost of the unit j, which consists of hot start cost and cold start cost; T j Loff is the continuous outage time before starting unit j; T j Moff is the allowed minimum stop time of the unit j; T j cold is the cold start time of the unit j; I j ( t ) is the binary integer variable of the unit j in the on–off state during the time period t: 1 represents startup and 0 represents shutdown.

2.3.3. Analysis of Constraints

1. Constraints of load balance.
j = 1 N G Y j ( t ) I j ( t ) = P base ( t ) + P ch ( t ) P dc ( t )
where, P ch ( t ) and P dc ( t ) are the total charging and discharging loads of all EVs in time period t, respectively.
2. Constraints of system reserve.
j = 1 N G Y j max ( t ) I j ( t ) P base ( t ) + P ch ( t ) P dc ( t ) + Q ( t )
where, Y j max ( t ) is the maximum output of unit j in the time period t; Q ( t ) is the standby demand of the system in time period t.
3. Constraints of unit output.
Y j min ( t ) I j ( t ) Y j ( t ) I j ( t ) Y j max ( t ) I j ( t )
where, Y j min ( t ) is the minimum output of the unit j in time period t.
4. Constraints of unit downtime.
{ [ T j Aon ( t ) T j Mon ] · [ 1 I j ( t + 1 ) ] 0 I j ( t ) = 1 [ T j Aoff ( t ) T j Moff ] · I j ( t + 1 ) 0 I j ( t ) = 0
where, T j Aon ( t ) and T j Aoff ( t ) respectively represents the cumulative startup time and shutdown time of the unit j in time period t; T j Mon is the allowed minimum running time of unit j.

2.4. Solution of Smart Contract Model

Firstly, k–means algorithm and quartile method are used to cluster the travel time of users, and the initial residual power of EVs is classified. The user subgroups with different driving characteristics are formed. Then, particle swarm optimization is used as the outer layer optimization and genetic algorithm as the inner layer optimization to solve the smart contract models. Each chromosome represents the volume of electricity left in each vehicle in a user subgroup. The inner layer algorithm first optimizes the residual power of each user subgroup one by one to obtain the optimal charging–discharging control state. What’s more, based on the optimization results of the inner layer, the outer layer algorithm optimizes the overall charging–discharging electricity price and unit commitment. So that the market subjects can reach a smart contract with each other. The specific solution process is shown in Figure 2.
Among them, the transaction information in the three objective functions of agent, user benefit maximization, and grid load variance minimization influence each other. In order to achieve comprehensive optimization, this paper adopts a linear weighting method to convert multi–objective functions into a single–objective function. Due to the different dimensions between the objective functions, normalization is required:
min O ( k ) = λ 1 · C total U ( k ) C uc U ( k ) λ 2 · R total A ( k ) C uc U ( k ) + λ 3 · D load ( k ) D uc ( k )
where, O ( k ) is the single objective function of the user subgroup k after multi–objective normalization. In order to highlight the advantages of the scheduling in this paper, the corresponding characteristics of unordered charging are taken as the normalized proportional objects. C uc U ( k ) is the purchase cost of electricity when the user subgroup k is unordered charging without agent. D uc ( k ) is the grid load value when the user subgroup k is unordered charging. λ 1 , λ 2 , and λ 3 are the weight coefficients of each objective function, respectively, indicating the degree of relative importance, meeting λ 1 + λ 2 + λ 3 = 1 , λ m > 0 ( m = 1 , 2 , 3 ) .

3. Results and Discussion

The deployment and application of smart contracts are mostly based on Ethereum, Hyperledger, and other blockchain development platforms. As a distributed ledger data architecture, blockchain technology is packaged at the bottom of the platform to support the embedding of smart contracts with various logics [23]. Based on the overall framework of smart contracts in blockchain, this example uses Matlab to verify the effectiveness and feasibility of the EVs into bidding mechanism under the realization of smart contracts. This mechanism illustrates the advantages of realizing the logic of the smart contracts designed in this paper.

3.1. The Example Data

Based on the statistical results of the 2017 national household travel survey [24], this paper extracts the starting time, ending time, and daily mileage of private cars in a day to study the random driving characteristics of EVs. Making the following assumptions:
  • The total number of cars is 1 million, and the penetration rate of EVs is 5%. All users participate in day–ahead market bidding through the V2G dispatching of agent. Specific EV parameters are shown in Table 1.
  • The ending and starting time of the user’s travel is taken as the starting and ending time of the schedule. EVs are charged once a day. Also, 15 min is one dispatching period, and 1 h is one electricity price period. Peak–valley time–of–use price without EV bidding is shown in Table 2. The range of charging price containing bidding of EV is shown in Table 3. Considering the cost of storage, transportation, and loss of energy, the discharging price range is 1.3 times of the charging price range [25].
  • According to the charging–discharging power, the agent pays CNY 0.5/(kW·h) for the unit discharging compensation. According to the charging–discharging depth of the EVs in this example, the unit loss cost of the battery is CNY 0.14/(kW·h) [26]. The unit energy storage and operation cost of the agent is CNY 0.1/(kW·h).
  • The profit sharing ratio given by agent to users is 0.1; the employment fee provided by the users to the agent is CNY 0.1/one vehicle/a day.
  • Since the smart contract relationship is based on the flexible charging–discharging resources, the optimal scheduling control based on the total load peak–cutting and valley–filling is particularly important. The weight coefficients of the three objective functions in the smart contracts between the users and the agent are λ1 = λ2 = 0.25, λ3 = 0.5: Objective functions of users and agent have the same importance; the target with the smallest load variance is the most important.
  • The power system units are composed of 10 thermal power units, and detailed parameters are shown in [27]. The base load of the grid excluding EVs is shown in Figure 3.

3.2. Results of Smart Contract between EV Users and Agent

The k–means clustering method is adopted to cluster 3 main clusters at the time when the users start scheduling and end scheduling. The final clustering centers are shown in Table 4. The number of main clusters accounts for 30%, 20%, and 50% of the total number, respectively.
The initial SOC of EVs is divided into four subclusters by the quartile method from low to high. Therefore, the whole EVs are divided into 12 user subgroups. Based on the travel rules of different users and different initial SOC, smart contracts are reached with the agent according to demands of subgroups. All four subclusters in main cluster 3 are taken as an example, and the contract charging–discharging volume reached at each moment is shown in Figure 4.
According to Figure 4, it describes the starting and ending moment of the charging–discharging schedule of the EVs on the whole. The charging–discharging scheduling period of this main cluster is about from 7:00 p.m. to 8:00 a.m. on the next day. Since this is an example by main cluster 3, its starting and ending scheduling moment are consistent with the final cluster results of main cluster 3, as shown in Table 4: Final cluster center of starting time of scheduling is 19.03 h, and final cluster center of ending time of scheduling is 7.60 h.
In specific analysis, charging period is mainly from the early morning to the time before starting travel, and discharging period is concentrated around 9:00 p.m. Due to the volume of residual power of each subcluster, the subcluster 1 has less residual power. So, it charges more but discharges less power. Subcluster 4, on the contrary, has the largest volume of electricity remaining and shows the opposite charging–discharging behavior. The analysis of the rest of the subclusters are similar and will not be repeated.

3.3. Results of Smart Contract between EV Agent and Power Dispatching Center

The charging–discharging volume and price reached by the agent and the power dispatching center at each moment are shown in Figure 5.
As can be seen from Figure 5, the agent mainly controls charging during the trough of periods of load and electricity price. The optimized contract charging price reduces the initial electricity price as a whole. Discharging control is mainly carried out in peak hours of load and electricity price. In particular, high contract discharging price is achieved in peak hours of load to obtain optimal discharging benefits.
Based on the result of contract price, the power grid load under price DRM by dispatching the EVs through the agent is shown in Figure 6. Unordered charging refers to charging immediately after the users arrive at the charging piles at random until the expected charging volume is reached. Orderly charging means that users do not charge when the electricity price is high, and charge when the electricity price is low, until the expected charging volume is reached. Moreover, there is no discharging scheduling for orderly charging.
As can be seen from Figure 6, in the case of unordered charging, users randomly charge according to their travel demands. This can lead to the phenomenon of ‘peak on peak’, and aggravate the burden of scheduling. In the case of orderly charging, the charging time is controlled in an orderly manner based on the electricity price. When participating in power grid interaction based on the scheduling strategy in this paper, it not only has a more obvious peak–cutting and valley–filling effect than orderly charging, but also has a certain power feedback during the peak load periods of the power grid. As a result, this can make the total load of the power grid smoother. Since the users and the agent first need to meet the driving demands in the daytime when they reach the smart contract, the effect of load peak–cutting in the daytime is not as good as that of filling in the valley at night. Especially in the afternoon, some users still carry out charging in the peak periods of electricity price and load to meet their own electricity demand.

3.4. Analysis of Economic Benefits of Market Subjects

The optimal interests of each market subject under different scheduling strategies are shown in Table 5.
As can be seen from Table 5, although the agent’s participation in the charging–discharging scheduling control increases the battery loss of users, the total cost of users is reduced on the whole. It is because of the economic regulation and DRM such as discharging compensation and profit sharing. At the same time, the agent also gains certain benefits through the price difference of electricity purchase–sale. The power grid company based on dispatching plan purchases the discharging volume from EVs in peak periods, which increases the cost of electricity purchasing. However, the flexible charging–discharging resources provide additional effective dispatching means for the unit commitment. This mechanism greatly reduces the expenses of startup and shutdown, and achieves the optimal cost of economic dispatching. In conclusion, the bidding trading mechanism designed in this paper effectively achieves a win–win situation among users, agent, and the power dispatching center.

4. Conclusions and Future Work

This paper introduces the blockchain technology into the bidding mechanism of EVs. This paper combines the distributed transaction on the chain with the centralized dispatching off the chain. Then, a win–win bidding mechanism among EV users, agent, and power dispatching center is established: Off the chain, the EVs classification layer and unit commitment layer interact with the information through DRM; on the chain, smart contracts are reached among market subjects considering their respective demands and interests. On the premise of eliminating the risk of third–party data storage, this mechanism can fully allocate EV charging–discharging resources to participate in market bidding. The distributed ledger of the blockchain guarantees tamper–proof, transparent, and traceable data. An example analysis shows that the results of contract price and volume under bidding can be used as a way of DRM. The result of the contract charging price reduces the price excluding charging–discharging of EVs by about CNY 0.07/(kW·h). For the economic benefits, the economic dispatching cost is about CNY 36 ten thousand and CNY 84 ten thousand less than that under the orderly and disordered strategy; the cost of purchasing power for users is about CNY 5 ten thousand and CNY 49 ten thousand yuan less than that under the orderly and disordered strategy; compared with other strategies, the agent can gain an additional profit of about CNY 13 ten thousand. In all, the results not only provide flexible and effective optimal scheduling for power grid peak–cutting and valley–filling, but also achieve economic win–win for all market subjects.
In the simulation implementation of this paper, only an example is used to verify the smart contract mechanism among market subjects. The mechanism proposed in this paper is not built in the real blockchain environment. The verification of blockchain in transaction efficiency, security, applicability, and other aspects needs to be further explored. Therefore, in the future work, it is worthwhile to further study the bidding and trading mechanism including V2G in the blockchain Ethereum, so as to expand the applicability of this mechanism.

Author Contributions

B.W. and W.L. contributed to paper writing and the whole revision process. M.W. built the simulation model and analyzed the data. W.S. helped organize the article. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China (51777058) and ‘Six talent peaks’ high–level project in Jiangsu province (xny–010).

Conflicts of Interest

The authors declare no conflict of interest.

Nomenclature

Constants:
Bcapacity of the battery
Δtlength of a scheduling period
T ev total number of scheduling hours in a day
rprofit sharing proportion that the agent gives to the users
λ 1 , λ 2 , λ 3 weight coefficients of each objective function respectively
Variables:
S need ( k , i ) the power demand SOC of the vehicle i in the user subgroup k
S exp , min , the minimum and maximum power demand SOC expected by the users
S exp , max
x ( k , i , t ) Charging–discharging state of the vehicle i in the user subgroup k in time period t
T s ( k , i ) the starting and ending scheduling time of the vehicle i in the user subgroup k
T e ( k , i )
S ( k , i , t ) SOC of the vehicle i in the user subgroup k at the end of time period t
p ch ( k , i , t ) , charging and discharging power of the vehicle i in the user subgroup k in period t
p dc ( k , i , t )
C buy AtoU ( k ) purchasing power cost from the agent for the user subgroup k
W ch ( t ) contract charging price within time period t
N k number of EVs in the user subgroup k
C loss U ( k ) battery loss cost of the user subgroup k
W loss ( t ) unit loss cost of the battery in time period t
p dch ( k , i , t ) charging or discharging power of the vehicle i in the user subgroup k in period t
C agent UtoA ( k ) cost of hiring agent for the user subgroup k
W agent dispatch hire fee that the users gives the agent per vehicle
R sell AtoG ( k ) agent’s revenue by discharging power into the grid through the user subgroup k
W dc ( t ) contract discharging price within time period t
C run A ( k ) energy storage and operation cost of agent for the user subgroup k
W run ( t ) unit cost of energy storage and operation of agent in time period t
C comp AtoU ( k ) agent’s discharging compensation fee for the user subgroup k
W comp ( t ) unit compensation cost of discharging within time period t
R total A ( k ) agent’s total revenue to the user subgroup k
C total U ( k ) total power purchase cost of the user subgroup k
R bonus AtoU ( k ) profit sharing that the agent gives to the user subgroup k
D load ( k ) grid load variance containing the user subgroup k
P base ( t ) load value of the basic power grid excluding EVs in time period t
P av average load value of the grid containing EVs in the total time period
C E cost of the whole power economic dispatching
C G unit commitment cost of the power system excluding EVs
C G unit commitment cost of the power system containing EVs
C buy AtoG ( k ) cost of grid company by purchasing discharging volume from the user subgroup k
R sell GtoA ( k ) revenue of grid company by selling charging volume to the user subgroup k
C G system total cost of the unit commitment
T uc total optimization time of the unit commitment
N G number of thermal power units involved in optimization
F j [ Y j ( t ) ] fuel cost function of the unit j
Y j ( t ) unit output of the unit j in the time period t
a j , b j , c j fuel cost coefficient of the unit j
S j startup cost of the unit j
T j Loff continuous outage time before starting unit j
T j Moff allowed minimum stop time of the unit j
T j cold cold start time of the unit j
I j ( t ) binary integer variable of the unit j in the on–off state during the time period t
P ch ( t ) , total charging and discharging loads of all EVs in time period t
P dc ( t )
Y j min ( t ) , the minimum and maximum output of unit j in the time period t
Y j max ( t )
Q ( t ) standby demand of the system in time period t
T j Aon ( t ) , cumulative startup and shutdown time of the unit j in time period t
T j Aoff ( t )
O ( k ) single objective function of the user subgroup k after multi–objective normalization
C uc U ( k ) purchasing cost of power when the user subgroup k is unordered charging
D uc ( k ) grid load value when the user subgroup k is unordered charging

References

  1. 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] [Green Version]
  2. Mwasilu, F.; Justo, J.J.; Kim, E.K.; Do, T.D.; Jung, J.W. Electric vehicles and smart grid interaction: A review on vehicle to gridand renewable energy sources integration. Renew. Sustain. Energy Rev. 2014, 34, 501–516. [Google Scholar] [CrossRef]
  3. Alladi, T.; Chamola, V.; Rodrigues, J.J.; Kozlov, S.A. Blockchain in smart grids: A review on different use cases. Sensors 2019, 19, 4862. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  4. 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] [Green Version]
  5. Habib, S.; Kamran, M.; Rashid, U. Impact analysis of vehicle-to-grid technology and charging strategiesof electric vehicles on distribution networks—A review. J. Power Sources 2015, 277, 205–214. [Google Scholar] [CrossRef]
  6. Kim, M.; Park, K.; Yu, S.; Lee, J.; Park, Y.; Lee, S.W.; Chung, B. A secure charging system for electric vehicles based on blockchain. Sensors 2019, 19, 3028. [Google Scholar] [CrossRef] [Green Version]
  7. Liu, W.J.; Chi, M.; Liu, Z.W.; Guan, Z.H.; Chen, J.; Xiao, J.W. Distributed optimal active power dispatch with energy storage units and power flow limits in smart grids. Int. J. Electr. Power Energy Syst. 2019, 105, 420–428. [Google Scholar] [CrossRef]
  8. Ahl, A.; Yarime, M.; Tanaka, K.; Sagawa, D. Review of blockchain-based distributed energy: Implications for institutional development. Renew. Sustain. Energy Rev. 2019, 107, 200–201. [Google Scholar] [CrossRef]
  9. Pop, C.; Cioara, T.; Antal, M.; Anghel, I.; Salomie, I.; Bertoncini, M. Blockchain based decentralized management of demand response programs in smart energy grids. Sensors 2018, 18, 162. [Google Scholar] [CrossRef] [Green Version]
  10. Van Cutsem, O.; Dac, D.H.; Boudou, P.; Kayal, M. Cooperative energy management of a community of smart-buildings: A blockchain approach. Int. J. Electr. Power Energy Syst. 2020, 117, 105643. [Google Scholar] [CrossRef]
  11. Pee, S.J.; Kang, E.S.; Song, J.G.; Jang, J.W. Blockchain based smart energy trading platform using smart contract. In Proceedings of the International Conference on Artificial Intelligence in Information and Communication, Okinawa, Japan, 11–13 February 2019; pp. 322–325. [Google Scholar]
  12. Liu, C.; Chai, K.K.; Zhang, X.; Lau, E.T.; Chen, Y. Adaptive Blockchain-based electric vehicle participation scheme in smart grid platform. IEEE Access 2018, 6, 25657–25665. [Google Scholar] [CrossRef]
  13. 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. [Google Scholar] [CrossRef]
  14. Vayá, M.G.; Andersson, G. Optimal bidding strategy of a plug-in electric vehicle aggregator in day-ahead electricity markets under uncertainty. IEEE Trans. Power Syst. 2015, 30, 2375–2385. [Google Scholar] [CrossRef]
  15. Shafie-Khah, M.; Heydarian-Forushani, E.; Golshan, M.E.H.; Siano, P.; Moghaddam, M.P.; Sheikh-El-Eslami, M.K.; Catalão, J.P.S. Optimal trading of plug-in electric vehicle aggregation agents in a market environment for sustainability. Appl. Energy 2016, 162, 601–612. [Google Scholar] [CrossRef]
  16. Apostolopoulos, P.A.; Tsiropoulou, E.E.; Papavassiliou, S. Demand response management in smart grid networks: A two-stage game-theoretic learning-based approach. Mob. Netw. Appl. 2018, 1–14. [Google Scholar] [CrossRef] [Green Version]
  17. Chai, B.; Chen, J.; Yang, Z.; Zhang, Y. Demand response management with multiple utility companies: A two-level game approach. IEEE Trans. Smart Grid 2014, 5, 722. [Google Scholar] [CrossRef]
  18. Wang, J.; Wang, Q.; Zhou, N.; Chi, Y. A novel electricity transaction mode of microgrids based on blockchain and continuous double auction. Energies 2017, 10, 1971. [Google Scholar] [CrossRef] [Green Version]
  19. Thomas, L.; Zhou, Y.; Long, C.; Wu, J.; Jenkins, N. A general form of smart contract for decentralized energy systems management. Nat. Energy 2019, 4, 140. [Google Scholar] [CrossRef]
  20. Giungato, P.; Rana, R.; Tarabella, A.; Tricase, C. Current trends in sustainability of bitcoins and related blockchain technology. Sustainability 2017, 9, 2214. [Google Scholar] [CrossRef] [Green Version]
  21. Zheng, J.; Wang, X.; Men, K.; Zhu, C.; Zhu, S. Aggregation model-based optimization for electric vehicle charging strategy. IEEE Trans. Smart Grid 2013, 4, 1058–1066. [Google Scholar] [CrossRef]
  22. He, X.; Rao, Y.; Huang, J. A novel algorithm for economic load dispatch of power systems. Neurocomputing 2016, 171, 1454–1461. [Google Scholar] [CrossRef]
  23. Christidis, K.; Devetsikiotis, M. Blockchains and smart contracts for the internet of things. IEEE Access 2016, 4, 2292–2303. [Google Scholar] [CrossRef]
  24. 2017 National Household Travel Survey. Available online: http://nhts.ornl.gov (accessed on 2 March 2018).
  25. Wu, C.; Mohsenian-Rad, H.; Huang, J. Vehicle-to-aggregator interaction game. IEEE Trans. Smart Grid 2012, 3, 434–442. [Google Scholar] [CrossRef]
  26. Peterson, S.B.; Apt, J.; Whitacre, J.F. Lithium-ion battery cell degradation resulting from realistic vehicle and vehicle-to-grid utilization. J. Power Sources 2010, 195, 2385–2392. [Google Scholar] [CrossRef]
  27. Wang, Y.; Yang, Z.; Mourshed, M.; Guo, Y.; Niu, Q.; Zhu, X. Demand side management of plug-in electric vehicles and coordinated unit commitment: A novel parallel competitive swarm optimization method. Energy Convers. Manag. 2019, 196, 935–949. [Google Scholar] [CrossRef] [Green Version]
Figure 1. Bidding transaction framework for electric vehicles (EVs) under smart contract.
Figure 1. Bidding transaction framework for electric vehicles (EVs) under smart contract.
Energies 13 00390 g001
Figure 2. Solution flow of smart contract models.
Figure 2. Solution flow of smart contract models.
Energies 13 00390 g002
Figure 3. Base load curve of grid.
Figure 3. Base load curve of grid.
Energies 13 00390 g003
Figure 4. Contract volume reached among all the subclusters of main cluster 3.
Figure 4. Contract volume reached among all the subclusters of main cluster 3.
Energies 13 00390 g004
Figure 5. Contract results reached by market subjects. (a) results of contract volume; (b) results of contract price.
Figure 5. Contract results reached by market subjects. (a) results of contract volume; (b) results of contract price.
Energies 13 00390 g005
Figure 6. Total grid load.
Figure 6. Total grid load.
Energies 13 00390 g006
Table 1. Relevant parameters of EVs.
Table 1. Relevant parameters of EVs.
Initial SOCExpected SOCPower of Charging and Discharging/kWBattery Capacity/(kW·h)
N(0.3, 0.42)0.9~17.536
Table 2. Electricity price without bidding of EVs.
Table 2. Electricity price without bidding of EVs.
TypePeriodInitial Price/(CNY/(kW·h))
Peak8:00–12:00, 17:00–21:001.082
Ordinary12:00–17:00, 21:00–24:000.687
Valley0:00–8:000.365
Table 3. Optimization range of charging electricity price.
Table 3. Optimization range of charging electricity price.
TypeCeil of Charging Price/(CNY/(kW·h))Floor of Charging Price/(CNY/(kW·h))
Peak1.20.9
Ordinary0.50.3
Valley0.80.6
Table 4. Final cluster centers of EV aggregation.
Table 4. Final cluster centers of EV aggregation.
Cluster IndexEnding Time of Scheduling/hStarting Time of Scheduling/h
Main Cluster19.0413.32
Main Cluster214.0418.75
Main Cluster37.6019.03
Table 5. Optimal interests of each market subject.
Table 5. Optimal interests of each market subject.
Scheduling StrategyCost of Economic Dispatching/CNY Ten ThousandCost of User Battery Loss/CNY Ten ThousandTotal Cost of User/CNY Ten ThousandTotal Revenue of Agent/CNY Ten Thousand
Strategy of This Paper76.0239.95108.5013.26
Orderly Charging112.2722.88113.430
Disordered Charging160.5522.88157.480

Share and Cite

MDPI and ACS Style

Wang, B.; Liu, W.; Wang, M.; Shen, W. Research on Bidding Mechanism for Power Grid with Electric Vehicles Based on Smart Contract Technology. Energies 2020, 13, 390. https://doi.org/10.3390/en13020390

AMA Style

Wang B, Liu W, Wang M, Shen W. Research on Bidding Mechanism for Power Grid with Electric Vehicles Based on Smart Contract Technology. Energies. 2020; 13(2):390. https://doi.org/10.3390/en13020390

Chicago/Turabian Style

Wang, Bing, Weiyang Liu, Min Wang, and Wangping Shen. 2020. "Research on Bidding Mechanism for Power Grid with Electric Vehicles Based on Smart Contract Technology" Energies 13, no. 2: 390. https://doi.org/10.3390/en13020390

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