1 Introduction

The building blocks of an IDAPS microgrid comprise of both cyber and physical systems. The physical system consists of hardware elements, including power electronic devices, distribution circuits and distributed energy resource (DER) as solar photovoltaic. The cyber system consists of a number of software agents that acts individually as well as coordinate with each other as a central decision support unit. The cyber layer communicates with its associated physical layer through addressable communication interfaces [1]. The IDAPS microgrid runs in parallel with the local utility during the normal operating conditions. At the same time, it optimally coordinates DERs including generation, internal loads, and storage devices to address any environmental, operational, economic, or security constraints. The microgrid’s control architecture has been designed to isolate the microgrid from the local utility during the event of an upstream outage. In such a situation, the microgrid activates its internal generators to cover critical loads based on a given prioritized list.

In general, a microgrid is a subset of an electric power system. The three types of microgrid illustrations are: a single-customer microgrid, partial feeder microgrid is full-feeder microgrid. A microgrid comprising of a single-customer with internal generation and loads is called single customer microgrid. A microgrid that includes a part of the distribution feeder generally known as a partial feeder microgrid and the whole distribution feeder is identified as a full-feeder microgrid [2].

The “normal-mode” and “outage-mode” operations are the two usual operating strategies of a microgrid. During the normal-mode operation, a microgrid runs as a part of the local utility and coordinates its internal DERs i.e. solar photovoltaic and loads for the most optimal operation. Microgrid can be designed to isolate itself from the main grid and operate autonomously to secure critical loads in the case of the outage-mode operation [3]. In such a situation, a microgrid activates its internal generation and controls loads based on a pre-defined prioritized list to secure critical loads as needed. The functioning microgrid should be “intelligent”, “distributed” and “autonomous”, which hereafter will be mentioned to as a distributed autonomous power system (an IDAPS microgrid). Devices in an IDAPS micro-grid namely loads, generators, switches, etc. can interconnect among each others through a multi-agent system. This work focuses on the microgrid operation during emergencies [4].

The key characteristics of an IDAPS microgrid are intelligent, distributed and autonomous, each of which is summarized below.

  1. 1)

    Intelligent: IDAPS sheds low priority loads and secures critical loads then allows locally available power to be shared within a community.

  2. 2)

    Distributed: DER devices are dispersed in nature because various DER devices communicate within IDAPS with the help of multi-agent communication strategy.

  3. 3)

    Autonomous: IDAPS disconnects automatically itself from the local distribution utility during outage and operates autonomously to maintain the integrity of the system [5].

This paper elaborates multi-agent system (MAS) to detect the abnormalities in the power system (i.e. fault) and sends the control signal to the circuit breaker to isolate microgrid from main grid during abnormalities and also shed non-critical loads to secure critical loads. Agents are being deployed in system and detect fault using centralized multi-agent planning as shown in Fig. 4. In centralized multi-agent planning [6] a coordinator agent analyses planning of an individual agent and identify possible inconsistencies and conflicting interactions, like conflicts between agents over limited resources. The coordinator agent then tries to modify planning of each agent. Further coordinator agent combines these partial planning into a multi-agent planning.

This paper is further organized in 6 sections. Section 2 defines modelling of solar PV module as DER. Section 3 presents multi-agent system, JADE (Java Agent Development framework) platform for MAS, JADE architecture, features of JADE and purposed multi-agent system. Section 4 explains the simulation model developed in matlab Simulink. Section 5 describes the case study and the result and discussion after the successful implementation of proposed multi-agent system for securing critical loads. Section 6 concludes that with the help a centralized multi-agent system it is possible to secure critical loads during power system outages.

2 Modelling of solar PV module as DER

A technology that converts sunlight directly into electrical energy is called solar photovoltaic (PV). Direct current is the output of the solar cell and the major component of solar photovoltaic system consists of PV array, a battery storage unit, an inverter and a charge controller. A number of PV cells together forms PV modules, which further interconnected in series and parallel manner to form PV arrays for desired voltage and current output levels.

