0% found this document useful (0 votes)
16 views6 pages

A Java Matlab For Deregulated Markets

This document presents a JAVA/MATLAB simulator designed for Power Exchange Markets (PXM) to analyze the impact of various auction models and market structures in a deregulated electric energy industry. The simulator facilitates communication between producers, consumers, and auction regulators, while allowing for the evaluation of market clearing prices and quantities through intensive simulations. It incorporates technical constraints and offers a modular design that can be easily modified and extended for specific applications.

Uploaded by

jonaspesentecel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views6 pages

A Java Matlab For Deregulated Markets

This document presents a JAVA/MATLAB simulator designed for Power Exchange Markets (PXM) to analyze the impact of various auction models and market structures in a deregulated electric energy industry. The simulator facilitates communication between producers, consumers, and auction regulators, while allowing for the evaluation of market clearing prices and quantities through intensive simulations. It incorporates technical constraints and offers a modular design that can be easily modified and extended for specific applications.

Uploaded by

jonaspesentecel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

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 divisible quantity bids, minimum daily income and up-and-
proposed auction models in electricity markets is still open. down ramp rates in order to help the algorithm to take into
Any proposal on the structure of a deregulated electric energy account the suppliers’ requirements [2]. On the other hand,
industry should be supported by scientific foundation and by other countries have adopted an iterative auction structure (i.e.
intensive simulations to assess both the economical aspects and repeated simple auctions) to give market participants more than
the technical issues. Based on the general structure of a power one opportunity to reflect accurately their operating conditions
system and market simulator that has been recently proposed, into their bids. The iterative set of rules proposed for the energy
this paper presents a simulator of Power Exchange Markets. market in California by Wilson [3] is the foremost example of
Bidding proposals are defined in a JAVA-based environment, such a structure.
in which communication between the producers/consumers and To accurately evaluate the impact of different market
the auction regulator is simulated. A MATLAB application, structures and rules on the performance of the market and on
which is interfaced to the JAVA environment by a Tcl program, the operation of the power system, intensive simulation is
works out the market clearing price together with the quantities needed. It has to yield detailed results on both the economical
that each bidder is allowed to buy or sell. The simulator is and the technical objectives of the system operation. Simulation
extremely flexible and useful to compare the performance of must account for the effects of technical constraints, of power
Power Exchange Markets adopting different methods of system non linearity, of different auction rules and of different
treating technical and security constraints in the MATLAB methods to take into account transmission network security.
application. A significant numerical example is presented to Simulation is also necessary to ascertain the characteristics of
highlight the features of the tool. the information and decision-making structures.
Keywords: simulation software, deregulation, power In a recent paper [4], the open structure of a software
exchange market. simulator, capable of highlighting the details of the operation on
both the sides of economics and system security in any market
I. INTRODUCTION structure, has been presented. It is based on the object oriented
paradigm to allow the user to easily modify and extend parts of
The process of deregulation in the power industry has the software with minimal impact on the other parts and to
created a new environment where trading is conducted in interface the package to existing software tools for specific
different markets. In this environment, power producers computations. In such a way, the software simulator is modular,
compete to obtain higher market share through spot market and and has the desirable characteristic of being conducive to
bilateral contracts. In the spot market, market clearing prices cooperation. The different modules the simulator is made of are
are based on bids submitted by suppliers and consumers. intended to clearly represent the different agents acting on the
Bidding and clearing of the spot market are based on the stage.
auction market structure, in the following referred to as Power Taking advantage of such an open structure, this paper
Exchange Market (PXM). presents a simulator of PXMs. Suppliers and consumers bid in a
Many countries have adopted simple auction matching pool: their interactions and communications are simulated on
algorithms as part of their electricity pool design [1]. The the JAVA platform. The market clearing algorithm is
simple auction receives the day-ahead supplier and consumer implemented in MATLAB so that different methods of solving
hourly bids and produces the hourly schedule and market price the clearing price problem and of taking into account technical
in one round. However, this simple method fails to capture constraints can be easily programmed and tested. Data
inter-temporal links and other complex effects that appear in exchange and synchronization between the JAVA and the
power systems, such as ramp rates, start-up cost, no-load cost, MATLAB processes is performed by a Tcl interface.
etc.; it has to rely completely on market participants’ ability to A significant numerical example is shown to highlight the
reflect their economical characteristics into their bids to achieve features of the simulator.
a feasible dispatch.
The simple auction structure can be modified to take into II. PXM SIMULATOR STRUCTURE
account technical constraints and power system non linearity.
For instance, in the Spanish market supplier bids are allowed The PXM simulator design is based on the Object Oriented
using additional conditions besides price and quantity (semi- Paradigm (OOP) so that each part of the package could be
complex auction). These additional conditions include: non- developed at its best by using the most adequate environment,

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


