Islanding and Resynchronization Procedure of a University Campus Microgrid

During the last decade, microgrids are attracting a significant attention due to their numerous advantages. Amongst them, the most important one is their ability to operate either in grid-connected or in islanded (autonomous) mode. However, the transition between the two modes can be challenging in terms of maintaining the stability and integrity of the microgrid. In this paper, an optimization-based islanding methodology is developed to ensure a timely and smooth transition from the grid-connected to the islanded mode. This is achieved through shedding loads, by defining the generation level ofthe photovoltaics (energy spill) and by regulating the charging/discharging rate of batteries. A resynchronization method is also presented along with the requirements that need to be satisfied for the smooth reconnection of the microgrid back to the main grid. The effectiveness of the proposed approach is demonstrated through simulation results for the events of surplus energy production, and excess energy demand of the microgrid.


I. INTRODUCTION
The increasing energy demand, the operation of the grid close to its stability limits, the slow and costly expansion of the transmission infrastructure to unserved regions, and the increased penetration of Distributed Energy Resources (DER) are the main drivers for the introduction of the microgrid concept. Microgrids are small-scale controllable electrical distribution systems, which incorporate DERs, Battery Storage Systems (BSS) and responsive loads in their design [1], [2]. The DERs consist of conventional and renewable primary sources, such as diesel generators and photovoltaics (PVs), respectively. Furthermore, microgrids can be classified into AC, DC or hybrid (AC/DC) microgrids [3], [4].
During the last decade, there is an increasing interest amongst the research society to explore the benefits and overcome the barriers for integrating microgrids into the power systems. In this context, university campuses are commonly chosen for the development of microgrids mainly due to their small distance between DERs and loads, and the existence of a single point of common coupling (PCC) with the main power grid [5]. Such microgrids can also be utilized by the researchers as Living Laboratories.
The objective of the 3DMicroGrid project (funded through the ERANETMED European Union's initiative) is the design and implementation of such a microgrid framework in a university campus. The resulted microgrid will be enhanced by novel control methodologies for ensuring a stable and smooth operation (either in grid-connected or islanded mode) maximizing the utilization of renewables and improving the resilience and power quality of the microgrid.
One of the most important features of a microgrid is its ability to operate in both grid-connected or islanded modes [6]. In microgrids, usually a single PCC exists and the transition can be achieved by controlling a single breaker [7]. When the microgid operates in grid-connected mode, the main grid dominates and defines its voltage and frequency levels. In islanded mode, the voltage and frequency are determined by the operation of its DERs and therefore an appropriate control scheme is required to ensure a stable and resilient operation [3]. However, the transition from the grid-connected to the islanded mode can impose intense disturbances to both, microgrid and main grid, when a significant amount of power is exchanged during the transition. The power flow exchange can be directed either from the microgrid to the main grid (excess energy) or from the main grid to the microgrid (excess demand) [6].
Various methodologies have been proposed in order to ensure a smooth transition from the grid-connected to the islanded mode. In [7], an adaptive load shedding algorithm is presented for defining the minimal set of loads to be cut-off in order to maintain the stability of the microgrid. Furthermore, another load shedding methodology which can be used to either shed loads or spill excessive energy is proposed in [6]. In [8], the utilization of PMU measurements from the PCC for the control of all the DERs in the microgrid during the transition to the islanding mode is presented. An overview of how commercial, off-the-shelf protective relays can be used for the seamless islanding and reconnection is shown in [9].
The main novelty and contribution of this paper is the development of a control methodology for the smooth and seamless transition of the microgrid from the grid-connected to the islanded mode (islanding) and vice-versa (resynchronization). Specifically, a novel optimization approach will be presented for ensuring a smooth and timely transition to the islanded mode, under the existence of either surplus energy or excess demand. Furthermore, a resynchronization method is shown along with the conditions which must be satisfied in order to reconnect the microgrid back to the main grid. All these are tested considering Electro-Magnetic Transient (EMT) conditions on the simulation model of the pilot.
The rest of the paper is structured as follows. Section II shows the configuration of the proposed microgrid pilot. The optimization methodology for the smooth transition to the islanded mode is presented in Section III. Section IV presents a detailed explanation regarding the resynchronization procedure. Simulation results are shown in Section V, while in Section VI the main conclusions are drawn.

II. MICROGRID CONFIGURATION
This section introduces the main configuration and the key components comprising the future pilot microgrid. Particularly, the campus which will be considered for the future development of the pilot is the Malta College of Arts, Science and Technology (MCAST). Fig. 1 presents a single line diagram of the MCAST microgrid. The microgrid consists of four main parts: (i) the energy demand, (ii) the energy generation units, (iii) the energy storage system, and (iv) the single PCC for the interconnection with the main grid. A detailed analysis of the MCAST microgrid components and main functional modes are presented in [10].

A. Energy Demand
From Fig. 1 it can be noticed that the load demand of the MCAST microgrid is based on the consumption of three buildings (namely buildings D, F and J). Furthermore, each building is comprised by controllable single-phase loads. The controllability of these loads is achieved through the utilization of circuit breakers of which their state (i.e., activated/deactivated) can be controlled by a central controller.
To apply optimization and load shedding schemes into the microgrid architecture, it is important to have a load categorization [4], [7] in order to define which loads are more critical. In this study the loads are prioritized into essential (ESS), non-essential 1 (NE1) and non-essential 2 (NE2), as shown in Fig. 1. The latter two categories have the same importance but different values. Note that these three load types are installed on each phase of each building, meaning that in total 27 different single-phase loads exist in the microgrid. Essential loads represent high priority loads and their shedding must be avoided. The non-essential loads are loads where curtailment can take place according to load shedding or optimization methodologies which can take place during the microgrid operation (Section III).

B. Energy Generation Units
For the successful development of a microgrid, DERs need to be included into its architecture in order to satisfy the demand when operating in islanded mode. As shown in Fig. 1, two types of energy generation units are considered here, namely conventional and renewable energy sources. The former is actually a diesel generator of 400 kVA ( 400 kW) gen P = located in building J, which is able to compensate the intermittent nature of the renewables and to operate as the master of the microgrid. For the stable and controllable operation of the microgrid, the diesel generator is equipped with local controllers (an AC5A exciter and a speed regulator based on the isochronous governor model).
PVs are considered as the renewable energy sources of the microgrid with a total penetration of 63 kW peak. In particular, PVs with rated power of 21 kW (peak) are placed on the rooftop of each building (Fig. 1). The PVs are connected to the microgrid through a power electronics inverter. The inverter is implemented in such a way that it can provide reactive power support for improving the voltage stability and be able to receive set-points ( pv P ) for energy spill [11], [12]. Note that the PV setpoint [ ,..., ] pv pv pv P P P ∈ , where pv P is the currently available active power by the PV installation and 0 pv P = .

C. Energy Storage System
The flexibility of the microgrid can be further increased by introducing a BSS. For this reason, a BSS of 20 kW is placed in building D. The energy storage is constructed in such a way so that it can charge or discharge according to the needs of the where 20 kW).
bat bat P P = − = Note that these commands are derived from the microgrid's central controller.

