A LINGUISTIC FUZZY METHOD TO STUDY ELECTRICITY
MARKET AGENTS
Santiago Garcia-Talegon
Universidad de Castilla-La Mancha
Escuela Superior de Inform
´
atica de Ciudad Real
Juan Moreno-Garcia
Universidad de Castilla-La Mancha
Escuela Universitaria de Ingenier
´
ıa T
´
ecnica Industrial de Toledo
Keywords:
Energy market, energy market agent, linguistic modelling, fuzzy logic.
Abstract:
The aim of this paper is to study the behavior of the agents that participate in the Spanish electricity market, for
this purpose, the data that the Market Operator provides us after the period of confidentiality are analyzed. The
objective is to know the operation to simulate the offerings of blocks the some of them. Market participants
are companies authorized to participate in the electricity production market as electricity buyers and sellers.
The economic management of the electricity market is entrusted to Iberico Market Operator of Energy (MO)
(OMEL, ). A fuzzy (Zadeh, 1965) method has been created. It is based on the hour and in the matches obtained
of the previous day at this hour, and it is capable of model the behavior that is going to have an agent of the
electric market in each hour. We try with this method to deal as the agents realize the offer of production,
for it we take the information of three of them in June, 2004, the result of this work is understands better the
standard that they are still and the logic of the offers of blocks that fulfil the pool.
1 INTRODUCTION
The electricity market is the set of transactions arising
from the participation of the market agents in the ses-
sions of the daily and intraday markets and from the
application of the System Technical Operation Proce-
dures. Physical bilateral contracts concluded by buy-
ers and sellers are incorporated in the production mar-
ket once the daily market has closed. We will analyze
the daily market in this first work.
The purpose of the daily market, as an integral part
of electricity power production market, is to handle
electricity transactions for the following day through
the presentation of electricity sale and purchase bids
by market participants.
For the purposes of the presentation of electricity
sale bids, a production unit is deemed to refer to any
thermal generating set, pumping station, management
unit of a hydro-electric power station or management
unit of a group of wind generators of a wind park that
unload their electricity for the same node of the net-
work.
Buyers on the electrical power market are dis-
tributors, resellers, qualified consumers and external
agents who are authorised to participate in the market
by the Ministry of Industry and Energy. Buyers may
present bids to purchase electricity on the daily mar-
ket. However, in order to do so, they must be regis-
tered with the Administrative Register of Distributors,
Resellers and Consumers and they must abide by the
Electricity Market Activity Rules. A purchasing unit
is deemed to refer to a group of network connection
nodes through which the buyer presents bids to pur-
chase electricity.
Sale and purchase bids can be made considering
between 1 and 25 energy blocks in each hour, with
power and prices offered in each block. In the case of
sales, the bid price increases with the block number;
in the case of purchases, the bid price decreases with
the block number.
Electricity sale bids presented by sellers to the mar-
ket operator may be simple or incorporate complex
conditions in terms of their content. Sellers for each
hour and production unit present simple bids, indicat-
ing a price and an amount of power. Complex bids are
those that incorporate complex sale terms and condi-
tions and those which, in compliance with the simple
bid requirements, also include technical or economic
conditions.
We will take as the agent a producer that carries
out simple offerings without restrictions, the study of
complex offerings with technical restrictions we post-
pone it for future studies.
The market operator matches electricity power pur-
394
Garcia-Talegon S. and Moreno-Garcia J. (2005).
A LINGUISTIC FUZZY METHOD TO STUDY ELECTRICITY MARKET AGENTS.
In Proceedings of the Seventh International Conference on Enterprise Information Systems, pages 394-399
DOI: 10.5220/0002532303940399
Copyright
c
SciTePress
chase and sale bids by means of the simple matching
method (Decree, 2000).
Figure 1: Procedure of Simple Matching.
The simple matching method 1 is the one that ob-
tains in an independent way the price in each hourly
period of programming, marginal price, as well as the
volume of electric power that is accepted for each unit
of production and acquisition for each hourly period
of programming.
The hourly marginal price is the price that obtains
as a result itself of the process of matches, and is
equal to the price of the last offering of sale that has
been necessary to assign to cover the demand. This
price is the one that charge all the producers that have
been matched and that pay all it consumers that have
been matched. This price has hourly character (Low,
1997).
The necessary information for the participation of
a session of the daily market is facilitated for the op-
erator of the market and this is the following:
The last forecast of demand.
Information on available units.
Maximum capacity in the interconnections.
The estimation of the demand is a daily evolution
forecast of the periods hourly national consumption.
This it is make public for all the agents of the market.
Several times of the day, the MO puts available in-
formation on the unavailable agents. This information
is prominent since available every unit of output is
obliged to present offering of daily market. An agent
is unavailable when for some cause is incapable to
generate energy by damages or another thing.
The capacity of interconnection in the borders with
the different bordering countries is limited. There-
fore it is necessary the knowledge of the so much,
hourly maximum capacities of importing as of export,
to avoid a net flow that exceed some of these limita-
tions.
The variables that in a first study can be considered
and besides they can influence in it takes of decisions
of the agents at the moment of to carry out their of-
fering of blocks of energy and price marginal they are
the following:
Marginal price of previous day hours.
Minimum costs of agent production.
Weather prediction.
Demand prediction system.
In our method we will use the two firsts to see as
the agents behavior are.
In principle since, an economic point of view the
producer interests him to produce a minimum quan-
tity to cover cost and it will offer to a price that gen-
erate him these incomes. It will offer other blocks of
energy to an upper price so that the tendency of the
sale curve rise and obtaining high marginal prices.
The next section explain the method that we use to
model the sellers. In section 3 we apply our method
to some sellers and we interpret the obtained results.
Finally, the conclusions and futures works are shown
in section. 4. This work begins to study the variables
that can influence that an agent who takes part on the
pool obtains a few major benefits being capable of
interpreting the behavior of the market. For it, it’s
necessary to model an agent’s sample to see if we find
pattern in his behaviors.
2 OUR METHOD
To study the behavior of the sellers we propose
a method based in fuzzy logic (Zadeh, 1965) and
linguistic variables (Zadeh, 1975a; Zadeh, 1975b;
Zadeh, 1975c). We obtain a linguistic fuzzy model of
a seller agent to study its behavior. Our method needs
the hour (h variable) and the hourly margined price at
this time in the previous day (c
t1
variable). So, we
use the hour to the one that bid block is offered and
the hourly margined price of the previous day as input
variables, and the output variable is a list formed by
pairs like the following: [amount of energy, price of
energy]. We use s and p variables to represent amount
of energy and price of energy in this pair.
A set of examples with the values of the vari-
ables and a set of sort linguistic labels (Zadeh, 1975a;
Zadeh, 1975b; Zadeh, 1975c) for some variables are
needed to obtain the fuzzy model.
The set of examples, named E, is formed by ele-
ments with the following structure:
e
i
= (h
i
, c
t1,i
, s
i
, p
i
)
where h
i
is an integer number that has values
between 1 and 24 (the hours of the day), c
t1,i
is
a real number that is the hourly margined price
at this time the previous day, s
i
is the amount of
offered power in this block, and finally, p
i
is the
sold price of this block of energy (s variable).
A LINGUISTIC FUZZY METHOD TO STUDY ELECTRICITY MARKET AGENTS
395
To simply the algorithm of our method we suppose
that for each hour and day the examples of E are con-
secutive. We use three type of variables: linguistic,
integer and real variables. The variable c
t1
takes in-
teger values, p variable takes real values, and the vari-
ables h and c are linguistic variables. The linguistic
labels of the linguistic variables are defined a priori, i.
e., before our method is applied.
An ordered set of labels, named C, is defined for
the c
t1
variable. Its structure is given by the follow-
ing expression:
C = {very low, low, f ew low, medium, low high,
high, very high}
Figure 2 shows the trapezoidal labels used for the
c
t1
variable, where V L is ’very low’, L is low’, F L
is few low’, M D is medium’, LH is low high’, H
is ’high’ and V H is ’very high’.
Figure 2: Ordered set of labels C for the c
t1
variable.
This linguistic variable is used to represent the
hourly margined price at the previous day. We rep-
resent the price of sale of the energy with label by
means of variables linguistic that mean the following:
’Very low’ This label is used when the sale price is
very cheap. It takes values between 0 and 1, and,
normally, this label is not used in the daily market
because this price is never obtained.
’Low’ This label takes values between 0.75 and 2.
When the energy is sold to this price, it is cheap.
This sale price is frequently used from 3:00 or 4:00
until 5:00 or 6:00.
’Few low’ This label takes values between 1.75 and
3. It is a sale price a little cheap, and it is a price
frequently used during the day.
’Medium’ This label takes values between 2.75 and
4. This is the normal sale price, and it is a price
frequently used during the day.
’Low high’ This label takes values between 3.75 and
5. Normally, from 8:00 or 9:00 to 22:00 or 23:00
the energy price is this or the next label.
’High’ This label takes values between 4.75 and 6.
Normally, from 8:00 or 9:00 to 22:00 or 23:00 the
energy price is this or the previous label.
’Very high’ This label takes values between 5.75 and
10. In the daily market this price is never obtained.
An ordered set of labels, named P , is defined for
the p variable. Its structure is given by the following
expression:
P = {not important, very cheap, cheap, little
cheap, norm, little expensive, expensive, more
than expensive, very expensive}
Figure 3 shows the trapezoidal labels used for the
p
i
variable, where N I is ’not important’, V C is ’very
cheap’, C is cheap’, LC is little cheap’, NR is
norm’, LE is little expensive’, E is expensive’,
MT E is more than expensive and V E is very ex-
pensive’.
Figure 3: Ordered set of labels P for the p variable.
This linguistic variable is used to represent the of-
fered price in each energy block. Every definite label
means:
’Not important’ This label is used when the hourly
margined price is not important for the seller, that
is, the seller wants to sell the energy block be which
is the price. Normally, This label appears at least in
some block offered by the producers. This label
takes values from 0 to 1.
’Very cheap’ This label takes values from 0.75 to 2.
This label is used when the seller wants to sell the
energy to a minimum price. The energy blocks to
this price are frequently sold.
’Cheap’ This label is used when the seller wants to
sell the energy to a minimum price. The energy
blocks to this price are frequently sold when the
time is between 1:00 or 2:00 to 5:00 or 6:00. This
label takes values from 1.75 to 3.
’Low cheap’ This label takes values from 2.75 to 4.
The energy blocks to this price are frequently sold
when the time is between 20:00 or 21:00 to 24:00
or 1:00. This label is used to sell energy blocks at
these times.
’Norm’ or ’Few expensive’ These labels are used
when the energy market reaches the maximum
price, that is, the hourly margined price is rarely
more than 6. Normally, few expensive is the
biggest label obtained in the daily energy market.
When one productor seller sells energy to these
prices, he wants to obtain a great benefit.
’Expensive’ to ’Very expensive’ These three labels
rarely are obtained in the daily energy market.
When a seller agent offers energy blocks to this
price, he doesn’t want these blocks, only if occurs
a ”special situation” like ’a powerful agent is dam-
aged’, ’there is necessary a lot of energy’, etc.
The order of the labels in C and P is based on the
defuzzification method named middle of maximum
ICEIS 2005 - ARTIFICIAL INTELLIGENCE AND DECISION SUPPORT SYSTEMS
396
(MOM ) (W. V. Leekwijck, 1999). Our method ob-
tains a system of fuzzy rules formed by rules with the
following structure:
IF (h is X) AND (c
t1
is C
i
) THEN
[[s
1
is S, p
1
is P ],
[s
2
is S, p
2
is P ],
. . .
[s
n
is S, p
n
is P ]]
where X takes integer values, c
i
is the linguis-
tic variable that takes values from C, S is a real
variable and P is the linguistic variable that takes
values from P.
A real example of a rule obtained by using our
method is the following:
IF (2) AND (Medium) THEN
[[180,
not important
],
[50,
very cheap
],
[50,
cheap
],
[50,
cheap
],
[20, very expensive]]
As you can see, the output of the rule is a list of
pairs [amount of energy, price of energy]. Each pairs
of the list understands it better because we use lin-
guistic labels for the P variable. This rule can be in-
terpreted as the following text:
”When the hourly margined price in the previ-
ous day is ’medium’ and it is the second hour
of the day, then the seller agent sells 180 energy
units be which is the hourly margined price in the
current day, 50 energy units when the energy is
’very cheap’, two blocks of 50 energy units when
the energy is ’cheap’ and 20 energy units when
the energy is ’very expensive’”
When we study the Spanish electric market, we ob-
serve that when the energy is ’very cheap’ or ’cheap’
it is very possible that the offered blocks at this price
are sold, and when the energy is ’very expensive’ the
offered blocks at this price are never sold. Thus, in
this case, we can conclude that the productores seller
wants to sell one block of 180 energy units and three
blocks of 50 energy units because the offered energy
has a null price in the first case and a price that it is
very possible to sell in the second case; and it doesn’t
want to sell a block of 20 energy units because The
block has a price at which the energy never sells.
Algorithm 1, it shows the code used to obtain the
linguistic fuzzy model. As you can see, the algorithm
has three inputs: the set of examples E, the ordered
set of labels C and the ordered set of labels P . The
output is a linguistic fuzzy model named M.
The idea of this algorithm is to be crossing the ex-
amples in E. To obtain the items that compound the
antecedent (the hour and the hourly margined price);
and the items that compound the consequent (a list
of pairs like [amount of energy, price of energy]), for
this purpose, some consecutive iterations of the for
loop are used (so many iterations like energy blocks
are offered for the hour that the rule represents). Af-
ter that, the rule that represents this hour is calculated.
This process is repeated while there is some example
in E. As you can see, the algorithm obtains a rule for
each hour.
INPUTS
:
Set of examples E
Ordered set of labels C
Ordered set of labels P
OUTPUT:
A linguistic fuzzy model M
ALGORITHM 1:
1. M =< >
2. C
t1
= ObtainLabel(c
t1,1
, C)
3. p = O btainLabel(p
1
, P )
4. P airs = [ [s
1
, p] ]
5. for i = 2 to |E| do
6. if h
i
is equal to h
i1
then
7. p = ObtainLabel(p
i
, P )
8. P airs = P airs + [s
i
, p]
9. else
10. R = CreateRule(h
i1
, C
t1
, P airs)
11. M = AddRule(R)
12. C
t1
= ObtainLabel(c
t1,i
, C)
13. p = ObtainLabel(p
i
, P )
14. [ [s
i
, p] ]
15. EndIf
16. EndFor
Now, we show the behavior of the algorithm line to
line. M is assigned to empty (
< >
) in the line 1.
Line 2, we calculates the label C
t1
, for this purpose,
it is used the following equation:
C
t1
= max
C
w
µ
C
w
(c
t1,i
), C
w
C (1)
That is, the label of C that has the maximum mem-
bership grade to c
t1,i
of e
i
.
Line 3 calculates the label p, for this purpose, it is
used the following equation:
p = max
P
w
µ
P
w
(pi), P
w
P (2)
That is, the label of P that has the maximum mem-
bership grade to p
i
of e
i
.
In the algorithm, the list of pairs is denoted as Pairs.
In line 4, the first pair [amount of energy, price of en-
ergy]), that represents the first offered block, is ob-
tained and added to Pairs. Its first component is as-
signed to s
1
, and the second one is the label p (calcu-
lated in line 3).
After that, a for loop is used to go through the ex-
amples in E pointed by the index i (line 5). The sen-
tences of the for loop are the sentences in the lines
from 6 to 16. If h
i
is equal to h
i1
, it means that the
A LINGUISTIC FUZZY METHOD TO STUDY ELECTRICITY MARKET AGENTS
397
hour of the previous example is equal to the hour of
the current example, that is, the examples i and i 1
represent energy blocks offered for the same time. In
this case, the algorithm adds the new pair to the list
of pairs Pairs. The sentences of the lines 7 and 8 are
used for this purpose. The sentence in the line 7 cal-
culate the label p to represent the offered price for the
current block by using the equation 2. The sentence
in the line 8 adds the pair to the list Pairs.
If h
i
is not equal to h
i1
, it means that all consecu-
tive energy blocks offered for the same day and hour
has already been added to Pairs, thus, the rule that
represents the hour h
i1
(R) is added to the model M
(lines 10 and 11), and it is begun to calculate the rule
that represent the hour h
i
(lines 12, 13 and 14). The
meaning of the lines from 10 to 14 are the following:
Line 10 The rule R is calculated by using the hour
h
i1
and the label C
t1
(the label to represent the
hourly margined price at h
i1
in the previous day)
for the antecedent, and the list of pairs Pairs for the
consequent.
Line 11 R is added to the model M .
Line 12 The label C
t1
is calculated by using the
equation 1.
Line 13 The label p is calculated by using the equa-
tion 2.
Line 14 Pairs is initialized at [ [s
i
, p] ]
Finally, the last sentences close the for loop and the
if sentence.
3 TESTING THE METHOD AND
THE INTERPRETATION OF
THE OBTAINED RESULTS
We apply the proposed method to the data of three
seller agents in the first five days of the month of June
of 2003 to test our method. The producing agents are
named ABO1, ALL1 and V IES.
Our method obtains 24 rules for each day (one rule
for each hour of the day), so, the obtained models for
these 5 days are formed by 120 rules. For each hour,
our method obtains 5 rules, one rule for each day.
Now, we explain the interpretation of the obtain
model for each one of the producing agents:
ABO1 This agent maintains the sold energy at 350
energy units during all hour of the day, although it
changes some energy unit from a block to another
block hour at hour. It can be observed that the night
hours the energy offered is smaller than the day
hours. It carries out three types of offered blocks: a
first block to prices qualified with the label Not Im-
portant is offered so that enter the matches; three
blocks to prices with labels qualified among ’very
cheap or cheap are offered so that it wants a min-
imum value in the matches; and a last energy block,
labeled as ’very expensive’, it is offered to a price
that the energy market has never obtained. Thus,
we can conclude that this agent offers three set of
blocks: a first one that it will always be accepted;
a second one that it will be accepted when a mini-
mum price has been gotten; and a third one that it
will never be accepted.
ALL1 This agent maintains the sold energy at 364.9
energy units during all hour of the day, although
it changes some energy unit from a block to an-
other block. It can be observed that the night hours
the energy offered is smaller than the day hours.
It carries out three types of offered blocks: a first
block to prices qualified with the label Not Impor-
tant; others blocks to prices with labels qualified
among ’very cheap’; and a last energy block, la-
beled as ’very expensive’. From 8:00 or 9:00 until
23:00 or 24:00, this agent only offers the following
two blocks: [335.0, ’not important’], [11.9, ’very
expensive’], that is, during these times, 335 energy
units will always be accepted and 11.9 energy units
will never be accepted. Thus, we can conclude that
this agent offers three set of blocks: a first one that
will always be accepted; a second one that will be
accepted when a minimum price has been gotten;
and a third one that will never be accepted.
V IES This agent do not maintains the sold energy at
a constant number of energy units during all day. It
only offers the energy units that want sell to prices
qualified with the label Not Important. It can be
observed that the night hours the energy offered is
smaller than from the day hours. We can conclude
that this agent offers only the energy units that want
sell, for this purpose, it labels to not important the
only block that it offers.
As behavior common to all the studied agents, we
can say the following:
1. The hourly margined price is similar at the same
hour of the consecutive days.
2. All studied agents bids each days the same number
of blocks at the same hour. The amount of energy
is very similar for the same hour at different days.
3. The first blocks to prices qualified with the label
not Important are offered so that enter the matches.
4. Blocks to prices with labels qualified among very
cheapor cheap are offered to obtain a minimum
price.
5. The tendency is that the last blocks have some
prices qualified with labels of expensive or very ex-
pensive.
ICEIS 2005 - ARTIFICIAL INTELLIGENCE AND DECISION SUPPORT SYSTEMS
398
6. Along the day, the agents change the amount of
energy from blocks labeled with labels not equal
to not important to the block labeled with labels
equal to ’not important’.
7. The agents doesn’t study the offered energy blocks
in detail. They present similar offers hour at hour.
A situation is described in which the agents always
offer a minimum to function in each hour to price
’not important’. From this point different tendencies
are seen, there are agents that directly offer blocks
to prices that in the historic one of marginal prices
never they have been reached, this signifies that they
do not enter the matches, and other they offer to prices
that are going to enter. We interpret it since really the
agents have to maintain a most minimum operation
by technical restrictions of the head offices for that
reason be offered to ’not important’. The behavior is
different from here but is seen that there is not a ten-
dency to adjust the offering to the marginal price that
have greater possibilities to be. This due to that itself
not a study of forecast of the marginal price is done.
Also due to that the agents try with these high prices
in the last blocks to rise the tendency of the curve and
consequently to rise the point of cut of the curves of
sale and purchase.
4 CONCLUSIONS AND FUTURE
WORKS
For the first time methods of fuzzy logic are in use
for interpreting the behavior of the producing agents
by means of a system of fuzzy rules that they allow
us to visualize better like it organizes his production
throughout the day, hereby the decisions will be able
to be analyzed better to taking. We can conclude of
the carried out studies that the agents maintains the
sold energy units during all hour of the day, although
it changes some energy unit from a block to another
block hour at hour. As we thought, the energy uses in
the night is cheaper than the energy in the day hours.
The agents offer set of energy blocks with different
purpose. The first set is offered to produce a minimum
quantity to cover cost and it will offer to a price that
generate him these incomes. Other set of blocks are
offered to sell energy when the hourly margined price
has a minimum value. These blocks permit to the
seller agent to obtain benefits. It offers other blocks
of energy to an upper price so that the tendency of the
sale curve rise and obtaining high marginal prices.
The agents doesn’t study the offered energy blocks
in detail. They present similar offers hour after hour
and day after day.
As future works, we can apply the presented
method but using another variables like the last fore-
cast of demand, information on available units, min-
imum costs of agent production, weather prediction
or demand prediction system. A seller agent can be
considered as a ”cyclical dynamic systems” (day af-
ter day). We can apply fuzzy technics that model
dynamic systems like (J. Moreno-Garcia, 2003a) and
(J. Moreno-Garcia, 2003b).
Seems clear that the model of agents is different
and differs depending on the volume of production or
sale of the agent. We should deepen in the analysis
of the market that permit us by means of temporary
systems of analysis to predict the marginal price of
the next day.
In this manner we would be able model the agent
so that we will use this value as entrance in his system
of offerings.
ACKNOWLEDGEMENTS
This work has been funded by the Spanish Ministry of
Science and Technology and Junta de Comunidades
de Castilla-La Mancha under Research Projects ”DI-
MOCLUST” TIC2003-08807-C02-02 and PREDA-
COM PBC-03-004.
REFERENCES
Decree, R. (2000). Royal decree 2019/1007, 26 december,
by the one that is organized and to regulate the elec-
tricity market.
J. Moreno-Garcia, L. Jimenez, J. C.-S. L. R. (2003a). In-
duction of temporal fuzzy chains. In ICEIS 2003 Pro-
ceedings.
J. Moreno-Garcia, L. Jimenez, J. C.-S. L. R. (2003b). Mod-
elling with temporal fuzzy chains. In EUSFLAT 2003
Proceedings.
Low (1997). Low 54/1997 ,27 november, of the electricity
sector in spain.
OMEL. Operador del mercado de electricidad. In
www.omel.es.
W. V. Leekwijck, E. E. K. (1999). Defuzzification: criteria
and classification. In Fuzzy Sets and Systems, vol. 108
n2, pp. 159-178.
Zadeh, L. (1965). Fuzzy sets. Inform Control, 338-353.
Zadeh, L. (1975a). The concept of linguistic variable and its
applications to approximate reasoning. Part I. Inform
Science vol 8 and 9, 199-249.
Zadeh, L. (1975b). The concept of linguistic variable and
its applications to approximate reasoning. Part II. In-
form Science vol 8 and 9, 301-357.
Zadeh, L. (1975c). The concept of linguistic variable and
its applications to approximate reasoning. Part III. In-
form Science vol 8 and 9, 43-80.
A LINGUISTIC FUZZY METHOD TO STUDY ELECTRICITY MARKET AGENTS
399