Multi-Agents for Microgrids

Microgrid systems are built to integrate a generation mix of solar and wind renewable energy resources that are generally intermittent in nature. This paper presents a novel decentralized multi-agent system to securely operate microgrids in real-time while maintaining generation, load balance. Agents provide a normal operation in a grid-connected mode and a contingency operation in an islanded mode for fault handling. Fault handling is especially critical in microgrid operation to simulate possible contingencies and microgrid outages in a real-world scenario. A robust agent design has been implemented using MATLAB-Simulink and Java Agent Development Framework technologies to simulate microgrids with load management and distributed generators control. The microgrid of the German Jordanian University has been used for simulation for Summer and Winter photovoltaic generation and load profiles. The results show agent capabilities to operate microgrid in real-time and its ability to coordinate and adjust generation and load. In a simulated fault incident, agents coordinate and adjust to a normal operation in 0.012 seconds, a negligible time for microgrid restoration. This clearly shows that the multi-agent system is a viable solution to operate MG in real-time.

In a centralized architecture, there exists one master controller and slave local controllers. Single node failure, bounded operation requirements and communication complexity represent the main shortcomings of the centralized architecture. In a decentralized architecture, a generation resource generally uses the MG Central Control [2]. MAS technologies are used to implement the decentralized control architecture [3]. Agents operate and control generation and load of the MG nodes and coordinate power flow in order to maintain a stable and reliable power system in real-time.
Research efforts have been made on the design and implementation of MAS control strategies in the context of energy management. Such implementation is still considered in the early stages of development. Control and communication aspects are considered two essential criteria. The Supervisory Control and Data Acquisition (SCADA) runs in a centralized manner in a conventional large-scale power system and does not seem fit for the MG due to complexity and cost implications [4]. In the event of grid failure, for instance, SCADA may generate a huge number of fault records [5] that are not applicable in the MG. MAS is, therefore, a viable alternative technology that can effectively operate the MG [6]. A comprehensive review of MAS in regard to concepts, platforms, and applications for power systems has been made in [7]. MAS applications include electricity markets [8] [9], grid control systems [10] [11], grid protection [12], and power optimization [13]. The main advantages of MAS in the MG have been discussed in reference [14], with a detailed comparison between MAS and SCADA.
The development of MAS is not proprietary, and so off-the-shelf open-source software components and ready-made JADE modules can be openly used to customize MAS and to integrate through a set of interfaces with third-party management, accounting, and operational control software. MAS are also flexible and can be extended to connect or isolate from the grid in a rapid and seamless fashion with independent control of reactive and active power. MAS agents are generally designed to correct voltage sag and system imbalances and to adapt to the larger grid's load dynamics requirements [13].
The implementation of comprehensive real-time MAS in the MG, however, has not been addressed yet in research. The main contribution of this paper is to provide a viable MAS approach with agent technical design that accounts for temporal and spatial operations of each MG renewable resource and load elements while maintaining generation-load balance in real-time and reliability and contingency constraints including optimal power flow, voltage limits, and spinning reserve. This research builds on the research collaboration of the 3DMicrogrid project [15] [16]. MATLAB-Simulink and Java Agent Development Framework (JADE) technologies are used for agent design to operate microgrids with load management and distributed generators control in both islanded and grid-connected modes. The MG of the German Jordanian University (GJU) is used for simulation. The MG general design is centered around keeping the system stability, serving critical loads and supporting non-critical loads.
The remaining sections of this paper are organized as follows: Section 2 provides a description of GJU MG. The MAS design and implementation is given in Section 3. Section 4 presents the results of simulation. Finally, the paper is concluded in Section 5.

GJU Microgrid
The MG generally consists of controllable loads and renewable generation resources (e.g., wind and solar) that are complemented by on-site diesel generators and/or storage batteries. The MG is managed and operated in real-time either in a grid-connected mode or an islanded mode mainly controlled through point of common coupling (PCC). The GJU MG consists of five Photovoltaic (PV) array sites with a total capacity of 2.11 MW, six backup diesel generators with 150 -703 KVA, three load busses with campus buildings interconnected in a ring structure that integrates with the power grid through T5 PCC. The total PV generation capacity is 2.11 MW with peak power of 315 W and efficiency of 16.23%. These diesel generators are coordinated by the Engine Control Unit. In addition, each building (B, C, H, and M) has 10 KVA and building A 60 KVA Uninterruptible Power Supply, mainly for emergency use.
The GJU MG is simulated in MATLAB-Simulink. A discretized model of step size of 50 microseconds is used for the simulation of 24 seconds that are mirroring every 24 hours. The model includes buildings, PV systems, diesel generators and the PCC to the utility grid. Two main stations are connected with six substations, connecting PVs, Diesel Generators (DG), and Loads. Parameters of transformers, cables, load, PV, DGs and other components are included in the setup of the model.

