Dual Layered Architecture for Multi Agent Based Islanding and Load Management for

This paper proposes a novel dual layered multi agent system (MAS) based control system for the use in microgrid operations. In developing a smarter grid capable of withstanding disturbances and/or outages and providing quality service to the consumers, reliable microgrid control architecture is vital. The innovative microgrid control system proposed, makes the microgrid capable of isolating the local grid from effects of any upstream disturbances in the main utility grid by operating disconnected from the main utility via islanding, and it allows the most critical local loads to be supplied by any, available, local power source during such islanded operation. The proposed MAS control architecture is developed using the JADE platform and it is used to control a test network simulated in MATLAB. The results of these simulations show the capability of developing MAS based reliable control mechanism for islanding and load management of microgrids based on the proposed concept.


Introduction
The modern world moves forward with an ever increasing demand for electricity.This growth in demand for electrical power is becoming a major challenge for electrical supply authorities worldwide with the present energy crises.Dwindling oil reserves, consequent rise in electricity costs and the mounting need to address concerns regarding climate change due to the emission of greenhouse gases (GHG) are forcing utilities to look at new concepts in electricity generation, transmission, distribution and utilization [1].
The present grid systems which have mostly been built over the last century are rapidly aging.Legacy power distribution systems are facing a tough challenge in meeting the needs of a rapidly evolving electricity market.Time is ripe for a smarter grid, capable of meeting the present and future power delivery requirements [1]- [3].The need to reduce GHG emissions have ushered in the need for greener electricity generation and incorporating renewable energy sources into the energy mix.These complications demand a paradigm shift from large scale fossil fuel based sources towards small scale lower emission systems.The incorporation of smaller distributed generation (DG) units with maximum renewable energy penetration becomes vital in meeting these demands.
Centralized control systems are more powerful in controlling available resources in traditional power systems.However the current power network, with more renewable power sources with intermittent nature, dynamic behavior has increased considerably.In this context literature has recognized multi agent based systems gives more flexibility to the power network [4].
Grids with such DG systems require the ability to handle active generation and loads, which existing legacy system designs are unable to address [2].Smaller "micro" grids comprising local generation is a concept put forward to cater this requirement [2].These microgrids can be operated either in island mode, where the local loads are fully supplied by the local generation, or in grid connected mode, where the microgrid is either exporting or importing power from the main grid.With the local generation and loads coming into the picture, local distributed control is essential for the grid stability.
Therefore, these power systems have to become smarter with local distributed control capabilities and more reliable and robust in taking on renewable energy sources without losing stability and efficiency.Smarter microgrids are an answer to this situation.As an innovative method in providing this flexible distributed control requirement, Multi Agent Systems (MAS) are stepping forward [3].MAS based applications can be found in several areas in the power system, such as electricity market applications [5] [6], smart grid related areas [7] [8] and power control applications [9].Under power system control, load restoration [10] and load shedding [11] and are the key areas for microgird applications.
Agents in the MAS can use artificial intelligent (AI) techniques to attain the proper control of the microgrid to keep the system voltage and the frequency within the acceptable level [12] [13].MAS architecture play a vital role in these applications [14] [15].This paper proposes a novel MAS architecture which provides scalable and robust distributed control architecture for microgrid applications.
The MAS model is designed using the JADE [16] [17] platform and is implemented on a simulated test-bed in MATLAB/SIMULINK.
Rest of the paper is organized as follows.A brief introduction to microgrids and MAS is given in Section 2. A novel dual layered MAS architecture is proposed in Section 3. Simulation results of a conceptual microgrid operation based on the proposed architecture is discussed in Section 4. The conclusions are presented in Section 5.

