Scheduling Online EV Charging Demand Response via V2V ...

16
1 Scheduling Online EV Charging Demand Response via V2V Auctions and Local Generation Yulan Yuan, Lei Jiao, Konglin Zhu, Lin Zhang Abstract—Due to the enormous energy consumption and the wide geographic distribution, Electrical Vehicle (EV) charging stations are believed to have great potential in Emergency Demand Response (EDR) participation. However, EDR limits the electricity drawn from the power grid by the charging station, and can pose threats to satisfying EVs’ charging demand. In this paper, in order to complement the charging station’s energy supply to meet the dynamic EV charging demand, we formulate an online EV charging scheduling problem under EDR as a non-linear mixed-integer program, and propose a novel polynomial-time online algorithm and auction mechanism to jointly incentivize EVs with energy to sell their energy and utilize the charging station’s local generator to produce energy. Our approach conducts an auction in each single round based on a primal-dual method and ties these auctions over time to optimize the system’s long-term social cost, while accommodating the local generator’ on/off-state control, each EV bidder’s cumulative energy budget constraint, and the power grid’s EDR energy cap. Our approach achieves the economic properties of truthfulness, individual rationality, and computational efficiency simultane- ously for each auction, and a parameterized-constant competitive ratio for the long-term social cost. By rigorous theoretical analysis and trace-driven experimental studies, the results exhibit that our approach outperforms multiple alternative algorithms regarding the social cost, attains the economic properties, and also executes efficiently in practice. Index Terms—EV charging, online scheduling, demand re- sponse, vehicle to vehicle, auction. I. I NTRODUCTION T HE adoption of the Electric Vehicles (EVs) has been increasing significantly nowadays, making EV charging stations among the most energy-hungry entities [1], [2]. Due to the enormous energy consumption and the wide geographic distribution, EV charging stations are believed well-situated for participating in the Emergency Demand Response (EDR) programs. In a typical EDR program, the charging stations receive signals from the electricity grid during certain time periods and reduce their energy consumption until below a required cap in order to relieve the high load experienced by the grid and protect the availability and the reliability of the grid [3]; in return, the charging stations will receive remuneration from the grid [4]. Yulan Yuan, Konglin Zhu and Lin Zhang are with the School of Artificial Intelligence, Beijing University of Posts and Telecommunications, Beijing, China (e-mail: yuanyl, klzhu, [email protected]). Lei Jiao is with the Department of Computer and Information Science, University of Oregon, Eugene, OR, USA (e-mail: [email protected]). This work was supported in part by the National Key R&D Program of China under Grant 2016YFB0100902, and the Construction of System-level Connected Vehicle Test and Verification Platform under Grant No. 2019- 00892-2-1. (Corresponding author: Konglin Zhu.) Fig. 1: System scenario However, restricting the energy drawn from the electricity grid during EDR periods poses threats to satisfying EVs’ charging demand, and it is important for the charging sta- tions to use alternative energy sources to complement the energy supply. Among several options, two approaches seem promising and could be considered: one is using the charging stations’ local electricity generator [5], [6], and the other is recruiting energy from EVs that have abundant energy. The latter is possible because EVs themselves can be regarded as a flexible energy storage, especially with today’s development of rechargeable batteries and their ever-increasing capacity (e.g., 60 kWh or higher [7]). Using Vehicle-to-Vehicle (V2V) and related technologies [8], [9], EVs can now transfer their energy to the charging stations and afterwards to other EVs through dedicated devices and interfaces. Fig. 1 shows the EV charging scenario considered in this paper. The energy to charge the EVs C and D comes from multiple sources including the power grid, the local generator, and the EVs A and B. To motivate EVs with energy to contribute to the energy supply, an appropriate incentive mechanism needs to be set up. A straightforward approach may be letting EVs price and sell their energy directly. However, it is often difficult for such direct pricing to achieve the maximal profit and market efficiency, due to the highly dynamic and uncertain demand and supply during the EDR periods. The risk of overpricing and underpricing makes this approach less ideal. In stark contrast, in the approach of auction, the charging station can act as the auctioneer, and solicit and buy bids from EVs with energy in order to charge EVs in need of energy. This approach captures the real-time demand-supply, reduces the chance of mispricing, and optimizes the market welfare. In this paper, we focus on auction-based mechanisms. It is yet non-trivial for charging stations to jointly operate

Transcript of Scheduling Online EV Charging Demand Response via V2V ...

Page 1: Scheduling Online EV Charging Demand Response via V2V ...

1

Scheduling Online EV Charging Demand Responsevia V2V Auctions and Local Generation

Yulan Yuan, Lei Jiao, Konglin Zhu, Lin Zhang

Abstract—Due to the enormous energy consumption and thewide geographic distribution, Electrical Vehicle (EV) chargingstations are believed to have great potential in EmergencyDemand Response (EDR) participation. However, EDR limitsthe electricity drawn from the power grid by the chargingstation, and can pose threats to satisfying EVs’ charging demand.In this paper, in order to complement the charging station’senergy supply to meet the dynamic EV charging demand, weformulate an online EV charging scheduling problem under EDRas a non-linear mixed-integer program, and propose a novelpolynomial-time online algorithm and auction mechanism tojointly incentivize EVs with energy to sell their energy and utilizethe charging station’s local generator to produce energy. Ourapproach conducts an auction in each single round based on aprimal-dual method and ties these auctions over time to optimizethe system’s long-term social cost, while accommodating thelocal generator’ on/off-state control, each EV bidder’s cumulativeenergy budget constraint, and the power grid’s EDR energy cap.Our approach achieves the economic properties of truthfulness,individual rationality, and computational efficiency simultane-ously for each auction, and a parameterized-constant competitiveratio for the long-term social cost. By rigorous theoretical analysisand trace-driven experimental studies, the results exhibit that ourapproach outperforms multiple alternative algorithms regardingthe social cost, attains the economic properties, and also executesefficiently in practice.

Index Terms—EV charging, online scheduling, demand re-sponse, vehicle to vehicle, auction.

I. INTRODUCTION

THE adoption of the Electric Vehicles (EVs) has beenincreasing significantly nowadays, making EV charging

stations among the most energy-hungry entities [1], [2]. Dueto the enormous energy consumption and the wide geographicdistribution, EV charging stations are believed well-situatedfor participating in the Emergency Demand Response (EDR)programs. In a typical EDR program, the charging stationsreceive signals from the electricity grid during certain timeperiods and reduce their energy consumption until below arequired cap in order to relieve the high load experiencedby the grid and protect the availability and the reliabilityof the grid [3]; in return, the charging stations will receiveremuneration from the grid [4].

Yulan Yuan, Konglin Zhu and Lin Zhang are with the School of ArtificialIntelligence, Beijing University of Posts and Telecommunications, Beijing,China (e-mail: yuanyl, klzhu, [email protected]).

Lei Jiao is with the Department of Computer and Information Science,University of Oregon, Eugene, OR, USA (e-mail: [email protected]).

This work was supported in part by the National Key R&D Program ofChina under Grant 2016YFB0100902, and the Construction of System-levelConnected Vehicle Test and Verification Platform under Grant No. 2019-00892-2-1. (Corresponding author: Konglin Zhu.)

Fig. 1: System scenario

However, restricting the energy drawn from the electricitygrid during EDR periods poses threats to satisfying EVs’charging demand, and it is important for the charging sta-tions to use alternative energy sources to complement theenergy supply. Among several options, two approaches seempromising and could be considered: one is using the chargingstations’ local electricity generator [5], [6], and the other isrecruiting energy from EVs that have abundant energy. Thelatter is possible because EVs themselves can be regarded as aflexible energy storage, especially with today’s development ofrechargeable batteries and their ever-increasing capacity (e.g.,60 kWh or higher [7]). Using Vehicle-to-Vehicle (V2V) andrelated technologies [8], [9], EVs can now transfer their energyto the charging stations and afterwards to other EVs throughdedicated devices and interfaces. Fig. 1 shows the EV chargingscenario considered in this paper. The energy to charge theEVs C and D comes from multiple sources including thepower grid, the local generator, and the EVs A and B.

To motivate EVs with energy to contribute to the energysupply, an appropriate incentive mechanism needs to be setup. A straightforward approach may be letting EVs price andsell their energy directly. However, it is often difficult forsuch direct pricing to achieve the maximal profit and marketefficiency, due to the highly dynamic and uncertain demandand supply during the EDR periods. The risk of overpricingand underpricing makes this approach less ideal. In starkcontrast, in the approach of auction, the charging station canact as the auctioneer, and solicit and buy bids from EVs withenergy in order to charge EVs in need of energy. This approachcaptures the real-time demand-supply, reduces the chance ofmispricing, and optimizes the market welfare. In this paper,we focus on auction-based mechanisms.

It is yet non-trivial for charging stations to jointly operate

Page 2: Scheduling Online EV Charging Demand Response via V2V ...

2

the auctions and the local generator to charge EVs during theEDR periods, which is characterized by several fundamentaland critical challenges as follows. First, this is intrinsically anonline problem where all the inputs (e.g., charging demand,energy bids, electricity price, energy cap of EDR) are time-varying and unpredictable, and the auctions need to be con-ducted and the generator needs to be controlled repetitivelyon the fly. Pursuing the long-term total cost optimization insuch a dynamic environment is not straightforward. Second,the difficulty with generator control lies in the time-coupledon/off decisions. Keeping the local generator always on maydraw too much fuel cost and maintenance cost resulting inhigher social cost, whereas keeping the local generator off maymake the system fail to meet the charging demand, especiallyin EDR periods. Additionally, switching the local generatoron and off will cause additional cost such as the long-termwear-and-tear and damage. Therefore, it requires to strike thebalance of local generator on/off state over time [10], [11].Third, the difficulty with V2V auctions is the need to attainthe desired economic properties such as truthfulness (i.e., abid maximizes its utility only by not cheating in the biddingprice) and individual rationality (i.e., a bid always achievesnon-negative utility), while determining the winning bids andthe corresponding payment in each single auction. One alsoneeds to ensure not to consume the bids too early, depletingthe bidder’s available energy and disabling the bidder’s futureparticipation, given the unknown future demand. All thesechallenges only escalate when they appear simultaneously,intertwined with one another, as in our problem.

Despite many efforts have been devoted to EV chargingscheduling, they have limitations and fall insufficient for thescenario targeted in this paper. Some do not consider themulti-source EV charging and the incentives of EVs andcharging stations [12], [13]; others lack or neglect the time-varying, online environment, and only focus on offline EVcharging scheduling algorithms [14]–[16]. A substantial bodyof research has focused on auctions or online auctions, but theydo not typically account for the decision-switching cost overtime (i.e., generator state control as in our problem) [17], [18].Existing mechanisms such as Vickrey-Clarke-Groves (VCG)auctions [19]–[21] can guarantee the desired economic prop-erties, but requires to solve the social cost problem optimally,which is computationally prohibitive in our case.

In this paper, we investigate and formulate our problem asa nonlinear mixed-integer program. Our problem minimizesthe cumulative long-term social cost which includes differenttypes of costs from the power grid, the EV bidders, and thelocal generator, while meeting the varying charging demandand respecting the EDR’s dynamic energy cap, the localgenerator’s capacity, and each EV bidder’s cumulative energybudget. The problem is NP hard even in an offline setting,besides all the inputs are arbitrary dynamics. Therefore, it callsfor a polynomial-time online approximation algorithms.

We propose EVCDR, a novel online algorithm and auctionmechanism to solve our problem. EVCDR solves each single-round problem as an auction and ties these auctions over timewhile accommodating the generator’s on/off state and eachbidder’s cumulative energy budget, which works as follows.

For each single round, given the specific generator state,we design a primal-dual-based algorithm to overcome the NP-hardness via linear programming relaxation and “flow-cover”constraint strengthening [22], in order to select winning bidsand draw energy from the grid and the generator, respectively.We address the long-term capacity constraint of EV batteries[7] via auxiliary variables for each bid to combine its costand residual capacity. Moreover, we determine the paymentsfollowing Myerson’s characterization [23] for each winningbid, and prove that the properties of truthfulness, individual ra-tionality, and computational efficiency are attained altogether.

