Study of the Effect of Time-Based Rate Demand Response Programs on Stochastic Day-Ahead Energy and Reserve Scheduling in Islanded Residential Microgrids

In recent deregulated power systems, demand response (DR) has become one of the most cost-effective and efficient solutions for smoothing the load profile when the system is under stress. By participating in DR programs, customers are able to change their energy consumption habits in response to energy price changes and get incentives in return. In this paper, we study the effect of various time-based rate (TBR) programs on the stochastic day-ahead energy and reserve scheduling in residential islanded microgrids (MGs). An effective approach is presented to schedule both energy and reserve in presence of renewable energy resources (RESs) and electric vehicles (EVs). An economic model of responsive load is also proposed on the basis of elasticity factor to model the behavior of customers participating in various DR programs. A two-stage stochastic programming model is developed accordingly to minimize the expected cost of MG under different TBR programs. To verify the effectiveness and applicability of the proposed approach, a number of simulations are performed under different scenarios using real data; and the impact of TBR-DR actions on energy and reserve scheduling are studied and compared subsequently.


Introduction
One of the major thrust areas of demand side management (DSM) is demand response (DR) which is defined as a set of actions taken to reduce users' electricity consumptions in response to higher market prices or market incentives [1].Moreover, system operators may apply DR programs to reduce the load temporarily in emergency grid conditions such as unit outage or unpredictable change in renewable generation [2,3].Therefore, the main idea of DR is to encourage customers to manage their consumption patterns in a way not only to maximize their own utility, but also to support safe operation of the power system [4].
According to the Federal Energy Regulatory Commission (FERC), DR programs can be classified into two major categories, namely, time-based rate (TBR) and incentive-based programs (IBPs) [5].In TBR programs (also known as price-based DR programs [6]), time-varying prices are given to consumers based on the electricity price in different time periods, encouraging them to change their consumption level in response to the changing price signals.On the other hand, in IBP schemes, customers are offered fixed or time-varying incentives, to reduce their electricity consumption during periods of system stress, however they would be penalized for no participation in the program [7].
The focus of this paper is on TBR programs which are mainly divided into three categories, real-time pricing (RTP), time of use (TOU), and critical peak pricing (CPP) programs.These programs are well-suited for implementation in residential areas (e.g., residential microgrids (MGs)) where there are more possibilities for load management purposes [8][9][10][11].However, there exist a number of challenges, such as rebound peaks during low cost periods and service interruptions.Moreover, the presence of uncertain elements within an environment such as wind and photovoltaic (PV) power generation imposes development of sophisticated balancing mechanisms between supply and demand to meet the system stability.Therefore, TBR models need to be well-designed and implemented to provide efficient operating conditions for such systems in presence of uncertainties.
Regarding the MG scheduling under uncertainty, much research has been done recently [12][13][14][15][16][17][18][19][20][21].The effect of wind energy forecast errors on the network-constrained market-clearing problem, in which energy and reserve are simultaneously dispatched, was investigated in [12,13] using two-stage stochastic programming models.Based on the proposed method in [12], cost of MG was minimized with regard to the uncertainty of renewable energy resources (RESs).In [13], optimal dispatch of a MG was presented with regard to emissions and fuel consumption cost minimization using heuristic optimization.Authors in [14,15] exploited MG management as a multi-objective optimization problem to mitigate emission level as well as operation and maintenance costs.To obtain efficient energy management, artificial intelligence techniques were also used with multi-objective optimization programming [16].However, in the reviewed literature, the procurement of the MG reserve (in terms of spinning and/or non-spinning reserve) for reliable operation of the system has been neglected.To address this issue, effective methods for providing reserve in typical MGs with high penetration of RESs are developed based on DR programs [17][18][19].In [17], a day-ahead market structure was presented where DR can provide contingency reserves through a bidding procedure representing the cost of load curtailment.Also, authors in [18] introduced a price-responsive DR action for optimal regulation service reserve provision under high levels of wind penetration.The same type of study was carried out in [19], considering load uncertainty and generation unavailability as different working scenarios.In view of the problem-solving strategies, most of the reviewed research works have utilized stochastic programming techniques, however some have applied other methods such as robust optimization or Monte Carlo simulation [20,21].In [22], a stochastic AC security-constrained unit commitment problem under wind power uncertainty has been formulated.Also, a stochastic multi-objective framework has been proposed in [23], for joint energy and reserve scheduling in day-ahead however, this reference has not considered AC network, load, EVs and wind power uncertainties.Furthermore, authors in [24] have proposed a multi-objective structure that can optimize objective functions including operation costs of MG, but they have not considered demand and EVs uncertainty in day-ahead scheduling.
This paper presents the effect of different types of TBR programs on the MG operation costs and shaping the load profile in presence of RESs and electrical vehicles (EVs).EVs are employed for energy scheduling or peak shaving with fast charging and discharging capabilities, while the responsive loads are used to supply a part of the required MG reserve to compensate RESs uncertainties.Monte-Carlo simulations together with k-means clustering technique are applied to create several scenarios corresponding to renewable generation variations and EVs owners' behaviors.The generated scenarios are then reduced and fed into a two-stage optimization model developed for minimizing the operation costs.In the first stage of optimization, the energy and reserve costs are minimized simultaneously and in the second stage, the cost associated with the rescheduling of generating units (due to the variations in wind turbine (WT) and photovoltaic (PV) output powers) is minimized.Finally, simulation results for co-optimization of energy and reserves in the examined residential MG are presented and compared under different DR programs and operating conditions.As a whole, the main contributions of this paper can be highlighted as:

•
Optimal management of an islanded MG with RTP-based DR programs using a scenario-based two-stage stochastic programming model.

•
Simultaneous energy and reserve scheduling of MGs with regard to different DR schemes in an uncertain environment.

