A Risk Aware Two-Stage Market Mechanism for Electricity with Renewable Generation
Abstract
Over the last few decades, electricity markets around the world have adopted multi-settlement structures, allowing for balancing of supply and demand as more accurate forecast information becomes available. Given increasing uncertainty due to adoption of renewables, more recent market design work has focused on optimization of expectation of some quantity, e.g. social welfare. However, social planners and policy makers are often risk averse, so that such risk neutral formulations do not adequately reflect prevailing attitudes towards risk, nor explain the decisions that follow. Hence we incorporate the commonly used risk measure conditional value at risk (CVaR) into the central planning objective, and study how a two-stage market operates when the individual generators are risk neutral. Our primary result is to show existence (by construction) of a sequential competitive equilibrium (SCEq) in this risk-aware two-stage market. Given equilibrium prices, we design a market mechanism which achieves social cost minimization assuming that agents are non strategic.
I Introduction
Electricity markets covering the majority of the US, and most of the industrialized world are operated as multi-settlement markets. These markets are organized in the sense that demand for and supply of energy and ancillary services are matched via a centralized auction mechanism, as opposed to bilateral negotiations over individual transactions [6], [9]. An independent system operator (ISO) runs a given market as a series of multi stage forward markets, and a real time or spot market. Depending upon the region, forward markets are settled days or hours ahead of the intended time of delivery, allowing for provision of cheaper, but relatively inflexible generation. Spot markets open and are settled minutes before delivery in order to balance supply and demand in real time.
While the clearing mechanisms in electricity markets are designed with the objective of maximizing welfare of both producers and consumers, the imperative to increase penetration of renewables and reduce reliance on fossil fuels now strains the existing multi-settlement paradigm. In the past, the primary source of uncertainty in market clearing came from demand side deviations, and such errors reduced to under 5% by the opening of spot markets [7]. Current levels of renewable adoption have already exacerbated typical levels of uncertainty for net demand (demand minus renewable generation), and under official mandates to increase the proportion of energy sourced from renewables this trend will only continue. For example, in California renewables constitute nearly 34% of total retail sales, while a recently passed state bill legislates that 100% of power come from renewables by 2045 [2], [5]. Reliance on renewables to this degree introduces an order of magnitude greater uncertainty in net demand, and necessitates novel market designs to address this challenge.
As a starting point, given that economic dispatch is a multi-settlement process, it makes sense to couple markets across forward and real time stages, and then allow for recourse decisions, rather than settle each stage independently. If a probability distribution for the stochastic generation is known, then maximization of expected welfare is a reasonable objective. This type of problem can be formulated as a two-stage stochastic program, and in fact it is possible to show that stochastic clearing is more efficient than two-settlement systems [6], [8].
There are a couple of issues with the use of expected social welfare as an objective function. In purely mathematical terms, a given realization of a random variable can be quite different from its expectation. Thus optimization of an expectation guarantees little in terms of variation over possible outcomes. Further, real-world observations indicate that economic decision makers are risk averse, or at least act so [1]. Therefore, given increasing levels of generation variability, it is of both theoretical and practical interest to incorporate some notion of risk into market objective functions.
In this paper we study how the introduction of risk preferences into the central objective function affects market operation. We consider a setting with an ISO and multiple generators. The ISO owns a nondispatchable, renewable resource, and the market clears in two stages: a forward stage in which only a forecast for renewable generation is available, and a real time stage, wherein the exact realized renewable generation is known. The generators each own primary and ancillary plants, which may be dispatched in the forward and real time stages, respectively. In the forward market, the ISO schedules primary energy procurements from the generators, and in the real time market purchases ancillary service where necessary. All participants are assumed to be non-strategic price takers. However, while we assume that the generators seek to maximize their expected profit, the ISO is risk averse and minimizes a weighted sum of the expectation and conditional value at risk (CVaR) of its costs. CVaR has over the past two decades become the most widely used risk measure, due to the fact that it is a coherent risk measure, and can be calculated via a convex program [4].
Our main result is the proof of existence of a sequential competitive equilibrium (SCEq) in this risk aware, two-stage market with recourse. In particular, we demonstrate the existence of first and second stage prices such that, given these prices, the generation decisions of the generators in both decisions achieve market clearance in stage two, thus balancing supply and demand. We then specify a two-stage market mechanism which implements the SCEq.
Related work. Numerous past works have studied market and mechanism design and equilibrium outcomes in the two-stage expected welfare maximization, or risk neutral setting, e.g., [3], [15] and [16].
Turning to literature which incorporates risk preferences, several works consider settings in which agents may enter into contracts in order to hedge against risky outcomes. In [11] it is shown that a complete market, wherein all uncertainties can be addressed via a balanced set of contracts, involving agents equipped with coherent risk measures, is equivalent to one in which said agents are risk neutral, and take actions based on a probability density function determined by a system risk agent. The work then investigates necessary and sufficient conditions for existence of an equilibrium consisting of allocations, prices and contracts. Assuming a similar setting in the context of hydro thermal markets, [10] shows that given a sufficiently rich set of securities are available to risk averse agents, that a multi-stage competitive equilibrium may be derived from the solution to a risk-averse social planning solution. [6] investigates difficulties that may arise when risk averse agents maximize their welfare in a market are not complete, including existence of multiple, potentially stable equilibria. Our setting differs from these works in that we have one risk aware customer for multiple risk neutral producers, and we do not allow for transactions between agents outside of the quantities of energy purchased and consumed.
II Preliminaries
II-A Risk Measures
In stochastic optimization we are concerned with losses that are both a function of a decision , as well as some random outcome , unknown when the decision is made. Generally speaking, a risk measure is a functional which accepts as input the entire collection of realizations , .
More specifically, consider a sample space equipped with sigma algebra , on which random functions are defined. A risk measure maps such random functions into the extended real line [13]. Often times the domain of , denoted is taken as for some and reference probability measure . The following characteristics of risk measures will become useful in later sections.
Definition 1
A proper risk measure satisfies for all and
We denote by the pointwise partial order, meaning for a.e. .
Definition 2
A risk measure is monotonic if and implies .
Definition 3
A risk measure is coherent if it is monotonic, convex and satisfies translation equivariance and positive homogeneity (see [13] for details on these properties).
II-B Conditional value at risk
In the following sections, we will focus in particular on conditional value at risk, or CVaR. CVaR is an example of a coherent risk measure [13]. Before defining CVaR, we introduce the related quantity, value at risk.
Suppose that random variable is distributed according to Borel probability measure , with associated sample space , and cdf . When represents losses, the is defined as follows.
Definition 4
For a given confidence level , the or of random loss is
(1) |
Thus, is the lowest amount such that, with probability , will not exceed . In the case where is continuous, is the unique satisfying . Otherwise, it is possible that the equation has no solution, or an interval of solutions, depending upon the choice of . This, among other difficulties, motivates the use of alternative risk measures such as CVaR [12].
Informally of gives the expected value of , given that . The precise definition is as follows. Let .
Definition 5
It follows from the joint convexity of in and that is convex over . Restricting attention to random losses which depend upon a decision , we have the following result.
Theorem 1
Let . If the mapping is convex in then is convex in [12].
Theorem 1 will later ensure that optimization problems with objectives including a term are convex.
III Risk Aware Stochastic Economic Dispatch Formulation
We consider a setting with conventional generators, and a single renewable generator. An additional entity, the independent system operator (ISO) operates the power grid and plays the role of the social planner (from this point we use the terms interchangeably). For simplicity we consider a single bus network.
We consider a two-stage setting, where generation is dispatched in the first stage (also referred to as day-ahead or DA) and then adjusted in the second stage (real time or RT) to match demand.
Let denote the aggregate demand. This demand is assumed inelastic, i.e., it is not affected by changes in first or second stage prices.
The renewable generator’s output is modeled as a nonnegative random variable , upper bounded by . We make the following additional assumption on the distribution of .
Assumption 1
Random variable is distributed according to pdf (and cdf ), which is continuous and positive on .
The probability distribution of is assumed to be known to all market participants. The marginal cost of renewable generation is zero. The quantity of renewable generation scheduled is denoted .
Conventional generator has access to a primary plant and an ancillary plant. Generator schedules its primary plant to produce quantity prior to realization of at cost where . We assume the primary plant is inflexible, so that its generation level must remained fixed once it is scheduled. After realization of , generator can activate its ancillary plant to produce level at cost where . Any ancillary generation produced in excess of aggregate demand can be disposed of or sold in a separate spot market, which we do not consider. We assume that for all , for , and that and for .
The generator is compensated for its first stage production at price . In the second stage, given , the generator is compensated for second stage generation at price .
III-A Generator’s Problem
We assume that each generator is price taking, i.e., its decisions and do not affect prices in either stage. Therefore, generator ’s profit is given by
(4) |
Each generator is risk neutral, and so makes first and second stages to maximize the expectation of (4). In stage 2, given production level and price , generator solves the following problem
(5) |
Let be the maximum objective value obtained in solving (5), given and . Then in the first stage, given price , generator solves the following problem
(6) |
The term is a constant when optimizing over , as generator ’s DA and RT decisions can be made independently. In order to emphasize the fact that generator observes prior to selecting , we separate generator ’s two optimization problems.
III-B ISO’s Problem
In Section III, our definition of a sequential competitive equilibrium includes a tuple of allocations, i.e., generation levels. For the purposes of examining the welfare properties of these allocations, we now introduce a two stage social planner’s problem (SPP), corresponding to our two settlement market. As is seen in the static case, the SPP involves maximizing the social welfare of all market participants. We take the welfare of generator to be the negation of generation costs from stages 1 and 2. Given , the aggregate welfare is the negation of the summation of these costs over all generators:
(7) |
where for all and are the social planner’s decisions in stages 1 and 2. Define , and similarly .
We assume that the social planner is risk averse. That is, instead of seeking to minimize the expectation of (7), they seek to minimize a weighted combination of and . signifies that the ISO considers worst case or tail events with cumulative probability to be “risky”, and therefore weights them more heavily. We now introduce the additional parameter , which gives the social planner’s relative weighting of overall expectation and of the first and second stage generation costs, and define the social planner’s risk measure as
(8) |
It can be shown that is a coherent risk measure [13].
Given that is the amount of renewable generation scheduled by the social planner in stage 1, and , the social planner’s second stage problem is
(9) | ||||
s.t. | (10) |
Note that constraint (10) is an inequality in order to accommodate scenarios in which renewable generation exceeds residual demand .
Define as the minimum aggregate social cost achieved in the second stage, given and . Then the social planner’s first stage problem is
(11) | ||||
s.t. | (12) |
where we have used translation equivariance of to move the summed first-stage costs outside of . We now argue that problems (SPP1) and (SPP2) can be combined into the following single stage optimization problem.
Lemma 2
The two-stage problem (SPP1)-(SPP2) is equivalent to the following single stage problem:
(13) | ||||
s.t. | (14) | |||
(15) |
where .
Proof 1
See Appendix.
Here we use the term “equivalent” in the sense that (SPP) and (SPP1) have the same optimal objective value. Additionally, if is optimal for (SPP), then is optimal for (SPP1), and is optimal for (SPP2) for all , given . Conversely, if is optimal for (SPP1) and collects the optimal solutions to (SPP2) for all , given , then is optimal for (SPP).
Similar to the equivalency demonstrated for the ISO’s problem in Lemma 2, it can be shown that the following single stage problem is equivalent to () and ()
(16) |
where .
IV Sequential Competitive Equilibrium
In a single stage market for a single good, a competitive equilibrium is specified by a price and quantity such that, given , producers find it optimal to produce, and consumers find it optimal to purchase, quantity of the good. Thus, the market clears, i.e., demand equals supply.
To understand the outcome of the two-stage market, we consider a sequential version of competitive equilibrium.
Definition 6
A sequential competitive equilibrium (SCEq) is a tuple such that, for all , given and , is optimal for , is optimal for , and there exists a , such that
(17) |
Note that in the SCEq definition, and are functions. We now investigate the existence of an SCEq in our two stage, risk aware setting.
Let be the Lagrange multiplier corresponding to constraint (10). The Lagrangian for (SPP2) is
(18) |
giving, in addition to feasibility, the following optimality conditions for problem (SPP2):
(19) | ||||
(20) | ||||
(21) | ||||
(22) |
Assuming , for all , and in particular
(23) |
If then for all . Summing (23) over , applying constraint (15), and rearranging gives
(24) |
where the constant is defined as . Therefore
Summing over gives the optimal second stage objective value (i.e., the minimum recourse cost given )
(25) |
Therefore, may be expressed as
(26) | |||
(27) |
Given this expression for , the following lemma gives an explicit expression of for our quadratic cost function setting.
Lemma 3
Assuming first and second stage generation cost functions of the form and , , can be expressed as
(28) |
Proof 2
Given Assumption 1, the cdf of losses will be continuous everywhere except possibly at zero, since . By Theorem 6.2 of [13], when , we may write
(29) |
where gives the pdf corresponding to . If , then using Definition 5, we have that
(30) |
Substituting for and then combining (29) and (30) completes the proof.
While is convex in the first stage decision due to (25) and Theorem 1, the upper limit of the integral in (LABEL:CVaRintegral) is not a differentiable function of , so that the Leibniz integral rule does not directly apply. The next lemma addresses this issue.
Lemma 4
Given Assumption 1, expression (LABEL:CVaRintegral) is continuously differentiable with respect to , with derivative
(31) |
Proof 3
We consider two cases, depending on the two possible values of . When , applying the Leibniz integral rule gives
When , application of the Leibniz integral rule gives
Combining the last two equations gives the expression in the lemma statement. When , is an affine function of , and when , is continuous by the continuity of . The two expressions agree at , so that is continuous.
Let . Then, problem (SPP) may be written as
(32) | ||||
s.t. | (33) | |||
(34) |
Locational marginal pricing (LMP) is a commonly used settlement scheme for economic dispatch problems, and previous work has examined extensions of LMPs to problems including two stage markets with recourse. In such models, the LMPs arise as the dual variables to power balance constraints for each stage (in our setting (33) and (34) in (SPP)). Previous work ([3],[15]) has demonstrated that such LMPs support a competitive equilibrium when the ISO or social planner is risk neutral, i.e. when . We state this formally in terms of our setting in the following theorem.
Let and denote the optimal Lagrange multipliers for constraints (33) and (34), given , respectively.
Theorem 5
When , there exists an SCEq. In particular, are given by in the optimal solution to (SPP), and the equilibrium prices are given by
(35) |
Proof 4
Theorem 6
If , then there exists a competitive equilibrium. In particular, are given by , the optimal solution to problem (SPP), and the equilibrium prices are given by
(36) |
where .
Proof 5
By Lemma 4, the objective and all constraints in (SPP) are continuously differentiable. Problem (32)-(34) has Lagrangian
Let
(37) |
Then, in addition to feasibility, the optimality conditions for (32)-(34) are [13]:
(38) | ||||
(39) | ||||
(40) | ||||
(41) | ||||
(42) | ||||
(43) | ||||
(44) | ||||
(45) |
In addition to feasibility, the optimality conditions for are
(46) | ||||
(47) | ||||
(48) | ||||
(49) |
In view of optimality conditions (42) and (43), we choose the following price schedule
Given these choices, for each , the optimality conditions for () become
(50) | ||||
(51) | ||||
(52) | ||||
(53) |
Choosing for all and for all and , (50) and (51) become identical to (38) and (39), and (52) and (53) become identical to (42) and (43).
Therefore for all , and for all and , and the selected prices, together with for all and constitute an SCEq, and we have shown by construction the existence of an SCEq.
Assuming for any (and therefore for all ), the second stage price given in (36) can be rewritten in terms of the social planner’s primal decision variables and the level of renewable generation. Rearranging the term in parenthesis in (43) gives
(54) |
Summing both sides of (54) over and using constraint (15) gives
(55) |
Thus when , we have
Given that for any (and therefore for all ), a similar calculation gives
where .
We now address the case where , as prices given in the statement of Theorem 6 cannot be applied directly in the case where . Consider a sequence , where . Then, suppressing the dependence of on , and taking the limit as on both sides of (55) gives
(56) |
The limit exists, as (SPP) may be solved for the case where , and the optimal solution is unique given our assumptions on the generator cost function form.
Therefore, it still holds in the case where that , and in turn a competitive equilibrium is given by , where and . Finally we give the following lemma on continuity of the equilibrium prices in .
Lemma 7
The equilibrium prices given in Theorem 6 are continuous in .
Proof 6
See Appendix.
V Two-Stage Mechanism for Risk Aware Electricity Market with Renewable Generation
In the proof of Theorem 6, it was shown that the SCEq prices arise as optimal dual solutions to (SPP). If we assume that the generators are not strategic, and that all participants know the distribution of , then the following mechanism implements the SCEq:
-
(1)
Each generator submits cost function coefficients and .
-
(2)
The ISO solves (SPP), and announces stage 1 price and stage 2 price schedule as given by (36).
-
(3)
Generator solves and receives .
-
(4)
At the start of stage 2, the renewable generation output is observed by the generators. Generator solves and pays .
-
(5)
Generator produces .
VI Conclusion
In this paper we consider a two-stage electricity market model with a single customer and multiple generators, taking into account the risk preferences of the customer while assuming that the generators are risk neutral. Our goal has been to determine if a sequential competitive equilibrium exists in such a market, given this discrepancy in risk attitude. We show that such an equilibrium does exist by formulating the risk aware stochastic economic dispatch market as a two-stage stochastic program, and solving this problem to determine equilibrium energy procurements and prices. The equilibrium prices directly reflect the social planner’s risk attitude. Given these prices, we specify a market mechanism for implementation of the equilibrium, assuming that the generators are not strategic. In future work we will incorporate network topology, multiple consumers, and strategic behavior in both the generators and consumers and general convex cost functions.
References
- [1] Andreas Bublitz, Dogan Keles, Florian Zimmermann, Christoph Fraunholz, and Wolf Fichtner. A survey on electricity market design: Insights from theory and real-world implementations of capacity remuneration mechanisms. Energy Economics, 80:1059–1078, 2019.
- [2] California Energy Commission. Renewable energy, January 2019.
- [3] Nathan Dahlin and Rahul Jain. A two-stage market mechanism for electricity with renewable generation. In 2019 IEEE 58th IEEE conference on decision and control (CDC). IEEE, 2019.
- [4] Gauthier De Maere d’Aertrycke, Andreas Ehrenmann, and Yves Smeers. Investment with incomplete markets for risk: The need for long-term contracts. Energy Policy, 105:571–583, 2017.
- [5] Liam Dillon. California to rely on 100 percent clean electricity by 2045 under bill signed by Gov. Jerry Brown, September 2018. [Online; posted 10-September-2018].
- [6] Henri Gérard, Vincent Leclère, and Andy Philpott. On risk averse competitive equilibrium. Operations Research Letters, 46(1):19 – 26, 2018.
- [7] Sarah Hoff. Electricity grid operators forecast load shapes to plan electricity supply, July 2016. [Online; posted 22-July-2016].
- [8] Juan M Morales, Antonio J Conejo, Henrik Madsen, Pierre Pinson, and Marco Zugno. Integrating renewables in electricity markets: operational problems, volume 205. Springer Science & Business Media, 2013.
- [9] Robert Moye and Sean P. Meyn. The use of marginal energy costs in the design of U.S. capacity markets. In 51st Hawaii International Conference on System Sciences, HICSS 2018, Hilton Waikoloa Village, Hawaii, USA, January 3-6, 2018, 2018.
- [10] Andy Philpott, Michael Ferris, and Roger Wets. Equilibrium, uncertainty and risk in hydro-thermal electricity systems. Mathematical Programming, 157(2):483–513, 2016.
- [11] Daniel Ralph and Yves Smeers. Risk trading and endogenous probabilities in investment equilibria. SIAM Journal on Optimization, 25(4):2589–2611, 2015.
- [12] R Tyrrell Rockafellar and Stanislav Uryasev. Conditional value-at-risk for general loss distributions. Journal of banking & finance, 26(7):1443–1471, 2002.
- [13] Alexander Shapiro, Darinka Dentcheva, and Andrzej Ruszczyński. Lectures on Stochastic Programming. SIAM, Philadelphia, PA, USA, 2009.
- [14] Georg Still. Lectures on parametric optimization: An introduction. Optimization Online, 2018.
- [15] G. Wang, M. Negrete-Pincetic, A. Kowli, E. Shafieepoorfard, S. Meyn, and U. Shanbhag. Dynamic competitive equilibria in electricity markets. In A. Chakrabortty and M. Illic, editors, Control and Optimization Theory for Electric Smart Grids. Springer, 2011.
- [16] Yunjian Xu and Steven H Low. An efficient and incentive compatible mechanism for wholesale electricity markets. IEEE Transactions on Smart Grid, 8(1):128–138, 2015.
Appendix A Proof of Lemma 2
Since is a coherent risk function, by Proposition 6.5 of [13] it is continuous. Also, is clearly a proper, monotonic risk function.
For every possible realization and first stage decision , there always exists a feasible solution to second stage problem (9)-(15), so is finite with probability 1 for all feasible . Together with the quadratic forms of the first and second stage cost functions, this implies that for all feasible .
Therefore by Proposition 6.37 of [13] we can write
(57) |
where . denotes that is a feasible choice for the constraint set in problem (9)-(15), given first stage decision , for any .
The argument for interchanging expectation and minimization over follows from the interchangeability principle (Theorem 7.80 in [13]).
Appendix B Proof of Lemma 7
Let denote the feasible set of (SPP), given parameter . From [14], the local compactness (LC) of at some is satisfied if there exists a and compact set such that
Observing (SPP) is equivalent to a problem with the same objective and constraints, with the additional constraints that , and for a large enough finite , and that the feasible set of (SPP) does not depend upon , LC is satisfied for any .
From [14] the constraint qualification (CQ) holds for at some with if there is a sequence such that, given , (15) is satisfied with strict inequality for all . Clearly this condition holds for all .
Define the optimal solution set of (SPP), given , as . Then, since LC and CQ are satisfied for all by Lemma 5.6 in [14], is outer semicontinuous, meaning that for all sequences , with and , there exists an such that and for .
Due to the strict convexity of the first and second stage cost functions, the objective of (SPP) is strictly convex, so that when an optimal solution exists, it is unique. Therefore, outer semicontinuity of the optimal primal solutions in is equivalent to continuity in . Since the equilibrium prices depend continuously on the primal solutions to (SPP), the prices themselves are continuous at any .