Transient stability enhancement in renewable energy integrated multi-microgrids: A comprehensive and critical analysis

Multi-microgrids offer various benefits including the decreased overloading of a single microgrid, more options during faulty conditions, and more utilization of renewable energy resources. However, the implementation of a multi-microgrid brings the challenges such as power system complexity, interconnection issues, bidirectional power flow management, and power flow balancing. In the presence of these challenges, the power flow stability of the multi-microgrids is a challenging problem. In this context, this study evaluates a transient stability analysis model in multi-microgrids using solar photovoltaics, wind power, and a unified power flow controller (UPFC). UPFC offers a more robust power flow control strategy compared with other flexible alternating current transmission systems (FACTS) devices. First, a multi-microgrid structure consisting of the two microgrids was designed in DIgSILENT PowerFactory software. Second, the load flow calculation was performed in the absence and presence of UPFC, short circuit fault, and grid connection. Third, the electromagnetic transients (EMT) simulation was performed for all these situations. The results exhibited that the UPFC would offer significant power flow stability in the multi-microgrids. It was observed that the UPFC resulted in more transient stability in the microgrid where it was located. However, it improved the power flow quality at all the locations in the multi-microgrids. In addition, UPFC offered significant transient stability during the fault occurrence. The results offer various insights into power flow management in multi-microgrids.