For the long term, we design an online control algorithmand focus on determining the generator state that is fed toour aforementioned single-round algorithm. Given that thefuture inputs remain unknown, we greedily calculate the beststate of the local generator for each current time slot, andthen determine whether to maintain this state and postponethe on/off state-switching to avoid excessive wear-and-tear bycomparing the accumulative cost so far to the harm of the state-switching operation [4]. We prove that our online algorithmproduces a parameterized-constant approximation ratio foreach single time slot and also a corresponding competitiveratio for the long-term cumulative social cost.

We finally conduct extensive numerical evaluations usingreal-world data traces. We use the dynamic EV chargingrecords from the adaptive charging networks of California[24] as the charging demand. We also take the correspondingwholesale hourly electricity price [25], the grid load (forEDR) [26], and realistic generator parameters [4] as inputs.Through 168 hours and under the large-scale and small-scalesettings, we observe the following results: (1) EVCDR onlyincurs no more than 1.9 and 1.4 times the total cost ofthe offline optimal approach in the large-scale and small-scale settings, respectively; (2) EVCDR also saves up to 80%

and 62% total cost compared to using no auction and noaccommodation of the generator switching cost in these twocases, respectively, validating that EVCDR can achieve evenbetter performance with proper state-switching control andusing energy from the EV auctions; (3) EVCDR successfullyachieves truthfulness and individual rationality; (4) EVCDRexecutes fast and finishes within 3.5 ms on average for eachsingle auction, scaling well as the number of bids increaseseven in a large-scale setting.

II. MODEL AND PROBLEM FORMULATION

In this section, we present our system model, the social costoptimization problem formulation, the algorithmic challengesand the overview of our online scheme and the performanceanalysis. For the ease of reference, we summarize all thenotations in Table I.

A. System Modeling

Charging Station, EVs, Generator, and Grid: We con-sider an EV-charging system that consists of a charging stationand a group of EVs. Besides the typical charging interfaces toconnect and charge the EVs, the charging station is equippedwith the following components: (1) the connection to the

Page 3: Scheduling Online EV Charging Demand Response via V2V ...

3

TABLE I: NOTATIONS

Inputs MeaningM Set of bidders (or bids)T Set of time slotsW (t ) Total energy demand at time t

Cam Cumulative energy budget of EVm’s for auctions during T

α Fuel cost for producing one unit local energyβ Sunk cost of maintaining local generator activeζ Start-up cost of turning on local generatorV Total capacity of local generatorE (t ) Cap of energy from grid at time t

e(t ) Price of energy from grid at time t

c(t )m Cost of bid m at time t

g(t )m Amount of energy bid m at time t sells

P(t )m Payment to bid m

Variables Meaning

x(t )m Whether bid m wins or not at time t

y(t ) Whether local generator are on or off at time t

u(t ) Amount of energy produced locally at time t

z(t ) Amount of energy drawn from grid at time t

electricity grid which can draw energy to charge the EVs;(2) the local energy generator that is collectively managed toproduce energy, if needed, for charging the EVs; and (3) thelocal facilities that enable V2V energy transfer, i.e., to transferenergy from the EVs that are willing to sell energy from theirbatteries to those that want to charge energy. We highlight thatV2V technologies allow vehicles to transfer energy to or getenergy from a storage point such as a smart home or a chargingstation via dedicated devices or interfaces, and then coordinateEVs’ energy distribution through a controller [27], [28]. Theseenergy sources working together can be regarded as a local“microgrid” that fulfills the time-varying charging demand ofEVs. The charging station also joins the EDR program of anexternal electricity grid, and when receiving an EDR signal,it is mandatory for the charging station to keep its energyconsumption from the electricity grid within a required cap.

The EV charging system is intrinsically dynamic. We con-sider the operation of the system over a series of time slotsT = {1, 2, ...,T}. We denote the total energy demand from theEVs that want to charge energy as W (t), which is obtained bycollecting and then accumulating all the individual chargingdemands at time slot t ∈ T , and then denote the set of theEVs that can provide energy to others as M = {1, ...,M},which can represent the set of EVs in the community wherethe charging station is located. Each EV m has its cumulativeenergy budget Cam for the auctions during the entire T , wherewe assume that Cam is a fixed value and decided empiricallyby the EV m. That is, the cumulative energy budget for anEV is determined at the beginning of time T , while it is notlimited by the EV’s battery capability, as Cam is estimatedby accumulating the charging or discharging energy amountduring the whole process.

For the local generator, we use α to represent the fuel costto produce one unit energy, β to represent the cost neededto maintain the generator active, ζ to represent the start-upor transition cost when turning on the generator, and V torepresent the capacity or the maximal amount of energy thatcan be output by the generator. We note that the local generator

Fig. 2: Illustration of our auction model in a single time slot

in such a microgrid environment is usually equipped with arelatively small capacity, powered by a diesel engine with fast-responding performance, which can implement the on/off statetransitions within a minimum time period [29]. For the EDRsignal at time slot t, we adopt E (t) to refer to the cap of theenergy available from grid, and e(t) to refer to the price ofsuch energy within the cap. We also allow arbitrary dynamicsand make no assumption about how W (t), E (t) and e(t) mayvary with time.

Auction Model: To incentivize the EVs with surplus energyto sell their energy for charging those in need of energy, wepropose an online auction mechanism that executes as follows,where the charging station is the auctioneer and the EVsselling energy are the bidders. An auction is conducted in eachtime slot of the time horizon T under consideration. In eachtime slot t ∈ T , the charging station firstly receives the totalenergy demand W (t) which is obtained by accumulating thedemand of all individual vehicles, and also the EDR signal, ifany, from the power grid, which consists of the cap E (t) andthe price e(t). Then, with such information, plus the generatorinformation that is known in prior, the charging station willinitiate an auction by soliciting bids from the EV sellers (i.e.,bidders). Next, each bidder m can submit a bid (c

(t)m , g

(t)m ),

where g(t)m is the amount of energy on sale for the time slot

t. It is determined by EV mâAZs discharging rate and thecurrent remaining energy budget and c

(t)m is the corresponding

remuneration requested by this bid. Each EV m can give upparticipating in the auction at any time t, which can cause thenumber of bids to vary as time goes. To capture such dynamicsby a fixed set M, we can let our system generate a virtual bid,where c

(t)m is set to +∞ (or a very large value in reality), to

represent that EV m does not join the auction at t, and thisbid will automatically lose in the auction as the social cost isbeing minimized. Finally, receiving all the bids, the chargingstation will determine the values of the following variables: (1)whether each bid m wins, denoted by x

(t)m ∈ {1, 0} (x

(t)m = 1

for winning and x(t)m = 0 for losing in the auction), with

the payment P(t)m for each bid (P(t)

m > 0 for the winner andP(t)m = 0 for the unsuccessful bidder); (2) whether to use the

local generator, denoted by y(t) ∈ {1, 0} (y(t) = 1 for using

and y(t)= 0 for not using the generator), and the amount of

Page 4: Scheduling Online EV Charging Demand Response via V2V ...

4

the energy u(t) ≥ 0 which needs to be drawn from the localgenerator; and (3) the amount of the energy z(t) ≥ 0 whichneeds to be drawn from the power grid. The charging stationwill perform the EV charging operations according to thesedecisions. Fig. 2 visualizes our auction model as mentionedabove in a single time slot.

Cost of Charging Station: The total cost of the chargingstation consists of multiple components. First, the chargingstation, as the auctioneer, makes payments to the bidders:

t

mP(t)m .

Second, the fuel cost of the energy that charging stationconsumes via the local generator [30]:

tαu(t).

Note that the fuel cost is conventionally expressed as aquadratic function: ap2

+ bp + c [31], where p is the amountof electricity produced by the generator and a, b and c arethe constants depending on the generator. As the order ofmagnitude of the coefficient a is usually much smaller thanthat of b, which makes the linear term bp much larger than thequadratic term ap2 and makes ap2 negligible especially for thesmall-capacity generator in the microgrid [32], we thus onlyconsider the linear term in our model, i.e., αu(t). Third, toretrieve energy from the local generator, the charging stationincurs the cost of operating the local generator, which includesthe maintenance cost and the switching cost [32]–[34]:

tβy(t) +

tζ[y(t) − y

(t−1)]+.

We use βy(t) to denote the labor management cost of main-taining the local generator in their active state, and use ζ[y(t)−y(t−1)]+ = ζ max

{

y(t) − y

(t−1), 0}

to denote the switching cost,which involves the device wear-and-tear and any additionalcost caused by each start-up [35]. Fourth, the charging stationdraws energy from the electricity grid:

te(t)z(t).

Summarizing all the components, the total cost of the chargingstation is∑

t

m

P(t)m +

t

(

αu(t) + βy(t) + ζ[y(t) − y(t−1)]+ + e(t)z(t)

)

.

(1)Cost of EVs: The total cost of the EVs consists of the

total cost of the bids, plus the total payments received fromthe charging station (treated as negative cost). Therefore, it isrepresented as

t

m

(

c(t)m x

(t)m − P

(t)m

)

. (2)

B. Problem Formulation and Algorithmic Challenges

Social Cost Minimization Problem: The “social” costrefers to the total cost of the entire system. Thus, the socialcost is the sum of (1) and (2), where the payments will becanceled (note that we will still determine the payments later,as required by the auction mechanism). We formulate theproblem of social cost minimization as follows, which is a

mixed integer non-linear program (assuming “truthfulness”,which will be defined and proved later):

Min∑

t

mc(t)m x

(t)m +

tαu(t) +

te(t)z(t)

+

tβy(t) +

tζ[y(t) − y

(t−1)]+ (3)

s.t.∑

mg(t)m x

(t)m + u(t) + z(t) ≥ W (t), ∀t, (3a)

tg(t)m x

(t)m ≤ Cam, ∀m, (3b)

0 ≤ u(t) ≤ V · y(t), ∀t, (3c)

0 ≤ z(t) ≤ E (t), ∀t, (3d)

x(t)m ∈ {0, 1}, y(t) ∈ {0, 1}, ∀m, ∀t. (3e)

The objective (3) minimizes the social cost. Constraint (3a)ensures that the total demand of EVs to be charged are satisfiedby the energy from the bidders, the local generator, andthe power grid. Constraint (3b) ensures that the energy soldby a bidder does not exceed the bidder’s cumulative energybudget. Constraint (3c) guarantees that energy consumed fromthe local generator does not exceed the generator’s capacity.Constraint (3d) guarantees that the energy obtained from thegrid does not exceed the energy cap required by the demandresponse program. Constraint (3e) specifies the binary domainsof some decision variables.

Theorem 1. The long-term social cost minimization problem

(3) is an NP-hard problem.

Proof. The core idea is to demonstrate that our problemcontains an existing NP-hard problem as a special case. Thatis, any algorithm that can solve our problem can also solve thatexisting NP-hard problem; in other words, if that existing NP-hard problem cannot be solved in deterministic polynomialtime (unless P = NP), then our problem also cannot besolved in deterministic polynomial time. Here, we choose toshow that our problem contains the “minimum-cost knapsackproblem” which is well known to be NP-hard. In fact, in ourproblem, if α, e(t), β, ζ are all zeros and if Cam is large,then our problem can be indeed reduced to the minimum-cost knapsack problem. One version of the minimum-costknapsack problem can be described as follows. Given a fixednumber of items, where each item i has the weight wi andthe value vi , and given a minimum value requirement C, theoptimization objective is minimizing the total weight of theitems that are selected

i wi xi , while satisfying the minimumvalue requirement

i vi xi ≥ C, where xi ∈ {1, 0} is a decisionvariable indicating whether to select the item i or not. Now,note that, ∀t, the symbols wi , vi , C, and xi correspond toc(t)m , g(t)m , W (t), and x

(t)m in our problem, respectively; and the

constraint∑

i vi xi ≥ C corresponds to (3a) in our problem.Consequently, our problem (3) contains the minimum-costknapsack problem as a special case. �

Algorithmic Challenges: We highlight that solving thesocial cost minimization problem in an online manner and de-termining the payments with guaranteed provable performancefaces four fundamental challenges.

First, the switching cost∑

t ζ[y(t) − y

(t−1)]+ couples everytime slot t − 1 and its next time slot t, and without knowing

Page 5: Scheduling Online EV Charging Demand Response via V2V ...

5

y(t), which is the decision that will be made at t, it is non-

trivial to make the decision of y(t−1) at t−1 for minimizing thelong-term cost, because any decision of y

(t−1) will potentiallyimpact the switching cost between t−1 and t. Directly solvingeach single-round problem to its optimum can incur excessiveswitching cost in the long run.

Second, the long-term capacity constraint of (3b) must berespected, which makes it difficult to make good decisions ineach single time slot. Blind to the unpredictable future powerdemands and other inputs, putting more energy on sale for theEV sellers may drain the energy too fast and disable futureauction participation; in contrast, putting less energy on salemay not help reduce the social cost. Yet, dynamically strikingan appropriate balance is not straightforward.

Third, our problem is NP-hard even in the offline setting,not to mention we aim to solve it in an online setting. Note thatif we ignore all the terms related to y

(t), u(t), and z(t), then ourproblem becomes a classic minimum 0-1 knapsack problem,which is known to be NP-hard [22]. Our problem thus containsan NP-hard problem as a special case, and desires polynomial-time online approximation algorithms.

Fourth, from the perspective of calculating the payment withtruthfulness and individual rationality (both of which will bedefined and discussed later), we are also motivated to strive fornovel approaches. The standard Vickrey-Clark-Groves (VCG)approach for payment is inapplicable to our problem, as itrequires the social cost minimization in each time slot to beoptimally solved. Otherwise, truthfulness cannot be guaranteed[36]. However, due to NP-hardness of the problem and anapproximation algorithm is applied, which prevents us fromdoing so. Even without NP-hardness, using VCG in each timeslot is still prohibited due to the switching cost and the long-term capacity constraint.

C. Algorithm Design and Performance Analysis Overview

To overcome the aforementioned challenges and to solvethe social cost minimization problem in an online manner, wedesign a novel online scheme consisting of two components:Algorithm for Single-Round Auction (Sec. III) and Algorithmsfor Long-Term Cost Optimization (Sec. IV), as illustrated inFig. 3.

First, removing temporarily the switching cost related to thegenerator’s on/off state y

(t) by assuming y(t) is given, we split

and solve the long-term problem as a series of single-roundauctions (including selecting winners and making payments).Then, we dynamically determine the generator’s state and thustie the individual auctions together by weighing the switchingcost versus the non-switching cost on the fly towards the totalcost minimization.

For the single-round auction at each individual time slot,we design Algorithm 1:

(i) Problem Transformation: Assuming the generator states{y(t), ∀t} are all given, we tentatively ignore the switchingcost

t C(t)

SC=

t ζ[y(t) − y

(t−1)]+, and only focus on the

non-switching cost∑

t C(t)

−SC=

t

m c(t)m x

(t)m +

t αu(t)+∑

t e(t)z(t)+∑

t βy(t). We remove the long-term energy ca-

pacity constraint (3b) based on a Lagrange multiplier, and

Fig. 3: Structure of the proposed online scheme

thus the non-linear mixed integer programming problem(3) can be decomposed into several one-round problemsover time. We also introduce the “flow-cover” type ofinequalities [22] to transform the single-round problemfor facilitating our primal-dual algorithm design next.

(ii) Single-Round Auction: We then design Algorithm 1 toapproximately solve the single-round problem (6), whichis a mixed integer linear program, through the primal-dualparadigm. We relax the primal problem, derive its La-grange dual problem, and then control the dual variablesto assign appropriate values to the primal variables, i.e.,selecting the winning bids. We also carefully calculatethe payment for each winning bid in this process.

For the cumulative social cost optimization in the long run,we design Algorithms 2 and 3:

(iii) Long-Term Optimization: We focus on determining thegenerator states {y(t), ∀t}. We design Algorithm 2 to finda temporary generator state that results in the minimumsocial cost C

(t)

−SC+C

(t)

SCat each t from a single-round per-

spective, where C(t)

−SCis obtained by invoking Algorithm

1. We then design Algorithm 3 to determine the finalgenerator state by properly postponing switching on thegenerator to avoid excessive switching cost, which aimsto minimize the cumulative social cost

t (C(t)

−SC+ C

(t)

SC)

from a long-term perspective.

We conduct rigorous formal analysis of the performanceof our algorithms. We exhibit that Algorithm 1 guaranteesan approximation ratio of 2 for the single-round problem(6) (i.e., Theorem 2), while producing payments that satisfythe desired economic properties of truthfulness and individualrationality (i.e., Theorem 3). We also demonstrate that long-term optimization algorithms (i.e., Algorithms 2 and 3) guar-antee an approximation ratio of 2

γ

γ−1for the long-term social

cost as in the problem (4) (i.e., Theorem 4), and a boundedparameterized-constant approximation ratio (i.e., competitiveratio) of 2ǫ

(

1 + 1k

)

γ

γ−1(i.e., Theorem 5) for the long-term

social cost as in our original problem (3).

III. ALGORITHM FOR SINGLE-ROUND AUCTION

In this section, we first transform problem (3) into a series oftime-independent solvable subproblems. Then we will design aprimal-dual-based polynomial-time algorithm for single-roundauction to determine the winning bids, with the electricitydrawn from the local generator and the grid, while addressingthe long-term budget constraint and calculating the payment.

Page 6: Scheduling Online EV Charging Demand Response via V2V ...

6

Fig. 4: Roadmap of our algorithm for each single-round auction

We will also rigorously prove the guaranteed approximationperformance and the economic properties of our algorithm.The roadmap of this section is shown in Fig. 4.

A. Problem Transformation

For solving the single-round auction at each t, we transformour problem (3), assuming the status of the generator y

(t)

is given, i.e., the switching cost C(t)

SCand the term βy(t) are

known. Therefore, we only solve∑

m c(t)m x

(t)m + αu(t) + e(t)z(t).

Our original long-term social cost minimization problem be-comes the following:

Min∑

t

mc(t)m x

(t)m +

tαu(t) +

te(t)z(t) (4)

s.t. (3a), (3b), (3c), (3d), (3e).

To solve this problem, we consider a subset N(t)=

{m1,m2, . . .} such that∑

m∈N (t ) g(t)m < W (t) [22]. So, ∆

(

N (t))

=

W (t) −∑

m∈N (t ) g(t)m represents the residual energy which needs

to be met on top of the bids in N (t). We define gm

(

N (t))

=

min{

g(t)m ,∆

(

N (t))

}

. Then, the problem (4) can be transformedinto the following form:

Min∑

t

mc(t)m x

(t)m + αu(t) + e(t)z(t) (5)

Subject to:∑

m∈M\N (t )g(t)m (N (t))x

(t)m + u(t) + z(t) ≥ ∆(N (t)), (5a)

∀N (t) ⊆ M, ∀t,∑

tg(t)m x

(t)m ≤ Cam, ∀m, (5b)

0 ≤ u(t) ≤ V · y(t), ∀t, (5c)

0 ≤ z(t) ≤ E (t), ∀t, (5d)

x(t)m ∈ {0, 1}, ∀m, ∀t. (5e)

To address the long-term budget constraint (5b) in orderto split the above problem to a series of one-shot problemsover T , each corresponding to a single time slot, we introducec∼(t)m , c

(t)m + θmg

(t)m , ∀m, t, where θm, ∀m is the Lagrange dual

variable for (5b). We use c∼(t)m to replace c

(t)m in the objective

and then remove (5b). This is the key to addressing the long-term budget constraint. {θm, ∀m}, in addition to {y(t), ∀t}, willbe addressed in details in Section IV.

B. Primal-Dual Algorithm for Winner and Payment Determi-

nation

Based on the above, we can have the single-round problemat t:

Min∑

m∈Mc∼(t)m x

(t)m + αu(t) + e(t)z(t) (6)

Subject to:∑

m∈M\N (t )g(t)m (N (t))x

(t)m + u(t) + z(t) ≥ ∆(N (t)), (6a)

∀N (t) ⊆ M,

0 ≤ u(t) ≤ V · y(t), (6b)

0 ≤ z(t) ≤ E (t), (6c)

x(t)m ∈ {0, 1}, ∀m ∈ M . (6d)

Primal Problem: We relax the binary variables x(t)m , ∀m to

the continuous domains, which transforms the mixed integerlinear program (6) into its linear program relaxation, which isour primal problem:

Min∑

m∈Mc∼(t)m x

(t)m + αu(t) + e(t)z(t)

Subject to: (6a)-(6c), x(t)m ≥ 0, ∀m ∈ M .

Dual Problem: Our next step is to derive the Lagrangedual problem [37]. By introducing the dual variables Z(N (t)),ρ(t), φ(t) for the corresponding constraints, respectively, wecan actually have the following formulation, which is our dualproblem:

Max∑

N (t )⊆MZ(

N (t))

(

N (t))

− ρ(t)V y(t) − φ(t)E (t) (7)

Subject to:∑

N (t )⊆M:m<N (t )

Z(

N (t))

gm

(

N (t))

≤ c∼(t)m , ∀m ∈ M, (7a)

N (t )⊆M

Z(N (t)) ≤ α + ρ(t), (7b)

N (t )⊆M

Z(N (t)) ≤ e(t) + φ(t), (7c)

Z(

N (t))

, ρ(t), φ(t) ≥ 0, ∀N (t) ⊆ M . (7d)

Primal-Dual Algorithm: We design Algorithm 1 for thewinner and payment determination. Since our problem is NP-hard and the standard VCG approach is no longer applicable,we give an algorithm based on primal-dual optimization,which calculates the payment and constructs a mixed integersolution for problem (6) by solving the primal problem viaworking with the dual problem (7) simultaneously.

The basic idea is to ensure the dual variable Z(N (t))

increases continuously until the dual constraint (7a), (7b) or(7c) becomes tight (a constraint ax ≤ b is tight if ax = b), andthen the corresponding primal variable can be set as a non-zero value. The iteration will not terminate until the constraint(6a) is satisfied (i.e., the energy purchased from the supplierscan cover the whole demand).

We further explain how Algorithm 1 works. Lines 1-5initialize all the variables. Here we highlight that the value

Page 7: Scheduling Online EV Charging Demand Response via V2V ...

7

Algorithm 1: Primal-Dual Algorithm for Winner andPayment Determination

Input: M, y(t), α, e(t),W (t),V, E (t), c∼(t)m

Output: I, u(t), z(t), P(t)m , C−SC

1 Z(

N (t))

= 0, ∀N (t) ⊆ M;2 N (t)

= ∅;3 x

(t)m = 0, ∀m ∈ M;

4 c∼(t)m ⋆ = c

∼(t)m , ∀m ∈ M;

5 q(N (t)) = 0;6 while M , ∅ AND ∆

(

N (t))

> 0 do

7 c∼(t)m ⋆ = c

∼(t)m ⋆−Z

(

N(t))

gm

(

N(t))

;

8 m∗= arg minm∈M

{

c∼(t )m ⋆

gm(N (t ))

}

;

9 q(N(t)) = q(N(t)) + gm∗ (N(t));

10 m−= arg minm,m∗

{

c∼(t )m ⋆

gm(N (t ))

}

;

11 Z (Nm− ) = minm,m∗

{

c∼(t )m ⋆

gm(N (t ))

}

;

12 Z(

N(t))

= minm∈M

{

c∼(t )m ⋆

gm(N (t ))

}

;

13 P(t)m∗ = c

∼(t)m∗ +

(

Z (Nm− ) − Z(

N(t)))

gm∗

(

N(t))

,

N(t)= N(t) ∪ m∗, x

(t)m∗ = 1, M =M\m∗,

(

N(t))

= W (t) − q(N(t));

14 q(t) = max{

0,min{

V y(t)+ E (t),∆

(

N(t))}}

;

15 ∆

(

N(t))

= ∆

(

N(t))

