A JAVA/MATLAB Simulator for Power Exchange Markets - CiteSeerX

35 downloads 1408 Views 235KB Size Report
A Web server is resident on the remote host: the server allows the clients connecting from local hosts to download and start up the applets (Bidder applet or the.
A JAVA/MATLAB SIMULATOR FOR POWER EXCHANGE MARKETS J. Contreras*, Member, IEEE

A. Losi**, Member, IEEE

M. Russo**, Member, IEEE

*E.T.S. de Ingenieros Industriales – Universidad de Castilla-La Mancha – Ciudad Real, Spain **Dipartimento di Ingegneria Industriale - Università degli Studi di Cassino – Cassino, Italy – e-mail:[email protected] Abstract: The discussion about the pros and cons of several proposed auction models in electricity markets is still open. Any proposal on the structure of a deregulated electric energy industry should be supported by scientific foundation and by intensive simulations to assess both the economical aspects and the technical issues. Based on the general structure of a power system and market simulator that has been recently proposed, this paper presents a simulator of Power Exchange Markets. Bidding proposals are defined in a JAVA-based environment, in which communication between the producers/consumers and the auction regulator is simulated. A MATLAB application, which is interfaced to the JAVA environment by a Tcl program, works out the market clearing price together with the quantities that each bidder is allowed to buy or sell. The simulator is extremely flexible and useful to compare the performance of Power Exchange Markets adopting different methods of treating technical and security constraints in the MATLAB application. A significant numerical example is presented to highlight the features of the tool. Keywords: simulation software, deregulation, power exchange market. I. INTRODUCTION The process of deregulation in the power industry has created a new environment where trading is conducted in different markets. In this environment, power producers compete to obtain higher market share through spot market and bilateral contracts. In the spot market, market clearing prices are based on bids submitted by suppliers and consumers. Bidding and clearing of the spot market are based on the auction market structure, in the following referred to as Power Exchange Market (PXM). Many countries have adopted simple auction matching algorithms as part of their electricity pool design [1]. The simple auction receives the day-ahead supplier and consumer hourly bids and produces the hourly schedule and market price in one round. However, this simple method fails to capture inter-temporal links and other complex effects that appear in power systems, such as ramp rates, start-up cost, no-load cost, etc.; it has to rely completely on market participants’ ability to reflect their economical characteristics into their bids to achieve a feasible dispatch. The simple auction structure can be modified to take into account technical constraints and power system non linearity. For instance, in the Spanish market supplier bids are allowed using additional conditions besides price and quantity (semicomplex auction). These additional conditions include: non-

0-7803-6681-6/01/$10.00 © 2001 IEEE

106

divisible quantity bids, minimum daily income and up-anddown ramp rates in order to help the algorithm to take into account the suppliers’ requirements [2]. On the other hand, other countries have adopted an iterative auction structure (i.e. repeated simple auctions) to give market participants more than one opportunity to reflect accurately their operating conditions into their bids. The iterative set of rules proposed for the energy market in California by Wilson [3] is the foremost example of such a structure. To accurately evaluate the impact of different market structures and rules on the performance of the market and on the operation of the power system, intensive simulation is needed. It has to yield detailed results on both the economical and the technical objectives of the system operation. Simulation must account for the effects of technical constraints, of power system non linearity, of different auction rules and of different methods to take into account transmission network security. Simulation is also necessary to ascertain the characteristics of the information and decision-making structures. In a recent paper [4], the open structure of a software simulator, capable of highlighting the details of the operation on both the sides of economics and system security in any market structure, has been presented. It is based on the object oriented paradigm to allow the user to easily modify and extend parts of the software with minimal impact on the other parts and to interface the package to existing software tools for specific computations. In such a way, the software simulator is modular, and has the desirable characteristic of being conducive to cooperation. The different modules the simulator is made of are intended to clearly represent the different agents acting on the stage. Taking advantage of such an open structure, this paper presents a simulator of PXMs. Suppliers and consumers bid in a pool: their interactions and communications are simulated on the JAVA platform. The market clearing algorithm is implemented in MATLAB so that different methods of solving the clearing price problem and of taking into account technical constraints can be easily programmed and tested. Data exchange and synchronization between the JAVA and the MATLAB processes is performed by a Tcl interface. A significant numerical example is shown to highlight the features of the simulator. II. PXM SIMULATOR STRUCTURE The PXM simulator design is based on the Object Oriented Paradigm (OOP) so that each part of the package could be developed at its best by using the most adequate environment,

the communication between applications being allowed through adequately defined interfaces. The concept of software interfaces, typical to OOP, also allows an easy extension to existing software packages for specific computations. The operational aspects the simulator has to deal with can be divided into two main sets: communications among market agents (producers, consumers, auction regulator) and mathematical problems (in particular, the market clearing price problem). Fig. 1 reports the general structure of the simulator. Three main packages can be identified: a JAVA simulator of market communications, a MATLAB algorithm for clearing price, and a Tcl interface between the two former packages.

access the methods of the RMI server (Remote Bidder and Remote maxISO), which is based on the Remote Method Invocation (RMI) technology, available on the Java platforms of latest versions. The applet programming is based on multithreading paradigm, thus fully exploiting the networking efficiency provided by the Java platform. In practice, from the user point of view, a process on a local host must be started using either a Web browser or Java AppletViewer tool. The process must simply download a HTML page from the Web server; two pages are available whether the client is a generic bidding agent or the auction regulator.

A. JAVA simulator of market communications The communication between agents is realized within the Java environment [5]. Java Platform is a software platform for running software codes on networked computer systems, with the special feature of being hardware independent from the point of view of the software to be run: as far as software code is compiled to the Java Platform, it will run on every computer the Platform is present. It is ideal for Internet applications. Software code is of two different kinds: applets and applications. Applets rely on a browser to run; usually, they are light pieces of code and have restricted rights on files and databases. Applications do not require a browser, and are in fact like usual programs. Applets and applications are written in the Java Language, which is object oriented. Java programming allows multi-threading thus avoiding inefficiencies due to communication bottlenecks. Each agent is simulated by an applet. There are two types of applets: the Bidder applet, which simulates producers and consumers, and the maxISO applet, which simulates the auction regulator. A client-server structure based on TCP/IP protocol has been adopted for network communication among applets. The structure is outlined in fig. 1. A Web server is resident on the remote host: the server allows the clients connecting from local hosts to download and start up the applets (Bidder applet or the maxISO applet) on their machine (dashed lines). The applet on a local host asks the remote host for registration and the server program on the remote host binds the calling host name to a remote registry (continuous lines); the applet on a local host can

B. MATLAB clearing price algorithm The auction regulator has to analyze the bidding proposals and determine the market clearing price as well as which bids are accepted and which ones are rejected. The algorithm takes into account constraints such as:

MATLAB clearing price algorithm

Tcl interface



A non-divisible quantity: The cheapest bid quantity can be designated as non-divisible; that is, in case that the designated bid is accepted, it should be for the total quantity and not for a fraction of it. This condition has been implemented to take into account that some thermal units have to run above a specified minimum operating level.



A minimum daily income amount: It can be set as a prerequisite for the scheduling of the considered generating unit. This condition is specified by a minimum amount of money that a bidder requires to enter the auction. This condition has been implemented in the market clearing algorithm to minimize generators’ risks when they have to internalize start-up and no-load fuel costs in their simple bids.



Up and down ramp rates: The maximum variations of the unit output in two consecutive hours can be specified. That is, for the considered production unit, the energy scheduled by the matching algorithm in two consecutive hours must meet the maximum variation condition specified as MW/minute for increasing output and/or MW/minute for decreasing output. This condition has been implemented in the matching algorithm to take into account ramp rate limits of thermal units.

JAVA simulator of market communications Remote host

Local host Java AppletViewer Bidder

Web Server Bidder page maxISO page

Local host Web browser Bidder Local host Tcl parent process

Java AppletViewer maxISO

RMI register

MATLAB session Clearing price algorithm

RMI Server Remote Bidder Remote maxISO

Fig. 1 – Client-server structure of the JAVA/MATLAB PXM simulator. 107

Table 1 – Incremental bids of the five generators in the four time intervals. st

2nd interval 3rd interval 4th interval 1 interval Bid 1 Bid 2 Bid 3 Bid 4 Bid 1 Bid 2 Bid 3 Bid 4 Bid 1 Bid 2 Bid 3 Bid 4 Bid 1 Bid 2 Bid 3 Bid 4 Gen. 1 Gen. 2 Gen. 3 Gen. 4 Gen. 5

MW ¢Euro MW ¢Euro MW ¢Euro MW ¢Euro MW ¢Euro

7 1.80 10 1.50 8 0.90 9 1.35 20 1.50

50 2.04 30 1.56 10 0.96 10 1.50 50 1.56

60 2.10 80 1.80 55 1.20 20 1.80 90 1.65

80 2.40 90 2.10 90 1.80 35 2.10 130 1.80

7 1.80 10 1.50 8 0.90 9 1.35 20 1.50

54 2.04 30 1.56 12 0.96 10 1.50 55 1.56

56 2.10 80 1.80 53 1.20 20 1.80 85 1.65



Minimum up time: The minimum number of hours that a unit must be connected in order to work properly. The market clearing algorithm is determined in the following successive steps: • A simple matching solution is obtained assuming all bids are just “simple” bids in price and quantity. • The ramp rate limits are enforced in the scheduled quantities for each two consecutive hour periods. • The indivisibility condition is enforced. • The minimum daily income condition for those production units that have submitted it is verified, and units that do not meet such condition are not scheduled. The market clearing price algorithm has been programmed in MATLAB [6], a widely-used scientific computing environment. The main advantages of adopting MATLAB package are related to the easy matrix computation and to the exhaustive built-in mathematical library. Different clearing price algorithms can be easily programmed and substituted for the existing one.

80 2.40 90 2.10 90 1.80 35 2.10 130 1.80

7 1.80 10 1.50 8 0.90 9 1.35 20 1.50

108

60 2.10 85 1.80 55 1.20 27 1.80 80 1.65

80 2.40 90 2.10 90 1.80 28 2.10 130 1.80

7 1.80 10 1.50 8 0.90 9 1.35 20 1.50

50 2.04 30 1.56 11 0.96 10 1.50 65 1.56

65 2.10 80 1.80 54 1.20 27 1.80 75 1.65

75 2.40 90 2.10 90 1.80 28 2.10 130 1.80

assigned name. Then, the MATLAB market clearing price application is run and its results are sent back, via the Tcl interface, to the Auction Regulator applet in the JAVA simulator. III. A PXM SIMULATION To evidence the features and the performance of the PXM simulator, in the following an application is considered so as to describe in details each phase of the simulation. The application considers five generators and a single demand bidding over four time intervals; generator and demand bids are shown, respectively, in Table 1 and in Table 2. In a first case (case 1), the generators do not use extra bidding conditions, such as ramp-up rates, or minimum up times. A second case (case 2) considers that generator 1 imposes nondivisibility of its first block and generator 3 has a ramp-up rate of 50 MW/hour. Table 2 – Incremental bids of the demand in the four time intervals.

C. Tcl interface The Tool Command Language (Tcl) is a simple scripting language for controlling and extending applications [7]. It provides for generic programming facilities and, at the same time, it is embeddable: its interpreter is a library of C procedures that can be easily incorporated into applications and each new application can extend the features of the Tcl core adding new commands. A major benefit in adopting Tcl is that it makes an excellent “glue language”, thanks to the library packages that can be added. A Tcl script has been written to manage the communication between two child processes: the first is a JAVA AppletViewer process that starts the Auction Regulator applet in the JAVA simulator of the market communication; the second child process is a MATLAB session. Two communication buffers are opened to the child processes. To keep low the computational burden of the Tcl parent process, event-driven programming has been adopted. When the list of bidding proposals gathered by the Auction Regulator applet in the JAVA simulator is ready to be processed, it is passed to the MATLAB session as a matrix of

50 2.04 25 1.56 10 0.96 10 1.50 60 1.56

Bid 1 Bid 2 Bid 3 Bid 4 Bid 5 st

1 interval 2nd interval 3rd interval 4th interval

MW ¢Euro MW ¢Euro MW ¢Euro MW ¢Euro

230

10

5

10

5

3.61

2.40

1.80

1.20

0.60

530

5

10

15

5

3.61

2.40

2.10

1.50

0.60

730

5

10

5

5

3.61

2.40

1.80

1.50

0.60

810

5

5

10

10

3.61

2.40

1.80

1.20

0.60

Bidding proposals can be submitted by actors using the Bidder applet GUI; an example is shown in fig. 2 with reference to Generator #2. Each bid is characterized by the injection node number, the time interval (hour) it is referred to, the injected active power (positive if generated, negative if consumed) and the bidding price. Several bids can be submitted until the auction is stopped. When the “Finish” button is clicked, the Bidder applet remains in stand-by until the Auction Regulator replies the results. The Auction Regulator applet receives all the proposed bids; its GUI is shown in fig. 3. After performing

Fig. 2 – Bidder applet GUI for Generator #2 showing the proposed bids.

Fig. 3 – Auction Regulator applet GUI showing the received bids.

formal checks of the bids (using the “Check” button), the auction regulator can “Strike” the accepted bid proposals, thus including them into the final list of bids to be processed. Eventually, the auction regulator clicks the “Compute” button 109

and sends the final list of bids to the MATLAB session by the Tcl interface (see fig. 1). The MATLAB clearing price algorithm performs computation and yields the clearing prices. An easy-to-read

¢Euro 3.5

Table 3 – Power injection (MW) that is allowed to each generator in the four time intervals: case 1.

Total Demand

3

Gen. 1 Gen. 2 Gen. 3 Gen. 4 Gen. 5

2.5 2

Total Offer

1.65 (clearing price)

1st interval 2nd interval 3rd interval 4th interval 0.00 5.42 76.89 106.37 40.00 101.90 149.83 188.36 73.00 142.63 163.00 163.00 19.00 34.47 55.28 67.27 113.00 260.58 290.00 290.00

1.5

Table 4 – Power injection (MW) that is allowed to each generator in the four time intervals: case 2.

1 0.5 0

100

200

300

400 MW 500

Fig. 4 – MATLAB plot for the 1st time interval in case 1.

MATLAB plot pops up showing for each time interval both the total demand curve and the total offer curve: their intersection determines the clearing price and the total amount of production that is allowed to be injected. An example referring to the 1st time interval of case 1 is shown in fig. 4. The clearing prices in both case 1 and case 2 are equal to 1.65, 1.80, 2.10 and 2.10 ¢Euro for, respectively, the 1st ,2nd, 3rd and 4th time interval. Tables 3 and 4 show the results in terms of total power that is allowed to be injected by each generator respectively in case 1 and in case 2. Comparing Tables 3 and 4 it can be noticed that in case 2, to meet the ramp constraint, Generator #3 has to limit its production in the 2nd time interval (from 142.63 to 123 MW), and to meet the non-divisibility condition, Generator 1

Gen. 1 Gen. 2 Gen. 3 Gen. 4 Gen. 5

1st interval 2nd interval 3rd interval 4th interval 0.00 0.00 76.89 106.37 40.00 101.90 149.83 188.36 73.00 123.00 163.00 163.00 19.00 36.65 55.28 67.27 113.00 274.73 290.00 290.00

leaves the auction in the second hour. The results obtained by the MATLAB applications are sent back, via the Tcl interface, to the Auction Regulator applet in the JAVA simulator of market communications. The results are sent to the bidders and appear on the appropriate columns of the applet GUIs. An example of the Bidder applet GUI for Generator #2 after the auction in case 1 is shown in fig. 5. Each bidder receives some general public information that concern the clearing prices. In addition, for each bid under the column named “Curtail” a number shows whether the bid has been fully admitted to production (if equal to 1), or not admitted (if equal to 0) or

Fig. 5 – Bidder applet GUI for Generator #2 showing the results after auction in case 1. 110

partially admitted (if included in between 0 and 1); in the last case the number represents the quota of the bid that has been admitted to production. Eventually, under the column named “Loss” the share of transmission losses allocated by the ISO to the bids can be communicated to the bidders; presently, the MATLAB application does not perform any loss allocation and, consequently, all zeros appear in this column. All these information about bids are strictly private and sent only to the bidder who proposed such bids.

[3] R. Wilson, “Activity Ruls for a Power Exchange,” POWER conference, University of California Energy Institute, Berkeley, March 1997.

IV. CONCLUSIONS

[7] J.K. Ousterhout, Tcl and the Tk Toolkit, Reading, MA, AddisonWesley, 1994

A Power Exchange Market simulator has been presented. The simulator is a useful tool to evaluate the effects of different market structure on the performance of the market and on the operation of the power system. The flexibility and extensibility of the open software structure of the simulator allows the user to easily include market rules and different methods of solving the auction clearing price problem and of taking into account the technical constraints. Simulation of a case study has shown the features of the tool. V. ACKNOWLEDGMENTS

[4] A. Losi and M. Russo, “A Simulation Tool for Evaluating Technical and Economical Issues in the Deregulated Electric Power Industry,” IEEE PES Summer Meeting, Seattle, July 2000. [5] K. Arnold , and J. Gosling, The Java Programming Language, Reading, MA, Addison-Wesley, 1996. [6] MATLAB® Reference Guide, The MathWorks Inc., Natick, MA, USA, 1992.

VII. BIOGRAPHIES Javier Contreras received his degree in Industrial Engineering from the University of Zaragoza, Spain, in 1989, and his Ph.D. in Power Systems at the Department of Electrical Engineering and Computer Science, University of California at Berkeley, in 1997. Currently, he is Assistant Professor at the E.T.S. de Ingenieros Industriales, Universidad de Castilla-La Mancha, Ciudad Real, Spain. Arturo Losi received his degree and his PhD in Electrical Engineering from Università degli Studi di Napoli, Italy, in 1980, 1987. Currently, he is Professor of Electrical Power Systems at the Università degli Studi di Cassino, Italy. He is a member of AEI (the Italian Institute of Electrical Engineers) and of IEEE.

The authors acknowledge the financial support from the MURST, Italy. VI. REFERENCES [1] I.J. Pérez-Arriaga, H. Rudnick, and W.O. Stadlin, “International Power System Transmission Open Access Experience,” IEEE Trans. on Power Systems, vol. 10, no. 1, 1995, pp. 554-564. [2] T. Gómez and C. Vázquez, “The Spanish Day Ahead Energy Market,” Iit Internal Report, October 1998 (available at http://www.iit.upco.es).

111

Mario Russo received his degree in Electrical Engineering from Università degli Studi di Napoli, Italy, in 1988. Currently, he is Associate Professor of Electrical Power Systems at the Università degli Studi di Cassino, Italy. He is a member of AEI (the Italian Institute of Electrical Engineers) and of IEEE.