Microgrids and Multi Agent Systems
Centralized, bulk generation facilities are giving way to more distributed and small scale generation systems.Distributed generation (DG) introduces the capability of embedding a wide range of low emission and potentially lower cost generation options.Such options can include internal combustion (IC) engines, micro-turbines and non-conventional renewable energy sources such as solar photo voltaic, wind, biomass, mini/micro-hydro and even waste-to-energy systems.These smaller generation technologies allow the sources to be placed optimally with respect to the loads, thus reducing emissions and transmission losses, while also allowing for local control instead of centralized dispatching [2].
Such DG systems provide the potential to take a sub-system approach in working with microgrids.During a disturbance in the main utility grid, local generation and their loads can be separated from the utility isolating the local loads from the disturbance, while maintaining the integrity of the main utility grid.This isolation is carried out at a single point of connection to the main utility known as point of common coupling.This capability, known as islanding, requires high reliability and flexibility from the microgrid.These requirements can be met by having peer-to-peer control and plug-and-play capabilities in each entity within the microgrid.
A conceptual microgrid model is shown in Figure 1.This can be either a small scale distribution level network or an electrical system of a building.Certain loads, which are critical, have local power sources.Non-critical Once an upstream disturbance takes place on the main grid, the microgrid can be separated from the main grid at the point of common coupling and isolate the local loads from any outage, providing a higher level of service, with minimum effect to the stability and the integrity of the main grid.This capability of intentional islanding delivers a higher reliability than legacy power systems [2].Thereafter, the microgrid has to manage the local loads to make sure that the most critical loads are supplied by the available limited local capacity.This requires priority based shedding of non-critical loads.

Multi Agent Systems (MAS)
With the need of peer-to-peer control, plug-and-play capabilities required in successfully implementing microgrids; more robust distributed control architectures are being required.Multi Agent Systems (MAS) have been successfully used to fulfill this requirement [18]- [21].MAS are a collection of intelligent agents with limited local knowledge, but with enhanced communication capabilities, that can cooperate to achieve a global objective [22].
The notion of agent or agency had been developed for use mainly in computer science applications.A comprehensive comparison of the numerous definitions alongside with their benefits and drawbacks has been presented in [23].The authors prefer the definition proposed by Wooldridge [22], as found in many of the recent literature.In [22], an agent is defined as a software entity inside an environment able to autonomously react to any changes.Here the notion of an agent, an environment and the ability of autonomy is defined.The environment suggests everything external to the agent.In order for an agent to behave in an environment it should, at least in part, be observable or alterable by the agent.In the microgrid paradigm, the environment and the agent are situated in the power system, which is observable through power-electronic sensors, and alterable through power-electronic devices i.e. closing or opening a breaker to reconfigure the power flow.
Definition in [22] differentiates agents from existing systems and objects in programming with the concept of flexible autonomy.Characteristics of agents are: Reactivity-ability to react to sensible changes in the environment; Pro-activity-make intuitive decisions and display goal-oriented behavior; and Social-ability-be able to communicate with other agents using a common language and initiate conversations.Some existing control systems and software objects exhibit reactivity, but an agent with flexible autonomy differs from them by displaying a degree of intuition, alongside social ability [22].Integration of two or more such intelligent agents coordinating to achieve a global objective by trying to fulfil local goals is a MAS.
Readers interested in a detailed guide to the concepts, methodologies, technical problems and the applicability of MAS in power systems applications are referred to [18].An in depth discussion on the standards, tools, ontologies, design requirements and specifications can be found in [19].

MAS and Distributed Control of Microgrids
Agent systems are inherently distributable owing to their separation from their environment.An agent can be copied to a different location without losing reasoning capabilities or the goals.This allows for an agent to react in different ways to two different environments, given both environments support the intended tasks.
A basic issue for distributed generation is the technical difficulties related to control of a significant number of micro-sources.Research into implementing MAS for microgrid applications has been rising in the recent years and has mostly recently centered on distributed control, electricity trading, and power system restoration [20].
Intelligent agents can be assigned to each entity in a microgrid; i.e. circuit breaker, electricity generation unit, loads, users etc.This assignment will determine the MAS architecture.Several different architectures for microgrid applications have been proposed up to now i.e. [23]- [25].Single layered architectures are the most pre-dominant type in the literature.For example, single layered architectures have been proposed for microgrid applications such as resolving real and reactive power mismatch [25] and load restoration [26].In these single layered agent topologies, agents are tasked with multiple objectives.For instance, main controlling agent in these architectures is commonly tasked with islanding; load shedding, load management and process control simultaneously.This becomes a shortcoming in improving the scalability and in building robust distributed control models.Therefore, the appropriate delegation of objectives to secondary level agents improves the robustness of the model.Such secondary agents can be tasked separately with islanding control and load shedding, while overseen by a primary agent on the primary layer.
Several multiple level control architectures have been presented in the literature [27]- [29].However, in these multi layered topologies, the layers address different strata of the distribution grid and not of the control architecture.

