Incorporating demand response of electric vehicles in scheduling of isolated microgrids with renewables using a bi-level programming approach

In this work, a novel optimal scheduling approach is proposed for isolated microgrids (MGs) with renewable generations by incorporating demand response of electric vehicles (EVs). First, a bi-level programming-based MG scheduling model is proposed under real-time pricing environments, where the upper- and lower- levels seek to minimize the MG net operating cost and the EV charging cost. Second, a hybrid solution algorithm called JAYA-interior point method is put forward to solve the model. And finally, the simulation results demonstrate that incorporating demand response of electric vehicles is able to guide EV users to actively participate in MG scheduling and achieve the peak load shaving, which offers a fundamental way to balance the interests between MG and EV users.


A. MOTIVATION
With the increasingly serious energy crisis and environmental problems, it is has become a broad consensus to research and leverage renewable generations and electric vehicles [1,2].At the same time, as an effective carrier of distributed renewable generations, a microgrid (MG) can fully promote the integration of renewable generations and has become an important part of smart grids [3,4].Compared with the grid-connected microgrids, isolated microgrids (IMGs) have obvious advantages in areas which are inaccessible to the main grid, such as islands, remote areas, deserts, etc. [5,6].However, the inherent uncertainty of renewable generations is difficult to guarantee operational reliability and power supply security, especially for IMGs.Consequently, it is a tricky problem to address renewable uncertainty in IMGs.Recent studies have shown that the integration of electric vehicles (EVs) into MGs via vehicle-to-grid (V2G) is beneficial to implement energy conservation and emission reduction [7], but the EV charging behaviors have strong time and space uncertainties [8].Therefore, the integration of EVs will further increase the difficulty of MG scheduling.As a new type of demand-side management strategy, price-based demand response (PBDR) mainly includes real-time prices and time-of-use tariffs, which is able to maintain supply-demand balance by flexibly adjusting the load.In addition, demand response can effectively consume uncertain renewable generations including PV and WT.Therefore, how to comprehensively consider EV demand response and uncertain renewable generations is an urgent and challenging problem.

B. LITERATURE REVIEW
Optimal scheduling of microgrids with renewable uncertainties has always been an important issue to ensure the MG safe and economic operation.Compared with a traditional power system, MGs generally include a large proportion of renewable generations such as wind turbines (WT) and photovoltaic (PV).At present, the accuracy of the prediction of renewable outputs needs to be further improved, and the fluctuations of renewable outputs have a great influence on the safe and economic operation of MGs [9][10][11][12].At present, many scholars have performed a series of studies on the economic dispatch of MGs [13][14][15][16].Reference [13] develops a linear programming cost minimization model for MGs.In [14], an economic dispatch model is proposed for microgrids, which considers simultaneously cogeneration and reserve capacity constraints.In order to address the uncertainties of renewable generations, reference [15] uses a risk metric called conditional value-at-risk, which aims to limit the possibility of the shortage of renewable generations at a certain confidence level.Reference [16] adopts the probabilistic model to simulate the renewable outputs, and proposes a multi-objective MG scheduling model that combines energy storage and user experience.With the popularization of EVs, their load demands have an important impact on the operation of power grids.Recently, vehicle-to-grid (V2G) related studies are becoming a hot topic.(1) regarding EV charging cost: in [17], by considering the relationship between the acceptable charging power and the state of charge (SOC) of EV batteries, a heuristic method is proposed for minimizing the EV charging cost; to minimize the EV charging cost, a strategy is presented for coordinating autonomous plug-in EV charging using the concept of non-cooperative games [18].(2) In terms of V2G technology: a real-time pricing mechanism is developed to consider the dynamic relationships between supply and demand in an MG with battery swapping stations in [19]; reference [20] proposes an optimal V2G aggregator for frequency regulation; reference [21] builds a market model to enable agents to participate in bilateral transactions and optimizes the EV charging process via dynamic allocation; in [22], the impact of charging hybrid EVs on a residential distribution grid has been analyzed; a new dynamic charging approach is proposed for electric vehicle fleets by using adaptive learning in [23].Based on the above existing works, basic scheduling issues have been resolved.Unfortunately, there are still some gaps in MG scheduling.To the best knowledge of authors, there are only a few related investigations that utilize EVs to participate in demand response in MG scheduling.In [24], by coordinating demand response and storage, a new emergency operation approach is developed with consideration of the responsiveness of EVs and load.Reference [25] presents price-based and incentive-based demand response strategies and examines their impact on the MG economy under grid-connected and isolated modes.Obviously, it is of great significance for MG optimal scheduling to comprehensively considerate both renewable uncertainties and EV demand response, but until now, there are few investigations reported for addressing this problem.In view of this, this work proposes a novel bi-level programming-based scheduling approach for MGs with renewables by incorporating EV demand response.Note that this problem is nonlinear and nonconvex.Meanwhile, the associated problems, such as getting trapped in local minima, and scalability to high-number of variables, have always existed.Recent studies demonstrate that the hybrid analysis-heuristic solution approach is an effective way to address these problems [19,26].