Introduction
There is an increased trend in the world toward the extensive integration of renewable energy resources (RERs) into power systems due to the depletion of fossil fuels and the protection of the natural environment. 1owever, the progress is very slow due to the issues such as the high cost, planning issues, and fluctuating nature of the major RERs. 2 The integration of the RERs into the power systems is a challenging issue.The microgrids are increasing the integration of RERs resources into the power systems. 3Microgrids offer various benefits such as more utilization of renewable energy resources (RERs), a decrease in the overloading of the main grid, an increase in electricity access to remote areas, and more availability of electricity.Still, the progress is slow due to the small-scale nature of the microgrids.The integration of two or more microgrids is a good idea to increase the utilization of RERs. 4,5he integration of two or more microgrids is called a multi-microgrid (MMG) or microgrid cluster.Recently, MMGs are gaining more attention due to their advantages compared with single microgrids.
Multi-microgrids (MMGs) offer various advantages to power systems.][8][9][10][11] In addition, the MMGs would decrease harmonic issues, decrease voltage fluctuations, and increase protection. 12lso, the connection of multiple microgrids would significantly reduce the overloading on the national grid. 135][16] In many parts of the world, many places have a large amount of renewable energy potential.In such places, the single microgrid may face capacity constraints.It is not feasible to integrate a large number of RERs into a single grid.The connection between multiple microgrids would help in the improvement of the overall power system. 17In this case, MMGs would facilitate the integration of large amounts of RERs. 18here are a large number of villages in the world without electricity and with substantial RERs, which would trigger the development of MMGs. 19For instance, India has 18,000 rural areas with the least possibility of a national grid connection. 20In such cases, the MMGs would help in the electricity demand fulfillment of in these regions.In the presence of disruptions in the utility grid, a single microgrid may not maintain stability in the power supply to critical loads.In such situations, the MMGs may stabilize the power system. 21oreover, multi-microgrids offer large-scale electricity generation leading to a large amount of sustainable electricity generation. 22In the present times, there is a tendency toward the development of a large number of grid-connected and islanded microgrids.In parallel, there is a tendency for the proximate microgrids to connect with each other.4][25][26] The MMGs allow the sharing of generation, transmission, and economic resources between different regions with different capabilities, which would save the investments on common resources. 27,28The coordinated operation of microgrids can reduce total investment and operation costs and would significantly enhance the reliability of the whole distribution system.In contrast to the above advantages, MMGs bring several disadvantages that should be addressed before their integration into the power systems.Hence, extensive research is required to address the potential disadvantages of the implementation of MMGs.
MMGs add complexity to the power systems due to the integration of a more number of RERs and the power flow balancing between microgrids. 29,30Another challenging issue in MMGs is the two-way power flow between different grids. 31In addition, MMGs involve more power flow fluctuations at the transmission and distribution stages. 32Moreover, power flow control is challenging in the MMGs due to the more uncertainties in the system. 33Hence, proper power flow analysis is required for the successful operation of the MMGs.In this context, the focus of this paper is to perform the power flow analysis in MMG.
In the existing literature, several papers have performed the power system analysis in the microgrid cluster using different techniques.For instance, one research study used a unified interphase power controller (UIPC) for the power flow control between interconnected microgrids in hybrid microgrids. 34It was concluded that the performance of UIPC was better that the conventional interlink converters (ILCs).In that paper, a hybrid AC/DC microgrid was studied in the presence of IPFC and the effectiveness of UPFC was not evaluated.However, the present paper includes two AC microgrids using UPFC.The present study does not include a DC microgrid but it utilizes UPFC in the multi-microgrid.Another study designed an interlinking converter for multiple AC/DC microgrids in Simulink software. 35In that study, the MMGs were interlinked using a voltage source inverter with a droop controller.The simulation exhibited a successful power flow, good voltage stability, and good frequency stability.Rahman et al. 35 used the interlinking converter in the analysis of the AC/DC hybrid microgrid but the present paper used UPFC in the two AC microgrids.Hence, the UPFC has not been used in the research reported in Rahman et al. 35 A third study designed a DC/AC multiple microgrids using a decentralized controller which exhibited the simultaneous power control capability for individual and multiple microgrids. 36owever, that paper did not focus on the multiple AC microgrids.In addition, the present paper evaluated the performance of UPFC in the presence of a short circuit.A fourth research study designed a power flow controller based on the bridge converters for DC multiple microgrids.The results exhibited that the proposed concept is a good option for the connection between DC microgrids. 37However, that research was based on the DC microgrids.In contrast, the present paper reports the AC microgrids using UPFC.A fifth study designed the frequency and voltage controllers for the MMGs using distributed cooperative control.The proposed controllers exhibited good stability under various changes in the power system.However, that work does not consider UPFC and transient stability analysis. 38A sixth study designed an energy router for AC-DC multi-microgrid based on the common DC link between the microgrids using Simulink. 39Again, that research analyzed the hybrid AC-DC microgrids using DC-link-based energy routers interface.In this regard, UPFC could improve the AC-DC microgrid through its placement at the appropriate location.However, the present paper utilizes UPFC for the comprehensive transient stability analysis of AC microgrids.A seventh study investigated a wind-solar-based MMG with battery storage based on the voltage source converter. 40his study used a voltage source converter which is the base of the UPFC.In fact, UPFC utilizes the coordination between two voltage source converters and could perform better than a single voltage source converter.Hence, the present study addressed this issue through a comprehensive analysis.Also, that work used a PV system in one microgrid and a wind power system in another microgrid.In contrast, the present paper used PV systems and wind power generation in both multi-microgrids.An eighth study investigated the behavior of DC MMG using the distributed control method.In this reference, the minimum cost and voltage regulation were achieved in the presence of fault. 41Again, that paper was only based on the DC multi-microgrids.A ninth research study performed power flow analysis in a multi-microgrid using ETAP software considering the effect of grid connections and renewable energy integration.In addition, that research investigated the carrying capacities, carried currents, percentage occupancy, power losses, and voltage drop rates of all lines. 42A 10th study presented a multiple-objective optimization model with three objectives including feeder congestion, voltage variability, and cost.In that research, the two microgrids were linked using a distribution-interline power flow controller (IPFC).This controller used two voltage source converters linked through a direct current (DC) link. 43The present work used UPFC which connects and works differently as compared to IPFC.Similarly, an 11th study presented multiple objective optimization models with three objectives including energy loss, voltage variability, and cost. 44In that reference, two microgrids were linked using a distributioninterline power flow controller (IPFC).A 12th research study performed the power quality analysis for microgrids using electromagnetic transients (EMT) simulation in a PowerFactory environment. 457][48] Table 1 presents a contribution of this paper in a compact way with respect to the existing literature.
In the existing literature, most of the above studies focused on the topics such as energy management, scheduling, optimization, and cost estimations.In the existing literature, the power flow analysis is the least researched area, which is a fundamental necessity for emerging power systems including MMGs. 49,50pecifically, the integration of flexible alternating current transmission systems (FACTS) devices into MMGs would be a promising step toward power flow stability.In this regard, some papers performed the power flow analysis of multi-microgrids in different ways using the FACTS devices including UPFC, unified power quality conditioner (UPQC), unified interphase power controller (UIPC), and interline power flow controller (IPFC). 51,52A comprehensive comparison amongst the UPFC, UPQC, UIPC, and IPFC has been presented in Table 2.4][55][56][57] This study has investigated the performance of UPFC in the transient stability analysis because it is more prominent among the other FACTS devices.For instance, one study has reported more power flow stability for UPFC compared with IPFC. 58In that study, UPFC offered optimum active and reactive power values at significantly fewer capacitor ratings than IPFC.The more capacitor ratings mean the more cost of equipment.Hence, the UPFC offered a better alternative with respect to capacitor value.The various FACTS devices and other controllers may offer a better result.However, the focus of the present paper is to evaluate the performance of UPFC  37 Bridge converters-based controller DC multiple microgrids Designed a power flow controller Amoateng et al. 38 Distributed cooperative control Inverter-based distributed generations between microgrids Develop adaptive voltage and frequency control method Pham et al. 39 DC-link-based energy routers interface AC-DC multi-microgrid Analysis of common DC link between the microgrids Sahoo and Kishore 40 Voltage source converter One PV based and one windbased microgrid Achieve coordinated control and operation Mudaliyar et al. 41 Distributed control method for tie-line power flow control for the power flow analysis of MMGs.This paper configured the UPFC based on the standard pulse-width modulation (PWM)-converters, which is a powerful tool for the analysis of the advanced power system.The effect of UPFC has not been reported for modern multi-microgrids.Hence, the present work configured the UPFC parameters according to the renewable energy based multi-microgrid.In summary, this paper evaluates the transient stability analysis of MMGs using UPFC and renewable energy in the presence and absence of UPFC and grid connection.
The key objective of this paper is the transient stability evaluation in the MMGs using a unified power flow controller (UPFC), wind power systems, and solar photovoltaic (PV) systems.In this regard, the different cases have been evaluated including (a) UPFC not used and short circuit not observed in grid-connected mode, (b) UPFC not used and short circuit observed in gridconnected mode, (c) UPFC used and short circuit observed in grid-connected mode, (d) UPFC not used and short circuit not observed in grid disconnected mode, (e) UPFC not used and short circuit observed in grid disconnected mode, and (f) UPFC used and short circuit observed in grid disconnected mode.This study uses DIgSILENT PowerFactory software for the Modeling and analysis of MMGs.Transient stability of the power system ensures the restoration of the power system under faulty conditions. 59The presence of a fault would degrade the performance of the power system. 60,61Hence, the impact of the short circuit fault has been included in the evaluation.
The remaining paper has been organized as follows.First, the methodology of the power flow analysis model has been presented.Then, the results and discussion have been presented based on the power system simulation of the proposed multi-microgrid model.Finally, the conclusion of the paper has been presented.