− q(t);

16 if q(t) > 0 then

17 if∑

N (t )⊆M Z(N(t)) ≤ α or∑

N (t )⊆M Z(N(t)) ≤ e(t)

then

18 go to next iteration;19 else

20 find a corresponding new value ρ(t) ≥ 0,which makes

N (t )⊆M Z(N(t)) ≤ α + ρ(t)

tight, and find a corresponding new valueφ(t) ≥ 0, which makes∑

N (t )⊆M Z(N(t)) ≤ e(t) + φ(t) tight; break;

21 else

22 break;

23 I = N (t), C(t)

−SC=

I c(t)m + αu(t) + e(t)z(t) + βy(t)

c∼(t)m in Line 4 is calculated in Algorithm 3 and passed to

Algorithm 1 to initialize c∼(t)m ⋆. The while loop from Line 6

to 22 chooses the winners and decides the payments based ona greedy strategy, and then the primal and dual variables areupdated. For each bidder m ∈ M, the scaled cost c

∼(t)m ⋆ is

constantly updated in decreasing degrees based on the slacksof the dual constraint in Line 7. Line 8 determines the winningbid m∗ according to the minimum unit price of energy. Line10 determines the suboptimal bid m− when we exclude thewinning bid m∗ obtained by Line 8. Line 11 records Z (Nm− )

and Line 12 records Z(

Nm(t )

)

, which are used to compute thepayment. Line 13 computes the payment to the winner m∗

according to the critical value rule which ensures a bid willalso win if it reports a lower price, and x

(t)m is set to 1 and m∗ is

removed from M. Line 14 updates the value of q(t), assumingthat q(t)

= u(t)+z(t). Line 15 updates the remainder of demand.Lines 16-22 update the dual variables and guarantee that thesolutions satisfy the constraints (6b) and (6c). Line 23 recordsthe winners set I, and computes the non-switching cost C

(t)

−SC.

C. Approximation and Economic Properties Analysis

We analyze the feasibility and the approximation ratioof Algorithm 1. We also define the economic properties oftruthfulness and individual rationality. We prove that they aresatisfied by our auction design.

Lemma 1. Algorithm 1 terminates in polynomial time with

a feasible solution for both the single-round problem (6) and

the dual problem (7).

Proof. See Appendix A. �

Theorem 2. Algorithm 1 is a 2-approximation algorithm, i.e.,

the cost obtained by Algorithm 1 is at most 2 times the optimal

cost in the problem (6).

Proof. The proof is based on Lemma 1. See Appendix B. �

The above lemma and theorem prove the feasibility and theapproximate ratio of Algorithm 1, respectively. Meanwhile,note that we aim to design an auction mechanism that canmotivate EVs to participate in the auction while guaranteeingthe desired economic properties. We present the followingdefinitions:

Definition 1. Utility. The utility of bidder m is

um

(

b(t)m , b

(t)−m

)

=

{

P(t)m

(

b(t)m , b

(t)−m

)

− c(t)m if x

(t)m = 1

0 otherwise,

where b(t)m is the declared cost of supply g

(t)m , b

(t)−m is the set

of bids from bidders except m, and c(t)m is the true cost of

g(t)m , which is only known to bidder m itself. Each bidder is

assumed to be rational, with a natural goal of maximizingits own utility. So a bidder may choose to misreport its cost(b

(t)m , c

(t)m ) if doing so leads to a higher utility.

Definition 2. Truthfulness. An auction is truthful if forany bidder m, reporting the true valuation always maximizesits utility, i.e., for all c

(t)m , b

(t)m (c(t)m is the true valuation, b

(t)m

is the declared cost), um

(

c(t)m , b

(t)−m

)

≥ um

(

b(t)m , b

(t)−m

)

.

Definition 3. Individual Rationality. Each bidder isindividually rational if it always achieves non-negativeutility [38], i.e., for bidder m, the utility um ≥ 0.

Lemma 2. According to the Myerson’s theorem [23], an

auction is truthful if and only if

1) The result of the auction mechanism is monotone, i.e., x(t)m

output by Algorithm 1 is monotone. That is, for ∀m1,m2 ∈

M, if c∼(t)m1

≤ c∼(t)m2

and g(t)m1= g

(t)m2

, then x(t)m2= 1 implies

x(t)m1= 1;

2) The winner is paid with critical payment [4], [39]. That

is, if bidder m wins the auction with the bid (c(t)

m⋆, g

(t)

m⋆),

Page 8: Scheduling Online EV Charging Demand Response via V2V ...

8

it will also win if its asking price satisfies c(t)m ≤

c(t )

m⋆g(t )m

g(t )

m⋆

,

and otherwise it will lose in this round.

Proof. See Appendix C. �

Theorem 3. Our proposed auction mechanism achieves both

truthfulness and individual rationality.

Proof. The proof is based on Lemma 2. See Appendix D. �

IV. ALGORITHMS FOR LONG-TERM COST OPTIMIZATION

In this section, we will design an online algorithm todynamically control the on/off state of the local generator,i.e., to determine {y(t), ∀t}, so that the long-term social costminimization problem can be decoupled into a series of solv-able single-round problems (i.e., auctions) using the algorithmpresented in the previous section. We will also prove theguaranteed performance of our online algorithms.

A. Online Algorithms for Generator State Control

Online algorithm is designed to overcome two major prob-lems: (1) how to tie each single-round auction together into thelong-term social cost minimization; (2) how to determine thestate of the local generator for avoiding excessive switching.We present the following algorithms.

Finding temporary generator state: For the one-roundauction, we determine the value y

(t) which incurs the minimumsocial cost in Algorithm 2. Here we only regard this value asthe temporary value, and we will determine whether to use itas the final state of the local generator later.

Algorithm 2: Algorithm for One-Round Social CostMinimization

Input: input parameters: y(t−1)

1 for y(t)= 0, 1 do

2 obtain C−SC(y(t)) by invoking Algorithm 1 and

CSC(y(t), y(t−1)) for every y

(t);

3 find minimum cost C−SC(y(t)) + CSC(y

(t), y(t−1)), thendetermine y

(t)= y

(t), total cost:C(

y(t))

= C−SC(y(t)) + CSC(y

(t), y(t−1));

The specific steps of Algorithm 2 are as follows: the f or

loop in Lines 1-2 traverses all possible values of y(t) and

obtains switching cost CSC(y(t), y(t−1)) and the non-switching

cost C−SC(y(t)) by invoking Algorithm 1. Line 3 determines

the optimal y(t) that can result in the minimum total social costC(

y(t))

. Thus, the minimum cost output by Algorithm 2 isonly for the one-round auction. From a long-term perspective,we still need to judge whether or not the y

(t) returned byAlgorithm 2 could incur unnecessary cost.

Determining final generator state: Algorithm 1 computesthe non-switching cost C

(t)

−SCwhen y

(t) is given, and Algorithm2 outputs y

(t) which results in minimum social cost. However,if we regard y

(t) returned by Algorithm 2 as the final stateof the local generator at t directly, the cost may be far fromthe optimal value due to excessive switching operations. Forexample, Algorithm 2 suggests keeping the local generator

active at t − 1. At t, Algorithm 2 considers that the localgenerator should be shut down according to the one-roundoptimization. Then in the next few time slots, the algorithmmay indicate to keep the generator active again. Thus, the costof turning on and off the equipment over this time period maybe higher than the cost of just keeping the equipment alwaysactive. For such reasons, we explore dependencies among thestates of the local generator in consecutive time slots, and thendesign a more judicious online algorithm, i.e., Algorithm 3, toachieve social cost minimization in the whole system runningspan. Our algorithm postpones local generator switching evenif the one-round algorithm indicates so, until the cumulativenon-switching cost has significantly exceeded the potentialswitching cost, or until there is no feasible solution, if thestate of local generator remains unchanged.

Algorithm 3: Online Algorithm for Long-Term SocialCost Minimization

1 Define: t = 1, t = 0, θ(0)m = 0, ∀m ∈ M, y(0) = 0,

∆C−SC = 0;2 while t ≤ T do

3 c∼(t)m = c

(t)m + g

(t)m θ

(t−1)m , ∀m ∈ M;

4 Obtain Ûy(t), ÛC(t)

SC( Ûy(t), y(t)) and ÛC

(t)

−SC( Ûy(t)) by

invoking Algorithm 2;5 if k ÛCt

SC( Ûy(t), y(t)) ≤ ∆C−SC or ∆C−SC = 0 then

6 y(t)= Ûy(t);

7 C(t)

−SC= ÛC

(t)

−SC( Ûy(t));

8 ∆C−SC = C(t)

−SC;

9 t = t;

10 else

11 y(t)= y

(t);12 C

(t)

−SC= C

(t)

−SC(y(t));

13 ∆C−SC = ∆C−SC + C(t)

−SC;

14 foreach m ∈ I do

15 θ(t)m = θ

(t−1)m

(

1 +g(t )m

2Cam

)

+c(t )m +αu

(t )+z(t )e(t )

2γCam

16 foreach m < I do

17 θ(t)m = θ

(t−1)m

18 The auctioneer notifies the winning bids I,

payment P(t)m , and sets the amount of energy

obtained from local generator and grid accordingto u(t) and z(t);

19 t = t + 1;

20 θm = θ(T )m , ∀m ∈ M

Note that, in Algorithm 3, we replace c(t)m by c

∼(t)m , where

c∼(t)m is defined to adjust its cost based on the remaining energy

budget for avoiding exhausting EVs’ energy prematurely,because selling more energy at early stages could lead to lowerprobability of participating in future auctions. Once the marketencounters a greater imbalance between supply and demand inthe future, the cost of crisis relief will be higher. Therefore, anew variable θ(t)m is introduced for every bidder m ∈ M, whichincreases as the remaining energy decreases. The new cost for

Page 9: Scheduling Online EV Charging Demand Response via V2V ...

9

each bidder is equal to original cost c(t)m plus the product of

the energy g(t)m and θ(t)m . So, the cost of bidders with lower

remaining energy will be modified to a higher cost, reducingthe probability of successful bidding. In this way, we ensurethat more bidders are eligible to participate in future auctions.

We further describe Algorithm 3 in more details. Line 1initiates θ(0)m and y

(0). Assume t is the time of switching no laterthan the current time. The while loop in Line 2-19 adopts theidea of postponed switching to determine whether to performthe switching operation. Line 3 updates the new cost c

∼(t)m .

Line 4 invokes Algorithm 2, and Algorithm 2 further invokesAlgorithm 1 (with c

∼(t)m passed to Algorithm 1 to initialize

c∼(t)m ⋆) to obtain Ûy(t), ÛC

(t)

SC( Ûy(t), y(t)) and ÛC

(t)

−SC( Ûy(t)). Line 5

checks whether the overall non-switching cost ∆C−SC is atleast k times the switching cost ÛCt

SC( Ûy(t), y(t)), where the value

k here represents the “laziness” of switching, determiningwhether to postpone switching. Then, if so, the state of localgenerator should be changed, and the non-switching costand t should be updated. If the above conditions are notmet, the state of generator remains unchanged as in Line11-13, which avoids excessive switching. Line 14-15 updateθ(t)m for each winner m ∈ I, ensuring that a bid with less

remaining energy offered resulting in a larger cost, whereγ = maxm∈M,t∈T

{

Cam/g(t)m

}

. For other bidders m < I, the

value of θ(t)m remains unchanged. Finally, Line 20 sets the dualvariable θm for constraint (3c) with θ(T )m . For each round, theadjustment of θ(t)m results in the increment of θm, which leadsto the optimal solution of the dual problem (7).

t-1 t t+1

ℂ y 𝑡 = 𝐶−𝑆𝐶 𝑦 𝑡 + 𝐶𝑆𝐶 𝑦 𝑡 , 𝑦 𝑡−1𝑦 𝑡 = ሶ𝑦 𝑡 𝑜𝑟 𝑦 መ𝑡ሶ𝐶−𝑆𝐶 ሶ𝑦 𝑡 + ሶ𝐶𝑆𝐶 ሶ𝑦 𝑡 , ሶ𝑦 𝑡−1