C. CONTRIBUTIONS
The main contributions of this paper are as follows: (1) A bi-level programming-based MG scheduling model under real-time pricing environments is proposed, which is the first attempt to coordinate renewable generation uncertainty and EV demand response; (2) A new hybrid solution algorithm called JAYA-IPM is developed to solve the model with sufficient optimality and high computation efficiency; (3) And finally, the simulation results indicate that demand response of electric vehicles is able to guide EV users to actively participate in MG scheduling and achieve the peak load shaving, which provides a fundamental way to balance the interests of both MG and users.The novelty of this study lies primarily in our attempt to propose a new method that can coordinate the EV demand response and renewable generation uncertainty in MG scheduling.

D. PAPER ORGANIZATION
The rest of this paper is organized as follows.Section II gives the modeling of MG and EV.In Section III, the problem formulations are introduced.Next, Section IV depicts the proposed solution methodology.Section V analyzes the experimental results, and conclusions are drawn in Section VI.

A. MG MODEL
In microgrid scheduling, a probabilistic model should be given priority because of the small capacity and inherent renewable uncertainties in MGs.Among them, the PV output follows the Beta distribution, the WT output obeys the Weibull distribution, and the original load power obeys the normal distribution.Their respective probability models and probability density functions (PDFs) are detailedly given in the literature [2,19].

B. EV CHARGING MODEL
Electric vehicle charging model is the basis for investigating the orderly charging of EVs [27,28].In order to simplify the problem, this study only considers EV charging modes.And the main factors affecting the EV charging include the following two aspects:

1) BATTERY SELECTION
There are many batteries can be used as candidates of EV batteries, such as lead-acid batteries, nickel-hydrogen batteries, lithium-ion batteries, and so on [1].Each kind of battery has its technical and economic characteristics.Compared with other batteries, a lithium-ion battery has some obvious advantages, such as relatively longer service life, higher charging efficiency and greater depth of discharge [29].Consequently, the lithium-ion battery is chosen as the EV battery in this work.In addition, the charging modes of lithium-ion batteries consist of slow charging and fast charging.Taking into account that fast charging modes are crucial for public acceptance of EVs, this study focuses on fast charging of lithium-ion batteries.

2) TRAVEL NEEDS AND USAGE HABITS
It is assumed that there is no a parking space in charging stations in this study, and the default EV charging mode is that an EV leaves the charging station immediately once it is charged to its expected capacity.In this mode, the travel demand and usage habits mainly reflect in the EV arrival time, daily travel miles.These factors determine the total charging amount and the charging time for EV users.Based on the results of the 2009 National Traffic Survey of vehicles in the United States, the PDFs of the daily travel time and daily travel miles of EVs are obtained [30].The EV arrival time obeys the normal distribution, and its PDF is   It can be seen from [31] that the initial SOC of an EV obeys a normal distribution when the EV arrives at the charging station.Based on the travel mileage of EV i and its initial SOC, the actual SOC at the end of the charging can be calculated according to (3)- (5) where ,

III. PROBLEM FORMULATION
In the proposed bi-level scheduling model, the upper level aims to minimize the net cost of the microgrid; the lower level seeks to the minimization of the EV charging cost.Focusing on coordinating renewable generation uncertainties and demand response and maintaining the dynamic supply-demand balance of power, a real-time pricing mechanism that acts as a bridge between the two levels is proposed in this work.

1) OBJECTIVE FUNCTION
The upper level seeks to minimize the MG net operating cost, which is calculated by the difference between the operating cost and the revenue of the MG.Herein, the MG operating cost is the sum of both the fuel cost of microturbines (MTs) and the cost of spinning reserves provided by MTs and energy storage systems (ESSs) [2].
In this study, Zn-Br battery is chosen as the ESS since, compared with other batteries for grid-scale energy storage, it has many significant benefits, like lower costs, higher energy density, and longer service life.
The MG net operating cost can be expressed as follows: ] where t denotes a scheduling period (in hours) in an entire scheduling cycle T (T=24 h in this study),