the communication between applications being allowed through access the methods of the RMI server (Remote Bidder and
adequately defined interfaces. The concept of software Remote maxISO), which is based on the Remote Method
interfaces, typical to OOP, also allows an easy extension to Invocation (RMI) technology, available on the Java platforms
existing software packages for specific computations. of latest versions. The applet programming is based on multi-
The operational aspects the simulator has to deal with can threading paradigm, thus fully exploiting the networking
be divided into two main sets: communications among market efficiency provided by the Java platform.
agents (producers, consumers, auction regulator) and In practice, from the user point of view, a process on a local
mathematical problems (in particular, the market clearing price host must be started using either a Web browser or Java
problem). Fig. 1 reports the general structure of the simulator. AppletViewer tool. The process must simply download a
Three main packages can be identified: a JAVA simulator of HTML page from the Web server; two pages are available
market communications, a MATLAB algorithm for clearing whether the client is a generic bidding agent or the auction
price, and a Tcl interface between the two former packages. regulator.
A. JAVA simulator of market communications B. MATLAB clearing price algorithm
The communication between agents is realized within the The auction regulator has to analyze the bidding proposals
Java environment [5]. and determine the market clearing price as well as which bids
Java Platform is a software platform for running software are accepted and which ones are rejected.
codes on networked computer systems, with the special feature The algorithm takes into account constraints such as:
of being hardware independent from the point of view of the • A non-divisible quantity: The cheapest bid quantity can be
software to be run: as far as software code is compiled to the designated as non-divisible; that is, in case that the
Java Platform, it will run on every computer the Platform is designated bid is accepted, it should be for the total
present. It is ideal for Internet applications. quantity and not for a fraction of it. This condition has
Software code is of two different kinds: applets and been implemented to take into account that some thermal
applications. Applets rely on a browser to run; usually, they are units have to run above a specified minimum operating
light pieces of code and have restricted rights on files and level.
databases. Applications do not require a browser, and are in fact
like usual programs. Applets and applications are written in the • A minimum daily income amount: It can be set as a pre-
Java Language, which is object oriented. Java programming requisite for the scheduling of the considered generating
allows multi-threading thus avoiding inefficiencies due to unit. This condition is specified by a minimum amount of
communication bottlenecks. money that a bidder requires to enter the auction. This
Each agent is simulated by an applet. There are two types of condition has been implemented in the market clearing
applets: the Bidder applet, which simulates producers and algorithm to minimize generators’ risks when they have to
consumers, and the maxISO applet, which simulates the auction internalize start-up and no-load fuel costs in their simple
regulator. bids.
A client-server structure based on TCP/IP protocol has been • Up and down ramp rates: The maximum variations of the
adopted for network communication among applets. The unit output in two consecutive hours can be specified. That
structure is outlined in fig. 1. A Web server is resident on the is, for the considered production unit, the energy scheduled
remote host: the server allows the clients connecting from local by the matching algorithm in two consecutive hours must
hosts to download and start up the applets (Bidder applet or the meet the maximum variation condition specified as
maxISO applet) on their machine (dashed lines). The applet on MW/minute for increasing output and/or MW/minute for
a local host asks the remote host for registration and the server decreasing output. This condition has been implemented in
program on the remote host binds the calling host name to a the matching algorithm to take into account ramp rate
remote registry (continuous lines); the applet on a local host can limits of thermal units.

MATLAB Tcl JAVA simulator of market communications


clearing price interface Local host Remote host
algorithm Java AppletViewer Web Server
Bidder
Bidder page

maxISO page
Local host
Web browser
Bidder RMI Server
RMI register

Remote Bidder
Local host
MATLAB session
Tcl parent Java AppletViewer Remote maxISO
Clearing price
algorithm process 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
1 interval 2nd interval 3rd interval 4th 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
MW 7 50 60 80 7 54 56 80 7 50 60 80 7 50 65 75
Gen. 1
¢Euro 1.80 2.04 2.10 2.40 1.80 2.04 2.10 2.40 1.80 2.04 2.10 2.40 1.80 2.04 2.10 2.40
MW 10 30 80 90 10 30 80 90 10 25 85 90 10 30 80 90
Gen. 2
¢Euro 1.50 1.56 1.80 2.10 1.50 1.56 1.80 2.10 1.50 1.56 1.80 2.10 1.50 1.56 1.80 2.10
MW 8 10 55 90 8 12 53 90 8 10 55 90 8 11 54 90
Gen. 3
¢Euro 0.90 0.96 1.20 1.80 0.90 0.96 1.20 1.80 0.90 0.96 1.20 1.80 0.90 0.96 1.20 1.80
MW 9 10 20 35 9 10 20 35 9 10 27 28 9 10 27 28
Gen. 4
¢Euro 1.35 1.50 1.80 2.10 1.35 1.50 1.80 2.10 1.35 1.50 1.80 2.10 1.35 1.50 1.80 2.10
MW 20 50 90 130 20 55 85 130 20 60 80 130 20 65 75 130
Gen. 5
¢Euro 1.50 1.56 1.65 1.80 1.50 1.56 1.65 1.80 1.50 1.56 1.65 1.80 1.50 1.56 1.65 1.80