ሶ𝒚 𝒕 = 𝟎 𝒐𝒓 𝟏 ሶ𝐶−𝑆𝐶 ሶ𝑦 𝑡

Algorithm 3

Algorithm 2

Algorithm 1

Find minimum cost

Judge condition

output

𝜏= መ𝑡𝑡 𝐶−𝑆𝐶𝜏 , 𝑦 መ𝑡𝜏= መ𝑡

𝑡−1 𝐶−𝑆𝐶𝜏 , 𝑦 መ𝑡

Fig. 5: The procedure of our online algorithm

Fig. 5 illustrates the whole procedure of our online algo-rithm. The relations among the three algorithms are as follows.At each time slot t, Algorithm 3 invokes Algorithm 2 to obtainswitching cost and non-switching cost, then judges whetherthe Ûy(t) value returned by Algorithm 2 meets the condition inAlgorithm 3 Line 5. If it is satisfied, then the y

(t) value, i.e.,the state of the local generator, is determined. Otherwise, thestate of the generator is consistent with that of the previoustime slot. Algorithm 2 will invoke Algorithm 1. Algorithm 2traverses the possible values of y

(t), and Algorithm 1 returnsthe non-switching cost to each corresponding y

(t). Algorithm2 finds the y

(t) that minimizes the total cost, and returns it toAlgorithm 3.

B. Competitiveness Analysis

In this section, we analyze the competitiveness, i.e., thelong-term social cost of our online algorithmic frameworkcompared to that of the offline optimal solutions.

Lemma 3. Algorithm 3 can produce a feasible solution for

the problem (5) and the dual LP of the problem (5).

Proof. See Appendix E. �

Theorem 4. Algorithm 3 is a 2γ

γ−1-approximation algorithm

for the problem (4).

Proof. See Appendix F. �

Theorem 5. Algorithm 3 is 2ǫ(

1 + 1k

)

γ

γ−1-competitive for the

problem (3), where ǫ = maxν∈[1,T ]maxy(ν)∈Y Cν

−SC

miny(ν)∈Y Cν

−SC.

Proof. The proof is based on Lemma 3 and Theorem 4. SeeAppendix G. �

V. EXPERIMENTAL EVALUATION

In this section, we conduct trace-driven experiments toevaluate EVCDR with multiple alternative approaches, andinterpret the results.

A. Experiment Settings

Local Generator: We assume that the charging station’slocal generator has a total capacity of V = 1500 kWh. Weadopt the diesel price of α = 2.24 cents/kWh [35] for thefuel cost. We set the maintenance cost of the local generatoras β = 48 $/h, and set the start-up cost as ζ = 15 $. Weassociate different weights of 0.5∼1.5 to the switching cost todemonstrate a spectrum of evaluation results.

Demand Response: For the demand response signals, weset the energy cap E (t) based on real-world grid load datafrom September 3, 2019 through September 9, 2019 [26], andto align with this, we treat one hour as one time slot andconduct simulations for a week of T = 168 hours. We set theelectricity price e(t) based on the hourly real-time pricing datafrom the wholesale electricity market [25].

EVs’ Energy Demand: Our energy demand W (t) is setusing the EV charging records from the adaptive chargingnetworks of California [24]. This dataset contains a seriesof charging records, where each record contains “connection-Time” (i.e., the time when the user plugs in), “disconnect-Time” (i.e., the time when the user unplugs), “userID” and“kWhRequested” (i.e., the energy demand).

Due to the limitation of the charging rate, the energyrequested by an EV may not be able to be fully charged withina single time slot we set (i.e., an hour). Therefore, we dividethe total amount of the energy requested by each EV intoseveral “energy packs”, which are random values in 6∼8 kWh[40], and each EV only needs to charge one “energy pack" inone time slot and thus finishes charging the requested energyover multiple consecutive time slots. Based on the above, weobtain the input of energy demand for the small-scale chargingstation setting, and we multiply the energy demand by 100to simulate a larger-scale test. Fig. 6 depicts the electricity

Page 10: Scheduling Online EV Charging Demand Response via V2V ...

10

0 2 4 6 8 10 12 14 16 18 20 22 24

Time(h)

0

500

1000

1500

2000

2500En

ergy

(kw

h)Hourly demand

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

Pric

e(ce

nts/k

wh)

Hourly price

Fig. 6: Electricity price and charg-ing demand

5 10 15 20 25

0.2

0.4

0.6

0.8

1.0

Norm

alize

d so

cial c

ost (a) Small-scale setting

Greedy and No AuctionLazy and No AuctionGreedy and AuctionEVCDROffline Optimun

40 80 120 160 200

Number of bidders

0.2

0.4

0.6

0.8

1.0

Norm

alize

d so

cial c

ost (b) Large-scale setting

Greedy and No AuctionLazy and No AuctionGreedy and AuctionEVCDROffline Optimun

Fig. 7: Social cost with differentnumber of bidders

0.5X 0.75X 1X 1.25X 1.5XWeight on switching cost

0.7

0.8

0.9

1.0

1.1

Nor

mal

ized

soci

al c

ost

Lazy and No AuctionGreedy and AuctionEVCDR

Fig. 8: Social cost with differentweights on switching cost

0.25x 0.5x 0.75x 1x 1.25x 1.5xWeight on

0.70

0.75

0.80

0.85

0.90

0.95

1.00

1.05

Nor

mal

ized

soci

al c

ost

EVCDR

Fig. 9: Social cost with differentweights on laziness

0 20 40 60 80 100Time(h)

0.00.20.40.60.81.0

Norm

olizd

ener

gy

Local generatorPower gridEVs

0 20 40 60 80 100Time(h)

0.00.10.20.30.40.50.6

Norm

olizd

cost Local generator

Power gridEVs

Fig. 10: Energy & Cost Fig. 11: Truthfulness

1 2 3 4 5 6 7 8 9 10Time slot

0

1

2

3

4

5

Paym

ent

Payment of bidder1Payment of bidder2

0.0

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

Cos

t

Cost of bidder1Cost of bidder2

Fig. 12: Cost vs. Payment Fig. 13: Running Time

price and the energy demand in a typical day, as used in ourevaluations under the setting of a larger-scale test.

EVs’ Bidding: We vary the number of the EV sellers asM = 40∼200. The amount of energy supply g

(t)m of an EV bid

varies randomly in the range of [2, 8] kWh; the bidding costc(t)m of an EV bid is the product of the amount of energy supplyg(t)m and a random value from the range of [0.018, 0.078]

$/kWh, following the cost of electricity. We assume each EV’scumulative energy budget Cam as 40 kWh [41].

Algorithms for Comparison: We compare our proposedapproach against the following algorithms: (1) Offline Op-timum, the offline Mixed Integer Program (MIP) optimumvia the CPLEX solver, where all inputs are the same withonline algorithm but known in advance; (2) Lazy and NoAuction, the online approach without auctions, where thecharging station charges EVs via the power grid and localgenerator, without EV sellers; and (3) Greedy and Auction,the online greedy approach with auctions, where the chargingstation directly changes the state of the local generator if theone-shot optimum indicates so, without postponing generatorswitching; (4) Greedy and No Auction, the online greedyapproach without auctions.

B. Evaluation Results

Impact of Number of Bidders: Fig. 7 shows the nor-malized social costs of different approaches as the numberof bidders grows in the small-scale (bidders of 5 ∼ 25) andlarge-scale (bidders of 40 ∼ 200) settings. The social costsdrop significantly as the number of bidders increases in bothtwo cases because the more charging choices (in terms of thenumber of bids) the charging station has, the cheaper elec-tricity the charging station can obtain to satisfy the demand.

As the number of bids increases, EVCDR obtains more cheapenergy to lower the total social cost, and thus is always betterthan the costs of “Greedy and No Auction” and “Lazy andNo Auction”; besides, due to accommodating the generatorswitching cost, EVCDR is more advantageous than “Greedyand Auction” and is also closer to the offline optimum.In this experiment, compared to “Greedy and No Auction”,EVCDR saves 13% ∼ 80% and 27% ∼ 62% social cost inthe large-scale and small-scale settings, respectively, showingthe benefit of jointly accommodating generator switching costand introducing EVs selling energy via auctions in the system;“Lazy and No Auction” saves 6% and 13% social cost in thelarge-scale and small-scale settings, respectively, showing thebenefit of accommodating generator switching cost; “Greedyand Auction” saves 11%∼64% and 15%∼50% social cost inthe large-scale and small-scale settings, respectively, showingthe benefit of introducing EVs selling energy via auctions.

Impact of Switching Cost: Fig. 8 compares the normalizedsocial costs of different algorithms, as the function of theweight on the switching cost. EVCDR beats “Greedy andAuction” because the latter always pursues one-shot optimumin each time slot and essentially neglects the switching cost.Thus, as the weight grows (i.e., the switching cost becomesmore dominating), EVCDR can address the switching costbetter. EVCDR also beats “Lazy and No Auction”, despiteboth consider the switching cost. Then, the cost advantage ofEVCDR primarily comes from the availability of the morechoices (i.e., bids) of energy sources, compared to the latter.

Impact of Generator State-Switching Laziness: Fig. 9investigates EVCDR with respect to how the “laziness” inour online algorithm affects the social cost. The laziness iscaptured by the parameter k, which is used to compare the

Page 11: Scheduling Online EV Charging Demand Response via V2V ...

11

cumulative non-switching cost to the switching cost and thendetermine whether to postpone changing the state of the localgenerator. The switching cost is addressed better and the socialcost decreases as the weight of k goes up when the weight ofk is less than 1, and as the weight of k decreases when theweight of k exceeds 1, respectively. A smaller weight of k mayincur frequent switches and a larger weight of k may meana stricter criterion for the switches, both of which could leadto suboptimal cost. Therefore, k should be carefully tailoredempirically in order to prevent postponing necessary switchesor causing excessive switches of the generator.

Energy scheduling & Price: Fig. 10 exhibits the varyingamount of energy from the power grid, the local generatorand the EVs, which is limited by the corresponding energycap (i.e., the energy cap available from grid, generator andthe remaining energy budget of EVs), and their costs, whosesum is defined as the social cost. The periodic changes ofEV usersâAZ total energy demand reflect a certain diurnalpattern. In peak hours, EVs often become the main energysupplier, especially in the EDR periods when the energy fromthe power grid is very low. The cost from the local generatoris significantly higher than others once the generator is inoperation, as its cost includes not only the fuel cost, but alsothe maintenance cost and the switching cost. It can also beinferred from this figure that the energy provided by the EVswill gradually diminish as the energy that has been sold bythe EVs gradually reaches the energy budget, which leads tothe increase of the local generator cost as time goes.

Truthfulness: Fig. 11 verifies the truthfulness of our auctionmechanism. Fig. 11 (1) picks up two bidders and visualizeshow their utilities vary as the bidding costs change. It exhibitsthat only bidding the true costs, i.e., 0.36 and 0.24, respec-tively, can make them achieve the highest utilities, and theutilities are always lower when not bidding the true costs.Fig. 11 (2) visualizes how their bid indicators (bid indicatorbeing 1 for the winner and bid indicator being 0 for theunsuccessful bidder) vary as the bidding costs change usingthe same two bidders. The figure exhibits that bidding lowerthan the true costs, i.e., 0.36 and 0.24, respectively, will alwayswin the auction and bidding higher may lose, validating themonotonicity allocation which results in truthful auctions.

Individual Rationality: Fig. 12 demonstrates the individualrationality of our auction mechanism. We randomly select twobidders, and record how their bidding costs and correspondingpayments change in 10 consecutive slots. We see that thepayment is always no less than the cost for each bidder, thusvalidating the individual rationality.

Execution Time and Scalability: Fig. 13 shows the runningtime of the single-round auction (i.e., Algorithm 1) and theentire online algorithm (i.e., Algorithm 3). As the numberof bidders reaches 200, our approach can finish its executionwithin 3.5 ms for each single-round auction and 600 ms forthe overall social cost optimization. As the number of biddersincreases, the growth of the running time gradually slowsdown, exhibiting the scalability of our approach in practice.