Multi-Agent System
The multi-agent system is implemented using JADE. The agent software represents the operational activities of PV generators, loads, and power flow management. Agents interact with their peer agents over the "smart micro-grid infrastructure" through JADE common agent platform [17].

Agent Software
The gent software encodes the state defining attributes specific to PV, load, and transmission line, cost parameters, and operating voltage and power limits. It also encodes behavior to coordinate generation-load balance and other operational requirements as well as maintaining security and reliability. Agents communicate using TCP/IP protocol on the basis of a message-oriented and content independent protocol and open-source libraries that comply with the standards of the Foundation for Intelligent Physical Agents.
Agents operate PV distributed resources, loads, and coordinate to ensure balance and stability. PV agents monitor, communicate, and control generation. The inputs to the agent are PV active power, generation of the diesel generators, power flow at the PCC connecting to the main grid power, and status of circuit breakers. The output of the agent is two set-points for the diesel generators and four commands for the PV and grid circuit breakers. Load agents monitor, communicate, and control loads by shedding PV available generation in an islanded mode. The inputs are load active power (block A, B, C, D, E, and F) and the status of circuit breakers. The outputs are shedding commands. A simulated model of communication between MATLAB-Simulink and JADE agents are shown in Figure 1.

PV Agent
PV agents operate PV distributed resources while coordinating with other agents to ensure balance and stability of the microgrid system. Figure 2 presents the  algorithmic sequence of operation of PV agents. In a grid connected mode, PV agents actively monitor the status of faults and enable PV units to produce power to meet demand and operate a two-way power flow with the utility grid. In an islanded mode, PV agents coordinate with diesel generators to produce power in case of PV fault or shortage of power supply. PV agents coordinate with MG agents to maintain stability and reliability. They provide commands for the set points of diesel generators (DG) by implementing a simple linear control of a lower limit of 0% and upper limit of 70%, with an increasing rate of 7/3000, formally defined as follows: where f(x) denotes the set-point percentage at DG 5 of the total capacity and x denotes power produced at DG 6 in kW. At an upper limit of 70% of DG 5 capacity (30% is left for a safety margin), it starts negotiating with load agents to reduce power and prevent MG failure.

Load Agent
Load agents coordinate to provide enough power at load points. In a grid-connected mode, the shortage of power is supplied by the utility grid. In an islanded mode, a scheduling algorithm is implemented in the load agent software as shown in Figure 2. The load agent sheds load (PShed) based on a priority sequence. For GJU case study, critical loads are in blocks B and D. During the shedding process, load agents coordinate with PV agents for enough power generation. The algorithm for this coordination is shown in Figure 3. Each time a PV agent approves the request to connect a 100 KW (Pconnect), the load agent executes its algorithm and starts checking the possibility of connecting the load based on the priority associated with other load agents representing blocks C, E, and F.

Simulation Results
The MAS for GJU is implemented using MATLAB-Simulink and JADE technologies. Three simulation scenarios are presented for the Summer and Winter PV generation and load profiles. The peak PV power generation in Winter and Summer are 398 KW and 2100 KW, respectively. The peak loads in Winter and Summer are 1200 and 1450 KW, respectively. The MG, therefore, provides excess power to the main grid in Summer and compensates for the power shortage either from the main grid or by turning on the diesel generators in Winter. Agents coordinate to control excess and shortage of power between PVs, DG, and Grid.

Grid-Connected MG
This scenario simulates the microgrid under normal operating conditions in a Energy and Power Engineering  net metering at the PCC becomes positive, which indicates a shortage of PV generation at the building sites. As a result, the power flows from the main grid to the MG.