2) CONSTRAINT CONDITIONS
In order to ensure the safe and stable operation of the system, the following constraints should be met: Eqs. ( 9) and (10)   is the battery voltage in period t.Eq. ( 16) denotes the starting and ending constraint.In order to balance the energy stored in the ESS and prolong the battery life, the initial energy stored and the remaining energy at the end of a scheduling cycle should be equal [2,33].SOC  represents the initially stored energy limit of the ESS, 0 SOC represents the initial energy in the ESS, Tend denotes the end of the total scheduling cycle (it is set to 24h here).Eq. ( 17) -( 19) represents the spinning reserve constraint of the microgrid.Since the main power grid does not supply power to the IMG, the spinning reserve is a significant resource for balancing both supply and demand sides [3,32].Eqs. ( 17) and ( 18) are the spinning reserve constraints for MT and ESS, respectively, where , Ress t P represents the reserve capacities of the ESS in period t.Considering that the joint output of renewable generations may be zero, in this small probability situation, the adequate spinning reserve must be provided to maintain the reliability of the system, but it will incur additional costs.Eq. ( 19) illustrates the probabilistic spinning reserve requirement, in which γ denotes the confidence level.

B. THE LOWER LEVEL
Electric vehicles have been recently receiving increasing attentions since they play a critical role in energy conservation and emission reduction.In this work, the lower level seeks to minimize the EV charging cost.

1) OBJECTIVE FUNCTION
The EV charging cost is calculated by the following formula: min 365 where  ， is the real-time electricity price in period t, EV t P represents the power of the EV in period t, c W denotes the investment cost of the charging station, and m denotes the service life of the charging station.

2) CONSTRAINT CONDITIONS
At any period, the EV charging power should not be greater than the maximum allowable power of the microgrid.

C. REAL-TIME PRICING MECHANISM
In order to reflect the dynamic relationship between supply and demand, a real-time pricing mechanism is put forward [19]

IV. PROPOSED SOLUTION METHODOLOGY
Considering that a bi-level programming model is nondeterministic polynomial-time hard (NP-hard), a hybrid solution algorithm called JAYA-IPM is developed to ensure sufficient optimality and high computation efficiency.The algorithm solves the model through an iterative process between levels, and the optimal scheduling strategy is finally determined.

A. SEQUENCE DESCRIPTION OF RENEWABLE GENERATIONS
The sequence operation theory (SOT) is here utilized to obtain probabilistic sequences of renewable generations, and then transform a chance constraint into its deterministic equivalent class, which avoids tedious and time-consuming Monte Carlo simulations in the solution process.In this study, all renewable outputs are modelled by probabilistic sequences obtained through discretizing continuous probability distributions.Concretely

1) PROBABILISTIC SEQUENCES OF RENEWABLE GENERATIONS
The probability sequence , () ct ci of the joint power outputs is obtained according to the addition-typeconvolution (ATC) operation in the SOT [34]: The joint power output and its probabilistic sequence are illustrated in Table 1.
Table 1 Joint power output and its probabilistic sequence

2) DETERMINISTIC TRANSFORMATION OF CHANCE CONSTRAINTS
To handle the chance constraint in (19), a new 0-1 variable , ct u W is defined as [2,19] ,

C. JAYA ALGORITHM
JAYA is a powerful algorithm to handle complex optimization issues, which is proposed by R. Venkata Rao.Since it requires no algorithm-specific parameter expect two common control parameters namely the population size and maximum number of iterations, its results are more stable than other intelligent optimization algorithms [19].

1) BASIC PRINCIPLES
The key idea of the Jaya algorithm is that a solution must move away from the worst solution and move to the best solution [35].If Xj,k,i is the value of variable j for candidate k at iteration i, then Xj,k,i is calculated as where ,,

2) HYBRID CODING
To speed up the optimization process, this works utilizes a hybrid real/integer-coded scheme [36].

3) PREVENTION OF PREMATURE CONVERGENCE
In order to avoid local minima and premature convergence, this paper adopts a disturbance optimization strategy.First, a dynamic evolutionary monitoring mechanism is used through analyzing the fitness variance of the population during the optimization process.Once a convergence criterion is satisfied, the disturbance optimization strategy is implemented.Concretely speaking, a disturbance is added by re-initializing a certain percentage of individuals that are randomly selected.The used convergence criterion is 22 1 thr1 thr2 ii    (31) where, 2 1 i  and 2 i  are respectively the fitness variance at the (i+1)th and ith iterations.Here, the monitoring thresholds thr1 and thr2 are set to 0.99 and 1.01.

D. INTERIOR POINT METHOD
The interior point method originally proposed by John von Neumann is a classical optimization method for addressing linear programming [37], and its key principle is to gradually approximate the optimal solution of the original problem in the feasible domain.In view of the IPM's advantages of high efficiency and excellent accuracies, it is used to solve the lower-level model.

