Novel Hybrid Stochastic-Robust Optimal Trading Strategy for a Demand Response Aggregator in the Wholesale Electricity Market

The close interaction between the electricity market and the end-users can assist the demand response (DR) aggregator in handling and managing various uncertain parameters simultaneously to reduce their effect on the aggregator's operation. As the DR aggregator's main responsibility is to aggregate the obtained DR from individual consumers and trade it into the wholesale market. Another responsibility of the aggregator is proposing the DR programs (DRPs) to the end-users. This article proposes a model to handle these uncertainties through the development of a novel hybrid stochastic-robust optimization approach that incorporates the uncertainties around wholesale market prices and the participation rate of consumers. The behavior of the consumers engaging in DRPs is addressed through stochastic programming. Additionally, the volatility of the electricity market prices is modeled through a robust optimization method. Two DRPs are considered in this model to include both time-based and incentive-based DRPs, i.e., time-of-use and incentive-based DR program to study three sectors of consumers, namely industrial, commercial, and residential consumers. An energy storage system is also assumed to be operated by the aggregator to maximize its profit. The proposed mixed-integer linear hybrid stochastic-robust model improves the evaluation of DR aggregator's scheduling for the probable worst-case scenario. Finally, to demonstrate the effectiveness of the proposed approach, the model is thoroughly simulated in a real case study.

Finally, to demonstrate the effectiveness of the proposed approach, the model is thoroughly simulated in a real case study.
Index Terms-Demand response (DR), electricity market, risk management, robust optimization, stochastic programming.

Indices t
Time Binary variable indicating that the aggregator is selling/buying to/from the DA market.
Binary variable indicating the level of load reduction in the ibDR program. I ESS, ch.

t,ω
Binary variable indicating the discharging mode of the ESS. I ESS, dis.

t,ω
Binary variable indicating the discharging mode of the ESS.

I. INTRODUCTION
A. Background and Motivation T HE power system has become increasingly dependent on the active participation by consumers as a result of the sharp increase in the use of distributed energy resources. Hence, managing this participation through the use of demand-side management techniques is essential to optimize the operation of the power system. The most effective solution for demand-side management is known as demand response (DR) [1].
Various DR programs (DRPs) can be used to better balance the fluctuations in both the generation side and demand side. The two main categories of DRPs are price-based and incentive-based DRPs. Since offering several DRPs encourages consumers to participate more actively and this leads to acquiring more DR potential for the aggregator to maximize the total profit through trading in the wholesale energy market. Optimal DR scheduling by the aggregator should contain DRPs from both price-based and incentive-based programs to provide a degree of freedom for the consumers to choose the program that suits their individual needs and preferences, thus facilitating their engagement with the DRP. Price-based programs are designed to shift a percentage of the consumption by using variable energy usage tariffs to optimize the power system operation. An example is shifting an amount of demand from the peak period to the off-peak period or vice-versa. Incentive-based DRP aims to reduce or curtail consumption by offering an incentive (often financial) to the consumers that participate in such DRPs. The main goal of DRPs is to alter a consumer's energy usage profile and further incentivize them to engage in such programs. Implementation of DRPs reduces the energy consumption during peak periods while increasing the amount of energy usage during the off-peak periods [2].
Several challenges are posed to the DR aggregator as an intermediary entity in the power system. One of the main challenges is that the DR aggregator is that the aggregator has to manage various uncertainties posed from the market side and also the consumer side in order to reach to its maximum profit. Since the aggregator should consider the uncertain behavior of the consumers during their participation in DRPs and also the uncertainty of the electricity market prices in order not to get affected in its profit negatively. To go more in detail, one of the significant challenges facing DRPs is how to incentivize the consumers to participate in the proposed DRPs and managing their correlating uncertainty. Individual consumers have a small amount of DR potential and this restricts their ability to directly trade their DR within the wholesale energy market. To resolve this issue, a DR aggregator is introduced into the energy system [3]. The DR aggregator's primary responsibility is to aggregate the obtained DR from individual consumers and trade the acquired DR into the wholesale market. Thus, two main sources of uncertainties exist, the behavior of the consumers in participation in DRPs and also the electricity market prices. Another responsibility of the aggregator is proposing the DRPs to the end-users. The aggregator usually seeks to maximize its profit or minimize its costs from trading the obtained DR in the wholesale market [4]. Addressing these challenges is indeed the main motivations in this article.

