Medium Term Stochastic Hydrothermal Coordination Model

Size: px
Start display at page:

Download "Medium Term Stochastic Hydrothermal Coordination Model"

Transcription

1 Master Universitario en Sector Eléctrico (Erasmus Mundus) EMIN: International Master in Economics and Management of Network Industries Medium Term Stochastic Hydrothermal Coordination Model Decision support models in the electric power industry Andres Ramos

2 Topic objectives To understand What is a medium term hydrothermal coordination model Purpose How to use How stochasticity is modeled Scenario tree What techniques are used for solving the stochastic problem Stochastic optimization 1

3 References State-of-the-art in hydro scheduling J.W. Labadie Optimal Operation of Multireservoir Systems: State-of-the-Art Review JOURNAL OF WATER RESOURCES PLANNING AND MANAGEMENT MARCH/APRIL 2004 pp Hierarchy of planning models A. Ramos, S. Cerisola, J.M. Latorre A Decision Support System for Generation Planning and Operation in Electricity Markets in the book P.M. Pardalos, S. Rebennack, M.V.F. Pereira and N.A. Iliadis (eds.) Handbook of Power Systems pp Springer December 2009 ISBN Stochastic optimization A. Ramos, S. Cerisola, J.M. Latorre, R. Bellido, A. Perea and E. Lopez A decision support model for weekly operation of hydrothermal systems by stochastic nonlinear optimization in the book G. Consiglio, M. Bertocchi (eds.) Handbook on Stochastic optimization methods in finance and energy Springer Scenario tree generation J.M. Latorre, S. Cerisola, A. Ramos Clustering Algorithms for Scenario Tree Generation. Application to Natural Hydro Inflows European Journal of Operational Research 181 (3): Sep 2007 Object-oriented simulation J.M. Latorre, S. Cerisola, A. Ramos, R. Bellido, A. Perea Creation of Hydroelectric System Scheduling by Simulation in the book H. Qudrat-Ullah, J.M. Spector and P. Davidsen (eds.) Complex Decision Making: Theory and Practice pp Springer October 2007 ISBN

4 Contents Medium term stochastic hydrothermal coordination model Stochastic optimization Mathematical formulation Case study 3

5 Generation planning functions Functions New liberalized market functions Capacity investments Risk management Long term contracts: - Fuel acquisition - Electricity selling Objectives: - Market share - Price Budget planning Future derivatives market bids Strategic bidding: - Energy - Power reserve - Other ancillary services Traditional regulated operation functions Capacity investments - Installation - Repowering Maintenance Energy management - Nuclear cycle - Multiannual reservoirs Fuel management Annual reservoir and seasonal pumped storage management - Water value assessment Startup and shutdown of thermal units Pumped storage operation Economic dispatch Long term Medium term Short term Scope 4

6 Medium term optimization model. Characteristics Hydroelectric vs. hydrothermal models Hydroelectric model deals only with hydro plants Hydrothermal model manages simultaneously both hydro and thermal plants Thermal units considered individually. So rich marginal cost information for guiding hydro scheduling No aggregation or disaggregation process for hydro input and output is needed It is very difficult to obtain meaningful results for each hydro plant because: It requires a huge amount of data and The complexity of hydro subsystems 5

7 Optimization-simulation combination Use the model in an open-loop control mechanism with rolling horizon 1. First planning by stochastic optimization 2. Second simulation of the random parameters Stochastic optimization Determines optimal scheduling policies taking into account the uncertainty Simulation Evaluates possible future outcomes of random parameters given the optimal policies obtained previously We are going to focus on STOCHASTIC OPTIMIZATION MODELS 6

8 Medium term optimization model. Overview Determines: The optimal yearly operation of all the thermal and hydro power plants Taking into account multiple basins and multiple cascaded reservoirs connected among them Satisfying the demand and other technical constraints Cost minimization model because the main goal is medium term hydro operation. Suitable for profit maximization for a market agent (known prices) tment Adjust Adjustment no START Stochastic Market Equilibrium Model Hydrothermal Coordination Model Stochastic Simulation Model Coincidence? END Monthly hydro basin and thermal plant production Weekly hydro plant production Daily hydro unit production yes 7

9 Medium term optimization model. Results Operation planning Fuel consumption, unit (thermal, storage hydro and pumped storage hydro) and/or technology operation CO2 Emissions Reservoir management Targets for short term models (water balance) Economic planning Annual budget Operational costs System marginal costs Targets for short term models (water value) 8

10 Medium term optimization model. Main modeling assumptions System characteristics and data that are known with certainty Technical characteristics of existing power plants Multiple cascaded reservoirs Net load demand (includes intermittent generation and imported/exported power) Fuel costs Uncertain or stochastic data Unregulated hydro inflows Transmission network doesn t affect the optimal operation of the units (it is not represented) 9

11 Contents Medium term stochastic hydrothermal coordination model Hydroelectric system modeling Mathematical formulation Case study 10

12 Hydroelectric Dam Source: Environment Canada 11