•
Assessment of TBR-based DR programs under different scenarios with/without considering EVs participation.
The remainder of this paper is arranged as follows: a network-constrained day-ahead market clearing model is introduced in Section 2 and it is reformulated into a mixed integer programming (MIP) model in Section 3. The case studies are presented in Section 4 and the simulation results are discussed thereafter.Finally, Section 5 concludes this paper with future scope.

Model Description
A network-constrained day-ahead market clearing model is developed under a two-stage stochastic programming framework in order to accommodate the uncertain nature of RESs and EVs.Based on [25] the MG uncertainties can be categorized into two groups: (1) Normal operation uncertainties (including errors in forecasting wind data, EV operation, and real-time market prices).( 2) Contingency-based uncertainties (including random forced outages, unintentional islanding, and resynchronization events).
The subject area of this paper mainly falls in the first category so the optimization model is developed in a way to effectively consider normal operation uncertainties including forecasting errors of WT and PV power production and EV owner behaviors.A set of scenarios representing MG uncertainties are generated for scheduling horizon.In order to render the problem tractable, an appropriate scenario-reduction algorithm is applied to reduce the generated scenarios into an optimal subset that represents well enough the uncertainties.In the next step, the optimization problem is solved in two stages using commercially-available software packages.In the first stage of the proposed optimization model, energy and reserves are jointly scheduled to balance supply and demand.The second stage corresponds to operation management in several actual MG modes and deals with variables that are scenario-dependent and have different values for every single scenario.In other words, the first stage corresponds to the optimal decision for the deterministic base case, while the second stage examines the feasibility and optimality of the first stage decisions under system contingencies.
In the proposed framework, different customers sign contracts for participating in various TBR programs and submit them to the MG operator.Based on the type of the consumers' contributions, MG operator finds the optimal day-ahead energy and reserve scheduling with regard to the minimum expected cost of operation.At the same time, optimum participation level of consumers in each DR program for reserve procurement is determined.Also, MG operator schedules the charging and discharging process of the EVs for any time intervals in the studied period.

Market-Based DR Model
In order to evaluate the impact of residential customers' participation in DR programs on load profile characteristics, an economic model of responsive loads is developed on the basis of elasticity factors.Elasticity is defined as demand sensitivity with respect to the electricity prices [26].
where, D(t) and ρ 0 (t) are the nominal/initial value of demand and electricity price, respectively.Based on a single-period elastic load model, the customer changes his demand to achieve the maximum benefit from D(t) to D DR (t) as: The customer benefit for the tth time interval can be calculated as: where, S(D DR (t)) and B(D DR (t)) represent customer benefit and income at time t after implementing DR programs, respectively.In order to maximize customer benefit, the following condition must be met [27]: Therefore, the customer utility function would get a quadratic form as follows [27]: Differentiating ( 5) with respect to D DR (t) and substituting the result in (4) yields: Therefore, a customer's consumption behavior over the time can be obtained as follows: In a multi-period elastic loads model, the price elasticity of the tth period versus the hth period can be defined as [26]: Considering the linear relationship between the hourly demand level and the electricity prices, it can be expressed that: Combining ( 7) and ( 9), the responsive load economic model can be extracted as follows:

EVs Participation in DR Programs
EVs can be considered in three different modes: grid-connected mode, idle mode, or driving mode.In grid-connected mode, the MG operator can schedule charging/discharging process of EVs batteries.EVs can exchange power with the MG based on their state of charge (SOC), stop time in the parking lot (PL) and the electricity price in each DR program.In this case, EVs are considered to be probabilistic loads or generations which can be evaluated by stochastic methods [28].The exchange power between each EV and the network can be obtained as [28]: The SOC of EVs connected to the network is updated by Equation ( 12) [28].
where SOC k,t−1 = SOC k,I , if t = 1.BC k is battery capacity of EV in kWh and SOC k,I is the initial SOC of kth EV.It is important to control the charge and discharge energy of the parked vehicle w such that the SOC of the battery could be kept within the allowed range SOC min k and SOC max k .Besides, in idle or driving mode, there is no power exchange between EV and the network, however the stored energy might decrease depending on the EV trip length (L k ) and its energy consumption rate (r k ).It is assumed that each EV returns to the PL after driving L k km and is plugged back into the network.Thus, the SOC at the time of arrival (SOC ent k ) can be estimated by Equation (13) [28].
where, SOC int k is the initial SOC at the beginning of the trip.

Renewable Energy Resources
Output power of WT and PV plants are inherently intermittent.In order to model the stochastic wind speed (and the WT behavior accordingly), the divided Weibull probability density function (PDF) is usually employed.The general Weibull PDF of wind speed can be formulated as follows [29]: where v, k and c are wind speed, shape factor (dimensionless) and scale factor, respectively.Besides, the output power of WT can be described by Equation (15) [30]: where v r , v in and v out indicate the rated speed, cut-in speed and cut-out speed of the WT, respectively, and P r w represents the total rated power of WT.The distribution of hourly irradiance usually follows a bimodal distribution, which can be seen as a linear combination of two unimodal distribution functions [31,32].A Beta PDF is utilized for each unimodal, as stated in the following [31]: The parameters of the Beta distribution function (α, β) are calculated based on the mean (µ) and standard deviation (σ) of the random variable [31].
In this paper, to model the uncertainties of output power for WT and PV units, a set of possible scenarios is generated based on Metropolis-Hastings algorithm and reduced thereafter to a number of distinct scenarios using the k-means clustering technique [33].

Objective Function
The objective function is defined based on the minimization of the total expected cost (EC) of an isolated residential MG which includes cost of energy and reserve provision as well as the operating cost in different working scenarios.
In Equation (17), the first line of the objective function states the costs associated with energy provided from the generating units and the start-up and shut-down costs, and the second line expresses the commitment of the generating units to provide reserves.The third line denotes the costs associated with energy provided from the WT and PV units.The fourth line expresses the cost associated with charge/discharge of EVs and the fifth line considers the utility of the demand loads and their up and down reserve provision.
The rest of the terms in the objective function deal with the operating cost in different working scenarios.In this regard, the sixth and the seventh lines consider cost of unit commitment and the cost of deploying reserves from those units in different scenarios.The eighth line represents the cost of deploying reserves from DR programs and the ninth line states the costs associated with energy provided from WT and PV units.Here, it is assumed that the MG operator would pay for energy provided by WT and PV.Finally, the last term stands for the expected cost of energy not served for the inelastic loads.

