Realistic electricity market simulator for energy and economic studies

Similar documents
IN MANY countries all over the world the power industry

Price-Taker Bidding Strategy Under Price Uncertainty

Finding Multiperiod Nash Equilibria in Pool-Based Electricity Markets

Course notes for EE394V Restructured Electricity Markets: Locational Marginal Pricing

Modeling Hydro Power Plants in Deregulated Electricity Markets: Integration and Application of EMCAS and VALORAGUA

Solutions for Power Generation

Federal Energy Regulatory Commission Working Paper on Standardized Transmission Service and Wholesale Electric Market Design

Technical Bulletin Comparison of Lossy versus Lossless Shift Factors in the ISO Market Optimizations

How the European day-ahead electricity market works

Competitive Markets. Jeffrey Ely. January 13, This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License.

Optimization of the NAS Battery Control System

PJM Manual 27: Open Access Transmission Tariff Accounting Revision: 88 Effective Date: November 16, 2017

Setting the Energy Bid Floor

Energy Imbalance Market Year 1 Enhancements Phase 2. Draft Final Proposal

Mileage savings from optimization of coordinated trucking 1

Locational Marginal Pricing II: Unlocking the Mystery

Dispatching Variable Generation Resources

Demand Response and Scarcity Pricing

2. Market Operations Overview

Locational Marginal Pricing (LMP): Basics of Nodal Price Calculation

Committed Offer: Offer on which a resource was scheduled by the Office of the Interconnection for a particular clock hour for the Operating Day.

PJM InSchedule User Guide

Further Analyses of the Exercise and Cost Impacts of Market Power In California s Wholesale Energy Market

Procedia - Social and Behavioral Sciences 189 ( 2015 ) XVIII Annual International Conference of the Society of Operations Management (SOM-14)

Introduction to the Demand Response Auction. IESO Training

SmartNet project: TSO-DSO interaction architectures to enable DER participation in ancillary services markets

INDEPENDENT SYSTEM OPERATORS (VI + Access Rules vs. ISO vs. ITSO)

LMP Implementation in New England

Flexibility from the Demand Side

Contingency Modeling Enhancements Issue Paper

Third Generation California Electricity Market Design

Efficient Reserve Capacity Prices in Electricity Balancing Markets with Long-term Contracts

3. Overview of Market Instruments

All NEMOs proposal for the price coupling algorithm and for the continuous trading matching algorithm, also incorporating TSO and NEMO proposals for

Day-ahead ahead Scheduling Reserve (DASR) Market

Power System Economics and Market Modeling

The Economic Benefits of Generation Revenue Assessment in Pool-Based Market Model for Restructured Electricity Supply Industry

IEEE TRANSACTIONS ON POWER SYSTEMS, VOL. 24, NO. 3, AUGUST

Designs for Ramp-Constrained Day-Ahead Auctions

Performance of Multi-agent Coordination of Distributed Energy Resources

An Adaptive Game for Pay-as-Bid and Uniform Pricing Power Pools Comparison

ISO-NE FCM Capacity Market Design Scott M. Harvey. October 9, 2007

Research & Management Science

IEEE TRANSACTIONS ON POWER SYSTEMS, VOL. 19, NO. 1, FEBRUARY Competitive Acquisition of Prioritizable Capacity-Based Ancillary Services

California Independent System Operator Corporation Fifth Replacement Electronic Tariff

Optimal Scheduling Strategy in Insular Grids Considering Significant Share of Renewables

Analysis of Electricity Markets. Lennart Söder

An Assessment of the Public Benefit Set Aside Concept Taking Into Account the Functioning of the Northeast/Mid-Atlantic Electricity Markets

March 1, California Independent System Operator Corporation, Docket No. ER Amendments to the ISO Tariff

Total revenue Quantity. Price Quantity Quantity

Multi-Agent Electricity Market Simulation with Dynamic Strategies & Virtual Power Producers

Design options of TERRE Project. (Trans European Replacement Reserves Exchange) Executive Summary

Load Granularity Refinements. Pricing Study Description and Implementation Costs Information Request

Justifying Advanced Finite Capacity Planning and Scheduling

Chapter Summary and Learning Objectives

Fundamentals of Markets

REVENUE SUFFICIENCY GUARANTEES AND COST ALLOCATION William W. Hogan i May 25, 2006

Two Settlement PJM /06/2016

IB Economics Competitive Markets: Demand and Supply 1.4: Price Signals and Market Efficiency

Sensitivity Analysis Of The National Electricity Market

P L. Power Systems Laboratory. Andrés Vargas Serrano

Outline. Introduction. Introduction. Overview of Microgrid Management and Control

EUPHEMIA Public Description PCR Market Coupling Algorithm

Introduction to RRG Drafting Team Proposal

Gas Prices and Offer Price Flexibility in Other ISO/RTO Markets

