Proﬁt-aware Online Vehicle-to-Grid Decentralized Scheduling under Multiple Charging Stations

—Fluctuations in electricity tariffs induced by the sporadic nature of demand loads on power grids has initiated immense efforts to ﬁnd optimal scheduling solutions for charging and discharging plug-in electric vehicles (PEVs) subject to different objective sets. In this paper, we consider vehicle-to-grid (V2G) scheduling at a geographically large scale in which PEVs have the ﬂexibility of charging/discharging at multiple smart stations coordinated by individual aggregators. We ﬁrst formulate the objective of maximizing the overall proﬁt of both, demand and supply entities, by deﬁning a weighting parameter. We then propose an online decentralized greedy algorithm for the formulated mixed integer non-linear programming (MINLP) problem, which incorporates efﬁcient heuristics to practically guide each incoming vehicle to the most appropriate charging station (CS). The better performance of the presented algorithm compared to an alternative allocation strategy is demonstrated through simulations in terms of the overall achievable proﬁt and ﬂatness of the ﬁnal electricity load. Moreover, the results of simulations reveal the existence of optimal number of deployed stations at which the overall proﬁt can be maximized.


I. INTRODUCTION
G ROWING awareness of energy and environmental crises has catalyzed the evolutionary shift towards electrifying personal transportation. In recent years, investments on electric vehicles (EVs) as eco-friendly and cost-efficient substitutes for conventional fuel-propelled automobiles that exhaust natural resources have been over-whelming. Classified broadly based on their mode of propulsion, plug-in electric vehicles (PEVs) which are purely battery electric vehicles have benefits far more broad than conventional vehicles [1]. These benefits however, are accompanied by various new challenges as more EVs are integrated into the power grid. Prime concerns include power distribution instability and transmission congestion due to the unmanaged charging and/or discharging of EVs at grid-connected electric vehicle supply equipments, commonly known as charging stations (CSs).
From the research prospective, optimal charging and discharging of EVs have been widely scrutinized due to their significant impact on the load regulation of vehicle-to-grid (V2G) systems [2], [3], [5], [6]. by shifting the demands of charging EVs from peak load hours to off-peak periods [7]. With regard to power costs at different time intervals and uncertainty in EV arrival times, smart scheduling techniques are required to not only satisfy profit expectations, but also prevent the grid from crashing through power load flattening [3], [9]. The geographical scale over which existing works on V2G scheduling are studied can be classified in terms of the number of aggregators involved. Non-preemptive allocation of EVs for charging/discharging operations occur either at a single CS managed by a single aggregator (SCS-SA) [3], [9], [10], where the scheduler has global information on the energy requirement and departure time of each EV, or at multiple CSs coordinated by an aggregator (MCS-SA) [3], where the scheduling optimization problem is locally solved in each group.
The V2G scheduling of EVs, comprising of multiple number of spatially-distributed CSs each managed by individual aggregators has however, not yet been investigated under which EVs seeking service experience a higher degree of flexibility in selecting the station that yields the most achievable profit. Under this scenario, the overall profit can be affected by variations arising in the system parameters such as CS cardinality and maximum vehicle capacity at each CS. Hence, selection of optimal system parameters can essentially alleviate the net auxiliary and establishment costs incurred by the CSs. Moreover, the authors of [3] and [9] merely focus on the gross profit of EV owners without accounting for the profit of CSs in their objective functions. On the other side, the EVs scheduling problem in [22] considers the objective of maximizing the overall obtainable profit of only aggregators. From the V2G management system point of view, in order to encourage the energy utility provider to establish CSs for delivering the energy to EVs, it necessitates to share relatively the obtainable profit between EVs and the CSs.
Inspired by the before-mentioned limitations and this later motivation, the main contributions of this paper are highlighted as follows: • The problem of profit maximization considering realtime pricing for EV charging/discharging scheduling in a large- to an alternative allocation strategy in terms of overall achievable profit as well as the flatness of final electricity load are shown through simulation results. Furthermore, optimal point for the number of deployed stations is also attained by system parametric adjustments. This optimal point can help V2G system designers to optimize their investment budget. The remainder of this paper is structured as follows. Related works on EV scheduling in smart grids are briefly reviewed in Section II. Section III introduces the system model and notations, followed by scheduling problem formulation in Section IV. The proposed online greedy algorithm and its theoretical analysis are detailed in Section V. Simulation setup and results are provided in Section VI. Finally, Section VII concludes the paper.