E. DETERMINATION OF THE OPTIMAL SCHEME
In this paper, it is necessary to introduce a joint optimization function F JO to screen out the optimal joint operation schemes from the yielded candidate ones during iterations [19].

IO
F and 2

IO
F are respectively the IMG operating cost without considering the EV interests and the EV charging cost without considering the MG revenues; while 1 JO F and 2 JO F are respectively the operation cost of the IMG and the EV charging cost under consideration of demand response.When this objective function takes the minimum value during iterations, the scheduling scheme corresponding to this iteration is chosen as the optimal scheme [19].In this case, the resulting optimal scheduling scheme is capable of balancing the interests of the microgrid and electric vehicle users, achieving a win-win situation for both.

F. SOLVING PROCESS
Fig. 1 shows the procedure of the proposed solution method, and the specific steps are as follows: Step 1: Build the IMG model according to (8) ~ ( 19).
Step 2: Convert the chance constraint into its deterministic equivalence class.
Step 3: Set the MG parameters.
Step 4: Set the electricity price of the main grid as the basic price of the MG before optimization.The price is known in advance on the basis of historical data, the load demand of previous day/hour and the expected load demand of next hour or day.
Step 5: Calculate the real-time electricity price according to formula (24).
Step 6: Optimize the upper-level model by the JAYA algorithm.
Step 7: Obtain the MG optimal scheduling scheme.
Step 9: Solve the lower-level model by using the IPM.Step 10: Obtain the EV optimal charging plan.
Step 11: Calculate the MG net cost 1 JO F and the user cost 2

JO
F at the current iteration.
Step 12: Judge whether the termination criteria is met.If met, end the optimization process and proceed to the next step, otherwise, return to step 5. Here, the used termination criterion is whether the current iteration exceeds the pre-defined maximum number of iterations.
Step13: Calculate the costs 1 IO F and 2

IO
F .Step14: Identity the optimal solution with the minimum value of JO F according to (32).Step15: Obtain the optimal scheduling scheme.

V. CASE STUDY
The proposed approach has been examined on an improved MG testing system, which is illustrated in Fig. 2.This system consists of one PV control board, three MT units, one WT unit, an EV charging station, and the original load.Among them, PCC denotes a common coupling point.

2) EV PARAMETERS
In this study, the used EV parameters are as follows: the rated capacity , ic B , the rated charging power the EV expected capacity is 90%; the investment cost and the service life of a charging pile are respectively $ 3000 USD and 10 years.

3) ALGORITHM PARAMETERS
The parameters of the Jaya are set as follows: the population size and the maximum number of iterations are respectively 100 and 1500.Other algorithm parameters are assigned as follows: the load fluctuation  =10%, the confidence level γ =95% and the step size q=2.5 kW.

B. BASIC DATA
This section give the outputs of renewable generations, and the EV arrival and departure times.All of them are used as the basic data for the subsequent analysis.The original load power and renewable outputs are illustrated in Fig. 3. Fig. 3 shows that the original load and the joint output of renewable generations obtained via the ATC operation between WT and PV power outputs.By doing so, the uncertainties of multiple renewable generations are effectively tackled via the SOT [34].
Based on the results of the national household travel survey in 2009 made by the Federal Highway Administration of the Department of Transportation of the United States, an EV arrival case following the normal distribution in an entire scheduling period is randomly taken as an example in this study.The EV arrival and departure times at the EV charging station are illustrated in Fig. 4.

C. ECONOMIC COST ANALYSIS
For purpose of examining the economy of the joint optimization between IMG and EV, three different strategies are designed in this paper.Fig. 5 illustrates that the strategy 2 is the best one among the three strategies since it can balance the interests of MG and EV users; while the other strategies only consider the interests of MG or EV users, separately.In particular, regarding the EV charging cost of the IMG, the result in strategy 2 is superior to that in strategy 1; while as far as the net operating cost of the IMG is concerned, strategy 2 outperforms strategy 3. On the basis of this phenomenon, it can be concluded that demand response of electric vehicles is able to improve the economy of IMG and EV users, which plays an important role in the scheduling of isolated microgrids with renewables.The electricity prices of the main grid in this work are listed in Table 3. Fig. 6 shows that the proposed real-time electricity prices (including the initial and optimal real-time prices) significantly outperform the electricity price of the main grid, since the latter is unavailable to adjust the electricity prices according to the dynamic supply-demand relationships.Furthermore, the optimal real-time prices are superior to the initial real-time prices, since the former is able to reduce the peak-to-valley difference of load powers.