VI. RELATED WORK

EV Charging Scheduling for Demand Response: Yao et.al. [42] propose an online charging scheme which maximizesthe number of EV for charging and minimizes the electricitycost based on the real-time electricity tariff. Yi et. al. [12]explore online scheduling algorithms for EV charging underreal-time pricing and take into consideration the trade-offbetween cost-minimization and user dissatisfaction. Tuckeret. al. [13] study online charging scheduling strategy forfleets of autonomous-mobility-on-demand electric vehicles anduse primal-dual methods to solve the optimization problem.These papers mainly focus on the scheduling of EVs duringdemand response periods, but none of them consider incentivemechanisms such as auctions.

EV Charging Auction Mechanisms: Zhou et. al. [30]design a randomized auction framework to incentivize theparticipation of storage devices that aims to minimize thesocial cost in a demand response. They resort to the art ofsmoothed polynomial-time algorithm design and guarantee thetruthfulness, computational efficiency, and economic efficiencyof this auction. Zhong et. al. [43] study an efficient mechanismdesign for energy trading in a two-layer V2G architecture.However, their algorithms are all based on the offline situation,which cannot address market dynamics.

There are substantial research efforts in adopting onlineauctions. Zhang et. al. [44] propose an online randomizedauction framework, which use fractional VCG and a convexdecomposition technique to obtain the results. Xiang et. al.[45] study an online auction framework for park-and-chargeoperation mode. Zhang et. al. [46] design a novel onlinecontinuous progressive second price (OCPSP) based auctionscheme. The winner is selected according to the bidding of EVusers in the case of limited total power and the total numberof charging piles. However, their models don’t take V2Vcharging into consideration. Zhou et. al. [7] propose an onlineauction mechanism and a primal-dual approximation algorithmis designed. The algorithm is combined with decompositionalgorithm to solve the demand response problem in smartgrids. These papers do not consider the diversity of chargingmethods and how to alleviate the power shortage of chargingstations during EDR periods, resulting in the inability tomeet user demands. Factors such as V2V charging and localgenerator are not considered and exploited.

Our work in this paper is fundamentally more advantageousthan all the aforementioned literature in terms of the followingfour aspects: (1) we formulate our problem over continuoustime slots instead of just one round, which better capturesthe real-world demand response scenario; (2) we leverage thenew V2V charging scheme and introduce local generator asa participant of the energy supply as well, which enrichesthe diversity and flexibility of the energy source; (3) wefocus on the interactions between EV energy sellers and thecharging station through auction mechanism, while achievingthe desired economic properties; (4) we consider avoidingunnecessary switching costs by carefully controlling the state-switching of the local generator in an online manner with aconstant competitive ratio.

Page 12: Scheduling Online EV Charging Demand Response via V2V ...

12

VII. CONCLUSION

In this paper, we address the EV charging schedulingproblem under demand response with V2V auctions and localelectricity generation. To incentivize EVs to contribute to theenergy supply, we propose an online auction mechanism basedon the primal-dual approximation algorithm which decom-poses the long-term social cost minimization problem intoa series of single-round auctions over time. In addition, inorder to avoid the cost caused by excessive switching ofthe local generator, we design an online algorithm based onthe idea of postponing switching, which guarantees provablepolynomial running time, truthfulness, individual rationalityfor each auction. Finally, we conduct evaluations using real-world data traces and validate the practical superiority of ourapproach over multiple existing algorithms.

APPENDIX

A. Proof of Lemma 1

Firstly, we prove that the solution output by Algorithm1 is feasible to the single-round problem (6). According toAlgorithm 1, x

(t)m is initialized to 0, and set to 1 in Line 13,

which satisfies the constraint (6d). u(t) and z(t) are initializedto 0, and updated to no more than V y

(t) and E (t) respectively,which satisfies the constraints (6b) and (6c). The iterationstops when ∆(N (t)) ≤ 0 or M = ∅. For the former, (6a)holds according to Algorithm 1 Line 14-15, and M = ∅ onlyhappens when we cannot find a subset of bidders that meetsthe energy demand. A solution is feasible for a problem whenthis solution satisfies all the problemâAZs constraints. Thus,the solution given by Algorithm 1 is feasible to the problem(6).

Secondly, for the dual problem (7), we can observe that theconstraints (7b) and (7c) will never be violated when q(t) > 0,and (7d) holds according to Algorithm 1 Line 12 and Line20. The dual variable Z(N (t)) is initialized to 0 at first, andwe can obtain c∼τ

m∗⋆ = gm∗ (Nτ)Z(Nτ) at τ-th iteration, whichis guaranteed by Algorithm 1 Line 12. According to Line 7,c∼τm∗⋆ = Z(Nτ)gm∗(N

τ) = c∼τ−1m∗ ⋆ −Z(Nτ−1)gm∗(N

τ−1), wehave c∼1

m∗⋆ = Z(N1)gm∗(N1) + · · · + Z(Nτ)gm∗(N

τ). c∼1(t)m∗ ⋆

is set to c∼(t)m∗ at Line 4, and bid m∗ is appended to N (t)

at the end of τ-th iteration. Thus we can verity that forall m ∈ I,

N (t )⊆M:m<N (t ) Z(N (t))gm(N(t)) = c

∼(t)m . In the

case of m−< I, we can obtain c∼τm−⋆ = gm− (Nτ)Z(Nτ

m− ) ≥

gm− (Nτ)Z(Nτ), which is guaranteed by Algorithm 1 Line11-12. Based on the similar proof as above, we have∑

N (t )⊆M:m<N (t ) Z(N (t))gm− (N (t)) ≤ c∼(t)m− , ∀m ∈ M. Thus, the

constraint (7a) is satisfied.The while loop iterates at most M times and Line 7-8

and Line 10-12 take M steps respectively. Thus, the timecomplexity of Algorithm 1 is O(M2). So Algorithm 1terminates in polynomial time with a feasible solution forboth the single-round problem (6) and the dual problem (7).

B. Proof of Theorem 1

Suppose pA1 is objective value for the single-round problem(6) obtained by Algorithm 1, p∗

LPRis the optimal objective

value for the linear program relaxation of problem (6), i.e.,

our Primal problem, and p∗ is the optimal objective value ofthe single-round problem (6), our Algorithm 1 guarantees thatpA1 ≤ 2p∗

LPR≤ 2p∗. We prove it through as follows.

Case 1: According to Algorithm 1 Line 6, the while

loop stops when ∆(N (t)) ≤ 0, which means there is no setN (t) ⊆ M, such that ∆(N (t)) > 0, i.e., any EV bidder’ energysupplied can meet the whole demand without purchasing theenergy from the local generator or the power grid. Hence theminimum social cost can be obtained by comparing the costsincurred by purchasing energy only from the EV bidders, thepower grid or the local generator. Next we will discuss thecases when the number of set {N (t) |N (t) ⊆ M,∆(N (t)) > 0} isno less than 1.

Case 2: q(t) in Algorithm 1 means the total energy from thelocal generator and the grid, i.e., q(t)

= u(t)+e(t). So we firstlydiscuss the case when q(t)

= 0:

pA1 =

m∈M

c∼(t)m x

(t)m + αu(t) + z(t)e(t) (9a)

=

m∈I

c∼(t)m (9b)

=

m∈I

N (t )⊆M:m<N (t )

Z(N (t))gm(N(t)) (9c)

=

N (t )⊆M

Z(N (t))∑

m∈I\N (t )

gm(N(t)) (9d)

≤∑

N (t )⊆M

Z(N (t))(∑

m∈I\l

g(t)m −

m∈N (t )

g(t)m + gl(N

(t))) (9e)

≤∑

N (t )⊆M

Z(N (t))(W (t) −∑

m∈N (t )

g(t)m + gl(N

(t))) (9f)

≤∑

N (t )⊆M

Z(N (t))(∆(N (t)) + gl(N(t))) (9g)

≤∑

N (t )⊆M

z(N (t))(∆(N (t)) + ∆(N (t))) (9h)

≤ 2p∗LPR ≤ 2p∗ (9i)

Here l denotes the last bid added to the set I. Due toq(t)= 0, we can obtain (9b). (9c) follows from (7a). (9e) holds

by gm(N(t)) = min{g

(t)m ,∆(N

(t))}, and∑

m∈I\N (t ) gm(N(t)) ≤

m∈{I\{l }}\N (t ) g(t)m + gl(N

(t)) =∑

m∈{I\l } g(t)m −

m∈N (t ) g(t)m +

gl(N(t)). (9f) follows from

m∈I\l g(t)m ≤ W (t).

Case 3: When q(t) > 0, ρ(t), φ(t) = 0, it means the constraints(7b) and (7c) go tight and then the iteration stops, i.e., themaximum energy supplied by the grid and the local generatoris no less than the remainder demand ∆(N (t)), so we obtain:

pA1 =

m∈I

c∼(t)m + αu(t) + e(t)z(t)

We divide pA1 into two parts:∑

m∈I c∼(t)m and αu(t) + e(t)z(t),

and we discuss αu(t) + e(t)z(t) at first.

αu(t) + e(t)z(t) (10a)

=

N (t )⊆M

Z(N (t))u(t) +∑

N (t )⊆M

Z(N (t))z(t) (10b)

=

N (t )⊆M

Z(N (t))q(t) (10c)

Page 13: Scheduling Online EV Charging Demand Response via V2V ...

13

=

N (t )⊆M

Z(N (t))∆(N (t)) (10d)

(10b) follows from (7b) and (7c). (10d) follows from thedefinition of q(t). Then we focus on

m∈I c∼(t)m .

m∈I

c∼(t)m (11a)

=

N (t )⊆M

Z(N (t))∑

m∈I\N (t )

gm(N(t)) (11b)

≤∑

N (t )⊆M

Z(N (t))[∑

m∈I

g(t)m −

m∈N (t )

g(t)m ] (11c)

≤∑

N (t )⊆M

Z(N (t))(W (t) −∑

m∈N (t )

g(t)m ) (11d)

=

N (t )⊆M

Z(N (t))∆(N (t)) (11e)

(11b) follows from (7a). (11d) is due to W (t)=

m∈I g(t)m +

u(t) + z(t). (11e) follows from ∆(N (t)) = W (t) −∑

m∈N (t ) g(t)m , so

we can summarize as follows.

pA1 =

m∈I

c∼(t)m + αu(t) + e(t)z(t)

≤∑

N (t )⊆M

Z(N (t))(∆(N (t)) + ∆(N (t)))

≤∑

N (t )⊆M

Z(N (t))(2∆(N (t)))

≤ 2p∗LPR ≤ 2p∗

Case 4: when q(t) > 0, ρ(t), φ(t) > 0, it means that the con-straints (7b) and (7c) go tight once while the maximum energysupplied by the grid and the local generation cannot meet theremainder demand ∆(N (t)), i.e., V y

(t)+ E (t) < ∆(N (t)).

pA1 =

m∈I

c∼(t)m + αu(t) + e(t)z(t) (12a)

=

N (t )⊆M

Z(N(t))(∑

m∈I\l

g(t)m −

m∈N (t )

g(t)m + gl(N

(t)))+

N (t )⊆M

Z(N(t))V y(t) − ρ(t)V y

(t)+

N (t )⊆M

Z(N(t))E (t)

− φ(t)E (t) (12b)

=

N (t )⊆M

Z(N(t))(∑

m∈I\l

g(t)m −

m∈N (t )

g(t)m + gl(N

(t))+

V y(t)+ E (t)) − ρ(t)V y

(t) − φ(t)E (t) (12c)

≤∑

N (t )⊆M

Z(N(t))(W (t) −∑

m∈N (t )

g(t)m + gl(N

(t)))−

ρ(t)V y(t) − φ(t)E (t) (12d)

≤∑

N (t )⊆M

Z(N(t))(2∆(N(t)) − V y(t) − E (t))−

ρ(t)V y(t) − φ(t)E (t) (12e)

≤ 2(∑

N (t )⊆M

Z(N(t))∆(N(t)) − V y(t)ρ(t) − E (t)φ(t)) (12f)