II. RELATED WORKS
Allocation strategies for EV charging/discharging with different objectives have been studied in many recent works [2]- [5], [9]- [11]. The main challenge in devising real-time allocation algorithms in V2G is the uncertainty of future departure times and charging demands of EVs a priori. The non-preemptive scheduling problem studied by He et al. [3] accounts for the real-time pricing and degradation/fluctuation costs of batteries in obtaining the minimum charging costs. They consider the scenario of online EVs arrival to several small and closely-located CSs managed by a single aggregator and design a decentralized locally-optimal algorithm. In [11], the authors provide a closed-form solution to determine the optimal charging power of a single EV under time-of-use (ToU) pricing model and uncertain departure time. The authors of [5] proposed an online algorithm with proven competitive ratio for obtaining a sub-optimal solution with slightly higher cost as compared to the offline optimal solution, while satisfying the desired energy requirements imposed by the vehicles.
While many other set-ups and approaches have been applied to envisage vehicle-to-grid interactions in the literature [12], [13], scheduling in a large-scale V2G environment in which EVs have the flexibility of getting service at multiple charging stations coordinated by their individual aggregators, referred to as MCS-MA in this paper, has not been explored so far. Therefore, to fill this gap, we investigate the problem of profit maximization under multiple CSs by proposing an optimization model that incorporates the practically existing constraints on the capacity and associated auxiliary costs of each station. By considering the indeterministic arrival of EVs during the scheduling process, we propose an online greedy algorithm that guides incoming EVs to the most suitable CS.
We note that the most closing work to ours has been addressed in [22] in which the authors investigate the problem of profit maximization considering multiple geographically distributed CSs. However, our work is different from [22] in Base load of other devices excluding EVs and total load in time slot t at CS k Binary allocation of EV a to CS k and its x t a,k , e t a,k corresponding power in time slot t the following ways: We consider multiple categories of PEVs and investigate the maximization of relative obtainable profit of both supply and demand entities. Furthermore, in contrast to [22], more realistic system parameters are incorporated into the proposed optimization model such as PEV's battery as well as the ancillary associated costs with CSs. Furthermore, we achieve more insightful results through extensive simulations under the problem objective such as the optimal number of CSs under the proposed V2G system.

III. SYSTEM MODEL
We consider a system comprising of K CSs, each indexed as CS k where k ∈ {1, 2, . . . , K}, and a set of incoming EVs, denoted by M such that |M | = m, which according to [3] is categorized into three groups such that |M CG ∪ M DG ∪ M V 2G | = m. Here, M CG represents the set of EVs that only require charging from the grid, M DG is the set of EVs that only discharge energy to the grid, and M V 2G denotes the set of EVs participating in bi-directional V2G operations. EVs leave their homes during a time in the morning and select a charging station on the way to their offices. Note that the set of PEVs in M DG are those which have enough energy to reach their offices and are willing to sell some portions of battery's energy by returning back to the grid. Assuming time to be discrete as in [9], [14], the scheduling period over a single day is |T | equally divided time slots, each of duration ∆t hour. The maintenance cost of an EV at CS k is taken to be M C k . Correspondingly, we also assume an identical labor/service cost denoted as LC k . Note that the maintenance cost is paid by EV to the station while on the other side, for performing the maintenance, the CS has to pay the service cost to the labor. We consider non-preemptive allocation of EVs for charging and discharging activities at each station with A a,k and D a,k as the arrival and departure times of vehicle a at CS k . For a given EV a, T a,k = {t f a,k , t f +1 a,k , . . . , t l a,k } represents a set of the consecutive time slots in charging/discharging interval at CS k , satisfying the following constraint: Model parameters regarding battery degradation due to high charging/discharging frequencies (α) and fluctuations (β) are also taken into account to include the auxiliary costs associated with EV batteries [1], [3]. The decision variables, charging/discharging power, as well as the parameters on energy requirement of EVSs have been all summarized in Table I. Furthermore, the parameters d a,k represent the distance of EV a from its home to CS k and F a , the force of its electric motor. Hence, the energy consumed during the travelled distance from home to CS k by EV a is computed as d a,k × F a . where EVs are allowed to select their CS for service. Each CS is coordinated by an individual aggregator which facilitates the bidirectional information and energy flow between EVs and the power grid. Given the total number of EVs in the system, their respective arrival epochs at the CS vary randomly over discrete time. Prior to CS selection, each EV sends scheduling-related data to the aggregators of all CSs. Such data includes information regarding arrival to/departure from each station, initial energy, battery capacity, and energy level desired by the vehicle. Data transmission between EVs and the aggregators is feasible via cellular or satellite wireless communication depending on the underlying infrastructure of the network [1], [15]. Each aggregator then forwards the received data to its local scheduler at the CS in order to compute the achievable profit at that station. The computed profit at each local CS is then piggy-backed on the reply message sent back to the EV by the aggregators.