B. Literature Review
In recent years there have been various studies looking to optimize the operation of DR aggregators in wholesale markets considering the power system and consumers' constraints. Some of the most recent and closely-related research on DR aggregators is included for context and to show how the current article extends the state-of-the-art. The DR optimization methods in the power system have been extensively reviewed in [5]. Examples of incentive-based DRPs include direct load control [6], load curtailment, demand bidding [7], and emergency demand reduction. On the other hand, the most common price-based DRPs are timeof-use (TOU), critical peak pricing, and real-time pricing [8].
According to the advantageous of employment of various DRPs from both price-based and incentive-based categories, we have employed DRPs from both classifications, which provides more flexibility for the consumers. Additionally, studying the behavior of the DR aggregators in the wholesale market is also essential to improve the scheduling process of the aggregator [9]. For instance, Sumaiti et al. [10] proposed a self-scheduling optimization program that considers a price-based DRP. Load uncertainty is addressed through a fuzzy method. The willingness of the consumers to participate in the DRPs is assumed to be uncertain. However, the uncertainty associated with the wholesale market is not taken into account.
In [11], a scheduling framework is proposed that uses stochastic programming and the alternating direction method of multipliers algorithm. This model only considered the behavior of the residential consumers and neglected the other types of endusers. The uncertainties of the consumption side are managed. However, the uncertainties of electricity market prices are not assessed and these fluctuations are important for the scheduling.
Similar to the previous model, [12] only considered residential consumers and utilized stochastic programming methods for the uncertainty of load without considering market price fluctuations. Likewise, just industrial loads are studied in [13] and [14] without considering other types of consumers. Several models only considered the uncertainty of the electricity market for DR frameworks [15], [16]. For instance, Abapour et al. [15] proposed robust scheduling for a DR aggregator through game theory by the price uncertainty assumption. Moreover, Wang et al. [16] formulated an optimal bidding strategy for an aggregator. The electricity price of the day-ahead market is managed as the risk factor. However, the uncertainties that are originating from the behavior of the consumers are not directly assessed. The behavior of the various uncertain parameters in each sides of the aggregator could be modeled more realistically if the risk measure would be selected based on the characteristics of the uncertain parameter. Moreover, a taxonomy table is presented in Table I to demonstrate the novelty of the work through a caparison of the proposed model with the recent similar works.

C. Contributions and Paper Organization
The above section shows that while there exist several models that investigate the scheduling framework for DRPs, several research gaps have been identified. The major research gap is the inclusion of uncertainties associated with both the wholesale market and the uncertainties from the consumer side. Additionally, respecting the characteristics of the uncertain parameters is necessary for selecting the best risk management strategies. For instance, in optimization models based on robust approaches, the robustness level of the uncertain parameter can be adjusted through the budget of uncertainty [25]. Based on the available characteristics of the load on the demand-side, stochastic modeling is more effective as a risk measure [26].
In the proposed model the day-ahead market price can be forecasted by the DR aggregator based on the available price history. The main uncertainty of the market prices is due to the price fluctuations that could be addressed through an effective robust management method. On the other hand, stochastic programming can be employed to handle the uncertainty of the engagement ratio, as the participation ratio of consumers in the DRPs is known. Thus, a combination of both robust and stochastic approaches is proposed to model the aforementioned uncertain parameters. Another advantage of the proposed hybrid model is the mixed-integer linear problem which has a convex mathematical formulation.
Additionally, this model considers three types of consumers, industrial, commercial, and residential consumers, with different demand usage patterns, making the model more comprehensive.
Thus, the main contributions of the proposed model are summarized as follows.
1) Proposing a hybrid mixed-integer linear programming (MILP) optimization framework for a DR aggregator that considers various uncertainties with different inherent characteristics of both the market and consumer sides through a combination of robust and stochastic methods, simultaneously. 2) Proposing a hybrid robust-stochastic model that considers the stochastic and nonstochastic uncertain parameters to improve the scheduling of the DR aggregator and its riskbased operation. 3) Providing more flexibility for the consumers regarding engagement in the DRPs by considering two types of DRPs and considering an energy storage unit for the DR aggregator. The organization of the article is presented as follows.
In the next section, the proposed hybrid stochastic-robust method is presented and explained. Section III presents the data used for the case study as well as the results of the simulation. Section IV contains the conclusions drawn from the most important findings.