California Independent System Operator Corporation Fifth Replacement Electronic Tariff

Hydropower as Flexibility Provider: Modeling Approaches and Numerical Analysis

6.1.9 IFM Initial Conditions

The Iberian Electricity Market - Impacts on power producer profits, consumer surplus and social welfare in the wholesale market

AP Microeconomics Chapter 4 Outline

Flexible Ramping Product. Draft Technical Appendix

ISO REVISED STAGING PLAN NO. 7

Modeling of competition in revenue management Petr Fiala 1

LOAD SERVING ENTITIES PJM REGION

Modeling the Restructured Illinois Electricity Market as a Complex Adaptive System

Assessment of Reliability and Quality Measures in Power Systems

La regulación del incierto futuro de los sistemas eléctricos

Uniform Price vs. Differentiated Payment Auctions

2007 Thomson South-Western

A Probabilistic Security Criterion for Determination of Power Transfer Limits in a Deregulated Environment

Requirements Analysis and Specification. Importance of Good Requirements Analysis

Residual imbalance energy settlement and ramp rate changes for self-scheduled variable energy resources

Pricing Logic Under Flexible Modeling of Constrained Output Generating Units

Basics of Economics. Alvin Lin. Principles of Microeconomics: August December 2016

Self-Organizing Traffic Control via Fuzzy Logic

Planning Optimized. Building a Sustainable Competitive Advantage WHITE PAPER

Ph.D. Defense: Resource Allocation Optimization in the Smart Grid and High-performance Computing Tim Hansen

Timing of Markets- the Key Variable in Design of Ancillary Service Markets for Power Reserves

Scheduling and Pricing of Coupled Energy and Primary, Secondary, and Tertiary Reserves

Terms of Reference AG 2017/01

Load Granularity Refinements Issue Paper

Local Market Power Mitigation Enhancements

The OTC Emission Reduction Workbook 2.1: Description and User s Manual

Impact of EIM Imports on Carbon and REC accounting. Clare Breidenich Western Power Trading Forum Regional Issues Forum September 7, 2017

Energie-Control Austria Executive Board Ordinance on Provisions for the Gas Market Model (Gas Market Model Ordinance 2012) Title 1 Principles

Increasing Participation in Balancing Support

Draft Whitepaper to Platte River Board of Directors

Unions and Labor Market Monopoly Power

Imbalance Conformance Enhancements. Issue Paper & Straw Proposal

Econ 101, section 3, F06 Schroeter Exam #2, Red. Choose the single best answer for each question.

Transcription:

Electric Power Systems Research 77 (2007) 46 54 Realistic electricity market simulator for energy and economic studies José L. Bernal-Agustín a, Javier Contreras b,,raúl Martín-Flores c, Antonio J. Conejo b a University of Zaragoza, C/María de Luna, 3, Zaragoza 50018, Spain b University of Castilla-La Mancha, Campus Universitario s/n, Ciudad Real 13071, Spain c Airbus Spain S.L., Paseo John Lennon, Getafe 28906, Spain Received 30 June 2005; received in revised form 20 December 2005; accepted 15 January 2006 Available online 28 February 2006 Abstract Electricity market simulators have become a useful tool to train engineers in the power industry. With the maturing of electricity markets throughout the world, there is a need for sophisticated software tools that can replicate the actual behavior of power markets. In most of these markets, power producers/consumers submit production/demand bids and the Market Operator clears the market producing a single price per hour. What makes markets different from each other are the bidding rules and the clearing algorithms to balance the market. This paper presents a realistic simulator of the day-ahead electricity market of mainland Spain. All the rules that govern this market are modeled. This simulator can be used either to train employees by power companies or to teach electricity markets courses in universities. To illustrate the tool, several realistic case studies are presented and discussed. 2006 Elsevier B.V. All rights reserved. Keywords: Electricity markets; Energy market simulator; Simulation software 1. Introduction Power system restructuring has introduced competition in the electricity sector during the last 15 years. Within a market environment, producers compete either in spot markets, such as the pool, or through bilateral contracts. In spot markets, producers and consumers bids result in clearing prices through an auction mechanism. In many markets, a simple auction algorithm is a key part of the electricity market design. However, a simple auction mechanism does not properly account for complex technical and economical constraints. Building a realistic electricity market simulator is not an easy task [1]. Different markets involve different bidding rules [2,3] and different clearing algorithms. In recent years, sophisticated market simulation tools [4] have become available to the power community, some of them making use of JAVA and/or MATLAB-based components [5,6], multiagent system technology [7 9] and even integrated software platforms [10]. On the other hand, simpler simulators [11] might be appropriate for training purposes, but they might not be accurate enough to be used in industrial environments. Complex bidding rules and real- Corresponding author. Tel.: +34 926 295464; fax: +34 926 295361. E-mail address: Javier.Contreras@uclm.es (J. Contreras). istic market clearing algorithms need to be modeled in detail to analyze and replicate results using real data. This is a novel contribution of the simulator presented in this paper. With the maturing of the electricity markets, companies require tools that can replicate the complex bidding conditions and the clearing of the markets, as is the case of the day-ahead electric energy market in mainland Spain. The simulator described in this paper includes a sophisticated graphical interface that allows its use in industry environments. The contributions of this paper are three-fold: It provides an electricity market simulator that reproduces realistically the functioning of the electricity market of mainland Spain. The simulator includes a sophisticated graphic interface that makes it particularly useful in an industrial environment. The simulator is able to precisely mimic the actual working and the results of the day-ahead energy market within the electricity market of mainland Spain. We believe this paper might encourage the development of other simulators mimicking electricity markets elsewhere. This might result in better training of operators and better understanding of electricity markets. 0378-7796/$ see front matter 2006 Elsevier B.V. All rights reserved. doi:10.1016/j.epsr.2006.01.007