13 Hydro unit modeling difficulties Topological complexities in waterways Nonlinearities in production function Important when changes in reservoir levels are significant for the time scope of the model Stochasticity in natural water inflows Complex operation constraints by other uses of water (irrigation, minimum and maximum river flow, minimum and maximum reservoir levels, sporting activities) 12

14 Main characteristics of hydro subsystems Hydro plants are limited in both energy and power output Head dependency: Energy production depends on the water reserve at the reservoir and originally on the water inflows 13

15 Contents Medium term stochastic hydrothermal coordination model Hydroelectric system modeling Topology Water head effect Inflow stochasticity Mathematical formulation Case study 14

16 Lower Tagus basin Source: Iberdrola 15

17 Lower Tagus basin Source: Iberdrola 16

18 Spanish Duero basin Source: Iberdrola 17

19 Sil basin Source: Iberdrola 18

20 Multiple basins Hydro subsystem is divided in a set of independent hydro basins: Inflow Storage hydro plant Basin 1 Basin 3 Run of the river plant Basin 2 19

21 Spanish hydro subsystem Very diverse system: Hydro reservoir volumes from 0.15 to 2433 hm 3 Hydro plant capacity from 1.5 to 934 MW 20

22 Contents Medium term stochastic hydrothermal coordination model Hydroelectric system modeling Topology Water head effect Inflow stochasticity Mathematical formulation Case study 21

23 Non linearity The power output of each hydro generator depends on the flow (water discharge) through the turbine and on the water head (difference between the reservoir and drain levels). Water density Gravity acceleration Flow p = η ρ g q h efficiency theoretical value Net water head 22

24 Production function (efficiency surface) Example of an efficiency surface Source: Iberdrola 23

25 Characteristic curve Maximum output electrical power p [MW] electrical power p [MW] water discharge q [m 3 /s] water discharge q [m 3 /s] Some times, head dependency can be neglected. But in some plants this dependency can be significant even in a week. 24

26 Characteristic surface electrical power p [MW] Maximum output water discharge q [m 3 /s] electrical power p [MW] p = Φ ( q, h ) i i i i net hydraulic head h [m] output Water flow Net water head water discharge q [m 3 /s] 25

27 Contents Medium term stochastic hydrothermal coordination model Hydroelectric system modeling Topology Water head effect Inflow stochasticity: Definition Mathematical formulation Case study 26

28 Stochasticity or uncertainty Origin Future information (prices or future demand) Lack of reliable data Measurement errors In electric energy systems planning Demand (seasonal/daily variation, yearly, increment over time) Hydro inflows Availability of generation and network elements Electricity or fuel prices Uncertainty relevance for each time scale 27

29 Stochasticity sources Natural hydro inflows (clearly the most important factor in Spanish electric system) Year Hydro energy Available [TWh] Index Probability of being exceeded [%] Changes in reservoir volumes are significant because of: stochasticity in hydro inflows chronological pattern of inflows and capacity of the reservoir with respect to the inflows 28

30 Total rain and hydro output Source: REE 29

31 Output: stochastic reservoir levels Mean year Wet year Dry year Source: REE 30

32 Natural hydro inflows: (monthly) historical series media mínima máxima Caudal [m3/s]

33 Natural hydro inflows: (monthly) historical series Caudal [m3/s] media media+2 desv tipica media-desv tipica maximo minimo

34 39000 Density function f(x) f(x) Caudal [m3/s]

35 39000 Distribution function F(x) F(x) Caudal [m3/s]

36 Water inflows Several measurement points in main different river basins Partial spatial correlation among them Temporal correlation in each one No establish method for obtaining a unique multivariate probability tree 35

37 Contents Medium term stochastic hydrothermal coordination model Hydroelectric system modeling Topology Water head effect Inflow stochasticity: Modeling alternatives Mathematical formulation Case study 36

38 Deterministic vs. Stochastic Optimization Deterministic Parameters known with certainty (it can be mean value) Stochastic Parameters modeled as stochastic variables with known distributions Historical Discrete Continuous simulation 37

39 Alternatives for modeling the uncertainty (i) Wait and see o scenario analysis o what-if analysis Decisions are taken once solved the uncertainty The problem is solved independently for each scenario The scenario with mean value of the parameters is just an special case A priori, decisions will be different for each scenario (anticipative, clairvoyant, not implementable) Solution of an scenario can be infeasible in the others 38

40 Alternatives for modeling the uncertainty (ii) Heuristic criteria Robust decisions will be those appearing in multiple deterministic optimal plans (for many scenarios) Flexible decisions will be those than can be changed along time once the uncertainty is being solved 39

41 Alternatives for modeling the uncertainty (iii) Here and now Decisions have to be taken before solving uncertainty Non anticipative decisions (only the available information so far can be used, no future information) The only relevant decisions are those of the first stage, given that are the only to be taken immediately Stochastic solution takes into account the stochasticity distribution It allows to include risk averse attitudes, penalizing worst cases STOCHASTIC OPTIMIZATION 40