Proposed Dual-Layered Mas
Figure 2 shows the conceptual design of the proposed dual layered control architecture for microgrids [30].The proposed MAS system is developed using the JADE platform [16] [17] [31].The model presents a distributed control architecture operating in two layers.The primary (strategic) layer comprises the Control agent who makes the run-time decisions.The control agent is in control of a secondary layer, overseeing the load control and microgrid connection control capabilities.The control agent is the center of the primary layer holding influence over the DG agent, controlling the LV and Load agents and interfacing with the User agent.
The command hierarchy of the proposed dual layered MAS architecture is depicted in Figure 3.The secondary (tactical) layer contains the DG Agent, LV Agent, Load Agent and User Agent.This layer carries out the execution of the run-time decisions of the strategic level, which mainly comprises input/output operations.The DG agent collects several information related to the DG; 1) availability, 2) connection status, 3) power rating, 4) energy source availability and 5) cost of energy.
During an upstream fault, the LV agent islands the microgrid, by tripping the circuit breaker at the point of common coupling, if the Control agent allows it.During island operation the load shedding is carried out by the Load agents to ensure that power is delivered to the most critical loads on the priority basis set by the Control agent.This is implemented by Load agents opening circuit breakers at each of the controlled local loads.
The User agent behaves as the gateway for the user to interact with the system, to obtain real-time information and to set system goals.A utility agent acting in the form of a database agent is utilized to store system information and data and messages shared between the agents.The priority list used for load management is also hosted by the database agent.The database agent acts as the access point for data for all the agents and users.
The MAS is developed for the load management during the islanded phase.As local generation capacities will most definitely be limited with respect to local loads, load shedding becomes unavoidable during islanding.Proper load management during load shedding provides better protection to the most critical loads.By assigning priority values to the local loads, the most critical loads can be identified for protection during islanded mode.By allowing priority level updates during operation the control over load shedding/management can be improved.
Both these layers are ultimately supported by a service (utility) provided by a DB (Database) agent, running in the background.This utility agent stores system information and data and messages shared between the agents and acts as a data access point for all agents.
The agents will behave as hybrid agents [32], capable of both reactive and deliberative actions.Reactive actions have the ability to respond quickly to emergencies of environment, while deliberative actions utilize the "belief, desire and intention" capability of agents [33] which allows them to adopt behaviors to achieve its objectives.
The control flow chart given in Figure 4 describes this load management during islanded mode.The user agent is allowed to update priority levels during runtime.By revising priority levels a user can restore power to a load that was previously considered non-critical.When the local capacity is deemed unable to meet the local demand, load shedding is initialized based on the priority values of the local loads.Then the load agents with lower priorities are advised to disconnect while maintaining supply to the most critical loads.When the priority list is updated by the user agent, it is hosted by the database agent and is broadcast to all the other connected agents.This triggers a re-evaluation of capacity and demand, and thereafter any necessary load shedding is carried out based on the revised/updated priority list.
The MAS controller allows the dynamic runtime update of load priorities for load management during a main grid outage.This allows a local grid operator to increase the priority of a currently disconnected local load, and reconnect it to the local grid depending on locally available capacity.A user can change the priority of load using the USER agent via a priority update message (Figure 3).This is updated in the database agent, who broadcasts a load priority update to the load agents.
If another "new" local load, needs to be added during islanded operation the same routine will be followed.
The connection of the new load would depend on its priority level.If its priority precedes that of the current local loads, the new load will be connected to the load grid while the lower priority loads will be shed depending local capacity.If it has a lower priority, it will not be connected unless a user raises its priority via the USER agent.
The Proposed architecture, allows for self-organizing control.As each agent acts independently, once an agent is created or initiated it can seamlessly connect and logically interact with existing agents.This is done via the directory service provided by a utility agent acting as a database.A newly initiated agent can register in the directory and advertise its capabilities and requirements to the others.This provides self-organization capabilities to the control framework.Therefore, if one agent goes offline, the other agents can reorganize to cope with the loss.This ability increases the scalability and robustness of the controller.