Constraints
The problem constraints include two parts; the first-stage constraints and second-stage constraints.The first-stage ones are associated with the base case scenario (i.e., deterministic operating condition), and can be expressed as follows:

•
Power balance in steady state; Equation (18) represents the active power balance in MG in steady state [21].
where, F l,t is power flow through line l in period t, (F l,t = 1 X l (δ ls − δ lr )), δ x,t is voltage angle at node x in period t.The power flow through line l is limited as: • Real power generation constraints; The real power generated by DG units are constrained by ( 20) and ( 21) [21].
• Generation-side reserve limits; Constraints ( 22)-( 24) impose limits on the provision of spinning reserve in terms of up and down regulations, as well as non-spinning reserve from the generating units.
• Demand-side reserve limits; Constraints ( 25) and ( 26) restrict the procurement of up and down reserves from the responsive loads.
• Unit commitment constraints; Equation ( 27) determines the start-up and shut-down status of units, while (28) states that a unit cannot start-up and shut-down during the same period [29].
The second-stage constraints account for stochastic operating conditions are the same as the first-stage constraints and mentioned in Appendix A.

Test Case
The simulations are performed over a modified residential MG which is presented in Figure 1 [30].There are different types of distributed generation (DG) units in the MG including two micro-turbines (MT 1 & MT 2 ), two fuel cell (FC 1 & FC 2 ) units, and one gas engine (GE) unit.Also, there are a number of renewable-based prime movers in the system including three WTs, each with a capacity of 80 kW installed at bus 6, 9 and 16, respectively and two PV plants, each with a capacity of 70 kW installed at buses 5 and 10, respectively.The wind and PV power generation are a function of random wind speed and sun radiation, respectively.Their output power scenarios are reduced by applying a k-means algorithm as shown in Figure 2. Technical specifications of the simulated MG components are given in Table 1 [34].Moreover, the hourly load profile of the MG is illustrated in Figure 3 and is supposed to be divided into three different periods, namely valley period (00:00-5:00), off-peak periods (5:00-10:00, 16:00-19:00 and 22:00-24:00) and peak periods (11:00-15:00 and 20:00-22:00).
Appl.Sci.2017, 7, 378 8 of 19 random wind speed and sun radiation, respectively.Their output power scenarios are reduced by applying a k-means algorithm as shown in Figure 2. Technical specifications of the simulated MG components are given in Table 1 [34].Moreover, the hourly load profile of the MG is illustrated in Figure 3 and is supposed to be divided into three different periods, namely valley period (00:00-5:00), off-peak periods (5:00-10:00, 16:00-19:00 and 22:00-24:00) and peak periods (11:00-15:00 and 20:00-22:00).random wind speed and sun radiation, respectively.Their output power scenarios are reduced by applying a k-means algorithm as shown in Figure 2. Technical specifications of the simulated MG components are given in Table 1 [34].Moreover, the hourly load profile of the MG is illustrated in Figure 3 and is supposed to be divided into three different periods, namely valley period (00:00-5:00), off-peak periods (5:00-10:00, 16:00-19:00 and 22:00-24:00) and peak periods (11:00-15:00 and 20:00-22:00).random wind speed and sun radiation, respectively.Their output power scenarios are reduced by applying a k-means algorithm as shown in Figure 2. Technical specifications of the simulated MG components are given in Table 1 [34].Moreover, the hourly load profile of the MG is illustrated in Figure 3 and is supposed to be divided into three different periods, namely valley period (00:00-5:00), off-peak periods (5:00-10:00, 16:00-19:00 and 22:00-24:00) and peak periods (11:00-15:00 and 20:00-22:00).In this study, it is assumed that the total signed contracts for participating customers in DR programs are equal to 40% of the total load during the scheduling period.The price elasticity of demand is shown in Table 2, which is adopted from [27] with some modification.It is also assumed that there are two PLs with 40 charging stations in buses 3 and 11.The arrival time of EVs is modeled with a Gaussian distribution with µ = 19 and δ 2 = 10 [35].Moreover, the EVs connected to the MG are assumed to be capable of providing slow, medium and fast charging modes [28,36].For the studied MG, energy prices at different tariffs (RTP, TOU and CPP) are also depicted in Figure 4.In this study, it is assumed that the total signed contracts for participating customers in DR programs are equal to 40% of the total load during the scheduling period.The price elasticity of demand is shown in Table 2, which is adopted from [27] with some modification.It is also assumed that there are two PLs with 40 charging stations in buses 3 and 11.The arrival time of EVs is modeled with a Gaussian distribution with  = 19 and 2  = 10 [35].Moreover, the EVs connected to the MG are assumed to be capable of providing slow, medium and fast charging modes [28,36].For the studied MG, energy prices at different tariffs (RTP, TOU and CPP) are also depicted in Figure 4.The optimization horizon is considered to be a day with 24 time intervals.To simulate the environmental/behavioral uncertainties within the system, 3000 scenarios are generated based on Weibull, Beta, and Gaussian PDFs to represent different values for wind speed, irradiation and EVs owners' behaviors, respectively.In the next step, the k-means algorithm is applied to reduce the generated scenarios to an optimal subset that represents well enough the uncertainties.The reduced scenarios are then applied to the proposed mixed integer programming (MIP)-based optimization stage to minimize the expected cost at scheduling time horizon.The effect of demand-side participation in different TBR-based DR programs in the MG energy and reserve scheduling is also analyzed.The optimization is carried out by CPLEX solver using GAMS software (Release 24.7.3 r58181 WEX-WEI x86 64bit/MS Windows, TU Braunschweig, Braunschweig, Germany) 37] on a PC with 4 GB of RAM and Intel Core i7 @ 2.60 GHz processor (Intel, Santa Clara, CA, USA).The optimization horizon is considered to be a day with 24 time intervals.To simulate the environmental/behavioral uncertainties within the system, 3000 scenarios are generated based on Weibull, Beta, and Gaussian PDFs to represent different values for wind speed, irradiation and EVs owners' behaviors, respectively.In the next step, the k-means algorithm is applied to reduce the generated scenarios to an optimal subset that represents well enough the uncertainties.The reduced scenarios are then applied to the proposed mixed integer programming (MIP)-based optimization stage to minimize the expected cost at scheduling time horizon.The effect of demand-side participation in different TBR-based DR programs in the MG energy and reserve scheduling is also analyzed.The optimization is carried out by CPLEX solver using GAMS software (Release 24.7.3 r58181 WEX-WEI x86 64bit/MS Windows, TU Braunschweig, Braunschweig, Germany) [37] on a PC with 4 GB of RAM and Intel Core i7 @ 2.60 GHz processor (Intel, Santa Clara, CA, USA).