Islanded MG
This scenario simulates the microgrid in an islanded mode for Summer and Winter PV generation and load profiles. The PV circuit breakers connecting to the main grid are off. Diesel generators are turned on to compensate for power shortage when needed. In Summer, the MG load agents run a shedding schedule to maintain generation, load balance. When the total generation reaches above 70% of the total capacity, the PV agents propose a load reduction from the load agents, which in return accepts reduction as long as critical loads are met. Upon acceptance, the load agents begin shedding loads following the algorithm depicted in Figure 3. Power shedding starts in conjunction with maxing out of the diesel generator at 70%. Load agents keep track of shed load for each block. The load shedding implementation is done by numerically subtracting power demand from available power for three building with less priority. The net power metering of an islanded mode for a summer generation and load profiles is shown in Figure 5. The accumulative power of block F is always negative as it has the least priority. The negative power indicates DG producing power at the building block. Load shedding is also evident in block E that it is kept at zero during the afternoon. When instant power is shed from block F and E, the load at block C is reduced. Since the utility grid is disconnected, the power flow at PCC is always zero. Small amounts of power indicate power loss at MG feeders and transmission lines.  In Winter, a similar approach is implemented. The only difference is that the amount of load shedding in Winter is naturally smaller. This enables PV agents to begin coordination using the scheduling algorithm described in Section 3.2. Figure 6 shows the net power metering at PCC with main grid and at each building block (B, C, D, E and F). The amount of Pshed and PConnect play an important role in the number of successful collaborations between agents. A higher value could result in stability issues and lead to decrease the chance of accepting the proposal, for both shedding and reconnecting. While a small value would not be appropriate and leads to increasing agent communication. To avoid communication overhead, a small value (e.g. 20 kW) is chosen to ensure smooth load reduction while taking into account generation capacity. A larger value was found to increase spikes in DG outputs as shown in Figure 7, leading to unstable MG operation. DGs have enough capacity to meet instantaneous critical loads.

Fault Handling
This scenario simulates how agents coordinate to handle faults at MG. A single phase-to-ground fault is introduced at the main feeder connecting the utility grid on phase B. Since the fault takes place at the upstream grid, MG immediately disconnects from the utility grid and shifts its operation to islanding mode [18]. A fault incident is time critical and requires agents' immediate response by disconnecting MG directly after receiving a fault signal. Agents communicate an emergency to switch to an islanded mode. This fault scenario is studied for both Summer and Winter PV generation and load profiles.   In Summer, a fault is simulated during off peak time (non-working hours), and hence MG operates at its minimum load. Figure 8 shows PV agents disconnecting and switching to DG operation during a fault incident. PV disconnection is necessary to prevent any damage that might occur to the inverter or the Energy and Power Engineering lack of adequate inertia in the microgrid to accommodate the amount of installed PV. As can be seen from the Figure, agents briefly misinterpreted the large disturbance of the fault and started to shed the load, but it was shortly reconnected back as the instantaneous load is seen small enough to be fully supplied by the diesel generators. Figure 9 shows net power metering at PCC with main grid and at each building block (B, C, D, E and F). The islanding operation is indicated by the time during which the grid power is zero. Afterwards, PV agents coordinate to reconnect PV generation and the utility grid when the fault is cleared, and the microgrid resumes its normal operation for the rest of the day. In Winter, a fault is simulated during a peak time (working hours) and hence MG operates at its maximum load. PV agents collaborate to meet load and to keep MG stable by switching to DG and disconnecting PV. PV agents negotiate with load agents to reduce load when the DG power production goes above 70% of the total capacity. Load agents reduce their load to half while keeping the critical loads connected. As in Summer, the status of DG, PV, and PCC, load shedding, and DG power output exhibit the same behavior during a fault incident. Figure 10 shows the voltage fluctuation during 0.012 second of the fault incident when transiting to the islanded mode. PV agents successfully operate DG in block E to follow the temporary slack generator in block F. It is obvious that the output power mirrors the set-point graph generated by PV agents. This fast response enables the system to stay stable and to smoothly transfer the microgrid from grid-connected to islanding mode and vice versa. The entire latency between the moment the signal is distorted when the fault takes place and the recovery of Energy and Power Engineering  the signal when the microgrid stabilizes is 0.012 s. The hardware implementation of agents plays an important role in the response time to stabilize MG and restore to normal operation. The agent behavior clearly shows that the multi agent system is a viable solution to operate MG in real-time.

Conclusion
A novel decentralized multi-agent system is presented for MG operations in both grid-connected and islanded modes. Agents coordinate to operate MG in real-time while meeting generation-load balance and stability requirements. A robust PV and load agent design support a stable coordination during a transition from grid-connected to islanded operation as a result of a fault incident. The complex operation and coordination processes of agents have been implemented using open-source tools in JADE framework. Fault handling is especially critical in MG operation. GJU MG has been used for simulation not only for grid-connected and islanded scenarios but also for possible contingencies and MG outages in real world scenarios. Agents coordinate between each other to maintain generation-load balance in real-time for both grid-connected and islanded modes. In a simulated fault incident, agents coordinate and adjust to normal operation in 0.012 seconds, a negligible time for MG to restore to normal operation.