J.L. Bernal-Agustín et al. / Electric Power Systems Research 77 (2007) 46 54 47 The electricity market in Spain was launched in January 1998, after a new electricity law was released at the end of 1997. It constituted a new legal and institutional framework that introduced competition amongst producers and consumers. The former cost minimization model was replaced by a model where economic agents optimized their decisions independently. In this new market structure, economic agents are generators, distributors, 1 retailers, qualified customers and external agents. Since 1998, four markets compose the electricity market framework in Spain: (i) the day-ahead market, (ii) the ancillary services market, (iii) the hour-ahead market and (iv) the real-time imbalance correction process [12,13]. The most important one is the day-ahead market, managed by the Market Operator (MO). Once the dayahead market is cleared a technical constraints solution process is carried out by the Independent System Operator (ISO), who is in charge of the technical aspects of the market. The day-ahead market is cleared on an hourly basis. The generators sell their production using energy bids, and qualified consumers, distribution companies and retailers buy energy using purchase bids. Although the format of the bids may look simple in principle, this realistic market allows including more complex restrictions in the bidding process, both technical and economical. The most important extra bidding conditions that are allowed by the day-ahead Spanish market are: non-divisible quantity, ramp-up and ramp-down rate limits and minimum revenue requirement. A detailed account of these conditions is presented in the next section. In the day-ahead market, a supply curve is built up for each hour considering the selling bids ordered by increasing prices and also a demand curve is built up considering the buying bids ordered by decreasing prices. The intersection of the supply and demand curves determines the selling and buying bids that are accepted; the hourly market price is the price of the last accepted selling bid. This process results in a uniform price for every hour. Additional conditions imposed by the extra bidding constraints are solved using a repair heuristic algorithm [14]. This algorithm resolves the technical infeasibilities that may occur because of violation of complex bidding conditions. Within the framework of the Spanish electricity market, this paper provides a realistic simulator that reproduces the main features of the sophisticated day-ahead electric energy market. The paper is organized as follows. Section 2 presents the rules of the Spanish electricity market on which the market simulator is based, as well as several illustrative examples where the effect of the extra bidding conditions on prices and energies is shown, Section 3 shows several case studies based on realistic scenarios and Section 4 provides some relevant conclusions. 2. Day-ahead electricity market This section is devoted to describing the most relevant aspects of the day-ahead electricity market of mainland Spain, which is reproduced using the developed simulator. Note that we only 1 Note that distributors buy energy in the pool just to sell it to its regulated customers. consider the day-ahead market in our simulations, since 90 95% of the final price is related to this market. Note also that in the Spanish electricity market there are six balancing markets whose level of trade accounts for less of 10% of the final price [13,14]. The timeframe for the simulation is 24 h. Both energy and economic results are obtained in an hourly basis and also as aggregate values. A detailed description of the market clearing algorithm of the day-ahead market can be found in [14]. 2.1. Market clearing algorithm In the day-ahead electric energy market, market participants can be either sellers generating companies or buyers demands. A generating company usually owns several units, or generators. Buyers in the day-ahead market can be retailers, qualified consumers or external agents whose participation as qualified consumers in the electric market is authorized [14]. Distributors that sell energy to regulated customers are also buyers in the day-ahead market. In this market, the MO has the task of clearing hourly selling and buying bids, submitted by the sellers and the buyers, respectively. Every bid consists of a maximum buying price and an amount of energy. For each hourly scheduling period there can be as many as 25 blocks for any single unit (buyer or seller), with a different price for each of the blocks. For any given hour and unit, prices must increase (decrease) from block to block in case of selling (buying) bid. Selling bids can include additional conditions, such as: ramp-up and ramp-down limits, and minimum revenue. Buying bids do not include additional conditions. Once the buying and selling bids are submitted, the objective of the MO is to find a solution that determines the 24 clearing prices (corresponding to the 24 hourly scheduling periods of the daily scheduling horizon) and the assignment of power to each of the production units whose owners have submitted bids. The sellers have the possibility of incorporating extra conditions in addition to prices and quantities. In this case, they submit complex bids. Conditions associated to complex bids reflect constraints that couple production at different times, technical constraints and revenue requirements of the producers. The extra conditions, as described in the Spanish Market Activity Rules [14] are: 1. Non-divisible quantity: The quantity of the cheapest bid can be designated as non-divisible, i.e. in case the bid is accepted, it should be for the total amount, not for a fraction of it. This condition facilitates a feasible schedule for thermal units that must run above a minimum operating level. 2. Ramp-up and ramp-down maximum rates: The maximum variation of the unit output between two consecutive hours can be specified. That is, for the considered unit, the energy scheduled by the matching algorithm for two consecutive hours must meet the maximum variation (increasing or decreasing) condition specified as a MW/min quantity. This condition can include the start-up and shut-down maximum rates as well.