• Minimum up time: The minimum number of hours that a assigned name. Then, the MATLAB market clearing price
unit must be connected in order to work properly. application is run and its results are sent back, via the Tcl
The market clearing algorithm is determined in the interface, to the Auction Regulator applet in the JAVA
following successive steps: simulator.
• A simple matching solution is obtained assuming all bids
are just “simple” bids in price and quantity. III. A PXM SIMULATION
• The ramp rate limits are enforced in the scheduled To evidence the features and the performance of the PXM
quantities for each two consecutive hour periods. simulator, in the following an application is considered so as to
• The indivisibility condition is enforced. describe in details each phase of the simulation.
• The minimum daily income condition for those production The application considers five generators and a single
units that have submitted it is verified, and units that do not demand bidding over four time intervals; generator and demand
meet such condition are not scheduled. bids are shown, respectively, in Table 1 and in Table 2. In a
The market clearing price algorithm has been programmed first case (case 1), the generators do not use extra bidding
in MATLAB [6], a widely-used scientific computing conditions, such as ramp-up rates, or minimum up times. A
environment. The main advantages of adopting MATLAB second case (case 2) considers that generator 1 imposes non-
package are related to the easy matrix computation and to the divisibility of its first block and generator 3 has a ramp-up rate
exhaustive built-in mathematical library. Different clearing of 50 MW/hour.
price algorithms can be easily programmed and substituted for
the existing one. Table 2 – Incremental bids of the demand
in the four time intervals.
C. Tcl interface
Bid 1 Bid 2 Bid 3 Bid 4 Bid 5
The Tool Command Language (Tcl) is a simple scripting
language for controlling and extending applications [7]. It st MW 230 10 5 10 5
1 interval
provides for generic programming facilities and, at the same ¢Euro 3.61 2.40 1.80 1.20 0.60
time, it is embeddable: its interpreter is a library of C MW 530 5 10 15 5
2nd interval
procedures that can be easily incorporated into applications and ¢Euro 3.61 2.40 2.10 1.50 0.60
each new application can extend the features of the Tcl core MW 730 5 10 5 5
3rd interval
adding new commands. A major benefit in adopting Tcl is that ¢Euro 3.61 2.40 1.80 1.50 0.60
it makes an excellent “glue language”, thanks to the library MW 810 5 5 10 10
4th interval
packages that can be added. ¢Euro 3.61 2.40 1.80 1.20 0.60
A Tcl script has been written to manage the communication
between two child processes: the first is a JAVA AppletViewer Bidding proposals can be submitted by actors using the
process that starts the Auction Regulator applet in the JAVA Bidder applet GUI; an example is shown in fig. 2 with reference
simulator of the market communication; the second child to Generator #2. Each bid is characterized by the injection node
process is a MATLAB session. Two communication buffers are number, the time interval (hour) it is referred to, the injected
opened to the child processes. To keep low the computational active power (positive if generated, negative if consumed) and
burden of the Tcl parent process, event-driven programming the bidding price. Several bids can be submitted until the
has been adopted. auction is stopped. When the “Finish” button is clicked, the
When the list of bidding proposals gathered by the Auction Bidder applet remains in stand-by until the Auction Regulator
Regulator applet in the JAVA simulator is ready to be replies the results. The Auction Regulator applet receives all the
processed, it is passed to the MATLAB session as a matrix of proposed bids; its GUI is shown in fig. 3. After performing

108
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 and sends the final list of bids to the MATLAB session by the
auction regulator can “Strike” the accepted bid proposals, thus Tcl interface (see fig. 1).
including them into the final list of bids to be processed. The MATLAB clearing price algorithm performs
Eventually, the auction regulator clicks the “Compute” button computation and yields the clearing prices. An easy-to-read

109
¢Euro Table 3 – Power injection (MW) that is allowed to each
Total Demand
3.5 generator in the four time intervals: case 1.

3 1st interval 2nd interval 3rd interval 4th interval