The equivalent circuit of a photovoltaic cell is represented by a constant current source (Iph) connected with a diode and a series resistance (Rs,cell), as shown in Fig. 1. The following are the basic equations from the theory of semiconductors and photovoltaic [7] that mathematically describe the IV characteristic of the photovoltaic cell and module. According to the equation the photocurrent Iph of the photovoltaic module linearly depends on the solar irradiation and is also influenced by the temperature.

$$ I_{ph} = \left[ {I_{SCr} + K_{i} \left( {T_{k} - T_{ref} } \right)} \right] \frac{\lambda }{1000}, $$
(1)

where ISCr is light generated current at the nominal condition (25 C and 1 000 W/m2) in A; K i is short-circuit current temperature coefficient (0.0017 A/K); T k is actual temperatures in K; Tref is reference temperatures in K; λ is irradiation on the device surface (W/m2).

Fig. 1
figure 1

Single exponential circuit model of solar cell

Module reverse saturation current Irs the PV module is given by the equation:

$$ I_{rs} = {{I_{SCr} } \mathord{\left/ {\vphantom {{I_{SCr} } {\left[ {\exp \left( {qV_{oc} /N_{s} AkT} \right) - 1} \right]}}} \right. \kern-0pt} {\left[ {\exp \left( {qV_{oc} /N_{s} AkT} \right) - 1} \right]}}, $$
(2)

where q is electron charge (1.610 × 10−19 C); Voc = VP, V is module open-circuit voltage (21.24 V); Ns is number of cells connected in series (36); k is Boltzmann constant (1.3805 × 10−23 J/K); A is ideality factor of diode (1.6).

The module saturation current Io varies with the cell temperature and is given by the equation:

$$ I_{o} = I_{rs} \left[ {T/T_{ref} } \right]^{3} \exp \left[ {qE_{g0} /Ak\left\{ {1/T_{ref} - 1/T} \right\}} \right], $$
(3)

where Eg0 is band gap energy of the semiconductor (Eg0 ≈ 1.1 eV for the polycrystalline Si at 25 °C); T is module operating temperature.

The basic equation which describes the output current of PV module IPV of the single diode model is represented by the equation

$$ \begin{aligned} I_{PV} &= N_{p} I_{o} \left[ {\exp \left\{ {q\left( {V_{PV} + I_{PV} R_{s} } \right)/N{}_{S}AkT} \right\} - 1} \right] \\ &\quad - V_{PV} + I_{PV} R_{S} /R_{sh} \\ \end{aligned} $$
(4)

where NP is number cells in parallel (NP = 1); Rs is equivalent series resistance of the module; Rsh is equivalent parallel resistance of the module.

At lower voltages the parallel resistance has greatest effect, i.e. when the passing current through the diode of the equivalent circuit is very small. The effect of parallel resistance, when it is sufficiently small, is to reduce the open-circuit voltage and the fill factor [8]. The relationship between relative efficiency of PV modules and isolation for various values Rsh is shown [9]. It is observed that for large values Rsh, the module efficiency at low values of isolation decreases by 3%–5%. So when Rsh is very large, we can neglect the same. However there would not be any appreciable variation at normal/higher values of isolation [10]. Hence by considering these factors a simplified PV module model has been developed and it is given by the equation

$$ I_{PV} = N_{p} I_{Ph} - N_{P} I_{o} \left[ {\exp \left\{ {q\left( {V_{PV} + I_{PV} R_{s} } \right)/N{}_{S}AkT} \right\} - 1} \right]. $$
(5)

Figures 2 and 3 shows the V–I characteristic and P–V characteristic developed for constant solar irradiation under different temperatures using Table 1. From Fig. 2 it is very clear that at constant solar irradiation, the change in temperature will lead to the change of the output voltage of solar cell i.e. when the temperature increases the solar out-put voltage reduces and if the temperature reduces output voltage increases. From Fig. 3 it is very clear that at constant solar irradiation, the change in temperature will lead to the change of the output power and voltage of solar cell i.e. when the temperature increases the solar output power and voltage reduces and if temperature reduces output power and voltage increases.

Fig. 2
figure 2

V–I characteristics of PV module developed

Fig. 3
figure 3