Simulations and Results
Three simulations are carried out as case studies to verify the capability of the proposed MAS to provide control and protection for an inverter based microgrid.Within conventional power systems, frequency control is handled by rotating inertial masses of large generators.This causes a problem within smaller microgrids.Therefore, an inverter based system is selected, where the frequency control is handled by the inverter interface.
The multi agent system runs on a JAVA platform while the simulation is run on a simulating environment.Therefore, in order to establish communication between two domains, for sensing and control TCP/IP is used.A third party TCP/IP server [34] is utilized as an interface to MATLAB and it connects to another middle server which allows multiple simultaneous TCP/IP connections.Each agent requires a separate connection to the test-bed.The interface allows only a single connection at a time; therefore a separate middle server is required.This process is depicted in Figure 5.
The SIMULINK model for microgrid test bed designed for the simulations is shown in Figure 6.It consists a 480V, 15 kW embedded generator, acting as a DG unit, supplying part of the local demand, and two bulk local loads of 15 kW each.The loads are considered only at lumped load level, and connection/disconnection of part loads are not considered in this study.It is assumed that the DG units can operate at full capacity without fuel limitations during any outage.
In the inverter based microgrid is considered a grid interface unit comprising an inverter, low pass filter, Pulse Width Modulation (PWM), transformer and circuit breaker is used to connect a local DC source.The microgrid is connected to a main utility grid (11 kV) across a transformer (11 kV/400 V) and a main circuit breaker.

Intentional Islanding during Upstream Fault
The first case study is carried out to verify the effectiveness of the MAS in rapidly islanding the microgrid upon  the detection of an upstream outage on the main grid.The test-bed used for the simulation is shown in Figure 6.It comprises a 15 kW DG unit producing 480 V, connected to a 400 V, 50 Hz microgrid, a transformer (480 V/400 V) connecting the DG to the microgrid, two 7.5 kW local loads, with a connection to a 11 kV main utility grid fed through another transformer (11 kV/400 V), all of which are connected across circuit breakers.Total local demand is 15 kW, 50% of which (7.5 kW) is supplied by the DG unit, while the rest is supplied by the main grid.It is assumed that the DG unit can instantly increase output using battery storage.An upstream fault is introduced to the system at t = 0.05 s into the simulation.At the beginning of the simulation breakers A, B, C and D are all closed.The test-bed shown in Figure 5 is simulated for 0.1 s.The simulation results depicting the successful islanding process are presented in Figure 7.
a) Upon detection of upstream fault: When the upstream outage is detected at t = 0.05 s the control agent informs the LV agent and the Load agents to switch to the islanded mode operation.Upon receiving the islanding order the LV agent trips the main circuit breaker A, at the PCC, isolating the microgrid from the utility [Figure 7(a)].The Control agent then queries the DG agent and the load agents regarding their available capacities that the DG can provide to the microgrid and the power requirements of the connected loads.
As the available maximum capacity of 15 kW is able to meet the total demand of 15 kW, the control agent commands the DG agent to increase DG output to match the demand.Soon as the microgrid is put to island mode the supply to the loads are maintained [see Figure 7(b)].
b) In islanded mode: At t = 0.05s the microgrid is separated from the main grid and the local loads are secured.After the microgrid switches to island mode the total local demand is met by the DG unit by supplying 15 kW.
All agent operations are carried out rapidly, from detecting fault, opening the main breaker, connecting the local source and shedding loads, to stabilize the microgrid within 0.02 s.Therefore, the system is able to disconnect from the main utility grid and maintain the supply to the critical loads without suffering a brownout and/or blackout.

