A Java Matlab For Deregulated Markets
A Java Matlab For Deregulated Markets
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,
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
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.
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.
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