A. DR Trading Framework
In this section, the proposed DR framework is introduced and presented in detail. As mentioned before, this model uses a hybrid stochastic-robust optimization approach. Two uncertain parameters are addressed and managed through the combination of risk measures. The proposed DR framework is designed as follows.
On the demand-side of the aggregator, there are three consumer sectors, namely residential, commercial, and industrial sectors. The aggregator manages the participation of consumers through two different DRPs, namely the TOU program and incentive-based program. On the wholesale electricity market side of the aggregator, the day-ahead market is available. The aggregator can participate in the day-ahead market as a pricetaker entity to trade its acquired DR. The proposed model is shown in the flowchart in Fig. 1. According to Fig. 1, in stage zero, the input data are collected and employed, such as the electricity market specifications, DRPs specifications, and load data of the consumers who participate in this framework. The most significant sources of uncertainties that have the greatest impact on the profit of the aggregator are addressed and managed in this model which is the day-ahead market prices in the market-side of the aggregator and the participation ratio of the end-users in DRP in the consumption-side of the DR aggregator. Then, in the main stage, the combination of stochastic programming and robust optimization is considered. To do this, a number of scenarios for the participation ratio of consumers in the ibDR program are generated. In other words, the uncertainty of the consumers' participation ratio is managed and addressed through stochastic programming to maximize the DR aggregator's profit. In the stochastic phase, the uncertainty of market price is not considered. Then, the hybrid stochastic-robust model is introduced. The new uncertain parameter which is the electricity market price is considered to be accounted through another risk measure that can indicate the effect of the electricity market on the profit of the aggregator, which is robust optimization.
Hence, both uncertain parameters are being managed through the hybrid stochastic-robust method. In the final step, the optimal result of the problem would be given and demonstrated. The full explanation of the hybrid model will be presented in the following sections.

