1 Introduction

The dependency on the microgrid is because of it provides the potential benefits of reliability, security, efficiency and being environment friendly [1, 2]. The participation of microgrid in the centralized energy market has been increasing dramatically in recent years. With the recent advancement of smart metering technology, there is a facilitation of the bidirectional communication that enables the participants in the microgrid operators to respond actively to the electricity prices in the energy market to maximize profit by the means of controllable distributed energy sources (DESs).

High penetration of renewable energy sources (RESs) necessitates the need for a new entity to handle the complexity associated with the RES [3,4,5]. This new entity is called renewable energy source aggregator (RESA) under whom solar and wind power producers act as independent power producers (IPPs) and RESA procures power from them. Reference [6] presented a multi-objective day-ahead and reserve-market clearing model for RESA considering the security and economic objective of minimization of cost and maximization of voltage stability. The paper did not consider the uncertainty involved with the power generated by the RES and response of the customers during a DR event. Reference [7] proposed a two-stage micro RESA model while the uncertainty of RES is determined using a mean-variance model in the upper-level real-time market and the event-driven mechanism is used for a lower intra-market level. Reference [8] proposed optimal points of residential microgrid for maximizing the RESAs profit using design space exploration methodology. The robustness of the day-ahead bidding strategy for flexible demand-side resources is evaluated using multiple stochastic scenarios [9]. References [6,7,8,9] considered the uncertainty but did not consider the financial risk that RESA faces during bidding in a day-ahead scenario.

DR is becoming an effective tool to change consumption of customer in order to maintain the balance between generation and consumption in real time. DR can be considered as negative load (or power generation) which helps in improving the reliability and economic efficiency of the system [10, 11]. To handle the complexity in implementing DR programs, a new entity has been introduced in the electricity market, which is known as a demand response aggregator (DRA). The main role of DRA is to implement the appropriate DR program at different DR events. Another function of DRA is to reduce the scalability issue of the residential customers. The DRA aggregates the entire DR magnitudes provided by different clusters. A hierarchical market model is introduced in [12, 13], which shows the competition between the set of DRAs by considering the incentives and DR quantities. In [13], this competition is quantified with the available stored energy between the aggregators using game theory. In [14,15,16], optimal consumer behavior is modeled to decide the optimal portfolio of DR contracts for a DRA participating in the electricity market. The works in [12,13,14,15,16] did not consider the RESs. In [17], the authors investigated the significance of automated DR for reducing the critical pressures on electricity supply industry, reducing the need for peaking plants and better utilization of RES. In [18], an optimal operation of DRA using mixed integer linear program (MILP) is proposed with the DR portfolio considering various load curtailment and flexible load contracts as the resources for DR.

The above analyses are carried out without considering any risk. But the response of the customer in modifying their consumption pattern is not certain so there is a requirement of studying DR considering the uncertainty associated with it. DR aggregation model is introduced in [19] which has considered the different DR contract options for hourly load reduction. In this model, the uncertainty of the customers is not investigated which is necessary for a voluntary response of customers. In [20], the authors present the combined effects of DR program, wind generator and network reconfiguration on distribution network considering uncertainties involved with DR and RES. In [21], profit maximization of DRA based on stochasticity is introduced by considering the bottom-up approach in the day-ahead and balancing markets. In this work, the uncertainty of the customers is quantified with the participation factors. The uncertain nature of the end-user responses and market prices are the basis for finding the short-term self-scheduling for DRA using information gap decision theory (IGDT) [22]. In [17,18,19,20,21,22], a simplified approach for load curtailment and load recovery is considered without using proper constraints. The load recovery model requires constraints like the constraints of starting and stopping of load recovery hours and the magnitude of load that may be recovered in a specific recovery event considering the base load of customers.

Financial risk implies the uncertainty regarding the expected returns, i.e. the actual return may not be equal to the expected return. This type of risk includes the chances of losing a part or whole investment. The risk can be understood as a potential for loss, it is not exactly same as uncertainty which means the absence of certainty in getting a particular outcome. There are certain instances wherein uncertainty is inherent with respect to the forthcoming event as in the case of the speed of the wind, cloud pattern which affects solar irradiance etc. There are different indices for estimation of risk like Sharpe ratio, Sortino ratio, value at risk (VaR) and conditional value at risk (CVaR) etc. The risk assessment measures—VaR and CVaR—have been used in many papers to reduce uncertainty in different areas of research like financial portfolio management [23,24,25,26,27]. Reference [26] highlights the non-coherent nature of VaR due to lack of sub-additivity property and suggest the use of CVaR to overcome this drawback. Being a convex function, CVaR can also be used in the optimization procedures. In [27,28,29], analytical expressions for CVaR calculation and detailed comparative analysis of risk measure of VaR are described and CVaR are discussed. The concepts of VaR and CVaR are utilized by [23,24,25,26,27,28,29] in the area of finance. These concepts are incorporated in this paper for assessing the financial risk involved with both forecasted uncertain power and uncertain load curtailment or load recovery.