P–V characteristics of PV module developed

Table 1 Electrical characteristic data of solar 36 W PV module

3 Multi-agent systems

Multi-agent system (MAS) is most suitable for real time fault detection. The MAS is made up of multiple intelligent agents. Each one of them represents physical entity i.e. electrical components in our case, which can be a power house, home appliance, industrial area etc. Many authors have defined agent in their own ways. Therefore we can say that agent is a software entity that works in some embedded environment and has abilities to communicate autonomously with other agents to meet design requirements. In agent oriented programming (AOP), an application is modelled as a collection of components called agents. Multi-agent system is a group of these agents, in which all agents work coherently to perform desired tasks. This environment can be dynamic, uncertain and unreliable. Agent can also work as an environment that provides means of indirect communication. Multi-agent system is a new technology that brings artificial intelligence theories into practical existence. A middleware JADE (Java Agent Development Framework) is used to implement this system [11].

An agent can be considered as a computational entity that operates without human intervention (autonomous), interacts with each other (sociality), perceives and reacts to their environment (re-activity), always acts to obtain its aim (rationality) and exhibits goal-oriented behaviour by taking initiatives (pro-activity). Agent can also travel between different hosts and provide certainty that it will not provide any fault information to other system [12].

These agents communicate with each other in an embedded environment. Agents are able to make their own decision and hence can be classified as intelligent system. They take initiations to carry out desired activity and also respond to other agents to meet a mutual target. Architecture of agent application is peer to peer, that makes it able to initiate direct host to host communication at any time and also make it open for an incoming connection form any other agent. Agents can tolerate ambiguity arises due to conversation among agents. An agent also updates its rules through learning and become adaptive to dynamic system [13].

3.1 JADE platform for MAS

The JADE software platform initially developed by Telecom Italia (formerly CSELT) in late 1998. The main motivation of this work is to validate the early Foundation for Intelligent, Physical Agents (FIPA) specifications. Later it has been decided that to outgrow towards developing a fully-fledged middleware platform than simply validating the FIPA specifications. The main vision of developing JADE platform is to provide services to application developers and that can be redly usable for newcomers with little knowledge or no knowledge of the FIPA specifications and seasoned developers. JADE software is open source software from year 2000 and has been distributed by Telecom Italia under the LGPL (Library Gnu Public License) [14].

3.1.1 JADE and the agent paradigm

JADE is a software platform that delivers basic middleware-layer functionalities which are self-determining of the specific application and which simplify the understanding of distributed applications that feat the software agent concept. An important advantage of JADE is that it implements this idea over a well-known object-oriented language, Java, providing a simple and friendly API. The succeeding simple design selections were influenced by the agent abstraction. An agent is autonomous and proactive because agent cannot deliver call-backs or its own object reference to other agents in order to diminish any chance of other objects appointing control of its services. An agent must have its own thread of execution, using it to control its life cycle and decide autonomously when to perform which actions. An agent needing to interact must send a message to an identified destination (or set of destinations). There is no time-based dependency between the receiver and senders. A receiver might not be accessible when the sender gives the message. Getting the object reference of receiver agents is not necessary but just name identities that the message conveyance system is able to direct into accurate transport addresses. It is even promising that a precise receiver uniqueness be unknown to the sender, which in its place may define a receiver set using a planned grouping (e.g. all the agents that deliver the ‘Book-Selling’ service) or intermediated by a proxy agent (e.g. spread this message to all agents in the area ‘selling.book.it’ [14].

3.1.2 JADE architecture

A JADE platform is composed of agent containers that can be dispersed over the network. Agents alive in containers which are the Java progression that offers the JADE run-time and all the services wanted for hosting and executing agents. There is a special container, called the main container, which represents the bootstrap point of a platform. It is the first container to be launched and all other containers must join to a main container by registering with it. The programmer uses logical names to identify the containers and the default containers are represented by ‘Main Container’. All other containers are identified by ‘Container-1’ ‘Container-2’ etc. Following are the responsibilities of main container.

  1. 1)

    Managing the registry of the object references called container table (CT) and transportation of container node addresses which composes the platform.

  2. 2)

    Managing the registry of all agents present in the platform which includes their current status and location called global agent descriptor table (GADT).

  3. 3)

    Hosting the agent management system (AMS) and the directory facilitator (DF), the two special agents that provide the default yellow page service of the platform and agent management [15].

