UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

A decision support system for real-time hydropower scheduling in a competitive power market environment Shawwash, Ziad K. Elias 2000

You don't seem to have a PDF reader installed, try download the pdf

Item Metadata

Download

Media
ubc_2000-487105.pdf [ 18.79MB ]
Metadata
JSON: 1.0064007.json
JSON-LD: 1.0064007+ld.json
RDF/XML (Pretty): 1.0064007.xml
RDF/JSON: 1.0064007+rdf.json
Turtle: 1.0064007+rdf-turtle.txt
N-Triples: 1.0064007+rdf-ntriples.txt
Original Record: 1.0064007 +original-record.json
Full Text
1.0064007.txt
Citation
1.0064007.ris

Full Text

A DECISION SUPPORT SYSTEM FOR REAL-TIME HYDROPOWER SCHEDULING IN A COMPETITIVE POWER MARKET ENVIRONMENT by Ziad K. Elias Shawwash B.Sc, New England College, 1982 M.A.Sc., The University of British Columbia, 1995 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY in The Faculty of Graduate Studies Department of Civil Engineering We accept this thesis as conforming to the required standard The^University of British Columbia February, 2000 © Ziad K. Shawwash, 2000 In presenting this thesis in partial fulfilment of the requirements for an advanced degree at the University of British Columbia, I agree that the Library shall make it freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the head of my department or by his or her representatives. It is understood that copying or publication of this thesis for financial gain shall not be allowed without my written permission. Department of Civil Engineering The University of British Columbia Vancouver, Canada Date February^ 2000 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment ABSTRACT The electricity supply market is rapidly changing from a monopolistic to a competitive environment. Being able to operate their system of reservoirs and generating facilities to get maximum benefits out of existing assets and resources is important to the British Columbia Hydro Authority (B.C. Hydro). A decision support system has been developed to help B.C. Hydro operate their system in an optimal way. The system is operational and is one of the tools that are currently used by the B.C. Hydro system operations engineers to determine optimal schedules that meet the hourly domestic load and also maximize the value B.C. Hydro obtains from spot transactions in the Western U.S. and Alberta electricity markets. This dissertation describes the development and implementation of the decision support system in production mode. The decision support system consists of six components: the input data preparation routines, the graphical user interface (GUI), the communication protocols, the hydraulic simulation model, the optimization model, and the results display software. A major part of this work involved the development and implementation of a practical and detailed large-scale optimization model that determines the optimal tradeoff between the long-term value of water and the returns from spot trading transactions in real-time operations. The postmortem-testing phase showed that the gains in value from using the model accounted for 0.25% to 1.0% of the revenues obtained. The financial returns from using the decision support system greatly outweigh the costs of building it. Other benefits are the savings in the time needed to prepare the generation and trading schedules. The system operations engineers now can use the time saved to focus on other important aspects of their job. The operators are currently experimenting with the system in production mode, and are gradually gaining confidence that the advice it provides is accurate, reliable and sensible. The main lesson learned from developing and implementing the system was that there is no alternative to working very closely with the intended end-users of the system, and with the people who have deep knowledge, experience and understanding of how the system is and should be operated. ii A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment TABLE OF CONTENTS ABSTRACT ii LIST OF FIGURES viLIST OF TABLES , xii ACKNOWLEDGMENTS xiiDEDICATION xiv CHAPTER 1 INTRODUCTION 1 1.1 Background1.2 Goal, Objectives and Study Approach 3 1.3 Organization of the Thesis 4 CHAPTER 2 LITERATURE REVIEW 6 2.1 Historic Development of Generation Scheduling Techniques..; 6 2.1.1 Early Stages of Development 6 2.1.2 The Era of Rapid Development 9 2.1.3 Current State-of-the-Art 11 2.2 State-of-the-Art in Industry 2 2.2.1 The Norwegian Electric Power Research Institute 13 2.2.2 The University of Waterloo 14 2.2.3 Hydro Quebec 12.2.4 Centro de Pesquisas de Energia Electrica, Brazil 14 2.2.5 The University of California, Los Angeles 15 2.2.6 Georgia Institute of Technology 12.2.7 The Pacific Gas and Electric Company 16 2.2.8 The Tennessee Valley Authority2.2.9 Electricite de France 12.2.10 Hydro Electric Commission of Tasmania, Australia :.. 17 2.3 Summary 1iii A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment CHAPTER 3 THE DECISION MAKING ENVIRONMENT 19 3.1 The B.C. Hydro Power System 13.1.1 Historic Development of B.C. Hydro's Generating Facilities 19 3.1.2 The Hydro Electric System 21 3.1.3 Looking Ahead and Shaping the Future 27 3.2 The B.C. Hydro Decision-Making Environment 33 3.2.1 Guiding Criteria for Decision Making3.2.2 Objectives of the System Operator 4 3.2.3 Generation System Operations 35 3.2.4 System Operations Planning 43.2.5 Summary of Key Features of the B.C. Hydro Generating System 55 3.2.6 Electricity Trade Operations 56 3.3 Decision-Making Processes and Decision Support Systems 65 3.3.1 Decision Making Approaches in Organizations3.3.2 Historical Development of Decision-Making Methods 65 3.3.3 Structure of Decision Support Systems 67 3.3.4 The Need for Decision Support SystemsCHAPTER 4 THE DECISION SUPPORT SYSTEM 70 4.1 Objectives of the Decision Support System 70 4.2 User's Functional Requirements and Design Philosophy 70 4.2.1 User's Functional Requirements 74.2.2 Design Philosophy 71 4.3 Components of the Decision Support System 72 4.3.1 Data Preparation, Saving, and GUI Launch Software 72 4.3.2 The Graphical User Interface 4 4.3.3 The Communication Protocols 76 .4.3.4 The Hydraulic Simulator 7 4.3.5 The Optimizer 81 4.3.6 The Results-Display Software 84.4 Hydroelectric Systems Modeled 4 4.5 Mathematical Modeling of Generating Facilities 85 4.5.1 Hydraulic Modeling of Reservoir Operations 84.5.2 Modeling Hydropower Generation 92 4.5.3 Modeling of Thermal Generation 105 4.5.4 Modeling Load Resource Balance4.5.5 Modeling Operating Reserve & Regulating Margin Requirements.. 105 4.5.6 Modeling Import and Export Transfer Capability 106 iv A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 4.6 STOM Optimization Models 106 4.6.1 The Generalized Optimization Model 104.6.2 Maximize the Efficiency Optimization Model 108 4.6.3 Minimize the Cost of Water Used Optimization Model 108 4.6.4 Maximize the Value of Power Production Optimization Model 109 4.6.5 Maximize the Profit Optimization Model 110 CHAPTER 5 THE SOLUTION AND IMPLEMENTATION PROCESS 115 5.1 The Solution Process 115.1.1 STOM Generalized Solution Process 115 5.1.2 Steps of the Solution Algorithm 117 5.2 The Implementation Process 126 5.2.1 Implementation Roadblocks 125.2.2 Implementation Process and Success Factors 126 CHAPTER 6 RESULTS AND DISCUSSION 143 6.1 Results of Initial Stages of Development6.1.1 Results of the Prototype and Design Phases 143 6.1.2 Discussion on the Prototype and Design Phase 158 6.2 Results of the Implementaiton Phase 166.2.1 Structure and Objective of the Postmortem Anaysis Studies 163 6.2.2 Results and Discussion of the Postmortem Analysis Studies 163 6.2.3 Structure and Objectives of Implementation in Production Mode 176 6.2.4 Results and Discussion of Implementation in Production Mode 178 6.2.5 Sensitivity Analysis Information 189 6.3 Performance of the Decision Support System 208 6.3.1 Performance of the Solution Algorithm6.3.2 Performance of the Simplex Primal and Dual Algorithms 218 CHAPTER 7 CONCLUSIONS AND RECOMMENDATIONS 219 7.1 Summary.... 217.2 Contributions 223 7.3 Future Research Requirements 224 7.3.1 Future Research on Overall Approach for Hydroelectric System Operation 227.3.2 Future Research on Possible Extensions of STOM Algorithms 225 7.3.3 Future Research on Modeling of Hydroelectric Systems 228 REFERENCES 229 v A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment ANNEXES 239 Annex A The Hydraulic Simulator Program General Algorithm 240 Annex B To Do Checklist to Run the Short Term Optimization Model (STOM). 243 Annex C The Short Term Optimization Model Software Programs 245 Annex D Functional Features of the Graphical User Interface 247 Annex E Procedure to Determine the Optimal Unit Commitment A. 10 Annex F Results Software Graphic Displays A.43 Annex G Main Operational Features of Hydro Systems Modeled in STOM 283 G. 1 The Peace River System 284 G.2 The Columbia River System 7 J.2.1 The Upper Columbia: Mica & Revelstoke Hydro System 287 J.2.2 The Lower Columbia: Pend D'Oreille Hydroelectric System. 287 G.3 The Stave River System : , 291 G.4 The Bridge River System 293 G.5 The Campbell River System 5 G.6 The Cheakamus River System 297 G.7 The Clowhom River SystemG.8 The Wahleach River System 298 G.9 The Ash River System 299 G. 10 Emerging Operational Issues 300 vi A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment LIST OF FIGURES CHAPTER 3 Figure 3.1. Sources of Electricity Supply in 1998 22 Figure 3.2. Map of BC Hydro's Major Electrical System 25 Figure 3.3. BC Hydro's Present Regional Generation-Demand Balance 26 Figure 3.4. Peace River Inflows 38 Figure 3.5. Columbia River Inflows 9 Figure 3.6. Total Daily Domestic Load (1985-1997) 40 Figure 3.7. Minimum and Maximum Hourly Load (1985-1997) 41 Figure 3.8. Variation of Monthly/Hourly Domestic Load in 1997 2 Figure 3.9. Variation of Hourly Domestic Load in 1997 43 Figure 3.10. Filling and Draw Down of a Typical Storage Reservoir 44 Figure 3.11. Scheduling Problem Modeling Decomposition Hierarchy 9 Figure 3.12. Growth in Electricity Trade Revenues 5Figure 3.13. Alberta Pool Spot Prices ; 60 Figure 3.14. NYMEX/COB Electricity Futures 61 Figure 3.15. Mid Cloumbia Electricity Prices 2 Figure 3.16. Interactions between Science, Technology and the Decision-Maker for Solving Decision Problems 66 CHAPTER 4 Figure 4.1. Main Design Features of STOM 72 Figure 4.2. STOM Graphical User Interface , 75 Figure 4.3. Simulator/Optimizer Data Flow General Arrangement 79 Figure 4.4. The Simulator Algorithm Flowchart 80 Figure 4.5. Schematic of Typical River Systems with Reservoirs and Hydroelectric Facilities 86 Figure 4.6. Spill Characteristics for Storage Reservoirs 88 Figure 4.7. Forebay Level as a Function of Storage 90 Figure 4.8. Storage as a Function of Forebay Level 1 Figure 4.9. Main Components of Power Generation and Control System 92 Figure 4.10. Layout of Hydroelectric Plant with Francis Reaction Type Turbine 93 Figure 4.11. Tailwater Level vs Plant Discharge and Downstream Water Levels 95 Figure 4.12. Production Function of a Hydroelectric Generating Plant 96 Figure 4.13. Typical Production Function for a Hydroelectric Plant with Four Units 98 Figure 4.14. Piecewise Linear Curve Fitting Procedure of the Production Function 100 Figure 4.15. Variation of Curve Fitting Error by Three Curve Fitting Methods for a Typical Plant with Four Units 102 Figure 4.16. Variation of Maximum Generation Limit with Forebay Level and Unit Availability for a Typical Plant with Four Units 103 vii A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Figure 4.17. Variation of Maximum Turbine Discharge Limit with Forebay Level and Unit Availability for a Typical Plant with Four Units 104 Figure 4.18. Value of Water in Storage and Marginal Value of Water for Time Step t 110 Figure 4.19. Marginal Value of Water as a Function of Storage and Time 111 Figure 4.20. Cut of the Water Value Function 112 Figure 4.21. Determination of Optimal Production Level Using the Resources Value Function and the Market Demand Function 113 CHAPTER 5 Figure 5.1. STOM's Generalized Solution Process 116 Figure 5.2. STOM's Solution Algorithm 118 Figure 5.3. Adjustments for Variations in Tailwater Level 123 Figure 5.4. The Storage Limits Shrinking Envelop Method : 125 Figure 5.5. Factors Contributing to Successful Implementation of STOM 127 CHAPTER 6 Figure 6.1. Schematic of the Peace and Columbia Prototype Model 144 Figure 6.2. Energy Use and Gain for the Max. Efficiency Objective Function: Linear, Piecewise Linear Optimization Models and the Scheduled Plan 147 Figure 6.3. Generation Summary (in MWHr) for Max. Efficiency Objective Function: Linear, Piecewise Linear Optimization Models and the Scheduled Plan 149 Figure 6.4. Variation of Forebay Levels (in m) for the Max. Efficiency Objective Function: Linear and Piecewise Linear Optimization Models and the Scheduled Plan 150 Figure 6.5. Variation of Generation Levels (in MWHr) for the Max. Efficiency Objective Function: Linear and PWL Optimization Models and the Scheduled Plan 151 Figure 6.6. Production Gain for the Max. Production Objective Function: Linear and Piecewise Linear Optimization Models and the Scheduled Plan 154 Figure 6.7.a. Generation Summary (in MWHr) for Max. Production Objective Function: Linear, Piecewise Linear Optimization Models and the Scheduled Plan 155 Figure 6.7.b. Gainers and Loser in Generation, and Production Gain of the Linear and Piecewise Linear Models, in MWHr 15•Figure 6.8. Variation of Forebay Levels (in m) for the Max. Production Objective Function: Linear and Piecewise Linear Optimization Models and the Scheduled Plan.... 156 Figure 6.9. Variation of Generation (in MWHr) Levels for the Max. Production Objective Function: Linear and PWL Optimization Models and the Scheduled Plan 157 Figure 6.10. Optimal Loading Pattern: the Effect of Using Piecewise Linear Generation Production Function in STOM 161 Figure 6.11. Optimal Generation Schedule for GMS, PCN, MCA, and REV 161 Figure 6.12. Efficiency Index and PWL Production Function (Hour 18 in Study) 162 Figure 6.13. Distribution of Generation at Hour 18 on 22 Dec. 1998 164 Figure 6.14. Actual Generation Allocation, Difference in Optimized Schedule, and Gain in Stored Energy: Max. Efficiency Objective Function .• 170 viii A Decision Support System for Real-time Hydropower Scheduling'in a Competitive Power Market Environment Figure 6.15. Allocation of Generation for Actual and Optimized 171 Figure 6.16. Comparison between Optimized and Dispatched Columbia: Peace Ratio, and Capacity Ratio 17Figure 6.17. Variation of Energy Gain with Total Generation, Maximize Efficiency Objective Function 2 Figure 6.18. Probability and Cumulative Distribution of %Gain in Stored Energy: Max. Efficiency Objective Function 17Figure 6.19. Variation of Value Gain with Total.Generation, Minimize Cost of Water Used Objective Function 173 Figure 6.20. Probability and Cumulative Distribution of %Gain in Value of Stored Water: Min. Cost of Water UsedFigure 6.21. Variation of Energy % Gain with Total Generation: Maximize Production Objective Function 174 Figure 6.22. Probability and Cumulative Distribution Function of %Gain in Value of Extra Energy Generated: Max. Value of Production 174 Figure 6.23. Comparison of % Gain for the three Objective Functions 175 Figure 6.24. Comparison of Probability of % Gain for the Three Objective Functions 175 Figure 6.25. Plan of the Shift Office, 14th Floor Park Place, Vancouver 177 Figure 6.26. Variation of Domestic Load for the Optimization Study 178 Figure 6.27. Allocation of Generation in the Scheduled Plan 179 Figure 6.28. Scheduled and Optimized GMS Forebay Levels and Plant Generatio 182 Figure 6.29. Scheduled and Optimized PCN Forebay Levels and Plant Generation 183 Figure 6.30. Scheduled and Optimized MCA Forebay Levels and Plant Generation 184 Figure 6.31. Scheduled and Optimized REV Forebay Levels and Plant Generation 185 Figure 6.32. Scheduled and Optimized Generation Summary 186 Figure 6.33. Operating Reserve Obligation and Regulating Margin Requirement 187 Figure 6.34. Optimized Trading Schedules, Tie Limits, System Capacity Slack, and Spot Prices : 188 Figure 6.35. Planned and Optimized Generation and Forebay Schedules: Stave Falls River System 194 Figure 6.36. Planned and Optimized Generation and Forebay Schedules: Bridge River System 5 Figure 6.37. Planned and Optimized Generation and Forebay Schedules: Campbell River System 196 Figure 6.38. Planned and Optimized Generation and Forebay Schedules: Peace River System 7 Figure 6.39. Planned and Optimized Generation and Forebay Schedules: Columbia River System 198 Figure 6.40. Planned and Optimized Generation and Forebay Schedules: PendOreille River System : 199 Figure 6.41. Planned and Optimized Generation and Forebay Schedules: Cheakamus, Clowhom, Wahleach and Ash River Systems 200 Figure 6.42. Turbine Discharge Limit Cost 201 Figure 6.43 Plant's Incremental Cost of Generation 202 ix A Decision Support System for Reai-time Hydropower Scheduling In a Competitive Power Market Environment Figure 6.44. Plant's Generation Limit Cost 203 Figure 6.45. Incremental Cost of Water Storage. 204 Figure 6.46. Storage Limits Cost 205 Figure 6.47. System Incremental Cost, Spot Market Prices, Tie Line Limits Cost, and Regulating Margin Cost 0 Figure 6.48. Behavior of SIC with Generation, Exports and Imports, Tie Line Limits, and System Slack 207 Figure 6.49. Total Run CPU Time: User's Requirements and Actual Performance 208 Figure 6.50. CPU Times of the Solution Steps 209 Figure 6.51. Convergence of the Objective Function and Forebay Difference 210 Figure 6.52. Variation of Solution CPU Time with Iterations 21Figure 6.53. Variation of Performance with the Size of the Optimization Problem 212 Figure 6.54. Convergence of Forebay Levels and Objective Function Values for STOM Optimization Models 216 Figure 6.55. Convergence of Generation Schedules and Forebay Levels in Iterations 217 Figure 6.56. Performance of the Simplex Dual and Primal Algorithms 218 CHAPTER 7 Figure 7.1. A Structured Approach to the Short-term Hydroelectric Scheduling Problem in a Competitive Market Environment 221 Figure 7.2. The Concept of Proximal Decision Analysis, and Producer's Market Value Function 227 ANNEX D Figure D.l. STOM Graphical User Interface 249 Figure D.2. Selecting River Systems and Plants 250 Figure D.3. Setting Study Start Date and Duration 3 Figure D.4. The GUI Options Button 254 Figure D.5. Plant Selection for Setting User's Operational Limits 25Figure D.6. Maximum Forebay Level Out of Range Error Messages 254 Figure D.7. GUI Optional Operational Limits Tabs 25Figure D.8. GUI Optional Operational Limits: Maximum Forebay Level 256 Figure D.9. GUI Optional Operational Limits: Spills 257 Figure D.10. GUI Optional Operational Limits: Maximum Plant Discharge Limit 258 Figure D.l 1. GUI Optional Operational Limits: Minimum Generation Limit 259 Figure D.12. Selecting the Optimization Objective Function 260 Figure D.l3. The Cost Factor User Input Form for Min_QCF Objective Function 261 Figure D.14. Spot Prices for the Max_P Objective Function 262 Figure D.15. Setting the Marginal Value of Energy (Rbch) 4 Figure D.16. Setting the Reservoir's Target Forebay Levels 26Figure D.17. Maximize Profit Objective Function: Rt,ch Input Form 267 Figure D.18. Maximize Profit Objective Function: Marketing Information 268 Figure D.19. Maximize Profit Objective Function: Drop, Fix Forebay Target Levels 269 x A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment. Figure D.20. The Maximize Profit Objective Function: Operating Reserve and Regulation Margins Input Form 270 ANNEXF Figure F.l. Generation Summary 276 Figure F.2 Gainers and Losers in Total Generation 277 Figure F.3. Spot Prices & Optimized Trading Schedules in the A.B. & U.S.Markets 278 Figure F.4. Example Plant Forebay Elevations 279 Figure F.5. Example Plant Generation and Plant Discharge 280 Figure F.6. Optimal Unit Commitment Schedule Derived by STOM 281 Figure F.7. Optimal Distribution of the Operating Reserve Obligation 282 ANNEX G Figure G.l. Schematic Layout of the Peace River Hydroelectric Facilities 286 Figure G.2. Schematic Layout of the Upper Columbia Hydroelectric Facilities 289 Figure G.3. Schematic Layout of the Pend d'Oreille Hydroelectric Facilities 290 Figure G.4. Schematic Layout of the Stave River System Hydroelectric Facilities 292 Figure G.5. Schematic Layout of the Bridge River System Hydroelectric Facilities 294 Figure G.6. Schematic Layout of the Campbell R. System Hydroelectric Facilities 296 Figure G.7. Schematic Layout of the Cheakamus R. System Hydroelectric Facilities. 297 Figure G.8. Schematic Layout of the Clowhom R. System Hydroelectric Facilities 298 Figure G.9. Schematic Layout of the Wahleach R. System Hydroelectric Facilities 299 Figure G.10. Schematic Layout of the Ash River System Hydroelectric Facilities 300 xi A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment LIST OF TABLES CHAPTER 3 Table 3.1 Plants and Reservoirs Managed by B.C. Hydro 23 Table 3.2. Electric Utilities in British Columbia '. 27 CHAPTER 4 Table 4.1. STOM Input Data Saved from the LRB System 74 Table 4.2. Output Results Displayed to the User... .-. .83 Table 4.3. River Systems, Reservoirs and Plants Modelled 84 Table 4.4. Coefficients of the Generation Production Function 107 CHAPTER 6 Table 6.1. Planned and Optimized Generation Schedules for the Columbia River System: Mica (MCA) and Revelstoke (REV), in MWHr : 145 Table 6.2. Optimized and Planned Generation Schedules for the Peace River System: G.M. Shrum (GMS) and Peace Canyon (PCN), in MWHr 146 Table 6.3. Planned and Optimized Generation Schedules for the Columbia River System: Mica (MCA) and Revelstoke (REV), in MWHr 152 Table 6.4. Optimized and Planned Generation Schedules for the Peaace River System: G.M. Shrum (GMS) and Peace Canyon (PCN), in MWHr 153 Table 6.5. Total Generation and Difference in Plant Generation, and % Gain for the Postmortem Analysis Studies, Maximize Efficiency Objective Function (June 1998-April 1999) 167 Table 6.6. Date, Total Generation Gain for the Postmortem Analysis Studies, Maximize Efficiency Objective Function (June 1998 - April 1999) 168 Table 6.7. Summary of Statistical Tests of Results in the Postmortem Analysis Stud 169 Table 6.8. Summary Data on Variation of Performance with Optimization Problem Size, Maximize Efficiency Objective Function 212 ANNEXD ... Table D. 1. River Systems an Hydroelectric Facilities in the GUI 252 ANNEX E Table E.l. Unit Combinations and Minimum Plant Discharge 273 Table E.2. Unit Combinations and Optimal Unit Commitment 4 xii A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment ACKNOWLEDGMENTS The author gratefully acknowledges the contribution of the UBC students for their work on the research project. In particular, special appreciation are due to Troy Lyne, Paxton Chow, Cory Ristock, Lindsay Sidwell, Garth Nash, Wendy Leung, Mahmoud Kayali, Sandy Ng, Ashley Gadd, Leo Liu, and other students who contributed to the success of this research project. Special appreciation is due to the manager of the research project at BC Hydro, Dr. Thomas K. Siu. He was instrumental for the smooth implementation of the research project and its outcomes. Mike Lee, the manager of Shift Operations and the Implementation Team provided limitless support for the research project and for implementation of its output, his support is highly appreciated. Senior Engineer Gerry Cretelli provided guidance and support from the initial phases of development up to the last stages of implementation, his support is highly appreciated. Shift Engineers, G. Bradley, P. Choudhury, V. Chu, C. Fingler, B. Fong, M. Hanlon, C. Kober, P. Ng, K. Punch, C. Ristock, D. Robinson, H. Walk, and C. Yoo, all took the time to test, verify and suggest modification and improvements to make the decision support system more responsive to their jobs. In particular, special thanks are due to the mastermind of the software systems being developed and implemented in the Shift Office, Colin Fingler, and for his tireless efforts to implement STOM in production mode. This project would not have been conceived and carried out without the keen support of K. Ketchum, P. Adams, W. Johnson, John W. Taylor, and Kelly Lial. Thanks for their encouragement and limitless support. Special thanks are also due to all the Power Supply and Resource Management staff at BC Hydro. Thanks for making this applied research project a success. In particular special thanks are due to Samuel Nalliah, Michael Au and Keith Pinchin for computer and programming support and to Becky Stutt for administrative support. The author wishes to express his sincere appreciation and thanks to his supervisor, Professor S.O. Denis Russell for his wise advice and encouragement throughout the course of this research. It can be said that without his insights and encouragement this work would not have been undertaken. The author also gratefully acknowledges the insights and support provided by Dr. W.F. Caselton, Dr. A.D. Russell, Dr. J.A. Meech, Dr. W.F. Ziemba, Dr. T. McDaniels, Dr. A. Dorcey, Dr. B. Lence, and all the .faculty and staff members at the Civil Engineering Dept. at U.B.C, during my studies and all phases of development and implementation of the research project. This research project would not have been a success without their wise guidance and support. Special thanks are due to my parents, Khaled and Najah, who passed away during my graduate studies. Thanks to them for the great care and encouragement during my studies and throughout my life. This thesis is dedicated to their memory. This research and the thesis would never have been written without the constant love, care and support of my wife Abeer. I would like to thank my son Khaled and daughter Noor for bringing me great joy in stressful times. Thanks to all my sisters and brothers for the continued encouragement and support. Many other unnamed friends rendered assistance; the author is indebted to them for their efforts. This research and thesis would not have been completed without the will of GOD. . xiii A Decision Support System for Real-time Hydropower Scheduling in a Competitive'Power Market Environment TO MY PARENTS KAHLED & NAJAH xiv CHAPTER 1 INTRODUCTION 1.1 BACKGROUND Since the invention of electricity in the last century, man has been trying to develop new sources of electrical energy and to enhance the methods of operating existing ones. In modern societies, electrical energy forms the backbone of almost all activities, and the key role that it plays in today's society cannot be overemphasized. The increasing importance of electricity has required the development of one of the most complicated systems ever to be built by humans. Management of such complex systems has traditionally required creation of large organizations in the form of government regulated utilities. A utility's power system could typically consist of hydroelectric facilities on one or more rivers, fossil and nuclear thermal power stations, and export and import ties to neighboring utilities. All of these facilities are interconnected electrically through the electric transmission system. The large investments in and rising costs of operating power production facilities have highlighted the need for increased technical and economic efficiency in the electricity production sector. Planning and management of such systems in real life situations is a complex and cumbersome task and it requires highly specialized technical expertise in many fields. Traditionally, the greatest gains have been realized from improving the technical and the economic efficiency of the electric system. Improvements in technical efficiency include enhancements to the performance of generation facilities, while improvements in the economic efficiency includes long-range planning for system expansion, least-cost operation by optimizing long-term and short-term system operation, and providing better financial management of electric utilities. These measures on the "supply side" have been tackled with varying degree of success, usually by engineers and other professionals using technically and financially oriented methods. Other efforts focused attention on the objectives of "demand side" management to reduce consumption of electricity and to avoid unnecessary investments to meet the growing demand for electricity, particularly during peak demand periods. Recent changes in the electric industry have been brewing since the shock of OPEC's oil embargo in 1973, where a shift towards more self-reliance on energy resources was set as a national goal in the U.S. and in many other industrialized countries around the world. Traditionally, generation, transmission and distribution, and marketing of electricity were carried out by one monopolistic, vertically integrated utility serving a geographic region. Electricity interchanges were made among the few major utilities. However, as predicted by Schweppe in 1978 (Schweppe, 1978), the energy marketplace is rapidly evolving towards a competitive market structure. Under this emerging structure many major players are selling and buying electric energy in the spot and in the forward market place at the wholesale level. It is also predicted that soon, electric energy will be sold competitively at the retail level, initially to large industries, municipalities, and large commercial customers, and eventually to residential customers. The future of the electric power industry is uncertain. Some visionaries (Amory Lovins) are predicting the demise of the hierarchical monopolies, who 1 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment currently command the electric power industry, to give way for new technologies and entrepreneurial actors who could reconfigure the industry, as was originally envisioned a century ago by Thomas Edison: a robust set of technologically advanced, decentralized, interconnected power plants (Smeloff et al., 1997). On the other side, others are predicting the concentration of generating facilities in the hands of mega-generators, controlling a high percentage of the total generating capacity (Weiner et. al., 1997). Only the future will tell how the industry will evolve. What does this have to do with the problem discussed in this thesis? A great deal. In the extreme case, many of the currently used hydroelectric generation scheduling methods will need to be rethought and probably drastically revised as more emphasis will be placed on efficient and economic operation of generation facilities. It is believed that the use of principles of technical efficiency as well as market-oriented methodologies will become more crucial to the survival of electric utilities. Current planning techniques for establishing hydroelectric generation schedules are really based on the assumption of a single utility serving the electric energy needs of its own customers at minimum cost. Many utilities around the world, with a mix of hydroelectric and thermal generation facilities, value hydropower on the basis of savings in thermal fuels that result from its use. This is to say that the cost of generation is taken into account rather than the product's market value. In financial market terminology, this is defined as a mark-to-cost rather than mark-to-market valuation. As pointed out by Pilipovic, the currently used models are excellent to understand the characteristics of the cost function for a particular utility. This cost function enables utilities to arrive at the future expected costs for their products and the factors that contribute to the distribution of these costs. Ideally, in a deregulated environment, both the cost function and the value of the product at the marketplace should determine the producer's product value (Pilipovic, 1998). In a world of competition and open access, it is not quite clear yet on how to optimally plan hydroelectric generation schedules in both the long-term and short-term, to take advantage of the new market structure, all within the physical, regulatory, and operational constraints imposed on a particular system. In operating a complex hydroelectric system in a competitive market the operational as well as the financial risks will be high. Decision-makers and operators unarmed with rigorous analysis tools and techniques could cause their organization to pay dearly for their decisions. This thesis contains the results of an applied research project, supported by British Columbia Hydro Power Authority (B.C. Hydro) on the development and implementation of a decision support system to aid B.C. Hydro's operating staff in directing the short-term operations of the hydroelectric generating facilities they manage and to help them to decide on the potential trading schedules they are willing to commit to, while respecting the regulatory, physical and operational constraints imposed on their system. The decision support system is operational and is one of the tools that are currently used by the B.C. Hydro system operation engineers to determine the optimal schedules that meet the hourly domestic load and that maximize the value obtained for B.C. Hydro resources from spot transactions in the Western U.S. and Alberta energy markets. The optimal hydro scheduling problem for B.C. Hydro, which is the third largest power utility in Canada is formulated as a large-scale linear programming algorithm and is solved using an advanced commercially available algebraic modeling language and a linear programming package. The decision support system has been designed and implemented to be user-friendly, flexible, dynamic, and a fast real time operational tool that accurately portrays the complex nature of 2 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment the optimization problem. It has been developed and successfully implemented through extensive interaction with B.C. Hydro's system operations engineers. The system consists of five major components: the Graphical User Interface (GUI), the Communication Protocols, the Simulation model, the Optimization model, and the Results-display software. Aside from the detailed representation of more than twenty hydro generating stations and the system of reservoirs, the optimization model incorporates market information on the Alberta Power Pool and the U.S. markets, and tie line transfer capabilities. The bulk of work in this research project was carried out by the author with some programming and data collection help from other graduate and undergraduate students at the University of British Columbia (UBC) and at B.C. Hydro in Vancouver, Canada. 1.2 GOAL, OBJECTIVES AND STUDY APPROACH The goal of this thesis is to devise, develop and implement a decision support system to assist B.C. Hydro's Power Supply operations engineers in making good operational and trading decisions for their system. Several objectives were set out for this research effort. The first objective was to develop an understanding of hydroelectric system operations. This was achieved through extensive literature review and study of the decision-making environment at BC Hydro and at other similar hydroelectric power utilities. The literature review focused on the historic development of generation scheduling methods and on those methods that are currently used by hydroelectric power utilities throughout the world. The second objective involved assessment of the potential of available operations research methods to solve the hydroelectric scheduling problem. Linear programming was as the most practical and efficient technique. The third objective involved formulation of the hydroelectric scheduling problem as a linear programming model and testing its potential to solve hydroelectric scheduling problems. This was achieved through extensive interactions with experts on the B.C. Hydro system and by working very closely with the actual B.C. Hydro generation system operators. The fourth objective involved testing and implementing the hydroelectric scheduling model in production mode. This was achieved through the development of a decision support system that makes the model user-friendly and easy to use in production mode. It also involved screening and compilation of the necessary data, training the system users on its main features and capabilities, and debugging and modifying the model and the decision support system to accommodate user's requests and suggestions. The optimal operation of hydroelectric generating systems can be divided into several computationally manageable levels. Each level provides answers to a different aspect of the total problem. The different levels that can be distinguished are as follows: 1. Strategic, long-term hydroelectric operations planning, where hydro resource utilization and trade opportunities are optimized over monthly time steps for 1-4 years. 2. Strategic and tactical medium-term hydroelectric operations planning, where hydro resource utilization and trade opportunities are optimized over weekly time steps for 1 year. 3. Tactical short-term operations planning, where hydro resource utilization and trade opportunities are optimized over daily or hourly time steps for one week. 3 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 4. Real-time hydroelectric operations planning, where hydro resource utilization and trade opportunities are optimized over hourly time steps for one day. 5. Real-time economic dispatch, where loading of hydro resource utilization and possibly trade opportunities are optimized within the hour. This is essentially a static optimization procedure requiring re-optimization at 10 minutes, or shorter time intervals. This thesis concerns the solution of levels 3 and 4 above and in particular the hourly short-term optimization modeling aspects. Up until the development of the decision support system reported on in this thesis, the methods used by B.C. Hydro (and by the majority of utilities all over the world) to deal with the tactical short-term and real-time operations planning levels, were predominantly heuristic. These methods are based on single plant optimization using rules-of-thumb (mental) procedures for loading plants and units. The heuristic methods, unfortunately, do not ensure that optimal, or near optimal, solutions will be produced. The research work presented in this thesis considers application of mathematical programming methods to the short-term operation planning of hydroelectric generating systems in a competitive power market environment. The research is particularly concerned with the practical applicability and implementation of the proposed method to large-scale hydroelectric generating systems, with a small thermal component. Previous literature dealt mainly with purely thermal, or systems with a small hydro component. The thesis build on the work of other researchers (e.g., Section 2.2.1), and it also describes the factors that need to be taken into consideration in order to develop methods for scheduling hydroelectric facilities in real life situations. 1.3 ORGANIZATION OF THE THESIS The thesis is organized into seven chapters. Chapter 2 reviews the literature on hydroelectric generation scheduling techniques, with an emphasis on practical modeling and on the optimization techniques that are used by utilities in the industry today. Chapter 3 describes the B.C. Hydro electric system, its historic development and gives a summary of the generating facilities in current operation. It also briefly discusses the forces driving the change into the new market structure and how B.C. Hydro is responding to change. The B.C. Hydro decision-making environment is outlined, and a brief description of the methods used in generation operations, operations planning, and electricity trade operations are then discussed. The chapter also presents an overview of the decision-making environment for hydroelectric systems and of the available methods and techniques for decision-making and for decision support systems. Chapter 4 presents the structure of the decision support system and details its main components. The objectives of STOM (the BC Hydro Short Term Optimization Model) are first described. This is followed by the user's functional requirements and the design philosophy of STOM. The main components of STOM are then detailed. This is followed by a brief description of the characteristics and main features of the hydroelectric systems currently modeled in STOM. Then, the mathematical modeling methodology adopted in this study is detailed. Chapter 4 concludes with an outline of STOM's four optimization models. Chapter 5 describes the solution and the implementation processes adopted in this study. The results of implementing the decision support system are given in Chapter 6. The thesis 4 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power.Market Environment ends with Chapter 7, which includes an evaluation of the strengths and limitations of the proposed modeling methodology, and the lessons learned from developing and implementing the decision support system. This chapter also gives recommendations for future development of the decision support system and an overall approach to hydroelectric system operation. The Annexes provides material referred to in the thesis. Annex A describes the general algorithm of the hydraulic simulator program. Annex B lists the "To Do Checklist to Run the Short Term Optimization Model". Annex C lists the short-term optimization model software programs, Annex D the main features of the graphical user interface. Annex E describes the procedure followed to determine the optimal unit commitment. Annex F presents the Results graphic displays, and Annex G describes the main operational features of the hydroelectric systems currently modeled by STOM. 5 CHAPTER 2 LITERATURE REVIEW This Chapter reviews the literature on hydroelectric generation scheduling techniques, with an emphasis on practical modeling and on the optimization techniques that are used by utilities in industry today. The first section reviews the historic development of generation scheduling techniques since the start of this century, while the second section reviews the state-of-the-art in the industry. The last section provides a summary of the main findings and presents the factors that prompted the use of linear programming to solve the hydroelectric scheduling problem at hand. 2.1 HISTORIC DEVELOPMENT OF SCHEDULING TECHNIQUES It can be said that solving the hydroelectric generation scheduling problem with multiple plants that are hydraulically coupled is a formidable task. Generally speaking, hydroelectric generation scheduling problems are more difficult than thermal scheduling problems for several reasons. First, the dynamics and constraints that couple hydroelectric generating plants affect the operation of a reservoir across time. Second, fluctuation in reservoir storage over time has a direct influence on the efficiency of the generating facilities. Third, water levels of reservoirs or water bodies, located downstream of generating facilities also have an influence on the efficiency of the generating facilities. Fourth, operation of a reservoir in a river system could be hydraulically coupled with other reservoirs in the same river system or with neighboring systems, thereby adding to the complexity of the problem. Fifth, reservoir releases could be constrained by an array of physical, regulatory, environmental, and operational factors. Sixth, decisions on water releases from a reservoir in any instance affect future operational decisions, thus leading to the need to consider sequential decision processes. This is particularly true when storage facilities are capable of storing water for several years. From this perspective, the short-term scheduling of reservoir operations for hydroelectric power generation cannot be considered in isolation from the medium-term and long-term planning activities and the literature review in this Chapter reflects this reality. 2.1.1 Early Stages of Development Due to the importance of the subject, scheduling of generation facilities has received attention since the start of this century. The first references to be published on this subject date back to 1919, when apparently engineers started to pay more close attention to the design and operation of hydroelectric facilities. Noakes and Arismunandar, previously with the Electrical Engineering Department at the University of British Columbia, have provided extensive bibliography on optimal operation of power systems for the period 1919-1959 (Noakes et al., 1962). The majority of methods during this period were concerned with the economic operation of small numbers of generating units with no or little consideration for 6 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment the dynamics of the problem in terms of changes to decision variables over time. The method that was widely used was the incremental cost method. In this method, generating units in a plant were loaded at the level where the incremental cost of each unit was equal. This method is based on the marginal cost pricing principle advocated by utility economists in the early part of this century, when new welfare economics started to emerge (Hotelling, 1938; Montgomery, 1939). An excellent review on the historic development of the marginal cost pricing principle under welfare economics, and its pros and cons, can be found in the works of Ruggles (Ruggles, 1949; Ruggles, 1950). The concept of marginal cost pricing of electric energy in a competitive market structure is one of the issues that is dealt with in this thesis. During the early part of this century calculating machines were modest, and operators relied on tables and charts that included the incremental water rate for each unit's increment of generation. A simple and quick iterative procedure was required to adjust the power output of operated units to meet the load to be served. This procedure is simpler if all units were of the same characteristics, but not so otherwise. For that reason extensive tables and charts were developed to make this procedure faster. As technology advanced, analog and digital computers were made available, and the procedure was automated by means of simple computer programs. As the years went by, the number of hydroelectric facilities grew larger, as did the size of the units and the storage facilities -to satisfy the concept of economies of scale and to hedge against fluctuations in weather patterns. Where it was possible to use water again and again to generate electricity in the same river system, several storage reservoirs and generating plants were installed in series. All of this was taking place when advances in the methods of operations research were simultaneously occurring. For example, soon after Bellman introduced the method of dynamic programming (Bellman, 1957), methods for planning the long-term use of storage water in one hydroelectric system started to emerge (Little, 1955). Others tried to use dynamic programming (DP) for multi-reservoir systems, but they were faced with one of the main limitations of the method: the curse of dimensionality (Bernholtz, 1960; Bernholtz, 1962; Larson et. al., 1963). The solution of DP programs requires that the storage state space be discretized, which leads to an exponential increase in computational effort, with increasing number of reservoirs. Others relied on water release policies in the form of reservoir operating rules, which are generally formulated in an attempt to satisfy demand for water and other requirements, and provide adequate storage for future water use (Brundenell et al, 1954). Reservoir operating rules define target storage levels for various dates in a year. If a reservoir is below the target storage level, the average outflow rate could be decreased to restore storage to its desired level. Several types of operating rules can be formulated, each reflecting the desired, or required, reservoir releases or storage volumes at any particular time of the year. Some of the rules identify storage targets (called "rule curves") which are passed to system operators to implement the policy they represent. This type of rule could be developed from yield models (Loucks et. al., 1981) using statistical analysis methods. Yield models refer to flows having a relatively high reliability, or probability, of being equaled or exceeded in future periods. Rule curves that specify release policies are derived by considering the required storage levels, as a function of time, which could achieve future outflows with a given reliability level. Associated with the derivation of rule curves is the estimation of the minimum zone, which involves a statistical analysis of inflows to reservoirs in dry years. 7 A Decision Support System (or Real-time Hydropower Scheduling in a Competitive Power Market Environment The method of rule curves was probably devised as a result of economic research on the problem of inventory control investigated in the 1950's by Kenneth Arrow, one of the leading researchers in the field of economics (Arrow, et al., 1951; see also Arrow et al., 1958). In 1954 Moran introduced the probability theory of dams and storage systems and found a complicated analytical solution that describes the probability distribution of the content of a reservoir as a function of the probability distribution of the inflows and release rules (Moran, 1954). He further extended the theory by considering modification of the release rules, considering different release rules for different months of the year, and obtaining an exact solution for a negative exponential input function that describes the probability distribution of inflows. He further devised a numerical method for obtaining an approximate solution in the case of type 3 Gamma distribution input function (Moran, 1954). Gani, analogously extended the theory of optimal inventory policy (Gani, 1957) and showed that, although simplified, it could be applied to storage reservoirs. But since the problems "form a class of stochastic processes with difficulties of considerable depth," numerical techniques were suggested to provide solutions that were considered adequate in practice. These techniques include Monte Carlo simulation, as described by Gani and Moran (Gani et al., 1955). It should be noted that the Moran theory of storage seeks answers to probabilistic rather than optimization problems, and that one of the basic assumptions of the theory is that inflows to a reservoir are not correlated (Reznicek et al., 1991). Similar methods were investigated by Gessford and Koopmans in the late 1950's (Gessford et al., 1958; Gessford, 1958) to derive a "simple" optimal water utilization policy for a hydroelectric system (or a number of hydroelectric facilities in different river systems). Inflows were considered as independent random variables, and if the probability distribution function for the inflows could be explicitly solved (integrated), the optimal water utilization policy could be determined recursively by dynamic programming. As indicated by Gessford, one of the important characteristics of the optimal policy derived by this method is its theoretical and practical simplicity, which makes its exploration in the future worthwhile for the long and medium-term scheduling problem of reservoir operation. In a methodology closely related to water release policies, zoning of a reservoir's storage has been used extensively by the Corps of Engineers in the U.S. to study modes of operation for multi-reservoir systems. The concept relies on the preference of the system operator, who provides guiding principles for system operations. For example, during flood situations, the uppermost zone of storage will be utilized to alleviate downstream flood damage. On the other hand, when storage reaches a lower buffer zone, downstream discharges are reduced to provide water for essential needs. The objective of the system operator is to monitor the system behavior, and to try to keep the system of reservoirs in the same zone. In 1976 Sigvaldason introduced a simulation model that is intended to aid in assessing the impacts of alternative policies by penalizing deviations from the operator's prescribed preferences in the form of storage and channel flow zones. The operator's perceived policy for a multiple reservoir system was derived by representing the reservoir system in a "capacitated network" formulation and by deriving the optimal operating policies with the out-of-kilter algorithm (Sigvaldason, 1976). This type of model does not yield the optimal solution to the multi-reservoir, multi-objective decision problem, but is very effective in assessing the impact of different operating policies for reservoir operations. Perhaps the optimal (or near optimal) operating policies could be derived by some kind of reverse modeling and optimization. The methodology could consist of iteratively running the model to optimize the performance of 8 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment operational policies through variation of the boundaries of the zones and penalty function coefficients. The end of the 1950's and during the 1960's witnessed a growing interest in the development of hydroelectric operations methodologies. Perhaps the most important contributions to the methods, from the point of view of this thesis, were due to Glimn and Kirchmayer (Glimn et al., 1958) with the General Electric Company in the U.S., and to Stage and Larsson (Stage et al., 1961) with the South Sweden Power Company, and to Lindqvist (Lindqvist, 1962) with the Swedish State Power Board. In these articles, particularly that of Lindqvist, methodologies that consider the long and short-term multistage decision processes were outlined. In essence, the methods assume that a reservoir price curve can be determined iteratively for each time step in the analysis (e.g., daily, weekly or monthly). The problem considered was how to regulate the storage of available water in such a way that, for each possible alternative operation, the sum of the variable costs would be minimized over the long run. At each decision stage, the decision-function, represented by the reservoir price curve, will yield the production level that represents the optimal value for the coming time step. The reservoir price curve represents the expected incremental hydroelectric power value of stored water as a function of the known contents of the reservoir and as a function of time. The methodology assumes that inflows to a reservoir are stochastic. It also assumes that given certain minimum reservoir levels that cannot be violated, the power generator is willing to acquire the power required to meet the demand by either running expensive generation facilities (e.g., thermal units) or by curtailing supply for some customers (or by purchasing, or selling surplus, energy in the competitive market as used in this thesis). It should be noted that deriving reservoirs' price curves is not the concern of this thesis, but the concept of using the reservoir price curve for making short-term operating decisions, for the next planning period, is. Deriving reservoirs' price curves is the subject of long-term and medium-term operations planning models. It should also be noted that a variant of this methodology is extensively used to plan the operation of the Norwegian hydroelectric system, in a competitive market environment. 2.7.2 The Era of Rapid Development In the 1970s and 1980s, the energy crises caused oil prices to soar and created significant interest in optimizing the operation of hydroelectric systems to save fuel costs (the classic hydrothermal coordination problem). This has resulted in an unprecedented growth in research projects aimed at managing reservoir operations in an optimal manner (Unny et. al., 1982). The main thrust of almost all developed techniques during these two decades focused on problems of coordination between hydroelectric and thermal generating facilities. The goal was to save expensive thermal generation costs by reducing fuel usage. Scientists from different fields of expertise (e.g., engineers, mathematicians, economists, management and operations research scientists) worked on developing sophisticated techniques and methods to solve the optimal long-term and short-term hydrothermal generation scheduling problems. Despite all of this effort, no completely satisfactory solution has yet been obtained, since every problem analyzed was unique and had to be simplified in order to be solved by available techniques and computer technology (Wood et al., 1996). 9 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Towards the end of this era, Yeh conducted an excellent critical review of the state-of-the-art of the available techniques for reservoir operations (Yeh, 1985). He classified the available methods to solve reservoir operations problems (for power generation and other uses) into four major classes: • Linear programming (LP); • Dynamic programming (DP); • Nonlinear programming (NLP); and • Simulation. Combinations of the above methods were also in common use. The review indicated that soon after the techniques were developed, a non-rigorous hierarchical approach was adopted by many users (see the section on real-time operations in Yeh's paper). The hierarchical approach depended on dividing the planning horizon to long, medium and short-term operations models. Information flow between these models formed the link that is believed to yield optimal reservoir system operation. Yeh also noted that linear programming has been one of most widely used methods in water resources management and reservoir operations, particularly for planning as well as real-time operations. He also indicated that the main advantages of using linear programming for real time operations are the following: 1. The ability to solve problems with a large number of decision variables; 2. The optimal solution is a true optimum; 3. Quick solutions could be determined with no initial feasible starts; 4. Solution techniques have been coded, tested, and are readily available in the market. Yeh also identified several reasons for the reluctance of real-time reservoir operators to use optimization models for their daily operations. He summarized the reasons as follows (Yeh 1985, p. 1814): " 1. Most of the reservoir operators have not been directly involved in the development of the computer model and thus are not entirely comfortable in using the model, particularly under the situation where modifications have to be made in the model to respond to changes encountered in the day to day operation, 2. Most of the published papers deal with simplified reservoir systems and are difficult to adapt for use in real time systems. In addition, most of the published research results are poorly documented from the practical use point of view, 3. There are institutional constraints that impede user research interactions." One of the aims of the work described in this thesis, is to overcome the reluctance of operators to use the optimization model developed. One final note on Yeh's review is in order here. It was noted that the majority of the reviewed literature has a bias to those articles and research documents published by those working in the field of water resources. This is despite the fact that a very rich body of literature and experience in applying optimization models to real life situations exists in other fields, such as hydroelectric power generation. On the other hand, a review of the literature on the methods used to model all aspects of the operation of power systems, including scheduling of hydroelectric facilities (IEEE Working Group Report, 1981) had little mention of the rich literature produced by those working in the area of water resources management, as described by Yeh. 10 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 2.1.3 Current State-of-the-Art During the 1980s and up to the time of writing this thesis, the literature concerning old and new techniques for solving the problem of scheduling generating facilities is profuse. A literature search on generation scheduling methods and reservoir operations is a major undertaking by itself. Several reviews and surveys were conducted by different working groups on the methods used for short-term scheduling of power system operation and control. These surveys highlighted the conclusions arrived at by Yeh: that although most utilities expect significant savings in operation costs from improvements in short-term scheduling procedures, few utilities actually use them. This was also highlighted in the conclusion of a survey that included 54 utilities worldwide: "The lack of advanced methods for short-term operation scheduling of generation facilities is apparent" (Working Group No. 3, 1986). Furthermore, the survey indicated ,that most of the reporting utilities paid more attention to scheduling and optimizing thermal generating units, while optimizing hydro generating systems have received very little, if any, attention. This is despite the fact that most of the reporting utilities surveyed have recognized the potential significant savings that could be achieved. More recently, other researchers tried old and new techniques to solve the generation scheduling problem. Successive linear programming was applied by Tao to study the High Aswan dam and answered several questions on using the method for reservoir operations (Tao et al. 1991). Gustavo et al., applied Sequential Quadratic Programming to a hydropower system to investigate the optimal allocation of releases from power plants during peak demand periods (Gustavo et al., 1990). The method was found to be feasible and superior to successive linear programming (faster convergence to the optimal solution). Russell et al., investigated reservoir operating rules with the application of fuzzy programming techniques, and found that the method is not an alternative to conventional optimization techniques (Russell et al., 1996). However, they suggested that fuzzy rules could complement optimization techniques by introducing flexibility and responsiveness, particularly if expert operator's insights were incorporated. Linear network flow techniques (Franco et al., 1994; Wang et al., 1990; Nabona, 1993), and nonlinear network flow algorithms (Rosenthal, 1981) were also tried for hydroelectric power systems. Allen and Larson applied dynamic programming techniques to short-term hydroelectric optimization problems (Allen et al., 1986; Larson 1969). Oliveira in Scotland applied a mixed integer linear programming algorithm to solve the short-term scheduling problem for a hydrothermal system with pump storage facilities. The algorithm solves a simpler linear programming problem, derived from the original mixed integer problem, by relaxing the integer to interval constraints, making the problem easier to solve. Other researchers in Canada adopted a reliability-programming model for hydropower optimization (Srinivasan et. al., 1994). In this modeling approach, the stochastic nature of inflows is considered in the formulation of a chance constrained linear program. In this approach, a nonlinear search algorithm evaluated reliabilities with two linear programming routines. One was used to evaluate the optimal policy for the chosen reliabilities, while the other evaluated the optimal value of the objective function. The model also includes a linearization procedure for the energy function to determine the head-related coefficients. Finally, Acres International reviewed and assessed the models and methods used by Canadian Utilities to schedule power generation facilities in 1994. The study objective was to develop a framework for a comprehensive decision support system to solve the 11 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment problem. The study recommended solution of the problem by the Lagrangean method by decomposing it into the unit commitment and the economic dispatch sub-problems. Extensive use of linear network programming methods was "recommended (Acres International, 1994). Others tried Genetic algorithms (GA) to solve the reservoir operation problem. Wardlaw et. al., evaluated Genetic algorithms for optimal reservoir system operation, and found the search method to be robust and could easily be applied to complex systems (Wardlaw et. al., 1999). However the authors indicated that GA fall short of finding the global optimal solution which was arrived at by linear programming. They further reported that the execution time of GA was eight times longer than that of LP, for a problem of 10 reservoirs for 12 time steps. In addition, and for extended the study duration, GA encountered convergence problems, which required further modifications to the algorithm. The major advantage of using GA, however, is its ability to easily handle nonlinear problems, and it has potential as an alternative to stochastic dynamic programming. Oliveira and Loucks also used GA to evaluate operating rules for multireservoir systems, and were concerned with optimization the parameters of the operating policies or rules (Oliveria et. al., 1997). Lund and Guzman derived a set of conceptual rules for operating policies for reservoir in series and in parallel (Lund et. al., 1999), and used an LP model to allocate storages among reservoirs in series and in parallel to maximize hydropower production. Israel and Lund presented an algorithm for determining priority-preserving unit cost coefficients in a network flow programming framework and used an LP program to serve as a preprocessor to the program (Israel et. al., 1999). Teegavarapu and Simonovic used membership functions from fuzzy set theory to represent the decision maker's preferences in the definition of shape loss functions (Teegavarapu et. al., 1999). Yang and Read used a constructive dual dynamic programming approach for a reservoir model with serial correlation. They indicated that sginificantly better operating policies could be obtained by accounting for the correlated inflows (Yang M. et. al., 1999). Finaly, several authors reported the use of evolutionary pogramming techniques to solve the unit commitment and short-term operation planning of hydrothermal power systems (Werner, T.G., 1999; Juste K.A., et al., 1999). Like GA, evolutionary methods are too slow for real-time applications. 2.2 STATE-OF-THE-ART IN INDUSTRY From the perspective of the research reported on in this thesis, the most important of the techniques (old and new) are those which contributed to applied methods of analysis, and those which presented methods that cover the overall framework for operations planning of generating systems that are predominantly, or with significant hydroelectric components. Such techniques were developed, in most cases, in response to the needs of utilities that actually operate complex generating systems, which contains significant hydroelectric components. With this in mind, review of the literature on the methods employed to solve applied hydroelectric scheduling problems revealed that few researchers have attempted to solve the problem in its entirety. What could be found were methods that, predominantly, considered scheduling of thermal generation as a major component of the mix of resources used. However, the literature included the work of a number of research teams who focused 12 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment on systems that are predominantly, or purely, hydroelectric in nature. The most relevant of these are discussed in the following sections. 2.2.1 The Norwegian Electric Power Research Institute (EFI) The Norwegian system is part of the Nordic power system covering Norway, Sweden, Finland and Denmark. A number of papers by several researchers with EFI outlined the methodology used to manage the predominantly hydroelectric Norwegian system (Mo et al., 1997; Johannesen et al, 1997; Fosso et al., 1997; Gjelsvik et al., 1992; Hjertenaes et al., 1992; Johannesen et al., 1989). In these papers, the authors presented the overall framework for scheduling a hydro-dominated power production system. The Norwegian generating system is more than 99% hydroelectric, with more than 70 generating companies, each responsible for scheduling their own operations. A power exchange (Nord Pool) and a system operator are responsible for marketing and system coordination operations. The power exchange is guided by a set of agreed-upon rules that define the sale of electrical energy and the spot price market clearance structure in the pool. The methodology developed at EFI and adopted in Norway followed closely the work of Lindqvist back in the 1960's (Lindqvist, 1962). Lindqvist's basic approach was extended to account for deregulation of the electric industry in Norway. The methodology follows a modeling hierarchy for the long, medium, and short-term scheduling of the hydroelectric system, and is summarized as follows. More details on the methodology can be found in the above-cited references. A stochastic dynamic programming model derives the long-term system operating strategy (Gjelsvik et. al., 1992). The model aggregates the system resources as one reservoir and then determines the value of expected hydroelectric energy production and the associated energy storage for each time step. Inflows, prices and demand for energy are modeled as stochastic variables. The medium-term target storage levels are determined from the long-term model, which are then used in medium-term models as constraints. The medium-term models are deterministic linear models, which treats uncertainty in inflows by generating a number of scenarios (stochastic dual dynamic programming (SDDP) is considered as an alternative for the medium-term modeling process described above). Results from the medium-term models consist of endpoint storage cost descriptions for use in the short term scheduling model. The short-term hourly scheduling problem is solved as a deterministic large-scale linear programming algorithm, and it includes more detailed description of the system than the other higher level models. The medium and short-term models are coupled through the incremental water value descriptions. These descriptions account for perturbations of the reservoir contents in relation to the contents of other reservoirs. This is modeled in the short-term by the use of penalty-function representation of the endpoint reservoir descriptions (see Mo, 1997 for details). The objective of the short-term model is to optimally match supply and demand by considering the long-term objectives (represented by reservoirs' targets and water values) and the short-term market prices. The modeling methodology presented by the Norwegian researchers is considered to be one of the most appropriate methods found in the literature to-date, as it considers a hydro-dominated generating system, managed by individual generating companies, operating in a deregulated market structure. However, although the modeling approach is appealing, it can not be readily adopted as a standard approach that could be applied to the B.C. Hydro case without further research and development for at least three reasons. First, the configuration and characteristics of the 13 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment market structure for B.C. Hydro is different than the Norwegian case (two market structures: Alberta and the U.S., each with different characteristics). Second, the characteristics and the constraints governing the operation of the B.C. Hydro system (e.g., environmental considerations, the Columbia Treaty, and the Peace River operating regime) differ from those in Norway. Third, the B.C. Hydro system enjoys a larger storage capacity and more flexibility than the Norwegian system. 2.2.2 The University of Waterloo (Unny et al., 1982) A hierarchical approach consisting of a number of statistical and optimization models for the long, medium, short-term, and real-time for the serially connected Alcan multi-reservoir system in Quebec was developed. The long, medium and short-term models provide an operational policy (in the form of rule curves for reservoir states) that real-time operators must comply with. The real-time scheduling problem is formulated as a linear model that determines the hourly schedule for one day, which minimizes energy use for fixed reservoir states at the end of the study period. Several iterations between the short and the real time models are performed to adjust for discrepancies in flow and load forecasts. 2.2.3 Hydro Quebec (Turgeon, 1982) In 1982, Turgeon compared three methods for short-term scheduling of hydro plants in series: dynamic programming; the progressive optimality algorithm; and the discrete maximum principle. He concluded that the progressive optimality algorithm was the most suitable to solve the problem. However, Robitaille (Robitaille et al. 1995) and Lafond (Lafond, 1997) reported the development and implementation of a real-time river management system for Hydro-Quebec for short-term operations. The method used for the short-term hydroelectric generation scheduling uses a successive linear programming approach. The short-term scheduling model is used to maximize the efficiency of the hydroelectric system in a single river basin. As Lafond puts it, the objective function used in this scheduling system "parallels the current practice of the dispatcher, it is considered to provide the best basis for a first regional optimization tool when used over a rolling horizon and with appropriate final (reservoir) state lower bounds." 2.2.4 Centro de Pesquisas de Energia Electrica, Brazil (Pereria et al, 82; 83, 85; 89; 91) In a series of journal articles in the 1980's and early 1990's, Pereria introduced a methodology for centralized operation planning of the predominantly hydroelectric generating system in Brazil. The methodology decomposed the planning activities into three major levels: long-term, medium-term, and short-term scheduling. To derive a long-term strategy over a five-year planning horizon, the systems of reservoirs are aggregated into one reservoir and a stochastic dynamic programming model is used to derive weekly tables describing the optimal proportion of hydro and thermal generation as a function of aggregate system storage. The medium-term desegregates the weekly generation schedule for the aggregate reservoir into generation targets for each plant in the system. The problem is formulated as a non-linear programming problem and is solved by the method of successive linear programming. The short-term scheduling problem is solved as a large-scale linear 14 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment program, which produces hourly generation schedules. The generation targets calculated by the medium-term model determine weekly targets that the short-term models should meet. Since the weekly target energy levels might not produce an electrically feasible schedule in the short-term, a new methodology aimed at finding a global optimal solution was proposed. This methodology is iterative and uses the Benders decomposition technique that divides the global problem into two independent sub-problems: master problem, and sub-problems (see Pereria et al., 1983 for details). Although the above methodology has significantly contributed to the theory of planning reservoir operations, it seems that centralized implementation had some difficulties. For example, in 1995, Lyra and Ferreira with the State of Parana Energy Company in Brazil indicated that "Even though utilities operate under guidelines established by government regulations and operation agreements, the best overall (centralized) scheduling may not meet their individual interests." They further described a multi-objective approach to the short-term scheduling of the hydroelectric system managed by "their" company. The model utilizes the concept of discrete differential dynamic programming, where the optimization problem for serially connected reservoirs is decomposed into a series of optimal control problems (see Lyra et al., 1995 for details). Further, and in 1997, de Sa Jr et al., (with one of the Brazilian Electric Utilities in Rio de Janeiro) proposed a "simple optimization approach" that uses a linear programming model to act as an interface between the short-term planning and the real-time dispatch of generating units. The model accounts for the hydro system constraints and the objective seeks to maximize reservoir storage at the end of the study period. 2.2.5 The University of California, Los Angeles (Yeh et al., 1992) In 1992, Yeh presented a multilevel management scheme applied to a hydrothermal system in China. The scheme includes a monthly, daily and hourly optimization model that aims at finding the hourly schedule of thermal and hydroelectric plants to minimize the cost of thermal power generation. The monthly and daily models determine the allocation of hydropower in each month of the year and for the first month in the study. This allocation is then used in the hourly model as a constraint. The hourly model incorporates transmission losses but does not include the continuity equation for reservoirs. The monthly and daily optimization are solved by an LP-DP algorithm, while the Incremental Dynamic Programming with Successive Approximation technique was used to solve the hourly optimization problem. 2.2.6 Georgia Institute of Technology (Georgakakos, 1997) Several authors have investigated the potential use of control engineering methodologies for water resources and reservoir operations (Chan et. al., 1975; Wasimi et. al., 1983; Georgakakos, 1997). These methods are efficient in finding a solution to the reservoir operation problem. Their efficiency stems from the great saving in computer memory space due to the fact that they do not discretize the state variables, as in dynamic programming. Chan suggested the use of an iterative tracking algorithm for routing stormwater through a combined sewer network. Wasimi et. al. suggested the use of linear quadratic Gaussian 15 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment (LQG) control method with the tracking algorithm for real-time daily operation of a multi-reservoir system under flood conditions. The basic idea of LQG methods is that they use penalty functions to direct the objective function towards an optimal (or near optimal) path or trajectory. In some sense it resembles the method suggested by Sigvaldason in 1976 as described above. Georgakakos et. al. extended the LQG control method to solve the problem in an iterative optimization procedure that starts from an initial sequence of the control variables and generates better sequences, by using analytical techniques, until convergence is achieved (for details on the method see Georgakakos et al., 1987, 1993a, 1993b; Georgakakos 1989). However, although very efficient, the procedure does not guarantee global optimality (Georgakakos, 1997). 2.2.7 The Pacific Gas and Electric Company (Ikura et al, 1984) Ikura reported the development of a solution methodology for a weekly (or monthly) large-scale hydroelectric scheduling problem. The main contribution of the research is the explicit consideration of forced spills (over a spillway when reservoir storage are at their upper limit) in the problem formulation by means of introducing a penalty in the objective function. A network flow algorithm provided a good starting solution to the problem. Thereafter, the problem is formulated and solved as a non-linear programming algorithm using the quasi-Newton scheme in the commercial package Minos (Murtagh et. al., 1978). 2.2.8 Tennessee Valley Authority (TVA) Although TVA has been trying to optimize its large-scale hydrothermal system for a number of years, and have tried the majority of the available optimization techniques (see Giles et al., 1981; Giles 1988), only recently have they engaged in the development of a comprehensive modeling environment that uses linear programming at its core (Magee et al., 1994; Shane et al, 1995). In fact TVA have specifically requested the development of a prototype optimization model that uses a commercially available, robust linear solver. As reported by Magee on the development of the TVA prototype system, the modeling methodology relies on minimizing the violation of a set of prioritized policy constraints. The policy constraints contain a wide range of constraints: guide-curves, flow, pulsing, no-spill, navigation, and systems storage constraints, etc. The objective function maximizes the economic benefits of power generation. The economic value to be maximized represents the value of immediate power generation against future expected value of water in storage, which is given by economy guide curves. The immediate value of hydropower is defined as the thermal replacement value of hydropower generated. 2.2.9 Electricite de France (Renaud, 1993; Goux et al, 1997) Renaud and Goux described a methodology for optimizing the complex, large-scale, generation system in France. The French system consists of 60 nuclear power plants, about 100 thermal power plants, and hundreds of hydroelectric plants located in more than fifteen river systems, with a number of very large storage facilities (a truly large-scale system). The 16 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment short-term generation scheduling activity for the generation system is centralized in France. Since global optimization of such a system is very difficult (some of the thermal cost functions are non-convex), and impractical, a decomposition approach is being used. The decomposition approach is based on the method of "price decomposition" (which relates to the use of the Lagrangian multipliers). Decomposition is done for each homogenous type of activity in the electric system (thermal and nuclear generation; hydroelectric generation; and transmission network). For each type, a sub-problem is formulated and optimized by different algorithms, and the problems are then pasted together and globally optimized by using the "Augmented Lagrangian and Splitting Variables technique". Although this technique is reported to be efficient in solving the global optimization problem, it is not of great interest to this thesis (since the French system consists largely of nuclear and thermal system). What is interesting, however, is that linear programming was used to solve the (large-scale) scheduling problem for the hydroelectric sub-problem. Although the hydroelectric model used is greatly simplified, future enhancements are foreseen to improve the representation of the hydroelectric system (see Renaud, 1993, Batut, 1992 and Goux, 1997 for more details). 2.2.10 Hydro Electric Commission of Tasmania, Australia (Piekutowski, etal, 1994) Piekutowski reported on development of a large-scale hydroelectric scheduling model that included a detailed description of a serially cascaded reservoir system. The model was developed to determine the optimal generation schedules and to investigate the export and import capabilities under a proposed tie line between the Island of Tasmania and mainland Australia. The model includes equations that describes forced spill conditions, storage target penalty functions, load-resource balance, energy-discharge input/output, and system hydraulics. The problem is formulated as a large-scale linear algorithm and is solved by a commercially available linear solver. The authors highlighted one of the advantages of using linear programming as the solution method: the fact that the units' incremental costs can be derived from the dual variables of the linear program solution and that the system incremental cost can be obtained form the dual variables of the load-resource balance equation. The units' incremental costs were used to provide a ranking of the units for real time dispatch while the system incremental costs was used for scheduling trading transactions. i 2.3 SUMMARY Over the last seventy years, several researchers and practitioners have devoted considerable effort to develop techniques that can be used at one or more of the various levels of operations planning of hydroelectric and thermal facilities. In summary, there is no single type of reservoir operation problem, but rather, a multitude of decision problems and situations. Each hydroelectric scheduling system and each study reviewed is unique. Several types of decision variables, decision criteria and constraints have been modeled and incorporated into various simulation and optimization modeling studies and applications. There is no simple answer to the question of which models and analysis techniques should be used for a particular situation and application. However, several key factors to be considered 17 A Decision Support System for Real-lime Hydropower Scheduling in a Competitive Power Market Environment in formulating an applied modeling and analysis approach for a particular application are discussed in Chapters 4 and 5. But before concluding this section on literature review, it could be said that linear programming is one of the most widely adopted optimization techniques for real-life applications in the hydropower industry all over the world. This is despite the fact that the problems are internally nonlinear and many other techniques have been suggested and used in different circumstances. Before addressing the question of "Why use linear programming?" it is appropriate here to recall some of the main features of the technique. Linear programming has become a very popular tool for use in optimization problems in industrial applications. One of the reasons is that very large problems can be solved with reasonable computer resource and time. Problems with a few hundred thousands variables and a matching number of constraints can now be routinely handled and solved efficiently. Also, a major investment in terms of manpower and expertise has been put into the development of general-purpose solvers and algebraic modeling languages that can efficiently solve large-scale problems and also handle non-linear problems by iterations. The linear programming technique also has the advantage over other optimization methods of being well defined and easy-to-understand and explain to end-users. In addition, a linear objective function and a set of linear or piecewise linear constraints can realistically represent many reservoir operation problems. Although the methodology is widely used, and is capable of solving large-scale problems, it suffers from the fact that the problems must be stated in an algebraically linear or piecewise linear form. The short-term, hourly hydroelectric scheduling problem is a large-scale optimization problem that has received some attention from academics and practitioners working in the field. Several techniques to solve the problem have been reported in the literature. The Lagrangian relaxation approach (known as the Lambda technique), gradient search techniques (non-linear optimization), and dynamic programming can be used. However, convergence to the optimal solution in these methods (if found) could be slow. For real-time scheduling of large-scale hydroelectric systems, dynamic programming becomes unattractive since the methodology suffers from the curse of dimensionality -requiring computer memory and storage of unattainable size, and processing speed of considerable magnitude. For these reasons, and due to its attractive features described above, the linear programming technique is considered the best to handle the large-scale hydroelectric scheduling problem considered in this thesis. In addition, the availability of proven and robust commercial software packages to solve linear programming problems reliably and efficiently supported the choice of linear programming as the 'method of solution' for the optimization problem. 18 CHAPTER 3 THE DECISION MAKING ENVIRONMENT This Chapter describes the decision-making environment and the rationale for developing the subject matter of this thesis: the decision support system for hydroelectric generation scheduling in a competitive market environment. The Chapter starts with a brief description of the BC Hydro power system. Then the current planning environment and modeling techniques employed at B.C. Hydro are briefly described. The extent of the decision-making environment in a large-scale hydroelectric system, and available methods and analytic techniques, and the classification of decision problems are briefly described. 3.1 THE B.C. HYDRO POWER SYSTEM The historic development of the B.C. Hydro generating system is described, and the main components of the electric system are outlined with an emphasis on the hydroelectric generating facilities. Then a glance at the future and the efforts taken by B.C. Hydro to shape it to meet the challenges ahead are outlined. 3.1.1 Historic Development of B.C. Hydro's Generating Facilities Soon after the invention of electricity towards the end of the last century, hydroelectric generating stations and delivery systems started to be built to make electricity available to consumers. In British Columbia, hydroelectric generating facilities have grown hand in hand with the economic and social development of the province. For example, the Vancouver Street Railway Company ran the city's first electric streetcar in 1890, while the British Columbia Electric Railway Company developed the first hydroelectric plant in British Columbia at Goldstream near Victoria in 1898. Soon afterward, domestic and industrial demand for electricity grew, and several other plants were developed at Lake Buntzen (1903) in the Lower mainland and at the Jordan River in Vancouver Island (1911). Soon afterward, private companies developed many other hydroelectric facilities across the province. Electricity generated by other companies was mainly devoted for industrial use (e.g., West Koontenay Power and Light Company). Prior to 1945, many communities had no electricity at all. In that year the B.C. provincial government created the B.C. Power Commission which set the stage for a consolidated effort at acquiring the small fragmented companies and extending the service to rural isolated areas, and building new generating stations and expanding the transmission system. The results were electrification of over 200 communities all over the province. As the province population grew, demand for electricity increased. B. C. Electric constructed large-scale hydroelectric projects on the Bridge River (1948) and B.C. Power Commission on the Campbell River (1953). By 1960, construction of the natural 19 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment gas-fired Burrard Thermal Generating Station began with the aim to serve the ever-growing demand in the Lower Mainland. After World War II, considerable development of hydroelectric facilities took place in the United States of America. Some of the major developments were in the Pacific Northwest on the Columbia River System. Efficient operation of the U.S. facilities required construction of large storage facilities on the Canadian side. The B.C. provincial government and the Americans realized the potential gain in coordinating their efforts to develop large-scale infrastructure facilities required for tapping the resources of one of the continent's great rivers, the Columbia. In addition, the provincial government realized the potential in developing the Peace River. In 1961 the government stepped in to buy B.C. Electric and gave it the task of developing the Peace River generating facilities. One year later, the government joined B.C. Electric with the Power Commission and created the B.C. Hydro Power Authority, known now as BC Hydro. One of the first accomplishments of B.C. Hydro was the 1964 development of the International Columbia River Treaty. Soon afterward, B.C. Hydro undertook the development of some of the most extensive hydroelectric facilities in the world. During the period 1964-1974, several mega-scale projects were developed on the Columbia and the Peace Rivers (see Table 3.1). By 1980, generating capacity increased to almost 8000 Megawatts -an increase of more than five times the capacity in 1962. During the 1980's development of generating facilities slowly declined, and a major restructuring of B.C. Hydro took place. The restructuring was aimed at separating B.C. Gas and public transit that had been inherited from B.C. Electric. Towards the end of the decade, the installed capacity has risen to about 10500 megawatts. New sources of electricity supply were sought from nontraditional sources, such as demand-side management, and new partnerships with the independent power producers. The introduction of independent power producers meant that B.C. Hydro was not the sole producer of electricity in the Province. In 1990's, the concept of publicly owned utilities was challenged. Monopolies over basic services such as communication, gas, and electric power were undergoing deregulation. These changes are said to be driven by many factors including customers' demand for new services and supply and pricing options, technology improvements, new independent power producers, and legislative and regulatory movement toward more competitive industries. Accordingly, in 1995, B.C. Hydro announced a major restructuring aimed at dealing with the new competitive arrangements. The fallout of this restructuring was a new organization structure that consists of three basic business units: Power Supply, Transmission and Distribution, and Marketing and Customer Services. The Power Supply Business Unit manages the generating facilities, while the Transmission and Distribution Business Unit manages the transmission and distribution network, and the Marketing and Customer Services Business Unit deals with the sale of electricity to B.C. Hydro customers. Within the Marketing Business Unit, PowerEx deals with electricity trade activities outside of the Province. If full deregulation had its way, and B.C. Hydro were privatized, the electricity industry in British Columbia would have gone through a full long cycle, following the hypothesis of long waves (Kondratieff, N. D., 1935). For a historical and personal account of the development of B.C. Hydro and its predecessors since 1860, see the newly published book (1998) "Gaslights to Gigawatts: A Human History of B.C. Hydro and its Predecessors" by the Power Pioneers -a group of B.C. Hydro former employees. 20 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 3.1.2 The B.C. Hydro Electric System The B.C. Hydro electric system consists of two major components: the generating system and the transmission and distribution system. Through a complex set of generating, transmission, and distribution facilities, electricity generated by B.C. Hydro is delivered to 1.53 million residential, light and large industrial customers in British Columbia and trade customers in Alberta, and the U.S. (B.C. Hydro, 1998). In the following sub-sections, the B.C. Hydro generation, transmission and distribution systems are briefly described. i. The Generation System B.C. Hydro operates 30 hydroelectric facilities with 32 reservoirs in 6 major basins and 27 watersheds, and three thermal generating plants. Table 3.1 lists the majority of existing hydro and thermal generating facilities, their commissioning dates and generating capacities, and the system of reservoirs managed by B.C. Hydro along with their live storage capacities. Other minor generating plants and their associated facilities are not included in the table. Table 3.1 indicates that over 90% of the installed generating capacity of about 11,200 MW is hydroelectric. Two of B.C. Hydro reservoirs provide multi-year live storage: the Williston on the Peace River (40 billion M3), and the Kinbasket on the Columbia River (14.8 billion M ) - enabling B.C. Hydro to strategically plan their operations for several years ahead. About three-quarters of the electricity is produced at major installations on the Peace and Columbia River systems, while other main energy sources include smaller hydroelectric facilities on the B.C. Coast, the lower mainland, and Vancouver Island, and a natural-gas-fired generating station in the Vancouver area. Thermal generating facilities are used to supplement the hydroelectric system in years of low water flow and during periods when natural gas prices are low (mainly during summer). In terms of firm energy capability (the assured energy contribution of the electric system over one year), the B.C. Hydro system provides for about 50,000 gigawatt-hours of energy per annum. A 100-watt light bulb switched on for one hour consumes 100 watt-hour, and one gigawatt-hour can serve about 100 residential customers for about one year. On average, thermal generation contributes about 3.5%, while energy purchases contribute about 1.5% of total energy use, with the balance provided from hydroelectric generating facilities. Figure 3.1 illustrates distribution of sources of supply for the year ended March 31st, 1998. 21 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Exchange net 1.1% Purchases 14.2% Thermal 2.3% Other Hydro 8.6% Bridge River 4.8% Peace Canyon 5.3% Seven Mile 5.6% Kootenay Canal J 6.0% G. M. Shrum 22.2% Revelstoke 15.8% Mica 14.1% Source of data: BC Hydro, 1998a. Figure 3.1. Sources of Electricity Supply in 1998. 22 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Table 3.1. Plants and Reservoirs Managed by B.C. Hydro Plant Name Installed Plant Type & Reservoir and Storage (Commissioning) Capacity Avg.H/K (Million M3) (MW) (MW/m3/s) Peace Region G. M. Shrum (1968) 2730.0 Hydro (1.43) Williston (39,472) Peace Canyon (1980) 700.0 Hydro (0.34) Dinosaur(216) Subtotal 3430.0 39,688 Columbia Region Mica (1977) 1840.0 Hydro (1.49) Kinbasket (14,800 Columbia Treaty) Revelstoke (1984) 2000.0 Hydro (1.15) Lake Revelstoke (5,304) Seven Mile (196?) 594.0 Hydro (0.53) Pend d'Oreille (60) Waneta(1954) 360.0 Hydro (0.51) Waneta (5) Duncan Dam (1967) - - Duncan Lake (1,727 Columbia Treaty) Keenleyside (1968) - - Arrow Lakes (8,758 Columbia Treaty) Kootenay Canal (1976) 528.0 Hydro (0.71) Kootenay Lake (Run of river) Whatchan(1951) 50.0 Hydro (1.60) Whatshan Lake (271) Elko (1924) 12.0 Hydro (0.47) Elk River Headpond (Small/run of river) W. Hardman(1960's) 8.0 Hydro (1.82) Coursier Lake (29) Aberfeldie(1922) 5.0 Hydro (0.65) Bull River headpond, (run of river) Spillimacheen (1955) 4.0 Hydro (0.53) Run of river Subtotal 5410.0 30,954 Lower Mainland/ Fraser Region Burrard (1962) 912.5 Thermal/Gas -Alouette(1928) 8.0 Hydro (0.34) Alouette Lake (155) Stave Falls (1911) 50.0 Hydro (0.28) Stave Lake (468) Ruskin (1930) 105.0 Hydro (0.28) Hayward Lake (24) Buntzen(1903) 72.8 Hydro (1.03) Buntzen Lake/ Coquitlam Lake (202) Cheakamus(1957) 155.0 Hydro (2.52) Daisy Lake (46) Clowhom(1958) 33.0 Hydro (0.41) Clowhom Lake (105) Wahleach (-) 60.0 Hydro (4.84) Jones Lake (66) La Joie(1956) 24.0 Hydro (0.49) Downton Lake (722) Bridge River (1948) 480.0 Hydro (3.15) Carpenter Lake (1,011) Seton (1956) 44.0 Hydro (0.40) Seton Lake (9) Shuswap(1929) 5.2 Hydro (0.19) Sugar Lake (148) Subtotal 1949.5 2,856 Coastal Region Prince Rupert (-) 46.0 Thermal/Gas -Falls (1930) 7.0 Hydro (0.46) Big Falls Lake (24) Subtotal 53.0 24 23 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Vancouver Island F legion Jordan River (1911) Strathcona(1958) Ladore (1958) John Hart (1953) Ash River (1959) Puntledge (1912) Keogh (mid 1970's) 170.0 56.0 47.0 126.0 27.0 24.0 99.7 Hydro (2.58) Hydro (0.32) Hydro (0.28) Hydro (1.03) Hydro (1.96) Hydro (0.88) Thermal/Gas Elliot, Diversion, Bear Creek Res. (28) Buttle Lake (823) Lower Campbell Lake (317) John Hart Lake (3) Elsie Lake (77) Comox Lake (106) Subtotal 549.7 1,354 Grand Total 11,383.2 74,876 Sources: BC Hydro, 1993 and personal communication. * H/K is a proxy for the plant efficiency, and is calculated from long-term studies as the average plant generation in Mega Watt/ plant discharge in cubic meters per second. It is a commonly used term in industry. ii. The Transmission and Distribution System The transmission network connects the generating facilities with the major demand centers in the Province. The imbalance between generating resources and demand centers has shaped the development of the B.C. Hydro transmission network. Figure 3.2 is a map of the B.C. Hydro major electrical transmission system facilities, and Figure 3.3 illustrates the distribution of generating capacity and electrical demand centers in British Columbia. Also shown in Figures 3.2 and 3.3 are the connections between the B.C. Hydro transmission network and the Alberta and the western U.S. transmission networks. The tie line capacity to Alberta is rated at 1100 MW of transfer capability, while the U.S. total tie line capacity has been upgraded recently to 3250 MW. The transmission network consists of 17,600 km of high voltages transmission lines (above 60 kilovolts). Terminal stations serve two purposes: they control energy flow in the transmission network; and they reduce voltage to distribution line levels. The distribution network connects consumers to the transmission network through 51,400 km of distribution lines. Distribution substations reduce voltage as needed for residential, commercial, and small and medium industrial customers. 24 A Decision Support System tor Reai-time Hydropower Scheduling in a Competitive Power Market Environment Source: BC Hydro, 1994 Figure 3.2. Map of BC Hydro's Major Electrical System. 25 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment -<A A »LBERJ_» . — COLUMBIA 7*ms* < or UJ z UJ o < yu1 (DO m ON LU o CO LU I-< 1-o LU z 3 £5 rxV^VA^W^VOJ 2s. Source: BC Hydro, 1994 Figure 3.3. BC Hydro's Present Regional Generation-Demand Balance. 26 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 3.1.3 Looking Ahead and Shaping the Future This section presents the current regulatory framework for the electric industry in British Columbia. Then the main forces that are believed to be causing the ongoing changes in the electricity market, and the steps that are currently being undertaken by B.C. Hydro to prepare the organization for the uncertain future that lies ahead, are discussed. i. Current Electricity Regulatory Framework in British Columbia Three types of electric utilities exist in British Columbia: publicly owned, privately owned, and municipally owned. As shown in Table 3.2 below, B.C. Hydro is the only electric utility that is publicly owned. Table 3.2. Electric Utilities in British Columbia Publicly Owned • B.C. Hydro Privately Owned • Hemlock Valley Electrical Services • Princeton Light and Power • West Kootenay Power • Yoho Power • Yukon Electrical Company Municipally Owned • City of Grand Forks • City of Kelowna • City of Nelson • City of New Westminster • City of Penticton • City of Summerland Source: BCUC, 1995. The total installed generating capacity in B.C. is about 13,300 MW, while annual production level is estimated at more than 60,000 giga-watt-hours. Hydroelectric generation accounts for about 85 percent of total installed capacity, with the balance being other sources such as oil, natural gas, woodwaste, and other thermal sources. In terms of installed capacity, sales, and customer base, B.C. Hydro dominates, as it controls more than 82% of the installed capacity, and 94% of the electricity sold in the Province. A small number of Independent Power Producers (IPPs) and large industries also generate electricity in British Columbia. IPPs either sell their electricity production to B.C. Hydro, West Kootenay or to the export market. In addition, there are a number of large industries (e.g., ALCAN) who generate electricity to meet their needs, and their generators could be in the form of co-generation -as in the case of some energy intensive industrial processes (e.g., that require pressurized steam). The total IPPs and industrial installed generation capacity accounts for approximately 2300 MW, of which more than 80% is generated by industries. The IPPs role as suppliers of 27 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment electricity to B.C. Hydro was reinforced through a policy statement that was issued by the province in 1992. This policy statement encourages IPPs where a need had been identified and where they could provide cost advantages, innovation or expertise. However, JPP future investments were limited to undeveloped sites with low hydropower potential and to other generation technologies (wind, woodwaste, etc). As with many electric industries around the World, the publicly owned electric utilities in British Columbia are regulated by government entities. Aside from municipalities, the B.C. Utilities Commission (BCUC) regulates all other electric utilities in British Columbia. The Commission's powers include utility's expenditures and the corresponding rates charged to customers. The rates have traditionally been set on a cost of service basis that limit the rates to the forecast cost of serving the customers including a reasonable return on investment. The Crown Corporations Secretariat also oversees B.C. Hydro's, and other publicly owned corporations, economic development activities and strategic plans. Other regulations govern development and operation of hydroelectric and other components of the power systems operated by electric utilities in British Columbia. On the hydroelectric generation operations side, environmental regulations includes the Fisheries Act which is concerned with post construction impacts on fish and fish habitat, and the Water Act, which is concerned with hydroelectric water allocations and operating requirements. Other regulations are in the form of water rental fees and water license. Water rental fees are paid to the provincial government and are based on plant capacity, energy generated, area flooded by reservoirs, volume of reservoirs and other items. The water license is granted to B.C. Hydro by the Comptroller of Water Rights of the Province of British Columbia to store and/or use water for generation of electricity. As with other utilities around the World, electric utilities in British Columbia are vertically integrated, with responsibilities for generation, transmission and distribution, and customer services. To explore effects of the emerging competitive market on the future structure of the electric industry in British Columbia, and the alternatives to meet these emerging challenges, the Provincial government has requested BCUC to conduct a review of the electricity market in B.C. The review was published in 1995, and included recommendations on separation of operating divisions in publicly-owned electric utilities in British Columbia, and promotion of the idea of the wholesale pool model accompanied by measures to ensure continued inclusion of environmental and social considerations. The review rejected the idea of retail competition (full competition) as an option for British Columbia's future electricity market and deemed it unnecessary at the time (BCUC, 1995). Soon after publication of the review, the Provincial Government (represented by the Minister of Employment and Investment) appointed Mark Jaccard (Chair and CEO of BCUC), as advisor, to lead a task force to bring "forward to government a package of electricity market reform proposals, including legislative changes if necessary" (Jaccard, 1998). The terms of reference for the Task Force were very restrictive, in that it did not allow them to explore the full range of possible alternatives available. They were mainly constrained by the following (Jaccard, 1998, p. 7): • "continued public ownership of the assets of B.C. Hydro, • no negative impact on B.C. Hydro's dividends to the province (water rentals, dividends, taxes, grants in lieu of taxes), • no adverse effects on specific classes of customers or customers in particular regions, • no adverse effect on electric sector employees." 28 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Although the government's appointed Stakeholders on the Task Force were unable to reach consensus on the basic components of electricity reform in B.C., Jaccard issued his "Reform Proposal". The proposal calls for the electric industry in British Columbia to be reformed in two phases, and classified four major evaluation elements for the proposals: customer access, market structure, social concerns, and environmental concerns. Of particular interest to this thesis is the proposed reform's effect on customer access and market structure in B.C. In the first phase (by January 1999), Jaccard's proposal allows for 50% of industrial customers to pursue other generation suppliers, with the option of staying under the B.C Hydro's and West Kootenay Power's tariff system. In phase two (by January 2001), all industrial customers, and possibly commercial customers could pursue such opportunities. All other customers would remain under the regular utility tariff system. The proposal also reformed the B.C. electricity market structure by further separation of the transmission, distribution and generation functions from grid-related, common carrier functions that include: system operation, transmission planning, and transmission tariff. This de-integration aims at prevention of the use of transmission market power that B.C. Hydro's currently enjoys, and is a pre-requisite for access to California's and other (emerging) markets in the U.S. The proposal also recommended that the transition be carried out in two phases: phase one includes establishment of a Grid Oversight Committee and B.C. Power Exchange. Phase two would establish a new B.C. Grid Company that takes over the committee's functions, the de-integrated B.C. Hydro's Transmission Business Unit, lease the West Kootenay Power's grid related assets, and operate the B.C. Power Exchange. All of the newly created and de-integrated entities are to remain publicly owned and regulated by the BCUC. Analysis of the reform proposal leads one to conclude that the regulator is trying to expand his jurisdictions and get involved in the micro-management of utilities. As stressed by B.C. Hydro's Senior Vice President for Transmission and Distribution in 1995, the role of regulators will have to change in competitive market structures from that of expanding jurisdiction and micro-management to streamlining and expediting reform processes (Threlkeld, 1995). Repercussions of the Jaccard proposal are still to be seen. In the meantime B.C. Hydro has been restructured into three separate business units: Power Supply, Transmission and Distribution, and Customer Service. The main aim of restructuring into three business units is to enable B.C. Hydro to identify the specific, separate costs and values of their service. Once the costs are known for each service function, informed judgments about prices for the services they provide can then be made (Threlkeld, 1995). In addition to restructuring, several efforts are underway to prepare the organization for the transition to any possible market structure, as discussed in iii below. ii. Forces of Change in the Electric Industry As discussed above, the formal structure of the market in B.C. is not yet clear, as there are many forces at play, but most utility executives agree that early in the new millenium, North America will have a deregulated fully competitive electricity market. The electricity market is forecast to be the largest commodity market with annual sales estimated in the U.S. at US$300 billion (Douglas, 1997). As the electric power industry continues to rapidly change, it is believed that the traditional monopolistic environment will inevitably make way for increased competition, both in the wholesale and retail levels. As emphasized by Navarro, 29 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment sooner or later, cautious utilities, and their regulators, will have to adopt radical restructuring, preferably before retail competition comes to their own backyard (Navarro, 1996). This view, however, did not go unchallenged as expressed by Khun (see for example Khun et al., 1996). Forces of change in the electricity industry have been attributed to three major factors: changes in electricity generation technology, globalization of the economy, and changes in public policy (BCUC, 1995a, BCUC, 1995b). For more details see also Weiner et al. (1997). It is widely believed that these changes could result in considerable savings, particularly for large industrial and commercial users. Locally, the drivers for change are believed to be somewhat different and they stem from four main factors (Jaccard, 1998): • demand of neighboring competitive markets (e.g., California) for reciprocal reforms in B.C. to assure level competition ground; • desire of B.C. customers to participate in future electricity supply investment and to assume the risks involved; • desire of B.C. customers to have access to market-based electricity purchase options; and • desire of IPPs and electricity marketers to have fair access to customers in B.C. iii. Currents of Change for B.C. Hydro The future of the power industry in British Columbia is uncertain, and the timetable for deregulation has not been set yet. However, there are several major indicators of the ongoing trend of increased competition, particularly for B.C. Hydro (B.C. Hydro, 1998c, BCUC, 1995): • PowerEx established in December 1988, ^ • BCUC rejected BC Hydro's proposal for industrial rates and denied other provisions for new services in April 1992, and later (after a public hearing process) BCUC recommended granting BC. Hydro and PowerEx an Energy Removal Certificate for short-term electricity trade. In September 1992 the government granted PowerEx the Energy Removal Certificate. • In October 1992, the province issued a policy encouraging the development of IPPs for domestic supply with the project evaluation based on Social Costing Principles. • The Ministry of Energy, Mines and Petroleum Resources issued a Long-Term Firm Electricity Export Policy in July 1993. • In December 1994, the provincial government announced that B.C. Hydro will issue a Request for Proposals for 300 MW of electricity from the private sector. • In December 1994, BCUC was directed by the government to hold a public review of electricity market restructuring in B.C. • In Sept. 1994, the Province signed a Memorandum of Understanding with U.S. authorities for the next 30 year delivery of the downstream benefits of the Columbia, and in 1995 the Province and the Columbia River Treaty Committee signed the Columbia Basin Accord creating the Columbia Basin Trust to oversee the region's share of downstream benefits. The intention was to jointly develop new or to expand hydropower production at three existing dams: Keenleyside, Waneta, and Brilliant. The government 30 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment legislated that sales from these developments are intended for new and expanding industrial customers. • Early in 1996, B.C. Hydro received a wholesale transmission tariff and a Real Time Price (RTP) tariff to allow industrial users to buy directly from the market under certain circumstances. The move is aimed at meeting the reciprocating demand for comparable access by the U.S. Federal Energy Regulatory Commission (FERC). • In January 1996, Alberta implemented a Poolco1 model, which created the Alberta Power Pool for electricity trade. Alberta is currently working on a reform to retail competition. • In 1995, a large hotel in Vancouver announced their plans to install a gas generator. Other hotels, and a university in B.C. are considering doing the same (Threlkeld, 1995). In October 1996, the West Kootenay Power offered a power service contract (EnergyOne) to Surrey Memorial Hospital. • In December 1996, B.C. Hydro industrial customers requested retail access that enables them to shop around for better prices. • In January 1997, B.C. Dan Miller announced that B.C. Hydro's monopoly over electricity in British Columbia would end. • In September 1997 FERC approved PowerEx's application for a power marketing certificate to access U.S. markets. • In November 1998 B.C. Hydro real-time pricing for industrial customers was approved by the Provincial Government. • In January 1998 Mark Jaccard published his report on electricity market reforms in British Columbia (Jaccard, 1998). To take advantage of the competitive environment, B.C. Hydro has realized that they must operate their system to maximize the value of their resources at the various levels of planning for power supply operations. Several steps have been taken to achieve this objective including restructuring the organization to meet the emerging challenges and implementing new business processes. The Business Transition Program was initiated with the vision that the Power Supply (PS) Business Unit of B.C. Hydro compete profitably in any future energy market structure. To realize this vision, the following functional projects have been initiated (B.C. Hydro, 1998c): • Asset Management (AM), which provides costs of operation and revenue potential from making B.C. Hydro's energy resources commercially available; • Operational Information (OI) objective is to maximize operating efficiencies by implementing a software tool that monitors near real-time and historical information on generating units, plants, and river systems operations; • Commercial Resource Optimization (CRO) is aimed at providing an integrated set of decision support tools to achieve optimal commercial use of water and other fuel resources; • Commercial Management (CM) is aimed at communicating plant capabilities, production, revenue and cost performance to B.C. Hydro's operating staff with the objective of maximizing profit potentials; ' Under the Poolco model, buyers and sellers are not free to negotiate prices and terms directly with one another, and they are restricted to buy and sell power from a centralized pool. While no bilateral agreements were allowed, participants were allowed to enter what is called Contracts for Difference (CFD's). 31 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment • Coordination with Marketing and Customer Services (M&CS), which aims at increased coordination between Power Supply and Marketing (primarily PowerEx) business units; • People Change Management (PCM), which aims at determining the effects on B.C. Hydro, training needs, and to help to bring about successful cultural change; • Information Technology (IT), which aims at enhancing availability of information systems (such as the SCADA and PI systems); • Working for Profitability (WfP), which aims at enhancing the business awareness and practices of Power Supply's employees. Of particular importance to this thesis is the Commercial Resource Optimization project (CRO). Among the components of CRO are the following (Taylor, 1998): • Hydromet Data, which aims at improving the hydrometerological data collection network and modernizing the database and procedures used to store and analyze hydrologic and meteorological data. • Large Reservoir Optimization, which aims at enhancing the Williston Marginal Cost Model, complete the Columbia River Marginal Cost Model, and develop an economic modeling framework and understanding of model drivers and sensitivities to increase confidence in using the results of the modeling for operations and trading decisions; • Short Term Models, which will focus on developing Static Plant Unit Commitment (SPUC) and the Dynamic Unit Commitment (DUC) models and further development and integration of the Short Term Optimization Model (developed by this thesis) with other CRO models. As will be described in Section 4.5, SPUC has been extensively used by this thesis to prepare the plant's production curves. In addition, the author, and other researchers from UBC are actively participating in setting the user's requirements and algorithms for DUC. Both SPUC and DUC are forecast to further improve efficiency of operation of the B.C. Hydro system, and eventually will be used by the Shift Engineers in their daily operations. It should also be noted that development of the Short-term Optimization Model (STOM) was started before the CRO project was conceived, and was subsequently added to become one of the CRO project's main components; • CRO Database, which will incorporate facility and system constraints into real-time and short-term optimization modeling along with market values for all products and services offered by B.C. Hydro. The constraints database includes physical generating plant and unit characteristics and operational and other constraints. The author of this thesis has been actively engaged in promoting the idea for the potential use intelligent systems (such as expert systems) to process and interpret the system constraints; • Model Integration Framework, which will design and build the databases and procedures required for integrating models and data together. The author of this thesis has been actively contributing to development of some aspects of the model integration framework, particularly with issues regarding integration of the Short Term Optimization Model within the overall modeling framework at B.C. Hydro. The expected benefits from implementing the CRO project are estimated by B.C. Hydro to total $25 million per year, of which the Short Term Optimization Model is expected to contribute about $5 million per year. 32 A Decision Support System for Real-time Hydro-power Scheduling in a Competitive Power Market Environment 3.2 THE BC HYDRO DECISION-MAKING ENVIRONMENT As indicated in Chapter 2, over the last seventy years researchers and practitioners have devoted considerable effort to develop techniques that can be used at one or more of the levels of operational planning of hydroelectric and thermal facilities. The aim of developing such techniques and methodologies was to arrive at an integrated approach that could be applied to both the long and short-term operation of hydroelectric facilities. Such an approach is, however, still under development as there is no one standard methodology that has been agreed upon by researchers and practitioners as yet (Wood et al, 1996). There are several reasons for this. First, every system is unique in terms of its size and the configuration of the managed facilities. For example most systems contain a variable mix of hydro and thermal generating facilities. Second, the organizational culture of each management entity is different and is governed by different internal policies, legislation and regulation and operating environments. Third, and as result of the ongoing deregulation move of the electricity industry, the market structure is different for each participant in terms of the size of the market and its major players. Given the above reasons, and the current state-of-the-art of the methods and techniques, each entity will have to adapt an approach from the pool of appropriate methodologies for use in its operations planning to suit the prevailing environment. In this regard, B.C. Hydro has embarked on a process to develop a set of operational planning models to be used in their daily operation activities. But before addressing the operational planning models that B.C. Hydro currently use or plan to use, the changing decision environment is described to give "a feel" for the context. 3.2.1 Guiding Criteria for Decision Making Making operating decisions for a large-scale hydroelectric system involves a wide spectrum of issues ranging from the safety of lives and property to the efficient operation of generating facilities. Operation of B.C. Hydro's system is guided by the following criteria (B.C. Hydro, 1993): • safety of lives and property; • regulatory requirements, such as water license and government legislation; • obligation to meet present and future power demand; • balanced tradeoff between economic and environmental requirements; • technical efficiency; • reliability and security; • economic efficiency; • responsiveness to the changing demands of customers. The above list is not exhaustive, but is intended to illustrate the extent and complexity of the operating environment (see for example Keeney and McDaniels 1992). Decisions also depend on prevailing societal values. For instance, decisions to build the large-scale hydroelectric facilities in British Columbia were made at the time when societal values emphasized cost, efficiency and the creation of an industrial infrastructure base (B.C. Hydro, 1998a). In addition to the above criteria, the other factor that is gaining increasing weight in decision-making processes is the type and structure of the market where electricity is sold. 33 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 3.2.2 Objectives of the System Operator In traditional monopolistic, vertically integrated, electric utilities, the main objective of the hydroelectric system operator is to secure a stable supply of electric power to meet the firm domestic load demand and firm trade transactions, while meeting the system's physical and operational constraints. The major driving force in making operating decisions is to ensure the availability of sufficient energy and capacity to meet the system demand, while meeting non-power requirements and operational constraints. The electricity industry across North America, and in many parts of the world, is changing very rapidly -monopolies are being deregulated and competition is evolving. The emerging competitive market structure in the electric power industry is affecting the various levels of the traditional strategic and operational decision-making processes (BC Hydro, 1998b). As deregulation of the power industry proceeds, competition is causing a major shift in the way generating facilities are managed. The emphasis now, and in the near future, will be on more effective operation of existing facilities to maximize the value of resources while meeting the operational constraints. In other words, a shift in paradigm is already underway to manage resources in a business-like manner. This is reflected clearly in BC Hydro's new statement on their strategic objectives (BC Hydro, 1998b, p. 8): "Strategic Objectives Lead the market • Retain and grow profitable market share in existing and emerging competitive markets • Efficiently and creatively meet customers needs and expectations in all markets • Build a strong and capable organization • Ensure our people have the skills, tools, and environment required to achieve our vision and mission * Increase financial efficiency and productivity Ensure effective governance Build and maintain public support" These objectives are in contrast to B.C. Hydro's corporate objectives just few years ago (BC Hydro, 1994): • "To be a leader in the economic and social development of British Columbia • To be a leader in the stewardship of the natural environment, • To be the most efficient utility in North America • To be a superior customer service company, • To be the most progressive employer in British Columbia." Strategic objectives, if properly formulated, should be "structured to provide insight into how analysis should proceed in decision contexts" (Keeney and McDaniels 1992). Given B.C. Hydro's statement on their new strategic objectives, it is evident that several changes in their decision-making processes are, or soon will be, underway. These changes are aimed at transforming the organization to be more responsive to emerging needs of the new deregulated operating environment. Operating under such new environment, however, will require decisions to be based on consistent and reliable approaches. 34 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment 3.2.3 Generation System Operations The B.C. Hydro's Power Supply Business Unit plans and operates the generation facilities to meet the domestic load obligation and to maximize the value of resources while meeting the environmental commitments and other physical and operational constraints imposed on the system. The planning function is focused on the following activities (personal communications): • Produce facility operation plans; • Coordinate generator maintenance schedules; • Prepare detailed weather and inflow forecasts; • Prepare short-term load forecasts; • Arrange gas supply for the Burrard generating station; • Determine the marginal value of B.C.Hydro's energy; • Determine longer term marketing capability and requirements; • Coordinate B.C. projects operation under the Columbia River Treaty; • Manage West Kootenay Power Agreement; and • Manage Independent Power Contracts. Generation scheduling is concerned with the activities to implement operations plans, to ensure load-resource balance and to determine the short-term and real-time electricity trade capability and requirements. It also directs operation of the generation and storage facilities to minimize flooding potential. In addition, the system is operated to fulfil B.C. Hydro's power agreements and treaties with other concerned agencies (nationally and internationally). Other functions include management of non-power needs, such as balancing power generation requirements with the needs of fish, wildlife, recreation, and flood control. They are also responsible for implementing strategic fisheries research and more recently preparing Water Use Plans. The main concerns of system operations, however, are electricity demand and water inflow. As the demand for electricity and water inflows are beyond the control of the system operator (to a great extent both depends on the weather), the generating system is operated to satisfy the firm domestic load, to minimize operating costs, and to protect consumers from electricity shortages during periods of low water flow in dry years. On the other hand, when water is in abundance, system operations are focused on making the best use of available resources to maximize profits. To operate the generating system reliably two conditions must be met: sufficient energy capability, and sufficient peak capacity. Energy capability refers to the average amount of electricity produced under all stream flow conditions over a given period (e.g., one year or in a day). Peak capacity refers to the maximum rate at which electricity can be produced at any given time. The goal of providing sufficient energy capability is to be able to match energy demand at all times, while the goal for providing sufficient capacity is to enable the system to meet instantaneous peak power loads. A complicating factor in meeting these goals is the fact that the demand for electricity and water inflows are both uncertain, as both primarily depends on weather conditions. For this reason, system operations must also take into account errors in forecasts of demand and inflows (short and long-term). In addition, special provisions must be allowed for unforeseen facility outages and long and short-term system dynamics. More recently, and due to deregulation, system operation must also make a balanced tradeoff between system 35 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment operations reliability (energy and capacity) and opportunities in the market place, in the long as well as the short-term. Inflows to the majority of reservoirs operated by B.C. Hydro are characterized by low flows during the winter and high flows during the snowmelt season in the spring and early summer. To illustrate the seasonal variability of inflows in the B.C. Hydro system, Figure 3.4 shows flows of the Peace River into the Williston reservoir, and Figure 3.5 illustrates flows of the Columbia River into the Kinbasket reservoir. Demand on the other hand is high during winter and low during summer, and it fluctuates during the hour of the day, the day of the week, and the month of the year. Figure 3.6 illustrates the variation of daily total demand during the past 13 years, and Figure 3.7 illustrates the hourly maximum and minimum daily demand for the same period. Figure 3.8 illustrates the variation of the maximum, minimum, and average hourly demand in 1997, while Figure 3.9 illustrates the variation of domestic hourly demand. The system's storage reservoirs are used to regulate flows during high inflow periods for use during high demand periods. In addition, and as generation capacity depends on the head of the water column on the turbines, storage reservoirs must be operated to ensure that there is adequate head to meet the capacity reliability criteria. In hydroelectric systems, spills from reservoirs are not desirable. Spills usually occur for two reasons: obligatory requirements (environmental, legal, or operational); or uncontrolled spills. Under the first condition, the system is operated to satisfy the obligatory requirements, while the second occurs due to the inability of the system to provide sufficient storage, generation, or transmission capabilities to store or use the excess flows. These capabilities prevent the system operator from fully exploiting the surplus energy that could be stored, generated and sold in the market place. Conversely, when inflows are low, system operations must augment energy supplies by drafting large storage reservoirs, use available thermal generation to supplement hydroelectric supplies, or import electricity from other power producers connected to the B.C. Hydro transmission network in B.C., Alberta, or the U.S. Under all circumstances generation system operations ensures that enough water energy is stored in reservoirs, or enough transfer capability is available to meet the firm domestic load from the available sources. The later is particularly important since the transfer capabilities between the B.C. Hydro system and the neighboring systems (Alberta and the U.S.) are limited by the tie line capabilities, which could be fully booked during peak load instances. Figure 3.10 depicts the annual flow of water into and out of a typical reservoir. From January to May, the reservoir is being drawn down, because this is the dry season, and water required for generation exceeds inflows, and by May storage reaches its lowest level. For a well-planned and well-operated system in a normal year, the reservoir at this time of year will be at its minimum operating level, containing only a small safety reserve margin of water. From May to October, the wet season begins during which water inflow from the catchment area exceeds the desired outflow. The reservoir fills up between May and sometimes before October when the reservoir reaches the maximum storage level and starts to spill. Spilling ceases as the reservoir is drawn down and the dry season starts again. This annual cycle continues for the next year and so on. The B.C. Hydro system is composed of several reservoirs, in different regions across the Province. System operations engineers determine how each generating facility should be operated to satisfy the hourly demand, to manage reservoir operations so that future demand can be met, system efficiency and economic returns are maximized, and that all 36 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment environmental, legal, operational, and physical constraints are respected. This is an extremely complex task with many tradeoffs to be made. The main tradeoffs are between efficiency, security of generation and the risk of spilling (or keeping the reservoirs at high or low levels). If reservoirs are kept at high levels, more generation will be achieved from the same amount of water (because of higher head), with more secure supply of electricity. However, the risk of spills, with the loss of potential energy and flooding, will be higher. High spill levels can cause considerable environmental and physical property damage (and sometimes loss of life), and Be Hydro has to provide mitigation costs and measures. Low reservoir levels, on the other hand, result in less generation from the same amount of water (because of lower head), less secure supply of future electricity, and a lower risk of spill and flooding. The entire system, then, must be coordinated to achieve optimal or near optimal operation. The optimal operation must take into consideration: inflow conditions, electricity demand characteristics, electricity market conditions (both long-term and short-term commitments), system status, maintenance requirements, specific dam and generating facilities constraints, uncertainties in forecasts (inflow, market, and demand), and unplanned facility outages. The other major challenge is to balance generation between many river systems under the control of the system operator. Seasonal and annual inflows may be high in one river system and low in the other. An attempt is required to balance the output from various generating facilities to account for different inflow conditions while meeting total generation requirements. The decision to increase generation in a river system propagates throughout the system and affects other generating facilities in other regions. For example, if inflows to the Bridge River system are high and spills are likely, generation would increase in the Bridge system and be reduced in other systems. It is obvious from the above discussion that continuous planning must be an integral part of the duties of the Power Supply Business Unit at BC Hydro. Due to the complexity of the task, operations planning is carried out at four different levels: long-range (investment), long-term (operational), short-term, and real-time as will be discussed below. 37 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 7000 6000 4 5000 4 ^ 4000 -E 5 c 3000 -2000 4 1000 4 o 4 1 1 1 1 1 1 1 1 1 1 1— Dec Jan Feb Mar Apr May Jul Aug Sep Oct Nov Jan Month Source of information: Resource management, B.C. Hydro, 1998. Figure 3.4. Daily Average Peace River Inflows at Williston Lake, 1996. 38 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 2500 0 -I 1 r-i 1 1 1 1 1 1 , 1 1 1 -, 1 Dec Jan Feb Mar Apr May May Jun Jul Aug Sep Oct Nov Dec Jan Month Source of information: Resource management, B.C. Hydro, 1998. Figure 3.5. Daily Average Columbia River Inflows at Kinbasket Lake, 1996. 39 Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment r-8500 • 8000-8500 • 7500-8000 • 7000-7500 • 6500-7000 S6000-6500 • 5500-6000 • 5000-5500 • 4500-5000 • 4000-4500 • 3500-4000 Month rf-8000 1-7500 •7000 •6500 Jul-97 Sep-97' rr i r i i i i i i i 1 3 5 7 9 11 13 15 17 19 21 23 -6000 Load (MWHr) -5500 -5000 -4500 -4000 •3500 Hour Source of data: BC Hydro, Resource Management Figure 3.8. Variation of Monthly/Hourly Domestic Load in 1997. 42 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment ^—Maximum —-—Minimum ——Average 9200 n 3200 -I 1 1 1 1 1 1 1 1 1 1 1 1 0 2 4 6 8 10 12 14 16 18 20 22 24 Hour Source of data: BC Hydro, Resource Management Figure 3.9. Variation of Hourly Domestic Load in 1997. 43 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Figure 3.10. Filling and Draw Down of a Typical Storage Reservoir. 44 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 3.2.4 System Operations Planning B.C. Hydro has been performing optimization studies for over 25 years to maximize the efficiency of their operations. As with other utilities in Canada (Acers, 1994), B.C. Hydro's optimization studies have dealt mainly with the long-term at the strategic level (Druce, 1991). Short-term operations did not receive much modeling attention until recently, but relied on the skill and long experience of the operating staff. The following sections outline the main features of the approach currently utilized by B.C. Hydro for system operations planning. i. Aims and Guiding Criteria for Operations Planning The aim of planning is to account for many factors that can affect the day-by-day and long-term supply of electricity. The factors can be summarized as follows (BC Hydro, 1993): • electricity demand forecasts; • inflow forecasts; • reservoir levels; • turbine and generator restrictions; • security of supply requirements; • transmission network constraints; • fishery requirements; • flood control requirements; • Columbia River Treaty obligations; • reliability considerations; • efficiency considerations; and • maintenance requirements. The planning process is guided by specific criteria in the following order of importance (BC Hydro, 1993): • safety of lives and property; • regulatory requirements; • need to meet present and future power demand; • balance between economic and environmental requirements; and • efficient operation. To plan operations in a conceptually correct manner, the Power Supply operations planners are currently in the process of developing an economic framework for the Power Supply Business Unit (personal communication with Mr. K. Ketchum). The economic framework relies on the use of price signals to guide their operations. These price signals are derived from optimization models described in "iii. Planning Levels". One of the basic ideas behind the economic framework under development is to pass the computed value of water, as derived from optimization models at each planning level, to models at lower levels in the modeling hierarchy as illustrated in Figure 3.11. This is believed to best approximate optimal operation of the entire hydroelectric system. STOM takes this economic framework into consideration by incorporating the price signals into its objective function as will be detailed in section 4.5. STOM assumes that the price signals are available and are one of its user's input (see Section 4.3.2 for details), however, the author believes that much research work still needs to be done to put the economic framework's concepts into operational reality. 45 A Decision Support System lor Real-time Hydropower Scheduling in a Competitive Power Market Environment ii. Data for Operations Planning To perform credible planning studies, much information is currently utilized (discussion will be focused on data relating to the current subject matter of this thesis). The items are briefly discussed in the following sub-sections. a. Weather and Inflow Forecast The hydrology section employs a meteorologist and hydrologists to forecast the weather and reservoir inflows both for the short and for the long term. The hydrology section operates an extensive network of hydrometeorological stations across the Province to gather climate, stream flow and snowpack information and use them to forecast weather and inflow patterns. It has access to a state-of-the-art real-time weather forecasting system that employs ^sophisticated weather and hydrologic models. Some of the weather models (e.g., wind flow models) have been developed and run in cooperation with the University of British Columbia's Geography Department. In addition, the satellite imagery system continuously updates information on the weather systems affecting the various regions in British Columbia and that could potentially affect reservoir operations. Future plans include the use of Doppler Radar systems to improve forecasting of severe localized weather systems. The hydrology section forecasts expected reservoir inflows and produces seasonal as well as five-day forecasts. For some river basins, the hydrology section utilizes the U.B.C. Watershed model, developed at the Civil Engineering Department, U.B.C. Current efforts are underway to use this model for the majority of river basins managed by B.C. Hydro. Historic inflow records are also maintained and are calculated from the reservoirs' recorded water levels and actual generation schedules and spills. For use in planning studies, these records are screened and corrected for errors in calculated historic daily inflows (Druce, 1996). b. Domestic Load Forecast Load forecasting is performed at various levels of the planning process. Long-term load forecasts are performed at the Planning Department, while short-term load forecasts (next few days) are calculated by the ANNSTLF neural network model (Khotanzad et al., 1997). Load forecasting for the next hour is determined heuristically by the Shift Engineer, with the aid of ANNSTLF and a simple Excel spreadsheet model that calculates the 5-minutes moving average from recorded load information relayed from the T&D System Control Center. c. Generating Unit Outages Generating unit outages affects the system and plant generating capacity. In close coordination between planning engineers and project's site management and T&D, maintenance schedules are determined and regularly updated for several months ahead. The maintenance schedules includes the type of work to be performed on hydroelectric facilities, which includes maintenance and other works on transmission system, generating units, intake structures, trash racks, spill gates, reservoir structures, etc. The Power Facility Maintenance System (PFMS) is used to forecast the daily maintenance schedule for each facility on an hourly basis. The maintenance schedule lists, among other things, type of work to be performed, the specific facility affected, and the start and end dates. It is issued early in the 46 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment morning every day, and thus does not include any unscheduled changes that could occur within the day. For this reason, and for short and real-time operations planning, extensive communications (and negotiations that involves the Shift Engineer, project's planning engineers, site management and PowerEx) take place to determine the current status of the facilities, and whether some of the restrictions could be lifted, or expedited, particularly during hot market conditions. Results from these communications determine the actual and future maintenance schedules. Using these results, the Shift Engineer determines individual plant and system generating capacities. To aid the Shift Engineer to perform this important function, several software systems are used, one of which is called the Outage Request Form (ORF). ORF provides the Shift Engineer with the ability to gather, update, and archive the latest information on hourly maintenance schedules affecting individual plants, and unit capacities for several days ahead. ORF has been designed and implemented under the direct supervision of the Shift Engineers, with some technical aid from the team involved in development of STOM. d. Market Conditions Market conditions, in the form of forecast prices and market demand, are relayed from PowerEx to the planning and system operations engineers. For real-time operations, the market information consists of average demand for electricity, average spot prices, and available tie line capacities to the U.S. and the Alberta markets. The long term information on market conditions consists of opportunities for long term contracts and their prices. It should be noted that much research work still needs to be done on the marketing side of the business at PowerEx. In particular, research work is needed to forecast market prices and demand in the long as well as in the short term. e. Other Data In addition to the above data on inflows, load forecasts, unit outages, and market conditions, data on economic parameters, fuel prices and availability, system and individual component constraints, dam safety, environmental constraints, and other physical and operational data are taken into account in the planning process. iii. Planning Levels At each of the various planning levels, the engineers responsible for operational planning utilize simulation and optimization models to aid them in this complex task. The models are used to: • support operating strategy; and • aid the system operator in making informed decisions on the quantities and prices of electricity transactions, and on the amount of thermal generation required to meet firm domestic load and firm trade transactions, and on other discretionary opportunities. Results from the simulation and optimization models determine the operating schedules, and dispatch guidelines are issued to the real-time system control center. The following is a brief description of the various operational planning levels currently employed by B.C. Hydro (BC Hydro, 1993; personal communications). Figure 3.11 illustrates the current thinking at BC Hydro (as understood by the author) of the existing and planned operational 47 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment models and the information processes that integrate the models. The Figure does not include system expansion planning, and it only considers operations planning models. It shows the major information flows between models within the Power Supply Business Units, and between other business units in B.C. Hydro. a. Long-range System Planning Studies (5-30 years). Long-range system planning studies are concerned with developing plans for future system expansion. In these studies, two reliability criterion are considered: energy reliability must be greater than 99.2%; and peak reliability dictates that expectations of having insufficient generating resources available to meet the forecasted daily peak load should be one day in ten years, or less. Once these two criterion are satisfied, the time schedule of new resources can be altered to reduce the expected costs of serving the long-range domestic demand. The plan evaluates alternative resource acquisitions that minimize social costs, meet B.C. Hydro's objectives, and meet the economic development objectives of the Province. It incorporates information on available energy capabilities (including demand-side management), construction costs and technologies, operation and fuel supply costs, and environmental and socio-economic impacts. For more information on the long-term planning studies see the "1994 Electricity Plan" (BC Hydro, 1994). b. Long-term Operations Planning Studies (1-6 years in monthly time-step). Long-term operations planning studies focus on providing guidance for marketing decisions and for policies on operation of the hydroelectric system. Over the past decade, operations planning at B.C. Hydro has undergone a shift in thinking on how the system should be managed. The traditional approach followed what is known in the industry as critical period energy studies, which focused on energy quantities. Electricity price was considered secondary input to the planning process. The four-year critical period energy studies provide a test of current system conditions based on the lowest sequence of stream flows that actually occurred in the historical record. When the studies show that reliability of energy supplies is not adequate, non firm exports are curtailed, and purchases and thermal generation are maximized to maintain a reliable supply of energy to customers (for more details, see Chapter 5 and 6 in Christensen et al., 1988). 48 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment BC Hydro's Power Supply Business Unit Long-term Operations Planning: 1 - 60 months (Stochastic optimization and simulation models: The Williston and the Columbia MCM's) Reservoir volumes, system marginal water value System Price signals (Rbch) Medium/Short-term Operations Planning: 1 day - 52 weeks (Stochastic & deterministic optimization and simulation models) Reservoirs' marginal water values & storage targets Load-Resource Balance Scheduling System (Shift Office) Load-Resource Balance System (LRB): 1-168 hours (Generation/Load Balance and Hydraulic simulation) Optimized & Non-optimized Hourly schedules Unit commitment schedules r—r Operational input data Optimized generation & reservoir schedules - Physical & operational constraints, and facilities databases, - Load Forecaster (ANNSTLF), - Planned and real-time unit outages Real-time Scheduling: 1 -168 hours (STOM: Deterministic optimization and detailed simulation) Plant characteristics A ^ & optimal unit : commitment Generation Unit Sc heduler (GUS) Dynamic Unit Commitment (Algorithm to be determined) Static Plant Unit Committment (Dynamic programming optimization) Optimized spot trading schedules i Marketing information: prescheduled and spot trading, • forecast spot prices and available net tie line capacities BC Hydro's Marketing Business Unit (PowerEx) i Hourly pre-dispatch plant's schedules 1 Pre and Base Points (U&PBP's) , scheduled Economic Participation Factors (U&PEPF's)1 transactions Pre-dispatch unit commitment X , Actual Actual plant i trading generation, units & 1 schedules reservoirs status 4 •„-,„•••• r„ ,•„ mmsmmwm BC Hydro's Transmission & Distribution Business Unit System control Center (SCC) Real-time Energy Management System (EMS) control models: Automatic Generation Control (AGC) & Area Control Errot (ACE) @ 4 seconds • Hydro Generation Dispatch (HGD) @ 10 minutes Figure 3.11. Scheduling Problem Modeling Decomposition Hierarchy. 49 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Since D. Druce developed the Marginal Cost Model in 1986 and B.C. Hydro's started to use it, there has been a shift in thinking on the methods used for operations planning. The focus now a day is on the use of price signals to coordinate system operations. The Marginal Cost model is a stochastic dynamic programming optimization and simulation algorithm, developed in-house at BC Hydro. The model calculates the present value of water stored in the Williston Lake with the assumption that the reservoir is operated to balance system load and resources (Druce, 1989; Druce, 1990; Druce, 1994; Druce, 1998). The model incorporates information on inflows, load, and marketing. The state variables of the model are the storage level of the Williston Lake, the weather year, the water conditions in the U.S. Pacific Northwest (PNW) and export price conditions in the PNW. The decision variable is the monthly water release volume. Based on monthly weather patterns, monthly inflow volumes to the Williston are generated. A Markov model forecasts water conditions in the PNW and export price states with state transition matrices based on analyses of historical data. The Marginal Cost Model calculates the expected value of water stored in the Williston Lake for each storage level and month over the planning horizonOF 4-6 years and the reservoir marginal cost claculated from this water value function is used as a proxy for the long-term System Marginal Cost. The model also generates a probabilistic forecast of Rbch and of Williston Lake levels, spills conditions, discretionary sales (see d. below) and purchases and net revenue from electricity trade. The marginal cost is considered, by the operations planners, to be directly related to the ability to serve and the value of future export markets and is inversely related to the probability of spill at the Williston Lake. The model provides decision support for interruptible sales, import and export transactions. Operations engineers also use the marginal cost of water, along with current market prices, to determine the cost of unit outages and plant restrictions in the B.C. Hydro system. Other similar optimization and simulation models are under preparation for the Columbia River system and other reservoirs (personal communication from Mr. K. Ketchum and the planning engineers). The Columbia model will incorporate the complex Columbia Treaty and non-treaty storage conditions and is planned to be run in an iterative procedure with the Marginal Cost model to determine the optimal operation and marginal cost of the Columbia system. Until other optimization models are developed for river systems other than the Peace River, the current recommended practice is to estimate the marginal cost of water in other river systems. This is done by first estimating the probability of spill for other reservoirs using simulation models. Once the probability of spill at a reservoir is determined, the marginal cost for that reservoir is calculated by pro-rating the marginal cost of Williston Lake by the ratio of the probability of spill at the reservoir in question and Williston. Judgment is used to account for special reservoir constraints, such as the Non-Treaty Storage activities. The operations planning and system coordination engineers reflect differences in marginal cost between reservoirs in what is called the daily "Generation Schedule Preference Order" (see d. below for details). c. Medium/Short-Term Operations Planning Studies (next day-12 months) The medium/short-term operations studies focus on more detailed system analysis to determine hydraulic and generation schedules for reservoirs, generating facilities and interchanges for the next day, weeks and months for all generating facilities. Detailed information such as short and medium-term inflow forecasts, maintenance schedules, and electricity demand are considered in order to provide operational schedules and guidelines for real-time system operators. The guidelines are issued daily in the form of "Generation 50 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Schedule Preference Order" for all facilities. The Generation Schedule is produced by planning and system coordination engineers, and is issued to real-time generation system operators (the Shift Engineer). It includes instructions and guidelines on how the generating system should be operated and a stacking order for running plants (e.g., run the resource with the lowest cost first). It also includes spill and minimum outflow requirements, as well as unit outages and facility specific schedules and constraints. Experimentation with commercially based optimization models, such as the Small Reservoir Simulation Model (SRS) (Smith, 1997), as well as in-house development are underway to determine the usefulness of such models for short-term operations studies of this nature. In addition, discussions on the utility of using intelligent expert systems (Shawwash et al., 1998) to standardize and automate some of the short-term planning functions (e.g., spills, facility outage schedules and constraints) are underway. To aid decision-making, forecast system conditions, forecast inflows as well as real-time information are relayed to the planning engineers (see d. below for description of the SCADA and PI systems and a brief description on the Commercial Resource Optimization Project in Section 3.1.3). d. Real-time Operations Planning Studies (1 hour - 1 week in hourly time-step). The "Shift Engineer" performs real-time generation operations planning with the focus on day-by-day and hour-by-hour operation of the system. It is the most detailed of all planning study functions, as it deals with real-time aspects of translating the long and medium-term policies, strategies and guidelines, developed by other higher level studies, into actual implementation. The Shift Engineer follows closely the guidelines set out in the Generation Schedule Preference Order and utilizes information on discretionary opportunities. Discretionary opportunities arise if storage as well as generation is not tightly constrained -whether there is operational flexibility and surplus in the system, and when water can be stored for later use. With discretionary opportunities and "hot" market conditions, real-time operations engineers can "push the system to its limits" (both the maximum and minimum limits). To aid the planning process and the shift engineers in making decisions, system behavior is monitored through an extensive network of measuring devices installed throughout the B.C. Hydro electric system, to record and relay real-time information on unit generation, system load, reservoir levels and other operational aspects. This monitoring system is very complex, and utilizes, as its backbone, what is known in the industry as a Supervisory Control and Data Acquisition system (SCADA). The computerized data in this system is shared between the Power Supply and Transmission and Distribution business units on a real-time basis. It is relayed to the operators in the Shift Office and Transmission and Distribution control center to manage the system behavior remotely through a set of control devices distributed throughout the generation, transmission and distribution network. The Shift Engineer collects the computerized SCADA data and displays it on several computer screens using a commercially available, advanced monitoring system called the Plant Information system (PI) (OSI, 1996). The PI system was originally designed and configured to monitor oil well fields and petroleum refinery production units and it graphically display and update the instantaneous status of the production facilities. The Shift Office coordinates its activity very closely with the "System Control Center" (within the Transmission and Distribution (T&D) business unit) and with PowerEx (the power marketing subsidiary of B.C. Hydro). The T&D control centre loads individual 51 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment generating units using the Energy Management System (EMS) and other feedback control devices so that system loads and resources are balanced instantaneously. The transmission and distribution system is operated by the control center to meet two main objectives: security and reliability of the service. Economic criteria are secondary, and it enters the feedback-control function in the form of what is called in the industry as the Unit's and Plant's Economic Participation Factors and Base Points control functions (for more details, see Chapter 3 of Wood et al., 1996). The system control centre coordinate its activities with other members of the Western Systems Coordinating Council (WSCC), a group of electric utilities serving Western Canada and the Western United States, to ensure that disturbances in BC Hydro's system will not cause disturbances to other neighboring interconnected utilities. Coordination between PowerEx and the Shift Engineer Office is intended to set the short-term and real-time potential trading schedules. It should also be noted that PowerEx coordinates its trading activities very closely with the T&D control center to arrange for the delivery of its trading contracts. The Shift Office is the nerve centre for all generation activities in B.C. Hydro. It is responsible for directing the short-term operation of the hydroelectric and thermal generating facilities. The office works very closely with PowerEx's real-time energy traders who sell and purchase electricity in the spot and forward power markets in the US and Alberta. The office also prepares the daily and hourly generation schedules and coordinates its activities with long-term operations planning activities carried out by project planning and system coordination engineers. Using the hourly Load Resource Balance spreadsheet (LRB) that is linked to the Forebay Forecaster (FBFC) spreadsheet, the office updates and sends the hourly generation schedules to the System Control Centre for real-time dispatch and control of the generating facilities. To perform the duties in a timely manner, the function of the Shift Office has been divided into two activities: the first is concerned with planning for the next few days, and the second is concerned with real-time operations for the next few hours. The Shift Office manager and seven shift engineers who work in rotating 12-hour day and night shifts and between the two jobs, currently carry out the two functions. The Next Day Planner (NDP) performs planning for the next few days, while the Shift Engineer on day and night shift duty performs real-time operations. The NDP works regular office hours at B.C. Hydro's Edmonds office complex in Burnaby, alongside the project's planning and system coordination engineers. The NDP coordinates very closely with the projects' planning engineers to determine the energy budget and capacity available for dispatch from each plant for the next few days, and determines the potential electricity forward trade schedules. Long-term contracts however are determined by direct coordination between Power Supply system planners and PowerEx using outputs from long and medium term marginal cost optimization models as described in Sections a. and b. above. Several schedules are prepared and sent by the NDP to the Shift Engineer, and to PowerEx. These schedules reflect the preference order for running the generating system and are updated frequently. The NDP ensures that the prepared schedules are feasible operational plans. The Shift Engineers work 12 hour day and night rotating shifts in the Shift Office, which is located in PowerEx's offices in Downtown Vancouver, alongside PowerEx's real-time trading floor, which is also manned 24 hours. The Shift Engineer is responsible for monitoring real-time behavior of the generating facilities and for determining their real-time dispatch. He also determines the potential spot trading opportunities for the next hour(s), and 52 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment sends instructions to the System Control Centre for instantaneous control of the generating facilities. These instructions (in the form of what is known as Plant and Unit Base Points and Economic Participation Factors) direct the System Control Center on actual dispatch of the generating plants and units. To perform the above functions effectively, the Shift Office has been equipped with computers, numerous software programs, and display facilities that help the Shift Engineer to monitor the instantaneous behavior of the generating system. An extensive effort was undertaken since the creation of the shift office in 1996 to automate most of the functions that the Shift Engineer performs. These include automation of data acquisition and transfer routines, system planning and operation instructions, calculation procedures, and display facilities. It should be noted that the Shift Office manager and the Shift Engineers were directly involved in the design, computer programming and implementation of almost all of the computer systems and monitoring facilities they currently use in their daily operations. To be able to perform their duties efficiently, the Shift Engineer needs to integrate several inputs in order for effective decisions to be made: • Domestic load forecast; • Market forecasts (prices and demand); • Water supply forecasts; • Current and future conditions of the hydroelectric system; • Capabilities of the generating and transmission systems; • Operating costs and potential revenues; • Operational risks such as flooding, violation of water license limits, regulatory and environmental requirements and constraints; • Reliability and security of the overall electric system. Prior to the introduction of optimization techniques (primarily STOM) at the Shift Office, intensive use of simulation was utilized to determine generation schedules and reservoir operations. The simulations were carried out using two Excel spreadsheet models, which were designed and developed in-house by the Shift Office manager, the Shift Engineers and a team of supporting computer programmers, the Load-Resource Balance (LRB) system for balancing plant generation schedules with system load, import and exports; and the 96-Hour Forebay Forecaster (FBFC) for balancing hydraulic reservoir operations. Both models are linked and they contain routines for data acquisition and communication with other systems (PowerEx and the T&D System Control Center). The LRB is also equipped with extensive facilities to launch other software systems and to read results into the LRB and FBFC. Extensive use of these simulation models and the results obtained give the Shift Engineer an understanding of the hydraulic response to generation schedules in each river system. Using their experience and judgment, aided by the LRB and FBFC models, and rules-of-thumb to load generating plants, reservoir operations are determined by the following main steps: • The planned and real-time generating unit outages are determined. Based on these outages the available system generation capacity is calculated. To calculate the generating capacity a stand-alone software system was developed with the help of the team of researchers and programmers who participated in developing STOM. • The small generating plants are scheduled as per instructions in the Generation Schedule Preference Order (see section c above for details), the hydraulic response to these schedules is then determined, and a balancing act is performed to balance the 53 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment small reservoirs' water levels in accordance with predetermined spill instructions and reservoir level limits. The main variables used to hydraulically balance reservoir levels are the plant's generation, and sometimes spills, for each hour; • Prescheduled imports and exports from PowerEx are read by and inserted into the LRB; • The neural network model ANNSTLF calculates the forecast system load, and a quality and sanity check is then manually performed to correct for any deviation from observed trends of the actual system load. A simple spreadsheet model that traces the 5-minute moving-average of actual load is used to determine the most likely next hour system load. • Preliminary potential spot trading schedules are calculated in close consultation with PowerEx real-time traders. • The residual generation required for balancing load and imports/exports with generating resources available is then determined. Usually, the largest plants in the system (Mica, Revelstoke, G.M. Shrum, and Peace Canyon) are used to perform this balancing in accordance with the Generation Schedule Preference Order; • The regulating and operating reserve margins are then determined to ensure that there is enough available generation resources to meet fluctuations in load within the hour and to meet the WSCC's reliability criteria; • The final potential spot trading schedules are determined in close consultation with PowerEx's real-time traders. Consultation with PowerEx includes verbal communication of the current prices and demand in the Alberta and U.S. markets; • The balanced schedule is then communicated to the System Control Centre. A generation schedule covering a time-frame of 24 hours is communicated and updated every hour for security purposes; • Once the hour has ended, the previous hour's actual load, reservoir levels, plant generation, etc are updated; • The process is then repeated for the next hour. Planning system operations with these iterative techniques became more difficult as the market for electricity expanded and the problem became that of trading off the available resources in storage against the dynamic spot market for energy in the U.S. and in Alberta. Where previous options facing the engineer were essentially to run the generating facilities as reliably and as efficiently as possible and either to store or sell system energy, he now had the additional option of either importing or exporting the discretionary resources available. Given that option, the question of when discretionary resources should be sold or purchased and at what price, needed to be included in the planning process. In addition, the traditional operation norm was to maximize the efficiency of individual generating plants by using plant efficiency curves. No concern was given to maximize the efficiency of the system as a whole while also maximizing the revenues achievable. These questions were not easily answered because the incremental value of the surplus energy depends upon the volume sold from each reservoir, and system efficiency depends on how the system, rather the plants, are dynamically operated, let alone meeting the system constraints. Developing the correct answers to the above concerns had high economic value due to the rapid growth in the trading and pricing of electricity as a commodity. Every incremental unit of energy, and capacity, that could either be generated or stored to take advantage of market conditions was valuable. In addition, it was becoming apparent that the Shift Engineer could no longer take 54 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment time to perform routine calculations in a time-consuming iterative manner to completely analyze the options available, while also operating the system reliably, efficiently, and in-time to meet the next hour's schedule. Computerized analytical capabilities thus became necessary to enable the Shift Engineer to make timely and informed decisions. 3.2.5 Summary of Key Features of the BC Hydro Generating System Several key features of their hydroelectric generating facilities make the B.C. Hydro system distinct from other systems in the world. First, the large storage capability of Williston Lake on the Peace River and the Kinbasket, Duncan, Arrow reservoirs on the Columbia River ensure a sufficient supply of water for hydroelectric production throughout the year. Second, the Columbia River system Treaty and Non-Treaty storage, and the ice formation on the Peace River during the winter months impose restrictions on the operation of these systems. These restrictions "propagate" to influence the operation of almost all other generating facilities in the system. Third, the physical distribution of generating facilities across the Province provides for the very important reliability and security operational criteria for the transmission network. Fourth, with about 75 billion cubic meter of water storage capability, and the large provincial demand the generating system is capable of absorbing significant energy imports during low market price periods. The same energy can later be exported during high market price periods, sometimes to the same market it was purchased from. The only limitations are the tie line capacities to other markets, and the environmental, physical, and operational limits on minimum flow and generation requirements. Fifth, the generating system operated by B.C. Hydro is mostly hydroelectric. Hydroelectric generating facilities enjoy an important advantage over thermal generating facilities in that they can be shut down and re-started in very short times (few minutes). Thermal-generating facilities require lengthy start-up and shut-down procedures that can take few hours, or even days (in the case of nuclear generating units). Thus the costs of shutting down and starting up hydroelectric generating units are negligible in comparison with those for thermal and nuclear units. Finally, B.C. Hydro is one of the few utilities in the region (and in the world for that matter) enjoying large relatively low cost domestic hydropower resources, which gives it a competitive advantage over neighboring jurisdictions. 55 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment 3.2.6 Electricity Trade Operations i. Background B.C. Hydro has been trading electricity on a short-term basis for the past 20 years. Since its creation in 1988, PowerEx became the subsidiary of BC Hydro that is actively involved in electricity trade operations outside the Province of British Columbia. PowerEx is actively expanding its market share in the western U.S., in Alberta and more recently (1997) in Mexico. It operates as far east in the U.S. as Wisconsin, and as far south as Mexico to sell B.C. Hydro's energy surplus and other energy sources from the U.S. and Alberta. Energy surplus to the domestic needs of British Columbia is identified by the Power Supply Business Unit and is made available to PowerEx for trading operations. Recently the U.S. Department of Energy granted PowerEx the permit to export electricity from the U.S. into Mexico. In addition, in September 1997, PowerEx secured a Power Marketing Authorization from the U.S. (FERC), which has increased electricity trade opportunities for PowerEx, as it allows for the delivery of wholesale power sales and purchases directly in the U.S., rather than doing business at the B.C./U.S. border. PowerEx also is actively involved in recruiting large and small industrial customers to its pool of market share in the U.S. It should also be noted that PowerEx is not the sole exporter of electricity out of British Columbia. In 1991, the Independent Power Producers in British Columbia were allowed to negotiate directly with potential purchasers of electricity generated in B.C. Commercial exports of electricity follows the new policy of the provincial government issued in July 1993. The key features of this policy are (BCUC, 1995): • Utilities and the Independent Power Producers can participate in the export market. B.C. Hydro can only export through PowerEx; • Utilities in British Columbia will have the opportunity to bid on the power to be exported before it can be exported; • Security of supply for domestic customers should be assured before utilities can participate in export markets; • exports will not be subsidized by domestic consumers; and • all export projects will be subject to British Columbia's environmental standards. Due to high stream flows and good market conditions, electricity sold in fiscal 1998 totaled 56,500 gigawatt-hours, of which 23.3% represented out-of-province electricity trade. Real time electricity trade has increased about 20 fold since B.C. Hydro started their real time marketing operations in September 1996. The revenues from total electricity trade have been on the rise and accounted for about 13.5% of total revenues in 1998, up from an average of 5.5% for the previous five years (B.C. Hydro, 1998). The major factors that contributed to this increase are more active real time marketing due to the move of the electric industry in North America towards deregulation; integrating marketing with operations; and designation of shift staff for real time power supply operations and electricity trade. Figure 3.12 shows the growth in electricity trade revenues as compared to revenues from sales to domestic customers, and it also shows the growth in electricity generation for trade and for domestic purposes. 56 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment ii. Types of Trade Transactions in Electricity Markets Several types of trade transactions can take place in the emerging electricity markets. PowerEx primarily trades in the Alberta Power Pool and in the U.S. in the wholesale marketplace. At present, regulations prevent PowerEx from trading on the futures market. However, it is anticipated that this regulation will be changed in the near future. Generally, there are three main types of electricity transactions in the wholesale marketplace: Bilateral Contracts, Contracts-for-Differences, and Poolco bids. Both long and short-term bilateral commodity contracts are written between specific electricity producers, and are based on some form of competitive process. As prices in these contracts are fixed, this is considered a complete hedge against uncertainty. The Contract-for-Differences is similar to bilateral contracts with the exception that payments between parties are determined by the differences between the contract price and the spot price, and they are thus considered as "hedges" against the spot price. The Wholesale Poolco bid process requires that participating players submit their bids for specific trading period. This can take place a week, a day or even an hour ahead. The function of the Poolco operator is to arrange the bids received in order of lowest to highest bid to build the generation supply curve for the period in question. Based on the generation supply curve, Poolco dispatches the required generation facilities to meet the projected system demand, with consideration given to transmission and other system constraints. The price of the last and most expensive generator dispatched determines the pool price, and this is the spot price. Transactions are settled each hour, and all generators receive the spot price for their production in that hour, and are paid by the local distribution company. Under this system, producers and utilities can enter into Contracts-for-Differences. In April 1996, an active market for electricity futures developed on the New York Mercantile Exchange (NYMEX). In NYMEX, electricity is now traded as a commodity. The electricity contract is structured for 2 MW of capacity, for 16 hours-day, on each business day of the week to cover delivery of 736 megawatt-hour of firm energy per contract in a month. NYMEX provides futures market for electricity contracts written for delivery at two locations: COB and PV. COB refers to the California Oregon Border, while PV, refers to Palo Verde generation complex in Arizona. Although most of the contracts are not currently intended for actual delivery, a few are, which means that the futures contract prices and prices in cash markets converge at the delivery date. The value of these contracts is quoted daily in the Wall Street Journal, along with quotations from other commodity markets for two spot markets: COB and PV. The COB price index has varied considerably with daily and monthly price variations of 25%, and 200% respectively (Power Engineering, 1996). The futures contract prices at COB and PV are based on prices in these spot markets at different points in the future. The Alberta Power Pool prices are shown in Figure 3.13, while NYMEX futures market prices are shown in Figure 3.14 for COB. Figure 3.15 illustrates what is known in the industry as the Mid-Columbia (Mid-C) prices, which is indicative of electricity prices in the Pacific Northwest. It can be noted from the Figures that electricity prices are volatile as discussed below. 57 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment iii. Nature of Electricity Prices It is widely recognized that electricity prices are much more volatile than other commodities traded in NYMEX (and money markets for that matter) for several reasons (Douglas, 1997). First, electricity is not readily storable (aside from hydroelectric reservoirs), and there are no large-scale reserves to smooth out the peaks and valleys of hourly demand. Second, response to electricity demand should be instantaneous, otherwise disturbances and blackouts could occur. Thus generation in response to continuously changing demand leads to wide intra-day price swings. Third, low cost power in one region may not be available to meet demand in another region if a transmission network does not interconnect the regions, or the transmission network is of limited capacity. Fourth, weather conditions, affecting supply and demand for electricity in one region could considerably vary from season to season, and within the same season. Fifth, the electricity markets are recent phenomena, and prices for electricity, both for immediate sale and for sale in the future, are hard to establish. Sixth, the current players in the market are predominantly large-scale monopolies, who can "game" in the market to raise electricity prices significantly. For a full account of why energy markets are different from other market structures, see Pilipovic (Pilipovic, 1998). 58 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Figure 3.12. Growth in Electricity Trade Revenues 59 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment Source: Resource Management, BC Hydro, 1999. Figure 3.14. NYMEX/COB Electricity Futures prices 61 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 90 80 70 60 A x | 50 CO Z> 8 40 30 20 10 0 • Firm On Peak Prices ~i r 07- 05- 03- 02- 31-Jul- 28- 28- 26-Jul- 23- 23- 21-Jul- 18-Apr-96 Aug-96 Dec-96 Apr-97 97 Nov-97 Mar-98 98 Nov-98 Mar-99 99 Nov-99 Date Source of Information: Resource Management, BC Hydro, 1999. Figure 3.15. Mid-Columbia Electricity Prices. 62 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment iv. Major Benefits of Electricity Trade It is widely held that electricity trade improves the security and efficiency of electric systems. It also can provide significant additional revenues in predominantly hydroelectric systems during wet years, since surplus water can be stored in reservoirs. Electricity trade is enhanced by the fact that demand characteristics, type of generation, and climate in different regions vary. For example, during the summer months high demands for electricity in Southern California arise from the use of air conditioners, while demand in B.C. is low, and reservoir inflow is high, which means that a "hot" spot market can develop in the months of July and August in California. Another example is the high demand in winter months in Alberta, which arises from the use of electricity for heating purposes. This coincides with low demand in California and to some degree low demand in B.C. Electricity trade is also made possible because the B.C. Hydro transmission network is interconnected with transmission networks in Alberta, West Kootenay Power in southeastern B.C., the Alcan system in the North Coast, and the interconnected system in the western United States. Currently, the tie line to Alberta provides interchange capacity of up to 1100 MW, while the ties to the U.S. provide interchange capacity of approximately 3250 MW. Several conditions make electricity trade a viable option for utilities to consider. First, in wet years, surplus water stored in reservoirs can be used to generate and trade electricity in the market. Since B.C. Hydro possess considerable storage capability, surplus water can be stored and converted at a later date to electric energy. When storage capability is not sufficient to store the total volume of water inflows, then water is spilled, and the opportunity is lost. Second, in dry years shortages of generation due to low water levels can be compensated for by purchases of surplus energy from other utilities. Third, in emergency situations, electricity can be purchased from other utilities to provide backup power. For instance, if a number of generating units were suddenly put out of service, or when a major transmission line is de-energized for a fault or for other reasons, other neighboring utilities can be called upon to provide support to compensate for the loss. The procedures to reinstate these outages due to system disturbances are usually automated to prevent blackouts (or brownouts). Fourth, electricity trade can also be used to "time-shift" the generation of other systems that do not have reservoir storage and peaking capability -a key feature of hydroelectric generating facilities. Fifth, significant revenues can be earned through simultaneous sales to and purchases from other electric utilities (arbitrage). During the past few years, B.C. Hydro has realized significant benefits from electricity trade through coordination of its system operations with other utilities in Alberta and the U.S. It is widely held that these coordination activities optimize the interconnected system resources, increase its security and reliability, and that it provides significant financial benefits to British Columbia. Current coordination agreements exist between B.C. Hydro and West Kootenay Power, Cominco, Alcan, TransAlta Utilties in Alberta, and the Bonneville Power Administration. The main objective of such coordination agreements is to share the resulting cost savings. Three examples illustrate the benefits of such coordination agreements. First, due to the flexibility of hydroelectric resources, B.C. Hydro is able to rapidly change its generation levels to follow variations in load with almost no cost incurred. This is in contrast to purely thermal systems, where changes in generation levels can cause considerable increases in fuel costs. The coordination agreement between B.C. Hydro and the TransAlta Utilities exploits the flexibility of the B.C. Hydro system to import energy and 63 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment store water in reservoirs during off-peak hours at night and generate electricity and export it to Alberta during day peak hours. Second, due to different stream flow and runoff patterns, some neighboring utility, with predominantly hydroelectric system, could experience low stream flow conditions while B.C. Hydro's system inflows are higher. Altruism plays an important role under these conditions, where the water-rich utility could be called upon to support the water-poor neighboring utility. Third, storage agreements plays a major role in storing water surplus to immediate requirements for one utility located downstream in the same river system for more beneficial use at a later time. B.C. Hydro frequently acts as a water-banker to store water in the Columbia River storage facilities for U.S. utilities in the Pacific Northwest during May and June when stream flows are high in the Columbia River system. This stored water is released when it is more valuable to use. It should be noted here that operations of storage and hydroelectric facilities in the Columbia River system in the U.S. are much more constrained than the hydroelectric facilities on the Columbia River system in B.C. This stems from the strict environmental and regulatory constraints imposed in the U.S. These constraints severely limit one of the main features of hydroelectric generating systems -namely, their generating flexibility over other types of generating systems (e.g., nuclear and thermal). 64 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment 3.3 DECISION-MAKING PROCESSES AND DECISION SUPPORT SYSTEMS 3.3.1 Decision Making Approaches in Organizations Aside from engineering, decision-making approaches can be found in the fields of information technology, economics, operations research, management science, organizational behavior, and other fields of study. In their review of the state-of-the-art in the fields of operations research and management science, leading scientists in the field have recognized that one of the highest potential research areas still yet to be addressed include decision making in organizations (Simon et al. 1987a, p. 27): "Although the decision making processes of organizations have been studied in the field on a limited scale, a great many more such intensive studies will be needed before the full range of techniques used by organizations to make their decisions is understood, and before the strengths and weaknesses of these techniques are grasped." Concern over understanding the decision-making processes in organizations, and understanding the factors that should be considered in arriving at organizational decisions prompted the Nobel Prize Committee on economics to award the Nobel Prize in Economics to Coase in 1992. Coase argued that current methodologies in economics ignore important aspects of decision making in organizations such as transaction costs and the set of rules and regulations that organizations have to deal with in arriving at their operational decisions. A brief overview of available decision making methods and processes, and decision supports systems is given as background. 3.3.2 Historical- Development of Decision-Making Methods Although humans have been making decisions since the early days of their existence, decision analytical techniques and decision analysis methodologies are relatively new. For instance, many of the founding fathers of the field of decision analysis and the people responsible for developing the techniques are still alive today. It is well known that mathematicians and philosophers have long tried to develop formal theories and models that attempted to describe human behavior in decision-making situations. By the end of World War II the field of operations research advanced the scientific framework for problem solving and theories on military tactical problem solving emerged. The era also marked an accelerated trend towards automation and mechanization, with the aim at relieving humans of some of the mental and physical tasks they perform in their daily functions. By the 1950's and 1960's, developments in the fields of computer and operations research went hand in hand. What followed was the rapid development of specialized computers and computer applications tailored to solve the growing needs of management in complex industrial organizations. Operations research scientists and other researchers in the field of mathematical modeling have developed and refined algorithms and mathematical theories and attempted to apply them to industrial production processes. Since the 1980's, the new generation of computer technology (software and hardware) has allowed a convergence of the fields of information processing and 65 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Information Technology (Computer science) • Database and Data Acquisition Technologies • Artificial Intelligence Mathematics and Management Science • Simulation Models • Optimization Models • Multi-attribute Models • Decision Analysis Models Computer Hardware & Software Man-Machine Interface Decision Maker Adapted from Mitra 1987. Figure 3.16. Interactions between Science, Technology and the Decision-Maker for Solving Decision Problems mathematical modeling. The aim has been to create computer based tools which could help humans to make better decisions and to control complex processes in a timely fashion. The field of Artificial Intelligence (AI) is making notable advances that cannot be ignored, as Mitra elegantly captured it (Mitra, G. 1987; see also Simon, 1987b): "Many of us who come from otherwise traditional OR and management science backgrounds need to take into account a particular aspect of decision support tools which has led to the introduction of newly emerging artificial intelligence (AI) methods in a big way. The case is set out below in its essential form. Decision-making requires careful gathering and evaluation of facts, ascertaining relative merits of chosen alternatives and reasoning about consequences. In its widest sense mathematics is concerned with manipulation of information, problem representation and arriving at conclusions. This is achieved by reasoning about properties and deriving theorems that relate to a particular problem domain. Thus the mathematical inference procedure which can be based on alternative theories of logic is ideally suited to provide abstract representation as it captures the common denominator for a range of otherwise unrelated problems. In the normal course of events such abstractions only amounted to elegance and completeness until computers were really established as a major gadget in our working and private lives. ... A fundamental focus of AI research is decision-making application. Effective decision-making and supporting the decision-maker are also the major concern of management science and database technology. These taken together have led to the concept of a decision support system (DSS)." 66 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 3.3.3 Structure of Decision Support Systems A decision support system should form the link between the decision-maker and the technologies, methodologies and techniques that could be used to make decisions. Such an arrangement can be depicted in the generalized model shown in Figure 3.16. The model could consist of the following components: • The decision-maker, who is interested in finding a solution for the problem; • The man-machine interface that provides the means by which the decision-maker could communicate his/her preferences and values, and present the results of the analysis. Understandably, this interface consists of computer software and hardware; • The technologies capable of providing the information needed to perform the analysis and to make informed decisions; and • The methods and techniques suited for analyzing and solving the decision problem, and interpreting the results. Many believe that computers will play an important role in the automation of control processes of the routine type. The above model emphasizes the view that higher level decision-making will, now and in the near future, be made by human decision makers, primarily because they, through the exercise of their mental abilities, possess the only currently available means of integrating and interrelating information for which rational formulations are not yet possible, or are too expensive and cumbersome to build, or are very difficult to sell to end-users. Nevertheless, many routine control functions, which do not require human judgment, will eventually end up programmed as decision-making functions, particularly for real-time control of production facilities (e.g., control of generating units) and for interpreting and executing well defined operational procedures. 3.3.4 The Need for Decision Support Systems A valid question could then be asked as to why a decision support system is needed for planning the operations of hydroelectric facilities? To answer this fundamental question, one only has to consider the following points. First, deregulation of the electric industry all over the world increased the complexity of decision making problems, because the system operator is no longer only concerned with operating the system efficiently to meet the load, but also has to make tradeoffs that maximize the value of resources under their control, while respecting all of the physical and operational constraints. Second, the methods for hydroelectric scheduling have become fairly reliable and are becoming a necessary component of the daily operations of organizations. Third, computer technology (both hard and software) has become advanced and user friendly such that the average operator is becoming accustomed to and willing to use them. Fourth, the time spent on preparing the schedules could more productively be spent on other more important tasks (such as attending to emergency situations). Fifth, both the financial and operational risks are too high for any rational operator to handle unaided. Sixth, the hydroelectric scheduling problem is very complex and its solution requires several sophisticated computer models to be developed and linked in a coherent and conceptually correct approach. In managing a complex hydroelectric system, a set of policies, objectives, and operational procedures in an organization are usually formulated to direct the system operator in making 67 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment the day-by-day operational decisions. The operational procedures could typically reflect the policies and objectives of the organization and they could lay out rules and regulations, which in effect outline the way decisions should be made. Ideally, ground rules could be set to eliminate the shortcoming of human judgment under pressure, which is characterized by bounded rationality (Simon, 1979). Rational behavior, in this sense, is typified by a decision maker who has "well-organized and stable system of preferences and a skill in computation that enables him to calculate, for the alternative courses of action that are available to him, which of these will permit him to reach the highest attainable point on his preference scale" (Simon, 1955). Although Simon discards the idea that the behavior of organizations in choice situations fall far short of the idea of "maximizing" advocated in economic theory (see Baumol, 1977 Chapter 15), he clearly emphasizes the need to develop decision support systems intended to aid organizations to reflect their system of preferences, and to considerably speed-up computations to assess the set of alternative actions which permit them to reach the highest point on their preference scale. A decision support system can then be defined as a computer based application system that helps the problem "owners" to make decisions. The methods and techniques for constructing decision support systems are not the central theme of this thesis, as the topic is extensive and the subject of extensive research as discussed by Sprague et al. (1982), Bonczek et al, (1981), and Turban (1990; 1998). The central theme of developing decision support systems, however, is that people are not good calculators of the dynamic behavior of complicated systems, and that the number of variables that people can in fact properly relate to one another is very limited. This is true since the intuitive judgment of even a skilled operator is quite unreliable in anticipating the dynamic behavior of a simple system of perhaps five or six variables (Forrester 1992). Such limits in anticipating system behavior are true even when the complete structure and all parameters of a system are fully known. This notion of limitations on processing and computing abilities of human decision makers focuses attention on the need to develop a set of decision support tools to aid the decision maker in translating the sets of policies, objectives, procedures and ground rules laid out by the organization into operational decisions. Decision support tools can be in the form of mental models or mathematical models. Mental models can be in the form of cause and effect, where the observed cause can trigger an automatic, previously learned, response -as in the case of experienced hydroelectric system operator in flood situations. Mathematical models, on the other hand, rely on a set of predefined mathematical relationships that, depending on the level of detail desired, portray the structure and the way the system should be operated given the policies, objectives, and operational procedures. It is easy to see why mental models fail in meeting the sets of policies, objectives, and operational procedures. For instance, the long-term and short-term scheduling problem of a large-scale hydroelectric system offers a great array of operating alternatives. Numerous and sometimes conflicting constraints are imposed on reservoir releases, elevations, and other system variables. In addition, the system and the market characteristics and the operational goals are dynamic and change over time. To cope with the increasing complexity of the scheduling problem, a new approach that can provide guidance under current conditions, and for future situations in which past operation experience is not applicable, is needed. A hierarchy of the operational planning models could be developed in the spirit of decision analysis as elegantly described by Raiffa: 68 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment "The spirit of decision analysis is to divide and conquer: Decompose a complex problem into simpler problems, get your thinking straight in these simpler problems, paste these analyses together with a logical glue, and come out with a program for action for the complex problem (Raiffa, 1968, p. 271)." Chapter 4 details the structure of one of the decision support systems in the hierarchy of the operational planning models as outlined in Figure 3.11. The decision support system has been developed in the spirit of the model depicted in Figure 3.16 to accommodate the complexity of the decision making environment as discussed above, and to provide the needed (and required) link between the long and short-term operations planning for the B.C. Hydro system. 69 CHAPTER 4 THE DECISION SUPPORT SYSTEM In this Chapter the objectives of developing the decision support system are outlined. Then the user's requirements and design philosophy of the system are described, followed by a brief description of its main components and structure. Then a brief description of the hydroelectric systems modeled is given. This is followed by a detailed outline of the generalized formulation of the optimization mathematical model. 4.1 OBJECTIVES OF THE DECISION SUPPORT SYSTEM In operating a complex hydroelectric system in a competitive market environment the operational as well as the financial risks are high. Traditionally the main objective of the system operator was to secure a stable supply of electric power to meet the load demand while meeting the system's physical and operational constraints. The major driving force in making operating decisions was to ensure the availability of sufficient energy and capacity to meet the system demand while meeting the non-power requirements and operational constraints. Theoretically speaking, in a competitive electricity market industry there is always a price at which electricity can be either sold or purchased. Prices then become the major driving force in making operational decisions. Under such circumstances, any physical or operational constraints limit the ability of the system operator to exploit the full flexibility of the system and to maximize the value of the resources. The aim of the decision support system (STOM) developed in this thesis is to assist the shift and project engineers in improving the operational efficiency of the B.C. Hydro system and to make good operational and trading decisions while meeting the constraints. 4.2 USER'S FUNCTIONAL REQUIREMENTS AND DESIGN PHILOSOPHY Two very important components of the research reported on in this thesis are the determination of the user's functional requirements and the design philosophy of the decision support system. 4.2.1 User's Functional Requirements For STOM to be used effectively and reliably by its intended users in their daily operations, the following functional requirements were set out by the users: i. It should rely on a reliable and accurate database. The steps that were taken to meet this requirement are discussed in Chapter 5; ii. It should be easy to use. The steps taken to meet this requirement consisted of developing the Graphical User Interface, and the Results-Display Software -two of the components of the decision support system, as discussed below; 70 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment iii. It. could be run by any authorized user in the BC Hydro computer network. The steps taken to meet this requirement consisted of developing the computer communication protocols -a component of the decision support system, as discussed below;, iv. It should be fully integrated with the LRB system. The steps taken to meet this requirement consisted of coordinating with the Shift Engineers and computer support personnel to insert the required modules in the LRB system to extract STOM's input data. These steps are discussed in more detail in Chapter 5. It should be mentioned that the front-end of STOM, (the GUI) was designed to be launched from the LRB system, and the Results-Display Software is fully integrated and exports the results back to the LRB system -the main "workhorse" used by the Shift Engineer; v. It should closely model the current status of the system. To meet this requirement the most current information contained in the LRB system is read and transferred for use by the decision support system. Also a hydraulic simulator was developed, under the direct and close supervision of the author, to accurately portray the response of the system; vi. It should allow the user to dynamically select a set of plants for simulation and/or optimization studies. To meet this requirement the Graphical User Interface allows STOM users to select the river systems and generating plants they wish to include in the simulation and optimization study. In addition, the simulation and optimization mathematical models, and the solution algorithms, both allow the user to dynamically select one or more plants for either simulation and/or optimization studies; vii. It should complete the study for ten plants and for 168 hours in less than three minutes. To meet this requirement a sophisticated, state-of-the-art commercial modeling language and linear programming solver was obtained and a Windows NT network server is dedicated to run the optimization/simulation models. In addition, a fast hydraulic simulator was coded in the efficient C programming language. The linear programming model was also optimized to minimize the time required to run the model. It should be noted that the above functional requirements were not set at the outset of the research project. They were developed iteratively through time-consuming discussion and debate, as discussed in Chapter 5. 4.2.2 Design Philosophy STOM focuses on the user as the ultimate decision maker, who decides when to use it, how to use it, what analysis to perform with it, and whether to accept or reject its results. It was designed to give full flexibility to its user to dynamically formulate the problem they wish to solve and then solve it in the shortest time possible. The user has full control over all operational input data and the limits that form the optimization model's constraints. They also have control over some of the model's constraints, and the number of river systems and plants to be included in the simulation/optimization study. It was designed to be used as a decision support tool, to give insights into the complex nature of the decision problem, and not as potential replacement of its users. It also enables the user to select the time frame for the study, whether it is as short as one hour, or as long as 168 hours. The user also selects the objective function of the optimization process, be it to run the system to maximize efficiency or to maximize value of resources. 71 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 4.3 COMPONENTS OF THE DECISION SUPPORT SYSTEM STOM consists of six components: the LRB System Data Preparation Procedures, Data Saving and the Software that launch the GUI, the GUI, the Communication Protocols, the Simulator, the Optimizer, and the Results-Display Software. The optimization process is designed to be carried out on two workstations (see Figure 4.1 for schematic representation of the system): a personal computer client workstation that contains the LRB system, the GUI, the results-display software, and the client's network communication protocols; and a Windows NT Server Workstation that contains the Simulator, the Optimizer, and the server's communication protocols. The following is a brief description of these components. A detailed description of the optimization mathematical model is contained in Section 4.5. Annex C lists the software programs used in STOM and gives brief details of their functions. SHIFT OFFICE (Client Workstation) Monitors 1, 2, 3, 4, 5, 6, 7, 8 Monitor No. 9 Scheduling System Displays Graphical User Interface STOM Results Network Communication Protocols I NT SERVER WORKSTATION OPTIMIZATION MATHEMATICAL PROGRAMMING MODEL IN AM PL I T i CPLEX SOLVER . 1, , MUM MM , ___ L . HYDRAULIC SIMULATOR * * DATA & MODELS Figure 4.1. Main Design Features of STOM. 4.3.1 Data Preparation Procedures, Data Saving and GUI Launch Software Several steps should be followed to prepare input data for the simulation and optimization study. Full details on these steps have been included in the decision support system's "User's Guide" (Shawwash et. al., 1998), and were summarized in an instruction sheet as attached in Annex B. The following is a listing of these steps: 72 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment i. Prepare the LRB System Input Data a. Check the LRB schedules for errors in data (e.g., non-numeric inputs), b. Verify scheduled generation limits to ensure that the generating facilities capacities are not exceeded or are not in conflict with each other, c. Balance the LRB, to ensure that available resources could meet the load, d. Verify the reservoir's maximum and minimum operational limits, e. Verify the local inflows and spills for each reservoir, f. Verify the actual reservoir water levels for errors in input data, g. Update the unit outage schedule by running the Outage Request Form (ORF) software. Once ORF is run, a file that contains an hourly listing of a decimal representation of generating unit availability for each plant for each of the 168 hours is created. It should be noted that the above data preparation steps are of the routine type and that data in the LRB system is regularly checked and updated by the Shift Engineer. For this reason, the above steps do not constitute additional steps that need to be taken to run the simulation/optimization study. ii. Software to Write Input Data and to Launch the GUI Once the data have been checked and verified, the user can initiate the simulation and optimization process by simply pressing the "STOM" button in the LRB system. Once the "STOM" button is pressed input data is automatically saved at the Client's workstation, and the GUI is automatically launched. A Visual Basic/Excel routine has been inserted in the LRB to save the required input data, and to launch the GUI. This routine also performs a check on the input data for any obvious errors, such as non-numeric inputs. The routine writes out the input data to text files in special format such that the Simulator and the Optimizer models can read them. It also contains preliminary data checking routines that check if STOM has been properly set-up to run from the LRB system. If such errors were encountered, error messages are displayed to the user identifying the source of error. If errors in input data are found, a log file is then displayed to inform the user on the type of error and its location, and the run is aborted. If STOM was not properly setup, the user is advised to contact the LRB system computer support person to solve the problem. The data-saving code writes out STOM's input data as listed in Table 4.1. 73 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment Table 4.1. STOM Input Data Saved from the LRB System Contents (Number of hours or data records) Domestic Load on the BC Hydro System (168 Hourly values) Scheduled Total Imports (168 Hourly values) Scheduled Total Exports (168 Hourly values) Plant Maximum Generation Capacities (168 Hourly values/plant) Plant Minimum Generation Limits (168 Hourly values/plant) Plant scheduled Generation (168 Hourly values/plant) Reservoir Actual/Forecast Forebay levels (168 Hourly values/plant) Reservoir inflows (168 Hourly values/plant) Reservoir Spills (168 Hourly values/plant) Special and fish releases (168 Hourly values/plant) Spill releases through controlled gates (168 Hourly values/plant). Breakdown of the Imports/Exports and potential or actual net spot sales (168 hours for each type of exchange) Marketing information, listing the hourly spot prices and tie line capacities for the Alberta and the US markets (168 Hourly values/market. Thermal generation input parameters and limits. Physical and operational upper and lower reservoir forebay levels. Combo number, representing the units availability in each plant (168 Hourly values/plant) 4.3.2 The Graphical User Interface To arrive at the right design and functionality for a Graphical User Interface (GUI) the users must be fully involved in its design, and their requirements must be taken into account. Thus the GUI was designed and implemented in very close coordination with its users, as described in Chapter 5. To make STOM easy to use and to be responsive to user's needs and requirements, several functional features were included in the GUI to ease the following tasks for the user: • Select the river systems to be included in the simulation/optimization study; • Select the plants to be included in the optimization study; • Confirm the initial reservoir's forebay elevations; • Set the study date and the starting hour and the number of hours for the study; • Select the objective function for the optimization run; • Review marketing information: forecast spot prices, transmission tie-line limits; • Review marginal value of energy and target elevations for reservoirs; • Set operating reserve and regulating margins; • Set additional, optional, operational constraints and limits; and • Launch the simulation/optimization process. To make the process user friendly, the GUI is coded in Visual Basic and is launched from a button in the LRB system, as described in Section 4.3.1. Computer coding of the GUI in 74 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment Visual Basic was initially carried out by a group of Electrical Engineering/Computer Engineering students, from U.B.C, who also developed the communication protocols as part of the requirements for EE 475 fourth-year course project (Hwang et. al., 1998). Since its original design, several revisions were required to reflect user's preferences and requirements. Figure 4.2, illustrates the front-end of the current version of the GUI. A detailed description of the its main functional features is attached in Annex D. I Optimizer/Simulator Plant Selection River Systems F Peace GMS (661.42 PCN 1501.87 F The Columbia River System F Columbia MCA |728 94 REV \57lF I- Kootneay F PendOreille SEV ^2472 WAN U61.95 F Campbel SCA 1215.78 LDR 1178.04 JHT H39 I- Jordan River F F r r r r r r F F F F r F Stave I- Coquitlam F Bridge F Ash F Cheakamus F Clowhom F Puntledge r F Wahleach IIHI99 ALU f^TTF SFL J73.3 RUS JJi-Tf LAJ |72S.7S BR JG33G8 SON 1236.22 ASH 1329.36 CMS (371.2 COM (4JI7 WAH 1629.44 IE Plants Hevatmn Optimized River Systems Plants clfSL Optimized r r r r F F r F r F r F Start Date (04-15-1998 Start Hour No. of Hours (155 No. of Plants Objective Function Min_QCF Min QCF De-select Al Options OK Exit/Cancel Figure 4.2. STOM Graphical User Interface 75 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 4.3.3 The Communication Protocols As outlined by the user's functional requirements, it was required that STOM could be run by any authorized user in the B.C. Hydro computer network. The rationale behind this requirement is that running the simulation/optimization process on the workstation, which contains the LRB system, is impractical, for several reasons. First, to run the LRB system, considerable workstation system resources are required and therefore, a single workstation was incapable of efficiently handling the complex mathematical models developed. Second, the optimization process is a time- and memory-consuming process, and therefore it was not tolerable for the LRB workstation to be occupied exclusively by the simulation/optimization process for any length of time. Third, the method of launching STOM is at a DOS prompt, while the LRB is running in the Windows 95 environment. Switching between environments is time consuming and cumbersome and could hinder the stability of the workstation. Fourth, the Shift Office is located in two different buildings (Edmonds and Downtown). To enable the Shift Engineer to run STOM from wherever he is located, it was required that a central server be used to run the simulation/optimization process. Fifth, future developments of STOM entails use of the system by many other users (project planning engineers) who have access to the B.C. Hydro computer network. A solution was needed to the problem of distributing the computation workload over the network-computing environment. In consultation with the B.C. Hydro computer network engineers and the end-users of STOM, the solution arrived at was to design STOM in such a way as to launch the simulation/optimization process from the client (LRB) workstation and run the simulation/optimization models on a dedicated network server. Once the Shift Engineer submits the run, they can continue with other tasks while waiting for the results to be formatted and displayed at the LRB workstation. The above requiremens necessitated development of two communication protocols: the client, and the server communication protocols. The communication protocols are coded in C and Visual C++ to perform remote procedure calls, to transfer input and output data, and to initiate and terminate the optimization process. The communication protocols automatically transfer input data and commands between the client workstation and the NT Server workstation (see Figure 4.1 for layout). Once the client communication protocol is activated by the GUI, it compresses input data files generated by the LRB system and the interface, and it then calls the NT Server by utilizing a remote procedure call. If the NT Server and the CPLEX software are available, then the client's protocol transfers the data and signals the server's communication protocol. However, if the NT Server is not available it queues the call and keeps trying until the NT server is freed from other runs, or it terminates after several trials if the Server was not available. The client's communication protocol is kept running at the client's workstation waiting for a signal from the server protocol. Once signaled, the server's communication protocol issues two instructions. The first instruction is to decompress the client's input data and distribute it into designated directory structure at the NT Server. The second instruction passes a DOS argument that launches the AMPL modeling session and invokes a script-text file, which relates to the objective function selected by the user, in the AMPL syntax. At the NT Server, the overall process is controlled by the AMPL modeling language (Fourer, 1993). Once the simulation/optimization process is complete (when the AMPL session ends), the Server's communication protocol calls the client workstation, compresses and transfers 76 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment output data. When the transfer is complete, the client's protocol takes over, launches the Results-Display Software and then terminates itself. For more details on implementation considerations with the communication protocols see Chapter 5. B.C. Hydro currently holds a one-user license for AMPL and CPLEX software systems. For this reason, if more than one client attempts to simultaneously access the NT Server, a signal is sent to the client's protocol to indicate that the server side is busy performing an optimization run or is unavailable, if the server has been taken out of service. The client's protocol tries to reestablish connection with the NT Server for up to ten times with 10 seconds intervals between each attempt. If the server is still busy, it then quits, and informs the user that the server is not available. The communication process log is saved to a text data file that contains the activities carried out by the protocols, and can be accessed for debugging purposes. One other important design feature of the communication protocols is that they are portable to any client, or network server workstation that supports remote procedures calls. This has been accomplished by requiring that the protocols be machine independent, and that the communication procedures and default settings are all specified by default configuration files. The communication protocols were developed by a team of students from the Electrical Engineering Department/Computer Engineering, U.B.C, as fourth year project for their EE 475 course, under the supervision of Dr. W. G. Dunford. Further technical details on the communication protocols can be found in Hwang et al., (1997). 4.3.4 The Hydraulic Simulator As outlined by the user's functional requirements, it was required that STOM should closely model the current status of the system and that it should complete the simulation/optimization run in the shortest time possible. To satisfy these requirements and B.C. Hydro's needs, the hydraulic simulator (Ristock et. al., 1998) was developed in house under the direct supervision of the author and B.C. Hydro operations engineers. Work on the simulator started at the early stages of the research project. The early stages involved collection and screening of physical input data, and developing an understanding of the hydraulic properties of the hydroelectric systems modeled. Later stages included coding the simulator in the C programming language and improving its accuracy and algorithmic correctness. More details on development and implementation of the simulator can be found in Chapter 5. The simulator follows a modular design in that each of its main routines are included in a separate module. Several modules are linked to form a coherent single application: the simulator. This feature allowed easier debugging and modification to the cumbersome and extensive C code. It also allowed some modules to be easily adapted for other applications and uses within B.C. Hydro. For example the module that calculates plants' generating capacity was later integrated into the LRB system to calculate the capacities of generating plants as a function of their forebay elevations. The hydraulic simulator models the hydraulic system and calculates the physical and operational limits of the hydroelectric facilities. For each hour in the study, it hydraulically models upstream inflows and outflows using the mass balance equation for each reservoir. Inflows can be of any combination: upstream spills, turbine flows, and local river or tributary 77 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment inflows. Outflows consist of turbine, spill or special release outflows (e.g., required fish and other releases). It then computes the resulting storage and converts it to forebay elevation at the end of each hour using storage elevation tables. The simulator also calculates maximum and minimum turbine discharges and maximum generating capacity for each plant. It also performs checks on elevation, discharge, and generation to determine if any operational or physical limits have been violated. The simulator can run as a solo application (i.e., without the Optimizer) if no plants are selected for optimization in GUI. This feature allows the Shift Engineer to simulate the response of the hydraulic system to generation schedules and determine forebay elevations as well as generation and discharge limits. The simulator writes out the simulation and optimization results to a text output file that is transferred for display by the Results-Display Software. Figure 4.3 illustrates sources of data and the links of the simulator to other components of the decision support system and to other B.C. Hydro information systems. The simulation algorithm is illustrated in Figure 4.4, and is outlined in Annex A. The simulator was developed by a number of graduate students and research assistants from the Civil Engineering Department, U.B.C, under direct supervision of the author and operations engineers at B.C. Hydro. Further technical details on the simulator can be found in Ristock et al., (1998). 78 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 'Operational Data Files PDSS Data BC Hydro Data Bases Gate Position & Stat Release Extraction Program (VB) StatRlse.dat GatePosn.dat PFMS Data Conversion of PFMS to Outage data Outage.exe (C) Client Workstation Hard Drive Temp storage of Operational data Network Communication Protocols Transfer of dataa . - initiation and -termination of Sim/Opt processes JJT Server Hard Drive Temp storage of Operational data Permanent storage of Physical data 0 utage.dat LRBfb.dat Oplimits.dat Control.dat User Overrides (Emin, Emax, Qmin, Qmax) CF.dat Price.dat Price.dat CF.dat Export/ Import Spot Data Optimizer Results Output1.dat Sensitivity An^lys data Sim/Opt GUI (VB) Simulator Results: Output2.dat Optimizer (AMPL, CPLEX) FBsim.dat Gendat Physical and Operational Data Files** Simulator (C) "'Intermediate Results and Data (OptData Files) Simulator/Optimizer Data Flow: General Arrangement Source: Ristock et. al., 1998 Figure 4.3. Simulator/Optimizer Data Flow General Arrangement 79 A Decision Support System for Realtime Hydropower Scheduling in a Competitive Power Market Environment Start Initialize Variables and Structures Read Input Data Calculate Initial Storages Check Initial Elevations are within limits For Hour = Starthour to Nhours Do For Plant = 1 to Nplants Do Convert Generation to Discharge Calculate all Non-Turbine Releases Calculate Total Inflow Calculate Total Outflow Calculate New Storage via Mass-Balance Equation, convert to New Forebay Store Breakpoint Data for the Optimizer Check that New Forebay is within Limits Perform Tailwater Calculations (in future...) Calculate Minimum Plant Generation and Discharge Calculate Maximum Plant Generation and Discharge More Hours More Plants No More Hours Read Import, Export, and Load Files; Calculate Residual Load Calculate Residual load, Write Load oth.dat File Solo Simul'n Read Files HK.dat, CF.dat, and Price.dat Format and Write Data Files for the Optimizer Write Results to Output2.dat End No More Plants Figure 4.4. The Simulator Algorithm Flowchart. Source: Ristock et. al, 1998. 80 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 4.3.5 The Optimizer The Optimizer uses linear programming techniques with two software packages: the AMPL (Fourere, 1993) mathematical programming language, and the CPLEX solver (ILOG, 1998). Details on the mathematical programming formulation, the AMPL modeling language (Fourer et. al., 1993), the CPLEX solver, and the solution algorithm can be found in Section 4.5. 4.3.6 The Results-Display Software As outlined by the User's Functional Requirements, it was required that STOM should be fully integrated with the LRB system, and that it should be easy to use. The Results-Display Software achieves part of these requirements. The Results-Display Software has undergone several phases of development as discussed in Chapter 5. All Shift Engineers have participated in the design of the graphic displays and in selecting the format of output data. The software is coded in Visual Basic for Excel to be compatible with the LRB system. It is designed to be launched by a simple Visual Basic program that is activated once the client's communication protocol receives the signal from the NT Server communication protocol that the simulation/optimization run has been completed. The Results-Display Software consists of several spreadsheets: the generation summary, the individual plant sheets, the numeric output results from the simulator and the optimizer, and a sheet that displays the optimal unit commitment used in the optimization process (See Annex F for graphic displays). The generation summary sheet lists the optimized generation schedules for all optimized plants in the study. It also lists the residual generation from all other plants along with prescheduled exports and imports, and the energy gain (as compared to the LRB schedule) resulting from the optimization run. These indicators are used as measures of the effectiveness of the optimization run, and are dependent on the objective function chosen by the user. For example if the user has selected the maximum efficiency objective function, then the energy gain measures the difference in energy use between the LRB schedule and the optimizer schedule. The energy gain in this objective function represents the amount of energy stored in reservoirs as a result of running the optimization routine. If, however, the objective function was to maximize energy production while fixing reservoir storage levels to those scheduled by the LRB, then the extra power gained would represent the extra energy that could be generated and probably sold in the market with the same amount of water used. If the maximum profit objective function is used, energy gains (or losses) represents both the gains in energy as a direct result of improved system efficiency and from increased (or decreased) energy transactions. Under this objective function the summary sheet also lists the optimized net trading transactions to Alberta and to the U.S., along with other data. In the summary sheet, several graphic displays gives the user the feel of the distribution of the optimized generation as well as the prescheduled and optimized trading schedules, and the residual and total domestic load. In addition, another graphic display illustrate the gainers and the losers in total generation over the optimization run. If the "Maximize Profit" objective function was used, an additional graphic display illustrates the distribution of spot prices and the optimized net spot sales in the U.S. and Alberta markets, in one display. 81 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment In addition to the summary sheet, for each plant included in the simulation/optimization run a separate sheet is dynamically created to numerically and graphically display the output results. For each plant the output data, shown in Table 4.2, is listed and charted for each hour in the study for the user to review. To make it easier for the user to quickly assimilate output data, a coloring scheme, has been used to indicate the optimized, LRB scheduled or actual data (when historic schedules are used). It was found that these made it much easier for the Shift Engineer to quickly identify the differences between the LRB and the optimized schedules. It also makes assimilation of the massive amount of data easier for the user. The other advantage of having a separate sheet for each plant is that the user can quickly move from one plant to the other to compare details of the generation schedule for different plants, or to display charts for two plants simultaneously. The users rarely use the sheets that contains the numeric output results, but they were kept to assure users that output from the simulation/optimization models is directly available if needed. In addition to providing a user-friendly display environment, the Results-Display Software is equipped with other features to make it easier for the Shift Engineer to navigate individual sheets. For example, to move from the chart that displays the forebay levels, all the user has to do is to click on the chart itself or on a button to display the generation schedules chart, and again to display the total plant discharge chart. In addition, a chart-zoom facility has been provided to scale the chart's axes to display finer details of the output data. These issues may seem trivial to most people, but they were found to be very important in getting the decision support system accepted and used by the very busy operations engineers working a 12-hour day and night shifts. In addition to scheduling generation for plants, the Shift Engineer is also responsible for deciding which units are to be switched on or off at each plant and for each hour. To aid the Shift Engineer in this task, the Results_Display software contains a sheet that lists the optimal unit commitment used by STOM to define the generation production function (see Section 4.5 and 4.6 for more details). This display helps the Shift Engineer to compare STOM's results with those from other unit commitment software systems (e.g., the Static Plant Commitment Program (SPUC) and the Dynamic Unit Commitment (DUC)) used to dispatch units in real time operations. 82 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Table 4.2. Output Results Displayed to the User Plant ID Name Hour Optimized Generation (MW) LRB Generation (MW) Minimum Generation (MW) Maximum Generation (MW) Optimized Forebay Elevation (M) LRB Forebay Elevation (M) Actual/Calculated Reservoir Level (M) Minimum Forebay Elevation (M) Maximum Forebay Elevation (M) Optimized Plant Discharge (CMS) LRB Plant Discharge (CMS) Optimized Turbine Discharge (CMS) LRB Turbine Discharge (CMS) Minimum Plant Discharge (CMS) Maximum Plant Discharge (CMS) Local Inflow (CMS) Total Inflow (CMS) Spill (CMS) Total Outflow (CMS) 83 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 4.4 HYDROELECTRIC SYSTEMS MODELED The current version of the decision support system provides the optimal hourly generation schedule for the river systems and hydroelectric facilities listed in Table 4.3. Table 4.3. River Systems, Reservoirs and Plants Modelled River System Plants Generation Capacity (MW) The Peace G. M. Shrum (GMS), Peace Canyon (PCN) 3,430 The Columbia Mica (MCA), Revelstoke (REV) 3,840 The PendD'Oreille Seven Mile (SEV), Waneta (WAN) 954 The Stave Alouette (ALU), Stave Falls (SFL), Ruskin (RUS) 163 The Bridge Lajoie (LAJ), Bridge (BR), Seton (SON) 548 The Cheakamus Cheakamus (CMS) 155 The Clowhom Clowhom (COM) 33 The Wahleach Wahleach (WAH) 60 The Campbell Strathcona (SCA), Ladore (LDR), John Hart (JHT) 229 The Ash Ash (ASH) 27 Total 9,439 These represent approximately 83% of the total generating system capacity (hydro and thermal), and about 91% of the total hydroelectric system (see Table 3.1 for comparison). The only three major hydroelectric systems that are not currently modeled by STOM are the Kootenay Canal (528 MW), the Jordan River (170 MW), and the Buntzen (72 MW) systems. The main reasons for not including these are the unavailability of operational input data required and incomplete representation in the hydraulic simulator. However, once the operational input data and the algorithm to hydraulically simulate these systems are available, it will be very easy to include them in the optimization model. Annex G contains a brief description of the main operational features of the hydroelectric systems currently modeled by STOM. 84 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 4.5 MATHEMATICAL MODELING OF GENERATING FACILITIES Considerable thought, discussion, study and analysis was conducted before the generalized mathematical model described herein was formulated. It involved issues such as the nature and complexity of the hydroelectric systems to be modeled, user's expectations and their functional requirements, the goal of the decision support system and how it will be used in real-time operations. It also included consideration of how the model could evolve to consider other modeling aspects that B.C. Hydro may wish to include in the future. The main dilemma was how to build a model that could be formulated dynamically without having to significantly revise its structure every time the user wished to run a different combination of river systems or for a different study duration. These issues are addressed in Chapter 5. However, one can easily realize the great benefits from formulating a generalized model. The mathematical model described herein exploits recent advances in the algebraic modeling languages by formulating the model in a semi-network structure as outlined below. 4.5.1 Hydraulic Modeling of Reservoir Operations i. Representation of Hydroelectric Facilities A typical hydroelectric generation system consists of sets of rivers, tributaries, reservoirs, powerhouses and additional hydraulic facilities such as intake structures, spillway gates and weirs, as described in Annex G. A river system may contain one or more generating facilities that could be connected serially or in parallel. Serially connected facilities are hydraulically connected, because discharges from a hydroelectric facility constitute a part of the inflows to the downstream facilities. River System Type II and River Systems Type I in Figure 4.5 illustrates this. Two river systems could also be hydrologically coupled, because discharges from one facility in one river system could constitute some of the inflows to one or more facility in other river system as illustrated in Figure 4.5 for River Systems Type I. In addition to hydrologic coupling, hydroelectric facilities are coupled dynamically from one time period to the next, because decisions on flow releases made at any time period and location affects decisions on flows in other time periods and at other locations in the study. Inflows to reservoirs may be natural or modified by the operation of an upstream plant. Aside from hydropower generation, hydroelectric facilities are also operated to satisfy discharge requirements according to certain rules that are set by environmental, regulatory, navigation, and long-term planning requirements, as discussed in Section 3.3, and Section 4.4. Figure 4.5 illustrates a typical setup of rivers and reservoirs for a hydroelectric generating system containing two river systems. 85 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Figure 4.5. Schematic of Typical River Systems with Reservoirs and Hydroelectric Facilities. To capture the complex nature of inflows to and from reservoirs in the B.C. Hydro system, a matrix structure has been used to describe flow sources and destinations. Several incidence matrices were used to describe the turbine and spill discharges and inflows from or to reservoirs as follows. The QTRjk and QSRjk matrices describes the turbine and spill flows from hydroelectric facility j to hydroelectric facility k (j e J, k e K: j = k). The index k represents the rows in the matrix while j represents the columns. Other matrices were used to describe the turbine UQTjk and spill UQSjk hydroelectric facility's inflows from facility j to facility k (j e J, k e K: j * k). An entry of '1' in the matrices indicates that a physical flow occurs from or between reservoirs, while '0' indicates no flows. These simple, yet powerful, descriptions of the system have allowed modeling of very complex patterns of flows between reservoirs. It also allowed the model to be formulated dynamically as will be discussed in Chapter 5 (Section 5.1 and 5.2). 86 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment QTRjk = j y' + i j + 2 • • • J-l J k 1 0 0 •• 0 0 k + \ 0 l 0 • •• 0 0 k + 2 0 0 1 •• 0 0 K-l 0 0 0 • •• 0 0 K 0 0 0 1 QSRjk = j 7 + 1 j + 2 • • J-l J k 1 0 0 • • 0 0 k + \ 0 1 0 • 0 0 k + 2 0 0 1 • 0 0 K-l 0 0 0 1 0 K 0 0 0 • 1 (4.5.1.1) (4.5.1.2) In the QTR^ matrix shown above, the index j and k represents the same facility, which gives rise to a square matrix. A turbine outflows from facilities j, j+1, and J are also discharged from facilities k, k+1, and K respectively. As the value in the matrix that corresponds to facility (J-l, K-l) is "0" in QTRjk, there is no turbine discharge from the facility. A similar matrix was used to describe spill discharges from hydroelectric facilities, QSRjk- Note that there are spills from plant (J-l, K-l), since the corresponding value in the QSRjk matrix is "1". UQTjk = j 7+1 j+2 k 0 1 0 k+\ 0 0 0 k+2 0 0 1 K-l 0 0 0 K 0 0 0 j — i J 0 0 0 0 0 0 1 1 (4.5.1.3) 87 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment UQSjk 7 7+1 7+2 J-l J k 0 0 0 • • 0 0 k + \ 0 1 0 • 0 0 k + 2 0 0 1 • 0 0 (4.5.1.4) K-l 0 0 0 • 1 0 K 0 0 0 1 Matrices describing a facility's upstream inflows (excluding stream inflows) are arranged similar to those in facility's outflows. Note that the facility's inflows can originate from one or more facilities in the system. For example, in the UQTjk matrix, facility K-l receives turbine discharges that originates from facility J-l and J, while facilities k+1 and K receives no upstream turbine discharges. u. Modeling Turbine and Spill Operations Total spills from a reservoir at time step t consist of fixed (QSFkt, t e T), spills and variable spills (QSkt). Fixed spills satisfy regulatory and non-power requirements, while variable spills depend on the reservoir's storage level, and are expressed in the model as a piecewise linear penalty function of the reservoir's storage (5V,): as follows: QSk, = f(Sk,). (4.5.1.5) The spill characteristic for a reservoir is modeled as a one or more segment piecewise linear curve, as shown in Figure 4.6. The number of segments depends on the physical characteristic of the free spill structure (free spill weir or spillway structures), or could be specified by the user to reflect a certain spill policy once a reservoir is at a certain storage level. The AMPL modeling language facilitates concise description of such piecewise linear Variable Reservoir Storage, Ski Figure 4.6. Spill Characteristics for Storage Reservoirs 88 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment functions, as described in Annex G. The spill characteristic described in Figure 4.6 indicates that as long as the reservoir is within the first storage zone, S\h there will be no spills. However, once the reservoir storage increases above the first storage zone, the slope of the piecewise linear curve that corresponds to the S2kl segment will determine discharges in the QS2k, spill zone. In the AMPL modeling language, the user specifies the slope of the segments, the breakpoints of the piecewise linear curve in the reservoir storage axis, and the intercept of the curve with the spill axis in one equation. Such concise descriptions of piecewise linear functions makes approximating such non-linear, convex, relationships very convenient for generalized model representation. ' Turbine and spill variable flows from a reservoir at time step t (RTjkl, RSjkt) are directly substituted in the model by the turbine (QTkt) and spill discharges, RTjb = QTkt * QTRjk, (4.5.1.6) RSjb = (QSk, + QSFh) * QSRjk. (4.5.1.7Similarly, the turbine and spill inflows to a reservoir (UTjkt, USjkt), are directly substituted in the model, UTjb = QTkt * UQTjk (4.5.1.8) USjk, = (QSk, + QSFkt) * QSRjk. (4.5.1.9Direct substitution of variables and parameters is an important feature of the AMPL modeling language, as discussed in Section 4.1. It reduces the problem size and accelerates the solution time required to solve the problem considerably. Turbine and spill discharges could be limited by maximum turbine and spill discharges (gr%f, QSMaxkl), and minimum (QT^inkt, QSMinkt) allowable limits. These limits are represented in the model as, QTMmk, < QTkt < QTMaxkt, (4.5.1.10) QSMinkt < (QSFh + QSkt) < QSMaxk,. (4.5.1.11In addition, the total discharge from a plant could be limited by the maximum (QPMcv<kt) and minimum (QPM'"kd plant discharge limits. These limits are represented in the model as, QPMink, < QPk, < QPMaxk,. (4.5.1.12) where (QPkt) is the total plant discharge, which is modeled as, QPk, = QTkt + QSk, + QSFkt. (4.5.1.13The plant discharge limits are either specified by the user (in the GUI), or are the results of other operational constraints that are calculated by the simulator and used in the optimization model. For example, the simulator calculates the minimum plant discharge limit by taking the maximum value of the following limits: • the total of minimum turbine discharge, that corresponds to the minimum plant generation, and the fixed spills (QSFkl), • the minimum plant discharge, if specified by the user in the GUI, • the minimum plant discharge as specified by the system operating order, which is a document that specifies the operational rules to be followed by the hydroelectric system operator. These includes consideration of minimum fish and fish habitat flows, channel hydraulics and stability (e.g., during ice formation in the Peace River), as well as for environmental (e.g., dilution of contaminants) and aesthetic reasons. The simulator also calculates the maximum plant discharge limit by taking the minimum value of the following limits: 89 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment • the total of maximum turbine discharge, that corresponds to the maximum plant generation, and the fixed spills (QSFkl), • the maximum plant discharge, if specified by the user in the GUI, • the maximum plant discharge as specified by the system operating order. These include consideration of maximum fish and fish habitat flows (e.g., to prevent damage to fish eggs during the spawning season), channel hydraulics and stability (e.g., scour), as well as for environmental (e.g., flooding of wet areas), aesthetic and flood control reasons. iii. Modeling Reservoir Operations The hydraulic continuity equation for a typical reservoir storage in m /s-day, and for natural river inflows (NRIkt), turbine and spill flows in m3/s, can be written, Sk(, + i) = Sk, + (-Z j=, RTjk, - Zj„, RSjk, + ZJJml UTjk, + Z -=l USjk, + NRh<) 124 . (4.5.1.14) The upper and lower reservoir storage constraints limit the storage variable to the range bounded by the maximum (SMaXkt) and minimum (SM"'k,) allowable storage levels (see Figure 4.7), and is modeled as, SMink,<Sk,<SMaxk,. (4.5.1.15) As discussed in Section 4.3.2, the GUI allows the user to interactively impose a set of additional optional constraints in the model. One such constraint is used to fix the reservoir's storage at the last time-step (7) to the planned storage level (SLRBkT), which is determined by simulating the LRB generation and reservoir's inflows and outflows, Skr = SLRBkT. (4.5.1.16) The forebay level of reservoirs (FBkl) can be expressed as a function of reservoir storage as illustrated in Figure 4.7, and is modeled as, Reservoir Storage (m3/s-d), Ski Dead Storage Storage Piecewise Linear Curve Sk, =f(FBk/) Forebay Level (m), FBk, Turbine Intake level Figure 4.7. Forebay Level as a Function of Storage FBk, = f(Sk,). (4.5.1.17.a) Alternatively, reservoir storage can be expressed as a function of the plant forebay as 90 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment illustrated in Figure 4.8, and described in the model as, Sk, = f(FBk,). (4.5.1.17.b) Equations (4.5.1.17.a) and (4.5.1.17.b) are expressed in the model as piecewise linear functions as illustrated in Figure 4.7 and 4.8. The advantage of using piecewise linear functions is that no discrepancies are introduced when converting from storage to forebay levels and visa versa, particularly for reservoirs with small storage capacities and high inflows. The storage-elevation curves used in STOM were derived from tables in B.C. Hydro's physical characteristics database. It should be noted that the above storage-elevation curves are not explicitly included in the optimization model, but they are used in the solution algorithm as described in Section 5.1. Figure 4.8. Storage as a Function of Forebay Level 91 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 4.5.2 Modeling Hydropower Generation i. Basic Concepts The main source of electrical energy generated by B.C. Hydro is the energy of water. Water stored in reservoirs and flowing in streams and rivers is passed to turbines through penstocks, gates or valves. Turbines convert the kinetic energy of water into mechanical energy that is, in turn, converted to electrical energy by generators, which is then carried to customers through a transmission and distribution network, and to neighboring utilities through tie transmission lines. Generators are used for two primary control functions: power generation and frequency control. Generators can be equipped with an automatic feedback control system to regulate them to control frequency and load. Figure 4.9, is a block diagram representation of the main components of a power generation and control system. Several sophisticated equipment and computer models are used to control the operation of the transmission and distribution systems. These models, however, do not concern the research reported on in this thesis. Research in this thesis is concerned with the components that have an effect or are closely tied to the water energy supply systems, and some parts of the generating and electrical systems, as indicated in Figure 4.9. Other components of the electric and generation systems are thoroughly covered by many textbooks in the fields of electrical (Kundur, 1993) and hydropower engineering (Warnick, 1984). Automatic Generation Control (AGC) Tie line power signal Frequency signal Speed Energy Supply System: • Water stored in reservoirs • Water flowing in rivers • Other sources of energy Electrical System: Loads Transmission system Tie line to neighboring systems Other hydroelectric generators Other thermal generators Automatic control signals Electricity flow Speed I Water flow Turbine Speed control signal Generator Mechanical energy transfer Indicates components addressed in this study Figure 4.9. Main Components of Power Generation and Control System 92 A Decision Support System lor Real-time Hydropower Scheduling in a Competitive Power Market Environment Forebay Level Figure 4.10. Schematic of a Hydroelectric Plant with Francis Reaction Type Turbine. The main components of a hydroelectric generation plant are depicted in Figure 4.10. Hydraulic turbines can be generally grouped into two types: impulse turbines and reaction turbines. The impulse turbine is used for high heads - 300 meters or more, which utilize the kinetic energy of high-velocity jets of water to transform the water energy into mechanical energy. The high-velocity jets of water, derived from the pressure head, hit spoon-shaped buckets and exit the plant, in most cases, at atmospheric pressure. The spoon-shaped buckets are attached to a torque shaft, which connects the turbine with the generator. In the B.C. Hydro system, the high-head Bridge River and Wahleach hydroelectric generating plants utilize this technology. Reaction turbines derive power from the combined action of potential (pressure head) and kinetic forms of water energy. Water pressure within reaction turbines is above atmospheric, and can be as high as 360 meters in pressure head. The illustration in Figure 4.10 depicts a typical setup of the Francis reaction type turbine, which is typical of the majority of the turbines installed in B.C. Hydro. The water from the reservoir passes through the penstock into the wicket gates, which control the amount and direct the flow of water tangentially to the turbine blades. The turbine blades direct the flow of water to exit axially into the tailwater pool. The fundamental variables of head and turbine discharge are directly related to the power that can be generated by a hydroelectric unit. The traditional equation for determining the power capacity of hydropower units is: Gwatts = pgQH (4.5.2.1) where Gwalls = unit power capacity, watt p = mass density of water in kg/m3 g = acceleration of gravity, m/sec2 Q = discharge through turbine, m7sec H = effective head, m. 93 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment This equation represent the theoretical conditions, and the actual power output is negatively affected by the fact that the turbine has some losses in transforming the potential and kinetic energy into mechanical energy, and the generator also has some losses in transforming the mechanical energy into electric energy. This leads to the introduction of two efficiency terms, which are usually called the turbine efficiency term (rf), and the generator efficiency term (rf), to the equation: Gwatts = pgQHrfrf (4.5.2.2) Sometimes the two efficiency terms are lumped into one overall efficiency term (rj), and the equation becomes: GWatts = pgQHr/ (4.5.2.3Substituting for the density and the acceleration of gravity, the above equation becomes: G = 9.806 QHrj, (4.5.2.4) where G in measured in Kilowatts (1000 watts). This equation states that the power generated by a generator is directly proportional to the head on the turbine and to the water discharge that passes through the turbine. ii. Modeling of Hydroelectric Generation Facilities A hydroelectric generating facility could consist of one or more powerhouses and each powerhouse could consist of one or more generating units. Power generation of unit / in powerhouse n in plant j (G,,y), (i e I, n e N, I c N c J), is a function of the gross head (Hnj) of powerhouse n, and the turbine discharge of unit i, Ginj = f(Hnj, QTinj) . (4.5.2.5) If net head is used then the above relationship should include trash rack, penstocks or tunnel(s), and unit's penstock head losses (Severin et. al., 1993; Divi, 1985; Wunderlich et. al., 1985). The gross head of a powerhouse is a function of the plant's forebay and its tailwater level TWLnj, Hnj = FBj - TWLnj. (4.5.2.6) The tailwater level depends on the plant's total discharge (rather than the unit's discharge) and on downstream water level DSWLj, (e.g., downstream reservoir, lake, river, tide, etc.,) TWLnj = f(f(DSWLj),ZU ^QTinj,QSj,QSFj). (4.5.2.794 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Plant Discharge, in m3/sec Figure 4.11. Tailwater Level vs Plant Discharge and Downstream Water Level Figure 4.11 illustrates equation (4.5.2.7) in graphical form for a typical plant in the B.C. Hydro system, and it highlights the hydraulic coupling between serially connected hydroelectric facilities. These relationships are usually derived from either actual measured data, or from flow routing models such as the well-known, U.S. Army Corp of Engineers', HEC model. The other complicating factor is that all of the above relationships are a function of unit availability (C,)Tor a given plant load. There is an increase in modeling complexity when one tries to model, in detail, the operation of generating units in a plant that contains several powerhouses, each of which contains several units that are hydraulically coupled with other generating facilities in the same river system. For this reason an optimal unit commitment assumption was made when operating a plant for a given number of available units, forebay level, and plant loading. To derive an optimal unit commitment in a plant, a static plant unit commitment program (SPUC) (Smith, 1998) using a dynamic programming algorithm tabulated the optimal plant discharge for each increment in plant loading, forebay level, for each unit availability combination and for a downstream water level that represents normal operating conditions. The objective function of SPUC is to minimize the plant's total turbine discharge. The assumption of optimal unit commitment and minimizing the plant's turbine discharge are valid for the purpose of all short-term planning activities and for the majority of real-time unit dispatch. The exception is when a unit in a plant is loaded in a must run condition under certain operational circumstances (e.g., fish-flush, ancillary service operations, etc). 95 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment iii. Modeling of the Production Function of Hydroelectric Generating Plants The assumption of optimal unit commitment has allowed the use of the SPUC tabulated database to generate a production function for each of the hydroelectric generating plants modeled in this study. Figure 4.12 illustrates a production function of a typical plant with multiple units in the B.C. Hydro system. Production functions are attractive because they are both simple and powerful. They are simple because they consist of only one formula or computer routine, yet they are powerful because this single expression can effectively summarize an enormous amount of detailed engineering data. For example, the production function of a hydro generating plant encompasses many details on the turbines, generators, and hydraulic structures in the plant. The production function depicted in Figure 4.12 represents the optimal transformation of the main input variables, water and forebay level, into the product, electric energy. A production function is technically efficient because each point on the production function's surface represents the maximum electric energy that can be obtained from any given sets of turbine water discharge and forebay for the number of units it represents. The production function therefore excludes any lesser amount of electric energy that would come from a wasteful or technically inefficient use of water and forebay. The characteristics of a generating plant production function - its shape, slope, and smoothness - are important features that usually determine the kind of optimization techniques that can be usefully applied. An isoquant is a locus on the production function of a. General Background on the Generation Production Function Discharge (m 3/s) Figure 4.12. Production Function of a Hydroelectric Generating Plant. 96 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment all equal levels of electric energy production. It illustrates an important phenomenon: many different combinations of water turbine discharge and forebay inputs can result in the same level of electric energy production. As illustrated in Figure 4.12 above, they are the surface cuts at specified levels of electric energy production (e.g., the energy production "G" indicated in the Figure 4.12). For example the surface cut parallel to the forebay-discharge surface is indicative of the effect of change in forebay and discharge for a given generation level. It can be seen that as the forebay decreases, the turbine discharge (QT) increases. Other surface cuts provide information on other characteristics of the production function. The shape of these cut affect the optimization methods that could be used. The slope reflects the rate at which each of the inputs affects the output. Finally the smoothness of cuts reflect whether there are any irregularities in input-output relationships, which could entail discontinuities in the production function. b. Main Features of the Hydroelectric Plant's Production Functions Close examination and study of the hydroelectric generating plants' production functions for the B.C. Hydro system revealed that they posses several attractive optimization features (particularly for use of the linear programming technique). For illustration of these features, see Figure 4.13, which represents a production function for a plant with four units. • First, the effect of variation in forebay on the G - f(Q) function for a given plant discharge is almost linear. This can be clearly seen by referring to Figure 4.13 and examining the G =f(Q) curves. • Second, although there are some "bumps" in the G = f(Q) curves (as a result of optimal unit commitment and switching between units), the curves are very smooth for each forebay level. Note that the "bumps" in the G = f(Q) curves can not be readily and clearly seen in Figure 4.13, and for this reason the G/Q curves have been provided. The G/Q result from dividing the plant generation by the plant discharge to give the H/K factor, which is routinely used as a proxy for efficiency. • Third, the G =f(Q) curve for a given forebay is slightly concave, and in many instances is almost linear. • Fourth, the peaks of the "bumps" in the G/Q curve represents local peak efficiency performance of the plant for a given plant generation range. These peaks result from operating one or a combination of units at their maximum efficiency, or optimal unit commitment. • Fifth, the G =f(Q) curves are almost linear between consistent ranges of plant discharge. This can be illustrated by taking a ruler and matching the curve for certain turbine discharge ranges. • Sixth, the G = f(Q) curves are not smooth near the plant's minimum operating ranges, which results from frequent switching between units due to the existence of inoperable . generation zones for individual units. The inoperable zone results from excessive vibration, frequency problems, etc. • Seventh, the G =f(Q) are continuous except near the minimum operating ranges. The above features have facilitated the use of a piecewise linear production function in the form of a surface with inputs being the turbine discharge, the forebay level and unit availability, and the output the plant generation. The production function for each plant 97 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment consists of a family of piecewise linear curves that have been curve-fitted by a specialized procedure (as described in c. below) to accurately describe the plant generation at time-step t (Gp) as a function of its forebay level, turbine discharge and unit availability, Gj, = f(FBit,QTjt,Cjt). (4.5.2.8) One of the most important algorithmic features of linear programming is that the simplex algorithm, and its derivatives, search the vertices that bound the solution space. Since these vertices are formed by the constraints, and since one of the constraints in the model is the piecewise linear production function (equation 4.5.2.8), then the optimal solution can always be found at one of the breakpoints of this function. As mentioned above, the fourth feature stated that the peaks of the "bumps" in the G/Q curve represent local peak efficiency performance of the plant for a given plant generation range, and that these peaks result from operating one or a combination of units at their maximum efficiency. The method used to exploit both of these features consists of a specialized curve fitting procedure consisting of several steps as described below, and representation of equation 4.5.2.8 by a piecewise linear surface production function. Turbine Discharge (Q in m /s) Figure 4.13. Typical Production Function for a Hydroelectric Plant with Four Units. 98 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment c. Curve Fitting Procedure for the Production Function For each plant, the production function surface curve fitting procedure consists of the following steps: • Step 1. Run SPUC for each plant. SPUC generates a database that contains for each forebay elevation and each combo (combination of the available units), the optimized plant discharge for each increment of plant generation. • Step 2. For each combo and for the range of all forebay levels in a plant search for the breakpoints on the turbine discharge curve that corresponds to the peaks of the "bumps" in the G/Q curves. The search is done manually by plotting the SPUC output as illustrated in Figure 4.14. The search could also be automated by a combination of an optimization process coupled with a heuristic search (not done in this study). Once this search is finished, the points on the turbine discharge axis that corresponds to these peaks are located (as marked by black dots in Figure 4.14). • Step 3. Decide on the number of piecewise linear segments that could accurately approximate the G = f(Q) curves for each combo. After preliminary investigations, it was found that a piecewise linear curve with three segments gives a very good approximation for the majority of plants. Therefore three segments were used. The decision on using three line segments was also influenced by the additional coding that would be required in the simulator and optimizer code if the number of segments for each plant and for each combo were different. In addition, representation of piecewise linear curves in linear programming dictates generation of additional variables and constraints for each segment, and the model could become very large. • -Step 4. Assuming that three segments are used, choose three peaks that could potentially represent the best fit for the piecewise linear curve with three segments. In Figure 4.14, the first three black dots on the G/Q curve represents such points. Choose the last point on the G = f(Q) curve that corresponds to the maximum turbine discharge for all forebays. This point is marked in Figure 4.14 by the last black dot on the G/Q curve. Determine the intersection of the four points with the turbine discharge axis, fix and call them the turbine discharge breakpoints (QBPs). See Figure 4.14 for illustration. • Step 5. From SPUC output, we have for each combo and forebay elevation (FB) the plant discharge (Q), and the plant generation (G). To fit a piecewise linear curve the following model was used, with the QBP,, QBP2, QBP3, and QBP4 fixed: G = if (Q < QBP2) then apply Range 1 (Q) equation, else if (Q < QBPf) then apply Range 2(Q) equation, else apply Range 3 (Q) equation. (4.5.2.9) The above formula selects which equation to use in order to calculate G, depending on the value of Q, where, Range 1(Q) equation = ((a,(QBP2-Q) + a2{Q-QBP,))l (QBP2-QBP,)), (4.5.2.10) 99 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment ~S7\ y '•< 1 r Turbine Discharge (Q in m /s) Figure 4.14. Piecewise Linear Curve Fitting Procedure of the Production Function. Range 2(Q) equation = ((a2(QBP3-Q) + a3(Q-QBP2))l (QBP3-QBP,)), (4.5.2.11) Range 3(Q) equation = ((a3(QBP4-Q) + a4(Q-QBP3))l (QBP4-QBP3)). (4.5.2.12) For each forebay elevation in each Combo, the SPUC output is curve-fitted to find the coefficients: ai ...a4. The above curve-fitting model was programmed in Excel Visual Basic and was solved by using the Excel Non-linear Solver (the Quasi-Newton nonlinear optimization method). The objective function in this optimization model is to minimize the sum of the absolute differences between SPUC output and the output from the formula outlined above. Constraints were required to ensure the convexity of the fitted piecewise linear curve. The convexity condition is required to enable the use of linear programming, otherwise the problem becomes a mixed integer, linear problem which requires extensive computer time and resources to solve. The constraints include the following conditions to ensure convexity of the piecewise linear curve: Slopet >= Slope2 (4.5.2.13) Slope2 >= Slope3 (4.5.2.14where Slope j is the slope of the first linear segment, Slope, = (a2-al)l{QBP2-QBPl), (4.5.2.15) and Slope2 is the slope of the second linear segment 100 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Slope, = (a3-a2)/(QBP3-QBP2), (4.5.2.16) and Slope3 is the slope of the third linear segment Slope, = (a4-a3)/(QBP4-QBP3). (4.5.2.17• Step 6. Once curve fitting in Step 5 is done for all forebay elevations, the G breakpoints (GBP1...GBP4) that correspond to (QBPj...QBP4) respectively are calculated for each forebay elevation, using the model described in Step 5 with the coefficients a\...a4. • Step 7. Once the GBPs are calculated, a linear relationship of the forebay elevations and the GBPs for each QBPs are curve-fitted using Excel's Linear Solver. The linear curve fitting yields the coefficients (slope m, and constant c) of the straight line that represents the variation of plant generation with forebay level for each QBPs, as illustrated in Figure 4.13. To calculate a plant generation given its discharge (or visa versa) for a given forebay level, the discharge range must be first determined and the corresponding equation can then be used. A linear interpolation will then be required to interpolate between the required point of interest and the two breakpoints that limit the given discharge. A similar interpolation will yield the plant discharge given the plant generation if desired. For implementation in the AMPL language and the simulator all that is needed to represent a plant's generation production function are the breakpoints of the turbine discharge (QBPs) and the coefficients of the linear relationship of the generation breakpoints (GBPm's, GBPc's) for each unit combination, as listed in Table 4.4 below. The curve-fitting procedure outlined above produces very accurate piecewise linear curves. It yields a typical curve fitting error of about 0.30% with a maximum error of 2%. In contrast, the commonly used polynomial plant functions, yields an average error of 3.4% with a maximum error of 16.5%. Figure 4.15 illustrates the variation of error for three curve fitting procedures: piecewise linear, linear, and the polynomials. Table 4.4. Coefficients of the Generation Production Function Turbine Breakpoint Generation Breakpoint (m) Coefficients Generation Breakpoint (c) Coefficients QBPi GBP mi GBPci QBP2 GBPm2 GBPc2 QBP3 GBPm3 GBPc3 QBP4 GBPm4 GBPc4 101 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment 60.00 -30.00 -I 1 1 1 1 1 1 i 1 300 500 700 900 1100 1300 1500 1700 1900 2100 Plant Generation (G in MW) Figure 4.15. Variation of Curve Fitting Error by Three Curve Fitting Methods for a Typical Plant with Four Units. d. Correction for Downstream Tailwater Level SPUC assumes a constant downstream water level when calculating the optimal unit commitment. This is the. most likely water level under normal operating conditions. To correct for different downstream water levels other than those assumed by SPUC, a correction to the forebay level was made to compensate for other than normal conditions. Generally, these corrections were minor. For more details, see Section 5.1. Step 4. e. Plant Generation Limits Generation in a plant j at time-step t is constrained by the minimum (GMm,r) and the maximum (GMwCjt) physical and operational limits, GMinj, < Gj, < GMaxj, (4.5.2.18) To calculate the maximum generation limit, the simulator considers the following input parameters (see Annex A for details on the simulator algorithm): • The LRB maximum generation limit (specified by the user in the LRB input data files) as outlined in Section 4.3.2; 102 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment • The maximum plant discharge, as specified by the user in the GUI (see Section 4.3.2); • The plant spills; • The maximum generation as calculated by the simulator as a function of the plant's forebay and unit availability (equation (4.5.2.19)) that are derived from SPUC database, as illustrated in Figure 4.16. GMaxj, = f(FBjt,Cjt). * (4.5.2.19) The simulator calculates the value of the maximum generation limit by taking the -\ 1 1 1 1 1 1 1 1 1 1 Forebay Elevation (FB), in m Figure 4.16. Variation of Maximum Generation Limit with Forebay Level and Unit Availability for a Typical Plant with Four Units*. * Note that other unit combinations are omitted for presentation clarity. minimum of the following: • • The LRB maximum generation limit; • The calculated maximum generation limits from SPUC database; and • The calculated maximum generation limit that corresponds to the minimum of: • the maximum turbine discharge limit derived from SPUC database (see Figure 4.17), and 103 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment _| ! ! j ! ! ( ! p ( 1 Forebay Elevation (FB), Figure 4.17.. Variation of Maximum Turbine Discharge Limit with Forebay Level and Unit Availability for a Typical Plant with Four Units* Note that other unit combinations are omitted for presentation clarity. • the plant turbine discharge that is calculated by subtracting the spill discharge from the maximum plant discharge specified by the user in the GUI (see Section 4.3.2). Similarly, the minimum generation limit (GM'njt) is calculated by the simulator as the maximum of: • the minimum value of all of the operable generation ranges for all available units. Typically, there are three inoperable ranges for each unit in a plant, and the simulator searches for the minimum value of all of these ranges for each unit and uses it as the minimum; and • the calculated minimum generation limit that corresponds to the minimum plant discharge specified by the user in the GUI (see Section 4.3.2), less spills. Once calculated by the simulator, the minimum and maximum generation limits are passed to the optimization model at each iteration in the solution algorithm (see Section 5.1). 104 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment In addition to the minimum and maximum generation limits, the GUI also allows the user to impose optional constraints that fix the LRB generation schedule (G p) for a plant in an optimized river system (see Section 4.3.2), Gp = GLRBp. (4.5.2.20) 4.5.3 Modeling of Thermal Generation One type of thermal generation is included in the model (GTher,). Thermal generation is a function of the quantity of gas used (BThert) in GJ (Giga Joules), and the thermal unit availability (CTher,). It is modeled by a piecewise linear curve similar to that of the hydraulic turbines as discussed above, GTher, = f(BTher,,CThen). (4.5.3.1) The total quantity of gas (in GJ) that can be used in the study (BTherTotal) is fixed by a gas contract and is modeled as a hard constraint, 2ZTt=,BTher, = BTherTotal (4.5.3.2while the total generation in the thermal plant is constrained by the maximum (GTherMax,) and minimum (GTherMmt) generation limits as follows, GTherMin, < GTher, <GTherMax,. (4.5.3.3) 4.5.4 Modeling Load Resource Balance The generating facilities are usually operated to meet the system firm demand (D,), pre-scheduled net transactions (exports and imports) (PNSml), (m e M (U.S., AB)), and net spot sales (NSSmt). When the net prescheduled transactions and net spot sales are positive, then net export occurs; otherwise, when they are negative, then net imports occurs. In a typical study, a subset of all generating plants with pre-scheduled generation (GSimst), (s e S), are simulated, and the rest are optimized. The load-resource balance equation then becomes, I Gj, + HL, GSims, + GThen - PNSm, - Ht, NSS™, > D,. (4.5.4.1) Prescheduled transactions are fixed parameters in the model that are saved from the LRB system as described in Section 4.3.1, while net spot sales are variables in the model, except where indicated otherwise. 4.5.5 Modeling Operating Reserve and Regulating Margin Requirements In addition to electricity generation, generating facilities are also operated to meet real-time operational requirements such as spinning reserve obligations (GOR j) and regulating margin requirement (RMR) as defined by the Western System Coordinating Council (WSCC) reliability criteria (WSCC, 1997). To meet these requirements, equation (4.5.2.18) is modified in the model as follows: GM'"j, < (Gj, * (1+ GOROj) + GRMRjt) < GMaxj, (4.5.5.1) where GRMRj, is a variable in the model that represents the contribution of plant j to the total regulating margin (RMR). To ensure that the regulating margin requirement is met at each time step t, the model includes the regulating margin buffer constraint as follows, 2Zl,GRMRj,>RMR. (4.5.5.2) 105 A Decision Support System lor Real-time Hydropower Scheduling in a Competitive Power Market Environment The RMR and the GOROj are specified by the user in the GUI as described in Section 4.3.2. 4.5.6 Modeling Import and Export Transfer Capability Tie line maximum and minimum available transfer capability for net sales {NSSMaxmt, NSSMmmt) limits the net spot sales to markets in the U.S. and Alberta as follows, NSS Minm, < NSSm! < NSS Maxm,, (4.5.6.1) The limits on net spot sales for each market are user inputs in the GUI, as described in Section 4.3.2. 4.6 STOM OPTIMIZATION MODELS STOM provides the user with the facility to select one of four objective functions for the optimization study (see Section 4.3.2): maximize efficiency; minimize the cost of water used; maximize power production for a given storage target level; and maximize profits. For each objective function the optimization model is dynamically formulated by the decision support system using the AMPL modeling language. The optimization models are formulated in two steps. First, the variables, the set of equations, and the parameters common among the four objective functions are included in the model. Second, the additional variables, constraints and parameters specific to each objective function are then added to the model. The following subsections list the generalized optimization model common to all objective functions, and the additional variables, constraints and parameters required for each objective function. More details on dynamic formulation of the optimization models for each objective function can be found in Section 5.1. 4.6.1. The Generalized Optimization Model Optimization models are usually divided into three basic components: the objective function; the decision variables; and the constraints. These are discussed below. i. Decision Variables The decision variables in the common model are of two types, independent and dependent variables. Independent variables are those that the optimization algorithm searches for, while the dependent variables are calculated by the model's equations. There are two categories of variables in the optimization problem: hydro variables, and power generation variables. The hydro variables are continuous, while the power generation variables are discrete, as follows: • The independent turbine discharge variables, QTp, in cubic meters per second, • The independent forced spill discharge variables, QSp, in cubic meters per second, • The dependent total plant discharge variables, QPkt, in cubic meters per second, • The dependent reservoir storage variables, S^t, in cubic meters per second for one day, • The dependent plant generation variables, (Gp), in megawatts for each hour. 106 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment In addition, there are other variables that are specific for other objective functions, as described in subsequent subsections. ii. The Constraints There are two different types of general constraints for this problem: hydro constraints, and power generation constraints. The hydro constraints, as discussed in section 4.5.1, are: the piecewise function representing the forced spill discharges from a reservoir, QSk, = f(Sk<), (4.6.1.1) the matrices representing the turbine discharges from a reservoir, RTjh = QTkt * QTRjk, (4.6.1.2the matrices representing the spill discharges from a reservoir, RSjk, = (QSkt + QSFk,)*QSRjk, (4.6.1.3) the matrices representing the upstream turbine inflows to each reservoir, UTjk, = QTj,*UQTjk, (4.6.1.4the matrices representing the upstream spill inflows to each reservoir, USjk, =-(QSh + QSFkt) * UQSjk (4.6.1.5) the upper and lower bounds on turbine discharge from each reservoir, QTMinkt < QTkt < QTMaxkt, (4.6.1.6the upper and lower bounds on total spill discharges from a reservoirs, QSMink, < (QSFkt + QSkt) < QS Maxk,, (4.6.1.7) the total plant discharge from each reservoir, QPk, = QTkt + QSk, + QSFkt, (4.6.1.8the upper and lower bounds on total plant discharge from each reservoir, QPMinkt < QPk, < QPMaxkt (4.6.1.9) the mass-balance (continuity) equation for reservoirs, that couples the storage dependent decision variables across time, Sku +1) = Sk, + (-Zj=1 RTjk, - Zj=, RSjk, + Zj-i UTjh + Ij=I USjk, + NRIti) 124, (4.6.1.10) and, the upper and lower bounds on each reservoir storage, SMink,<Sk,<SMaxk,. (4.6.1.11The power generation constraints, as discussed in Section 4.5.2, are: the piecewise linear generation production function that calculates plant generation as a function of reservoir forebay, turbine discharge and unit combination, Q, = f(FBj,,QTj,,Q,), . (4.6.1.12) the upper and lower bounds on plant generation, GMmj,<Gj,<GMaxj,, (4.6.1.13the optional constraint that fixes the LRB generation schedules for a plant, Gj, = GLRBj,. (4.6.1.14) In addition there are other constraints that are specific for each objective function, as described in subsequent subsections. 107 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 4.6.2 Maximize the Efficiency Optimization Model i. Objective Function This objective function uses the hydraulic value, H/K, to weigh the turbine and the spill discharges for each plant, which when aggregated over the study duration results in minimizing the total energy used by the optimized plants. This objective function is typically used when the user would like to maximize the efficiency of the optimized plants in the process of preparing preliminary hourly planning schedules for several days ahead (up to one week). The H/K values are used as a proxy for the plant's efficiency, and they are calculated by dividing the plant's generation by the turbine discharge for the third point of the piecewise linear generation production function. This point usually represents the range with the most efficient production level near the maximum capacity of plants. The optimization algorithm calculates the H/K values internally and corrects for head variations in each run. The objective function is expressed in the model as, Minimize: zZ]=l YJ,=, (QTj, + QSp + QSFp) * HKj. (4.6.2.1) ii. Additional Decision Variables There are no additional decision variables for this objective function. iii. Additional Constraints In addition to equations in the generalized model (4.6.1.1-4.6.1.13), the only additional constraint for this objective function is the hydro-generation coupling equation representing the load-resource balance, as discussed in section 4.5.4. Note that thermal generation (Gther,) as well as the net spot sales {NSSmt) are fixed at their LRB values. The load-resource balance equation is expressed in the model as, I Gj, + EL GSims, + GTher, - Zti NSSim, - X"=7 PNSm, > D, (4.6.2.2) 4.6.3. Minimize the Cost of Water Used Optimization Model i. Objective Function This objective function uses the Cost Factor, CF, to weigh the turbine and the spill discharges for each plant, which when aggregated over the study duration result in minimizing the total cost of water used by the optimized plants. CF is a user input parameter for each plant, and it reflects the cost of water to be used for power generation and spills from each plant. A high CF corresponds to more costly (valuable) water from the corresponding plant. This objective function is typically used when the user prefers to have more control on the amount of water used from each plant, particularly from the upper-most reservoirs in each river system (e.g. the Kinbasket in the Columbia, or the Williston in the Peace). It could be used in the process of preparing preliminary hourly planning schedules for several days ahead (up to one week) that could reflect the "Generation Schedule Preference Order" for the planning period. If the user wishes to use more water from a 108 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment particular plant, then a lower CF relative value could be assigned to that plant. The default CF values are calculated in the GUI by dividing 1.0 by the number of plants selected for optimization. Although it is a good practice to normalize the CF values to add up to 1.0, it is, however, not a requirement. If the user has access to the marginal value of water for each plant (in $/m3/s) in the optimization study, these values can be entered, and the optimization study will then minimize the total value of the plants' discharges used to meet the load and to meet spills requirements. The objective function is expressed in the model as, Minimize: £j=, Tl,(QTj, + QSj, + QSFj,)* CFj. . . (4.6.3.1) ii. Additional Decision Variables There are no additional decision variables for this objective function. iii. Additional Constraints In addition to equations in the generalized model (4.6.1.1-4.6.1.13), the only additional constraint for this objective function is the hydro-generation coupling equation representing the load-resource balance, as discussed in section 4.5.4. Note that thermal generation (Gther,) as well as the net spot sales (NSSml) are fixed at their LRB values. The load-resource balance equation is expressed in the model as, I U Gjt + Et; GSims, + GTher, -1", NSS,mt - I", PNSm, > D, (4.6.3.2) 4.6.4 Maximize the Value of Power Production Optimization Model i. Objective Function This objective function maximizes the value of the additional power that could be generated in the study, provided that target reservoir levels at the end of the study are met. The target reservoir levels are determined by simulating forebay levels, for each plant, given the LRB generation schedule, reservoir's spills and inflows. In this objective function, the optimized spot sale schedules (SpotPower,) are weighted by user-input hourly spot prices that reflect estimates of the prevailing market conditions over the study duration. The user in the GUI could shape the hourly spot price structure to reflect peak-, high-, and low-load hour prices. This objective function is typically used when the user would like to maximize the short-term revenues from spot sales in the process of preparing preliminary hourly planning schedules for several days ahead (up to one week). The objective function is expressed in the model as, Maximize: Tlt=,SpotPowert* SpotPricet (4.6.4.1) ii. Additional Decision Variables There is one additional independent variable in this objective function, and it represents the additional hourly spot power {SpotPower,) that could be generated and possibly sold in the spot market given the fixed reservoir's target levels. iii. Additional Constraints In addition to the equations in the generalized model (4.6.1.1-4.6.1.13), two additional 109 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment constraints are added. The first, fixes the storage level for each optimized reservoirs to the (LRB) scheduled storage at the last time step in the study, The second constraint is the hydro-generation coupling equation representing the load-resource balance, as discussed in section 4.5.4. Note that thermal generation (Gther,) as well as the net spot sales (NSSml) are fixed at their LRB values, and the new variable SpotPower, is added to the equation. The load-resource balance equation is expressed in the model as, ZU Gj, + Zl, GSims, + GTher, - Zt, NSSim, - Zt, PNSm, - SpotPower, > D, (4.6.4.3) 4.6.5 Maximize the Profit Optimization Model i. Objective Function For a hydroelectric system with significant multi-year storage, the prime objective is to first meet the domestic load demand and firm export/import contracts and then to make the optimal trade-off between present benefits, expressed as revenues from real-time spot energy sales, and the potential expected long-term value of resources, expressed as the marginal value of water stored in reservoirs. In other words, the decision to be made is when and how much to import and/or export and how much thermal energy to generate as well as when, where and how much water to store in or draft from reservoirs while meeting the domestic load and the firm export/import contracts. This objective function is intended for use in the Shift Office in real-time operations mode. The objective is expressed in the model as, + Zt, Zl, NSSm,*NSSPricem, TTK • • (4.6.5.1) +Zk=l(SkT - STargetkT)*MVWk*24*3600 -ZT,=lGThert*TIC, The first term represents the sum of revenues (or costs) accrued from net spot energy (4.6.4.2) Maximize: S Value of water in storage c 0 0 Reservoir storage, nr Figure 4.18. Value of Water in Storage and Marginal Value of Water for Time SteD t 110 A Decision Support System lor Real-time Hydropower Scheduling in a Competitive Power Market Environment 2 Planning study duration Figure 4.19. Marginal Value of Water as a Function of Storage and Time exports (or imports), given forecast hourly spot prices (NSSPriceml) in $/MWHr, in the U.S. and Alberta electricity markets. The second term represents the sum of storage cost (or added storage value) of deviating from the terminal target storage level (STargetkT) at target hour (7). For each optimized reservoir, multiplying the difference between the optimized storage at the target hour (S*r) and the target storage (STargetkT) by the marginal value of water (MVWk), in $/m3, yields its storage cost (or added storage value). The MVWk and the STargetkT are calculated in the model from the Rbchj (Rate for B.C. Hydro) and the target forebay levels respectively. The user specifies Rbchj and the target forebay level in the GUI, as described in Section 4.3.2. The third term accounts for the cost of thermal generation, and is calculated by multiplying the optimized thermal generation by the thermal energy input cost (TIC,) in $/MWHr, which is calculated from a user-input in the LRB system on the cost of the gas contract. The marginal value of water and the target storage for each reservoir are predetermined from long and medium term optimization studies, which yield a water value function, as described in Section 3.2.4. Stochastic dynamic-programming and other models establish the value of water stored in reservoirs as a function of storage levels and the study duration, as illustrated in Figure 4.18. The derivative of the value of water function yields the marginal value of water for the duration of the planning horizon and for each storage state, a shown in Figure 4.19. Ill A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment Reservoir Storage, Sh, m MVWK Study duration net inflow A — Target storage, ^TargetkT Optimal production E Start of study End of study, T Time, t Figure 4.20. Cut of the Water Value Function. For use in real-time operations mode, a cut of these curves (section 1-1 shown in Figure 4.19) for the study duration provides information on the value of water for the next decision time frame. As shown in Figure 4.20, at the start of the study, reservoir storage is at point A. During the study, the storage changes to point B, if generation was at its minimum allowable production level, with the net increase in storage being the difference between points B and C. Depending on the prevailing electricity market conditions and the marginal value of water (MVWk), production from a hydroelectric facility can cause the reservoir to end anywhere between points B and E. If the assumptions used in the long and medium-term planning models (market, inflow and modeling detail assumptions) were reasonably accurate, then the optimal production and target reservoir storage levels could coincide. However, if the assumptions were slightly off-the-mark, then a slight deviation from the reservoir's target storage level could occur. With very high market prices production is maximized, and the reservoir's storage could be drawn-down to point E. If the value of the spot trading sales slightly exceeds the value of deviation from the target storage level, then storage would drop to point D. Thus, depending on the MVWk and market prices, the optimization model determines the optimal tradeoff between the present benefits and the expected long-term value of resources. This optimization process is equivalent to finding the point of intersection between the resource value function and the market demand function for resources selected for optimization (hydro, thermal and spot sales). If the intersection point corresponding to a production level higher than the firm demand and the firm export/import contracts, then production surplus (in excess of the firm load demand and exports) could be offered for sale in the spot market, as illustrated in Figure 4.21. Otherwise, if the optimal production level falls short of firm load demand and the firm export/import contracts, it becomes necessary to buy power from the spot market. Thus the points of intersection between the water value function and the market demand function determine the optimal production level and the amount of spot trade sales. The resource value function does not increase at a constant rate, mainly due to the decline in water and gas use efficiency at higher production levels. 112 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Power Production, in MWHr Figure 4.21. Determination of Optimal Production Level Using the Resource Value Function and the Market Demand Function The current implementation of STOM assumes that the market demand function for B.C. Hydro is limited by the transfer capability of the tie lines that link B.C. Hydro's transmission system to markets in Alberta and the U.S., and by the maximum production level, as shown in Figure 4.21. PowerEx provides hourly forecast spot prices that represent the average prices in the Alberta and U.S. electricity markets, and also provides the hourly limits on the tie line capacities to Alberta and the U.S. Future implementation of STOM plans to include the hourly demand curve for both markets once this information becomes available. It should be noted that the hourly shadow price (dual variable) of the load resource balance equation in this objective function provides what is known in the industry as the market-clearing price for B.C. Hydro resources. Further discussion on sensitivity analysis can be found in Chapter 6. The above discussion on this objective function introduced two concepts: the concept of implied marginal value of water, and the concept of proximal analysis for profit maximization, as discussed further in Chapter 7. 113 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment ii. Additional Decision Variables There are several additional independent variables in this objective function: • The independent thermal generation variables (Gther,, Bther,) that represent generation of the Burrard thermal generating station as discussed in Section 4.5.3, • The independent net spot sales (NSSml) in the U.S. and the Alberta electricity spot markets as discussed in Section 4.5.4, and • The regulating margin requirement for each plant, GRMRjh as discussed in Section 4.5.5. iii. Additional Constraints In addition to equations in the generalized model (4.6.1.1-4.6.1.14), several additional constraints are added to the generalized model. The first, is the load-resource balance equation that is expressed in the model as, I,w Gn + Zl.GSims, + GTher, - NSSm, -1*, PNSm, > D,. (4.6.5.2) The second, represents the thermal generation from the Burrard station as discussed in Section 4.5.3, and expressed in the model by a piecewise linear curve as follows, GTher, = f(BThen, CThen). (4.6.5.3The third represents the total quantity of gas that can be used (in GJ), which is fixed by a gas contract as discussed in Section 4.5.3, and is modeled as a hard constraint, Zl,BTher, = BTherTotal. (4.6.5.4) The fourth represents the bounds on the total thermal generation as follows, GTherMin, < GTher, < GTherMax,. (4.6.5.5The fifth, replaces equation 4.6.1.13 to represent the real-time operational requirements such as spinning reserve obligations and the regulating margin requirement GMi"j, < (Gj, *(1 + GOROj) + GRMRj,) < GMaxj,. (4.6.5.6) The sixth, ensures that the sum of the regulating margin requirement for all optimized plants is met at each time step in the model, and is represented in the model as, ZL,GRMRj,>RMR. (4.6.5.7The seventh, limits the net spot sales to the maximum and minimum tie line available transfer capability to markets in the U.S. and Alberta as discussed in Section 4.5.6, and is represented in the model as, NSSMinm,<NSSm, < NSSM"\„. (4.6.5.8) The eighth, is optional, and it fixes the storage level for the optimized reservoirs to the (LRB) scheduled storage at the last time step in the study, Sfr = SLRB/r. (4.6.5.9114 A Decision Support System tor Real-time Hydropower Scheduling in a Competitive Power Market Environment CHAPTER 5 THE SOLUTION AND IMPLEMENTATION PROCESS In this Chapter the solution process adopted to solve the optimization problem is described. This is followed by a description of the implementation process adopted to develop and implement the decision support system in production mode at B.C. Hydro. 5.1. THE SOLUTION PROCESS The main concern of this section is to describe the solution process that has been implemented to solve the mathematical programming problem presented in Section 4.5. It mainly concerns the application of the linear programming technique to solve the hydroelectric scheduling problem. 5.1.1 STOM Generalized Solution Process The overall process used for implementation of STOM in production mode consists of several steps as shown in Figure 5.1. Many of the steps in the process have been discussed in some detail elsewhere in this study, and are referred to appropriately. The first step in the process is to balance the LRB system, check and save the required operational input data needed to run STOM. This is discussed in Section 4.3.1. The second step involve setting the user's specifications for the simulation/optimization study using the GUI, as described in Section 4.3.2. The third step is to launch the study and transfer data from the client's workstation to the NT Server workstation. This is described in Section 4.3.3. The fourth step involves launching the AMPL session, running the simulator, formulating the optimization model and running the simulation/optimization process at the NT Server. This will be described in Section 5.1.5. The fifth step terminates the process at the NT Server, transfers output data to the client's workstation and displays the results to the user as described in Sections 4.3.3 and 4.3.6. The sixth step involves either accepting the results and terminating the overall process, or rerunning the simulation/optimization study after changing some of the input data, objective, or operational limits using the GUI, as described in Section 4.3.2. 115 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Start Step 1: Check & Save Data Balance LRB and FBFC Check Operational Input Data Check data for errors Save Data, and Launch GUI. (Section 4.3.1) Yes: Display Errors & Abort Step 2: Set User's Specifications Select river system for Simulation & plants for optimization Confirm starting forebay levels Set study date & duration Set optional operational limits Select objective function Set objective function's parameters (4.3.2) Launch Client Communication Protocol Step 3: Transfer Input Data Compress LRB & GUI input data Check NT server if available Transfer data & signal Server's communication protocol (4.3.3) Yes: Initiate Simulation Optimization Process at the NT Server Step 4: Launch the Optimization Process Decompress input data Invoke AMPL and run script file for the objective function selected. • Run Simulator (4.3.4) • Formulate Optimization model (4.5) • Invoke CPLEX Solver. • Run simulation/optimization iterations to update forebay until forebay levels converge, and write output data End AMPL session. Launch Opt. Results Step 5: Transfer output Data & Display Results to User Compress output data Transfer output data to client Decompress output data Launch Display-Results software Format & Display results to user (4.3.6) Step 6: Accept Results Review & accept output results Transfer output to LRB & FBFC (4.3.6) Close results display H & communication protocol End Process Figure 5.1. STOM Generalized Solution Process. 116 A Decision Support'System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 5.1.2 Steps of the Solution Algorithm The solution algorithm is activated in Step 4 of STOM's generalized solution process, described in Section 5.1.1. It consists of several steps. First, the optimization process is activated by the server side communication protocol. Once the server side protocol receives the signal from the client's side communication protocol, it automatically transfers and decompresses the input data to the designated directory structure and hands over control of the optimization process by running a script text file in the AMPL syntax. The script file relates to the specific objective function chosen by the user in the GUI data-input session, and it controls the overall optimization process. Second, the system status is determined by performing a simulation run that calculates the physical and operational limits imposed by the user, determines the piecewise linear coefficients of the generation production function, and formats the input data for the optimization model. Third, the optimization model is formulated using the AMPL modeling language, and CPLEX's Primal solver is invoked to solve the problem. Fourth, a database search procedure is invoked in AMPL to determine the optimal combo numbers, given the optimized generation schedule, forebay levels, and unit availability for each hour and each plant. The simulation is then re-run to calculate the optimized forebay levels given the optimized generation schedules and optimal combo numbers. The optimal combo numbers and the optimized forebay levels are used to update the coefficients of the generation production function, while only the optimized forebay levels are used to update the generation and turbine discharge limits. A number of simulation/optimization iterations are performed (typically 3-6) until the reservoir forebay levels stabilize and converge to a given tolerance. The CPLEX fast Barrier Solver is used for these iterations, and the starting guesses are automatically updated for faster solution time. Fifth, the optimization problem is formulated for and solved by CPLEX's Primal (or Dual) algorithm (depending on the objective function), and the final solution results and sensitivity analysis information are written to text output files. The simulation and optimization output files are then transferred to the client workstation and displayed to the user by the Results-Display software. The above steps are described below and are summarized in the flow chart shown in Figure 5.2. Step 1: Launch the Optimization Process The server side communication protocol runs continuously on the NT Server workstation and is ready to take any client's requests. Once it receives the signal from the client side communication protocol it issues two instructions. The first instruction is used to decompress the client's input data and distribute it into a pre-assigned input data directory structure at the server. The second instruction passes a DOS argument that launches the AMPL session and invokes a script run file that specifies the objective function selected by the user. The server protocol then waits for the optimization run to terminate, when the AMPL session ends. B.C. Hydro currently holds a one-user license for AMPL and CPLEX. For this reason, if more than one client attempts to simultaneously access the NT Server, a signal is sent to the client protocol to indicate that the server side is busy performing an optimization run or is unavailable, if the server has been taken out of service. The client protocol tries to reestablish 117 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Start Step 1: Launch the Optimization Process Transfer and decompress input data; Invoke AMPL and run script file for the objective function selected by the user in the GUI. Step 2: Determine System Status Initialize and read input data; Perform hourly hydraulic simulation; Calculate physical and operational limits; Write optimizer's input data, simulation output and report on limits' violations. Step 3: Formulate the Optimization Model and Solve the Problem • Generate matrix structure for optimized plants; • Initialize set of all plants in the system; • Initialize UQT, UQS, QTR and QSR identity matrices; • Read set of plants selected for optimization; • Write new matrices for optimized plants. • Write storage-elevation breakpoints for optimized plants and reset AMPL; Load generalized optimization model; Read input data; Read new matrix structure and storage-elevation breakpoints; . Read user's imposed constraints; Set problem variables to those calculated by simulator and saved from LRB; Select objective function and read related input data and constraints; Select the Primal CPLEX algorithm; Set CPLEX directives; Write presolve messages and source of unfeasibility, if any; Solve the optimization problem. Yes Step 4: Iterate for Convergence of Forebay Levels. • Run optimal combo procedure & update combo number for simulator; • Run simulator with new combo number, update coefficients for optimizer; • Update downstream tailwater levels; • Update generation & turbine discharge limits using optimized forebay levels; • Run "Storage Limits Shrinking Envelope" algorithm (optional); • Update initial basis; • Solve the optimization problem; • Store new forebay levels and calculate absolute forebay difference. Step 5: Solve Optimization Problem Using the Primal/Dual Simplex Solver » Select the CPLEX Primal or Dual Simplex Solver; Solve the optimization problem; Write optimization output results; Write sensitivity analysis data; Quit AMPL; Transfer output data to client; Display results to user. No: Transfer output data and messages End Process Figure 5.2. STOM's Solution Algorithm 118 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment a connection with the NT Server for up to ten times with five seconds intervals between each attempt. If the server is still busy, it then quits, and informs the user that the server is not available. The communication process log is saved to a text data file that can be accessed for debugging purposes. Step 2. Determine the System Status The system status is determined by running the simulator software (see Section 4.3.4) to perform the following main functions: • Initialize variables and read input data; • Convert initial forebay levels to storage using a table lookup that relates storage to forebay water levels; • For each hour in the study, and for each plant selected for simulation, convert plant generation to turbine discharge using the coefficients of the piecewise linear curve (see Section 4.5 for details) as a function of forebay level and unit availability (combo number). • Calculate non-turbine releases (gated and overflow spill releases); • Calculate total reservoir's inflows and outflows; • Calculate storage using the mass balance equation, and convert storage to forebay levels; • Calculate minimum and maximum plant generation and discharge limits; • Convert forebay limits to storage limits for use by the optimizer; • Calculate residual generation from all non-optimized plants; • Check and write a report on forebay, generation and discharge limit's violations; • Write simulation results to text output file; • Write the following optimizer's input data in AMPL format: • Initial time step, number of hours in the study, set of optimized plants and river systems, and initial forebay levels; • System load, residual generation, exports and imports; • For each hour in the study and for each optimized plant write: • Maximum and minimum generation limits; • Maximum and minimum plant discharge limits; • Maximum and minimum reservoir storage limits; • Scheduled generation and the corresponding turbine discharges; • Spill releases; • Local reservoir inflows; • Unit availability (combo number); • Coefficients of piecewise linear curves (see Table 4.4). The simulator run time varies with the number of plants and the number of hours in the study. For 19 plants and 168 hours, the simulator takes about 25 seconds, while for four plants and 24 hours it takes about 3 seconds. 119 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Step 3. Formulate the Optimization Model and Solve the Problem In this step, the optimization model is formulated using the AMPL modeling language, and the CPLEX Primal Solver is invoked to solve the problem. The following procedure formulates the optimization model. 1. The default matrices (equations 4.5.1.1-4.5.1.4) that describe flow sources and destinations for the set of all plants in the B.C. Hydro system are loaded in AMPL. Then the set of plants selected for optimization are loaded, and the structure of UQTjk, UQSjk, QTRjk and QSRjk are determined by the intersection of the set of all plants in the B.C. Hydro system and the plants selected for optimization. The matrices resulting from the intersection are' then saved to a text file in AMPL format. 2. The input data that describe the storage-elevation piecewise linear curves are written to a text file in AMPL format, and the AMPL session is reset. 3. The generalized optimization model (equations 4.6.1.1-4.6.1.13) is loaded into memory from a predetermined text file in AMPL format. 4. The input data generated by the simulator, the new matrix structure and the storage-elevation data are loaded into memory. 5. The user's imposed constraints, formulated in the AMPL modeling language syntax by the GUI, are added to or dropped from the model. 6. The objective function is selected and its corresponding input data and additional variables and constraints are loaded into memory as follows: • If "Maximize Efficiency" objective function is selected, then: • add the objective function (equation 4.6.2.1), • add the load-resource balance equation (4.6.2.2), • if generation in a plant is fixed: . • drop the turbine discharge limits (equation 4.6.1.6) for the fixed plant, • drop the total plant discharge limits (equation 4.6.1.9) for the fixed plant, • drop the generation limits (equation 4.6.1.13) for the fixed plant, • add the constraint that fixes generation to the LRB schedule (equation 4.6.1.14) for the fixed plant. • If "Minimize the Value of Water Used" objective function is selected, then • add the objective function (equation 4.6.3.1), • add the load-resource balance equation (4.6.3.2), • read the objective function cost factor coefficients CFj from a text file in AMPL syntax that was generated by the GUI, • if generation in a plant is fixed: • drop the turbine discharge limits (equation 4.6.1.6) for the fixed plant. • drop the total plant discharge limits (equation 4.6.1.9) for the fixed plant, • drop the generation limits (equation 4.6.1.13) for the fixed plant, • add the constraint that fixes generation to the LRB schedule (equation 4.6.1.14) for the fixed plant. • If "Maximize the Value of Power Production" objective function is selected, then • add the objective function (equation 4.6.4.1), • add the constraint that fixes optimized storage at the last time step (equation 4.6.4.2), • add the load-resource balance equation (4.6.4.3), 120 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment • read the objective function coefficients SpotPrice, from a text file in AMPL syntax, generated by the GUI, • If generation in a plant is fixed: • drop the turbine discharge limits (equation 4.6.1.6) for the fixed plant. • drop the total plant discharge limits (equation 4.6.1.9) for the fixed plant, • drop the generation limits (equation 4.6.1.13) for the fixed plant, • add the constraint that fixes generation to the LRB schedule (equation 4.6.1.14) for the fixed plant. • If "Maximize Profit" objective function is selected, then • add the objective function (equation 4.6.5.1), • add the load-resource balance equation (4.6.5.2), • add the additional constraints (equations 4.6.5.3-4.6.5.8), • drop the generation limits (equation 4.6.1.13) for all plants, • add the optional constraint that fixes optimized storage at the last time step (equation 4.6.5.9), if selected by the user in the GUI, • read the objective function coefficients NSSPriceml, MVWj , TIC,, from a text file generated by the GUI in AMPL syntax, • read the thermal generation limits GTherMm,, GTherMax,, total gas quantity contract BTherTotal, the thermal unit commitment CTher,, from a text file generated by the LRB system in AMPL syntax, • read the tie line export transfer limits NSSM'"ml, NSSMaxm, from the file generated by the GUI in AMPL syntax, • read the real-time operating reserve obligation GOROj and the regulating margin requirement RMR contingencies, from a text file generated by the GUI in AMPL syntax, • If generation in a plant is fixed: • drop the turbine discharge limits (equation 4.6.1.6) for the fixed plant. • drop the total plant discharge limits (equation 4.6.1.9) for the fixed plant, • drop the generation limits (equation 4.6.5.6) for the fixed plant, • drop the regulating margin requirement constraint (equation 4.6.5.7) for the fixed plant, • add the constraint that fixes generation to the LRB schedule (equation 4.6.1.14) for the fixed plant. 7. Once the optimization model is formulated, and all input data are loaded into memory, the problem variables (initial basis) are set to those calculated by the simulator and/or saved from the LRB and the GUI. 8. Select the CPLEX Primal algorithm and set AMPL and CPLEX directives (e.g., turn AMPL's direct substitution method on; turn Presolve on, etc.). 9. Write Presolve messages and source of infeasibility, if any. 10. Invoke CPLEX to solve the optimization problem by issuing the 'solve' command in AMPL syntax. If the problem is infeasible, then the optimization run is terminated and the simulation results and the reports on unfeasibility are transferred and displayed- to the user at the client's 121 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment workstation by the Results-Display software. If the problem is feasible, then go to Step 4 to continue the solution algorithm. Step 4: Iterate for Convergence of Forebay Levels. Once the first optimization run is complete, the optimal unit commitment for each optimized plant is determined. As mentioned in Section 4.5, one of the main assumptions in operating a plant, given the number of units available, is that an optimal unit commitment is made to load individual units. To determine the optimal unit commitment, a database search procedure has been utilized. The procedure searches a modified, preprocessed, version of SPUC database that contains the plant load, the combo number that represents minimum plant turbine discharge for each unit availability and each plant's forebay level. The algorithm used to select the optimal combo is outlined in Annex E. Once the optimal unit commitment is selected, the simulation is re-run, using the generation schedule computed by the linear programming model and a new set of coefficients for the piecewise linear generation production curves are computed for input to the next optimization run. To account for variations in downstream tailwater levels other than those assumed in SPUC and for spills from a reservoir, a tailwater correction algorithm has been formulated. As mentioned in Section 4.5, SPUC database was calculated assuming a fixed downstream water CDf If level (DSWL ;r), which represented a downstream water level under normal operating conditions of the hydroelectric facilities, with no spills. To correct for variations in downstream water levels at time step t iDSWL0PTjt), and for any type of spills (QSp and QSFi,), the tailwater level of plant j is calculated using equation 4.6.2.15, for both the SPIIC DPT assumed (TWL j,), and the optimized (TWL j,) downstream water level. As shown in Figure 5.3, the tailwater level adjustments can be mathematically expressed as follows, TWL p = / (f(DSWLSPUCp), QTp), TWL0PTp = f(f(DSWL0PTp),(QTp + QSp + QSFp)). (5.1.1) (5.1.2) 122 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Tailwater Level, TWLj, TWL TWL Plant Discharge, QPt Figure 5.3 Adjustments for Variations in Tailwater Level. A correction of the forebay level FBj, is then made to account for the drop or rise in plant head resulting from variation in downstream water level as follows, FBj, = FBj, + (TWLspucp - TWL0PTj<). (5.1.3) Note that the above equations consider the turbine discharges from a plant, rather than from individual powerhouses in a plant as indicated earlier in equation 4.6.2.15. This simplification is valid for STOM purposes, since adjustments for head variation in individual powerhouses only yields marginal improvements in modeling accuracy (at most a few centimeters) compared to the variations resulting from fluctuations in downstream water levels and spills. Once the correction for the tailwater level is made, the forebay levels are then used to update the piecewise linear coefficients and the plant's generation and turbine limits. The initial basis from the previous optimization run is then updated. A number of iterations are performed (typically 3-6 using the Barrier algorithm) until the reservoir forebay levels stabilize and converge to a given tolerance. The convergence Tolerance has been determined from experience in running STOM for different time frames and for different objective functions and solution methods. It is currently set as a function of the number of hours in the study as follows: Tolerance * T/168, (5.1.4) where Tolerance is currently set at to 5, and T is the number of hours for the study. In all cases the maximum number of iterations is set not to exceed 8 iterations. To accelerate the forebay level convergence, an algorithm called the "Storage Limits Shrinking Envelope" has been tried with some degree of success. Basically, the algorithm lowers the maximum and increases the minimum storage limits in iterations, as long as the shrinking of the storage limits does not impose additional costs in the objective function. The shrinking method starts by calculating the cost of the hourly storage constraint (equation 5.6.1.15) after the first iteration (after the second optimization run). These values are determined from the dual values of the storage constraint, and are assigned to the parameter 123 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment SMaxjt = SMaXj, - (SMaxj, -Sj,)/2. - (5.1.5) Storage _Limit.Dual"er(I)p. Then, the new maximum storage level SMaXj, for each reservoir j at each time step t is set to equal the original maximum storage limit, less half the difference between the maximum storage limit and the optimized storage level' (Sj,) in the previous iteration, as illustrated in Figure 5.4, p - ^ p - P p -3jt)' Similarly, the new minimum storage limit S mp, for each reservoir j at each time step t, is set to equal the original minimum storage limit plus half the difference between the optimized storage level (Sp) and the minimum storage limit in the previous iteration, SMmp = SMmp + (Sp - SMmp)/2. (5.1.6) The limits are then updated for each plant and each hour until the total constraint's dual value (Storage_Limit.Dual'er("),) in the current iteration, n, exceeds that in the first iteration, or the maximum number of iterations is reached. If the constraint's dual value in the first iteration is exceeded, then the.limits are reset to their value in the previous iteration (n-1) and the plant(s) that causes additional costs is dropped from the procedure in the current iteration. Mathematically, the algorithm logic can be captured as follows, Experimentation with the "Storage Limits Shrinking Envelope" algorithm indicated that the convergence of the forebay levels progresses much faster (by about three iterations less) than that of just repeating the optimization runs. It has also yielded more stable optimal generation schedules in successive iterations, particularly for systems that contain very small reservoirs with large upstream turbine discharges (e.g., PCN and GMS). The algorithm, however, is not yet fully implemented in STOM, pending further testing and verification. for {j in plant}: If[Ylt=l Storage_ Limit. Dual"er(n> j, > Storage _ Limit. Dual"er<l> ;,), then I r* Muxjier(n) • rt MaxJte'r{n-\ ) . FO jt — O jt, s Min,l,erMji = ^ Min,„er(n-l, .;. j . ^ set plant = plant - j; ^ Maxjteiin) ^ Max,Iter(n-\ ) Max,lter(n-\) iS*" ) / 2* 5 Min,lter(n) n Min ,lter{n — \ ) , / c C MinJterin-\) \ / o. jt = O jt + (Oji — O jt) I A, 124 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Storage Level, Sj, i 1st iteration J_. 2nd iteration 3rd iteration 4th iteration <;'' 3rd iteration 2nd iteration 1st iteration Maximum Storage Level, S' Optimized Storage Level, Sj, SMmjt in 4th iteration in 3rd iteration SMinjt in 2nd iteration Time Figure 5.4 The Storage Limits Shrinking Envelop Method Step 5. Solve the Primal or Dual Optimization Problem In this final step, the optimization problem is formulated for and solved by CPLEX's Primal (or Dual) algorithm (depending on the objective function). In this final optimization run, the optimal unit commitment and the tailwater adjustments (and the maximum and minimum storage limits when the "Storage Limit Shrinking Envelop" algorithm is used) determined in the final iteration in Step 4 above are used. The final solution results and sensitivity analysis information are written to text output files. The simulation and optimization output files are then transferred to the client workstation and displayed to the user using the Results-Display software. 125 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment 5.2 THE IMPLEMENTATION PROCESS This section discusses the important issue of implementation of the decision support system. The section starts with an overview of the implementation roadblocks for short-term optimization models. This is followed by a discussion on the factors that have contributed to the successful implementation of STOM, with emphasis on the implementation process followed in this study. 5.2.1 Implementation Roadblocks It has been known for quite sometime now that short-term optimization models have rarely been used by the people who actually manage complex reservoir systems in real-time. There are several reasons. First, most models was not easy to use as the computer technology needed to model complex hydroelectric systems were not capable of meeting the needs of the end-user in terms of ease of use and the time it takes to run them. Second, most of the models were developed for specific studies (mostly academic) and did not reflect enough of the complexity and flexibility that was required by the end user. Third, and as given in a landmark article by Yeh (Yeh, 1985), the people who can and do apply optimization techniques are generally working at an "academic", abstract level that operators, accustomed to taking direct responsibility (and risk) for their day to day operations have difficulty relating to. Fourth, operators do not always understand the esoteric theory and often do not accept the simplifications necessary to match the available techniques to the situation at hand. Fifth, it simply takes considerable amounts of time, patience, and effort to develop, calibrate and operationally implement such complex models in real life situations. Despite all of the above difficulties, STOM was developed, calibrated, and implemented through a team effort of the BC Hydro's staff, researchers and several students from the Civil, Electrical, and Computer Science Departments at the University of British Columbia (UBC). Factors which contributed to the successful development and implementation of STOM will be discussed next. 5.2.2 Implementation Process and Success Factors It is difficult to initiate a new way of things in a large organization, particularly when the existing system still seems to be working well. The implementation of a decision support system is, in effect, the introduction of change in an organization. It is complicated long, tedious, ongoing process that is vaguely defined and that covers all phases of development, from initial prototyping to institutionalization of the new system. Although many researchers have studied issues relating to the success or failure of computer-based decision support systems and have provided useful insights, yet the theories, methods and procedures developed over the years do not guarantee success in real-life situations (Turban, 1998; Turban, 1990). However, several factors that contribute to the successful implementation of computer-based decision support systems have been identified by Turban et al. These, along with other factors that were found critical for implementation of STOM have been grouped in ten categories, as shown in Figure 5.5 and discussed below. 126 A Decision Support System for Real-time Hydropower Scheduling in a Competitive Power Market Environment Technical factors Modeling Process and Details Implementation Strategy User Involvement Developers Patience and Persistence STOM Implementation Organizational & Management Support Project Related Accuracy of Data Behavioral Factors and User Perception Communication and Interpretation of the Results Figure 5.5 Factors Contributing to Successful Implementation of STOM. Source: Adapted from Turban, 1990; Turban, 1998. 127 A Decision Support System for Real-time Hydropower Scheduling in a Compet