Presentation and Discussion of Results
We consider the following three cases for testing the effect of scheduling of DR programs and EVs on operation costs of the MG, load profile curve characteristics and profit of customers during the scheduling period.It should be noted that Case 1 is considered to be a base case, so operating costs, load profiles and reserve scheduling in other cases are evaluated compared to the base case.
Case 1: In this case, DR programs are not considered and there is no contribution from EVs side.The scheduled energy and reserve capacity in this case is illustrated in Figure 5a,b, respectively.As shown in Figure 5a, based on the economic dispatch results, low-cost MT 1 and GE are used as base units to provide the energy.These generators are dispatched during the entire scheduling horizon to reduce the overall operating cost, while the other units (especially FC 1 and FC 2 due to their higher operating cost) are only dispatched at peak hour periods.As shown in Figure 5b, all the scheduled reserve capacity is provided by dispatchable DG units, including up-spinning reserve (Up/DGs), down-spinning reserve (Down/DGs), and non-spinning reserve (Non/DGs) in this case.Since the output power of WT and PV are intermittent, the required reserve power is provided by MTs, FCs and GE.It can be observed that when RESs power productions in scenarios are relatively different from the forecasted values, (i.e., in 10:00-14:00 and 19:00-22:00), more reserve capacity is scheduled accordingly.The total expected cost of MG operation as well as costs of providing energy and reserve services from DG units in case 1 are obtained as 897.833$, 436.622$ and 19.752$, respectively.

Presentation and Discussion of Results
We consider the following three cases for testing the effect of scheduling of DR programs and EVs on operation costs of the MG, load profile curve characteristics and profit of customers during the scheduling period.