Securing Power to Critical Loads during Intentional Islanding
The second case study addresses the capability of the MAS to secure power to the critical loads during intentional islanding.This needs to happen immediately following the transition to islanded mode.If the available supply of the local DG unit is limited and insufficient to supply the total local demand, load shedding has to be done rapidly in order to secure supply to the most critical loads.The test-bed used for the simulation is shown in Figure 8.The test-bed is same as the one used in case study 1 (Figure 6), with only the following changes.Two  local loads are 15 kW each with assigned priorities (p) of p = 0.7 and p = 0.4 respectively.The total local demand is 30 kW; initially the DG unit supplies 10 kW while the other 20 kW is provided from the main grid.Similar to case study 1, an upstream fault is introduced to the system at t = 0.05 s into the simulation.At the beginning of the simulation breakers A, B, C and D are all closed.
The test-bed shown in Figure 8 is simulated for 0.12 s. the simulation results shown in Figure 9 depict the successful islanding and subsequent securing of power for the critical loads.a) During grid connected mode: While the microgrid is in grid-connected mode, the total demand is 30 kW, with 15 kW critical loads and 15 kW non-critical loads.During the grid-connected mode the DG unit provides 10 kW output and the other 20 kW is provided by the main grid.The main grid experiences a fault at t = 0.5 s.
b) Upon detection of upstream fault: When the upstream outage is detected at t = 0.05 s the control agent informs the LV agent and the Load agents to switch to the islanded mode operation.Upon receiving the islanding order the LV agent trips the main circuit breaker A, at the PCC, isolating the microgrid from the utility [Figure 9(a)].The Control agent then queries the DG agent and the load agents regarding their available capacities the DG can provide to the microgrid and the power requirements of the connected loads.
As the total load of 30 kW exceeds the available maximum capacity of 15 kW, the control agent commands the load agents to shed the 15 kW non-critical loads to match the DG capacity and the DG unit to increase output to 15 kW.Soon as the microgrid is put to island mode the supply to the critical loads is maintained [see Figure 9(b)].The load agent at the non-critical loads sheds them from the system by opening breaker D [see Figure 9(c)].
c) In islanded mode: At t = 0.05s the microgrid is separated from the main grid and the load agents balance the local demand.After the microgrid switches to island mode the total local demand is met by the embedded generator supplying 15 kW.

Load Management during Islanded Mode Operation
The third case study addresses the capability of the MAS to provide load management capabilities during islanded operation.As the available local capacity is limited and insufficient to cater total local demand during islanded mode, non-critical (lower priority) loads will have to be dynamically shed in order to protect the stability of the microgrid.This simulation shows the ability of the MAS to allow for dynamic update of load priority levels.The simulation uses the test-bed shown in Figure 8.
The local loads are given the two same initial priority levels as shown in Figure 8. Local load 01 is given a priority level of p = 0.7, and load 02 is given a priority level p = 0.4.For this initial setting, their respective load agents designate load 01 as a higher priority load and load 02 as a lower priority load.At the beginning of the simulation, breakers A, B, C and D are all closed.An upstream fault is introduced to the system at t = 0.05 s into the simulation, and the microgrid switches to islanded operation.During islanded mode operation, the load 02 priority is raised to 0.9 at t = 0.14 s.
The test-bed shown in Figure 8 is simulated for 0.2 s. the simulation results shown in Figure 9 depict the successful islanding and subsequent load management.a) During grid connected mode: While the microgrid is in grid-connected mode, the total demand is 30 kW, comprising two 15 kW local loads.During the grid-connected mode the embedded generator only provides 10 kW, while the other 20 kW is supplied by the main grid to the microgrid.b) Upon detection of upstream fault: Similar to case-study 1 and 2, the proposed MAS is able to successfully island the microgrid during the upstream outage within 0.02 s of detecting the fault in the main utility grid [see Figure 9(a)].As the local generation capacity is unable to meet the total local demand, the MAS initiates load shedding upon initially set priority levels of the loads as in case study 2. This enables the MAS to maintain supply to the most critical load, load 01, by shedding the least critical load, load 02.c) In islanded mode: During the island operation, the user agent can revise the initial priority assignment.This can be pre-initiated or a user can change the priorities during the islanded mode.
At t = 0.14, the user agent revises the priority value of load 02 from p = 0.4 to p = 0.9 and communicates the "revise_request" to the load agent at load 02.This update is forwarded to other agents via the directory agent, and the control agent reinitiates load management procedures.As the DG unit is still unable to meet the total demand of 30 kW, and has to shed non-critical (lower priority) loads to maintain power to the new highest priority load, load 02.
Therefore, the control agent commands the load agents to shed the load 01 of 15 kW to match the DG capacity.Thus, the supply to the new most critical load, load 01 is provided by re-closing "D" [see Figure 9(c)].The load agent at the current lower priority load 01 sheds them from the system by opening breaker "C" [see Figure 9(b)].
When the load priorities are revised by a user via the user agent, the MAS is able to reconfigure the system, in order to provide power to the current most critical load/s.The reconfiguration is also done within 0.02 s of the revision and successfully reconnects the new critical load.The results show the capability of the MAS to safely island and maintain the supply to its critical loads, while allowing for the critical loads to be dynamically revised.
All agent operations are carried out rapidly, from detecting fault, opening the main breaker, connecting the local source and shedding loads, to stabilize the microgrid within 0.02 s. the load reconnection after the priority update is done again within 0.02 s of the revision being sent from the user agent.The rapid transitions (within one cycle) ensure a high power quality with minimum effect to the loads.Therefore, the system is able to disconnect from the main utility grid and maintain the supply to the critical loads without suffering a brownout and/or blackout.