Methodology
This section presents the development of the simulation model in the DIgSILENT PowerFactory and the mathematical model of the proposed system.Figure 1 presents the flowchart of the research methodology.

Development of simulation model
Figure 2 presents the single-line diagram of the proposed multi-microgrid (MMG).In this system, two microgrids (i.e.MG-1 and MG-2) are interconnected with a 1 km transmission line.Both microgrids contain one PV system, one wind power system, and one synchronous generator.PV system and wind system have been specified with corresponding PQ buses.The synchronous generators in both microgrids have been specified with the corresponding generator bus (i.e.voltage controlled bus).The main utility grid is connected to MG-1 through the corresponding slack bus.Each microgrid requires the satisfaction of 20 MW power demand (i.e. total demand = 20 MW + 20 MW = 40 MW).In both MMGs, the loads are located at a distance of 1 km from the main interconnection busbars.
The main utility grid is directly connected to the 20 kV system in MG-1.PV system, wind power system, and synchronous generator are connected to the 20 kV system through a step-up transformer (1-20 kV).Each load was step-down from 20 to 1 kV.The parameters for the transformer were set according to the system requirements.In all the generation sources, 3-phase technology was selected in DIgSILENT PowerFactory software.In the PV generation system, 4000 solar panels were used and the active power per panel was 0.0003 MW.Hence, the total capacity of the PV system was 1.2 MW (i.e.4000 3 0.0003).Similarly, the wind power system used six wind turbines and the active power per turbine was 1.5 MW.Hence, the total capacity of the wind power system was 9 MW (i.e.

Performs in multiple lines
Performs in a single line 6 3 1.50 MW).The active power in each synchronous generator was specified as 12 MW.
The simulation model in Figure 1 was evaluated in the following cases.
UPFC not used and short circuit not observed in the grid-connected mode.UPFC not used and short circuit observed in the grid-connected mode.UPFC used and short circuit observed in the grid-connected mode UPFC not used and short circuit not observed in the grid-disconnected mode UPFC not used and short circuit observed in the grid-disconnected mode UPFC used and short circuit observed in the grid-disconnected mode The short circuit was introduced at both microgrids.
For these cases, the transient stability of the proposed multi-microgrid was analyzed.The electromagnetic transients (EMT) simulation offers an in-depth analysis of the electromagnetic transients in the power system.EMT simulation was preferred due to its ability to provide an accurate and in-depth analysis of transients.It offers a detailed understanding of all the phases and faults.In the presence of faults such as short circuits, EMT simulation offers more reliable results for the development of accurate control methods.In addition, the EMT simulation provides an in-depth analysis in the presence of hundreds of PV panels and wind turbines.In this regard, the detailed EMT simulation provides an accurate basis for the accurate planning, operation, and control of renewable integrated power systems.DIgSILENT PowerFactory offers a highly reliable and accurate way to perform short circuits and EMT simulation simultaneously.The power flow equations were solved by the Newton-Raphson method.The power system equations are the standard equations used by DIgSILENT PowerFactory.The mathematical representation of the proposed MMG has been presented in the following section.

