A Secure Charging Scheme for Electric VehiclesWith Smart Communities in Energy Blockchain

IEEE INTERNET OF THINGS JOURNAL, VOL. 6, NO. 3, JUNE 2019

Summary

As an important part of the Internet of Energy (IoE), smart communities (SCs) can facilitate the integration of distributed renewable energy and electric vehicles (EVs) in smart grids. However, due to the potential security and privacy issues brought about by untrusted and opaque energy markets, how to optimally dispatch the charging behavior of EVs with different energy consumption preferences in SC becomes a great challenge.

In this paper, we propose a contract-based energy blockchain for secure charging of EVs in SC.

  • First, a permissioned energy blockchain system is introduced to enable safe charging services for electric vehicles by executing smart contracts.
  • Second, a hypothesis-based Delegated Byzantine Fault Tolerant Consensus (DBFT) algorithm is proposed to efficiently achieve consensus in blockchains.
  • Third, based on the contract theory, the optimal contract is analyzed and designed to meet the individual energy demands of electric vehicles while maximizing the operator's utility.
  • In addition, a new energy allocation mechanism is proposed to allocate limited renewable energy to electric vehicles.
  • Finally, extensive numerical calculations are performed to evaluate and demonstrate the effectiveness and efficiency of the proposed scheme by comparing it with other conventional schemes.

Keywords: contract theory, electric vehicles, energy blockchain, energy internet, smart community.

introduce

The great potential of renewable energy sources (RES) and electric vehicles (EVs) to alleviate the fossil fuel crisis and reduce gas emissions has attracted worldwide attention.

To integrate and coordinate a large number of distributed RES and EVs, the Internet of Energy (IoE) has emerged as a promising innovative approach to improve energy efficiency and sustainability.

Furthermore, a smart community (SC) equipped with RES can be regarded as an important part of IoE, which can realize internal energy generation, storage, and distribution, and can perform energy exchange with external energy entities, such as power grids and electric vehicles. In SC, it is preferable to use a distributed RES to charge a fleet of EVs in a cost-effective manner.

A microgrid is a small-scale power system powered by distributed renewable energy (such as solar, wind, hydropower, etc.), which has been proven to be a feasible and effective strategy for integrating locally available renewable energy into a smart grid. In a SC integrated with a microgrid, it allows energy suppliers and consumers to trade energy directly. This local electricity trading not only reduces power loss during transmission, but also reduces the burden on the grid. Therefore, SC's EV charging framework involves three energy parties , namely the grid, microgrid, and EVs.

Existing problems:

  • Most of the literature only considers the two-way interaction between EVs and microgrids or grids, which cannot be directly applied to the charging management of EVs in SC.
  • EV users have different charging preferences for various energy sources (clean energy, conventional energy, or a mix of both) in SC. (Therefore, we need both the grid to provide traditional energy and Weidian.com to provide clean energy)

Malicious operators in the energy market will seriously threaten the safety and privacy of electric vehicles through various malicious means, such as privacy disclosure, forgery, node invasion, advertising fraud charging services, etc. Blockchain provides a unique technology for secure energy transactions without trusted agents in a distributed network through the use of immutable ledgers, cryptocurrencies, and the execution of smart contracts . However, the widely used Proof-of-Work consensus protocol wastes a lot of effort and is slow to confirm transactions in traditional blockchain applications such as Bitcoin. Therefore, it is not suitable for permissioned energy blockchains. Therefore, addressing the safety issue of EV charging remains an open and important issue.

In this paper, to address the above issues, we develop a contract theory-based EV charging scheme in SC that is secured by permissioned blockchain technology.

  • First, by introducing a new permissioned energy blockchain system in SC, pre-selected EVs can publicly audit and share transaction records without relying on trusted intermediaries.
  • Subsequently, a reputation-based Delegated Byzantine Fault Tolerance (DBFT) consensus algorithm is proposed to efficiently reach consensus in a blockchain of permissioned energy blocks.
  • In addition, based on the contract theory, the monopoly operator analyzes and designs the optimal contract to meet the individual energy demand preference of electric vehicles.
  • Finally, a novel energy allocation mechanism is proposed to allocate limited renewable energy to EVs while maximizing operator utility.