Some works have been reported so far addressing the risk involved in monetary gain while doing the microgrid aggregator. The authors in [30] addressed the uncertainties of the load aggregators and renewable sources by using ellipsoidal model wherein the risk is based on the Euclidean distance between the profiles of offered and desirable renewable productions. In [31], the CVaR is adopted for finding the optimal hourly bids in the day-ahead market for maximizing the profit of the RESA, and the DR is also integrated into the operation of microgrid aggregator in power balancing purpose in risk neutral scenario. Meanwhile, the benefit analysis on the basis of load curtailment is reported as well. In [32], the scheduling of renewable sources is done on the basis of maximization of profit considering variation of electricity prices, and the risk management is done using CVaR technique. In [33], the problem of optimal power scheduling considering DR and various alternative sources is formulated in the framework of portfolio optimization and is done by employment of Sortino ratio as the objective function. Sortino ratio is a risk measure technique used in the area of finance for the measurement of downside risk. But the limiting constraints used in the paper are only for the maximum and minimum values of variables, other constraints like start time, stop time have not been used. Again, in [30,31,32,33], the proper penalty function imposed on the aggregator is not considered and the effect of load recovered during valley periods is not properly addressed in benefit estimation.

In the light of aforesaid scenario, finding an effective value proposition in terms of delivering uncertain RES power and DR magnitude is an attempt of the paper. VaR and CVaR, commonly used risk measuring indices in the financial market, are effectively applied in this work both in estimating risk and variation of risk with the variation in uncertain parameters. The risk levels vary with a hope to earn maximum gain from the market, therefore, the net financial benefit of the three types of aggregators is presented in the result section. The contributions in nutshell are given below:

  1. 1)

    This paper utilizes the risk measure indices, VaR and CVaR, very differently for estimating the uncertain power at different confidence levels by the aggregator and assessing the risk of the estimated power in the day-ahead market scenario. VaR and CVaR, are applied for estimating the net financial benefit acquired from DR and RES on the day-ahead market. VaR is used in estimating the RES power and magnitude of DR or load recovery at different confidence levels. CVaR is then used to reflect the amount of power that is liable for the financial risk. This representation helps user to understand the level of risk associated with uncertain generation and DR magnitude.

  2. 2)

    Both load curtailing and shifting have been considered in the paper which includes uncertain and fixed participation of customers to consider the effect of mandatory as well as non-mandatory participation. Further, a load recovery model is designed justifying the practical constraints during the day operation.

  3. 3)

    The potential effect on economic and technical issues in microgrid operation due to the difference in subjective judgment of different RES and DRAs on severity of risk has been investigated.

The remaining paper is organized as follows. Section 2 presents the segregation of aggregators. The implementation procedure of applying VaR and CvaR with a brief on these two techniques is given in Section 3. Section 4 describes the penalty function used in the paper for power deviation. Sections 5 and 6 present the mathematical modeling of DR and the benefit function of aggregators, respectively. Results and discussion are provided in Section 7. Finally, the paper concludes in Section 8.

2 Aggregator in decentralized energy market

There are two different types of aggregators in the decentralized market, i.e. DRA and RESA. Unlike independent system operator (ISO), an aggregator is a for-profit organization as its main aim is to gain profit through its operation by acting as a mediator between utility and price responsive load (PRL) and negotiates on behalf of the PRL with the operators/ISO. It acts as a seller of DR in the electricity market and provides incentives to the PRL for modifying their demand patterns. The response of the PRL at a specific DR event is quite uncertain and the DRA faces financial risk if the response is different from the amount for which it has committed in the day-ahead market. Another type of aggregator working in microgrid is the RESA that can manage all the different individual power producers and reduce the uncertainty. RESA is introduced to communicate with all such power producers and commits for the aggregated power in the energy market. The structure of the market is as shown in Fig. 1. Both aggregators participate in energy trading business while distribution companies manage the day-to-day operation of distribution network for their customers to ensure reliable and uninterrupted power [34].

Fig. 1
figure 1

Market structure

2.1 Segregation of aggregators

Both the aggregators mentioned above may face a financial risk due to the uncertainty of their resources. To reduce this financial risk, these aggregators work at a certain confidence level. Owing to different aggregators commit at different confidence levels, we classify the aggregators into three different types based on the psychology of aggregators. The first type is risk neutral aggregator (RNA), which tries to commit a minimum or zero risk value. This type of aggregator commits at a value where there is no loss even though it gets a very less or zero benefit. The second type is risk averse aggregator (RAA). This type of aggregator always tries to reduce the risk with the motto of gaining higher benefits, and tries to get high risk-adjusted returns by taking a minimum amount of risk. The third type of aggregator is the risk taking aggregator (RTA). This type of aggregator commits at a higher risk level for getting higher benefits. By segregating aggregators on the basis of risk-taking capability, the different business strategies are highlighted and thus the profit and the financial risk due to the power deviation of the aggregator are compared in this paper.

3 Introduction of VaR and CVaR

For the financial and economic analysis where uncertainty is involved, risk analysis needs to be incorporated to analyze the effect of uncertainty on the profits. Here we use the risk measures VaR and CVaR to find out the benefit of the RES and DRAs. The uncertainty studies carried out here is basically to assess uncertainties in predicting the power to be committed and further to analyze the properties of the uncertainties for the future forecast. The uncertainty in the power generated by the RES and customers response is those that are inherent and cannot be removed. These uncertainties can often be modeled by probability distribution unlike the economic uncertainty that follows Brownian motion or discrete Markov chain.