Mathematical modeling
The proposed multi-microgrid model has been developed in PowerFactory software.This software contains various basic elements which can be used to model a wide range of power systems using different control strategies.The various basic elements are based on the standard mathematical models in the field of power system analysis.The technical background related to these elements is available in the technical documentation of this software.In the following, the general mathematical background of the proposed MMG model has been presented based on the technical documentation of the PowerFactory software. 62 le Leakage reactance of excitation winding (p.u.) x mq q-axis magnetizing reactance (p.u.) x lQ Leakage reactance of q-axis damper winding (p.u.) x lx Leakage reactance of x-winding winding (p.u.) x rl Rotor leakage reactance (p.u.) Stator voltage for of q-axis Z j j Square matrices for impedance Y j j Square matrices for admittance P m Amplification factor when VSC converts the DC voltage of the DC node into the AC voltage U AC r Real AC voltage U AC i Imaginary AC voltage U DC DC voltage of the DC node K 0 Constant factor for the sinusoidal modulation Photovoltaic and wind generators for the both microgrids have been modeled using the static generator model in the PowerFactory software.The behavior of the PV system and wind system has been integrated into the static generator model, and there is an option in the power factory to use it for the PV system and wind system.The actual dispatch of the real power can be represented as follows The dispatched power can be specified directly in the form of active power and reactive power.Also, it can be specified through the input mode changes incorporating the two parameters from P, Q, S, or cos(phi).The synchronous generators are usually diesel generators.In the multi-microgrids, these generators would provide a more stable source in the case of sudden unavailability of the distributed generation.The Power Factory documentation offers a detailed Modeling of the synchronous generators.In the following, the key equations are presented, which are used in the PowerFactory for the Modeling of synchronous generators.The followings are the stator currents and rotor flux variables.The sub-transient flux is given in equations ( 3)-( 14) as follows Equations ( 3) and ( 4) introduced the sub-transient flux.
Regarding this, the multi-time scale properties have been used in order to gain more robust and precise results for the simulation model, Here, the mathematical equations have been partitioned into subsets of slow and fast equations.DIgSILENT software uses the stator current and rotor flux as the state variables.This is due to the fact that the state variables offer the maximum possible multi-time scale partitioning, resulting in more accurate and robust results.From equations ( 3) and ( 4), the definition of factors k can be written as follows and Hence, the stator flux linkage model can be represented as equations ( 11) and ( 12) The sub-transient voltage can be written as equations ( 13) and ( 14) considering the above definitions, Now, stator equations using sub-transient voltage and stator current can be defined.Equations ( 15)-( 17) present the stator model.This model contains the stator current and sub-transient voltage The proposed multi-microgrid model used the general load model in the PowerFactory.The technical details of the general load model can be found in the PowerFactory documentation.The voltage dependency of the load has been implemented using the three-term polynomial and can be represented as equations (18)  and (19).The ''0'' is the operating point.
The proposed multi-microgrid model used the cables for all three transmission lines.These lines were modeled using the PowerFactory technical documentation cable.Impedance Z and admittance Y can be represented as Where V j j is the voltage vector and I j j the current vector.These vectors are situated at distance x in the cable.Z j j is square matrices for impedance, and Y j j is square matrices for admittance.There are some other basic models including terminals and transformers.DIgSILENT technical guidelines would be consulted for the detailed implementation of these models.The UPFC in the proposed multi-microgrid model was developed using the two pulse-width modulation (PWM) based voltage source converters (VSCs).VSC converts the DC voltage of the DC node into the AC voltage using the switching signal.This signal is called the amplification factor (i.e.Pm), and it can be used for the calculation of the AC voltage as follows U AC r is the real AC voltage and U AC r is the imaginary AC voltage.DC voltage of the DC node is U DC , and K 0 is a constant factor which can be represented as equation (24) for the sinusoidal modulation.
If Pm j j41, the above equations work well.If Pm .1, the DC voltage should be maintained to deal with harmonics as follows UPFC can be developed using the two PWM-based VSCs.One converter is the shunt converter and the other is the series converter.These converters are interlinked with a common DC-Node.The AC side of each converter is connected to the respective transformers.DC node contains the DC link capacitor.The working of the series converter is similar to the series static synchronous compensator (SSSC) and the working of the shunt converter is similar to the static synchronous compensator (STATCOM).Hence, UPFC worked with the coordinated control of these two PWM converters.