contribute

  • First, based on permissioned blockchain technology, we propose a framework for safe electric vehicle charging in an energy blockchain system for smart communities, where pre-selected EVs can be publicly audited and share transaction records without relying on a trusted intermediary . To reduce the cost of building blockchains in energy-constrained EVs, we propose a reputation-based consensus algorithm called DBFT .
  • Second, we use the contract game model to simulate the decision-making process between integrators and EVs under the condition of information asymmetry. In our proposed contract game, the aggregator designs a menu of contracts containing trading strategies for all types of electric vehicles. Within our framework, EVs can choose conventional energy sources, clean energy sources, or a blend of both to meet their individual energy preferences while maximizing utility for the operator .
  • Third, we propose a dynamic optimal contract allocation and energy allocation algorithm to achieve optimal always satisfied" question. We conduct extensive simulation experiments to verify the effectiveness and efficiency of the proposed scheme. Compared with traditional schemes, our scheme can improve the utility of operators and electric vehicles.

related work

A. Smart Community

B. Energy blockchain

C. EV Charging Scheduling

system model

system model

A. Network Model

  1. EV Electricity Retailer (Aggregator): Electricity retailers can source energy from the grid and local microgrids (i.e. photovoltaic (PV) systems). On the one hand, it manages the solar panels and sells the collected solar energy to electric vehicles. On the other hand, it buys energy from the grid at a unit price and sells conventional energy to electric vehicles.
  2. Electric vehicles (EVs): As energy consumers, they have different energy consumption preferences (for example, energy can be purchased from the grid or PV system, or energy can be purchased from the hybrid system of SC), and electric vehicles are expressed as L = ( 1 , . . . i , . . . I ) L = (1,...i,...I)L=(1,...i,... I ) , the definitionθ i θ_iiifor electric vehicles iii 's energy consumption preference, corresponding toΘ = ( θ 1 , θ 2 , . . . θ I ) \Theta=(θ_1,θ_2,...θ_I)Th=( i1,i2,... iI)
  3. Smart Meters: A built-in smart meter in every EV records energy consumption to verify that transactions have been completed and thereby authorize payments.
  4. Microgrid: A photovoltaic (PV) system acts as SC's local microgrid, consisting of multiple solar panels installed on the roofs of community buildings.

B. Utility function

The monopoly operator provides consumers with a set of energy { x ( θ i ) ∈ Ω } \{ x(\theta_i)\in \Omega\}{ x ( ii)Ω } and the corresponding price{ π ( θ i ) ∈ Π } \{ \pi(\theta_i)\in \Pi\}{ p ( ii)Π } , the set of contract items consisting of energy and price is defined as:Ψ = { ( x ( θ i ) , π ( θ i ) ) ∣ ∀ θ i ∈ Θ } \Psi=\{(x(\theta_i), \pi(\theta_i))|\forall \theta_i \in \Theta\}Ps={( x ( ii),p ( ii))∣∀θiΘ } .

Obviously, the energy demand of electric vehicles can neither be negative nor infinite, namely: Ω = { x ( θ i ) ∣ 0 ≤ x ( θ i ) ≤ ( C i / η i ) } \Omega=\{ x(\theta_i)|0\leq x(\theta_i) \leq (C_i/\eta_i)\}Oh={ x ( ii)∣0x ( ii)(Ci/ ni)},thisriηi \eta_itheiDisplay EV iiCharging efficiency of i , C i C_iCiDisplay EV iii capacity. In addition, electric vehicles can decide whether to buy electricity from retailers, ifx ( θ i ) = 0 x(\theta_i) = 0x ( ii)=0 means no purchase, and no price will be charged.

In the energy market, the utility function of an electric vehicle should be a concave function of its energy demand, not a decreasing function. If EV iiFor iSelection 's agreement item( x ( θ i ) , π ( θ i ) ) (x(\theta_i),\pi(\theta_i))( x ( ii),p ( ii)) , a functional function that can be used for a specific purpose: U ( θ i , x ( θ i ) ) = V ( θ i , x ( θ i ) ) − π ( θ i ) (3) U(\theta_i,x (\theta_i)) = V(\theta_i,x(\theta_i)) - \pi(\theta_i) \tag{3}U ( ii,x ( ii))=V(θi,x ( ii))p ( ii)( 3 )
Among them,V ( θ i , x ( θ i ) ) V(\theta_i,x(\theta_i))V(θi,x ( ii))是EViii Satisfaction coefficient obtained from energy consumption.