D. RESERVE CAPACITIES UNDER DIFFERENT CONFIDENCE LEVELS
This section discusses the spinning reserve capacities under different confidence levels.Spinning reserve is an important auxiliary service for balancing source-load difference [2], and confidence levels γ determine the reserve capacities of MGs.The relationship between reserve capacity and confidence level is shown in Fig. 7. Fig. 7 indicates that the MG reserve capacities are dependent on confidence levels.It's known that reserve capacities are closely related to the economy and reliability of the MG operation.For one thing, a higher confidence level can increase the system reliability at the cost of the economy; for another, a less confidence level will bring out a decreased reliability and a better economy.As a result, a suitable confidence level is crucial to trade off the reliability and economy of the MG operation.

E. IMPACTS OF DEMAND RESPONSE
For purpose of properly evaluating the performances of the PBDR strategy, the following two cases are designed: Case 1--without considering demand response: the charging price of EVs is set to the price of the main grid.
Case 2--considering demand response: the charging price of EV adopts real-time electricity prices.

1) IMPACT ON MG OPERATION
Comparative tests without and with consideration of demand response have been performed, and the test results are respectively demonstrated in Figs. 8 and 9. Regarding the ESS, the ESS charging-discharging frequencies in case 2 are obviously greater than those in case 1.This is because the ESS will absorb more electrical energy to suppress load fluctuations when its discharging price is higher than the charging price.(2) In terms of EVs, due to the introduction of PBDR, the charging behaviors of EVs can flexibly response to the changes of electricity prices.Therefore, ones can conclude that PBDR is an effective way for guiding the ESS and EV users actively participate in the microgrid optimal scheduling.

2) IMPACT ON EV USERS
The EV charging powers without and with consideration of demand response are illustrated in Fig. 10.From Fig. 10, it can be observed that demand response plays a key role in guiding the charging behaviors of EV users.Concretely speaking, EVs users decrease the charging powers in the peak-load periods, while they increase the charging powers in off-peak periods.By this means, the peak load shaving is achieved by leveraging EV flexibility on the load side while maintaining the source-load balance, thereby promoting EV users to actively participate in the MG scheduling.By this means, it provides a fundamental way to balance the interests of both MG and users.

VI. CONCLUSION
This paper proposes a bi-level programming model for scheduling of isolated microgrids with renewable generations by incorporating demand response of electric vehicles.And thereby, a hybrid solution algorithm JAYA-IPM is developed to solve the model.The simulation results demonstrate that demand response of electric vehicles is able to guide EV users to actively participate in MG scheduling and achieve the peak load shaving, which offers a "win-win" solution to balance the interests between microgrid and EV users.Future work will focus on extending the proposed approach to scheduling of heat and electricity integrated energy system.Note that it is assumed in this paper that only charging modes are available for EVs, while a more realistic scenario shall consider EV discharging modes.Besides, the charging waiting time of EV users in this paper is ignored, while it is necessary for real-world applications due to limited charging piles.


are the standard deviation and the mean value of d M .The model of SOC of EV batteries is given in this section.
electricity power and the charging efficiency of EV i.
the energy stored in the ESS in period t and t+1, respectively.Eq. (12) describes the capacity constraint of Zn-Br batteries in ESS, where min SOC and max SOC are the minimum and the maximum energy stored in the ESS.Eqs.(13) -(14) represents the charge and discharge rate constraints of ESS, where max charge and discharge active powers of the ESS.max CH Q and max DC Q are the maximum charge and discharge reactive powers of the ESS.Eq. (15) is the voltage constraint, where min V and max V are the minimum and the maximum voltage of the battery.tV

FIGURE 1 .
FIGURE 1. Flowchart of the proposed hybrid solution approach

PSOC
are the maximum and minimum values of the MT outputs; the parameters of the Zn-Br battery are as follows: max DC =32 kWh; the ESS reserve cost is rc  =0.02 $/kW and 0.3 $/kWh and 0.5 $/kWh are respectively the charge/discharge prices of ESS [2]; the reference power L REF P and the maximum power of the original load max L P are respectively 80.00 kW and 57.26 kW [19], and the used reference price REF

FIGURE 3 .
FIGURE 3. Load and the renewable outputs

Strategy 1 : 2 : 3 :
IMG scheduling without consideration of the EV charging costs;Strategy Joint optimization of IMG and EV with consideration of demand response.Strategy EV scheduling without consideration of the MG revenues.The MG net operating costs and the EV charging costs in the above strategies are shown in Fig.5.

FIGURE 7 .
FIGURE 7. Reserve capacities under different confidence levels

Table 3
The electricity prices of the power grid FIGURE 6. Electricity price curves