A simple mathematical representation of the VaR at \(\alpha\) confidence level is given in (1) [23]. The confidence level is expressed in percentage. The probability of any random value in the data set being greater than \(VaR_{\alpha }\) value is \(\alpha\). \(VaR_{\alpha }\) is the largest value of all the values that belongs to \(100\% - \alpha\) of the lower values, as shown in (2). This ensures that probability of obtaining power less than \(VaR_{\alpha }\) is lower than \(100\% - \alpha\).

$$\Pr \left( {R \ge VaR_{\alpha } } \right) = \alpha$$
(1)
$$VaR_{\alpha ,s,t} = \left( {100\% - \alpha } \right)R_{s,t } \qquad \forall s \in N_{R }$$
(2)

where Pr(·) is the probability function; \(R\) is the random value; \(VaR_{\alpha }\) is the VaR at \(\alpha\) confidence level; \(VaR_{\alpha ,s,t}\) is the value of power by source s at \(\alpha\) confidence level at time t; \(R_{s,t }\) is a set of all the random values of power by source s at \(\alpha\) confidence level at time t; \(N_{R }\) is the number of random variables. For a given confidence level \(\alpha\in\) (0; 100%), the risk measure \(CVaR_{\alpha}\) can be defined as an average expected value of the loss with probability \(\alpha\). Equation (3) gives a simple calculation of CVaR. CVaR in a basic sense can be said to be the mean of the \(\alpha\)-tail. In other words, it is the mean of all values of the random samples that are less than or equal to \(VaR_{\alpha }\).

$$CVaR_{\alpha } = \frac{1}{{N_{{VaR_{\alpha } }} }} \mathop \sum \limits_{g = 1}^{{N_{{VaR_{\alpha } }} }} R_{g}$$
(3)

where \(N_{{VaR_{\alpha } }}\) is the number of random values of power that is below \(VaR_{\alpha }\); \(R_{g}\) is the set of all random values below \(VaR_{\alpha }\).

3.1 Proposed implementation of risk using VaR and CVaR

In this paper, we propose a simple method for the use of \(VaR_{\alpha }\) as a committed value of power while the \(CVaR_{\alpha}\) as the value of power during a risky scenario. This approach is simple and briefly gives the idea about the probable risk of power deviation and financial risk caused due to these power deviations from the uncertain energy source. In the day-ahead market, both RES and DRAs commit for their power at different \(\alpha\). Consideration of \(\alpha\) helps in converting the uncertainty into certainty to some extent as we are certain about the probability of power being greater than or equal to \(VaR_{\alpha }\) is \(\alpha\). A number of mathematical studies on VaR and CVaR lead to a problem of a confidence level choice. In practice, the level of \(\alpha\) lies in between 0.8 and 1 where 0.8 means 20% of risk and 1 means 0% of risk or risk-free.

In the day-ahead market, each RES and DRA commits for the power that it can aggregate at that hour. The generated power from DR and RES is predicted using the probability distribution function (PDF) at different hours with different \(VaR_{\alpha }\) values given in (1). Each predicted power at \(\alpha\) confidence level has some risks associated with it, i.e. the 100% − \(\alpha\) worst value of power whose value is less than the value of power at \(VaR_{\alpha }\). Now for calculation of risk we have used \(CVaR_{\alpha }\). Power at \(CVaR_{\alpha }\) is calculated using (3).

The difference of power between \(VaR_{\alpha }\) and \(CVaR_{\alpha }\) causes financial loss associated with power at \(VaR_{\alpha }\). Taking Fig. 2 as an example, as shown in it 138.45 kW is the committed power at 80% confidence level but there is a chance that the actual generation on the day may be less than 138.45 kW. CVaR at 80% confidence level or 20% risk (i.e. 68.34 kW) indicates the highest probable power generation at risk. Therefore, the difference of these two values of power is the risky power that causes financial risk. The impact of \(\alpha\) on the financial loss is discussed in the Section 7.

Fig. 2
figure 2

Normal distribution curve for wind power generation for 1st hour

4 Deviation and penalty charge

The power generated by RESs and the response of the customers are uncertain and the power which is predicted for day-ahead scheduling is always associated with some forecast errors. These errors cause the deviation of actual power from the committed power. These deviations can be either due to overestimation or underestimation of the predicted power. Overestimation means the predicted power will be less than the power that we get on the day and deviation due to underestimation means the power predicted will be more than the power on the actual day. These deviations can cause a power imbalance along with violation of scheduled contracts. Thus, the deviation of the power that is actually supplied on the day from the committed value of power is subjected to penalty. In this paper, the penalty applied to the power deviation is calculated on the basis of the difference between the actual power \(P_{AG,t}\) at time t on the day and the committed or scheduled power \(P_{SG,t}\) at same time t by the aggregator, as shown in (4) [35, 36].

$$D = \frac{{P_{AG,t} - P_{SG,t} }}{{P_{AVC,t} }} \times 100\%$$
(4)

where D is the percentage of power deviation; \(P_{AVC,t}\) is the available capacity of the resource at time t.

The deviation charge CD (₹) paid by the aggregator is decided on the day for which the power is committed. The power deviation cost is nonlinear due to the product of two variables, i.e. power deviation and its rate for power deviation which is taken from the power purchase agreement (PPA) documents followed in India [26,27,28]. In India, Indian Energy Exchange charges penalty that depends on different percentages of power deviations, as shown in (5).