42 Example: hydrothermal coordination problem Scenario analysis Run the model supposing that the natural inflows will be the same as any of the previous historical inflows (i.e., year 1989 or 2004, etc.) for the time scope Run the model supposing that the natural inflows for each period will be exactly the mean of the historical values (i.e., average year) for the time scope Stochastic optimization Run the model taking into account that the distribution of future natural inflows will be the same as it has been in the past 41

43 Contents Medium term stochastic hydrothermal coordination model Stochastic optimization Mathematical formulation Case study 42

44 Example: Hydrothermal Scheduling Problem Scenario analysis Run the model supposing that the natural inflows will be the same as any of the previous historical inflows (i.e., year 1989 or 2004, etc.) for the time scope Run the model supposing that the natural inflows for each period will be exactly the mean of the historical values (i.e., average year) for the time scope Stochastic optimization Run the model taking into account that the distribution of future natural inflows will be the same as it has been in the past 43

45 Example: Generation expansion planning Time scope divided into three periods 3 Stochastic demand scenarios with change only in the first period Several type of generators available Expansion decision must be unique for all the scenarios Variables Generation expansion Unit output Constraints Maximum budget available Minimum capacity to be installed Load-generation balance for each scenario Power output lower than the installed capacity 44

46 Generation expansion planning model (i) $TITLE Optimal Generation Expansion Planning Problem sets I generators / gen-1 1 * gen-4 4 / J periods / per-1 1 * per-3 3 / S demand scenarios / scen-1 1 * scen-3 3 / 45

47 Generation expansion planning model (ii) parameters F(i) fixed investment cost [ ] [ / gen gen gen gen / PROB(s) scenario probability [p.u.] / scen scen scen / DEM(j) scenario load [MW] CAPMIN minimum capacity to install [MW] / 12 / BUDGLM budget limit [ ] [ / 120 / table V(i,j i,j) variable operation cost [ [ per MW] per-1 1 per-2 2 per-3 gen gen gen gen table DEMS(s,j s,j) stochastic demand [MW] per-1 1 per-2 2 per-3 scen scen scen

48 Generation expansion planning model (iii) variables X(i) installed capacity [MW] Y(j,i j,i) operation output [MW] YS(s,j,i s,j,i) stochastic operation output [MW] TCOST total cost [ ] [ positive variables X, Y, YS 47

49 Generation expansion planning model (iv) equations COST total cost [ ] [ COSTS stochastic total cost [ ] [ BUDGET budget limit [ ] [ MININST minimum capacity to install [MW] OUTPIN power output < installed [MW] OUTPINS power output < stochastic installed [MW] LOADBAL load balance [MW] LOADBALS stochastic load balance [MW] ; COST.. TCOST =e= sum[ i, F(i ) * X( i)] + sum[( j,i), V(i,j i,j) * Y ( j,i)] ; COSTS.. TCOST =e= sum[ i, F(i ) * X( i)] + sum[( [(s,j,i s,j,i), PROB(s) * V(i,j i,j) ) * YS(s,j,i s,j,i)] ; BUDGET.. sum[i,, F(i) ) * X(i)] =l= BUDGLM ; MININST.. sum[i,, X(i)] =g= CAPMIN ; OUTPIN ( j,i) ).. Y( j,i) ) =l= X(i) ) ; OUTPINS(s,j,i s,j,i) ).. YS(s,j,i s,j,i) ) =l= X(i) ) ; LOADBAL ( j).. sum[i,, Y ( j,i)] =g= DEM ( j) ; LOADBALS(s,j s,j) ).. sum[i,, YS(s,j,i s,j,i)] =g= DEMS(s,j s,j) ) ; 48

50 Generation expansion planning model (v) model DETERMINISTIC / COST, MININST, BUDGET, OUTPIN, LOADBAL / ; model STOCHASTIC / COSTS, MININST, BUDGET, OUTPINS, LOADBALS / ; * Each deterministic scenario loop (s, DEM(j) = DEMS(s,j s,j) ; solve DETERMINISTIC minimizing TCOST using LP ; ) ; * Expected load scenario DEM(j) = sum[s, PROB(s) * DEMS(s,j s,j)] ; solve DETERMINISTIC minimizing TCOST using LP ; * Stochastic problem solve STOCHASTIC minimizing TCOST using LP ; 49

51 Analysis of the generation expansion results Installed capacity of each generator [MW] Total cost [ ] Det 1 Det 2 Det 3 Mean Stochast Gen 1 [MW] Gen 2 [MW] Gen 3 [MW] Gen 4 [MW] Total Cost [ ]