3.1.3 Features of JADE

JADE is a software framework that is used to develop agent application with FIFA specification for intelligent multi-agent system. JADE provides a run time environment for hosting and execution on an agent. JADE consist of several components to provide these facilities. Every agent is attached to certain container. These containers can be hosted either on the same machine or on the different machine. It also provides graphical user interface (GUI) for monitoring the activity of agents.

  1. 1)

    Agents implemented as one Java thread Java events are used for communication between the agents on same host.

  2. 2)

    Directory facilitator (DF) starts at run time in order to implement multi domain application.

  3. 3)

    Transport interface that enables sending/receiving of messages from other agents.

  4. 4)

    Agent communication language (ACL) messaging system inside the same platform system enables light weight transport. This is because transport of these messages happens in form of object rather than strings. This avoids marshalling and un-marshalling procedure. When sender or receiver belongs to different platform, the messages automatically convert to/from the FIFA compliant string format. This conversation is hidden and we only have to deal with Java class object.

  5. 5)

    JADE provides automatic registration of agents with the agent management system (AMS) [16].

3.2 Purposed multi-agent system

The multi-agent system shown in Fig. 4 consists of a coordinator agent, agent 1 and agent 2. The information exchange between different agents and with agent coordinator has been also clearly shown in Fig. 4. The number 1–4 represents the load shedding priority during outage. The agent coordinator collects circuit information from Simulink power system model running in one atmosphere and then pass the information to its own agent i.e. agent 1 and agent 2. Under normal condition all the circuit breakers are generally closed and if a fault occurs in the power system as shown in Fig. 5, agent coordinator senses this fault by measuring the circuit parameter and pass this information to agent 1 and 2. After receiving the information agent 1 sends a signal to CB1 to open the circuit breaker and isolate the fault. At the same time, agent 2 of the proposed multi-agent system firstly sends control signal to CB2 for shedding non-critical load i.e. house, then send to CB6 to shed least critical load i.e. medical shoppe and then to CB5 to shed medium critical load i.e. X-ray room. ICU represented in Fig. 5 has been considered here as most critical load.

Fig. 4
figure 4

Schematic diagram of agent

Fig. 5
figure 5

Single line diagram of power system model designed in Simulink/sim power system and interfacing with agent system

4 Simulation setup

Figure 5 shows the simulation model developed for the securing of critical loads in a PV based microgird comprises of solar PV as DER, conventional power plant, house as non-critical load and a hospital as critical load. The critical load has been further classified i.e. least critical load (Medical Shoppe), medium critical load (X-ray room) and most critical load (ICU). Voltage magnitude and phase from DER are the two control parameters at the interconnection point during the grid connected mode. Voltage magnitude and phase from DER must be compatible with those at the interconnection point to ensure smooth interconnection. The local control circuit that provides the grid interface between a DER device and the utility is illustrated in Fig. 6.

Fig. 6
figure 6

Test circuit developed in matlab Simulink

The grid interface section comprises an inverter, a PWM controller and a filter as shown in Fig. 6. Based on the measurement at the interconnection point (bus B2 in Fig. 6), the PWM controller is responsible for calculating voltage magnitude and phase. The outputs from the PWM controller are used to control the output of the inverter so that the output voltage from DER (bus B1 in Fig. 6) is compatible with that at the interconnection point (bus B2) at all time. The PWM control system in Fig. 6 consists of filters, PWM controller and PWM modulator. The internal diagram DER encompasses of PV array, MPPT control, battery control and battery are shown in Fig. 7. The PWM controller comprises a voltage, current regulators, phase-lock loop (PLL) unit and PI controllers as shown in Fig. 8 and also the harmonic consideration for inverter interfaced generation resources has been indicated in Fig. 9, the THD measured is 0.75%. The regulator gains used for PLL unit, the voltage and current regulators has been shown in Table 2.