$$C_{D} = \left\{ {\begin{array}{*{20}l} 0 \hfill & \quad{D \in (0,15\% )} \hfill \\ {0.5} \hfill &\quad {D \in [15\% ,25\% )} \hfill \\ {1.0} \hfill &\quad {D \in [25\% ,35\% )} \hfill \\ {1.5} \hfill & \quad {D \ge 35\% } \hfill \\ \end{array} } \right.$$
(5)

As already mentioned, the power at corresponding VaR indicates the confidence level associated with the generation. Penalty arises if any deviation happens from generation at specific VaR. We propose to calculate the penalty on the basis of percentage deviations if the generation deviates from VaR to CVaR. The penalty formation facilitates to understand the merit of the different business strategies adopted under risky environment.

5 DRA

The DRA operates the load shifting and load curtailment programs in order to decrease the load during peak demand hours. The PRLs under load shifting program, will recover their curtailed load in valley periods through load recovery programs, but the total consumption will be less for them. The reward for these reductions is determined based on agreements between aggregator and PRL. The mathematical modeling of the DR and load recovery is given briefly in the following section.

5.1 DR modeling

The aggregated DR includes the load shifting and load curtailment based reductions from the PRL during DR events which are given in (6). The first part \(P_{sh,\alpha ,t} U_{sh,t}\) in (6) indicates the load shifting quantity, and the second part \(P_{c,\alpha ,t} U_{c,t}\) in (6) indicates the load curtailment quantity. \(P_{sh,\alpha ,t}\) represents the total DR magnitude through shifting to time t; \(P_{c,\alpha ,t}\) represents the total load curtailed by the customers at \(\alpha\) confidence level at the same time t; and \(U_{sh,t}\), \(U_{c,t}\) are the binary status indicators of load shifting and load curtailment event respectively at time t. It is to be noted that part of the voluntary response is fixed, as denoted by \(P_{{sh,{\text{fixed}}}}\) and \(P_{{c,{\text{fixed}}}}\) in (7), and the rest of the response is uncertain, as denoted by \(P_{{sh,{\text{random}} }}\) and \(P_{{c,{\text{random}}}}\) in (7). For better implementation of DR, the aggregator needs to fulfill some technical constraints which are given in (8)–(13).

$$P_{DR,t} = P_{sh,\alpha ,t} U_{sh,t} + P_{c,\alpha ,t} U_{c,t}$$
(6)
$$\begin{aligned} & P_{sh,\alpha ,t} = P_{{sh,{\text{fixed}}}} + P_{{sh,{\text{random}}}} \\ & P_{c,\alpha ,t} = P_{{c,{\text{fixed}}}} + P_{{c,{\text{random}}}} \\ \end{aligned}$$
(7)
$$P_{DR,t}^{ \text{min} } \,\le\, P_{DR,t} \,\le \,P_{DR,t}^{ \text{max} } \qquad \forall t$$
(8)
$$\mathop \sum \limits_{i = t}^{{t + R_{k,DR}^{ \text{min} } - 1}} U_{k,i}^{DR} \ge R_{k,DR}^{ \text{min} } S_{k,t}^{DR} \qquad \forall k,\forall t$$
(9)
$$\mathop \sum \limits_{i = t}^{{t + R_{k,DR}^{ \text{max} } - 1}} Q_{k,i}^{DR} \ge S_{k,t}^{DR} \qquad \forall k, \forall t$$
(10)
$$S_{k,t}^{DR} - Q_{k,t}^{DR} = U_{k,t}^{DR} - U_{k,t - 1}^{DR} \qquad \forall k, \forall t$$
(11)
$$S_{k,t}^{DR} + Q_{k,t}^{DR} \le 1 \qquad \forall k, \forall t$$
(12)
$$\mathop \sum \limits_{{t \in T_{on}^{DR} }} I_{k,t}^{DR} \le M_{DR}^{ \text{max} }$$
(13)

The constraint (8) limits the minimum and maximum capacity of the DR at time t where \(P_{DR,t}^{ \text{min} }\) represents the minimum capacity of DR and \(P_{DR,t}^{ \text{max} }\) represents the maximum capacity of DR. This constraint would run the DR program only if the required DR is in between the limits. The constraints (9) and (10) declare that the minimum and maximum durations for kth DR event. \(U_{k,i}^{DR}\) is the status of the kth DR event at time i; \(R_{k,DR}^{ \text{min} }\) and \(R_{k,DR}^{ \text{max} }\) are the minimum and maximum DR reduction durations in kth DR event at time t, respectively; \(S_{k,t}^{DR}\) is the load reduction at the kth event that would be started at time t; and \(Q_{k,i}^{DR}\) is the stop indicator of kth DR event at time i. The simultaneous functioning of start and stop indicators of the kth DR event is avoided by using (11) and (12). Finally, a number of DR events in a day should not exceed its maximum number of the DR event in a day as indicated in (13). \(T_{on}^{DR}\) represents the hours when DR event takes place; \(I_{k,t}^{DR}\) is the binary variable which checks the DR initiation at time t; and \(M_{DR}^{ \text{max} }\) is the number of times that DR program can be called in a day.

5.2 Load recovery modeling

The total load shifted in load shifting programs during different DR events is recovered through load recovery programs during valley periods of the day. The total load shifted is recovered by the customers is as shown in (14), where \(P_{RC,j }\) is the aggregated recovered quantity at jth recovery event; \(P_{sh,\alpha ,k }\) is the load shifting quantity at \(\alpha\) at kth DR event; N1 and N are the total number the recovery events and total DR events in a day respectively. Equation (15) helps in deciding the maximum quantity that can be recovered during jth load recovery event, where \(P_{RC}^{ \text{max} }\) is the maximum quantity that can be recovered during a recovery event; \(P_{AC,t}\) is the actual power at time t; \(\gamma\) is the percentage of maximum load recovery quantity during jth event at time t. The quantity of power recovered \(P_{RC,j,t}\) during the recovery hour at time t should not be more than the maximum limit of base load of the customer \(P_{CBL}^{ \text{max} }\). This is logical as it is desirable to avoid another peak due to load recovery. If the total load shifted is not recovered in a specific load recovery hour then the recovery is shifted to next load recovery hour. This is to mention that these constraints would avoid the new DR hours which may occur due to load during recovery hour. The load recovery quantities at (j + 1)th event are given in (16), where the remaining fraction of the shifted load is recovered.

$$\mathop \sum \limits_{{j \in N_{1} }} P_{RC,j } = \mathop \sum \limits_{k \in N} P_{sh,\alpha ,k }$$
(14)
$$P_{RC,j,t} = \left\{ {\begin{array}{*{20}l} P_{RC}^{ \text{max} } \hfill &\quad{ P_{RC}^{ \text{max}} + P_{AC,t} \le P_{CBL}^{ \text{max} } } \hfill \\ 0 \hfill &\quad {P_{AC,t} > P_{CBL}^{ \text{max} } } \hfill \\ {P_{CBL}^{ \text{max} } - P_{AC,t} = \gamma P_{RC}^{ \text{max} } } \hfill & \quad{\text{otherwise}} \hfill \\ \end{array} } \right.$$
(15)
$$P_{RC,j + 1, t} = \left( {1 - \gamma } \right)P_{sh,\alpha ,k }$$
(16)

The minimum and maximum durations of load recovery at jth event are given in (17) and (18), where \(V_{j,l}^{RC}\) is the load recovery status indicator of jth event at time l; \(R_{j,RC}^{ \text{min} }\) and \(R_{j,RC}^{ \text{max} }\) are the minimum and maximum load recovery durations during jth event, respectively; \(W_{l,t}^{RC}\) is the load recovery at the jth event that would be started at time l; \(H_{j,l}^{RC}\) is the stopping indicator of jth recovery event at time l. The simultaneous functioning of start and stop indicators of the jth load recovery event is avoided by using (19) and (20). Finally, the number of jth load recovery events in a day should not exceed its maximum limit, as given in (21), where \(I_{j,t}^{RC}\) is the binary variable which checks the recovery initiation at time t; \(M_{RC}^{ \text{max} }\) is the number of times that recovery program can be called in a day; \(T_{on}^{RC}\) represents the hours when recovery event takes place.

$$\mathop \sum \limits_{l = t}^{{t + R_{j,RC}^{ \text{min} } - 1}} V_{j,l}^{RC} \ge R_{l,RC}^{ \text{min} } W_{l,t}^{RC} \qquad \forall j, \forall t$$
(17)
$$\mathop \sum \limits_{l = t}^{{t + R_{j,RC}^{ \text{max} } - 1}} H_{j,l}^{RC} \ge W_{j,t}^{RC} \qquad \forall j, \forall t$$
(18)
$$W_{j,t}^{RC} - H_{j,t}^{RC} = V_{j,t}^{RC} - V_{j,t - 1}^{RC} \qquad \forall j, \forall t$$
(19)
$$W_{j,t}^{RC} + H_{j,t}^{RC} \le 1 \qquad \forall k, \forall t$$
(20)
$$\mathop \sum \limits_{{t \in T_{on}^{RC} }} I_{j,t}^{RC} \le M_{RC}^{ \text{max} }$$
(21)

5.3 Price based on load responsive model

Price elasticity can be defined as the responsiveness of demand to the change in price. High value of elasticity signifies that load is more elastic with price. If it is unity, there is a linear change between the price and demand. In power system economics, the price of electric power is highly dependent on the amount of electricity demanded by the consumers. Therefore, the price during the peak period is very high compared to the other periods. Meanwhile, during the valley hours when the demand is low, the generating companies become price taker. DR is employed during peak hours to reduce market clearing price. While in valley periods load recovery programs for the shifted load are employed resulting MCP becomes higher during these periods.

Elasticity can be calculated using (22) which shows the percentage of elasticity (PoE) at time t, where \(P_{0,t }\) and \(P_{f,t}\) are initial and final magnitudes of power and \(\lambda _{0,t}\) and \(\lambda _{f,t}\) are initial and final values of prices in kW/h at time t. PoE is the ratio of the changes in price to change in demand during recovery and DR event at time t.

$$PoE_{t} = \frac{{\frac{{P_{0,t} - P_{f,t} }}{{P_{0} ,t + P_{f,t} }}}}{{\frac{{ \lambda _{0,t} - \lambda _{f,t} }}{{ \lambda _{0,t} + \lambda _{f,t} }}}}$$
(22)
$$\frac{{ \lambda _{0,t} - \lambda _{f,t} }}{{ \lambda _{0,t} + \lambda _{f,t} }} = \frac{{\frac{{P_{0,t} - P_{f,t} }}{{P_{0,t} + P_{f,t} }}}}{{PoE_{t} }} = \beta_{t}$$
(23)
$$\lambda _{0,t} - \lambda _{f,t} = \beta_{t} \left( { \lambda _{0,t} + \lambda _{f,t} } \right)$$
(24)

Equation (24) can be rearranged as:

$$\left( {1 - \beta_{t} } \right) \lambda _{0,t} = \left( {1 + \beta_{t} } \right) \lambda _{f,t}$$
(25)

The price changed due to DR and recovery hours is determined using (26). This price rises during load recovery hours and drops during load curtailment hour.

$$\lambda _{f,t} = \frac{{\left( {1 - \beta_{ t} } \right) \lambda _{0,t} }}{{1 + \beta_{t} }}$$
(26)

6 Benefit framework of aggregators in electricity market

In this paper the data for load profile and an hourly price profile has been taken from the Indian Energy Exchange. Since the wind and solar are considered here as the must run units, the total available power generated by such sources will be supplied to the grid without any curtailment. The DR program is utilized during the peak and valley hours. The scheduling of conventional units is decided based on availability of the committed power from the RESA and DRA in the day-ahead market.

$$\left\{ {\begin{array}{*{20}c} {EB_{RESA} = \mathop \sum \limits_{t = 0}^{24} B_{RESA,\alpha ,t} } \\ {EB_{DRA} = \mathop \sum \limits_{t = 1}^{{N_{2} }} B_{DRA,\alpha ,t } } \\ \end{array} } \right.$$
(27)

where \(EB_{RESA}\) is the total expected financial benefit of RESA; \(B_{RESA,\alpha ,t}\) is the financial benefit of RESA at \(\alpha\) confidence level; \(EB_{DRA}\) is the total expected financial benefit of DRA; \(B_{DRA,\alpha ,t }\) is the financial benefit of RESA at \(\alpha\) confidence level at time t; N2 is the total number of DR hours.

6.1 Benefit of RESA

The benefit of the RESA given in (28) is the difference between the revenue (\(R_{RES,\alpha ,t}\)) that is obtained from the ISO and the cost of the distributed generation of the RESA (\(C_{RES,\alpha ,t}\)).

$$B_{RES} = R_{RES,\alpha ,t} - C_{RES,\alpha ,t}$$
(28)

The cost of the RESA is given in (29), where the first and second terms represent the production cost of wind and solar, and the third term represents the cost of deviation charges (penalty) of wind and solar.

$$C_{RES,\alpha ,t} = \lambda _{wt} \mathop \sum \limits_{t = 1}^{24} P_{wt,\alpha ,t} + \lambda _{pv} \mathop \sum \limits_{t = 1}^{24} P_{pv,\alpha ,t} + \lambda_{pen} \mathop \sum \limits_{t = 0}^{24} (P_{RES,\alpha ,t} - P_{RES,t,risk} )$$
(29)

where \(\lambda _{wt}\) and \(\lambda _{pv}\) are the wind and solar power selling prices; \(P_{wt,\alpha ,t}\) and \(P_{pv,\alpha ,t}\) are the expected wind and solar power generation at time t with \(\alpha\) confidence level; \(\lambda_{pen}\) is the price paid by RESA as a penalty; \(P_{RES,\alpha ,t}\) is the total power expected by RESA at time t at \(\alpha\) confidence level; \(P_{RES,t,risk}\) is the total power expected by RESA at time t during risk; \(\lambda_{pen}\) is decided using the deviation charges given in (5). The revenue of the RESA \(\left( {R_{RES} } \right)\) is determined using (30), it is the aggregated revenue obtained from grid and the deviation charges (incentive) of the RES power, where \(\lambda _{grid,t}\) is the price of the grid power at time t.

$$R_{RES} = \mathop \sum \limits_{t = 1}^{24} [(\lambda _{grid,t} - \lambda _{pv,t} )P_{pv,\alpha ,t} + (\lambda _{grid,t} - \lambda _{wt,t} )P_{wt,\alpha ,t} ]$$
(30)

6.2 Benefit of DRA

The expected benefit of DRA (\(EB_{DRA}\)) is determined using (31) which is the difference between the revenue that the aggregator gets for the DR (\(R_{DRA}\)) and incentive that DRA has to pay to the consumers for their load reduction (\(C_{DRA}\)).

$$EB_{DRA} = R_{DRA} - C_{DRA}$$
(31)

As shown in (32), \(C_{DRA}\) is calculated by summing the total incentive paid to the customers and the penalty is imposed on the DRA due to the deviation from committed DR magnitude. \(IC_{C}\) is the incentive given to the customers which is announced by aggregator for DR magnitude \(P_{DR,\alpha ,t}\) at \(\alpha\) confidence level at time t and \(P_{DR,t,risk}\) is the expected power from DR during risk. The revenue of the DRA is determined by using (33) and it is the net payment received from the ISO for the committed power, where \(IC_{A}\) is the incentive price given to the aggregator for DR aggregation at time t.

$$C_{DRA} = IC_{C} \mathop \sum \limits_{t = 1}^{N_2} P_{DR,\alpha ,t} + \lambda_{pen} \mathop \sum \limits_{t = 1}^{24} \left( {P_{DR,\alpha ,t} - P_{DR,t,risk} } \right)$$
(32)
$$R_{DRA} = (IC_{A} - IC_{C} )\mathop \sum \limits_{t = 1}^{24} P_{DR,\alpha ,t}$$
(33)

6.3 Algorithm for calculation of committed power for RESAs and DRAs

In this section the whole process of benefit estimation and risk estimation is explained starting from the generation of the PDF for uncertain power.

  • Step 1: Historical data of wind, solar and DR are collected.

  • Step 2: From the historical data, the random samples within maximum and minimum limits for hourly wind power, solar power and DR power during the DR hours are generated by using the function below.

    $$RV_{s,t} = P_{s,t}^{ \text{min} } + \left( {P_{s,t}^{ \text{max} } - P_{s,t}^{ \text{min} } } \right)f_\text{r}$$
    (34)

    where \(P_{s,t}^{ \text{min} }\) and \(P_{s,t}^{ \text{max} }\) are the minimum and maximum power respectively at time t for a type of resource s; fr is the random function with output between 0 and 1. The number of random samples generated greatly determined the accuracy of the prediction.

  • Step 3: The random samples are sorted and the PDF is generated. Through the PDF, the power at a specific confidence levels is calculated by using \(VaR_{\alpha }\).

  • Step 4: The committed resource risk value is measured with \(CVaR_{\alpha }\), as given in (3).

  • Step 5: The benefit analysis for the power at \(\alpha\) confidence level is then done considering risk.

7 Results and discussion

A case study has been conducted for evaluating the benefits of aggregators on the basis of the risk taking capability of the aggregator in committing the power in day-ahead market. The work considers that the three types of aggregators (RNA, RAA, RTA) are presented both in DR market and RES market. For the purpose of study, various data sets such as forecasted day-ahead demand curve and day-ahead price profile from Indian Energy Exchange are utilized [32]. As shown in Fig. 3, the demand profile can be divided into three distinct periods, namely valley period (6th–11th hours), peak period (18th–22th hours) and off-peak period (rest hours of the day), which help us to constrain DR hours and recovery hours. To distinguish the three periods from each other, and to determine the magnitude of DR, base load of customers is used. The base load of customers is the average of the loads of a customer throughout the day. The off-peak periods are those hours where the demand lies between ± 10% of the aggregated base load of customers. The hours where the demand above the + 10% of aggregated base load of customers are considered as peak period while the hours where the demand below − 10% of aggregated base load of customers are considered as valley periods.

Fig. 3
figure 3

Hourly demand curve

The price in the restructured energy market is volatile in nature, i.e. it changes based on the demand at that very instant. To show this volatile nature of price, the price profile of Indian Energy Exchange is used, as shown in Fig. 4 [37]. As seen in the Fig. 4, there is an abrupt rise in the price of the 18th hour owing to rise in the demand during 18th–22th hours. Similarly, the drop in the price of the 6th hour is due to the sink in the demand.

Fig. 4
figure 4

Hourly price profile

Table 1 shows the various data used for the analysis. Prices for solar and wind power have been taken from the recent bids placed by the IPPs in India [38]. The minimum value MCP of the day-ahead price profile has been considered as incentive paid to the customers and the average daily price is taken as the reward given to DRA for aggregation of DR.

Table 1 Input data

The DR has been utilized to reduce the peak load which in turns helps in reducing peak prices. The reduction in demand by using DR reduces the price of the energy market because of the demand elasticity of the price. Equation (27) is used to calculate the final price due to load change during DR hours with PoE of 0.8. The risk levels of the three aggregators are also shown in Table 1. The risk level of RTA is 20% which means the confidence level is 80%. Power deviation charge for different power deviations are given in (5).

In the distribution system, RESAs and DRAs are responsible for the aggregation of the power from distributed RESs and DR. In the day-ahead market, both RESA and DRAs commit for its power at different confidence levels. In the day-ahead market, the RESA and DRA commit for the power that they can aggregate at that hour. The power from DR and RES is predicted here by using the PDF curves at different hours using \(VaR_{\alpha }\). The selection of \(\alpha\) depends on the audacity of the aggregator.

Each predicted \(VaR_{\alpha }\) has some risks associated with the power difference between \(VaR_{\alpha }\) and \(CVaR_{\alpha }\). This power difference causes financial loss associated with a particular committed risky power value at \(VaR_{\alpha }\). Figures 5, 6 and 7 show the day-ahead hourly committed power profile of the solar and wind aggregators, and the load reduction through DR program by DRA. Figure 5 shows the hourly solar generation at different \(VaR_{\alpha }\). The power variation between \(VaR_{\alpha }\) and \(CVaR_{\alpha }\) for the solar and DR is not very significant, as shown in Figs. 5 and 7. It can also be said that hourly PDF will have low dispersion and will have low value of standard deviation in case of solar and DR in comparison to the variation in wind power, as shown in Fig. 6.

Fig. 5
figure 5

Solar generation profile

Fig. 6
figure 6

Wind generation profile

Fig. 7
figure 7

Estimated DR magnitudes at \(VaR_{\alpha }\) and \(CVaR_{\alpha }\)

7.1 Benefit analysis

In this section, analyses are done considering the day-ahead scenario where the aggregator would commit the power for the next day. RESs are considered to be the must-run units that will supply the power throughout the day on the basis of the availability of its generation. DR is utilized only during the peak hours of the day and the shifted load is recovered during the valley periods on the basis of availability of generation. Various scenarios involving risk are generated by various risk levels that the aggregator faces or expected to face on the day. Figure 8 shows the change in the price profile by using different \(VaR_{\alpha }\) with considering the price elasticity of load to be 0.8. The change in the prices is visible in different hours of the day.

Fig. 8
figure 8

Base price and change in price with DR at different \(VaR_{\alpha }\)

7.1.1 Benefit of DRA

DR is applied during the peak period through load curtailment and load shifting by the customers. This load reduction reduces the prices during peak load demand. The change in price is happened in the valley period (6th–11th hours) where the shifted load is recovered and this load recovery causes increment in the prices. This reduces the volatility of price. Figure 8 shows that DR helps in flattening the price profile that directly helps the ISO, distribution companies, generating companies and customers. Table 2 shows the effect of DR on the financial attributes and how different DRAs affect these attributes. The recovery of demand during valley periods also helps generating companies to save profit or reduce losses by the recovery as most of the generating companies become price taking during these periods. The effect on the price profile is dependent on the magnitude of DR that is committed by different aggregators at different risk levels. For RNA, RAA and RTA, the risk levels are assumed as 5%, 10% and 20%, respectively.

Table 2 Effect on financial attributes in presence of different DRAs

As observed, RTA is the aggregator that shows the best results as it commits for the highest magnitude of DR. The result produced considering the estimated power curtailed by the three types of aggregators at their corresponding confidence levels. RTA brings down the ratio of peak price to average price, ratio of peak price to valley price and price volatility. DR also helps in improvement of different technical attributes in the demand profile of the system, as shown in Table 3. It can be observed that RTA has the maximum capability in reducing technical attributes. The recovery of the shifted load helps in improvement of the overall load factor of system.

Table 3 Effect on technical attributes in presence of different DRAs

Table 4 shows the financial benefit of different DRAs. Benefit at no risk shows the case when actual power is equal to the committed power \(VaR_{\alpha }\). However, the benefit is decreased when actual power is equal to \(CVaR_{\alpha }\), instead of \(VaR_{\alpha }\). The DR is subject to some constraints given in (6)–(21). The penalty rates applied to the power deviation from the committed value are taken from [35, 36]. The net financial benefit of DRA is then calculated considering that the aggregator is facing risk. It is calculated by subtracting the penalty faced by the aggregator from the total expected benefit during risk.

Table 4 Financial benefit of different DRAs

7.1.2 Financial risk assessment and benefit of RESA

This case highlights the value of financial risk faced by the aggregator for the committed value of power at certain confidence level \(\alpha\). Figure 9 shows the reduction of the total power required from the grid by the microgrid. The RESA commits for the power that it can supply at different confidence levels, thus there is lesser demand from the utility. Table 5 shows the total financial benefit of risk averse RESA consisting of solar and wind risk averse IPPs. It has been found that combining both the RESs, the amount of power deviation and the number of hours during which the penalty is applied are reduced. The total expected benefit of the RESA can be calculated and is found to be much larger than the sum of benefit of the both solar and wind IPPs. RESA faces a loss during the 3rd, 8th and 9th hours. The loss occurring at the 3rd and 8th hours are owing to the market prices in these hours which are less than the cost of generation. But in the 9th hour, aggregator faces a penalty of ₹241.23 due to power deviation of 482.46 kW from the committed value. Table 6 shows the total financial benefit of the RESA at different risk levels. It is found that the RTA gets the maximum net financial benefit ₹10498.98, while the RNA and RAA earn a net financial benefit of ₹5453.20 and ₹7700.869, respectively. It can also be seen that RTA pays the maximum penalty ₹3597.913, which is much larger than those of RNA and RAA. Comparing the net financial benefit of the IPPs and RESA, it is seen that penalty paid by the RESA is much less than the sum of penalty of both the IPPs. It can also be seen that the net financial benefit acquired by RESA is much larger than the sum of the net financial benefit of both IPPs.

Fig. 9
figure 9

Hourly demand profile at different \(VaR_{\alpha }\)

Table 5 Financial benefit of total power generated by solar and wind IPPs for risk averse RESA
Table 6 Comparison of net financial benefit and penalty of solar and wind IPPs with RESA

8 Conclusion

The paper investigates the impact on financial and technical attributes in microgrid operation due to financial risk taking behavior of the market players. DRA and RESA are considered as market players and they have been divided into three types in order to represent the diverse nature of risk taking ability of individuals. Monte Carlo method is used for the creating different scenarios on the basis of probable hourly DR magnitudes and RES powers. These scenarios are utilized to generate PDFs for each hour of the day. The paper introduces a new way of utilizing VaR and CVaR, to distinguish the audacity of different types of aggregators. In order to integrate the down-side risk for deciding the magnitude of DR at different DR events, the load curtailment, load shifting and load recovery models have been modified accordingly. A benefit function has been developed to incorporate the uncertainty of the power generated by DR and RES considering the penalty function following in India for power deviations. An extensive result using the data taken from Indian Energy Exchange is given to justify the proposed work. It is demonstrated that the volatility of price reduces when the market players become more risk taking. Results also show that risk taking market players help to further flatten the load profile of the system which enhances the efficiency of the market operation however the higher risk takers may face a loss instead of making a profit at the same time. The authors are now working on finding the best confidence level for each type of aggregators considering both day-ahead and balancing market scenarios.