B. Mathematical Problem Formulation
The problem formulation of the hybrid stochastic-robust model is presented and described in this section. According to the first step of the flowchart depicted in Fig. 1, the mathematical formulation of the stochastic programming is presented. This step is shown mathematically in (1)- (19). The problem is structured as a maximization model to achieve the highest possible amount of profit for the DR aggregator. In this section, the participation ratio is considered to be addressed through stochastic programming.
The objective function is presented as The probability of each scenario is denoted by π(ω). There are four terms in the objective function. The first term, i.e., (P DA,s indicates the revenue and cost from selling and buying the acquired DR in the day-ahead market, respectively. Afterwards, the next term that is denoted , represents the amount of reward that has to be given to the consumers who participate in the ibDR program. This reward is paid to the consumers during the peak period and received from them during the off-peak period. Therefore, positive values for this term represent a reward for the demand reduction that is paid by the aggregator, being a potential revenue during off-peak periods due to the negative cost for the DR aggregator. Finally, the last term in this equation is related to the cost of the energy storage system (ESS) that is operated by the aggregator to optimize its trading in the day-ahead market.
The ESS is being served if the amount of power that is going to be offered in the day-ahead market is greater than the available DR. This mismatch is being cleared through operating the ESS. Charging the ESS imposes costs to the aggregator, which decreases its total profit, while discharging the ESS entity will help and improve the aggregator performance in order to gain more revenue.
The energy balance constraint is presented in (2). The amount of demand that is traded in the day-ahead market is required to be equal to the amount that is obtained from the end-users through the ibDR and TOU programs and any shortfall would be compensated through the ESS. The negative value for P TOU t,ω is because of the nature of this program and is explained in more detail in the TOU constraint equations (2) The constraints for the amount of power that could be traded are shown in (3)-(5). In (3) and (4), the capacities of offering and buying the amount of power in the day-ahead market are addressed as, currently, the aggregator can only trade in the wholesale market. Equation (5) The constraints related to the implemented ibDR program are described in (6)- (9). The amount of demand is reduced through (6). PR t,ω indicates the participation ratio of the end-user in this DRP in time interval t and scenario ω multiplied with P ibDR t,j , which shows the amount of reduction chosen from the Demand Reduction Curve [27] through a binary variable denoted by I ibDR t,j . The demand reduction curve is a table which the aggregator proposes to the consumers, highlighting the relationship between demand reduction and the correlated amount of incentive (reward) considered for the end-user, as addressed in (7). This reward is greater than the previous step and smaller or equal to the current step.
In other words, the amount of reward is within the range of R ibDR t,(j−1) and R ibDR t,j , and R ibDR t,j will be chosen as the reward amount (8). It should be noted that in each time interval only one step of this reduction curve can be selected, which is ensured through (9) using a binary variable I ibDR As previously stated, there are two types of DRPs, the first type is introduced above and the second program is the TOU program. The TOU program is one of the most popular DRPs that can alter the usage pattern of the consumers through different energy tariffs in different periods such as peak and off-peak periods.
This program is utilized in the proposed framework through (10). D0 t,ω (c, p) indicates the initial consumer's load in scenario ω before the use of the TOU program in sector c and period p. The elasticity of consumers is assumed through a matrix that is E t (c, p). This matrix indicates how the end-users are elastic to the change in their energy usage pattern. The last term in this constraint ( λ c,p −λ c,p 0 λ c,p 0 ) denotes the new tariff after TOU employment in sector c and period p, i.e., λ c,p and the normal tariff, i.e., λ c,p The specifications of the considered ESS are presented in (11)- (17). The amount of energy in time interval t and scenario ω is calculated in (11). The ESS energy is dependent on the previous time interval (t-1) and scenario ω plus the charging amount of power multiplied by the charging efficiency minus the discharging amount of power multiplied by the discharging efficiency [28]. As mentioned before, the ESS can be charged or discharged in each hour. In other words, at least one of the components of (11) that are P ESS,ch.

t,ω
should be zero as the ESS cannot be charged and discharged at the same time. The energy level of the ESS cannot be less than E ESS,min or higher than E ESS,Max The capacities related to the charging and discharging amount of power is limited through the inclusion of (13) and (14), respectively, 0 ≤ P ESS,ch.
As stated before, charging and discharging of the ESS cannot occur simultaneously, as considered in (15). It is also assumed that the initial and final energy of the ESS is equal as stated in (16) 0 ≤ I ESS,ch.

t,ω
Moreover, the initial amount of energy of the ESS is dependent on the ESS maximum capacity as indicated by After introducing stochastic programming, the hybrid robuststochastic optimization method is implemented. The uncertainty of the day-ahead market price is handled through robust programming due to the high importance of the wholesale electricity market. Meanwhile, the uncertainty of the participation ratio of the consumers in the DRPs is addressed by the scenario-based stochastic approach. It is noteworthy to mention that the general mathematical formulation of the robust optimization is given and demonstrated in [29] and [30]. Thus, regarding the general form of robust optimization, the proposed hybrid robust-stochastic DR framework is formulated using subject to ξ ω , β t,ω , y t,ω ≥ 0.
The hybrid robust-stochastic framework is solved through the reformulation of the maximization problem into a minimization problem, as shown in (20).
In the mathematical formulation of the DR model, P DA,s t,ω , P DA,b t,ω , PR t,ω , P ESS,ch t,ω , P ESS,dis t,ω , P ibDR t,ω , E ESS t,ω are the decision variables. While the day-ahead market price (λ DA t ) is assumed to be the uncertain parameter managed through the robust management method. The day-ahead market price can fluctuate from λ DA,min t to λ DA,Max t . As mentioned in [29], there is an important integer item in the robust optimization that is the budget of uncertainty, denoted by Γ. The budget of uncertainty is employed to enforce limitations of the electricity market price, which is considered as the uncertain parameter of the market side of the framework and these limitations are given as λ DA,min t to λ DA,Max t . Moreover, Γ controls the level of conservativity of the DR framework during the scheduling time. Therefore, the value of the budget of uncertainty can be given as follows: Γ ∈ {01, 2, . . . , T }. In the case Γ = 0, the uncertainty of the day-ahead market price is ignored and the results are suitable for risk-neutral decision-makers. As the budget of uncertainty increases, the proposed DR framework results would be better suited for risk-averse decision-makers and the model would become more conservative. Hence, the most conservative condition (worst-case scenario) will occur when Γ = T. In this condition, it is assumed that the day-ahead market price would fluctuate from its corresponding forecasted value in all the scheduling time horizon, [0-Γ]. Additionally, ξ, β, and y are dual variables of the constraints considered due to the reformulation of the problem.

A. Data Preparation
In this section, the data and the test system assumptions are introduced and explained in detail. This problem is formulated as a MILP model and the CPLEX solver in the general algebraic modeling system (GAMS) programming environment was used to obtain the optimal solution. The number of single equations in our simulation is equal to 4057. Moreover, a total of 3950 is the total number of the single variables, 1898 of them are discrete variables. The execution time in our modeling was approximately 12.5 s on a personal computer with 6 GB RAM and 2.41 GHz of CPU speed.

B. Data Assumptions
As explained in the previous section, the day-ahead market is chosen from the wholesale market for the upper side of the aggregator, allowing the DR aggregator to trade its acquired DR. The day-ahead market price is assumed to be an uncertain parameter managed through the robust management method. The day-ahead market price can fluctuate from λ DA,min t to λ DA,Max t . The energy prices are taken from the Portuguese day-ahead market [31]. The prices are shown in Fig. 2. According to this figure, the lowest market prices occur at 6:00 in the morning, while the highest prices are seen at 12:00, 14:00, and 22:00.
Additionally, Fig. 3 illustrates the input data for the cumulative demand of each consumers' sector, which is based on real scenarios that are derived from Portugal. According to this figure, three consumer sectors are considered in this case study which illustrates the sum of the demands of the consumers that are classified in several sectors: residential; commercial; and industrial. The residential and the commercial's behavior are similar to each other. However, the load data of the industrial sector indicates a significant difference. The residential and commercial's peak period starts from 9:00 in the morning and ends at 22:00. The peak period for the industrial sector occurs at 9:00 and ends at 18:00. The hours that are not considered in the peak period are assumed to be off-peak periods.
Regarding the parameters that are considered for the ESS, it should be noted that the maximum and minimum capacities of the ESS are 200 and 100 kWh, respectively. The charging/discharging state of charge (SOC) of the ESS are assumed to be 20 kWh. It is worthwhile to mention that the initial SOC of ESS is considered to be set by the optimal solution. The efficiency of the battery for both charging and discharging mode operation is chosen as 90% from the nominal value. Finally, the degradation cost of the battery is supposed to be 0.07 €/kWh.
As stated in the problem formulation section, the ratio of participation by the consumers in the DRP is considered to be the uncertain parameter that is handled through stochastic programming. To this end, a number of scenarios are generated. After the scenario reduction process, 20 scenarios have been chosen as the final number of scenarios describing the ratio of participation of consumers in the incentive-based DRP.
In the incentive-based DRP, 20 steps of demand reduction are selected to correlate with a certain amount of reward [32]. Regarding the TOU program, the values used in the matrix of elasticity are taken from [27].
In the proposed hybrid stochastic-robust problem, the price of energy in the day-ahead market is chosen as the second uncertain factor that is being addressed through the robust approach. To this end, a price variation of 20% from the assumed values is considered and this is shown in Fig. 2. It means that, in robust programming, it is supposed that the prices are fluctuating 20% from the forecasted values.  and discussed. The first result discussed is related to the impact of the TOU DRP, as shown in Fig. 4. As indicated in this figure, the total reduction amount of the demand through the implementation of TOU program is illustrated.
According to these results, it can be seen that during the off-peak period, there are positive values and during the peak period, there are negative values. The positive values mean that by implementing the TOU program, the consumers increase their consumption compared to their consumption without the TOU program. The negative values during the peak period indicate a decrease in consumption relatively to the consumers' usage pattern without the TOU program.
As explained in the problem formulation, the TOU program has a direct relation to the amount of demand of each sector. Thus, the participation of consumers in this program in the residential and commercial sectors is lower than the corresponding values in the industrial sector. This is because the daily power use of the industrial consumers is greater than the daily usage in the other sectors. Therefore, the largest share of the total TOU program that is shown in Fig.4 is due to the industrial sector. Note that the peak and off-peak period is not the same for all the sectors. Thus, from 18:00 to 22:00, the industrial sector is in the off-peak period and the other two sectors are still in the peak period, the total TOU is the summation of negative values in the residential and commercial section and positive values in the industrial one. This is the main reason that these hourly values are different relatively to others in the studied time horizon. It should also be noted that from 18:00 to 22:00, as the industrial sector is in its off-peak period and since it has the largest share of demand, the total amount of obtained demand is based on the behavior of the industrial sector.
2) Performance of ibDR Program: As explained in the previous section, the ibDR program is also considered in this model. In this program, the participation ratio of consumers is assumed to be uncertain and modeled through stochastic programming. Moreover, the day-ahead market prices are modeled using robust programming. As explained before, the budget of uncertainty, i.e., Γ, plays the most crucial role in investigating the impact of the uncertain parameter. Therefore, three values are chosen for the budget of uncertainty, which are Γ = {0, 2, 12} . When Γ = 0, it means that the robust impact is not considered and the results shown in this case are the same as when only stochastic programming is taken into account. In the second condition, it is assumed that the price can fluctuate in two hours from the observed hours, i.e., Γ = 2. It corresponds to a small share of robustness. Finally, in the last case, Γ = 12 is selected. It means that the optimal schedule is the most robust against fluctuations in market price, which is the uncertain parameter.
As illustrated in Fig. 5, the participation of consumers in the ibDR program during the off-peak period for all the considered cases are the same. It means that the participation of consumers in this DRP is not dependent on the robustness of the market price. However, during the peak period, the impact of robustness varies. According to this figure, when Γ = 0, consumers participation is at its maximum. For instance, the DR aggregator obtains more than 200 kW at 12:00 from the participants in this DRP. This is due to the high market price during these hours. Since the impact of robustness is neglected, consumers increase their participation in order to receive the high reward from the aggregator. However, by increasing the budget of uncertainty, the worst cases are simulated, and to make the programming robust against the price variations, the acquired demand from this type of DRP is decreased. Therefore, it is completely reasonable that the lowest demand is obtained from the consumers that are related to Γ = 12.
3) Performance of ESS: The hourly operation of the ESS is illustrated in Fig. 6. According to this figure, when the level of energy in the ESS is increasing, it indicates that the ESS is in its charging mode. When the energy level in this entity decreases compared to the previous hour, the ESS is in discharging condition. Table II gives the behavior of the ESS in detail. In Table II, the behavior of the ESS for various budgets of uncertainty is given. According to the problem constraints, it was expected that both charging and discharging of the ESS cannot occur  simultaneously. This is the reason why in every hour, one of the values in the charging or discharging related columns are zero.
Since the initial stored energy in the EES is supposed to be 100 kWh, at the end of the first hour, the stored energy has increased by 20 kWh, according to Table II. The results given in Table II and Fig. 6 show that the ESS charges until 03:00 regardless of the value of budget of uncertainty, while the behavior of storage changes from 04:00. In the first two cases, i.e., Γ = {0, 2} , the ESS starts to discharge, while in the worst-case scenario that occurs when Γ = 12; the ESS is still charging, but not to the full capacity. It is worthwhile to mention that the number of charging cycles of ESS in each scenario is as follows: five when Γ = 0; four when Γ = 2; and seven when Γ = 12. The number of charging and discharging cycles in the first two scenarios is similar.
However, it is not the case in the worst-case scenario. In the worst-case scenario, it is considered that in 12 h there is a price variation that affects the profit of the aggregator negatively. Thus, the aggregator operates the ESS to minimize the negative effect of price variations.