52 Definitions in stochastic problems. Stochastic measures Expected value with perfect information (EVWPI) o Wait and See (WS) Weighted mean of the objective function of each scenario knowing that is going to happen ( for the example) (for minimization problems always lower or equal than the objective function for the stochastic problem) (280, and respectively) Value of the stochastic solution (VSS) Expected Value of Including Uncertainty (EVIU) Difference between the expected objective function for the mean-value solution of the stochastic parameters EEV (280x x x0.3=366.27) and that of the stochastic problem RP ( =3.81) Expected value of perfect information (EVPI) o mean regret Weighted average of the difference between the stochastic solution for each scenario and the perfect information solution in this scenario (always positive for minimization) ( =18, =2.66, =2) (18x x0.5+2x0.3=5.54) EVPI = RP - WS VSS = EEV - RP WS <= RP <= EEV EVPI >= 0 VSS >= 0 51

53 Multistage stochastic optimization Taking optimal decisions in different stages in presence of random parameters with known distributions General formulation of the problem: min E P{ f ( ω, x)} = min f ( ω, x) dp( ω) x X x X Ω Uncertainty is represented by a scenario tree 52

54 Solution of an stochastic model Stochastic parameters Scenario tree generation Stochastic optimization NO Stability of the stochastic solution? YES 53

55 Stability of the stochastic solution The main stochastic solutions (i.e., the firststage ones) must be robust against the uncertainty modeling (structure and number of scenarios of the tree) A tree must be generated such as the solution of the stochastic model ought to be independent of it Analyze the stochastic solutions for different scenario trees 54

56 Contents Medium term stochastic hydrothermal coordination model Hydroelectric system modeling Topology Water head effect Inflow stochasticity: Scenario tree definition Mathematical formulation Case study 55

57 Alternatives for modeling the stochastic parameters A discrete probability function (i.e., scenario tree) A continuous or historical probability function that generates the tree by sampling (simulating) in each time period 56

58 Probability tree or scenario tree Tree: represents how the stochasticity is solved over time, i.e., the different states of the random parameters and simultaneously the non anticipative decisions over time. Correlation among parameters should be taken into account Scenario: any path going from the root to the leaves The scenarios that share the information until a certain instant do the same into the tree (non anticipative decisions) 57

59 Scenario tree Nodes: decisions are taken. Scenarios: realizations of the random process. Stage 1 Stage 2 Stage 3 Stage 4 58

60 Scenario tree scenario 59

61 Scenario tree example Period 1 Period 2 Inflow: 25 m 3 /s Prob: 0.55 wet Inflow: 35 m 3 /s Prob: 0.60 In each node a decision is made and afterwards stochastic parameters are revealed wet dry dry wet Inflow: 25 m 3 /s Prob: 0.40 Inflow: 20 m 3 /s Prob: 0.35 Inflow: 20 m 3 /s Prob: 0.45 dry Inflow: 10 m 3 /s Prob:

62 Scenario recombining tree example Period 1 Period 2 Inflow: 25 m 3 /s Prob: 0.55 wet Inflow: 30 m 3 /s Prob: 0.60 In each node a decision is made and afterwards stochastic parameters are revealed wet dry dry wet Inflow: 15 m 3 /s Prob: 0.40 Inflow: 30 m 3 /s Prob: 0.35 Inflow: 20 m 3 /s Prob: 0.45 dry Inflow: 15 m 3 /s Prob:

63 Scenario recombining tree example Period 1 Period 2 Inflow: 25 m 3 /s Prob: 0.55 wet Inflow: 30 m 3 /s Prob: 0.60 In each node a decision is made and afterwards stochastic parameters are revealed wet dry dry wet Inflow: 30 m 3 /s Prob: 0.35 Inflow: 15 m 3 /s Prob: 0.40 Inflow: 20 m 3 /s Prob: 0.45 dry Inflow: 15 m 3 /s Prob:

64 Recombining tree The inflows depend on the scenarios in each period. In the previous tree in period 2 there are 4 scenarios, 30, 25, 20 y 10 m 3 /s. In the previous recombining tree, in period 2 there are only two scenarios, 30 y 15 m 3 /s. 63

65 Issues on uncertainty representation Tree based on Historical series (usually a reduced number) Synthetic series Tree Recombining No recombining Comparison Statistical properties (moments, distances) of series and/or the tree Results of the first stage 64

66 Scenario tree trade-off Huge scenario tree and simplified electric system operation problem Where do we branch the tree? Small scenario tree and more realistic electric system operation problem 65

67 Where is it important to branch the tree? Where there are huge variety of stochastic values Winter and spring in hydro inflows Short term future will affect more that long term future If we are taking decisions from January to December branching in winter and spring will more relevant than branching in autumn 66

68 Contents Medium term stochastic hydrothermal coordination model Hydroelectric system modeling Topology Water head effect Inflow stochasticity: Scenario tree generation Mathematical formulation Case study 67

69 Generation of the scenario tree (ii) Univariate series (one inflow) Distance from the cluster centroid to each series from a period to the last one Multivariate series (several inflows) Distance from the multidimensional cluster centroid to each series of each variable from a period to the last one 68

70 Scenario tree generation There is no established method to obtain a unique scenario tree A multivariate scenario tree is obtained by neural gas clustering technique that simultaneously takes into account the main stochastic series and their spatial and temporal dependencies. Very extreme scenarios can be artificially introduced with a very low probability Number of scenarios generated enough for yearly operation planning 69