D. Point of Common Coupling (PCC)
PCC is the single point of interconnection between the microgrid and the main grid, where power can be exchanged between the two systems. It is actually a controllable breaker, which gives the important advantage to the microgrid of separating itself from the power system whenever it is needed. This breaker actually monitors and executes requests for an islanding or resynchronization of the microgrid [13]. The correct control of the PCC allows the smooth and seamless transition between the grid-connected and the islanded mode. Furthermore, it is important to note that this is the point where the network configuration changes from radial (according to the  (Fig. 1). This happens in order to ensure resilience of the microgrid when operating in islanded mode by satisfying the "N-1" criterion.

III. OPTIMIZATION-BASED ISLANDING
The Distribution System Operator (DSO) can benefit by the inclusion of microgrids into the main grid since it can consider them as "flexible loads" (or even "flexible generation", depending on the direction of the power flow exchange). This means that these loads can be left out whenever necessary (e.g., in the case of a contingency) and reconnect back under normal grid conditions, without severe economic and social impacts. Furthermore, the day ahead profile for the power demand or generation of the microgrid can be regulated according to predefined agreements between the DSO and the microgrid operator. The microgrid can go to the islanding mode when: (i) the power quality and stability requirements are not fully satisfied by the main grid (to protect its equipment and maintain its integrity), and (ii) when it is requested by the DSO. The former can be activated based on local measurements and includes detection of abrupt voltage/frequency change or phase jump. The latter is derived from the DSO (e.g., for load shedding purposes) and it is transferred to the microgrid operator through the communication infrastructure. It is important to mention that the prompt response of the microgrid to transit to islanding mode is critical and needs to be achieved usually within less than 1-2 s. To ensure the smooth transitioning of the microgrid to islanded mode, upon receiving an immediate islanding request, an optimization-based islanding algorithm is developed in this paper to decide all the necessary actions (i.e., loads to be shed, PV energy spill, etc.) that need to be done prior the transition.
The objectives of the proposed optimization is to minimize the power imbalance between the generation site (i.e., power provided from the diesel generator, the BSS and the PVs) and the demand site (i.e., controllable loads and BSS) indicated by variable P ∆ , while ensuring minimum load shedding. Note that the battery can act either as a generation source (discharging state) or as a load (charging state). Moreover, the optimization finds the optimal active power set-points for the BSS and the PVs ( bat P and pv P ) that minimize P ∆ under the constraints of minimum load asymmetric conditions and minimum energy reserve. The optimization provides set-points only for BSS and PVs, due to their faster response compared to the diesel generator. The active power of the diesel generator, indicated by , gen P represents its output at the time of MILP algorithm execution. Note that only one set-point for the total generation of PVs is produced by the optimization method. This set-point is then equally distributed between the three PV installations since all the installations share the same peak power, orientation and location. Furthermore, as mentioned in Section II the inverters which connect the PVs and BSS to the microgrid are modified in order to be able to receive those set-points. The objective function of the optimization is given as:  (9)). The indirect inclusion of bat P in the objective function through  bat P , favors the utilization of PVs over the battery (i.e., maximizes battery charging or minimizes discharging). The utilization of the normalized value instead of the actual value ensures that the load shedding and power imbalance objectives are not affected. For example, no loads are being shed in order to charge or minimize the discharging of the battery.
The objective function is subject to the following constraints: , pv gen bat , , bat bat bat pv pv pv Load pv bat x P P P L P P ∈ ∆ ∈ (10) Constraint (2) defines the sum of activated loads for each phase indicated by ( ) h L , while Load P in eq. (3) stands for the total activated loads of the microgrid. Constraint (4) determines the total generated active power P of the microgrid in terms of the resulting set-points. The power imbalance P ∆ is defined as the difference between the generated power and the total activated loads of the microgrid as indicated by eq. (5). Note that the inclusion of P ∆ in the objective function enforces the selection of set-points for the BSS and PVs such that it minimizes the power imbalance in the system. It is important to mention here that apart from the case where the diesel generator produces more power than all loads of the microgrid consume, the proposed optimization achieves always 0. P ∆ = In addition, constraint (6) ensures that the resulting set-points for the battery and PVs are within the available limits, as defined in Section II. The asymmetries between the loads connected on each phase remain in a range of ) ( / )(1 Load P K σ ± using constraint (7), where σ is a constant known value. Finally, the minimum energy reserve requirement, indicated by constant β , is ensured through constraint (8) (i.e., it ensures that the diesel generator is able to compensate the intermittent nature of the PVs).

The formulation described by (1)-(10) is a Mixed Integer
Linear Formulation (MILP) that finds the minimum number of loads that need to be shed and the set-points for the battery and PVs that minimize the power imbalance P ∆ following power generation limits, ensuring the minimum load asymmetric conditions and the minimum energy reserve constraints.
In this work, the controllable loads are categorized into essential, indicated as , where for the considered three-phase MCAST microgrid, 3 K = . In contrast to the load shedding decision of non-essential loads, ensuring the symmetrized loading conditions amongst phases and the minimum energy reserve, are not important for the case of essential loads. Therefore, the load shedding decision of essential and non-essential loads is separated into a two-step procedure. In step 1, the MILP optimization is executed only if the available generated power does not satisfy all the essential loads and considers 100% σ = and 0% β = . Note that the selection of constants σ and β is such that it does not enforce symmetrizing of the essential loads of each phase neither ensures the minimum energy reserve availability since the main objective of this step is to satisfy all the essential loads. The

MILP optimization results in vectors
where ess h n is the number of essential loads of phase ) h indicating the essential loads that need to be shed, and set-points for the BSS and PVs as 1 bat P and 1 pv P respectively.
Next, step 2 is executed only if after the assignment of essential loads there is enough power for satisfying at least the smallest non-essential load. Here the MILP optimization algorithm is executed again, now for non-essential loads, considering 2% σ = and 10% β = . In order to minimize the total load asymmetries, including the resulting asymmetries of step 1, constraint (7) is modified as: The two-step procedure is summarized as follows: Step 1: Solves the load shedding MILP optimization described by (1)-(10) for essential loads ( ess l ) considering 1 σ = and 0.  , and battery and PVs set-points 1 1 , bat pv P P respectively.
Step 2: If there is at least one non-essential load that can be satisfied, then the load shedding MILP optimization given by (1)-(6) & (8)-(11) is executed for non-essential loads ( non ess l − ) considering 2% σ = , 10% β = and the new BSS and PV generation limits given in (13) and (14). The resulting load shedding of non-essential loads is given by the set Provided that there is enough available power to satisfy all essential loads, only step 2 of the proposed procedure is executed since set ess x and set-points 1 1 , bat pv P P can be easily extracted.