B. Pricing Model
In the context of smart scheduling, the charging and discharging power of EVs is modulated by the electricity price at that time instant. The real-time pricing (RTP) model has been appreciated in which the time-dependent price is driven by the total electricity load at that instant [3]. As an alternative model, the combination of inclining block rates (IBR) and RTP has also been proposed, in which the price remains unchanged up to a threshold point determined by the energy utility company, beyond which it increases as either a linear or non-linear function [17] of the current load. For sake of simplicity, we however adopt the RTP model where the instantaneous price, P (k, t), is a linear function of the load in that time slot, i.e. P (k, t) = c 0 + c 1 z t k , where c 0 and c 1 are non-negative real numbers symbolizing the intercept and slope, respectively, and z t k is the load at CS k at time t. Denoting the base load generated at CS k by demands excluding EVs as L t k , the instant load z t k is given as:

C. Overall Profit Calculation
Under the RTP model, the overall profit gain of an EV owner (P EV (k, t)) is equal to the overall revenue due to charging/discharging operations (R EV (k, t)) minus the maintenance and battery degradation/fluctuation costs (C EV (k, t)) in each slot of its allocated time interval. The revenue which is obtained for each EV at a given time slot is equal to the integration of pricing relation with the electricity load changing from the base to the current charging/discharging load at that time slot. Therefore, quantity R EV (k, t) can be calculated as follows: Note that since for charging and discharging operations a respectively negative and positive revenue is obtained by the owner of EV, hence, the negative sign has been considered in the right hand side of equation (3). The auxiliary cost of EV a at station CS k is computed as the summation of its maintenance and battery fluctuation/degradation costs during its service interval at CS k given by the following summation: (4) Therefore, the profit that the EV owner can obtain in time slot t at CS k is: It is easy to see that EV owners gain positive revenue when the energy flow from vehicles to the grid is more than the flow in the opposite direction. On the other side, the profit made by CSs due to the energy demand of EVs (P CS (k, t)) is the same as in (5), where R CS (k, t) is the negation of (3), with the auxiliary cost (C CS (k, t)) given as below: Since the ultimate aim of the energy utility provider is to maximize the overall joint profit of both, EV owners and CSs, we consider a weighting control parameter 0 ≤ δ ≤ 1, such that EV owners receive maximum profit when δ = 0 and the CSs obtain highest profit when δ = 1. Hence, the total obtainable profit for both dealing sides in |T | time slots is: IV. PROBLEM STATEMENT In this section, we define the problem of offline EV scheduling for charging and discharging in an MCS-MA set-up, where all information regarding the EVs in the system are available a priori. The aim is to assign EVs to CSs such that overall profit proportion of both, EV owners and CSs, is maximized. The problem formulation takes into account the capacity and instant electricity price at each station. By considering the binary time slot allocations at CSs and the continuous energy flow during the charging/discharging process, the problem can be written in the following MINLP form: x t a,k = 0, t∈T a,k x t a,k = ( x a,k · e t a,k ≤ B a ,

Algorithm 1 GreedyMCS
Input: Data(a, k) = (A a,k , D a,k , T a,k , E initial a , Ba, E f inal a , ra) for vehicle a ∈ M and 1 ≤ k ≤ K, and δ. Output: Allocation of a to the most profitable CS. Execute ComputeProfit V2G(k); 10: Send back reply message including PEV (a, k) and PCS(a, k) from aggregator at all CS k to vehicle a; 11: Send reservation message to CS k where k is given as: k = arg max k (1 − δ)PEV (a, k) + δPCS(a, k) ; 12: for all t ∈ T a,k do 13: N t k ← N t k + 1;

14:
Solve LP problem in (21) to find optimal schedule for vehicle a at CS k ; The objective function (8) aims to maximize the total adjustable profit of EV owners and CSs which is derived in (7). Constraint (10) guarantees that each EV is allocated only to the time slots within its service interval for charging/discharging at each charging station. Constraints (11)-(13) state that each EV can be allocated to the set of non-preemptive time slots at only one charging station and the equation (14) imposes the limitation on the maximum number of vehicles that can be accommodated in a CS at each time slot. Moreover, (15) defines the load of each CS in terms of the base load and EV charging/discharging powers in each time slot. Constraint (16) ensures that the final energy stored in the battery of the EV during its service period is non-negative and bounded by its maximum battery capacity. Equation (17) makes sure that the final energy stored in the EV battery at the end of its service interval satisfies the demand requirement initially set by the EV owner. Finally, constraints (18)-(20) specify the feasible ranges for charging/discharging powers in each slot based on the vehicle type.

V. PROPOSED ONLINE GREEDY ALGORITHM
The MCS-MA problem defined in (8)- (20) belongs to the class of NP-Hard problems due to the integrality decision of allocating EVs to CSs. For the offline scenario, when complete information on EV scheduling throughout a day is known before hand, the combination of branch-and-bound (BB) and linear programming relaxation (LPR) can be applied to find the optimal solutions to the problem [18]. Nonetheless, the computational complexity of BB increases significantly with the number of EVs, time slots or number of CSs. Moreover, in real-time scheduling, data regarding future incoming EVs are not available in advance, therefore making BB an impractical approach. In line of such shortcomings, we rely on an efficient online greedy algorithm yielding lower overall profit compared to the optimal solution obtained in offline analysis. Referred to as GreedyMCS, the proposed algorithm is given in Algorithm 1.

A. GreedyMCS Algorithm Design
As vehicle a arrives at the system, its corresponding data is broadcast to the aggregator of all CSs via remote wireless communication. Depending on the vehicle type, either one of the three procedures namely, ComputeProfit Charge, Com-puteProfit Discharge, or ComputeProfit V2G is executed by the local scheduler in every station so as to determine the service plan of the EV and the local profit attainable at each station. For vehicle a at CS k , the partial revenue that the EV can contribute to the total obtainable revenue during time slot t ∈ T a,k is given by negating the integration of pricing function with the variable load changing form the current load z t k to the updated load z t k + e t k . Accounting for the auxiliary costs including the battery fluctuation/degradation and the maintenance costs incurred in all time slot during the service interval of EV a, its contributed profit is computed according to relation (5). A similar calculation is performed to compute the partial profit for CS k from allocating EV a.
The profit that can be obtained at all CSs is sent along with the response message to the EV. On receiving response messages from all CSs and comparing their profits, according to line 11 of Algorithm 1, the EV decides on the most suitable CS where the locally maximum relative profit counting the profit of both EV and CS can be obtained. A reservation message is then transmitted back to the selected CS by the EV. After the EV is plugged-in to the designated station, say CS k , the aggregator requests the energy exchange between vehicle a and the grid during its service period by solving the following root mean-square deviation (rmsd) based optimization: Subject to constraints (16)- (20) when the station index k is substituted in the equations. Here,z k is the average load over all time slots at CS k . The energy exchange between the aggregator of the target station and the power grid is regulated by the V2G control system and monitored by the smart meter. The profit computation procedure executed at each CS works based on an updating heuristic. With respect to the EV participation type, every local scheduler runs the corresponding profit computation procedure to find the local profit for both, EV owners and CSs, based on the arrival/departure times, initial and final energy, battery capacity, and real-time electricity price in each time slot. At first, the average electricity price over all slots in the service interval of the EV is calculated and its energy requirement is equally distributed over the for t := t f a,k to t l a,k − 1 do

5:
avgP rice ← t∈T a,k P rice(k, t)/|T a,k |; 6: e t a,k ← (2 · avgP rice−P rice(k, t ))/avgP rice e t a,k ; 7: if e t a,k > P max if e t a,k < 0 then 10: e t a,k ← 0; 11: totalCharge ← t t=t f a,k e t a,k ; 12: avgCharge 13: if avgCharge > P max c then 14: ∆e Update z t k with e t a,k , ∀t ∈ [t f a,k , t l a,k ];

24:
Compute PCS(a, k); 25: return PEV (a, k) and PCS(a, k) interval. Within consecutive iterations over the interval size, the power of the EV is updated in each time slot based on the difference between the current and average price. Once determined, the charging/discharging power in the following time slots is adjusted such that constraints (16) and (17) are both satisfied. Consequently, the electricity load is then updated in accordance with (2). In the final step, the procedures return the local partial profits P EV (a, k) and P CS (a, k).
We note that the pseudocode for discharging operation has been omitted here due to its similarity with procedure Com-puteProfit Charge. The procedure ComputeProfit V2G has been also neglected here due to the space limitation and is available upon the request.

B. Customer Satisfaction
Balancing energy efficiency and user satisfaction is another unresolved challenge in smart grids. The corollaries that follow address this issue in the context of our problem. Corollary 1. The local procedures for profit computation at each CS guarantees that constraint (16) is satisfied at the end of each time slot during the service period of the EV.
Proof. The proof has been omitted due to the space limitation and is available upon the request.
Corollary 2. The GreedyMCS algorithm guarantees that the final energy demand of each EV is satisfied.
Proof. The proof has been omitted due to the space limitation and is available upon the request.

C. Complexity Analysis
For analyzing the message complexity of GreedyMCS algorithm, each EV is assumed to have the capability of transmitting multiple messages simultaneously. As evident in Algorithm 1, each EV sends a message containing its data to every CS in O(1). After completion of local profit computation at each station, the aggregators send back the computed profit to the EV in O(1). Therefore, for a system with m EVs and K CSs, the message complexity of the algorithm is of order O(mK) in the worst case.
The overall computational time of the algorithm includes the time complexity of the local profit computation at each CS as well as the computation time for finding the maximum local profit at the EV side. Since each CS executes the profit computing procedure independently, investigating the time complexity of only a single CS suffices. Considering the worst case scenario where the service interval of an EV may span the entire day, accounting the selection of most suitable station according to line (11) of GreedyMCS as well as the time taken by optimization problem (21) denoted by t opt , it is seen that the overall time complexity of the proposed algorithm with m available EV in the system is of order m(|T | 2 + K + t opt ) in the worst case, where |T | is the total number of time slots in a scheduling day.

VI. SIMULATION RESULTS AND DISCUSSIONS
In the former results presented in this section, we evaluate the performance of GreedyMCS in terms of overall achievable profit while the latter sub-section is dedicated to performance analysis of the algorithm from the perspective of ancillary services namely, peak shaving and valley fitting. We compare the proposed algorithm with RandomMCS, which serves as a baseline where an EV is allocated to a randomly chosen CS that can satisfy the service period demand requested by the EV [4]. The algorithms were implemented using Matlab, while the rmsd-based optimization problem at each CS was solved using the CVX package [20].

A. Simulation Set-up
We consider a single day V2G scheduling operation equally discretized into |T | = 24 time slots, each of duration ∆t = 1 hour. The total number of 1000 EVs leave their homes for office during a morning time randomly chosen form the uniform interval U [5a.m., 12p.m.] and the number of CSs is assumed to be 10. Unless explicitly mentioned, we assume 50% of EVs participating in V2G program and the equal remaining 25% participate in only charging and discharging. The distance between the home of Ev a and CS k (d a,k ), its average speed and the force of its electric motor are chosen from the uniform intervals [2km, 5km], U [3kw.h/km, 5kw.h/km] and [50km/hrs, 60km/hrs], respectively. Depending on the EVs speed and the distance of their home to each CS, their arrival time to each CS varies. Furthermore, each EV chooses  a preferred time period for its stay duration at each CS according to its time scheduling that however for the sake of simplicity, we assume to be chosen form the uniform interval U [3hrs, 6hrs]. On the other side, the CS operator specifies the starting and ending time slots for the service interval of EV a at CS k with randomly selected integer values from U A a,k , A a,k + ( D a,k − A a,k )/2 and U D a,k − ( D a,k − A a,k )/2 , D a,k , respectively. E initial a at the time of departure from the home follows the uniform interval U [70%B a , 90%B a ] while the energy available in the battery of EV at the time of arrival to each charging station is calculated based on its distance to that station and the force of its motor. For every PEV at charging state, the final energy target set by the owner follows the uniform distribution U [70%B a , 90%B a ] while for discharging, the final energy target after discharging is set from the uniform interval U [min(40%B a , E initial a − d ak ·F a ), min(60%B a , E initial a − d ak ·F a )] where here E initial a represents the initial energy stored in the battery of EV at the time of its departure from the home. An ideal battery capacity of 100kW h is considered for all EVs. With battery charging rate of 1C as defined in [21], we consider the maximum charging and discharging powers in each time slot to be 15kW h and 10kW h, respectively. The battery degradation/fluctuation parameters and the coefficients in the pricing model are set to respectively α = 10 −3 $/kW h 2 , β = 2 × 10 −3 $/kW h 2 and c 0 = 10 −3 $/kW h, c 1 = 2 × 10 −3 $/kW h/kW . The maximum EV capacity at each time slot of CSs are taken from the uniform interval U m K +5, m K +10 . In addition, we adopt a typical daily base load forecast from [3], with electricity load fluctuations at 10kW (low) and 70kW (high) for an entire day. An instance of the base load at a randomly selected CS during a summer day has been depicted in Fig. 2. We also assume the maintenance and service costs associated with employs internal updating heuristics in order to wisely guide each EV to the most profitable CS. Fig. 3b shows the gross profit that can be obtained by EV owners and CSs for different values of δ. In contrast to the baseline approach, GreedyMCS allocates EVs to CSs in a way that each side makes the maximum relative profit depending on the weighting parameter δ. Specifically, allocation of EVs to CSs using GreedyMCS results in higher profit for EV owners when δ < 0.5 and larger profits for CSs when δ > 0.5. Hence, settling on an agreeable δ value that would minimize loss on either dealing sides is vital to all local schedulers. For instance, it is apparent in Fig. 3b that δ = 0.4 would yield a minimum profit of $200 for CSs with a tolerance of maximum $350 lost as profit to EV owners. Or, CSs can achieve minimum profit of $1000 with minimum loss in profit of EVs for δ = 0.6.
2) Impact of Number of CSs: For a fixed number of EVs in the system, we now study the effect of varying number of CSs on the achievable profit. We set the number of EVs to 1000 assuming all of them participate in only charging, δ = {0, 1}, and K ranging from 5 to 60. Fig. 4 shows the result of this simulation. As we can see, for δ = 0, the increase in the number of CSs leads to the increase in the overall obtainable profit. This is because as the number of stations increases, EVs have more choices in selecting a more profitable CS for their service. On the contrar, for δ = 1, the profit made by the CSs decreases with increase in K since though the revenue of CSs increase with K, their auxiliary costs are comparatively higher, thus contributing to their profit drop.
As it is seen from the result in Fig. 4, after K = 40 number of stations, a very small increase in profit is achieved which therefore reveals this point as the optimal number of stations for this particular parametric setting.
C. Discussions on Ancillary Services 1) Impact of V2G Penetration on Peak Reduction: In Fig. 5, the effect of increasing V2G penetration on peak load reduction using GreedyMCS is shown. In this case study, we have considered two levels of penetration: 10% and 20% with m = 1000, K = 10 and δ = 0 assuming the uniform time interval U [8a.m., 10a.m.] for the leaving time of EVs in the morning and a stay duration chosen from the interval U [6hrs, 9hrs] at each CS. The figure depicts the percentage of peak reduction during the time interval 11a.m. to 4p.m. at CS 5 . Note that the percentage of peak reduction during a specified time interval at a given charging station is computed based on the difference between the maximum base load and the load generated by the algorithm during that interval at the given station [7]. As seen in Fig. 5, peak load reduces with increase in the V2G penetration level since the EVs return the energy stored in their batteries back to the grid during high power demands. In our simulation, a reduction of 10.7% and 28.5% is achieved for 10% and 20% penetration levels respectively, throughout the time period [11a.m., 4p.m.].
2) Load Shifting: Performance comparison results for GreedyMCS and RandomMCS in terms of final electricity load on the power grid generated during [11a.m., 8p.m.] at CS 5 is presented in Fig. 6, where m = 1000, K = 10, and δ = 0. EVs are divided into equally 50% only charging and only discharging with the leaving time from the interval U [10a.m., 12p.m.] and same stay duration as the previous scenario. We observe that our greedy approach performs better in flattening the final electricity load than the uncontrolled random strategy. We use the root mean-square deviation (rmsd) from the maximum base load during a specified time interval for valley filling at a given charging station [7]. At  selection for the incoming EV owners with service demands. Accounting for the variations in real-time electricity pricing at different stations, a mixed integer non-linear programming optimization model is formulated to maximize the overall profit of both participants, i.e. EV owners and charging stations. Under uncertain EV arrival times, our proposed greedy online scheduling algorithm, namely GreedyMCS, adopts a weighting parameter to adjust the overall achievable profit and uses efficient updating heuristics to guide each EV to the most profitable charging station.
Results of simulation justify that the proposed algorithm not only improves the overall profit for the system, but also results in better valley flattening. Furthermore, the result also reveal the existence of an optimal number of charging stations for any given number of EVs and local base load which, depending on local system parameters, can assist V2G system designers in optimizing their investment budget at each locality.