71 Common approach for tree generation (I) Process divided into two phases: Generation of a scenario tree. Neural gas method. Reduction of a scenario tree. Using probabilistic distances. 70

72 Clustering in two dimensions Inflow 2 [m3/s] Centroid Historical inflows Inflow 1 [m 3 /s] Historical density function Discrete density function Centroids have the minimum distance to their corresponding points Their probability is proportional to the number of points included in the centroid 71

73 Generation of a scenario tree (I) Idea Minimize the distance of the scenario tree to the original series Predefined maximum tree structure (2x2x2x2x1x1x1x1x1x1x1x1, for example) Extension of clustering technique to consider many inflows and many periods J.M. Latorre, S. Cerisola, A. Ramos Clustering Algorithms for Scenario Tree Generation. Application to Natural Hydro Inflows European Journal of Operational Research 181 (3): Sep

74 Neural gas algorithm (I) Soft competitive learning method All the scenarios are adapted for each new series introduced Decreasing adapting rate Iterative adaptation of the centroid as a function of the closeness to a new series randomly chosen Modifications to this method: Initialization: considers the tree structure of the centroids Adaptation: the modification of each node is the average of the corresponding for belonging to each scenario 73

75 Neural gas algorithm (II) 1. Initialize the tree { ω k } with randomly chosen series. 2. Choose randomly a new series ω. 3. Compute the distances of each tree scenario to the series: k k d = ω ω for k = 1,2,, K 4. Sort by increasing order these distances and k store in o the order of each scenario in this sequence 74