48 J.L. Bernal-Agustín et al. / Electric Power Systems Research 77 (2007) 46 54 3. Minimum revenue: This condition is specified with a fixed term in cd and a variable term in cd /kwh. The specified minimum revenue is the sum of two terms: the fixed term and the variable term times the sum of the dispatched energy. This value must be lower than the revenue obtained by multiplying the specified matched quantities times the final hourly prices. It should be noted that this asymmetric condition is allowed by the regulator to promote capacity investments. The matching algorithm performed by the MO is as follows: 1. Calculation of the crossing point between the aggregate supply and demand curves, and calculation of the corresponding hourly clearing prices. Each clearing price corresponds to the selling bid of the last production unit that was necessary to meet total demand for that period. 2. Assignment to each selling unit of the amount of energy that was submitted as part of the bid, provided that the selling bid price is lower than or equal to the marginal price and that there is enough power demand at that price or above it. 3. Assignment to each buyer of the amount of power that was demanded, provided that the buying bid price is higher than or equal to the marginal price and that there is enough demand at that price or below it. 4. The MO checks if all the accepted productions fulfill the ramp-up and ramp-down rate limits. If a unit produces a quantity that is beyond its allowed production, this quantity is reduced to the ramp-up limit, starting from the most expensive bid. Similarly, if a unit produces below the rampdown limit, its production is increased up to the ramp-down limit, starting from the cheapest bid. 5. The MO verifies the non-divisible quantity condition. The non-compliant bids are ordered by increasing quantity and they are withdrawn one at a time beginning with the smallest one until the remaining units are compliant. 6. The MO verifies whether the minimum revenue condition is met for each unit. It orders the units according to the difference between the actual and minimum revenue, such that the unit with the biggest difference is the first to be expelled from the auction. The production withdrawn in steps 4 6 is replaced by the same amount produced by other generating units such that generation and demand are always balanced. The above process is repeated for all time periods. Note that, since the results are disaggregated in a unit-by-unit basis, a generating company has to retrieve all the data provided by the MO regarding its units to calculate its own economic and energy results, such as the company s daily profits or the total energy allocated to all its units. Fig. 1 shows the flowchart of this algorithm, whose detailed description is available in [14]. Note that an optimal solution is not guaranteed by this algorithm, only a feasible one. However, our aim is to accurately reproduce the current Spanish market clearing algorithm, not to obtain an optimal solution. Other studies, such as the one in [15], show the inefficiencies of auction-based algorithms similar to the one described in this Fig. 1. Simple and complex bids clearing algorithm. paper. In contrast, other market clearing algorithms based on multiperiod auctions [16] and network-constrained multiperiod auctions for pool-based electricity markets [17] can deal better with intertemporal constraints, cross-subsidies between generators and demands and the effect of the network constraints in the clearing of the market. In the next subsections we describe the effect of the extra conditions on the complex bids using illustrative examples that show how these conditions associated to the bids can modify the final prices and accepted energies. We do not consider the non-divisible condition because the severe limitations imposed by the MO on its application make its effect negligible (see [14], Rule 8, pp. 34 35). 2.2. Ramp rate limit condition This condition may or may not be included in the bid, since it is optional. If the declared value is zero, the market clearing algorithm interprets that the generator is not using that limit. Typical values of ramp rate limits in the Spanish market range from 0.5 to 4 MW/min. To check whether the ramp rate condition is met, it is assumed that the variation in energy from 1 h to the next is linear. If, in any hour, a unit does not meet this condition, its initially assigned energy is limited by the ramp rates. Two illustrative examples show the application of the ramp rate condition and its effect on prices and energies. Our aim with these examples is to show that the same ramp rate limit can have different effects on prices and energies depending on the quantities and prices of the other bids. Both examples consider