Fig. 7
figure 7

Internal diagram of DER

Fig. 8
figure 8

Designed PWM controller

Fig. 9
figure 9

Harmonics consideration for inverter interfaced generation resources

Table 2 Regulator gains used for the PLL unit and the voltage and current regulators

5 Results and discussions

5.1 Grid connected mode of operation

The test circuit for the grid connected operation comprises of DER as solar PV, an inverter, a PWM controller and an RLC filter as grid interface section, loads and measurements as well as an isolation transformer and the grid as revealed in Fig. 6. The circuit has been simulated for 0.2 seconds exemplifies the reduction in DER output on the voltage signal at the point of grid interconnection. Figure 10 displays the simulation result when the DER output power decreased from 50 to 25 kW at time t = 0.1 s.

Fig. 10
figure 10

Smooth voltage and current output at the interconnection point (bus B2) with the change in DER power output

In Fig. 10 channel 1 shows the voltage and current of phase A monitored at bus B2 in p.u. The voltage of phase A monitored at bus B1 in volts displays the channel 2. Channel 3 represents the power demand verses power output measured at the load in kW. The DC reference voltage verses DC voltage measured at the capacitor in volts has been represented by channel 4. The results demonstrates that the implemented DER control strategy results in smooth voltage and current measurements at the interconnection point, even with the change in DER power output form 50–25 kW.

5.2 Islanded mode of operation

The configuration of the DER control unit used during the islanded mode is same as that during the grid connected mode with an additional fault unit at the utility. In this case, the voltage magnitude and phase at the interconnection point has been monitored by the PWM controller and ensure that the DER could connect with the rest of the system. For a system with a single inverter-based DER, the PWM setting would be set to follow the reference voltage at 1 per unit and the frequency of 60 Hz at all time. The agent coordinator of MAS always monitors the amount of DER power available. According to the availability of DER power agent coordinator takes decision by considering the critical loads to secure first and then remaining to the noncritical loads.

Simulation results as shown in Fig. 11 displays the control model implemented for islanded mode of operation allows the smooth transition from the grid connected to the islanded mode of operation at time t = 0.1 s, as well as letting the microgrid to operate autonomously during the islanded mode beyond t = 0.1 s. In Fig. 11 channel 1 shows the voltage and current of phase A monitored at bus B2 in p.u. The voltage of phase A monitored at bus B1 in volts is displayed by the channel 2.

Fig. 11
figure 11

Smooth voltage and current output at the interconnection point

5.3 Securing critical loads during an emergency