IV. MICROGRID RESYNCHRONIZATION
While operating in islanded mode, the PCC can receive a request for reconnecting the microgrid back to the main grid, meaning that the main grid is back to normal operating conditions. However, the reconnection can only be accomplished when the following requirements are satisfied: 1) Frequency deviation at the PCC ΔfPCC< 0.1 Hz.

3)
Voltage magnitude difference at the PCC ΔVPCC< 5%. These requirements are set in order to ensure a smooth transition from the islanded to the grid-connected mode. For this reason, the PCC is equipped with the appropriate equipment to monitor the state of all the parameters involved in the restoration procedure and when all the conditions are met it closes the corresponding breaker. In other words, upon receiving a resynchronization request to the PCC, the microgrid has to align its voltage phasors to the ones of the main grid [14].
To acquire all the necessary synchronization signals (i.e., voltage magnitude/angle and frequency) from both sides of the PCC, a three-phase Phase-Locked Loop (PLL) method is considered to analyze the voltage measurements [15]. The frequency deviation requirement is satisfied by utilizing the frequency of the main grid as the set-point of the speed regulator of the diesel generator (provided that the main grid is operating in normal conditions). Furthermore, it is important to mention that a small frequency deviation of 0.05 Hz is added to the specific set-point. It is desirable to have the microgrid operating in a slightly different frequency, in order to have controllability on the voltage angle of the microgrid and to satisfy at some point the second requirement for the voltage angle difference. Finally, the voltage magnitude condition is carried out by the master of the microgrid (diesel generator). In case where there is a significant voltage amplitude difference between the main grid and the microgrid, the operator of the microgrid can adjust the reference signal to the exciter of the diesel generator in order to ensure that the last requirement is satisfied.