Table 1 Selling bids for the ramp rate limit examples J.L. Bernal-Agustín et al. / Electric Power Systems Research 77 (2007) 46 54 49 Block Selling 1 and selling 2 bids for all hours except hour 11 Selling 1 bids for hour 11: examples 1 and 2 Selling 2 bids for hour 11: example 1 Selling 2 bids for hour 11: example 2 Price (cd /kwh) Energy (MWh) Price (cd /kwh) Energy (MWh) Price (cd /kwh) Energy (MWh) Price (cd /kwh) Energy (MWh) 1 0.5 50 0 50 0 50 0 50 2 1 45 1.6 85 1.9 45 1.6 60 3 2 40 2 40 2 40 2 40 4 3 35 3 35 3 35 3 35 Table 2 Buying bids for the ramp rate limit and minimum revenue condition examples Block Buying 1 bids for all hours Buying 2 bids for all hours Price (cd /kwh) Energy (MWh) Price (cd /kwh) Energy (MWh) 1 2.25 50 3.5 50 2 2 40 3 40 3 1.75 30 1.5 30 4 1.5 20 0.75 20 5 1.25 10 0.5 10 6 0 5 0 5 four generating units, two selling units named selling 1 and selling 2, and two demands named buying 1 and buying 2, respectively. Only the selling 1 unit uses the ramp limit rates both for ramping up and down. Bidding data are presented in Tables 1 and 2 and the ramp rate limit value is set to 0.5 MW/min for the selling 1 unit. It can be observed that the selling bids are always identical, except for hour 11, in both examples. The description of the results obtained follows. 2.2.1. Example 1: change in prices and accepted energies due to the ramp rate limits This example compares the results including and not including a ramp rate limit. Fig. 2 shows the selling and buying bids for hour 10; since the bids are identical for the previous 9 h, the effect of the ramp rate limit is not noticeable until the transition from hour 10 to 11 occurs. Note that, according to the Spanish electricity market rules, the final price corresponds to the last accepted selling offer just before the selling and buying curves intersect; that explains why the price is not equal to 1.75 cd /kwh but 1 cd /kwh. In hour 10, the total accepted energy is 190 MWh, equally split between both selling units. Fig. 3 shows the bidding curves in hour 11 assuming that there are no ramp rate limits; the price is 1.6 cd /kwh and the accepted energy is 185 MWh: 135 MWh correspond to the selling 1 unit and 50 MWh to the selling 2 unit. Thus, the selling 1 unit has increased its production in 40 MWh. If the ramp rate limit condition is applied to the selling 1 unit the results are also shown in Fig. 3. The price is 1.9 cd /kwh, which is higher than the one without ramp limits, 1.6 cd /kwh. In addition, the total accepted energy has been reduced in 5 MWh: 180 MWh (110 MWh for the selling 1 unit and 70 MWh for the selling 2 unit) as compared to the case without ramp limits. 2.2.2. Example 2: no change in prices and accepted energies due to the ramp rate limits In this example, Fig. 4 shows the selling and buying curves in hour 11 with and without ramp rate limits. The resulting price without ramp rate limits is equal to 1.6 cd /kwh and the total accepted energy is 210 MWh: 114.95 MWh corresponding to Fig. 2. Ramp rate limit examples 1 and 2: buying and selling bids in hour 10. Fig. 3. Ramp rate limit example 1: buying and selling bids in hour 11.

50 J.L. Bernal-Agustín et al. / Electric Power Systems Research 77 (2007) 46 54 Table 3 Selling bids for the minimum revenue condition examples Block Selling 1 unit Selling 2 unit Selling 3 unit Price (cd /kwh) Energy (MWh) Price (cd /kwh) Energy (MWh) Price (cd /kwh) Energy (MWh) 1 0.5 50 a 0 50 0 50 2 1 30 1 60 1 40 3 2 20 2 40 2 30 4 3 10 3 35 3 20 a For hours 2 and 3 the offered energies are 25 and 10 MWh, respectively. the selling 1 unit and 95.5 MWh to the selling 2 unit. Fig. 4 also shows the selling and buying curves with ramp rate limits. The results are the same, although the energy is split differently: 105 MWh for each unit. That means that the selling 1 unit ramp rate has limited its energy production but this limitation has been compensated by the production of the selling 2 unit without an impact in the final price and total accepted energy. 2.3. Minimum revenue condition This condition, already described in Section 2.1, is specified with a fixed and/or a variable term. In the case of a seller s revenue not reaching its minimum revenue condition, the MO only considers the first bidding block of that unit for the first 3 h. Thus, a scheduled shut down of the unit is allowed if the quantity bid decreases from hour to hour in the first 3 h (see [14], Section 4.3.2.3, p. 10). Table 3 shows this bidding behavior of the selling 1 unit, whose variable term of the minimum revenue condition is 2 cd /kwh. We present two illustrative examples that show the different effects of the minimum revenue condition on prices and energies. 2.3.1. Example 1: change in prices and accepted energies due to the minimum revenue condition We consider all the buying units of Table 2 and the units selling 1 and selling 2 of Table 3. Fig. 5 shows the results including and not including a minimum revenue condition imposed by the selling 1 unit. In this figure, it can be observed that the price doubles its value if the condition is imposed and the accepted energy decreases. This is due to the fact that the selling 1 Fig. 5. Minimum revenue condition example 1: buying and selling bids. unit is withdrawn after the first 3 h, decreasing the total amount of energy offered and therefore shifting to the left the bidding curve. 2.3.2. Example 2: no change in prices due to the minimum revenue condition In this example we consider all the buying units of Table 2 and all the selling units of Table 3. Fig. 6 shows the results including and not including a minimum revenue condition imposed by the selling 1 unit. In this figure, it can be observed that the price does not change its value if the condition is imposed, but the accepted energy dramatically decreases. In this case, the unit that replaces the selling 1 unit does have a different effect as compared to the previous example. Fig. 4. Ramp rate limit example 2: buying and selling bids in hour 11. Fig. 6. Minimum revenue condition example 2: buying and selling bids.