Case 1: without demand side participation and EVs commitment,  Case 2: with demand side participation and without EVs commitment,  Case 3: with demand side participation and EVs commitment.
It should be noted that Case 1 is considered to be a base case, so operating costs, load profiles and reserve scheduling in other cases are evaluated compared to the base case.
Case 1: In this case, DR programs are not considered and there is no contribution from EVs side.The scheduled energy and reserve capacity in this case is illustrated in Figure 5a,b, respectively.As shown in Figure 5a, based on the economic dispatch results, low-cost MT1 and GE are used as base units to provide the energy.These generators are dispatched during the entire scheduling horizon to reduce the overall operating cost, while the other units (especially FC1 and FC2 due to their higher operating cost) are only dispatched at peak hour periods.As shown in Figure 5b, all the scheduled reserve capacity is provided by dispatchable DG units, including up-spinning reserve (Up/DGs), down-spinning reserve (Down/DGs), and non-spinning reserve (Non/DGs) in this case.Since the output power of WT and PV are intermittent, the required reserve power is provided by MTs, FCs and GE.It can be observed that when RESs power productions in scenarios are relatively different from the forecasted values, (i.e., in 10:00-14:00 and 19:00-22:00), more reserve capacity is scheduled accordingly.The total expected cost of MG operation as well as costs of providing energy and reserve services from DG units in case 1 are obtained as 897.833$, 436.622$ and 19.752$, respectively.Case 2: In this case, optimal operation of MG with demand-side participation (i.e., TBR-DR programs) but without EVs contribution is presented.The scheduled energy and reserve capacity in RTP programs are illustrated in Figure 6a,b, respectively.Comparing the results in Figures 5a and 6a demonstrates that with demand side participation in RTP schemes, the power provided by DG units is reduced at peak hours, specifically in 10:00-14:00 and 20:00-22:00.Likewise, during the hours with relatively high energy prices, the customers also reduce their consumption levels to save energy and get incentives.On the other hand, customers shift most of their consumptions into the time intervals with low energy prices, specifically in 01:00-05:00 (valley period, see Figure 3) to further reduce their running cost.Case 2: In this case, optimal operation of MG with demand-side participation (i.e., TBR-DR programs) but without EVs contribution is presented.The scheduled energy and reserve capacity in RTP programs are illustrated in Figure 6a,b, respectively.Comparing the results in Figures 5a and 6a demonstrates that with demand side participation in RTP schemes, the power provided by DG units is reduced at peak hours, specifically in 10:00-14:00 and 20:00-22:00.Likewise, during the hours with relatively high energy prices, the customers also reduce their consumption levels to save energy and get incentives.On the other hand, customers shift most of their consumptions into the time intervals with low energy prices, specifically in 01:00-05:00 (valley period, see Figure 3) to further reduce their running cost.As shown in Figure 6b, in this case, a part of the required reserve capacity is provided by demand side participation, including up-spinning reserve (Up/DR) and down-spinning reserve (Down/DR).Comparison of results in Figures 5b and 6b also shows that the participation of responsive loads can decrease the spinning reserve requirement of DG units and reduce the back-up energy costs.It can also be understood from the simulation results that the stochastic nature of wind and PV power generations, makes it necessary to allocate more reserve capacity to the time intervals (e.g., 10:00-14:00 and 19:00-22:00) when the risk of power shortage from RESs is higher.To this end, DR actions can provide a considerable portion of the needed upward reserve in the MG and decrease the MG operation cost.The expected operating cost of MG and the DGs energy and reserve costs in case 2 in RTP program are obtained as 872.943$, 416.789$ and 25.077$, respectively.
The scheduled energy and reserve capacity under TOU programs are illustrated in Figure 7a,b, respectively.By comparing the results in Figures 6a and 7a, it can be seen that the produced powers of DGs in TOU are slightly higher than ones in RTP programs at peak hours.This is due to the fact that during peak periods, participation of consumers in TOU programs is lower than that in RTP programs.It is also observed from Figure 7b that the scheduled reserves in these programs are different, especially in peak periods.This difference is due to the fact that the load reduction in TOU is less than that of in RTP at peak periods and the customers don't participate in downward reserve.Therefore, DGs non-spinning reserve scheduling is not required.The expected operating cost of MG and the DGs energy and reserve costs in case 2 under TOU programs are 881.164$,420.549$ and 19.172$, respectively.
The hourly energy and reserve scheduling in case 2 in CPP programs are shown in Figure 8a,b, respectively.As mentioned before, the electricity price in CPP programs is the same as the price in TOU programs, except during hours 20:00 and 21:00.During these two hours, the price in CPP is four times greater than that of TOU.So, as Figure 8a shows, customers are highly encouraged to reduce their consumption as much as possible.As a result, the demand downward reserve increases in these two hours and consequently, the DGs non-spinning reserve increases.The expected operating cost of MG and the DGs energy and reserve costs are 850.395$,410.590$ and 21.600$, respectively.As shown in Figure 6b, in this case, a part of the required reserve capacity is provided by demand side participation, including up-spinning reserve (Up/DR) and down-spinning reserve (Down/DR).Comparison of results in Figures 5b and 6b also shows that the participation of responsive loads can decrease the spinning reserve requirement of DG units and reduce the back-up energy costs.It can also be understood from the simulation results that the stochastic nature of wind and PV power generations, makes it necessary to allocate more reserve capacity to the time intervals (e.g., 10:00-14:00 and 19:00-22:00) when the risk of power shortage from RESs is higher.To this end, DR actions can provide a considerable portion of the needed upward reserve in the MG and decrease the MG operation cost.The expected operating cost of MG and the DGs energy and reserve costs in case 2 in RTP program are obtained as 872.943$, 416.789$ and 25.077$, respectively.
The scheduled energy and reserve capacity under TOU programs are illustrated in Figure 7a,b, respectively.By comparing the results in Figures 6a and 7a, it can be seen that the produced powers of DGs in TOU are slightly higher than ones in RTP programs at peak hours.This is due to the fact that during peak periods, participation of consumers in TOU programs is lower than that in RTP programs.As shown in Figure 6b, in this case, a part of the required reserve capacity is provided by demand side participation, including up-spinning reserve (Up/DR) and down-spinning reserve (Down/DR).Comparison of results in Figures 5b and 6b also shows that the participation of responsive loads can decrease the spinning reserve requirement of DG units and reduce the back-up energy costs.It can also be understood from the simulation results that the stochastic nature of wind and PV power generations, makes it necessary to allocate more reserve capacity to the time intervals (e.g., 10:00-14:00 and 19:00-22:00) when the risk of power shortage from RESs is higher.To this end, DR actions can provide a considerable portion of the needed upward reserve in the MG and decrease the MG operation cost.The expected operating cost of MG and the DGs energy and reserve costs in case 2 in RTP program are obtained as 872.943$, 416.789$ and 25.077$, respectively.
The scheduled energy and reserve capacity under TOU programs are illustrated in Figure 7a,b, respectively.By comparing the results in Figures 6a and 7a, it can be seen that the produced powers of DGs in TOU are slightly higher than ones in RTP programs at peak hours.This is due to the fact that during peak periods, participation of consumers in TOU programs is lower than that in RTP programs.It is also observed from Figure 7b that the scheduled reserves in these programs are different, especially in peak periods.This difference is due to the fact that the load reduction in TOU is less than that of in RTP at peak periods and the customers don't participate in downward reserve.Therefore, DGs non-spinning reserve scheduling is not required.The expected operating cost of MG and the DGs energy and reserve costs in case 2 under TOU programs are 881.164$,420.549$ and 19.172$, respectively.
The hourly energy and reserve scheduling in case 2 in CPP programs are shown in Figure 8a,b, respectively.As mentioned before, the electricity price in CPP programs is the same as the price in TOU programs, except during hours 20:00 and 21:00.During these two hours, the price in CPP is four times greater than that of TOU.So, as Figure 8a shows, customers are highly encouraged to reduce their consumption as much as possible.As a result, the demand downward reserve increases in these two hours and consequently, the DGs non-spinning reserve increases.The expected operating cost of MG and the DGs energy and reserve costs are 850.395$,410.590$ and 21.600$, respectively.It is also observed from Figure 7b that the scheduled reserves in these programs are different, especially in peak periods.This difference is due to the fact that the load reduction in TOU is less than that of in RTP at peak periods and the customers don't participate in downward reserve.Therefore, DGs non-spinning reserve scheduling is not required.The expected operating cost of MG and the DGs energy and reserve costs in case 2 under TOU programs are 881.164$,420.549$ and 19.172$, respectively.
The hourly energy and reserve scheduling in case 2 in CPP programs are shown in Figure 8a,b, respectively.As mentioned before, the electricity price in CPP programs is the same as the price in TOU programs, except during hours 20:00 and 21:00.During these two hours, the price in CPP is four times greater than that of TOU.So, as Figure 8a shows, customers are highly encouraged to reduce their consumption as much as possible.As a result, the demand downward reserve increases in these Case 3: In this case, we evaluate the effectiveness of TBR-DR schemes in presence of EVs.In order to indicate the impact of different programs on responsive loads along with the presence of EVs, the same types of tariffs including RTP, TOU and CPP are implemented.Figure 9 illustrates the EVs daily charging and discharging power in different TBR-DR programs.As can be seen from the operating profiles, EVs are charged during low tariff hours (valley periods) and discharged during high tariff hours (peak periods).The energy and reserves scheduling in case 3 are shown in Figure 10a,b.Compared to Figure 6, it is observed that, the output power of generating units is flattened in the presence of EVs.It should be noted that, in case 3 the charging/discharging powers of EVs are added to the MG load which in turn affect the energy scheduling process; however, there is no effect on the reserve market as EVs are not considered on this occasion.So, it can be seen from Figure 10b that DR provides a part of the required reserve scheduling similar to case 2. The expected operating cost of MG and DGs energy and reserve costs in case 3 in RTP are obtained as 866.113$, 403.482$ and 23.482$, respectively, which are considerably lower than the corresponding values obtained in the previous cases.Thus, an efficient scheduling of EVs and responsive loads can improve the operation of the MG.Case 3: In this case, we evaluate the effectiveness of TBR-DR schemes in presence of EVs.In order to indicate the impact of different programs on responsive loads along with the presence of EVs, the same types of tariffs including RTP, TOU and CPP are implemented.Figure 9 illustrates the EVs daily charging and discharging power in different TBR-DR programs.As can be seen from the operating profiles, EVs are charged during low tariff hours (valley periods) and discharged during high tariff hours (peak periods).The energy and reserves scheduling in case 3 are shown in Figure 10a,b.Case 3: In this case, we evaluate the effectiveness of TBR-DR schemes in presence of EVs.In order to indicate the impact of different programs on responsive loads along with the presence of EVs, the same types of tariffs including RTP, TOU and CPP are implemented.Figure 9 illustrates the EVs daily charging and discharging power in different TBR-DR programs.As can be seen from the operating profiles, EVs are charged during low tariff hours (valley periods) and discharged during high tariff hours (peak periods).The energy and reserves scheduling in case 3 are shown in Figure 10a,b.Compared to Figure 6, it is observed that, the output power of generating units is flattened in the presence of EVs.It should be noted that, in case 3 the charging/discharging powers of EVs are added to the MG load which in turn affect the energy scheduling process; however, there is no effect on the reserve market as EVs are not considered on this occasion.So, it can be seen from Figure 10b that DR provides a part of the required reserve scheduling similar to case 2. The expected operating cost of MG and DGs energy and reserve costs in case 3 in RTP are obtained as 866.113$, 403.482$ and 23.482$, respectively, which are considerably lower than the corresponding values obtained in the previous cases.Thus, an efficient scheduling of EVs and responsive loads can improve the operation of the MG.Case 3: In this case, we evaluate the effectiveness of TBR-DR schemes in presence of EVs.In order to indicate the impact of different programs on responsive loads along with the presence of EVs, the same types of tariffs including RTP, TOU and CPP are implemented.Figure 9 illustrates the EVs daily charging and discharging power in different TBR-DR programs.As can be seen from the operating profiles, EVs are charged during low tariff hours (valley periods) and discharged during high tariff hours (peak periods).The energy and reserves scheduling in case 3 are shown in Figure 10a,b.Compared to Figure 6, it is observed that, the output power of generating units is flattened in the presence of EVs.It should be noted that, in case 3 the charging/discharging powers of EVs are added to the MG load which in turn affect the energy scheduling process; however, there is no effect on the reserve market as EVs are not considered on this occasion.So, it can be seen from Figure 10b that DR provides a part of the required reserve scheduling similar to case 2. The expected operating cost of MG and DGs energy and reserve costs in case 3 in RTP are obtained as 866.113$, 403.482$ and 23.482$, respectively, which are considerably lower than the corresponding values obtained in the previous cases.Thus, an efficient scheduling of EVs and responsive loads can improve the operation of the MG.Compared to Figure 6, it is observed that, the output power of generating units is flattened in the presence of EVs.It should be noted that, in case 3 the charging/discharging powers of EVs are added to the MG load which in turn affect the energy scheduling process; however, there is no effect on the reserve market as EVs are not considered on this occasion.So, it can be seen from Figure 10b that DR The total load profile associated with the three cases in TBR programs are illustrated in Figure 13.As can be observed, with the application of DR programs, the total load decreases in peak periods when prices are high and increases in off-peak or valley periods when prices are relatively lower.This leads to smoother load profiles especially in cases 2 and 3.This load-shaping process can be better observed with active participation of EVs and their charging behavior during the valley period (when the price has its lowest value).The total load profile associated with the three cases in TBR programs are illustrated in Figure 13.As can be observed, with the application of DR programs, the total load decreases in peak periods when prices are high and increases in off-peak or valley periods when prices are relatively lower.This leads to smoother load profiles especially in cases 2 and 3.This load-shaping process can be better observed with active participation of EVs and their charging behavior during the valley period (when the price has its lowest value).The total load profile associated with the three cases in TBR programs are illustrated in Figure 13.As can be observed, with the application of DR programs, the total load decreases in peak periods when prices are high and increases in off-peak or valley periods when prices are relatively lower.This leads to smoother load profiles especially in cases 2 and 3.This load-shaping process can be better observed with active participation of EVs and their charging behavior during the valley period (when the price has its lowest value).
It can be also observed from Figure 13a,b, that the load profile in RTP and TOU schemes are relatively similar, but greatly different from the one in CPP scheme (Figure 13c) due to the price spikes at some time intervals and their effect on demand side participation.
The total load profile associated with the three cases in TBR programs are illustrated in Figure 13.As can be observed, with the application of DR programs, the total load decreases in peak periods when prices are high and increases in off-peak or valley periods when prices are relatively lower.This leads to smoother load profiles especially in cases 2 and 3.This load-shaping process can be better observed with active participation of EVs and their charging behavior during the valley period (when the price has its lowest value).It can be also observed from Figure 13a,b, that the load profile in RTP and TOU schemes are relatively similar, but greatly different from the one in CPP scheme (Figure 13c) due to the price spikes at some time intervals and their effect on demand side participation.
Table 3 compares the operational costs of the MG in different working conditions.The expected operating cost of MG, DGs and DR scheduled energy and reserve costs, start-up costs and start-down costs have been reported for the three cases.Comparison of results in cases 1 and 2 shows that the deployment of DR programs allows lower total operating cost to be obtained.The reason is that the expensive units are not dispatched to meet the demand of peak periods since peak loads are decreased due to the participation of responsive loads in different DR programs.Also, participation of both responsive loads and EVs in DR programs (case 3) can reduce the total operating cost more than the other cases where there are no DR action or EV support.In fact, in case 3, EVs discharging in peak hours (as shown in Figure 9) causes the decrement of expected cost of MG in comparison with cases 1 and 2. In other words, during peak hours, EVs discharge and supply peak loads; thus, the more expensive units may not be dispatched and, consequently, the energy cost of DGs is reduced.Moreover, in CPP programs, since customers are highly encouraged to reduce their consumption as much as possible at peak hours (at 19:00 and 20:00 as shown in Figure 13), the energy cost of DG units and as the result the total operating cost of MG has its lowest value.Moreover, in case 3, due to the uncertainty of EVs, the total cost of scheduling reserve of DGs and DR in each DR program is more than the one in case 2. However, it can be observed that the total deployed reserve cost of DGs and DR in cases 2 and 3 are almost the same, because deployed reserve is provided by DR and DG units and EVs do not participate, as they only affect the energy scheduling process.Table 3 compares the operational costs of the MG in different working conditions.The expected operating cost of MG, DGs and DR scheduled energy and reserve costs, start-up costs and start-down costs have been reported for the three cases.Comparison of results in cases 1 and 2 shows that the deployment of DR programs allows lower total operating cost to be obtained.The reason is that the expensive units are not dispatched to meet the demand of peak periods since peak loads are decreased due to the participation of responsive loads in different DR programs.Also, participation of both responsive loads and EVs in DR programs (case 3) can reduce the total operating cost more than the other cases where there are no DR action or EV support.In fact, in case 3, EVs discharging in peak hours (as shown in Figure 9) causes the decrement of expected cost of MG in comparison with cases 1 and 2. In other words, during peak hours, EVs discharge and supply peak loads; thus, the more expensive units may not be dispatched and, consequently, the energy cost of DGs is reduced.Moreover, in CPP programs, since customers are highly encouraged to reduce their consumption as much as possible at peak hours (at 19:00 and 20:00 as shown in Figure 13), the energy cost of DG units and as the result the total operating cost of MG has its lowest value.Moreover, in case 3, due to the uncertainty of EVs, the total cost of scheduling reserve of DGs and DR in each DR program is more than the one in case 2. However, it can be observed that the total deployed reserve cost of DGs and DR in cases 2 and 3 are almost the same, because deployed reserve is provided by DR and DG units and EVs do not participate, as they only affect the energy scheduling process.In order to analyze the expected cost of MG with respect to load participation in DR, a sensitivity analysis is done and shown in Figure 14.With increasing customer participation in DR, the expected cost of MG is mitigated in all TBR-DR programs.As observed, in higher values of DR participation (i.e., more than 60%) the expected cost reduced slightly because in higher DR participants, new peaks of demand may occur (also known as rebound peak effect) and expensive units may need to be committed.Also, it is seen that in all the rates of DR participants, the expected cost in CPP program has lower value compared with other TBR-DR programs.In order to analyze the expected cost of MG with respect to load participation in DR, a sensitivity analysis is done and shown in Figure 14.With increasing customer participation in DR, the expected cost of MG is mitigated in all TBR-DR programs.As observed, in higher values of DR participation (i.e., more than 60%) the expected cost reduced slightly because in higher DR participants, new peaks of demand may occur (also known as rebound peak effect) and expensive units may need to be committed.Also, it is seen that in all the rates of DR participants, the expected cost in CPP program has lower value compared with other TBR-DR programs.

