REALISATION OF FUZZY COGNITIVE AGENTS IN THE ELECTRICAL TRADING DOMAIN D. Borrie (1), C.S. Ozveren (1) (1) University of Abertay Dundee, United Kingdom ABSTRACT Conceptually the Fuzzy Cognitive Agent (FCA) is the novel integration of Fuzzy Cognitive Maps (FCM) and Adaptive Intelligent Agent (AI-Agent) paradigms. FCAs fundamentally differ from traditional rule based AI-Agents as their inference is derived by a unique FCM that encapsulates the agent’s beliefs and desires. The benefits of this architecture are two fold; firstly the knowledge elicitation process to realise the inference engine of FCAs is enhanced by the visuality offered by FCMs; Secondly the AI-Agent paradigm permits the fragmentation of the homogeneous domain FCM into functionally specific and discrete components. Discrete FCAs can then interact using standard AI-Agent protocols. Further, as a consequence of the distributed characteristic of the paradigm, naturally fragmented domains characterised by partial data availability can now be accurately captured in contrast to traditional FCMs that act homogeneously towards a single goal. As a first step, this article demonstrates the potential of the paradigm within the electricity market domain by integration of FCMs supported on Matlab Simulink platform encapsulated within a mimic AI-Agent shell encoded in the Matlab environment. The simple electricity market agency illustrates how agents with competing goals based on partial domain knowledge could interact to realistically simulate the processes within an actual auction. Keywords: fuzzy cognitive agent; fuzzy cognitive map; market simulation
1
and thereby markedly simplifies the FCM updating and management processes.
INTRODUCTION
In previous papers we have demonstrated the potential of Fuzzy Cognitive Maps (FCM) encoded on the Matlab Simulink platform to represent some aspects of competitive electricity markets. [1]. In particular it was demonstrated that the mathematical robustness and graphical capability of the Matlab Simulink platform permitted the encapsulation of a wide range of complex concept interdependencies greatly increasing the representational accuracy of earlier FCMs presented in literature [2] [3] [4] [5]. Despite these advances, the application of FCMs to complex and dynamic real world systems remains limited. This is a construct of two principal facets; firstly, as the domain complexity increases the simplicity of the visual FCM representation is lost; secondly in parallel with the escalating size of the domain FCM the management of its structure and the process of its updating become increasingly difficult. To resolve these issues we proposed the conceptual architecture of the FCA as a possible solution to both of the above problems [6]. The essential premise of the FCA is the disintegration of the domain FCM into smaller discrete task and goal specific FCMs and then their further encapsulation into the shell of a commercial AI-Agent platform. Each FCA is then free to interact with others in a common domain using the communication protocols of its associated with its AI-Agent, thereby preserving the overall domain inference. Simultaneously, the fragmentation of the domain FCM into the smaller task specific FCMs permits greater system comprehensibility,
As important as the above advances is the ability of the paradigm to represent domains that are more naturally fragmented or are characterised by incomplete or restricted data availability. The FCA paradigm is flexible in this regard as it permits the sending of data globally from one FCA to all other FCAs within the domain or alternatively to an individual FCA or identified groups of FCAs. Such a capability is essential in the representation of real world domains where competition exists and in particular in the area of our research, the simulation of competitive electricity trading markets. As a first step to illustrate the architecture and functionality associated with the approach this paper presents our efforts to encapsulate Matlab Simulink supported FCMs within discrete Matlab m-files that mimic the functionality of commercial AI Agent platforms. This approach serves to illustrate the potential of the approach whilst avoiding the substantial incompatibility issues which exist between Matlab Simulink and most Commercial AI-Agent Software.
2
THE CONCEPTUAL FCA
FCMs are commonly proposed to describe the behaviour of structurally invariant open systems. Unfortunately competitive electricity markets do not exhibit such a stable
UPEC 2007 - 1159
characteristic but are typically characterised by permanent structural flux and asynchronous, restricted data flow. This is difficult to accommodate within a traditional highly interconnected FCMs that rely on the global availability of data and free interaction between concepts to allow an equilibrium state or a limit cycle to be reached. Previous work has suggested the disintegration of the whole domain FCM into smaller task specific FCMs within a loosely connected hierarchal structure [7]. However within this approach the interconnections between task specific FCMs remain both ‘hard wired’ and multidirectional rendering it inflexible to ongoing structural and relational change in the domain space.
FCM Seller 2
FCM Seller 2
FCM
Agent Seller 2
Agent Buyer 1
3
BEGINNING THE REALISATION OF THE MARKET AGENCY
3.1 FCA using Matlab M Files We have presented the architecture of a conceptual FCA and how multiple agents of this type could interact to simulate complex and dynamic domains. Obviously the realisation of such agents should invoke the integration of commercial AI-Agent software and the Matlab Simulink supported FCMs we have described in previous papers [1] [6]. However this has raised many issues of compatibility associated with the data transfer between platforms. As a first step to the development of a true functional FCA and to demonstrate the potential approach we have firstly explored the potential offered coding functionality present as part of the Matlab platform. This facility permits the development of code that effectively mimics the communicational functionality of a commercially available AI-Agent platform. In this way the principles of the AIAgent can be explored quickly and effectively without introducing needless and unnecessary compatibility issues.
Market
FCM Buyer 2
Agent Seller 1
The elegance of the approach is evident from the generic market FCA agency presented in Figure 1, which illustrates the relative structural simplicity that is possible.
Within the context of this paper the essential architecture and functionality of a FCA representing a Supplyco FCA in the context of an competitive electricity market will be explored.
Agent Buyer 2
Buyer 2
Figure 1 Generic Market Agency To resolve this inherent structural constraint we have proposed the FCA that harnesses the structural and relational flexibility of AI-Agents to allow the structured disintegration of the domain FCM. Essentially the premise of the approach is to consider an AI-Agent as comprising of two essential parts; a communication shell facilitating interaction between agents and their environment, and a rule based inference engine that determines their actions. Within an FCA the ‘IF’ ‘THEN’ rule base is substituted by task specific fragments of the domain FCM, effectively encapsulating them within the AI-Agent communication shell. Agencies of FCAs then freely interact within the agent space to simulate entire domain space. We have termed this type of AI-Agent a Fuzzy Cognitive Agent and groups of such agents a Fuzzy Cognitive Agency [6].
3.2 The Buyer Agent and the FCA Agency Competitive electricity auctions essentially consist of two actors; those which represent the generating companies with electrical capacity to sell, and those representing the utility companies who need to purchase electricity in order to sell it to industrial, commercial, and domestic customers with which they have contracts. Both actors are normally regulated in the real world by a set of market rules. These rules are designed to reduce the abuse of the market by individual participants and to ensure that the market remains accessible to new entrants in order that the vibrancy of competition is maintained. Buyer agents in such markets like their counterpart supply agents, strive to optimise their profitability within the market environment. Almost without exception the information available to all supply agents in incomplete. Further, the evaluation of available capacity offers is largely subjective as it is based not only on the understanding of the physical capability of the generating plant, but on the perceived commercial strategy of the generating agent and its relationship to that of the supply company itself. Essentially then the Supplyco FCA must perform three principal functions: firstly the FCA must gather the offer data which is made available to it (the partial data
UPEC 2007 - 1160
availability), secondly this data should be presented to the offer evaluation FCM within the FCA in order that the utility associated with the offer can be evaluated (physical and subjective), and finally the FCA should advertise its response to the offer, or in the instance where no offers exist strategically advertise its capacity requirement (again partial data availability). In parallel to these principal functions the FCA must also manage its internal administration based on its actions in the market, typically such factors as updating of the load requirement after confirmation of a purchase or some other mechanical action. To understand how the Matlab mimic AI-Agent interacts with the encapsulated FCM and the broader environment to achieve this functionality let us consider firstly the general structure of the market FCA Agency and then the actions of a Supplyco FCA with a volume requirement within it. The abstracted FCA Agency architecture is presented in Figure 2. The key part of the Agency apart from the participant FCAs themselves is the single functional block termed the “Market Regulator Agent”. This Agent provides the user interfaces to permit the initial market parameters to be set and then to subsequently coordinate the interaction of the participating agents following initiation of the auction.
The parameters of the auction are the invariant base conditions that are expressed by the user before the auction commences such as the temporal duration of the auction, the trading status of the market agents defining which will be active, or the definition of demand and limit generating projections. These can be set depending upon the particular scenario to be investigated are easily encoded into the regulator agent by means of the regulator agent graphical user interfaces. The second functionality of the regulator agent is that of market coordination. This is an artificial construct within the model that exists to ensure that each agent has open but discrete access to the market. Within the context of the FCA Agency, multiple and simultaneous access to market data can lead to spurious computational actions. To prevent this occurring only one agent at a time is permitted access to market data and to act upon it. The arrows within Figure 2 diagrammatically represent the interaction of the regulator and market agents during a typical auction that are described in the following text. Actions of the regulator agent are shown as transparent arrows whilst those of market agents are opaque.
Market Regulator Agent Market Duration
Enable Market Agent
Buy Space
Supplyco Agent.. n Demand Profiles
Supplyco Agent 3 Supplyco Agent 2 Supplyco Agent 1 Offer Space
Max / Min Generating Profiles
Genco Agent … n Genco Agent 3 Genco Agent 2 Genco Agent 1
Figure 2 Market FCA Agency
UPEC 2007 - 1161
Access to the market for each market FCA is determined sequentially, commencing with market FCA 1 at time t = 0 and monotonously increasing to market FCA n where n is the number of known agents. The sequence then repeats until the time interval t equals the defined duration of the market. The user can also set the time interval t between increments in order to set the level of market granularity required. Of particular relevance to the all the participant FCA are the blocks termed the “Offer Space” and the “Buy Space”. These blocks are essentially two m x n matrices that all FCA can either advertise the availability of capacity or the intention to purchase an advertised volume. The variable m is the number of individual offers or buy instructions in the matrixes at any given time respectively whilst n represents the number of data variables associated with each offer or buy instruction. For illustration a Genco Offer is given in Figure 3.
index_specific = find (offer_space (:,5) == 10) %% Extracts full data set from offer space matrix offers_specific = offer_space (index_specific,:) %% Identification of row index of open offers in offer %%space matrix index_open = find (offer_space (:,5) == 0) %%Extracts full data set from offer space matrix offers_open = offer_space (index_open,:) %% Combination of specific and open offers to generate %%matrix of offers offers = [offers_open; offers_specific] From this the FCA creates a matrix of available offers termed ‘offers’. The FCA then considers each of the offers in turn to derive the utility of each offer by sequentially presenting them to the FCM. The FCM is fired by the mfile and inference is allowed to develop until a final steady state is reached. The steady state is then stored within the combined_rank matrix. while
[0.7,
600,
46,
6780,
1345,
10]
Key to Offer Data Set (by column): 1: 2: 3: 4: 5: 6:
Utility from FCM inference MW Capacity for sale £/MW associated with capacity for sale Time Capacity is available Offer reference number Availability (open / concealed)
Figure 3 Format of a Genco Offer Data Set Now consider the detailed operation of a Supplyco FCA in detail. In the first instance all the offers open to the particular Supplyco FCA must be identified. Within the context of the FCA Agency all such offers are posted in the Offer Space by each of the Genco FCAs. The offer can take either two forms largely dependent upon the Genco trading strategy; the first of these which we describe as a open offer is made available to all supply FCAs, the second is that of a concealed offer which is made available to a single supply FCA. To manage this within the market FCA Agency, column six of offer data set of Figure 3 can be set to either the ‘0’ for open offers or by a specific Supplyco FCA identification number in the case of a concealed offer. Consider Supplyco with reference number 10. The Supplyco FCA firstly searches for concealed offers available to it; those with the numeric tag (10) and then for all open offers (numeric tag = 0) by the following m.file code; %% IDENTIFICATION OF OFFERS %% %% %% Identification row index of concealed offers %% offers open in offer space matrix
offer_number < number_of_offers +1 %% extraxts row of data from offer matrix fcm_input = offers (offer_number,:) %% initiates FCM within simulink %% output to matrix called offer_rank %% Buyer specific FCM called is first text %% string within bracket %% initial state defined by matrix %% fcm_input [t,x,offer_rank] = sim('buyer_dummy',10,[],fcm_input) %% Add output to combined ranking %%matrix i.e. matrix of all rankings offer_rank_last = offer_rank(11,:) combined_rank = [combined_rank ; offer_rank_last] %% Increment to next offer offer_number = offer_number + 1 end
Once created the offer within the offer_rank matrix is compared to a purchase threshold that defines the level of utility for a purchase shall be made. If this utility threshold is exceeded than three essential actions are initiated. Firstly the Genco FCA be immediately informed of the intention of the Supplyco FCA to purchase the capacity to prevent the offer being subsequently and erroneously accepted by another Supplyco FCA. To prevent this the buying market agent places an instruction in the buy instruction matrix that is in turn searched by the regulator agent before enabling each market participant agent. If a buy instruction is found the market regulator agent enables the appropriate selling market agent to allow it to remove the offer both from its internal status file and the offer space. Secondly the Genco FCA then reconsiders all of its other offers in the offer space by means of its associated FCM in light of the variables associated with the sale. Offers are then withdrawn and reissued appropriately. At the cessation of the Genco FCA activity, control is returned to
UPEC 2007 - 1162
the Market Regulator Agent and the access sequence commenced at the next incremental FCA.
interconnection global data availability and a restricted set of goals.
Thirdly, purchased capacity is then subtracted from the Supplyco FCA load demand curve to reconcile the outstanding demand requirement, and the updated offers within the offers matrix are re-evaluated in light of the changed load demand requirement of the Supplyco FCA.
In later work we shall continue to develop the Market FCA Agency, creating models of Genco FCAs thereby permitting a full simulation to be implemented. These FCAs will be supported by robust FCM elicited from market experts to further enhance the potential of the approach.
This process is continued iteratively until the utility of the most attractive offer remaining in the offer matrix is less than the purchase threshold at which point the Supplyco agent returns to the passive state until the regulator agent calls it for the next round of bidding. This approach can be termed passive as the Supplyco FCA responds to Genco FCA offers re-evaluating its ranking of each offer over the time it remains within the offer space, but does not at any time act proactively by advertising its load demand requirement. This may be the actual strategy employed by the Supplyco but need not always be the case. The architecture of the Supplyco FCA recognises this facet and also incorporates an active component which given the correct circumstances as determined by its FCM will advertise its need for capacity. The process flow associated with this type of bidding is essentially the same as passive Supplyco transaction; in this particular instance when a Genco FCA is active it searches the Offer Space to identify Supplyco FCA ‘Offers’ for a capacity requirement, and if suitable issues a intention to supply that requirement in the Buy Space. In essence for all bidding strategies the Supplyco and Genco FCA are free to interact albeit on a sequential basis when called into activity by the Regulator Agent. What is important is that each FCA acts independently of each other within a flexible and dynamic structure.
4
CONCLUSIONS
In this paper we have presented how the FCM representing an electricity market domain can be disintegrated into smaller task and goal specific FCMs by the encapsulation of each fragmented FCM within a FCA. To this end we have demonstrated how two of the principal facets of this paradigm can be realised; firstly the architecture of an FCA Agency and how it can be administered, and secondly the essential elements of the Matlab code to mimic the communicational functionality of an AI-Agent to allow a Supplyco FCA to interact with the broader FCA Agency. It is evident from the discussion that each FCA within the Market FCA Agency can operate independently of other FCAs towards individual goals. Additionally the FCA Agency is characterised by a dynamic characteristic with only loose connections between individual FCAs. This is in contrast to previous FCM that are characterised by rigid
5
REFERENCES
[1] Borrie D. Őzveren C.S. Behavioural Simulation using Augmented Fuzzy Cognitive Maps For Decision and Policy Making in Competitive Electricity Markets, 40th International Universities Power Engineering Conference, Cork, Ireland, 603-607, 2005. [2] Koulouriotis D.E. Diakoulakis I.E Emeris D.M. Anamorphosis of Fuzzy Cognitive Maps for Operation in Ambiguous and Multi-Stimulus Real World Environments, Proceedings of the 10th Annual IEEE International Fuzzy Systems Conference, Melbourne, Australia, 1156-1159, 2001. [3] Miao Y. Liu Z.Q. Siew C.K. Miao C.Y. Dynamical Cognitive Network – An Extension of Fuzzy Cognitive Map. IEEE Transactions on Fuzzy Systems, Volume 9, No. 5, 760-770, 2001. [4] Haigwara M. Extended fuzzy cognitive Maps. The proceedings of the IEEE International Conference on Fuzzy Systems FUZZ-IEEE, San Diego, USA, 795-801, 1992. [5] Zhuge H. Luo X. Knowledge Map Model, Grid and Cooperative Computing GCC-2004, Third International Conference Proceedings Lecture Notes in Computer Science, Wuhan, China, 381-388, 2004. [6] Borrie D. Őzveren C.S. Simulation of Complex Environments: The Fuzzy Cognitive Agent. Sixth International Conference on Intelligent Systems Design and Applications, (ISDA’06), 348-353, 2006.
AUTHOR'S ADDRESS The first author can be contacted at Division of Engineering, School of Computing and Advanced Technologies. University of Abertay Dundee Bell Street, Dundee, DD1 1HG United Kingdom Email
[email protected]
UPEC 2007 - 1163