Based on the papers [31, 47, 48], the natural log function is now widely accepted in utility modeling of energy buyers. Therefore, we use a logarithmic function to model the relationship between electric vehicle satisfaction and demand, including clean energy demand and conventional energy demand, as shown in the paper [49]: V ( θ i , x ( θ i ) ) = α ln [ 1 + ω θ ix ( θ i ) + ω 0 ( 1 − θ i ) x ( θ i ) ] (4) V(θ_i,x(θ_i))=αln[1+ωθ_ix(θ_i)+ω_0 (1−θ_i)x(θ_i)] \tag{4}V(θi,x ( ii))=αln[1+oh iix ( ii)+oh0(1ii) x ( ii)]( 4 )
式中,a aα is a non-negative satisfaction coefficient,ω ωω is an environmental friendliness coefficient representing the cleanliness of renewable energy generation, andω 0 ω_0oh0Indicates the cleanliness of traditional fossil energy. In general, assume ω > ω 0 > 0 ω>ω_0>0oh>oh0>0。 easy to read( [ ∂ V ( θ i , x ( θ i ) ) ] / ∂ θ i ) ≥ 0 , ( [ ∂ V ( θ i , x ( θ i ) ) ] / ∂ x ( θ i ) > 0 ([∂V(θ_i,x(θ_i))]/∂θ_i)≥0,([∂V(θ_i,x(θ_i))]/∂x(θ_i)>0([ V ( ii, x ( ii))]/θi)0,([ V ( ii, x ( ii))] / x ( ii)>0,以及 ( [ ∂ 2 V ( θ i , x ( θ i ) ) ] / ∂ x ( θ i ) 2 ) < 0 ([∂^2V(θ_i,x(θ_i))]/∂x(θ_i)^2)<0 ([2 V(ii, x ( ii))] / x ( ii)2)<0 . If utility is negative, EViii will select contract term( x ( θ i ) = 0 , π ( θ i ) = 0 ) (x(θ_i)=0, π(θ_i)=0)x ( ii)=0 p ( ii)=0 ) . 很明显,V ( θ i , 0 ) = 0 , U ( θ i , 0 ) = 0 V(θ_i, 0)=0, U(θ_i, 0)=0V(θi0)=0 U ( ii0)=0

Here, we will R ( x ( θ i ) ) R(x(θ_i))R ( x ( ii)) is defined as from EViii 's agreement( x ( θ i ) , π ( θ i ) ) (x(\theta_i),\pi(\theta_i))( x ( ii),p ( ii)) The utility of the electricity retailer obtained in . We have: R ( x ( θ i ) ) = π ( θ i ) − C ( θ i , x ( θ i ) ) (5) R(x(θ_i))=π(θ_i)−C(θ_i,x (θ_i)) \tag{5}R ( x ( ii))=p ( ii)C ( ii,x ( ii))( 5 ) Obviously, the retailer will not accept the negative impact, that is to say, satisfy:Π = { π ( θ i ) ∣ π ( θ i ) ≥ C ( θ i , x ( θ i ) ) } \Pi=\{ π(θ_i)|π(θ_i)≥C(θ_i,x(θ_i))\}Pi={ p ( ii) π ( ii)C ( ii,x ( ii))}

The cost function consists of the cost of generating electricity, the cost of purchasing electricity from the grid, and the subsidies provided by the government, which can be expressed as: C ( θ i , x ( θ i ) ) = ( cpv − rpv ) θ ix ( θ i ) + pg ( 1 − θ i ) x ( θ i ) + c 0 (6) C(θ_i,x(θ_i))=(c_{pv}−r_{pv})θ_ix(θ_i)+p_g(1−θ_i)x(θ_i )+c_0 \tag{6}C ( ii,x ( ii))=(cpvrpv) iix ( ii)+pg(1ii) x ( ii)+c0( 6 ) wherecpv c_{pv}cpvand rpv r_{pv}rpvare the unit cost and unit subsidy for generating electricity from solar panels, respectively. c 0 > 0 c_0>0c0>0 is a fixed cost, mainly including transaction costs, storage costs, etc. In general, we assume that0 ≤ cpv − rpv ≤ pg 0≤c_{pv}-r_{pv}≤p_g0cpvrpvpg, which means that the final unit cost of renewable energy power generation does not exceed the electricity market price of the grid. Then we can get ( [ ∂ C ( θ i , x ( θ i ) ) ] / ∂ θ i ) ≤ 0 , ( [ ∂ C ( θ i , x ( θ i ) ) ] / ∂ x ( θ i ) ≥ 0 ([∂C(θ_i, x(θ_i))]/∂θ_i)≤0, ([∂C(θ_i, x(θ_i))]/∂x(θ_i)≥0([ C ( ii, x ( ii))]/θi)0,([ C ( ii, x ( ii))] / x ( ii)0,and( [ ∂ 2 C ( θ i , x ( θ i ) ) ] / ∂ x ( θ i ) 2 ) = 0 ([∂^2C(θ_i,x(θ_i))]/∂x(θ_i) ^2)=0([2 C(ii, x ( ii))] / x ( ii)2)=0 , so for electricity retailers, all utility functions can be written as: R = ∑ i = 1 I τ θ i ( π ( θ i ) − C ( θ i , x ( θ i ) ) ) (7) R= \sum_{i=1}^I\tau_{θ_i}(π(θ_i)−C(θ_i,x(θ_i))) \tag{7}R=i=1Itii( p ( ii)C ( ii,x ( ii)))( 7 )
Among them:τ θ i \tau_{θ_i}tiiThe representation type is θ i {θ_i}iiThe ratio of the number of EVs to the total number of EVs. We further define the social surplus of energy transactions between a retailer and a specific electric vehicle as the sum of the two utilities: S ( θ i , x ( θ i ) ) = R ( x ( θ i ) ) + U ( θ i , x ( θ i ) ) = V ( θ i , x ( θ i ) ) − C ( θ i , x ( θ i ) ) (8) S(θ_i,x(θ_i))=R(x(θ_i) )+U(θ_i,x(θ_i))=V(θ_i,x(θ_i))−C(θ_i,x(θ_i)) \tag{8}S ( ii,x ( ii))=R ( x ( ii))+U ( ii,x ( ii))=V(θi,x ( ii))C ( ii,x ( ii))( 8 ) According to (4) and (6), we can get:( [ ∂ 2 S ( θ i , x ( θ i ) ) ] / ∂ x ( θ i ) 2 ) < 0 ([∂^2S(θ_i, x(θ_i))]/∂x(θ_i)^2)<0([2S(θi,x ( ii))] / x ( ii)2)<0 , Same as the energy market holistic society surplus: S = ∑ i = 1 I τ θ i ( V ( θ i , x ( θ i ) ) − C ( θ i , x ( θ i ) ) ) (9 ) S=\sum_{i=1}^I\tau_{θ_i}(V(θ_i,x(θ_i))−C(θ_i,x(θ_i))) \tag{9}S=i=1Itii(V(θi,x ( ii))C ( ii,x ( ii)))( 9 ) For the sake of simplicity, in the following content,τ θ i , N θ i , x ( θ i ) , π ( θ i ) τ_{θ_i},N_{θ_i},x(θ_i),π (θ_i)tii,Nii,x ( ii),p ( ii)改成 τ i , N i , x i , π i τ_i,N_i,x_i, π_i ti,Ni,xi,Pii

C. Attack Model

  1. Malicious Energy Providers: Fraudulent fee-for-service advertising the lack of solar power.
  2. Malicious energy consumers: EVs refuse to pay.
  3. Malicious trusted third parties: may leak the privacy of electric vehicles, and may tamper with the reputation value of electric vehicles for profit.

Energy blockchain

A. Smart contracts

In the context of a blockchain, a smart contract is a set of digital commitments that reside on the blockchain and are agreed to by all contract participants. Smart contracts allow trusted transactions to be automatically executed in a prescribed manner between different anonymous parties without a third party. Algorithm 1 gives a detailed overview of the smart contract implementation:
Smart contract implementation algorithm

  1. Init(): System initialization. After registration with a trusted authority, EV iii will get the certificateC eri Cer_iCeri, bind the unique ID i ID_iIDiand license number p N umi pNum_ipN u mi, join the blockchain network, and get the public/private key pair ( PK i , SK i PK_i,SK_iPKi,SKi) and wallet address addressi address_iaddressi. Each EV account contains: wallet address addressi address_iaddressi, account balance balancei balance_ibalancei, the current credit value cri cr_icri, reputation value R ei Re_iRei, certificate C eri Cer_iCeriand a public/private key pair ( PK i , SK i PK_i,SK_iPKi,SKi). (using asymmetric encryption technology)
  2. Create(): After the retailer and the vehicle EV i respectively agree on the contract item and sign it with their private keys, the create() function will deploy the new smart contract to the blockchain. After a consensus is reached in the blockchain network, the smart contract will be successfully deployed, and each smart contract will maintain a set of state variables, including: the account addresses of the seller and the buyer ( accounts , accounti account_s, account_iaccounts,accounti), energy demand xi x_ixi, the corresponding payment π i \pi_iPii, transaction time t T ime tTimetT im e , time stampt S tamp tStamptSt am p and fine pricep P rice pPricepPrice
  3. Invoke(): The Invoke function is called after consensus is reached. Once t >= t T ime t>=tTimet>=At tT im e , the contract is automatically executed, and energy transactions and financial settlements are performed. The smart contract will read the smart meter of selling and buying a house (ms , mi m_s,m_ims,mi), to verify the power generation and power consumption respectively. The Penalty function implements the necessary penalty. Subsequently, the system will periodically update the state ledger of the blockchain, such as: the balance in the buyer's account, the remaining energy in the seller's account, and the state variables in the smart contract.

The charging process is simplified as follows:

  • EV enters into new smart contracts with aggregators through the energy blockchain network.
  • The EV will navigate to a charging station in SC and wait to be charged.
  • Once the transaction conditions are met, the smart contract will be automatically executed, and the corresponding energy and cryptocurrency will be exchanged between buyers and sellers in a prescribed manner.

B. Consensus Process

To ensure that each node has a copy of an identified version of the entire ledger, a public audit, the consensus process , should be performed . Based on [52], a hypothesis-based DBFT consensus algorithm is proposed in Algorithm 2 to efficiently reach consensus in the energy block chain. The consensus process needs to go through the following steps:

1. Leader Election: EVs have two types of roles in the V2V network: ordinary nodes and consensus nodes. Each node can vote to elect a representative (consensus node), and the weight of the vote is based on its chips (reputation value). Select the top M representatives by voting, expressed as [ 1 , . . . m , . . . M ] [1,...m,...M][1,...m,... M ] , based on [52], assumingM >= 3 f + 1 M>=3f+1M>=3f _+1 , wherefff is the maximum number of malicious nodes in the V2V network. The leader p is determined according to the following formula: p = ( h − v ) mod M + 1 p = (hv) \,mod\, M + 1p=(hv)modM+1 h is the current block height, v is the index of the view, and v initialization starts from 0.
2. Building Block Concurrently:
insert image description here
The detailed process is shown in step 3-17. Qm is the transaction set, Sm is the state set, tx is a transaction record, and Stx is the state changed after executing the smart contract specified by transaction tx. Bm is a local block created by node m, verifyTx (tx) is used to verify the validity of transaction tx, simulate (tx) is used to simulate the execution of the smart contract specified by transaction tx, buildBlock (Qm, Sm) passes the transaction set Qm and The state set Sm builds the local block.

When a smart contract is signed between EV and retailer, EV will broadcast it to the network. All consensus nodes collect all transactions for a certain period of time and verify each transaction individually before relaying them. And transactions with invalid verification will be discarded. The consensus node then simulates the execution of the smart contract and records the changed state separately into its local state ledger.

All valid transactions are collected by each consensus node within a certain period of time, sorted by timestamp, and packaged into blocks concurrently . Each block contains a cryptographic hash to the previous block. After all non-leader consensus nodes have completed this process, the delegated leader broadcasts the ProposalMsg in step 16 and sends its candidate block to other consensus nodes.

Compared with the sequential model [53] (the leader constructs candidate blocks first, and then other consensus nodes construct their local blocks), the concurrency model proposed in this paper, in which consensus nodes construct local blocks in parallel, can significantly shorten the time to verify candidate blocks .

三、Verifying Candidate Block

insert image description here
The detailed process is shown in steps 18-42, where S p S_pSpis the state set of the receiving block, verifyBlock(B) is used to verify the validity of the receiving block, and getState(B) is used to obtain the state from the receiving block.

Each non-leader consensus node will compare the local state set with the state set of the accepted block. If the verification is passed, each non-leader consensus node will bring its own signature in step 25 and broadcast the confirmMsg to the network middle. Otherwise, a view change will be triggered, and then the non-leader consensus node will broadcast changeviewMsg in step 34. Once any consensus node receives at least M − f MfMf identicalvk v_kvk, then this round of view change is completed, and the next round of consensus process starts. If the consensus node m suspects that the message received from the leader p will also trigger a view change, the credit value of the consensus node and the current leader will be changed in step 36 respectively.

四、Publishing New Block

Any consensus node, in Δ T 1 \Delta T_1ΔT1received no less than M − f M−fMAfter f confirmation messages from different consensus nodes, a consensus will be reached and a new block will be published. Then, the credit value of each consensus node m and the leader p' that finally generates the block will increase byΔ 1 \Delta_1D1Δ 2 \Delta_2D2. After consensus is reached, new blocks are added to the blockchain in a linear and chronological order, containing the cryptographic hash of the previous block. Any node will synchronize its local copy of the blockchain with new blocks and prepare it for the next round of the consensus process.

According to [52], we propose the rule f = ⌊ ( M − 1 ) / 3 ⌋ f=\left\lfloor(M-1)/3 \right\rfloorf=(M1 ) /3 Fault tolerance for systems containing M consensus nodes.

Through the execution of smart contracts, the transaction process, i.e. the exchange of energy and cryptocurrencies, can be carried out automatically and securely in a trustless energy market. If a malicious retailer publishes a fraudulent fee-for-service advertisement without sufficient RES, it will be punished accordingly according to the smart contract. Additionally, each transaction is recorded in an identifiable ledger in the blockchain.

In the energy blockchain system, all reputation values ​​are recorded in the blockchain instead of a centralized trust center.

  • On the one hand, due to the huge cost, it is difficult to compare all the consensus nodes in the blockchain network to tamper with the current reputation value.
  • On the other hand, since each block is connected to the previous block hash chain, the historical reputation value and transactions in each block are unforgeable.

Best Contract Design

In this section, based on contract theory, we analyze the optimal contract between the integrator and each EV in Section IV.A to maximize the utility of both parties. First, we propose the feasibility of the contract. Then the optimal contract is analyzed. Finally, the energy allocation mechanism in the limited energy trading market is designed.

A. Contract making

According to the revelation principle proposed in [54]: Feasible contracts refer to: each electric vehicle with special preferences can choose corresponding contract items according to its own type to maximize its utility.
According to the contract theory proposed by [55], a feasible contract refers to: all types of electric vehicles satisfy the following two constraints at the same time:

  • Individual rationality ( IR ) constraints, the type is θ i \theta_iiiThe EV by selecting the contract item ( xi , π i ) (x_i, \pi_i)(xi,Pii) for a non-negligible effect. α ln [ 1 + ( w θ i + w 0 ( 1 − θ i ) ) xi ] − π i ≥ 0 ∀ θ i ∈ Θ (15) \alpha ln[1+(w\theta_i+w_0(1-\ theta_i))x_i]-\pi_i\geq0\,\,\,\,\,\forall\,\theta_i\in\Theta\ \tag{15}αln[1+(wθi+w0(1ii))xi]Pii0iiTh (15)
  • Incentive compatibility ( IC ) constraints, compared to the type θ j \theta_jijThe corresponding contract item, the type is θ i \theta_iiiThe EV prefers to choose the type θ i \theta_iiiThe infinitesimal function α ln [ 1 + ( w θ i + w 0 ( 1 − θ i ) ) xi ] − π i ≥ α ln [ 1 + ( w θ i + w 0 ( 1 − θ i ) ) xj ] − π j ∀ θ j ≠ θ i (16) \alpha ln[1+(w\theta_i+w_0(1-\theta_i))x_i]-\pi_i\geq \alpha ln[1+(w\theta_i+ w_0(1-\theta_i))x_j]-\pi_j \,\,\,\,\,\forall\,\theta_j\ne\theta_i \tag{16}αln[1+(wθi+w0(1ii))xi]Piiαln[1+(wθi+w0(1ii))xj]Pijij=ii(16)

Therefore, as a contract designer, the electricity retailer establishes optimal contracts for all types of EVs to maximize their utility.

insert image description here

B. Feasibility of the contract

C. Optimizing the contract

D. Energy distribution

We assume that in the optimal contract, the total amount of RES available for electric vehicle charging is sufficient, that is, E res ≥ ∑ i = 1 IN i θ ixi ∗ E_{res}≥∑^I_{i=1}N_iθ_ix^∗_iEresi=1INiiixi, where E is the total available solar energy required for EV charging. However, in practical applications, solar power generation in SC is always limited, that is, E res < ∑ i = 1 IN i θ ixi ∗ E_{res}<∑^I_{i=1}N_iθ_ix^∗_iEres<i=1INiiixi, especially for systems with a large number of EVs. Therefore, an appropriate energy allocation scheme should be designed to efficiently allocate limited renewable energy to EVs.

Here, each type is θ i \theta_iiiThe EV will choose the optimal contract ( xi ∗ , π i ∗ ) (x^*_i,\pi^*_i) designed by the electricity retailer(xi,Pii) , according to (5), by selling energyxi ∗ x^*_ixiTo realize the retailer’s utility: R ( xi ∗ ) = π i ∗ − C ( θ i , xi ∗ ) R(x^∗_i)=π^∗_i−C(θ_i,x^∗_i)R(xi)=PiiC ( ii,xi) we willxi ^ \hat{x_i}xi^Defined as θ_i of type θiiiThe social optimal energy demand of , namely: xi ^ = argmaxxi S ( θ i , xi ) \hat{x_i} = argmax_{x_i}S(θ_i,x_i)xi^=argmaxxiS ( ii,xi),而 S ( θ i , x i ) S(θ_i,x_i) S ( ii,xi) is the social surplus defined in (8), andxi ^ \hat{x_i}xi^can pass S to xi x_ixi求一阶最优性条件获得: ( [ ∂ S ( θ i , x i ) ] / ∂ x i ) = ( [ ∂ V ( θ i , x i ) ] / ∂ x i ) − ( [ ∂ C ( θ i , x i ) ] / ∂ x i ) = 0 ([∂S(θ_i,x_i)]/∂x_i)=([∂V(θ_i,x_i)]/∂x_i)−([∂C(θ_i,x_i)]/∂x_i)=0 ([ S ( ii,xi)]/xi)=([ V ( ii,xi)]/xi)([ C ( ii,xi)]/xi)=0 . Here, both the retailer and the EV are selfish and rational, so neither may adopt the socially optimal needs. However, the maximum social surplus provides an upper limit for the sum of utilities for both parties. The retailer’s utility difference from EV i+1 and EV i can be described as:
R ( xi + 1 ∗ ) − R ( xi ∗ ) = π i + 1 ∗ − π i ∗ − C ( θ i + 1 , xi + 1 ∗ ) + C ( θ i , xi ∗ ) = V ( θ i + 1 , xi + 1 ∗ ) − V ( θ i + 1 , xi ∗ ) − C ( θ i + 1 , xi + 1 ∗ ) + C ( θ i , xi ∗ ) = S ( θ i + 1 , xi + 1 ∗ ) − S ( θ i + 1 , xi ∗ ) + C ( θ i , xi ∗ ) − C ( θ i + 1 , xi ∗ ) \begin{equation*} \begin{aligned} R(x^∗_{i+1})−R(x^∗_i) &=π^∗_{i+1 }−π^∗_i−C(θ_{i+1},x^∗_{i+1})+C(θ_i,x^∗_i) \\ &=V(θ_{i+1},x ^∗_{i+1})−V(θ_{i+1},x^∗_i)−C(θ_{i+1},x^∗_{i+1})+C(θ_i,x ^∗_i) \\ & =S(θ_{i+1},x^∗_{i+1})−S(θ_{i+1},x^∗_i)+C(θ_i,x^∗ _i)−C(θ_{i+1},x^∗_i) \end{aligned} \end{equation*}R(xi+1)R(xi)=Pii+1PiiC ( ii+1,xi+1)+C ( ii,xi)=V(θi+1,xi+1)V(θi+1,xi)C ( ii+1,xi+1)+C ( ii,xi)=S ( ii+1,xi+1)S ( ii+1,xi)+C ( ii,xi)C ( ii+1,xi)
After analysis, it is obtained that R ( xi + 1 ∗ ) ≥ R ( xi ∗ ) R(x^∗_{i+1})\geq R(x^∗_i)R(xi+1)R(xi) , which means that in the optimal contract, the retailer can obtain higher utility from EVs with higher types. That is, retailers can maximize their utility by selling renewable energy to higher types of electric vehicles in a limited energy trading market.

We define θ c ∈ Θ \theta_c\in\ThetaicΘ works satisfactorily∑ i = c IN i θ ixi ∗ ≥ E res ∑^I_{i=c}N_iθ_ix^∗_i≥E_{res}i=cINiiixiEres ∑ i = c + 1 I N i θ i x i ∗ < E r e s ∑^I_{i=c+1}N_iθ_ix^∗_i<E_{res} i=c+1INiiixi<Erescritical type. Retailers will sell limited RES to critical types of EVs, so in limited energy transactions, the optimal contract is given by:
( x ~ i , π ~ i ) = { ( 0 , 0 ) , if θ i < θ c ( xi ∗ , π i ∗ ) , if θ i ≥ θ c (51) (\tilde{x}_i, \tilde{\pi}_i) = \begin{cases} (0,0 )&,if &θ_i < θ_c\\ (x^*_i,\pi^*_i)&,if&θ_i \geq θ_c \end{cases} \tag{51}(x~i,Pi~i)={ (0,0)(xi,Pii),if,ifii<iciiic( 51 )
Obviously, the set of electric vehicle types for limited energy transactions is:Θ ~ = { θ c , θ c + 1 , . . . , θ I } \tilde{\Theta} = \{θ_c,θ_{c+ 1},...,θ_I\}Th~={ ic,ic+1,...,iI} . There must be a part of electric vehicles that cannot obtain energy from the retailer, so the overall utility of the retailer will no longer use (7), but is as follows:
R ~ = ∑ θ i ∈ Θ ~ τ θ i ( π i ∗ − C ( θ i , xi ∗ ) ) (52) \tilde{R}=\sum_{\theta_i\in\tilde{\Theta}}\tau_{θ_i}(\pi^*_i-C(\theta_i,x^ *_i)) \tag{52}R~=iiTh~tii( piC ( ii,xi))( 52 )
Here, a dynamic optimal contract allocation and energy allocation algorithm is proposed to obtain the optimal contract in the limited energy trading market, as shown in steps 12-14 in Algorithm 3.

insert image description here

performance evaluation

A. Simulation configuration

We consider a scenario where an electricity retailer offers a viable contract for 100 electric vehicles in a community. The upper and lower bounds of EV types are set to 1 and 0, respectively. Additional parameters are listed in Table I.

insert image description here

B. Simulation Results

insert image description here
Figures 2 and 3 show the optimal demand and price for various environmental friendliness coefficients ω, respectively . We observe that both demand and price in the optimal contract increase with ω and with type values ​​θc. The reason is that the higher the ω, the higher the satisfaction with energy consumption, resulting in higher energy demand, and the higher the price each electric vehicle should pay to the electricity retailer.

insert image description here
Figures 4 and 5 show the optimal energy demand and price under different electric vehicle type distributions, respectively . In case (a), the types θ of EVs are independent and follow a uniform distribution. In case (b), the types θ of EVs are independent and follow a binomial distribution with parameter p = 0.5.

Figures 4 and 5 show the socially optimal demand and associated socially optimal price for social surplus maximization, respectively . It can be seen that the demand of the non-optimal contract is less than the social optimal demand. From an economic point of view, compared with maximizing social surplus, electricity retailers tend to reduce the demand for low-type electric vehicles and correspondingly increase the price of high-type electric vehicles to maximize their utility.

insert image description here
In Figures 6 and 7, we compare the proposed scheme with two traditional schemes: T (Two-part tariff scheme) and F (Flast scheme).

  • In T, the relationship between electricity demand and its corresponding price can be expressed as π ( θ ) = P ⋅ x ( θ ) + Z π(θ)=P x(θ)+Zp ( i )=Px ( θ )+Z , where the operator only specifies a unit electricity price P and a constant charging fee Z for each electric vehicle.
  • In F, the unit price and charging charges are the same for all types of electric vehicles.

Figures 6 and 7 illustrate the utility of operators and EVs at different ω, respectively. The higher the ω, it means clean power generation from renewable energy, and the higher the satisfaction of electric vehicles with energy consumption.

From Fig. 6, we can see that our scheme achieves higher electricity retail utility compared with the other two schemes. In the proposed scheme and the T scheme, the utility increases with ω, while in the F scheme, it remains basically unchanged.

  • In Plan F, the unit price of all types of electric vehicles is fixed, so operators cannot adjust the unit price for higher utility.
  • In the T scheme, the energy price has a linear relationship with the energy demand, resulting in a slow growth of the operator's utility.
  • In our scheme, the relationship between energy price and energy demand is nonlinear, so the operator's utility is relatively high, which can be maximized by designing an optimal contract.

From Figure 7, we can see that our scheme achieves higher EV utility than the other two schemes. The utility in the three schemes increases as ω increases. The reason is that the higher the ω, the higher the satisfaction of the electric vehicle with energy consumption, leading to the higher utility of the electric vehicle .

  • In scheme T, since the unit price and charges are adjustable, electric vehicles can relatively improve their utility.
  • In our scheme, the utility of electric vehicles can be maximized by choosing the optimal contract.

According to the above results, our scheme can obtain the optimal contract in the limited energy trading market. Furthermore, in the proposed scheme, electricity retailers and EVs can have utility improvements, respectively.

Conclusions and future work

In this paper, we propose a contract-based secure charging scheme for electric vehicles in an energy blockchain system.

  • First, we formulate an energy blockchain system integrated with EV and RES in SC.
  • Second, a reputation-based DBFT algorithm is proposed to achieve consensus efficiently in the blockchain.
  • Third, the optimal contract is analyzed based on contract theory to satisfy the energy consumption preferences of electric vehicles and maximize the operator's utility.
  • Finally, simulation results show that our scheme obtains optimal contracts better than traditional schemes to achieve higher utility for operators and EVs.

For future work, we will further extend this paper to multi-operator markets with competitive implications.

Guess you like

Origin blog.csdn.net/Sky_QiaoBa_Sum/article/details/127315615