Conclusions and Future Work
In this paper, the effect of the TBR-DR programs on reserve and energy scheduling in an isolated residential MG and in the presence of EVs were studied.A two-stage optimization model was developed to minimize the MG operation costs considering RESs and EVs uncertainties.The numerical results revealed that demand-side participation in energy and reserve scheduling reduces the total operating cost in different DR programs.The simulation results also demonstrated that in all TBR-DR programs, the participation of both responsive loads and EVs can reduce the energy cost of DGs and as the result the total operating cost of MG can decrease compared to the case where only DR actions are considered.Comparing the simulation results of TBR-DR programs also demonstrated that in CPP due to a great load reduction at peak price hours, the expected running cost of the system has its lowest value, and as a result, this program could be a proper alternative from the MG operator's viewpoint.In addition, the results showed that due to the uncertainty of EVs, the total cost of scheduling reserve of DGs and DR in each DR program is more than the one in case only with responsive loads.Moreover, it was shown that by increasing the participation of responsive loads in all TBR-DR programs (i.e., to more than 60%), the rate of decrement of expected cost may reduce due to the rebound peak problem.
Our future efforts will be mainly focused on developing an optimal scheduling model based on real-world uncertainties of DR resources and assessing their effects on islanded MG voltage and frequency security.

Appendix A
The second-stage constraints are as bellow: Power balance equation in different scenarios: The active power balance in MG buses in each scenario is represented as follow [21]:

Conclusions and Future Work
In this paper, the effect of the TBR-DR programs on reserve and energy scheduling in an isolated residential MG and in the presence of EVs were studied.A two-stage optimization model was developed to minimize the MG operation costs considering RESs and EVs uncertainties.The numerical results revealed that demand-side participation in energy and reserve scheduling reduces the total operating cost in different DR programs.The simulation results also demonstrated that in all TBR-DR programs, the participation of both responsive loads and EVs can reduce the energy cost of DGs and as the result the total operating cost of MG can decrease compared to the case where only DR actions are considered.Comparing the simulation results of TBR-DR programs also demonstrated that in CPP due to a great load reduction at peak price hours, the expected running cost of the system has its lowest value, and as a result, this program could be a proper alternative from the MG operator's viewpoint.In addition, the results showed that due to the uncertainty of EVs, the total cost of scheduling reserve of DGs and DR in each DR program is more than the one in case only with responsive loads.Moreover, it was shown that by increasing the participation of responsive loads in all TBR-DR programs (i.e., to more than 60%), the rate of decrement of expected cost may reduce due to the rebound peak problem.
Our future efforts will be mainly focused on developing an optimal scheduling model based on real-world uncertainties of DR resources and assessing their effects on islanded MG voltage and frequency security.

Figure 1 .
Figure 1.Single line diagram of the simulated microgrid MG.