Results and discussion
This paper evaluates the transient stability of the alternative multi-microgrids (MMGs) using a PV system, wind power system, and UPFC.This section presents the key results based on the thorough experimentation in the DIgSILENT PowerFactory software.In the first step, the load flow calculation was performed for all the cases.DIgSILENT PowerFactory software exhibited that the load flow calculation was successful and all the control conditions were fulfilled.Then, the transient stability analysis was performed, which has been discussed in the following.

Transient stability of PV systems in multi-microgrid
In this section, the key results have been presented for PV generators and busbars.The electromagnetic transients (EMT) simulation was performed in the presence and absence of UPFC in the grid-connected and disconnected modes.In the absence of UPFC, the load areas of microgrid-1 (i.e.MG-1) and microgrid-2 (i.e.MG-2) were identical.Figure 3 presents the active power stability of PV systems in the proposed multimicrogrid.In Case 1, UPFC was not used in the simulation model and the short circuit fault was not included considering the grid-connected mode.In this case, the smooth power flow was observed and the active power remained stable at approximately 0.80 MW as shown in Figure 3(a).Also, the phase voltage remained stable as shown in Figure 4(a).In Case 2, a short circuit was introduced and UPFC was not used in the grid-connected mode.In this case, Figure 3(b) and (c) present the active power flow for the MG-1 and MG-2.In this case, severe peaks and troughs can be observed.In Case 3, a short circuit was introduced and UPFC was added in the grid-connected mode.In this case, Figure 3(d) and (e) present the active power flow for the MG-1 and MG-2.In this case, the severe troughs in the active power flow have been significantly reduced by UPFC.Hence, UPFC has significantly stabilized the power flow in the multi-microgrid in the grid-connected mode.
In the next three cases, the above analysis was performed in the grid-disconnected mode.In Case 4, UPFC was not used in the simulation model and the short circuit fault was not included considering the grid-disconnected mode.In this case, the power flow and phase voltage was the same as in Case 1.In Case 5, a short circuit was introduced and UPFC was not used in the grid disconnected mode.In this case, Figure 3(f) and (g) present the active power flow for the MG-1 and MG-2.In this case, severe peaks and troughs can be observed.In Case 6, a short circuit was introduced and UPFC was added in the grid disconnected mode.In this case, Figure 3(h) and (i) present the active power flow for the MG-1 and MG-2.In this case, the severe troughs in the active power flow have been considerably decreased by UPFC.Hence, UPFC has significantly stabilized the power flow in the multi-microgrid in the grid-disconnected mode.
In Case 2, a slight phase voltage fluctuation was observed at MG-1 as shown in Figure 4(b), and comparatively more phase voltage fluctuation was observed at MG-2 (Figure 4(c)).However, these fluctuations were completely absent in the presence of UPFC (i.e.Case 3).Similar voltage trends were observed in the grid-disconnection mode (i.e.Case 5 and Case 6).These voltage patterns were based on PV system generators.For the PV system busbars (PV-Bus MG-1 and PV-Bus MG-2), the phase voltage patterns were similar to the PV system generator values.However, the phase voltage values at busbars were smaller than the generator voltage for all the simulation trials.

Transient stability of wind systems in multi-microgrid
In this section, the key results have been presented for wind systems and associated busbars.Figure 5 presents the active power stability of wind systems in the proposed multi-microgrid.In Case 1, UPFC was not used in the simulation model and the short circuit fault was not included considering the grid-connected mode.In this case, the smooth power flow was observed and the active power remained stable at approximately 6 MW as shown in Figure 5(a).Also, the phase voltage remained stable similar to the corresponding case in PV systems (i.e. Figure 4(a)).In Case 2, a short circuit was introduced and UPFC was not used in the grid-connected mode.In this case, Figure 5(b) and (c) present the active power flow for the MG-1 and MG-2, respectively.In this case, MG-2 exhibited a more severe power flow fluctuation compared with MG-1.In Case 3, a short circuit was introduced and UPFC was added in the grid-connected mode.In this case, the active power flow remained completely stable as in Case 1.Hence, UPFC has significantly stabilized the power flow in the multi-microgrid in the grid-connected mode.
In the next three cases, the above analysis was performed in the grid-disconnected mode.In Case 4, UPFC was not used in the simulation model and the short circuit fault was not included considering the grid-disconnected mode.In this case, the power flow and phase voltage was the same as in Case 1.In Case 5, a short circuit was introduced and UPFC was not used in the grid disconnected mode.In this case, Figure 5(d) and (e) present the active power flow for the MG-1 and MG-2.In this case, more severe peaks and troughs can be observed compared with the grid-connection mode.In Case 6, a short circuit was introduced and UPFC was added in the grid disconnected mode.In this case, the active power flow remained completely stable as in Case 1.Hence, UPFC has significantly stabilized the power flow in the multi-microgrid in the grid-disconnected mode.
In Case 2, a slight phase voltage fluctuation was observed at MG-1 (Figure 6(a)), and comparatively more phase voltage fluctuation was observed at MG-2 (Figure 6(b)).However, these fluctuations were completely absent in the presence of UPFC (i.e.Case 3).Similar voltage trends were observed in the griddisconnection mode (i.e.Case 5 and Case 6).However, the phase voltage variation was more in Case 5 as shown in Figure 6(c) and (d).These voltage patterns were based on wind system generators.For the wind system busbars (Wind-Bus MG-1 and Wind-Bus MG-2), the phase voltage patterns were similar to the PV system generator values.However, the phase voltage values at busbars were smaller than the generator voltage for all the simulation trials.