V. SIMULATION RESULTS
For the validation of the proposed islanding and resynchronization methodologies, a discrete time EMT simulation model of the MCAST microgrid (Fig. 1) is developed in MATLAB/Simulink. The MILP optimization was solved using GUROBI [16]. For all the simulations, a PC equipped with an Intel Core i5-4460 CPU at 3.2 GHz with 4 GB of RAM was used. The effectiveness of the methodologies is demonstrated through two simulation scenarios, one for the case of surplus energy production and one in the case of excess demand. Note that the resynchronization procedure occurs at both scenarios and that initially each PV produces 9.3 kW (27.9 kW total PV generation) and the BSS provides 15 kW to the microgrid.

A. Scenario 1: Surplus Energy Production
In this scenario, the microgrid has more than enough energy production to cover its demand and therefore, any excess energy is directed to the main grid. At t=0.6 s an immediate islanding request is received at the PCC and furthermore, at t=2 s a resynchronization request is obtained. The optimization methodology finds and applies its solution under 100 ms. It is important to mention here that while the proposed MILP formulation is generally an NP-Complete problem, its real time application for load shedding in microgrids is possible since microgrids are in general of small scale. Table I presents the results of the optimization islanding methodology. As expected, due to the excess energy provision, no load shedding occurs in this scenario. Therefore, one can observe the actual loads of buildings D, F and J, as well as the actual load asymmetries of each phase. Note that the phase asymmetry in Table I represents the percentage difference between the P Load /3 and the actual load of each phase. To accommodate the surplus energy which will remain into the islanded microgrid, the methodology has reverted the BSS into charging state, so that no curtailment on the PV generation will take place. This transition has allowed the system to perfectly balance the energy production and demand, thus achieving 0 P ∆ =. Fig. 2 illustrates the resulting active power exchange at the PCC between the main grid and microgrid (Pgrid), the voltage waveforms at both sides of PCC, and three synchronization variables which are required during the resynchronization procedure (ΔfPCC, Δθ V PCC and ΔVPCC). Fig. 2(a) shows that a surplus energy of 30 kW is directed from the microgrid to the grid. Fig. 2(b) depicts on its first half a snapshot of the two voltage waveforms after the transition to islanded mode, where the diesel generator takes over as the master of the microgrid. The waveforms remain quite close to each other even after the disconnection due to the small power exchange. The second half of Fig. 2(b) shows a snapshot of the voltages at both sides of the PCC just before the reconnection, where it is shown that the two waveforms are very well aligned since the three requirements for resynchronization are satisfied as shown in Fig. 2(c)-(e). When all the resynchronization requirements (see Section IV) are satisfied, the breaker located at the PCC closes back at t=3 s.