Figure 2 .
Figure 2. The output power of renewable energy resources (RESs) in the reduced generated scenarios, (a) each wind turbine (WT) and (b) each photovoltaic (PV) plant.

Figure 3 .
Figure 3.Total demand load curve of MG.

Figure 3 .
Figure 3.Total demand load curve of MG.

Case 1 :
without demand side participation and EVs commitment, Case 2: with demand side participation and without EVs commitment, Case 3: with demand side participation and EVs commitment.

Figure 5 .
Figure 5. Hourly energy and reserves scheduling in case 1, (a) hourly energy and (b) reserve capacity.

Figure 5 .
Figure 5. Hourly energy and reserves scheduling in case 1, (a) hourly energy and (b) reserve capacity.

Figure 6 .
Figure 6.Hourly energy and reserves scheduling in case 2 under RTP programs (a) energy and (b) reserve.

Figure 7 .
Figure 7. Hourly energy and reserves scheduling in case 2 under TOU programs (a) energy and (b) reserve.

Figure 6 .
Figure 6.Hourly energy and reserves scheduling in case 2 under RTP programs (a) energy and (b) reserve.

Figure 6 .
Figure 6.Hourly energy and reserves scheduling in case 2 under RTP programs (a) energy and (b) reserve.

Figure 7 .
Figure 7. Hourly energy and reserves scheduling in case 2 under TOU programs (a) energy and (b) reserve.

Figure 7 .
Figure 7. Hourly energy and reserves scheduling in case 2 under TOU programs (a) energy and (b) reserve.

Figure 8 .
Figure 8. Hourly energy and reserves scheduling in case 2 under CPP programs (a) energy and (b) reserve.

Figure 9 .
Figure 9. Charging and discharging power of EVs in TBR-based DR programs.

Figure 10 .
Figure 10.Hourly energy and reserves scheduling in case 3 in RTP programs (a) hourly energy and (b) Reserve.

Figure 8 .
Figure 8. Hourly energy and reserves scheduling in case 2 under CPP programs (a) energy and (b) reserve.

Figure 8 .
Figure 8. Hourly energy and reserves scheduling in case 2 under CPP programs (a) energy and (b) reserve.

Figure 9 .
Figure 9. Charging and discharging power of EVs in TBR-based DR programs.

Figure 10 .
Figure 10.Hourly energy and reserves scheduling in case 3 in RTP programs (a) hourly energy and (b) Reserve.

Figure 9 .Figure 8 .
Figure 9. Charging and discharging power of EVs in TBR-based DR programs.

Figure 9 .
Figure 9. Charging and discharging power of EVs in TBR-based DR programs.

Figure 10 .
Figure 10.Hourly energy and reserves scheduling in case 3 in RTP programs (a) hourly energy and (b) Reserve.

Figure 10 .
Figure 10.Hourly energy and reserves scheduling in case 3 in RTP programs (a) hourly energy and (b) Reserve.

Figure 11 .Figure 12 .
Figure 11a,b shows the energy and reserves scheduling in case 3 considering a TOU-based DR program.As can be seen from the results, during peak periods, EVs are discharged, and the operations of the costly units are delayed accordingly.So, in comparison with the two previous cases, the energy cost of DG units decreases.The expected operating cost of MG and DGs energy and reserve costs in case 3 considering a TOU scheme are obtained as 878.252$, 413.482$ and 21.084$, respectively.

Figure 11 .
Figure 11.Hourly energy and reserves scheduling in case 3 in TOU programs (a) hourly energy and (b) Reserve.

Figure 11 .Figure 12 .
Figure 11a,b shows the energy and reserves scheduling in case 3 considering a TOU-based DR program.As can be seen from the results, during peak periods, EVs are discharged, and the operations of the costly units are delayed accordingly.So, in comparison with the two previous cases, the energy cost of DG units decreases.The expected operating cost of MG and DGs energy and reserve costs in case 3 considering a TOU scheme are obtained as 878.252$, 413.482$ and 21.084$, respectively.

Figure 12 .
Figure 12.Hourly energy and reserves scheduling in case 3 in CPP programs (a) hourly energy and (b) Reserve.

Figure 13 .
Figure 13.Daily load profile in three cases considering (a) RTP, (b) TOU and (c) CPP programs.

Figure 13 .
Figure 13.Daily load profile in three cases considering (a) RTP, (b) TOU and (c) CPP programs.

Figure 14 .
Figure 14.Expected cost of MG versus customers' participation in different TBR-DR programs.

Figure 14 .
Figure 14.Expected cost of MG versus customers' participation in different TBR-DR programs.

Table 1 .
Technical specifications of the simulated microgrid (MG) components.

Table 1 .
Technical specifications of the simulated microgrid (MG) components.

Table 2 .
Price elasticity of demand.

Table 3 .
MG operating costs (in $) in three cases considering TBR-based DR programs.

Table 3 .
MG operating costs (in $) in three cases considering TBR-based DR programs.