Conclusions
The proposed dual layered MAS is able to successfully island the microgrid during an upstream outage within 0.02 s of detecting the fault.As the local generation capacity is unable to meet the total local demand, the MAS initiates load shedding upon pre-set priority levels of the loads.This enables the MAS to maintain the supply to the most critical load/s by shedding least critical loads until DG capacity can meet the demand.The proposed MAS controller allows for dynamic/real time load management during islanded mode of operation.When the load priorities are revised by a user via the user agent, the MAS is able to reconfigure the system, in order to provide power to the new most critical load.The reconfiguration is also done within 0.02 s of the revision and successfully reconnects the new critical load.The rapid transitions (0.02 s) ensure a high power quality with minimum effect to the loads.The results show the capability of the MAS to safely island and maintain the supply to its critical loads, even if the critical loads are revised.These results validate the effectiveness of the MAS in controlling DG units to protect and control a microgrid.
The agent behaviour can further be developed using fuzzy/neural/heuristic algorithms.The long-term extensibility of MAS can be evaluated by studying the effect of increasing number of agents on controller stability and service latency.Another important area of future study will be the developing the requirements of communication network redundancy and data network security to prevent cyber-attacks and intrusions from taking down the smartgrid.

Figure 1 .
Figure 1.Conceptual microgrid model.loads have no local supply.Once an upstream disturbance takes place on the main grid, the microgrid can be separated from the main grid at the point of common coupling and isolate the local loads from any outage, providing a higher level of service, with minimum effect to the stability and the integrity of the main grid.This capability of intentional islanding delivers a higher reliability than legacy power systems[2].Thereafter, the microgrid has to manage the local loads to make sure that the most critical loads are supplied by the available limited local capacity.This requires priority based shedding of non-critical loads.

Figure 3 .
Figure 3. Command hierarchy of the proposed dual layered MAS architecture.

Figure 4 .
Figure 4. Control flow chart for load management.

Figure 5 .
Figure 5. SIMULINK model for simulation test bed.

Figure 7 .
Figure 7. Voltages measured during simulations (line-to-line) at (a) Line to line voltage across the non-critical load at "A"; (b) Line to line voltage at breaker "B".

Figure 9 .
Figure 9. Voltages measured during simulations (line-to-line) at (a) Main grid voltage at breaker "A"; (b) Load 01 measured at "C": switches from high priority to low priority; (c) Load 02 measured at "D": switches from low priority to high priority.