This setup illustrated the skill of multi-agent system to work in collaboration to drive the microgrid in the islanded mode. The IDAPS microgrid has been simulated for 24 h, assuming that the outage happened at 5:00 PM for three hours. The simulation is also focused on how IDAPS agents sensed the upstream fault, frequency and voltage deviation during islanding and resynchronizing of the microgrid after the upstream fault is cleared. At 5 PM an upstream fault occurs at the grid. As rapidly as upstream fault is identified, the IDAPS agents island the microgrid. The simulation result represented in Fig. 12 clearly shows the fluctuation in current and voltage at the grid interconnection point of IDAPS microgrid and DER utility system, from 0.2 s after the fault and 0.1 s before fault occurred. This helps to understand how quickly the multi-agent system can accomplish its actions to isolate the microgrid while keeping the system stability.

  1. 1)

    During the grid-connected mode (before 5 PM)

    The microgrid’s frequency and voltage has been controlled such that they tail the grid’s voltage and frequency, approximately at 1 per unit and 60 Hz, respectively. In Fig. 12 it is shown that voltage in (blue) has been kept almost 1 per unit. The current (green) indicates the DER current produced before upstream fault occurred i.e. before 5 PM. Before the up-stream fault happens, DER supplies 50% of its rated power to the microgrid.

  2. 2)

    During the transition (at 5 PM)

    Once the agent coordinator detects the fault at 5 PM, agent coordinator pass information to individual agents namely agent 1 and agent 2 that a fault has occurred. Suddenly after getting information from agent coordinator agent 1 sends control signal to main circuit breaker CB1 as in Fig. 5 to isolate microgrid from outage by opening CB1. Agent 2 sends control signal to CB2 to shed the non-critical load (House) by opening CB2 and also shed some critical load depending on the predefined load priority. Generally the load securing priority has been set in following order: (1) Intensive care unit (ICU); (2) X-ray room; (3) Medical shoppe; (4) House.

    In this case it is assumed that DER fully supports to secure all connected critical loads without any limitation or scarcity during the outage. In other words the DER output could increase instantaneously with the help of battery storage once the microgrid islanded. So here agent 2 only sheds noncritical loads and keep all-critical loads intact. All the agent actions i.e. detecting fault by agent coordinator, disconnecting main circuit breaker (CB1) by agent 1, sheds non-critical loads to stabilize the grid have been accomplished within half an electric cycle i.e. less than 0.008 seconds for a 60 Hz system as shown in Fig. 12.

  3. 3)

    During the islanded mode (5 PM to 8 PM)

    After 5 PM IDAPS microgrid is disconnected from the main grid by operation CB1, now operating in islanded mode. In islanded mode the grid interface unite tries to control the DER output voltage at 1 per unit and frequency at 60 Hz. The total system load has reduced to the critical load i.e. hospital intact and DER produces almost its full capacity internally by using the battery energy storage to secure critical load. This can be displayed in Fig. 12 after 5 PM that the DER current output increased to almost 1 per unit.

  4. 4)

    During resynchronization to the main grid (at 8 PM)

    The fluctuation in voltage and current at the interconnection point of microgrid in per unit from 0.1 s before and 0.2 s after the fault is represented by channel 1 of the Fig. 13. The 2nd channel of the Fig. 13 shows the DER power output in kW. 3rd channel displays the voltage difference in RMS between microgrid side and main grid side in volts as in Eq. (6).

    $$ V_{dif} = V_{microgrid} - V_{grid} . $$
    (6)

    During Islanded mode the main grid is isolated from the microgrid so,

    $$ V_{grid} = 0, $$
    (7)

    and the main grid voltage has been collapsed during the upstream outage, while maintain its voltage at 1 per unit. Therefore, the difference in voltage between main grid and microgrid as in Fig. 13 is 240 V during the islanded mode operation i.e.

    $$ V_{dif} = V_{microgrid} . $$
    (8)

    As the outage cleared at 8 PM, the main grid voltage increases gradually and therefore the voltage difference represented in channel 3 of Fig. 13 gradually decreased around 8 PM and when

    $$ V_{grid} = V_{microgrid} , $$
    (9)

    hence

    $$ V_{dif} \cong 0(\text{minimumthreshold}). $$
    (10)

    Agent coordinator monitored that the voltage difference and frequency of the both system remained below a certain threshold coordinator agent issue the current information to the agent 1 and agent 2. At this instant agent 1 sends control signal to CB1 to close and resynchronize the main grid to microgrid. Agent 2 sends control signal to CB2 for reconnecting non-critical loads to the system and also give a signal to decrease DER output to prevent the instantaneous overshoot in the system voltage and current.

Fig. 12
figure 12

Voltage and the current variation at the interconnection point before and after fault

Fig. 13
figure 13

Synchronization of the microgrid to the main grid

6 Conclusions

Intelligent Distributed Autonomous Power System (IDAPS) comprising of solar photovoltaic as DER and loads, as well as their control algorithms, has been developed. Several case studies have been simulated to evaluate the operation of the IDAPS microgrid during parallel and islanded operation modes. The Simulation results show that the proposed IDAPS control model has been able to perform following actions.

  1. 1)

    Island the microgrid from the main grid when an upstream fault is detected.

  2. 2)

    Secure critical loads and shed non-critical loads during emergency condition according to the given priority.

  3. 3)

    Resynchronize the microgrid to the main grid after clearing the upstream fault.

In the future an additional DER units and batteries could be incorporated into the system for better energy management. Especially during the time when the demand is low, the available energy could be stored for later use. This would require further work on assigning new responsibilities for a DER agent.