= 2p∗LPR ≤ 2p∗ (12g)

(12b) follows from the constraints (7a)-(7c). (12d) is due toW (t) >

m∈I\l g(t)m +V y

(t)+E (t). (12e) holds by ∆N (t)

= W (t)−∑

m∈N (t ) g(t)m and gl(N

(t)) = W (t) −∑

m∈N (t ) g(t)m − E (t) − V y

(t).

(12f) is due to the fact that the number of set {N (t) |N (t) ⊆

M,∆(N (t)) > 0} is no less than 1.Case 5: when q(t) > 0, ρ(t) = 0, φ(t) > 0, it means that the

constraints (7b) and (7c) go tight and e(t) reaches its maximumvalue E (t).

pA1 =

m∈I

c∼(t)m + αu(t) + e(t)z(t) (13a)

=

N (t )⊆M

Z(N(t))(∑

m∈I\l

g(t)m −

m∈N (t )

g(t)m + gl(N

(t)))+

N (t )⊆M

Z(N(t))u(t) +∑

N (t )⊆M

Z(N(t))E (t) − φ(t)E (t) (13b)

=

N (t )⊆M

z(N(t))(∑

m∈I\l

g(t)m −

m∈N (i)

g(t)m + gl(N

(t))+

u(t) + E (t)) − φ(t)E (t) (13c)

≤∑

N (t )⊆M

Z(N(t))(W (t) −∑

m∈N (t )

g(t)m + gl(N

(t))) − φ(t)E (t)

(13d)

≤∑

N (t )⊆M

Z(N(t))(2∆(N(t)) − E (t)) − φ(t)E (t) (13e)

≤ 2(∑

N (t )⊆M

Z(N(t)) − E (t)φ(t)) (13f)

≤ 2p∗LPR ≤ 2p∗ (13g)

Case 6: When q(t) > 0, ρ(t) > 0, φ(t) = 0, the proof processis the same as case 5.

Based on above discussion, we prove that Algorithm 1 isa 2-approximation algorithm.

C. Proof of Lemma 2

Firstly, we prove that the mechanism is monotone. Accord-ing to Algorithm 1, we have

m∗= arg minm∈M{

c∼(t )m −

N (t )⊆M:m<N (t ) Z(N(t ))gm(N (t ))

gm(N (t ))}. g

(t)m1=

g(t)m2

means gm1(N (t)) = gm2

(N (t)). When c∼(t)m1

≤ c∼(t)m2

, we have

c∼(t)m1

−∑

N (t )⊆M:m1<N(t ) Z(N (t))gm1

(N (t))

gm1(N (t))

≤c∼(t)m2

−∑

N (t )⊆M:m2<N(t ) Z(N (t))gm2

(N (t))

gm2(N (t))

,

so if m2 is selected at the τ-th iteration, m1 must be selected.Secondly, we prove that the mechanism can output critical

payment. According to the Algorithm 1, if we exclude m∗

from the candidates set, m− would be the first bid to bechosen, so m− is the threshold bid for m∗. We compute

the payment to bidder m∗ such thatc∼(t )

m∗ ⋆

gm∗ (N (t ))=

c∼(t )m−⋆

gm− (N (t )),

which means at τ-th iteration, c∼τm∗⋆ = gm∗ (N (τ))Z(Nm− ).

According to the previous proof in Lemma 1, we have∑

N ⊆M:m<N Z(N)gm(N) = c∼m, ∀m ∈ I,

c∼m∗ = Z(N1)gm∗(N1) + · · · + Z(Nτ)gm∗(N

τ)

Pm∗ = Z(N1)gm∗(N1) + · · · + Z(Nm− )gm∗(N

τ)

Pm∗ = c∼m∗ + (Z(Nm− ) − Z(Nτ))gm∗ (Nτ)

Thus, we obtain P(t)m∗ = c

∼(t)m∗ + (Z(Nm− ) − Z(N (t)))gm∗ (N (t)).

D. Proof of Theorem 3

Page 14: Scheduling Online EV Charging Demand Response via V2V ...

14

We prove the truthfulness of Algorithm 1 accordingto Lemma 2. As for individual rationality, due toP(t)m∗ = c

∼(t)m∗ + (Z(Nm− ) − Z(N (t)))gm∗ (N (t)), and

Z(Nm− ) > Z(N (t)), we have P(t)m∗ ≥ c

∼(t)m∗ , utility um∗ ≥ 0 and

payment P(t)m∗ ≥ 0. Finally, we prove that the proposed auction

mechanism achieves truthfulness and individual rationality.

E. Proof of Lemma 3

Firstly, Algorithm 1 can provide a feasible solution for theproblem (6) according to Lemma 1. Hence, x

(t)m satisfies (5e),

and the constraints (5a) (5c) (5d) are also guaranteed. As forthe constraint (5b), each bidder cannot offer energy exceeds itsremaining energy budget, so this constraint is also guaranteed.Secondly, Algorithm 3 has the time complexity of O(T M2).Line 1 takes O(M) steps. Line 4 invokes Algorithm 2, andAlgorithm 2 takes constant steps to invoke Algorithm 1 whichis proved in O(M2) steps. Line 3, Lines 14 and Line 16 run atmost M times, respectively. The while loop has T iterations.Thus, the total time complexity is O(T M2).

Next for the dual LP of problem (5). Based on the primalproblem (5), we can derive its dual LP problem as followsby introducing Z(N (t)), θm, ρ

(t), φ(t) as dual variables for theconstraints (5a), (5b), (5c), (5d), respectively:

Max∑

N (t )⊆MZ(N (t))∆(N (t)) +

m∈[M]

θmCam

− ρ(t)V y(t) − φ(t)E (t)

Subject to:∑

N (t )⊆M:m<N (t )

Z(N (t))gm(N(t)) ≤ c

(t)m + θmg

(t)m , ∀m ∈ M

N (t )⊆M

Z(N (t)) ≤ α + ρ(t)

N (t )⊆M

Z(N (t)) ≤ e(t) + φ(t)

Z(N (t)), ρ(t), φ(t) ≥ 0, ∀N (t) ⊆ M

Due to that Algorithm 1 can provide a feasible solution forthe problem (7) which is proved in Lemma 1, the constraints∑

N (t )⊆M Z(N (t)) ≤ α + ρ(t),∑

N (t )⊆M Z(N (t)) ≤ e(t) + φ(t) andZ(N (t)), ρ(t), φ(t) ≥ 0 can be guaranteed. And then we prove∑

N (t )⊆M:m<N (t ) Z(N (t))gm(N(t)) ≤ c

(t)m + θmg

(t)m as follows:

N (t )⊆M:m<N (t )

Z(N (t))gm(N(t)) ≤ c

∼(t)m (14a)

N (t )⊆M:m<N (t )

Z(N (t))gm(N(t)) ≤ c

(t)m + g

(t)m θ

(t−1)m (14b)

N (t )⊆M:m<N (t )

Z(N (t))gm(N(t)) ≤ c

(t)m + θ

Tmg

(t)m (14c)

N (t )⊆M:m<N (t )

Z(N (t))gm(N(t)) ≤ c

(t)m + θmg

(t)m (14d)

(14a) follows from (7a). (14b) holds by c∼(t)m = c

(t)m +g

(t)m θ

(t−1)m

in Algorithm 3 Line 3. (14c) holds by the fact that θ(t)m is no-decreasing with t. (14d) is due to the last line in Algorithm3,i.e., θm = θ

(T )m . So the constraints of the problem (5) are all

satisfied, and Algorithm 3 can output a feasible solution fordual LP of problem (5).

Based on the above, Algorithm 3 produces a feasiblesolution for the problem (5) and the dual LP of problem (5).

F. Proof of Theorem 4

Suppose P(t) is the objective value of problem (5) returnedby Algorithm 3, ∆P(t)

= P(t)−P(t−1), and ∆D(t)= D(t)−D(t−1)

is for its dual LP of problem (5). Then, we can obtain:∆P(t)

= P(t) − P(t−1)=

m∈I c(t)m + αu(t) + e(t)z(t)

∆D(t)= D(t) − D(t−1)

= d +∑

m∈I Cam(θ(t−1)m − θ

(t)m )

∆D(t)=

m∈I

Cam(θ(t−1)m − θ

(t)m ) + d (15a)

= d −

m∈I g(t)m θ

(t−1)m

2−

m∈I c(t)m + αu(t) + e(t)z(t)

2γ(15b)

≥pA1

2−

m∈I g(t)m θ

(t−1)m

2−

m∈I c(t)m + αu(t) + e(t)z(t)

2γ(15c)

m∈I c∼(t)m + αu(t) + e(t)z(t)

2−

m∈I g(t)m θ

(t−1)m

2

m∈I c(t)m + αu(t) + e(t)z(t)

2γ(15d)

= (1

2−

1

2γ)∆P(t) (15e)

(15b) holds by θ(t)m = θ(t−1)m (1 +

g(t )m

2Cam) +

c(t )m +αu

(t )+z(t )e(t )

2γCam.

(15c) is due to pA1 ≤ 2d according to Theorem 1. SinceP(0)

= 0,D(0)= 0, and ∆P(t) ≤ 2

γ

γ−1∆D(t), we have

∆P(T ) ≤ 2γ

γ−1∆D(T ). By the validity of the flow-cover

inequalities, every feasible solution to problem (5) is afeasible solution to problem (4), so Algorithm 3 is a 2

γ

γ−1

-approximation algorithm for problem (4).

G. Proof of Theorem 5

According to Algorithm3, we know that the switching costat time slot t is at most 1

ktimes the non-switching cost within

the time frame [t, t − 1], i.e., CSC ≤ 1k∆C−SC , here t is

the last time stamp of local generator switch. So we have∑T

ν=1 CνSC

(y(ν), y(ν − 1)) ≤ 1k

∑Tν=1 Cν

−SC(y(ν),x(ν), u(ν), z(ν))

in the worst case, i.e., the state of local generator changes ineach time slot, and then we obtain:

T∑

ν=1

Cν(y(ν),x(ν), u(ν), z(ν))

=

T∑

ν=1

CνSC(y(ν), y(ν − 1)) +

T∑

ν=1

Cν−SC(y(ν),x(ν), u(ν), z(ν))

≤(1 +1

k)

T∑

ν=1

Cν−SC(y(ν),x(ν), u(ν), z(ν))

Because ǫ = maxν∈[1,T ]maxy(ν)∈Y Cν

−SC(y(ν),x(ν),u(ν),z(ν))

miny(ν)∈Y Cν

−SC(y(ν),x(ν),u(ν),z(ν))

, and

C(t)

−SCgiven by Algorithm 3 is at most 2

γ

γ−1times optimal

solution which is verified by Theorem 4, we have:

Page 15: Scheduling Online EV Charging Demand Response via V2V ...

15

T∑

ν=1

Cν−SC ≤

T∑

ν=1

maxy(ν)∈Y

Cν−SC(y(ν),x(ν), u(ν), z(ν))

≤ ǫ

T∑

ν=1

miny(ν)∈Y

Cν−SC(y(ν),x(ν), u(ν), z(ν))

≤ 2ǫγ

γ − 1

T∑

ν=1

Cν∗−SC

≤ 2ǫγ

γ − 1

T∑

ν=1

C∗

Based on the above, we can obtain:

T∑

ν=1

[CνSC(y(ν), y(ν − 1)) + Cν

−SC(y(ν),x(ν), u(ν), z(ν))]

≤ (1 +1

k)

T∑

ν=1

Cν−SC(y(ν),x(ν), u(ν), z(ν))

≤ 2ǫ(1 +1

k)γ

γ − 1

T∑

ν=1

C∗(x∗(ν), y∗(ν), u∗(ν), z∗(ν))

Finally, we prove that Algorithm 3 is a 2ǫ(1 + 1k)

γ

γ−1-

competitive algorithm for the problem (3).

REFERENCES

[1] Z. Ma, S. Zou, X. Liu, and I. Hiskens, “Efficient coordination of electricvehicle charging using a progressive second price auction,” IEEE 2015