4) Scheduling of DR Aggregator in DA Market:
The daily schedule of the aggregator is depicted in Fig. 7. In this figure, the amount of power that the aggregator trades with the dayahead market is shown. According to the results, the flow of energy during the off-peak hours is from the day-ahead market to the consumers. While in the peak hours, 9:00 to 22:00 for the residential and commercial sectors and from 9:00 to 18:00 for the industrial sector, the flow is reversed. In other words, during the peak period, the aggregator offers its acquired demand to the day-ahead market.
As there are some hours which are peak periods for the residential and commercial sectors and off-peak periods for the industrial sector, namely from 18:00 to 22:00, the aggregator is still offering its demand to the day-ahead market in these hours. In contrast, this amount is much smaller than the previous hours. Since the majority of demand belongs to the industrial sector, it has a large impact on the results relatively to the other two sectors. In the worst-case scenario (Γ = 12), the aggregator is not trading at all. In other words, the amount of power reduction during the peak period of residential and commercial sectors is equal to the demand increase during the off-peak period of the industrial sector, which occurs between 18:00 and 22:00 during the worst-case.

5) Sensitivity Analysis of Proposed Method:
Comparing the three cases, it can be seen that as the budget of uncertainty increases, the total amount of traded power in the day-ahead market decreases during the peak period and vice-versa in the off-peak period. Hence P DA t reaches to zero during the worst-case at 18:00. The salient results obtained are depicted in Fig. 8, which provides the sensitivity analyzes of the proposed model. As it was stated in the previous sections, the profit is affected directly by the budget of uncertainty and the market price variations.
The variations for the day-ahead market price are chosen to be 0, 5%, 10%, 15%, and 20%, while the budget of uncertainty is selected from zero to 12 (worst-case). For a fixed value of Γ, as the price variation increases, the total profit of the aggregator decreases. The minimum value for the profit of the DR aggregator occurs during the worst-case scenario and maximum price variations from the forecasted values, that is, 39 070 € at Γ = 12 and α = 20%. On the other hand, the maximum profit of aggregator is 257300 € when there are no price variations and the budget of uncertainty is equal to zero.