Transient stability of synchronous generators in multi-microgrid
In this section, the key results have been presented for synchronous generators and related busbars.Figure 7 presents the active power stability of synchronous generators.In Case 1, UPFC was not used in the simulation model and the short circuit fault was not included considering the grid-connected mode.In this case, the smooth power flow was observed and the active power remained stable at approximately 8 MW as shown in Figure 7(a).Also, the phase voltage remained stable similar to the corresponding case in PV systems (i.e. Figure 4(a)).In Case 2, a short circuit was introduced and UPFC was not used in the grid-connected mode.In this case, Figure 7(b) and (c) present the active power flow for the MG-1 and MG-2.In this case, severe peaks and troughs can be observed.In Case 3, the short circuit was introduced and UPFC was added in the gridconnected mode.In this case, Figure 7(d) and (e) present the active power flow for the MG-1 and MG-2.In this case, MG-1 exhibited more stability compared with  MG-2.Still, the UPFC significantly reduced the power flow fluctuations in MG-1.
In the next three cases, the above analysis was performed in the grid-disconnected mode.In Case 4, UPFC was not used in the simulation model and the short circuit fault was not included considering the grid-disconnected mode.In this case, the power flow and phase voltage were the same as in Case 1.In Case 5, the short circuit was introduced and UPFC was not used in the grid disconnected mode.In this case, Figure 7(f) and (g) present the active power flow for the MG-1 and MG-2.In this case, more severe peaks and troughs can be observed compared with the grid-connected mode.In Case 6, the short circuit was introduced and UPFC was added in the grid disconnected mode.In this case, Figure 7(h) and (i) present the active power flow for the MG-1 and MG-2.In this case, the severe troughs and peaks in the active power flow have been reduced by UPFC.Hence, UPFC has significantly stabilized the power flow in the multi-microgrid in the grid-disconnected mode.
In Case 2, a slight phase voltage fluctuation was observed at MG-1 (Figure 8(a)), and comparatively more voltage fluctuation was observed at MG-2 (Figure 8(b)).However, these fluctuations were completely absent in the presence of UPFC (i.e.Case 3).Similar voltage trends were observed in the griddisconnection mode (i.e.Case 5 and Case 6).However, the phase voltage variation was more in Case 5.These voltage patterns were based on the synchronous generators.For the related busbars (SG-Bus MG-1 and SG-Bus MG-2), the phase voltage patterns were similar to the PV system generator values.However, the phase voltage values at these busbars were smaller than the generator voltage for all the simulation trials.

Transient stability of demand loads in multi-microgrid
In this section, the key results have been presented for the demand loads and related busbars.Figure 9 presents the active power stability of the demand loads.In Case 1, UPFC was not used in the simulation model and the short circuit fault was not included considering the gridconnected mode.In this case, the smooth power flow was observed and the active power remained stable at approximately 13.3 MW as shown in Figure 9(a).Also, the phase voltage remained stable similar to the corresponding case in PV systems (i.e. Figure 4(a)).In Case 2, a short circuit was introduced and UPFC was not used in the grid-connected mode.In this case, Figure 9(b) and (c) present the active power flow for the MG-1 and MG-2.In this case, the active power was slightly decreased in the load of MG-1 but it became zero in the load of MG-2 during the short circuit.In this case, phase voltage slightly fluctuated in the MG-1 (Figure 10(a)) but it was zero in the load of MG-2 during the short circuit (Figure 10(b)).In Case 3, a short circuit was introduced and UPFC was added in the gridconnected mode.In this case, the active power and phase voltage fluctuations were completely removed in the case of the MG-1 load.The active power and phase voltage for the MG-2 load remained almost the same as in Case 2 during the short circuit.Hence, the UPFC reduced the power flow fluctuations in MG-1.
In the next three cases, the above analysis was performed in the grid-disconnected mode.In Case 4, UPFC was not used in the simulation model and the short circuit fault was not included considering the griddisconnected mode.In this case, the power flow and phase voltage were the same as in Case 1.In Case 5, the short circuit was introduced and UPFC was not used in the grid disconnected mode.In this case, Figure 9(d) and (e) present the active power flow for the MG-1 and MG-2.In this case, the active power flow was reduced significantly for both microgrids.In addition, phase voltage decreased in the case of MG-1 load (Figure 10(c)) and it became zero for MG-2 (Figure 10(d)) during the short circuit.In Case 6, the short circuit was introduced and UPFC was added in the grid disconnected mode.In this case, Figure 9(f) and (g) present the active power flow for the MG-1 and MG-2.In this case, the active power has been stabilized for the MG-1 during and after the fault.Also, the active power has been stabilized for MG-2 after the fault.In addition, phase voltage fluctuation was eliminated in the case of MG-1 load and it was maintained for MG-2 (Figure 10(e)) after the short circuit clearance.Hence, UPFC has significantly stabilized the power flow and phase voltage in the multi-microgrid in the grid-disconnected mode.The above voltage patterns were based on the final load location.For the related busbars, the phase voltage patterns were similar to the load locations.However, the phase voltage values at these busbars were smaller than the load locations for all the simulation trials.