J.L. Bernal-Agustín et al. / Electric Power Systems Research 77 (2007) 46 54 51 2.4. Practical experience with complex bids Previous experience in the use of simple and complex bidding conditions has shown that these conditions have been useful for the agents in general, but not all of them. Until 1 July 2005, only the ramp rate condition had been regularly used in the dayahead market. The minimum revenue condition (fixed term and variable term) had the same disadvantage that simple bids at prices different from zero had: they were the first bids to be shaved in the merit order. The minimum revenue condition had only been used to protect the bids of expensive generating units during the weekend, where the rescheduling of units after taking into account all the complex conditions was not significantly altered. Since 1 July 2005 (after the resolution of 24 June 2005 from the Office of the State Secretary for Energy published in the Official State Gazette on 30 June 2005 amending several Electricity Market Rules) the adjustment process due to technical constraints is based upon bids that are explicitly declared in a new rescheduling market. In this new market, that takes place just after the day-ahead market, the units whose energy was accepted by the Market Operator offer a price at which they are willing to re-buy that energy in the rescheduling market. This second market is of the pay-as-bid type. Currently, it is common practice that the generating units whose bids are expected to set the marginal price use both the ramp rate limit and the minimum revenue conditions. The indivisibility condition is almost never used in the daily market. What is more common is that the first block is offered at zero price. Current experience also tells us that the need for complex bids is relative, since the agents learn how to express their bids in any market structure that stays stable in time. In addition, complex bids limit the transparency of the market, since the resulting prices require their knowledge. This problem has been fixed in the Spanish electricity market with the publication of all the bidding data after 3 months of the submission of all the bids. 3. Simulation results from actual cases We illustrate first the capabilities of the simulator and later show its ability to run realistic cases that are obtained from the Spanish MO [13]. Generator and demand data input can be performed either using a windows-based interface or through files. For real-world cases, we have developed a program that converts the format of the Spanish market data into a set of files that are readable by the simulator. A brief introduction to the use of the simulator follows. 3.1. Simulator basics To start a simulation, a generating company has to introduce the number of units that it owns, including all their technical and economic data and economic conditions. Fig. 7 shows an example of a generating unit complex bid, including up to 25 blocks and their corresponding prices for a particular hour. Technical and economic data of that unit are shown as well. For the demand, the only difference with respect to a generating company is that technical and economic data do not appear in the input interface. Note that in Fig. 7 the conditions Fig. 7. Example of a generating unit bid data in one particular hour.