76 Neural gas algorithm (III) 5. Compute the modification of each node: = = = k n t k n t K k K k k k n t o h j ω ω ω ω λ ω ω ε ω /, 1, /, 1, 1 ) ) ( ( ) ( If maximum number of iterations has not been reached go to 2.

77 Contents Medium term stochastic hydrothermal coordination model Hydroelectric system modeling Topology Water head effect Inflow stochasticity: Natural inflows Mathematical formulation Case study 76

78 Natural inflows (I) Data series for a almost 30 years. Weekly data in m 3 /s. Corresponding to 8 measurement points in 3 basins. Organized in natural hydrological years, from October to September. Maximum structure of the tree: 16 scenarios Branches in stages 5, 9, 13 and 17 77

79 Natural inflows (II) Quantization error Error de cuantizacion [p.u.] Numero de iteraciones x

80 Natural inflows (III) Relative quantization error 4 Error de cuantizacion [p.u] Numero de escenarios 79

81 Natural inflows (IV) Difference between relative quantization errors 0.2 Diferencia entre errores [p.u.] Número de escenarios 80

82 Natural inflows (V) Data series for one hydro inflow: Aportaciones [m3/s] Etapa 81

83 Natural inflows (VI) Initial scenario tree for one hydro inflow: Aportaciones [m3/s] Etapa Etapa 82

84 Natural inflows (VII) Reduced scenario tree for one hydro inflow: Aportaciones [m3/s] Etapa Etapa 83

85 Natural inflows: scenario tree Natural Inflows [m 3 /s] Serie1 Serie2 Serie3 Serie4 Serie5 Serie6 Serie7 Serie8 Serie9 Serie10 Serie11 Serie12 Serie13 Serie14 Serie15 Serie Week 84

86 Contents Medium term stochastic hydrothermal coordination model Stochastic optimization Mathematical formulation Case study 85

87 Mathematical formulation Objective function Minimize the total variable costs plus penalties for non served energy and non served power Variables BINARY: Commitment, startup and shutdown of thermal units Thermal, storage hydro and pumped storage hydro output Operation constraints Inter-period Storage hydro and pumped storage hydro scheduling Water balance with stochastic inflows Intra-period Load and reserve balance Detailed hydro basin modeling Thermal, hydro and pumped-storage operation constraints Mixed integer linear programming (MIP) 86

88 Indices Time scope 1 year Period 1 month Period p Subperiod weekdays and weekends Load level peak, shoulder and off-peak Subperiod Load level s n 87

89 Demand (5 weekdays) Chronological Load Curve Chronological Load Curve (5 Working Days) Load Duration Curve Load Duration Curve Demand [MW] Hours Demand [MW] Load Duration Curve in Load Levels Hours Load Duration Curve in 3 Load Levels Demand [MW] Hours 88

90 Demand Monthly demand with several load levels Peak, shoulder and off-peak for weekdays and weekends All the weekdays of the same month are similar (same for weekends) Demand [ MW ] D Demand [MW] Duration [ h] d WeekDay.n WeekDay.n WeekDay.n WeekEnd.n WeekEnd.n WeekEnd.n p01 p02 p03 p04 p05 p06 p07 p08 p09 p10 p11 p12 Month psn psn 89

91 Technical characteristics of thermal units (t) Maximum and minimum output Fuel cost Slope and intercept of the heat rate straight line Operation and maintenance (O&M) variable cost No load cost = fuel cost x heat rate intercept Variable cost = fuel cost x heat rate slope + O&M cost Cold startup cost Equivalent forced outage rate (EFOR) Max and min output [ MW ] p, p No load cost [ / h] Variable cost [ / MWh] v Startup cost [ ] EFOR [ pu..] q f t t t t sr t t 90

92 Technical characteristics of hydro plants (h) Maximum and minimum output Production function (efficiency for conversion of water release to electric power) Efficiency of pumped storage hydro plants Only this ratio of the energy consumed to pump the water is recovered by turbining this water Max and min output [ MW ] p, p 3 Production function [ / ] Efficiency [ pu..] kwh m c h h h η h 91

93 Technical characteristics of hydro reservoirs (r) Maximum and minimum reserve Initial reserve Final reserve = initial reserve Stochastic inflows 3 Max and min reserve [ hm ] r, r r 3 Initial and final reserve [ hm ] r r 3 Stochastic inflows [ m / s] i ω pr 92

94 Hydro topology r1 r2 h1 h2 r3 h3 Hydro plant upstream of reservoir h upr ( ) hurhr (, ) ( h1, r3) Pumped hydro plant upstream of reservoir h upr ( ) hprhr (, ) ( h3, r2) Reservoir upstream of hydro plant h dwr ( ) ruhrh (, ) ( r2, h2) Reservoir upstream of pumped hydro plant h dwr ( ) rphrh (, ) ( r3, h3) Reservoir upstream of reservoir r upr ( ) rurrr (, ) ( r1, r3) 93

95 Scenario tree example Period 1 Period 2 Inflow: 25 m 3 /s Prob: 0.55 wet Inflow: 35 m 3 /s Prob: 0.60 In each node a decision is made and afterwards stochastic parameters are revealed wet dry dry wet Inflow: 25 m 3 /s Prob: 0.40 Inflow: 20 m 3 /s Prob: 0.35 Inflow: 20 m 3 /s Prob: 0.45 dry Inflow: 10 m 3 /s Prob:

96 Scenario tree. Ancestor and descendant Tree structure Scenario ω Period p Scenario tree ( p, ω) Scenario 1 Tree relations ω a( ω) ( p02, sc03) a ( p03, sc03) ( p03, sc01) Scenario 1 ( p01, sc01) ( p02, sc01) ( p02, sc03) Scenario 2 ( p03, sc02) ( p03, sc03) Scenario 3 Tree data 3 [ / Scenario 3 Scenario probability [ pu..] p Stochastic inflows m s] i ω p ω pr Scenario 4 ( p03, sc04) 95

97 Other system parameters Non served energy cost Non served operating power reserve Operating power reserve Non served energy cost [ / MWh] v Non served power cost [ / MW ] v Operating reserve [ MW ] Ops 1 96

98 Variables Commitment, startup and shutdown of thermal units { 1} Commitment, startup and shutd own 0, A, SR, SD Production of thermal units and hydro plants ω Production of a thermal or hydro unit [ MW ] P, P Consumption of pumped storage hydro plants Consumption of a hydro plant [ MW ] C ω psnh Reservoir levels 3 Reservoir level [ hm ] R ω pr Non served energy and power Non served energy and power [ MW ] ENS ω, PNS psn ω ω ω pst pst pst ω psnt psnh ω ps 97

99 Constraints: Operating power reserve Committed output of thermal units + Maximum output of hydro plants + Non served power >= Demand + Operating reserve for peak load level, subperiod, period and scenario t pa + p + PNS D + O ωps ω ω t pst h ps ps1 ps1 h 98

100 Constraints: Generation and load balance Generation of thermal units + Generation of storage hydro plants Consumption of pumped storage hydro plants + Non served energy = Demand for each load level, subperiod, period and scenario ω ω ω ω P + P C / η + ENS = D ωpsn psnt psnh psnh h psn psn t h h 99

101 Constraints: Production in consecutive load levels Output of a unit in shoulder Output of a unit in peak Output of a unit in off-peak Output of a unit in shoulder P P ωpsnt ω psn+ 1t ω psn+ 1h ω psnt ω psnh P P ωpsnh Demand Peak Shoulder Off-peak Hours 100

102 Constraints: Commitment, startup and shutdown All the weekdays of the same month are similar (same for weekends) Commitment decision of a thermal unit Period p-1 Period p Period p s s+1 s s+1 s Weekdays Weekend Weekdays Weekend Weekdays 101

103 Constraints: Commitment, startup and shutdown Startup of thermal units can only be made in the transition between consecutive weekend and weekdays Commitment of a thermal unit in a weekday Commitment of a thermal unit in the weekend of previous period Startup of a thermal unit in this weekday ω A A ω ω ω = SR SD ωpst ω a( ω) pst p 1s+ 1 t pst pst pst p 1s+ 1t pst pst Shutdown only in the opposite transition Commitment of a thermal unit in a weekend Commitment of a thermal unit in the previous weekday Startup of a thermal unit in this weekend - Shutdown of a thermal unit in this weekend A A = SR SD ωpst ω ω ω ω ps+ 1t pst ps+ 1t ps+ 1t 102

104 Constraints: Commitment and production Production of a thermal unit Commitment of a thermal unit x the maximum output reduced by availability rate Production of a thermal unit Commitment of a thermal unit x the minimum output reduced by availability rate ω ω ω A p (1 q ) P A p (1 q ) ωpsnt pst t t psnt pst t t If the thermal unit is committed (A ϖ pst = 1) it can produce between its minimum and maximum output If the thermal unit is not committed (A ϖ pst = 0) it can t produce 103

105 Constraints: Water balance for each reservoir Reservoir volume at the beginning of the period Reservoir volume at the end of the period + Natural inflows Spills from this reservoir + Spills from upstream reservoirs + Turbined water from upstream storage hydro plants Turbined and pumped water from this reservoir + Pumped water from upstream pumped hydro plants = 0 for each reservoir, R R + i S + ω ω ω ω ω p 1r pr pr pr pr r upr ( ) ω ω d P / c / psn psnh h d P c psn psnh h sn sn h upr ( ) h dwr ( ) + sn h upr ( ) period and scenario ω + d C / c = 0 ωpr ω a( ω) psn psnh h S 104

106 Constraints: Operation limits Reservoir volumes between limits for each hydro reservoir r R r ωpr ω r pr r ω 0r Pr r R = R = r ωr Power output between limits for each unit ω 0 P p (1 q ) ωpsnt psnt t t ω ω 0 P, C p ωpsnh psnh psnh h Commitment, startup and shutdown for each unit { } A ω, SR ω, SD ω 0,1 ωpst pst pst pst 105

107 Multiobjective function Minimize Thermal unit variable costs psrsr + pd fa + pd vp ω ω ω ω ω ω p t pst p psn t pst p psn t psnt ωpst ωpsnt ωpsnt Penalties introduced in the objective function for non served energy and non served power ωpsn pd vens + pvpns ω ω ω ω p psn psn p ps ωps 106

108 Short Range Marginal Cost (SRMC) Dual variable of generation and load balance [ /MW] Change in the objective function due to a marginal increment in the demand ω ω ω ω ω P + P C + ENS = D : σ ωpsn psnt psnh psnh psn psn t h h Short Range Marginal Cost = dual variable x load level duration. Expressed in [ /MWh] SRMC ω d ω = / σ ωpsn psn psn psn psn 107

109 Water value Dual variable of water balance for each reservoir [ /hm 3 ] Change in the objective function due to a marginal increment in the reservoir inflow ω ω ω ω ω R R + i S + S p 1r pr pr pr pr r upr ( ) ω ω d P / c d P / c psn psnh h psn psnh h sn sn h upr ( ) h dwr ( ) + d η P / c + d η P / c = 0 : π ω p r ω a ( ω) ω ω ω psn h psnh h psn h psnh h pr sn sn h dwr ( ) h up( r) Turbining water has no variable cost. However, an additional hm 3 turbined allows to substitute energy produced by thermal units with the corresponding variable cost (this is called water value) 108

110 Contents Medium term stochastic hydrothermal coordination model Stochastic optimization Mathematical formulation Case study 109

111 StarGen Lite ( 110

112 Input Data. Indices 111

113 Input Data. Cost of energy or power non served 112

114 Input Data. Demand, operating reserve and duration 113

115 Input Data. Thermal and hydro parameters 114

116 Scenario tree Scenario 1 ( p03, sc01) ( p05, sc01) ( p04, sc01) ( p06, sc01) ( p01, sc01) ( p02, sc01) ( p03, sc 02) ( p05, sc02) ( p02, sc 02) ( p04, sc 02) ( p06, sc02) Scenario 2 ( p02, sc03) ( p03, sc03) ( p05, sc03) ( p04, sc03) ( p06, sc03) Scenario 3 115

117 Input Data. Inflows and scenario tree 116

118 Medium term optimization model. Results Operation planning Fuel consumption, unit (thermal, storage hydro and pumped storage hydro) and/or technology operation CO2 Emissions Reservoir management Targets for short term models (water balance) Economic planning Annual budget Operational costs System marginal costs Targets for short term models (water value) 117

119 Output Data. Thermal unit commitment Committed Th hermal Units FuelOilGas OCGT_3 OCGT_1 CCGT_4 CCGT_3 CCGT_2 CCGT_1 ImportedCoal_Bituminous ImportedCoal_SubBituminous BrownLignite DomesticCoal_Anthracite Nuclear 1 0 p01 p01 p02 p02 p03 p03 p04 p04 p05 p05 p06 p06 p07 p07 p08 p08 p09 p09 p10 p10 p11 p11 p12 p12 Period 118

120 Output Data. Production Marginal Cost [ /MWh] StorageHydro3_Basin1 StorageHydro2_Basin1 StorageHydro1_Basin1 FuelOilGas OCGT_3 OCGT_2 OCGT_1 CCGT_4 CCGT_3 CCGT_2 CCGT_1 ImportedCoal_Bituminous ImportedCoal_SubBituminous BrownLignite DomesticCoal_Anthracite Nuclear RunOfRiver SRMC Outputt [MW] 0 0 p01 p01 p01 p01 p01 p01 p02 p02 p02 p02 p02 p02 p03 p03 p03 p03 p03 p03 p04 p04 p04 p04 p04 p04 p05 p05 p05 p05 p05 p05 p06 p06 p06 p06 p06 p06 p07 p07 p07 p07 p07 p07 p08 p08 p08 p08 p08 p08 p09 p09 p09 p09 p09 p09 p10 p10 p10 p10 p10 p10 Load Level 119

121 Output Data. Energy [MWh] StorageHydro3_Basin1 StorageHydro2_Basin1 StorageHydro1_Basin1 RunOfRiver FuelOilGas OCGT_3 OCGT_2 OCGT_1 CCGT_ p01 p01 p01 p01 p01 p01 p02 p02 p02 p02 p02 p02 p03 p03 p03 p03 p03 p03 p04 p04 p04 p04 p04 p04 p05 p05 p05 p05 p05 p05 p06 p06 p06 p06 p06 p06 p07 p07 p07 p07 p07 p07 p08 p08 p08 p08 p08 p08 p09 p09 p09 p09 p09 p09 p10 p10 p10 p10 p10 p10 Energy Load Level CCGT_4 CCGT_3 CCGT_2 CCGT_1 ImportedCoal_Bituminous ImportedCoal_SubBituminous BrownLignite DomesticCoal_Anthracite Nuclear

122 Output Data. Reservoir level and water value Reservoir1_Basin1 Reservoir2_Basin1 Reservoir3_Basin1 Reservoir1_Basin1 Reservoir2_Basin1 Reservoir3_Basin Reservoir leve el [hm3] [ /hm3] Water value [ p01 p02 p03 p04 p05 p06 p07 p08 p09 p10 p11 p12 Period 0 121

123 Output Data. Short Range Marginal Cost (SRMC) SRMC [ /MWh] p01 p01 p01 p01 p01 p01 p02 p02 p02 p02 p02 p02 p03 p03 p03 p03 p03 p03 p04 p04 p04 p04 p04 p04 p05 p05 p05 p05 p05 p05 p06 p06 p06 p06 p06 p06 p07 p07 p07 p07 p07 p07 p08 p08 p08 p08 p08 p08 p09 p09 p09 p09 p09 p09 p10 p10 p10 p10 p10 p10 Load Level 122

124 Stochastic measures Expected value with perfect information (EVWPI) o Wait and See (WS) Weighted mean of the objective function of each scenario knowing that is going to happen (for minimization problems always lower or equal than the objective function for the stochastic problem) Value of the stochastic solution (VSS) Difference between the objective function of the expected value for the mean value solution of the stochastic parameters EEV and that of the stochastic problem RP Expected value of perfect information (EVPI) o mean regret Weighted average of the difference between the stochastic solution for each scenario and the perfect information solution in this scenario (always positive for minimization) EVPI = RP - WS VSS = EEV - RP WS <= RP <= EEV EVPI >= 0 VSS >= 0 123

125 Stochastic measures sc01 sc02 sc03 Expected Stochastic Generation RunOfRiver in p01 MWh Generation StorageHydro_Basin1 in p01 MWh Generation StorageHydro_Basin2 in p01 MWh Generation StorageHydro_Basin3 in p01 MWh Reserve StorageHydro_Basin1 end p01 hm Reserve StorageHydro_Basin2 end p01 hm Reserve StorageHydro_Basin3 end p01 hm Total Hydro Generation in p01 MWh Total Reserve end p01 hm Total System Variable Cost M EWPI or WS EEV VSS EVPI Stochasticity in hydro inflows is not relevant from the point of view of total variable cost But it is important for defining the operation of the first period 124

126 How to use of a medium term stochastic hydrothermal coordination model Run in a rolling mode (i.e., the model is run each week with a time scope of several months up to one year) Only decisions for the closest period are of interest (i.e., the next week). The remaining decisions are ignored 125

127 Summary Purpose of a medium term stochastic hydrothermal coordination model Characteristics Overview Results for operation planning and economic planning Main modeling assumptions Mathematical formulation General structure Parameters, variables, equations, objective function Short range marginal cost, water value Case study with StarGen Lite SHTCM Input data Output data 126

128 Task assignment Compute numerically the water value for a particular period and reservoir by running twice the hydrothermal model and compare this value with the water value determined by the model as the dual variable of the water balance constraint. Apply it to one reservoir in period 1 and another reservoir in period 7. Evaluate all the stochastic measures of considering stochasticity of hydro inflows Introduce wind generation into the model 127

129 Andres Ramos 128