American Control Conference (ACC), pp. 2999–3006, 2015.[2] X. Zhang, J. Xie, R. Rao, and Y. Liang, “Policy incentives for the

adoption of electric vehicles across countries,” Sustainability, pp. 8056–8078, 2014.

[3] B. Upadhaya, D. Feng, Y. Zhou, Q. Gui, X. Zhao, and D. Wu, “Optimaldecision making model of battery energy storage-assisted electric vehiclecharging station considering incentive demand response,” CoRR, 2019.

[4] S. Chen, L. Jiao, L. Wang, and F. Liu, “An online market mechanismfor edge emergency demand response via cloudlet control,” in IEEE

Conference on Computer Communications INFOCOM, 2019, pp. 2566–2574.

[5] A. Verma and B. Singh, “Energy management strategy of solar pv-battery and diesel generator based electric vehicle charging station,” in2018 IEEE Energy Conversion Congress and Exposition (ECCE), 2018.

[6] B. Singh, A. Verma, A. Chandra, and K. A. Haddad, “Implementationof solar pv- battery and diesel generator based electric vehicle chargingstation,” IEEE Transactions on Industry Applications, pp. 1–1, 2020.

[7] R. Zhou, Z. Li, and C. Wu, “An online procurement auction for powerdemand response in storage-assisted smart grids,” in IEEE Conference

on Computer Communications, INFOCOM, 2015, pp. 2641–2649.[8] E. Bulut, M. C. Kisacikoglu, and K. Akkaya, “Spatio-temporal non-

intrusive direct V2V charge sharing coordination,” IEEE Trans. Vehicu-

lar Technology, pp. 9385–9398, 2019.[9] R. Zhang, X. Cheng, and L. Yang, “Stable matching based cooperative

V2V charging mechanism for electric vehicles,” in IEEE Vehicular

Technology Conference, 2017, pp. 1–5.[10] R. Sioshansi, “Or forumâATmodeling the impacts of electricity tariffs

on plug-in hybrid electric vehicle charging, costs, and emissions,”Operations Research, pp. 506–516, 2012.

[11] A. Trivedi, N. M. Pindoriya, D. Srinivasan, and D. Sharma, “Improvedmulti-objective evolutionary algorithm for day-ahead thermal generationscheduling,” in Evolutionary Computation, 2011.

[12] H. Yi, Q. Lin, and M. Chen, “Balancing cost and dissatisfaction in onlineEV charging under real-time pricing,” in IEEE Conference on Computer

Communications INFOCOM, 2019, pp. 1801–1809.

[13] N. Tucker, B. Turan, and M. Alizadeh, “Online charge scheduling forelectric vehicles in autonomous mobility on demand fleets,” in IEEE

Intelligent Transportation Systems Conference, ITSC, 2019, pp. 226–231.

[14] L. Hou, C. Wang, and J. Yan, “Bidding for preferred timing: An auctiondesign for electric vehicle charging station scheduling,” CoRR, 2019.

[15] Z. Liu, Q. Wu, S. Huang, L. Wang, M. Shahidehpour, and Y. Xue,“Optimal day-ahead charging scheduling of electric vehicles throughan aggregative game model,” IEEE Trans. Smart Grid, pp. 5173–5184,2018.

[16] Y. Zhou, R. Kumar, and S. Tang, “Incentive-based distributed schedulingof electric vehicle charging under uncertainty,” Power Systems, IEEE

Transactions on, pp. 3–11, 2019.[17] D. Li, Q. Yang, D. An, W. Yu, X. Yang, and X. Fu, “On location privacy-

preserving online double auction for electric vehicles in microgrids,”IEEE Internet Things J., pp. 5902–5915, 2019.

[18] A. Yassine, M. S. Hossain, G. Muhammad, and M. Guizani, “Doubleauction mechanisms for dynamic autonomous electric vehicles energytrading,” IEEE Trans. Vehicular Technology, pp. 7466–7476, 2019.

[19] E. H. Clarke, “Multipart pricing of public goods,” Public choice 11, pp.17–33, 1971.

[20] W. Vickrey, “Counterspeculation,auctions,and competitive sealed ten-ders,” The Journal of finance 16,1, pp. 8–37, 1961.

[21] T. Groves, “Incentives in teams,” Econometrica: Journal of the Econo-

metric Society, p. 617âAS631, 1973.[22] R. D. Carr, L. Fleischer, V. J. Leung, and C. A. Phillips, “Strengthening

integrality gaps for capacitated network design and covering problems,”in Proceedings of the Eleventh Annual ACM-SIAM Symposium on

Discrete Algorithms, 2000, pp. 106–115.[23] Roger, B., and Myerson, “Optimal auction design,” Mathematics of

Operations Research, 1981.[24] Z. J. Lee, T. Li, and S. H. Low, “ACN-Data: Analysis and Applications

of an Open EV Charging Dataset,” in Proceedings of the Tenth Inter-

national Conference on Future Energy Systems, ser. e-Energy ’19, Jun.2019.

[25] “Hourly pricing,” https://hourlypricing.comed.com/live-prices/.[26] “Power generation,” http://www.elia.be/en/grid-data/power-generation/.[27] C. Liu, K. T. Chau, D. Wu, and S. Gao, “Opportunities and challenges of

vehicle-to-home, vehicle-to-vehicle, and vehicle-to-grid technologies,”Proc. IEEE, pp. 2409–2427, 2013.

[28] D. Li, Q. Yang, W. Yu, D. An, and X. Yang, “Towards double auctionfor assisting electric vehicles demand response in smart grid,” in IEEE

Conference on Automation Science and Engineering, CASE, 2017, pp.1604–1609.

[29] M. H. HajiesmailiâAa, C.-K. ChauâAa, M. ChenâAa, and L. HuangÂg,“Online microgrid energy generation scheduling revisited: The benefitsof randomization and interval prediction,” in International Conference

on Future Energy Systems, 2016.[30] R. Zhou, Z. Li, C. Wu, and M. Chen, “Demand response in smart

grids: A randomized auction approach,” IEEE J. Sel. Areas Commun.,pp. 2540–2553, 2015.

[31] Z. Wang, W. Wu, and B. Zhang, “A fully distributed power dispatchmethod for fast frequency recovery and minimal generation cost inautonomous microgrids,” IEEE Transactions on Smart Grid, vol. 7,no. 1, pp. 19–31, 2016.

[32] Ying, Zhang, Mohammad, H., Hajiesmaili, Sinan, Cai, Minghua, Chen,and Q. and, “Peak-aware online economic dispatching for microgrids,”IEEE Transactions on Smart Grid, 2016.

[33] L. Lu, J. Tu, C. K. Chau, M. Chen, and X. Lin, “Online energygeneration scheduling for microgrids with intermittent energy sourcesand co-generation,” Acm Sigmetrics Performance Evaluation Review,vol. 41, no. 1, pp. 53–66, 2013.

[34] M. H. Hajiesmaili, C. K. Chau, M. Chen, and L. Huang, “Onlinemicrogrid energy generation scheduling revisited: the benefits of ran-domization and interval prediction,” ACM, 2016.

[35] S. Chen, Z. Zhou, F. Liu, Z. Li, and S. Ren, “Cloudheat: An efficientonline market mechanism for datacenter heat harvesting,” TOMPECS,pp. 11:1–11:31, 2018.

[36] N. Nisan and A. Ronen, “Computationally feasible VCG mechanisms,”CoRR, 2011.

[37] David, K., and Smith, “Theory of linear and integer programming,”Journal of the Operational Research Society, 1987.

[38] E. T. N. Nisan, T. Roughgarden and V. V. Vazirani, Algorithmic game

theory. Cambridge University Press, 2007.[39] A. Archer and É. Tardos, “Truthful mechanisms for one-parameter

agents,” in 42nd Annual Symposium on Foundations of Computer

Science, FOCS, 2001, pp. 482–491.

Page 16: Scheduling Online EV Charging Demand Response via V2V ...

16

[40] B. Alinia, M. H. Hajiesmaili, and N. Crespi, “Online EV chargingscheduling with on-arrival commitment,” IEEE Trans. Intell. Transp.

Syst., pp. 4524–4537, 2019.[41] D. Li, Q. Yang, W. Yu, D. An, X. Yang, and W. Zhao, “A strategy-proof

privacy-preserving double auction mechanism for electrical vehiclesdemand response in microgrids,” in IEEE International Performance

Computing and Communications Conference, IPCCC, 2017, pp. 1–8.[42] L. Yao, W. H. Lim, and T. S. Tsai, “A real-time charging scheme for

demand response in electric vehicle parking station,” IEEE Trans. Smart

Grid, pp. 52–62, 2017.[43] W. Zhong, K. Xie, Y. Liu, C. Yang, and S. Xie, “Efficient auction

mechanisms for two-layer vehicle-to-grid energy trading in smart grid,”in IEEE International Conference on Communications, ICC, 2017, pp.1–6.

[44] L. Zhang, Z. Li, and C. Wu, “Randomized auction design for electricitymarkets between grids and microgrids,” in ACM SIGMETRICS / Interna-

tional Conference on Measurement and Modeling of Computer Systems,

SIGMETRICS, 2014, pp. 99–110.[45] Q. Xiang, F. Kong, X. Liu, X. Chen, L. Kong, and L. Rao, “Auc2charge:

An online auction framework for eectric vehicle park-and-charge,” inProceedings of the 2015 ACM Sixth International Conference on Future

Energy Systems, e-Energy, 2015, pp. 151–160.[46] Y. Zhang, Q. Yang, W. Yu, D. An, D. Li, and W. Zhao, “An online con-

tinuous progressive second price auction for electric vehicle charging,”IEEE Internet of Things Journal, pp. 2907–2921, 2019.

Yulan Yuan received the BEng degree in Telecom-munications Engineering with Management fromBeijing University of Posts and Telecommunica-tions, China, in 2019. She is now a master student inSchool of Artificial Intelligence in Beijing Univer-sity of Posts and Telecommunications. Her researchinterests are in the areas of online learning, networkoptimization, and federated learning.

Lei Jiao received the Ph.D. degree in computer sci-ence from the University of Göttingen, Germany. Heis currently an assistant professor at the Departmentof Computer and Information Science, University ofOregon, USA. Previously he worked as a memberof technical staff at Alcatel-Lucent/Nokia Bell Labsin Dublin, Ireland and also as a researcher at IBMResearch in Beijing, China. He is interested inthe mathematics of optimization, control, learning,and mechanism design, applied to computer andtelecommunication systems, networks, and services.

He publishes papers in journals such as IEEE/ACM Transactions on Net-working, IEEE Transactions on Parallel and Distributed Systems, IEEETransactions on Mobile Computing, and IEEE Journal on Selected Areas inCommunications, and in conferences such as INFOCOM, MOBIHOC, ICNP,and ICDCS. He is a recipient of the NSF CAREER Award. He also receivedthe Best Paper Awards of IEEE LANMAN 2013 and IEEE CNS 2019, andthe 2016 Alcatel-Lucent Bell Labs UK and Ireland Recognition Award. Heserved as a guest editor for IEEE JSAC. He was on the program committees ofconferences including INFOCOM, MOBIHOC, ICDCS, and IWQoS, and wasalso the program chair of multiple workshops with INFOCOM and ICDCS.

Konglin Zhu received the master’s degree in com-puter Science from the University of California,Los Angeles, CA, USA, and the Ph.D. degree fromthe University of Göttingen, Germany, in 2009 and2014, respectively. He is now an Associate Professorwith the Beijing University of Posts and Telecom-munications, Beijing, China. His research interestsinclude Internet of Vehicles and V2X communica-tions.

Lin Zhang received the B.S. and the Ph.D. degreesin 1996 and 2001, both from the Beijing Universityof Posts and Telecommunications, Beijing, China.From 2000 to 2004, he was a Postdoctoral Re-searcher with Information and Communications Uni-versity, Daejeon, South Korea, and Nanyang Techno-logical University, Singapore, respectively. He joinedBeijing University of Posts and Telecommunicationsin 2004, where he has been a Professor since 2011.His current research interests include mobile cloudcomputing and Internet of Things.