On Clearing Coupled Day-Ahead Electricity Markets Johannes C. Müller Johannes.Mueller@math.uni-erlangen.de joint work with Alexander Martin Sebastian Pokutta Oct 2010 Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 1 / 22
1 Electricity Markets 2 Mixed Integer Quadratic Programm Maximization of the Economic Surplus Optimality Conditions Block Price Condition 3 Algorithms Fast Heuristic Exact Algorithm 4 Results Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 2 / 22
Day-Ahead Electricity Auctions Day-Ahead Auction 1. collect demand and supply orders for the following day 2. start auction maximize economic surplus accept/reject orders find clearing price 3. return execution schedule for the following day Infrastructure Market Areas Interconnectors Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 3 / 22
Day-Ahead Electricity Auctions Day-Ahead Auction 1. collect demand and supply orders for the following day 2. start auction maximize economic surplus accept/reject orders find clearing price 3. return execution schedule for the following day Infrastructure Market Areas Interconnectors Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 3 / 22
Basic elements of energy markets Bids / Orders are characterized by quantity (demand/supply, area, hour) price limit allow partial execution (yes/no) Order Types Hourly Bids Block Bids Flexible Bids Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 4 / 22
Basic elements of energy markets Bids / Orders are characterized by quantity (demand/supply, area, hour) price limit allow partial execution (yes/no) Order Types Hourly Bids Block Bids Flexible Bids Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 4 / 22
Hourly Bids Aggregation of hourly bid curves provides one hourly net curve per area and hour bid curve trading quantities depending on the price downward sloping curves Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 5 / 22
Block Bids 90 80 70 60 Quantity 50 40 30 20 10 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Time Slot Block executed Block not executed A block bid allows for trading electricity in several hours using only one price limit for all hours: (net gain) < 0 don t execute Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 6 / 22
Flexible Bids 60 50 40 Price, /MW 30 20 System Price Flex Bid Price Limit Supply Flex Bid can be executed 10 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Time Slot Flexible bids allow for trading electricity without defining the delivery hour using a limit price to avoid a loss (gain in hour t) < 0 don t execute in hour t Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 7 / 22
Interconnectors Function of Interconnectors balance net demand of adjacent areas NO4 harmonize prices NO5 NO3 SE FI NO1 NO2 EST Transmission Constraints Available Transmission Capacity (ATC): limits the flow Ramp Rate: limits the change of flow FR BE NL DKA SEA DK1 DK2 GER Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 8 / 22
Interconnectors Function of Interconnectors balance net demand of adjacent areas NO4 harmonize prices NO5 NO3 SE FI NO1 NO2 EST Transmission Constraints Available Transmission Capacity (ATC): limits the flow Ramp Rate: limits the change of flow FR BE NL DKA SEA DK1 DK2 GER Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 8 / 22
Maximization of the Economic Surplus, subject to Transmission Constraints: Overview δh max q h p h (u) du + p b q b,t β b + K h H 0 s.t. a A, t T : b B,t T q h δ h + q b,t β b = h H a,t b B a c C a (MIQP) τ c,t c C + a τ c,t c C, t T : τ c,t τ c,t τ c,t c C, t T : τ c τ c,t τ c,t 1 τ c c C, t T : τ c,t R h H : δ h [0, 1] b B : β b {0, 1} Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 9 / 22
Mixed Integer Quadratic Programm Objective: Economic Surplus max δh q h p h (u) du + p b q b,t β b + K h H 0 b B,t T Notation: β b {0, 1} p b, q b,t δ h [0, 1] p h (u) execution state of block bid b B price limit; net demand of block b B in hour t T execution state of hourly net curve segment h H parametrization of the price of curve segment h H Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 10 / 22
Mixed Integer Quadratic Programm Constraints: 1. net demand = net import: a A, t T q h δ h + q b,t β b = h H a,t b B a c C a τ c,t c C + a τ c,t 2. ATC: c C, t T τ c,t τ c,t τ c,t 3. ramp rate: c C, t T τ c τ c,t τ c,t 1 τ c Notation: τ c,t R transmission on connector c C, hour t T h H a,t net curve segments in area a A, hour t T b B a block bids in area a c C + a connectors leaving area a Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 11 / 22
Mixed Integer Quadratic Programm Constraints: 1. net demand = net import: a A, t T q h δ h + q b,t β b = h H a,t b B a c C a τ c,t c C + a τ c,t 2. ATC: c C, t T τ c,t τ c,t τ c,t 3. ramp rate: c C, t T τ c τ c,t τ c,t 1 τ c Notation: τ c,t R transmission on connector c C, hour t T h H a,t net curve segments in area a A, hour t T b B a block bids in area a c C + a connectors leaving area a Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 11 / 22
Mixed Integer Quadratic Programm Constraints: 1. net demand = net import: a A, t T q h δ h + q b,t β b = h H a,t b B a c C a τ c,t c C + a τ c,t 2. ATC: c C, t T τ c,t τ c,t τ c,t 3. ramp rate: c C, t T τ c τ c,t τ c,t 1 τ c Notation: τ c,t R transmission on connector c C, hour t T h H a,t net curve segments in area a A, hour t T b B a block bids in area a c C + a connectors leaving area a Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 11 / 22
Optimality Conditions Optimal solution to (MIQP) can be computed with MIQP solvers (e.g. IBM CPLEX 12.1) Analyze optimal solution: fix the combinatorial bid selection apply Karush-Kuhn-Tucker-Condition for QPs (cf. [1]) obtain dual variables, also called shadow prices Shadow Prices π to (MIQP) satisfy (cf. [3]) Filling Condition Flow Price Condition Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 12 / 22
Optimality Conditions Optimal solution to (MIQP) can be computed with MIQP solvers (e.g. IBM CPLEX 12.1) Analyze optimal solution: fix the combinatorial bid selection apply Karush-Kuhn-Tucker-Condition for QPs (cf. [1]) obtain dual variables, also called shadow prices Shadow Prices π to (MIQP) satisfy (cf. [3]) Filling Condition Flow Price Condition Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 12 / 22
Filling Condition MW δ = 0 1 δ = 1 2 price / MW Filling Condition Price change is linear in the partial execution of the active segment: Filling condition is satisfied, if for all segments h H a,t in area a, hour t p h (δ h ), if δ h = 1 π a,t = p h (δ h ), if δ h (0, 1). p h (δ h ), if δ h = 0 (1) Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 13 / 22
Flow Price Condition 23 42 21 21 Simplified Flow Price Condition For adjacent areas it holds: Prices deviate a transmission constraint is active. No active transmission constraint prices coincide. (π, τ) satisfies simplified flow price condition, if for all connectors c = (r, s), hours t π r,t π s,t τ c,t {τ c,t, τ c,t } active ATC τ c,t τ c,t 1 = τ c active ramping [ τ c,t τ c,t+1 = τ c ] active ramping. Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 14 / 22
Block Price Condition Block can be executed, if it does not incur a loss. a A, b B a : β b = 1 Notation: (p b π a,t ) q b,t 0. t T π a,t β b p b, q b,t price in area a, time t execution state of block b B a in area a price limit; net demand in hour t T Optimal Solution to (MIQP) For an optimal bid selection β of (MIQP) the existence of shadow prices that satisfy all block price conditions is not given. Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 15 / 22
Block Price Condition Block can be executed, if it does not incur a loss. a A, b B a : β b = 1 Notation: (p b π a,t ) q b,t 0. t T π a,t β b p b, q b,t price in area a, time t execution state of block b B a in area a price limit; net demand in hour t T Optimal Solution to (MIQP) For an optimal bid selection β of (MIQP) the existence of shadow prices that satisfy all block price conditions is not given. Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 15 / 22
Infeasibility Cut: Bid Cut Given: bid selection β Assume: no shadow prices exist, satisfying all block price conditions. Define the following cut: Bid Cut L: executed blocks incurring a loss at prices π. L = {b B β b = 1 and (p b πa,t)q b,t < 0}, t T Cut(L): prohibits execution of at least one bid of L. Cut(L) : β b L 1. b L Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 16 / 22
Infeasibility Cut: Bid Cut Given: bid selection β Assume: no shadow prices exist, satisfying all block price conditions. Define the following cut: Bid Cut L: executed blocks incurring a loss at prices π. L = {b B β b = 1 and (p b πa,t)q b,t < 0}, t T Cut(L): prohibits execution of at least one bid of L. Cut(L) : β b L 1. b L Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 16 / 22
Bid Cut Heuristic Algorithm: 1. (β, δ, τ ) Solve (MIQP). 2. (π, L) Find shadow prices for (β, δ, τ ). 3. if L > 0, then 4. Add Cut(L) to the model (MIQP). 5. Go to step 1. 6. end if Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 17 / 22
Bid Cut Heuristic Algorithm: 1. (β, δ, τ ) Solve (MIQP). 2. (π, L) Find shadow prices for (β, δ, τ ). 3. if L > 0, then 4. Add Cut(L) to the model (MIQP). 5. Go to step 1. 6. end if Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 17 / 22
Bid Cut Heuristic Algorithm: 1. (β, δ, τ ) Solve (MIQP). 2. (π, L) Find shadow prices for (β, δ, τ ). 3. if L > 0, then 4. Add Cut(L) to the model (MIQP). 5. Go to step 1. 6. end if Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 17 / 22
Bid Cut Heuristic, Discussion (+) Fast Algorithm (4 seconds for 10 market areas) (+) Good Relative Gap (1.926 10 6 ) (o) Bid Cut slightly to strong (o) Not Optimal in pathological cases (4% of the cases) Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 18 / 22
Branch-and-Cut Decomposition Replace Bid Cut by a less restrictive Cut: Exact Bid Cut (cf. [2]) Exclude only one infeasible bid selection β : Cut(β ) : β b + (1 β b ) 1 b B:β b =0 b B:β b =1 Improved version: Branching over the Bid Cut Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 19 / 22
Branch-and-Cut Decomposition Replace Bid Cut by a less restrictive Cut: Exact Bid Cut (cf. [2]) Exclude only one infeasible bid selection β : Cut(β ) : β b + (1 β b ) 1 b B:β b =0 b B:β b =1 Improved version: Branching over the Bid Cut Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 19 / 22
Branch-and-Cut Decomposition, Discussion (+) Optimal Algorithm (+) Good Relative Gap (1.924 10 6 ) (o) Slight improvement of Relative Gap (0.002 10 6 ) ( ) Exact Bid Cut not strong enough ( ) Slow ( 10 minutes in 62% of the cases) Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 20 / 22
Results 79 realistic test cases: 10 market areas, ca. 600 blocks, ca. 31.700 curve segments Algorithm Optimal Bid Relative Computing Selection Gap Time Bid Cut Heuristic 38% 1.926E-6 4.1 sec B&C Decomposition 38% 1.924E-6 10 min Optimal bid selection: relative gap 1 10 12 within 10 minutes Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 21 / 22
Thank you for your attention! Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010 22 / 22
References References [1] BOYD, Stephen ; VANDENBERGHE, Lieven: Convex Optimization. Cambridge University Press, 2004. ISBN 0521833787 [2] CHU, Y. ; XIA, Q.: Generating Benders cuts for a general class of integer programming problems. In: Lecture Notes in Computer Science 3011, CPAIOR 2004, edited by J.-C. Régin and M. Rueher (2004), S. 127 141 [3] MÜLLER, Johannes C.: Optimierungsmethoden für die Kopplung von Day-Ahead-Strommärkten, TU-Darmstadt, Diplomarbeit, November 2009 Johannes C. Müller Clearing Coupled Day-Ahead Electricity Markets Energy Finance 2010