B. Scenario 2:Excess Demand
This scenario presents the case where the demand exceeds the generation of the local DERs and therefore the microgrid requires support from the main grid. To realize this scenario, all the ESS and NE1 loads are set to be five times larger compared to the previous scenario. All the NE2 loads are decreased by ten times in order to illustrate how the proposed islanding methodology can take advantage of the existing small loads for symmetrizing the loading conditions. The results of this scenario are shown in the third column of Table I. From the results, it can be seen that a severe load shedding took place in order to achieve a balance between the generation and the demand site ( 0). P ∆ = It is important to mention here that the algorithm has provided a solution where ESS loads are shed, while it preserved NE2 loads. The rationale of this solution is actually based on the huge gap between the two load types. Therefore, the algorithm tries to include as many ESS loads as possible and then it utilizes the NE2 loads to reduce the load asymmetries according to the optimization constraints. It can be noted that while there is  The smooth and seamless islanding and resynchronization of this scenario is illustrated in more detail in Fig. 3. In particular, Fig. 3 (a) shows the energy provision from the main grid to the microgrid, in order to satisfy its demand (450 kW). The voltage waveform of the grid compared to the ones of the microgrid, after the transition to islanding and before the resynchronization events, are provided in Fig. 3(b). Here, one can note the larger difference of the voltage waveforms (compared to the previous scenario) and their perfect alignment before reconnection. Lastly, the variation of the resynchronization requirements from the moment of the islanding until the PCC breaker closes (t=8 s) is presented in Fig. 3(c)-(e).

VI. CONCLUSION
This paper presents the development of islanding and resynchronization methodologies for ensuring a smooth and seamless transition of the microgrid from the grid-connected to the islanded mode (islanding) and vice-versa (resynchronization). More specifically, a MILP based islanding algorithm is implemented to minimize the power imbalance between generation and demand sides of the microgrid, under constraints of maximum allowable asymmetric loading conditions and minimum energy reserve. The algorithm specifies the loads to be shed and the active power contribution of the PVs and the BSS. For the resynchronization of the microgrid, requirements are defined according to voltage magnitude/angle and frequency deviations, whose satisfiability leads to a successful reconnection back to the main grid. These are ensured by adjusting the voltage and frequency set-points to the exciter and governor controllers of the synchronous diesel generator (acting as master) in order to align the microgrid voltage at the PCC with the voltage of the main grid before the reconnection. Both methodologies are validated through simulation tests on the MCAST microgrid model in the cases of surplus energy production and excess demand. The results indicate that a power balance between demand and generation is always guaranteed, while ensuring all the optimization constraints and a smooth transition between the two modes.