6) After the Fact Analysis of the Proposed Method:
In this section, the effectiveness and usefulness of the proposed model is demonstrated. To this end, three optimization techniques are applied to the employed case study which is named as after the fact analysis [33]. In the robust optimization approach, it is considered that the uncertain parameter is addressed and handled through the robust method.
On the other side, the uncertain parameters are only managed through the stochastic optimization approach. The actual and forecasted day-ahead electricity market are considered in this stage for seven days which is illustrated in Fig. 9. As seen in this figure, the forecasted market prices are slightly lower than the actual values during the first four days of the considered period. Then, in the remaining days of the assumed period, it is reversed where the forecasted prices are greater than the actual values of the day-ahead market. Table III indicates the profit of the DR aggregator for the proposed hybrid, the stochastic and robust optimization methods  using the actual day-ahead electricity market prices. According to the results, the total profit of the aggregator through the application of the hybrid robust-stochastic approach will be greater than the other two studied methods, i.e., robust method and stochastic method in the typical week. Moreover, it can be seen that the total performance of the proposed approach is better than the other ones whenever the forecasted prices are greater than the actual prices or even when the forecasted prices are lower than the actual prices.

IV. CONCLUSION
A hybrid stochastic-robust model is proposed in this article to provide a better analysis for the DR aggregator in the evaluation of adverse scenarios during the scheduling of DRPs for the enduser. A stochastic method is applied to manage the engagement rate of the demand-side in the DRPs, which include three sectors of consumers, namely industrial, residential and commercial end-users. A robust approach is implemented on the upper side of the aggregator that contains the wholesale electricity market. Fluctuations in the day-ahead market prices that can affect the profit of the aggregator are considered. The TOU and ibDR programs are utilized for the consumers and an ESS entity is operated by the aggregator. Unique peak and off-peak periods are considered for each sector of consumers to enhance the model's effectiveness on a real case study. The results indicate that the demand of the industrial consumers affects the profit of the aggregator more than the other sectors due to their high demand during the peak period. Regarding the ESS operation in the first hours of the off-peak period, the behavior of ESS is the same in all cases, that is, in the charging mode. The ESS remains in the charging mode in the worst-case scenario, while it begins to discharge in the other scenarios to prevent any economic loss for the aggregator. Additionally, for a fixed value of the budget of uncertainty, as the price fluctuations increase, the total profit of the aggregator decreases in response. Moreover, the minimum profit of the DR aggregator occurs during the worst-case scenario and maximum price variations from the forecasted values. For future work, other electricity markets such as balancing market, spinning market, and forward contracts could be considered to make this model more comprehensive. Another interesting development that can be done on this article is considering the prosumers as the clients of the aggregator instead of consumers. Meanwhile, multienergy systems can be included alongside the electricity market to optimize the consumers' behavior in the gas and heating engagement, as well as the electricity demand.