52 J.L. Bernal-Agustín et al. / Electric Power Systems Research 77 (2007) 46 54 bar chart) and aggregate traded energy (grey bar chart) for 24 h. 3.2. Case studies Fig. 8. Aggregate bids, matched demands and prices for 24 h. named up grad. = 0 MW/min, down grad. = 0 MW/min, on grad. = 0 MW/min and off grad. = 0 MW/min mean that the four ramp limits are not enforced as well. After all the buying and selling bids are introduced for all periods, the simulator proceeds to calculate final prices, final accepted demands, the amount of energy that is allocated to each company and the energy and economic data per unit and company. For the purpose of illustration, Fig. 8 shows marginal prices (solid line), aggregate selling bids (black We present the results obtained using the simulator with data obtained from the Spanish day-ahead electricity market [13].In particular, we have selected 4 days of 2004. These days correspond to the 1, 3, 6 and 7 of March 2004, which are Monday, Wednesday, Saturday and Sunday, respectively. We have also performed several tests concerning the technical and economic constraints to detect their effect in the final prices and allocated energy. Agents in the Spanish electricity market submit their bids to the MO using a protocol specified in the Market Activity Rules [14]. This protocol includes all the features required for complex bids, as explained in Section 2.2. Once the market is cleared, the participants have access to the 24 marginal prices and the energy allocated to them. Market prices, aggregate offers and aggregate demand bids constitute public information available in the MO Web page [13] 1 day after the auction has taken place. The amount of energy that has been allocated to each generating unit is private information, which is sent to each agent individually. Fig. 9. Supply and demand intersection for hour 4 of Monday, 1 March 2004. Fig. 10. Supply and demand intersection for hour 20 of Monday, 1 March 2004.

Table 4 Relevant data and results for the 4 days considered J.L. Bernal-Agustín et al. / Electric Power Systems Research 77 (2007) 46 54 53 Day Number of units Energy rejected due to ramp rates (1) and minimum revenue (2) conditions (MWh) Offered energy (MWh) Accepted energy (MWh) Buying Selling 1 2 Buying Selling Buying Selling 1 March 2004 62 124 2275.8 142763.8 729425.9 995342.1 638426.3 638426.3 3 March 2004 61 123 2904.8 110342.8 782339.9 973530.2 660517.9 660517.9 6 March 2004 58 118 3078.2 172348.3 658495.7 937944.3 539987.0 539987.0 7 March 2004 57 121 4103.2 197900.9 596335.5 949766.9 505004.5 505004.5 Fig. 11. Monday, 1 March 2004, simulator results. To compare the results available on the MO Web page with the ones provided by the simulator, we have fed the same actual bidding data into the simulator, obtaining the same prices for the clearing of bids of the 7 days considered. 2 The simulations have been executed in a Pentium 2 GHz computer using Visual Basic; the average CPU time per simulated day is 25 s approximately. Table 4 provides the number of selling and buying units which have participated in each 1 of the 4 days studied. Table 4 also provides the amount of energy rejected due to ramp rates and minimum revenue conditions, the total amount of energy offered and the total amount of accepted energy. Economic results are not presented, since they depend on actual costs of the generating units, and they are private information. Note that, assuming that a company knows its own costs and can estimate the competitors costs, this company can also estimate the future revenue obtained with its own units. An issue of interest is the effect of the technical and economic constraints on prices. It can be observed in Table 4 that the energy rejected due to minimum revenue constraints is much higher than the rejected energy due to ramp limits. This feature has been frequently observed in the day-ahead electricity market in Spain. In addition, note that the rejected energy due to technical or economic constraints is always replaced by energy provided by other (similar or more expensive) units that do not impose these constraints or whose constraints are satisfied in the auction. Consequently, the random effect on the final prices due Fig. 12. Wednesday, 3 March 2004, simulator results. to complex bidding depends on the probability of the replacement bids having (or not) similar prices to the ones submitted by the rejected units. Note that only the bids whose prices are just equal or above the original bid s prices are used as replacement bids. This effect is more remarkable during high demand periods. In this case, the difference in prices resulting from simple and complex bids is higher, since higher demands usually imply higher bidding slopes and, therefore, higher final prices, as seen in Figs. 9 and 10 for two different hours. Figs. 11 14 show the simulator results for some of the days of the week under study, where all the discussed issues are shown. In particular, in hour 19 of Fig. 11 the difference between the prices with and without constraints is negligible, but the accepted energy is 517 MWh smaller with complex bids. This phenomenon has been already described in example 2 of Section 2.3. On the contrary, in hour 2 This is clear since we have used exactly the same clearing algorithm as the one used by the MO with the same data. Fig. 13. Saturday, 6 March 2004, simulator results.

54 J.L. Bernal-Agustín et al. / Electric Power Systems Research 77 (2007) 46 54 Fig. 14. Sunday, 7 March 2004, simulator results. 20 of Fig. 11, the price with complex bids is much higher, but the amount of accepted energy is 160 MWh smaller only. This issue is described in example 1 of Section 2.3. 4. Conclusions This paper presents a realistic simulator for the day-ahead electricity market of mainland Spain. This simulator contains most of the actual features that govern this complex day-ahead market. It can be used for training purposes both in industry and academia. Interested agents can analyze their corresponding economic and energy results to improve subsequent bidding rounds in the actual day-ahead market. The simulator can be a useful tool for the generating companies, since they can study different scenarios, modifying the way in which they offer their energy on the market in order to maximize their profits. The simulator can also be a useful tool for the buyers, allowing them to test several feasible bidding strategies, according to their own preferences. Another interesting application of the simulator consists in determining the effect of technical and economic constraints (associated to selling bids) in hourly prices. However, this effect is not very relevant in the Spanish day-ahead market. The case studies are significantly complex and the execution times are reasonably small for the simulator to be used on a daily basis by electricity companies. Acknowledgment The authors wish to thank UNIÓN FENOSA GENERACIÓN for its interest in the simulator presented in this paper. References [1] A. Debs, C. Hansen, Y. Wu, Effective electricity market simulators, IEEE Comput. Appl. Power 14 (January) (2001) 29 34. [2] I. Otero-Novas, C. Meseguer, C. Batlle, J.J. Alba, A simulation model for a competitive generation market, IEEE Trans. Power Syst. 15 (February) (2000) 250 256. [3] A. Martini, P. Pelacchi, L. Pellegrini, M.V. Cazzol, A. Garzillo, M. Innorta, A simulation tool for short-term electricity markets, in: Proc. IEEE 22nd Int. Conf. Power Ind. Comput. Appl. PICA, Sydney, Australia, May 2001, pp. 112 117. [4] J. Kumar, G. Sheblé, Auction market simulator for price based operation, IEEE Trans. Power Syst. 13 (February) (1998) 250 255. [5] PowerWorld Corporation Simulator [online], http://www.powerworld. com/products/simulator.html. [6] J. Contreras, A. Losi, M. Russo, A JAVA/MATLAB simulator for power exchange markets, in: Proc. IEEE 22nd Int. Conf. Power Ind. Comput. Appl. PICA, Sydney, Australia, May 2001, pp. 106 111. [7] H. Liu, B. Yuan, H. Dai, J. Lin, Y.X. Ni, F.F. Wu, Framework design of a general-purpose power market simulator based on multi-agent technology, in: Proc. IEEE Power Eng. Soc. Summer Meet., Vancouver, Canada, July 2001, pp. 1478 1482. [8] D. Bunn, F.S. Oliveira, Agent-based simulation an application to the new electricity trading arrangements of England and Wales, IEEE Trans. Evol. Comput. 5 (October (5)) (2001) 493 503. [9] I. Praça, C. Ramos, Z. Vale, M. Cordeiro, Mascem: a multiagent system that simulates competitive electricity markets, IEEE Intell. Syst. 18 (November/December (6)) (2003) 54 60. [10] M. Madrigal, M. Flores, Integrated software platform to teach different electricity spot market architectures, IEEE Trans. Power Syst. 19 (February) (2004) 88 95. [11] J. Contreras, A.J. Conejo, S. de la Torre, M.G. Muñoz, Power engineering lab: electricity market simulator, IEEE Trans. Power Syst. 17 (May) (2002) 223 228. [12] J.J. González, P. Basagoiti, Spanish power exchange and information system design concepts and operating experience, in: Proc. IEEE 21st Int. Conf. Power Ind. Comput. Appl. PICA, Santa Clara, CA, May 1999, pp. 245 252. [13] Compañía Operadora del Mercado Español de Electricidad [online], http://www.omel.es. [14] Electricity Market Activity Rules [online], http://www.omel.es/en/ pdfs/emrules.pdf. [15] A.J. Conejo, F. Galiana, J.M. Arroyo, R. García-Bertrand, C.W. Chua, M. Huneault, Economic inefficiencies and cross-subsidies in an auctionbased electricity pool, IEEE Trans. Power Syst. 18 (February) (2003) 221 228. [16] J.M. Arroyo, A.J. Conejo, Multiperiod auction for a pool-based electricity market, IEEE Trans. Power Syst. 17 (November) (2002) 1225 1231. [17] A. Motto, F. Galiana, A.J. Conejo, J.M. Arroyo, Network-constrained multiperiod auction for a pool-based electricity market, IEEE Trans. Power Syst. 17 (August) (2002) 646 653. José L. Bernal-Agustín received his B.S. in electrical engineering and his Ph.D. degree in electrical engineering from the University of Zaragoza (Spain), in 1991 and 1998, respectively. In 1991, he joined the University of Zaragoza, where he is currently associate professor. His current interest areas are applications of evolutionary algorithms in electric power systems, power distribution networks design, electric markets and renewable energy sources. Javier Contreras received his B.S. in electrical engineering from the University of Zaragoza, Spain, his M.Sc. from the University of Southern California and his Ph.D. from the University of California, Berkeley, in 1989, 1992 and 1997, respectively. His research interests include power systems planning, operations and economics and electricity markets. He is currently associate professor at the University of Castilla-La Mancha, Ciudad Real, Spain. Raúl Martín-Flores received his B.S. in electrical engineering from University of Zaragoza (Spain), in 2001. He is currently an engineer at Airbus Spain S.L. His research interest includes electricity markets and power system analysis. Antonio J. Conejo received a S.M. degree from MIT, Cambridge, MA, in 1987, and a Ph.D. from the Royal Institute of Technology, Stockholm, Sweden, in 1990. He is currently a full professor of electrical engineering at the Universidad de Castilla-La Mancha, Ciudad Real, Spain. His research interests include control, operations, planning, economics and restructuring of electric energy systems, as well as statistics and optimization theory and its applications.