Transient stability of two main busbars
In this section, the key results have been presented for the two main busbars in a multi-microgrid.Figure 11 presents the voltage stability of these two main busbars.In Case 1, UPFC was not used in the simulation model and the short circuit fault was not included considering the grid-connected mode.In this case, the phase voltage remained stable as shown in Figure 11(a).In Case 2, a short circuit was introduced and UPFC was not used in the grid-connected mode.In this case, Figure 11(b) and (c) present the short circuit current for the MG-1 and MG-2.In this case, the phase voltage slightly decreased in the MG-1 but it significantly dropped in the case of the main busbar at MG-2 during the short circuit.In Case 3, a short circuit was introduced and UPFC was added in the grid-connected mode.In this case, the phase voltage fluctuations were completely removed for both microgrids.Hence, the UPFC eliminated the voltage fluctuations in the main busbars of the multimicrogrid.
In Case 4, UPFC was not used in the simulation model and the short circuit fault was not included considering the grid-disconnected mode.In this case, the phase voltage was the same as in Figure 11(a).In Case 5, a short circuit was introduced and UPFC was not used in the grid disconnected mode.In this case, Figure 11(d) and (e) present the active power flow for the MG-1 and MG-2.In this case, the phase voltage faced severe voltage drops during and after the fault.In Case 6, the short circuit was introduced and UPFC was added in the grid disconnected mode.In this case, the phase voltage fluctuations were completely removed for both microgrids.Hence, the UPFC eliminated the voltage fluctuations in the main busbars of the multi-microgrid.

Short circuit current at the affected busbar
In this section, the key results have been presented for the busbar with a short circuit (i.e.Load Bus-2 MG-2). Figure 12 presents the short circuit current at the affected busbars.In Case 1, UPFC was not used in the simulation model and the short circuit fault was not included considering the grid-connected mode.In this case, the short circuit current remained zero as shown in Figure 12(a).In Case 2, the short circuit was introduced and UPFC was not used in the grid-connected mode.In this case, Figure 12(b) presents the short circuit current for the affected busbar.In this case, severe short-circuit current fluctuations (i.e. up to 53 kA) were observed.In Case 3, the short circuit was introduced and UPFC was added in the grid-connected mode.In this case, a short circuit current was observed maximum of up to 1.6 kA (Figure 12(c)).In Case 4, UPFC was not used in the simulation model and the short circuit fault was not included considering the griddisconnected mode.In this case, the results were the same as in Figure 12(a).In Case 5, the short circuit was introduced and UPFC was not used in the grid disconnected mode.In this case, Figure 12(d) presents the short circuit current for the affected busbar.In this case, the severe short circuit current fluctuations (i.e. up to 33 kA).In Case 6, a short circuit was introduced and UPFC was added in the grid-connected mode.In this case, a short circuit current was observed maximum of up to 1.6 kA (Figure 12(e)).It can be concluded that the UPFC has significantly eliminated the short circuit current in the affected busbar in the multimicrogrid.