Gen. 1 0.00 5.42 76.89 106.37
2.5 Gen. 2 40.00 101.90 149.83 188.36
Gen. 3 73.00 142.63 163.00 163.00
2 Total Offer Gen. 4 19.00 34.47 55.28 67.27
1.65 (clearing price) Gen. 5 113.00 260.58 290.00 290.00
1.5
Table 4 – Power injection (MW) that is allowed to each
1 generator in the four time intervals: case 2.

0.5 1st interval 2nd interval 3rd interval 4th interval


0 100 200 300 400 MW 500 Gen. 1 0.00 0.00 76.89 106.37
Gen. 2 40.00 101.90 149.83 188.36
Fig. 4 – MATLAB plot for the 1st time interval in case 1.
Gen. 3 73.00 123.00 163.00 163.00
MATLAB plot pops up showing for each time interval both the Gen. 4 19.00 36.65 55.28 67.27
total demand curve and the total offer curve: their intersection Gen. 5 113.00 274.73 290.00 290.00
determines the clearing price and the total amount of production
that is allowed to be injected. An example referring to the 1st leaves the auction in the second hour. The results obtained by
time interval of case 1 is shown in fig. 4. the MATLAB applications are sent back, via the Tcl interface,
The clearing prices in both case 1 and case 2 are equal to to the Auction Regulator applet in the JAVA simulator of
1.65, 1.80, 2.10 and 2.10 ¢Euro for, respectively, the 1st ,2nd, 3rd market communications. The results are sent to the bidders and
and 4th time interval. appear on the appropriate columns of the applet GUIs. An
Tables 3 and 4 show the results in terms of total power that example of the Bidder applet GUI for Generator #2 after the
is allowed to be injected by each generator respectively in case auction in case 1 is shown in fig. 5. Each bidder receives some
1 and in case 2. Comparing Tables 3 and 4 it can be noticed that general public information that concern the clearing prices. In
in case 2, to meet the ramp constraint, Generator #3 has to limit addition, for each bid under the column named “Curtail” a
its production in the 2nd time interval (from 142.63 to 123 number shows whether the bid has been fully admitted to
MW), and to meet the non-divisibility condition, Generator 1 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 [3] R. Wilson, “Activity Ruls for a Power Exchange,” POWER
case the number represents the quota of the bid that has been conference, University of California Energy Institute, Berkeley,
admitted to production. Eventually, under the column named March 1997.
“Loss” the share of transmission losses allocated by the ISO to [4] A. Losi and M. Russo, “A Simulation Tool for Evaluating
the bids can be communicated to the bidders; presently, the Technical and Economical Issues in the Deregulated Electric
MATLAB application does not perform any loss allocation and, Power Industry,” IEEE PES Summer Meeting, Seattle, July 2000.
consequently, all zeros appear in this column. All these [5] K. Arnold , and J. Gosling, The Java Programming Language,
information about bids are strictly private and sent only to the Reading, MA, Addison-Wesley, 1996.
bidder who proposed such bids. [6] MATLAB® Reference Guide, The MathWorks Inc., Natick, MA,
USA, 1992.
IV. CONCLUSIONS [7] J.K. Ousterhout, Tcl and the Tk Toolkit, Reading, MA, Addison-
Wesley, 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 VII. BIOGRAPHIES
operation of the power system. The flexibility and extensibility
of the open software structure of the simulator allows the user Javier Contreras received his degree in Industrial Engineering
from the University of Zaragoza, Spain, in 1989, and his Ph.D. in
to easily include market rules and different methods of solving
Power Systems at the Department of Electrical Engineering and
the auction clearing price problem and of taking into account Computer Science, University of California at Berkeley, in 1997.
the technical constraints. Simulation of a case study has shown Currently, he is Assistant Professor at the E.T.S. de Ingenieros
the features of the tool. Industriales, Universidad de Castilla-La Mancha, Ciudad Real,
Spain.
V. ACKNOWLEDGMENTS Arturo Losi received his degree and his PhD in Electrical
The authors acknowledge the financial support from the Engineering from Università degli Studi di Napoli, Italy, in 1980,
MURST, Italy. 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.
VI. REFERENCES
Mario Russo received his degree in Electrical Engineering from
[1] I.J. Pérez-Arriaga, H. Rudnick, and W.O. Stadlin, “International Università degli Studi di Napoli, Italy, in 1988. Currently, he is
Power System Transmission Open Access Experience,” IEEE Associate Professor of Electrical Power Systems at the Università
Trans. on Power Systems, vol. 10, no. 1, 1995, pp. 554-564. degli Studi di Cassino, Italy. He is a member of AEI (the Italian
[2] T. Gómez and C. Vázquez, “The Spanish Day Ahead Energy Institute of Electrical Engineers) and of IEEE.
Market,” Iit Internal Report, October 1998 (available at
http://www.iit.upco.es).

111

You might also like