Short circuit faults at both microgrids
In the previous sections, all the results are based on the presence of the short circuit at only one microgrid.In this section, the short circuit has been introduced at both microgrids with the same duration and location of the short circuit as in the case of a single microgrid in the previous analysis.In the following, the short circuit analysis has been performed for Case 2 (Grid connected, no UPFC, and one short circuit) and Case 3 (Grid connected, UPFC used, and one short circuit).Only the difference is the inclusion of the two short circuits.Figure 13 presents the short circuit current for both short circuits at both microgrids.It can be observed that the short circuit current is almost the same for microgrid-1 in the absence (Figure 13(a)) and presence (Figure 13(b)) of UPFC.Since UPFC was located in microgrid-2; it did not work well for microgrid-1 where it was not located.In the case of microgrid-2, the short circuit current was significantly reduced in the presence of UPFC (Figure 13(d)) compared with the absence of UPFC (Figure 13(c)).Hence, UPFC worked more efficiently when it was located near the location with short circuits.
Figure 14 presents the phase voltage at the main busbar for microgrid-2.It was observed that the phase voltage was not much affected for microgrid-1 in the presence and absence of UPFC.Hence, the figures for microgrid-1 were skipped.For microgrid-2, the phase voltage was significantly reduced in the presence of UPFC (Figure 14(b)) compared with the absence of UPFC (Figure 14(a)).
Figure 15 presents the active power and phase voltage at microgrid-2 for the synchronous generator.It was observed that the active power and phase voltage was not much affected for microgrid-1 in the presence and absence of UPFC.In the case of microgrid-2, the active power and phase voltage was significantly improved in the presence of UPFC (Figure 15  Figure 17 presents the active power and phase voltage at microgrid-2 for the wind System.It was observed that the active power and phase voltage was not much affected for microgrid-1 in the presence and absence of UPFC.For the microgrid-2, the active power and phase voltage was significantly improved in the presence of UPFC (Figure 17(b)) compared with the absence of UPFC (Figure 17(a)).

Conclusion
This paper performs the transient stability analysis for multi-microgrids (MMG) based on the integration of UPFC and renewable energy under several possible circumstances.It can be concluded that the UPFC would greatly help in the quick fault clearance and transient stability in MMGs.It was observed that UPFC worked more efficiently for the nearby power system components.However, its positive effect was observed in both microgrids.For the optimal working of UPFC, its parameters should be reconfigured.However, any optimal design cannot be fixed due to the power flow dynamics including renewable energy fluctuations and unexpected faults.In this case, the working of UPFC should be flexible in the case of any fault.It can also be concluded that a single UPFC can be designed for both the grid-connected and disconnected modes.Future research may extend this work in several directions.For instance, the comprehensive analysis of multimicrogrids can be performed in the presence of storage, overloading, and the different types of failures at  different locations in the multi-microgrids.All of these problems would involve complex modifications in the multi-microgrid system.From the personal experience of the authors, DIgSILENT PowerFactory software was found very easy, flexible, accurate, and efficient for the power system analysis in the smart grids.However, there are immense opportunities for scientists and scholars to use and improve this software for the analysis of advanced power systems.The use of such specialized software would dramatically accelerate the accurate solutions to the transient stability and other related problems in the smart grids.Moreover, future research may include more than two MMGs in the analysis.Other renewable energy resources (e.g.biogas,   solar thermal, hydropower, geothermal, and Tidal energy) can be added to the analysis.In addition, the other various power flow controllers would be evaluated in the analysis of MMGs.Power flow analysis is a most challenging and complex area in power system analysis research.In this context, the MMGs are the emerging networks leading to additional challenges and complexity in the power flow analysis.Hence, the power flow analysis of the MMGs is a promising research area that needs extensive research in different directions.

Figure 1 .
Figure 1.Flow chart of the multi-microgrid modeling and simulation.

x 00 d
Sub-transient reactance (d-axis) (p.u.) x 00 q Sub-transient reactance (q-axis) (p.u.) r s Stator resistance (p.u.) v n Angular velocity i d Stator current of d-axis i q Stator current of q-axis u 00 d Stator voltage for of d-axis u 00 q

Figure 16
Figure16presents the active power and phase voltage at microgrid-2 for PV System.It was observed that the active power and phase voltage was not much affected for microgrid-1 in the presence and absence of UPFC.For the microgrid-2, the active power and phase voltage was significantly improved in the presence of UPFC (Figure16(b)) compared with the absence of UPFC (Figure16(a)).Figure17presents the active power and phase voltage at microgrid-2 for the wind System.It was observed that the active power and phase voltage was not much affected for microgrid-1 in the presence and absence of UPFC.For the microgrid-2, the active power and phase voltage was significantly improved in the presence of UPFC (Figure17(b)) compared with the absence of UPFC (Figure17(a)).

Figure 11 .
Figure 11.Transient analysis at two main busbars in multi-microgrid: (a) Case 1. Grid connected, no UPFC, and no short circuit at MG-1, (b) Case 2. Grid connected, no UPFC, and one short circuit at MG-1, (c) Case 2. Grid connected, no UPFC, and one short circuit at MG-2, (d) Grid disconnected, no UPFC, and one short circuit at MG-1, and (e) Case 6. disconnected, no UPFC, and one short circuit at MG-2.

Table 1 .
Existing literature on the power flow analysis of multi-microgrids.