# Design, Modeling, and Validation of Grid-Forming Inverters for Frequency Synchronization and Restoration

Ilyas Bennia, Elhoussin Elbouchikhi, Abdelghani Harrag, Yacine Daili, Abdelhakim Saim, Allal El Moubarek Bouzid, Badreddine Kanouni

► To cite this version:

Ilyas Bennia, Elhoussin Elbouchikhi, Abdelghani Harrag, Yacine Daili, Abdelhakim Saim, et al. Design, Modeling, and Validation of Grid-Forming Inverters for Frequency Synchronization and Restoration. Energies, 2023, 17 (1), pp.59. 10.3390/en17010059. hal-04365211

HAL Id: hal-04365211

https://hal.science/hal-04365211

Submitted on 2 Apr 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Article

# Design, Modeling, and Validation of Grid-Forming Inverters for Frequency Synchronization and Restoration

Ilyas Bennia<fnref n="1" />,<fnref n="2" />,* ID, Elhoussin Elbouchikhi <fnref n="3" />,* ID, Abdelghani Harrag <fnref n="1" />,<fnref n="2" />, Yacine Daili <fnref n="1" />,<fnref n="2" />, Abdelhakim Saim <fnref n="4" /> ID, Allal El Moubarek Bouzid <fnref n="5" /> ID and Badreddine Kanouni <fnref n="6" /> ID

<figure><img src="image_1.png" /></figure>

check for
updates

**Citation:** Bennia, I.; Elbouchikhi, E.; Harrag, A.; Daili, Y.; Saim, A.; Bouzid, A.E.M.; Kanouni, B. Design, Modeling, and Validation of Grid-Forming Inverters for Frequency Synchronization and Restoration.
*Energies* **2024**, *17*, 59. https://doi.org/10.3390/en17010059

Academic Editor: José Matas

Received: 13 October 2023

Revised: 14 December 2023

Accepted: 18 December 2023

Published: 21 December 2023

<figure><img src="image_2.png" /></figure>

**Copyright:** © 2023 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

**Abstract:** This paper focuses on the modeling, analysis, and design of grid-forming (GFM) inverter-based microgrids (MGs). It starts with the development of a mathematical model for three-phase voltage source inverters (VSI). The voltage and current controllers consist of two feedback loops: an outer feedback loop of the capacitance-voltage and an inner feedback loop of the output inductance current. The outer voltage loop is employed to enhance the controller's response time. The inner current loop is used to provide active damping for the resonance created by the LCL filter. A two-layer control scheme is adopted for the GFM inverter control. The primary decentralized control uses droop control and virtual impedance loops to share active and reactive power. Simultaneously, the centralized secondary control addresses frequency and amplitude deviations induced by the droop control. Additionally, a synchronization loop is proposed for seamless reconnection of GFM inverters to the MG and to connect the GFM-controlled MG to the main grid. It has the advantage that the inverter operates in GFM mode even after the synchronization has occurred. The simulation results have shown that the voltage controller ensures a 0.005 s settling time and maintains the steady-state error at its minimum value of 0.1 V. Similarly, the current controller ensures a 0.006 s settling time with a 10⁻<fnref n="5" /> steady-state error. The system with the designed controller has a low total harmonic distortion (THD) of 1.46% and improved power quality of the output voltage. Furthermore, a quick restoration time is observed during load steps and tripping events, with a restoration time of 1 s with 10⁻¹⁰ steady-state error. Synchronization is achieved within 0.8 s for the incoming inverters and requires 3 s to synchronize the MG with the main grid, maintaining a steady-state error of 10⁻⁹.

**Keywords:** grid-forming; microgrid; island mode; droop control; decentralized control; synchronization; frequency restoration

## 1. Introduction

The amount of renewable energy generation systems that are connected to the grid is continuously increasing. Consequently, the presence of power electronics devices in power systems has also increased. At present, the electrical grid is predominantly characterized by synchronous generators (SGs). These generators provide a consistent voltage and frequency, facilitating the synchronization of VSIs and their connection at the point of common

<footnote n="1">¹ Renewable Energy Deployment and Integration Team, Mechatronics Laboratory (LMETR), Optics and Precision Mechanics Institute, Ferhat Abbas University Setif 1, Setif 19000, Algeria; a.b.harrag@gmail.com (A.H.); yacine_daili@yahoo.fr (Y.D.)</footnote>

<footnote n="2">² Electrotechnics Department, Faculty of Technology, Ferhat Abbas University Setif 1, Setif 19000, Algeria</footnote>

<footnote n="3">³ ISEN Yncréa Ouest, Nantes Campus, LABISEN 33, Avenue du Champ de Manoeuvre, 44470 Carquefou, France</footnote>

<footnote n="4">⁴ IREENA Laboratory, University of Nantes, 44600 Saint-Nazaire, France; abdelhakim.saim@univ-nantes.fr</footnote>

<footnote n="5">⁵ Research and Higher Education Department, ICAM School of Engineering, Toulouse Campus, 75 av. de Grande Bretagne, CS 97615, CEDEX 3, 31076 Toulouse, France; allal.bouzid@icam.fr</footnote>

<footnote n="6">⁶ Automatic Laboratory of Setif, Electrotechnics Department, Faculty of Technology, Ferhat Abbas University Setif 1, Setif 19000, Algeria; badreddine.kanouni@univ-setif.dz</footnote>

<footnote>* Correspondence: ilyasbennia@yahoo.com (I.B.); elhoussin.elbouchikhi@isen-ouest.yncrea.fr (E.E.)</footnote>
Article

# Design, Modeling, and Validation of Grid-Forming Inverters for Frequency Synchronization and Restoration

Ilyas Bennia<fnref n="1" />,<fnref n="2" />,* ID, Elhoussin Elbouchikhi <fnref n="3" />,* ID, Abdelghani Harrag <fnref n="1" />,<fnref n="2" />, Yacine Daili <fnref n="1" />,<fnref n="2" />, Abdelhakim Saim <fnref n="4" /> ID, Allal El Moubarek Bouzid <fnref n="5" /> ID and Badreddine Kanouni <fnref n="6" /> ID

<figure><img src="image_2.png" /></figure>

check for
updates

**Citation:** Bennia, I.; Elbouchikhi, E.; Harrag, A.; Daili, Y.; Saim, A.; Bouzid, A.E.M.; Kanouni, B. Design, Modeling, and Validation of Grid-Forming Inverters for Frequency Synchronization and Restoration.
*Energies* **2024**, *17*, 59. https://doi.org/10.3390/en17010059

Academic Editor: José Matas

Received: 13 October 2023

Revised: 14 December 2023

Accepted: 18 December 2023

Published: 21 December 2023

<figure><img src="image_3.png" /></figure>

**Copyright:** © 2023 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

**Abstract:** This paper focuses on the modeling, analysis, and design of grid-forming (GFM) inverter-based microgrids (MGs). It starts with the development of a mathematical model for three-phase voltage source inverters (VSI). The voltage and current controllers consist of two feedback loops: an outer feedback loop of the capacitance-voltage and an inner feedback loop of the output inductance current. The outer voltage loop is employed to enhance the controller's response time. The inner current loop is used to provide active damping for the resonance created by the LCL filter. A two-layer control scheme is adopted for the GFM inverter control. The primary decentralized control uses droop control and virtual impedance loops to share active and reactive power. Simultaneously, the centralized secondary control addresses frequency and amplitude deviations induced by the droop control. Additionally, a synchronization loop is proposed for seamless reconnection of GFM inverters to the MG and to connect the GFM-controlled MG to the main grid. It has the advantage that the inverter operates in GFM mode even after the synchronization has occurred. The simulation results have shown that the voltage controller ensures a 0.005 s settling time and maintains the steady-state error at its minimum value of 0.1 V. Similarly, the current controller ensures a 0.006 s settling time with a 10⁻<fnref n="5" /> steady-state error. The system with the designed controller has a low total harmonic distortion (THD) of 1.46% and improved power quality of the output voltage. Furthermore, a quick restoration time is observed during load steps and tripping events, with a restoration time of 1 s with 10⁻¹⁰ steady-state error. Synchronization is achieved within 0.8 s for the incoming inverters and requires 3 s to synchronize the MG with the main grid, maintaining a steady-state error of 10⁻⁹.

**Keywords:** grid-forming; microgrid; island mode; droop control; decentralized control; synchronization; frequency restoration

## 1. Introduction

The amount of renewable energy generation systems that are connected to the grid is continuously increasing. Consequently, the presence of power electronics devices in power systems has also increased. At present, the electrical grid is predominantly characterized by synchronous generators (SGs). These generators provide a consistent voltage and frequency, facilitating the synchronization of VSIs and their connection at the point of common

<footnote n="1">¹ Renewable Energy Deployment and Integration Team, Mechatronics Laboratory (LMETR), Optics and Precision Mechanics Institute, Ferhat Abbas University Setif 1, Setif 19000, Algeria; a.b.harrag@gmail.com (A.H.); yacine_daili@yahoo.fr (Y.D.)</footnote>

<footnote n="2">² Electrotechnics Department, Faculty of Technology, Ferhat Abbas University Setif 1, Setif 19000, Algeria</footnote>

<footnote n="3">³ ISEN Yncréa Ouest, Nantes Campus, LABISEN 33, Avenue du Champ de Manoeuvre, 44470 Carquefou, France</footnote>

<footnote n="4">⁴ IREENA Laboratory, University of Nantes, 44600 Saint-Nazaire, France; abdelhakim.saim@univ-nantes.fr</footnote>

<footnote n="5">⁵ Research and Higher Education Department, ICAM School of Engineering, Toulouse Campus, 75 av. de Grande Bretagne, CS 97615, CEDEX 3, 31076 Toulouse, France; allal.bouzid@icam.fr</footnote>

<footnote n="6">⁶ Automatic Laboratory of Setif, Electrotechnics Department, Faculty of Technology, Ferhat Abbas University Setif 1, Setif 19000, Algeria; badreddine.kanouni@univ-setif.dz</footnote>

<footnote>* Correspondence: ilyasbennia@yahoo.com (I.B.); elhoussin.elbouchikhi@isen-ouest.yncrea.fr (E.E.)</footnote>
coupling (PCC) for injecting power into the main grid. These inverters operate as current sources and are known as grid-following inverters. The imperfections of grid-following inverters arise when the grid is absent, as this concept fails to produce instantaneous voltage and frequency set points. Therefore, this operating mode has been significantly modified, from following the grid to leading it. This concept is known as grid-forming (GFM) inverters, which can independently set up and keep the voltage and frequency within their nominal ranges without the need for the main grid [1]. The block diagram of both concepts is depicted in Figure 1.

<figure><img src="image_3.png" /><figcaption>**Figure 1.** Power converter classification: (a) grid-forming and (b) grid-following inverters.</figcaption></figure>

GFM inverter control consists of a voltage control path that regulates the output voltage to a specified voltage reference and a phase-angle reference path that integrates a predetermined frequency to obtain the phase-angle reference. These references (voltage and frequency) are commonly achieved through decentralized control such as droop control [2,3], virtual synchronous machines [4], virtual SG [5], synchronverter [6], power synchronization control [7], generalized virtual synchronous control [8], and virtual oscillator control [9]. Presently, the biggest challenges for decentralized control schemes are the seamless reconnection and black-start of GFM inverters [10].

The decentralized control for GFM inverters is generally composed of inner control loops for current and voltage, a virtual impedance loop, and a controller employing a droop mechanism [11]. The primary control objectives for GFM inverters involve stabilizing amplitudes and ensuring power sharing among them. The stabilization of frequency and voltage is typically accomplished through current and voltage control loops, while the droop control mechanism facilitates power sharing [12].

This paper is structured as follows: In Section 2, a comprehensive review of the GFM inverter control methods is carried out. Section 3 outlines the design methodology of an MG-based GFM inverter, including system description, modeling, voltage, and current loop control design. Section 4 explores GFM inverter frequency synchronization and restoration, emphasizing decentralized control using droop mechanisms. It introduces a new synchronization approach and examines frequency and voltage restoration during disturbances. Section 5 shows cases of the simulation results. A dedicated discussion is provided in Section 6. Finally, conclusions and future work are described in Section 7.

## 2. Related Work

The decentralized control design is very important for the GFM inverter's performance. Various control approaches for GFM inverters are examined and compared with the GFM characteristics exhibited by synchronous machines in [13]. A hybrid grid-forming/following controller was proposed in [14]. Voltage synchronization is achieved by incorporating a phase-locked loop (PLL), and load sharing is facilitated through the utilization of a power-frequency droop. A droop-based GFM adaptive virtual resistance control was suggested in [15] for postfault oscillation mitigation in
coupling (PCC) for injecting power into the main grid. These inverters operate as current sources and are known as grid-following inverters. The imperfections of grid-following inverters arise when the grid is absent, as this concept fails to produce instantaneous voltage and frequency set points. Therefore, this operating mode has been significantly modified, from following the grid to leading it. This concept is known as grid-forming (GFM) inverters, which can independently set up and keep the voltage and frequency within their nominal ranges without the need for the main grid [1]. The block diagram of both concepts is depicted in Figure 1.

<figure><img src="image_4.png" /><figcaption>**Figure 1.** Power converter classification: (a) grid-forming and (b) grid-following inverters.</figcaption></figure>

GFM inverter control consists of a voltage control path that regulates the output voltage to a specified voltage reference and a phase-angle reference path that integrates a predetermined frequency to obtain the phase-angle reference. These references (voltage and frequency) are commonly achieved through decentralized control such as droop control [2,3], virtual synchronous machines [4], virtual SG [5], synchronverter [6], power synchronization control [7], generalized virtual synchronous control [8], and virtual oscillator control [9]. Presently, the biggest challenges for decentralized control schemes are the seamless reconnection and black-start of GFM inverters [10].

The decentralized control for GFM inverters is generally composed of inner control loops for current and voltage, a virtual impedance loop, and a controller employing a droop mechanism [11]. The primary control objectives for GFM inverters involve stabilizing amplitudes and ensuring power sharing among them. The stabilization of frequency and voltage is typically accomplished through current and voltage control loops, while the droop control mechanism facilitates power sharing [12].

This paper is structured as follows: In Section 2, a comprehensive review of the GFM inverter control methods is carried out. Section 3 outlines the design methodology of an MG-based GFM inverter, including system description, modeling, voltage, and current loop control design. Section 4 explores GFM inverter frequency synchronization and restoration, emphasizing decentralized control using droop mechanisms. It introduces a new synchronization approach and examines frequency and voltage restoration during disturbances. Section 5 shows cases of the simulation results. A dedicated discussion is provided in Section 6. Finally, conclusions and future work are described in Section 7.

## 2. Related Work

The decentralized control design is very important for the GFM inverter's performance. Various control approaches for GFM inverters are examined and compared with the GFM characteristics exhibited by synchronous machines in [13]. A hybrid grid-forming/following controller was proposed in [14]. Voltage synchronization is achieved by incorporating a phase-locked loop (PLL), and load sharing is facilitated through the utilization of a power-frequency droop. A droop-based GFM adaptive virtual resistance control was suggested in [15] for postfault oscillation mitigation in
GFM inverters. In [16], authors investigated the use of impedance-based analysis to define, assess, and enhance the performance of GFM inverter controllers in various ways. In [17], a multivariable controller was proposed with the aim of decoupling P and Q loops in GFM inverters using droop control and other methods. A decentralized control approach for multiparallel GFM-distributed generators on island MG was developed in [18]. It offers the advantage of decoupling the frequency from load conditions. The authors in [19] explored GFM inverter modeling and control methodology, focusing on droop control. Embedding voltage and current loops within a single controller is a strategy that can significantly enhance the dynamic performance of the GFM system, as discussed in [20]. In MG's with mismatched inductive/resistive feeder impedance, the virtual impedance loop, acting as an optional loop, plays a role in improving the power quality and power-sharing accuracy of GFM systems [21]. Drawbacks such as steady-state error and deviations in frequency and voltage amplitude are associated with the GFM droop control mechanism [22]. Consequently, a secondary control is introduced to mitigate these deviations [23]. Despite the deviations introduced by the total demand for active and reactive power from the loads, the GFM inverter system effectively restores both frequency and amplitude [24]. Additionally, a threshold-based method for frequency and voltage restoration in islanded MGs fed by droop-controlled GFM is proposed in [25]. It aims to restore the system when pulse load and plug-in events occur. A relevant solution for enhancing the efficiency and power quality of GFM inverters can be found in compact inverter structures, as demonstrated in [26].

The primary focus of the above studies is on the dynamics of GFM microgrids. This focus intensifies specifically after a disturbance in the system when GFM inverters are operated in parallel. Less attention has been given to the synchronization and reconnection of GFM inverters in MG or the synchronization of GFM microgrids to the main grid. The main difficulty is the lack of information about voltage, frequency, and phase angle at the PCC. Hence, the synchronization with other sources and proportional contribution to power-sharing in the (V-f) mode becomes challenging tasks for the incoming inverter. Likewise, when transitioning from islanded operation to grid-connected mode, the synchronization of the MG with the main grid is a necessary step. Thus, a synchronization control algorithm is necessary. A seamless connection to the MG/grid is essential for both GFM and grid-following inverters. A synchronization method for inverters in GFM, known as the controller-sync, is proposed in [27]. In this approach, the inverter initially aligns with the MG frequency without contributing to power sharing. Subsequently, the controller transitions to power-sharing mode. A communication-based method to synchronize the GFM microgrid to the utility grid is proposed in [28]. This approach is based on exchanging data between two proposed devices: synchronization data sender and a synchronization data controller.

In summary, the current state of research reveals certain gaps:

* The comprehensive applicability of droop-based control in GFM inverters remains inadequately addressed.

* The analysis of the decentralized control's performance is lacking, particularly in the context of off-grid systems and varying PQ load demands.

Furthermore, when it comes to synchronization techniques, several gaps exist:

* While many techniques address the connection of inverters to the utility grid, there is a lack of exploration regarding the (re)connection of an inverter to an islanded MG.

* The majority of techniques are designed for inverters operating in (P-Q) control mode, leaving a gap in the understanding of inverters in (V-f) control mode post-(re)connection.

* Certain methods require communication infrastructure, leading to cost implications for the seamless plug-and-play operation of inverters and exposing them to potential cyber-attacks.

This paper provides a comprehensive examination of the theoretical analysis of GFM inverters and their control structures. It validates the assumed and resulting P-f and Q-V
GFM inverters. In [16], authors investigated the use of impedance-based analysis to define, assess, and enhance the performance of GFM inverter controllers in various ways. In [17], a multivariable controller was proposed with the aim of decoupling P and Q loops in GFM inverters using droop control and other methods. A decentralized control approach for multiparallel GFM-distributed generators on island MG was developed in [18]. It offers the advantage of decoupling the frequency from load conditions. The authors in [19] explored GFM inverter modeling and control methodology, focusing on droop control. Embedding voltage and current loops within a single controller is a strategy that can significantly enhance the dynamic performance of the GFM system, as discussed in [20]. In MG's with mismatched inductive/resistive feeder impedance, the virtual impedance loop, acting as an optional loop, plays a role in improving the power quality and power-sharing accuracy of GFM systems [21]. Drawbacks such as steady-state error and deviations in frequency and voltage amplitude are associated with the GFM droop control mechanism [22]. Consequently, a secondary control is introduced to mitigate these deviations [23]. Despite the deviations introduced by the total demand for active and reactive power from the loads, the GFM inverter system effectively restores both frequency and amplitude [24]. Additionally, a threshold-based method for frequency and voltage restoration in islanded MGs fed by droop-controlled GFM is proposed in [25]. It aims to restore the system when pulse load and plug-in events occur. A relevant solution for enhancing the efficiency and power quality of GFM inverters can be found in compact inverter structures, as demonstrated in [26].

The primary focus of the above studies is on the dynamics of GFM microgrids. This focus intensifies specifically after a disturbance in the system when GFM inverters are operated in parallel. Less attention has been given to the synchronization and reconnection of GFM inverters in MG or the synchronization of GFM microgrids to the main grid. The main difficulty is the lack of information about voltage, frequency, and phase angle at the PCC. Hence, the synchronization with other sources and proportional contribution to power-sharing in the (V-f) mode becomes challenging tasks for the incoming inverter. Likewise, when transitioning from islanded operation to grid-connected mode, the synchronization of the MG with the main grid is a necessary step. Thus, a synchronization control algorithm is necessary. A seamless connection to the MG/grid is essential for both GFM and grid-following inverters. A synchronization method for inverters in GFM, known as the controller-sync, is proposed in [27]. In this approach, the inverter initially aligns with the MG frequency without contributing to power sharing. Subsequently, the controller transitions to power-sharing mode. A communication-based method to synchronize the GFM microgrid to the utility grid is proposed in [28]. This approach is based on exchanging data between two proposed devices: synchronization data sender and a synchronization data controller.

In summary, the current state of research reveals certain gaps:

* The comprehensive applicability of droop-based control in GFM inverters remains inadequately addressed.

* The analysis of the decentralized control's performance is lacking, particularly in the context of off-grid systems and varying PQ load demands.

Furthermore, when it comes to synchronization techniques, several gaps exist:

* While many techniques address the connection of inverters to the utility grid, there is a lack of exploration regarding the (re)connection of an inverter to an islanded MG.

* The majority of techniques are designed for inverters operating in (P-Q) control mode, leaving a gap in the understanding of inverters in (V-f) control mode post-(re)connection.

* Certain methods require communication infrastructure, leading to cost implications for the seamless plug-and-play operation of inverters and exposing them to potential cyber-attacks.

This paper provides a comprehensive examination of the theoretical analysis of GFM inverters and their control structures. It validates the assumed and resulting P-f and Q-V
droop characteristics utilized to drive GFM inverters. The verification process includes assessing the power-sharing concept and demonstrating its effectiveness by connecting two GFM inverters to meet varying load demands. The study also addresses the seamless connection or reconnection of an inverter to an islanded MG in GFM mode. Additionally, the paper proposes a synchronization loop designed to maintain the system in GFM mode even after synchronization is established.

### 3. Methodology

#### 3.1. System Description and Modeling

Usually, GFM inverter-based MG consists of VSIs, which can operate in stand-alone and grid-connected modes of operation. VSIs stand as an interface between distributed energy sources and loads; their main role is to convert the DC power into AC power and supply the entire MG. The VSIs are controlled by the pulse width modulation (PWM) signals, which generate harmonic components that decrease the power quality. Thus, filters are required to mitigate harmonics and avoid disturbances caused by them. Considering the voltage harmonic limitations defined in [29], the use of an LCL filter is considered to be a good compromise in terms of high-frequency harmonic mitigation and passive element design [30]. The LCL topology is adopted in this work, as can be seen in Figure 2. The inverter is associated with the LCL filter to form the VSI.

<figure><img src="image_4.png" /><figcaption>Figure 2. Three-phase inverter single-line diagram interfaced using an LCL filter.</figcaption></figure>

The mathematical model of the VSI in the dq reference frame can be summarized by the following equations:

$$ \begin{cases} e_d = L_f s i_{ld} + r_f i_{ld} + v_{od} - \omega L_f i_{lq} \\ e_q = L_f s i_{lq} + r_f i_{lq} + v_{oq} + \omega L_f i_{ld} \end{cases} \qquad (1) $$

$$ \begin{cases} i_{cd} = C_f s v_{od} - \omega C_f v_{oq} \\ i_{cq} = C_f s v_{oq} + \omega C_f v_{od} \end{cases} \qquad (2) $$

$$ \begin{cases} v_{od} = r_c i_{od} + L_c s i_{od} + v_{PCCd} - \omega L_c i_{oq} \\ v_{oq} = r_c i_{oq} + L_c s i_{oq} + v_{PCCq} + \omega L_c i_{od} \end{cases} \qquad (3) $$

$$ \begin{cases} i_{ld} = C_f s v_{od} - \omega C_f v_{oq} + i_{od} \\ i_{lq} = C_f s v_{oq} + \omega C_f v_{od} + i_{oq} \end{cases} \qquad (4) $$

#### 3.1.1. Voltage and Current Loops

For the voltage and current controllers, a cascade loop has been used; the current loop must have the fastest response time and, hence the highest bandwidth. The voltage loop must be slower than the current loop, and it must be quick enough to guarantee that the system is properly operated. PI controllers have been employed by both regulators. This choice has been made due to the straightforward design of the PI controller gains and the simplicity of system modeling in the dq reference frame.
droop characteristics utilized to drive GFM inverters. The verification process includes assessing the power-sharing concept and demonstrating its effectiveness by connecting two GFM inverters to meet varying load demands. The study also addresses the seamless connection or reconnection of an inverter to an islanded MG in GFM mode. Additionally, the paper proposes a synchronization loop designed to maintain the system in GFM mode even after synchronization is established.

### 3. Methodology

#### 3.1. System Description and Modeling

Usually, GFM inverter-based MG consists of VSIs, which can operate in stand-alone and grid-connected modes of operation. VSIs stand as an interface between distributed energy sources and loads; their main role is to convert the DC power into AC power and supply the entire MG. The VSIs are controlled by the pulse width modulation (PWM) signals, which generate harmonic components that decrease the power quality. Thus, filters are required to mitigate harmonics and avoid disturbances caused by them. Considering the voltage harmonic limitations defined in [29], the use of an LCL filter is considered to be a good compromise in terms of high-frequency harmonic mitigation and passive element design [30]. The LCL topology is adopted in this work, as can be seen in Figure 2. The inverter is associated with the LCL filter to form the VSI.

<figure><img src="image_5.png" /><figcaption>Figure 2. Three-phase inverter single-line diagram interfaced using an LCL filter.</figcaption></figure>

The mathematical model of the VSI in the dq reference frame can be summarized by the following equations:

$$ \begin{cases} e_d = L_f s i_{ld} + r_f i_{ld} + v_{od} - \omega L_f i_{lq} \\ e_q = L_f s i_{lq} + r_f i_{lq} + v_{oq} + \omega L_f i_{ld} \end{cases} \qquad (1) $$

$$ \begin{cases} i_{cd} = C_f s v_{od} - \omega C_f v_{oq} \\ i_{cq} = C_f s v_{oq} + \omega C_f v_{od} \end{cases} \qquad (2) $$

$$ \begin{cases} v_{od} = r_c i_{od} + L_c s i_{od} + v_{PCCd} - \omega L_c i_{oq} \\ v_{oq} = r_c i_{oq} + L_c s i_{oq} + v_{PCCq} + \omega L_c i_{od} \end{cases} \qquad (3) $$

$$ \begin{cases} i_{ld} = C_f s v_{od} - \omega C_f v_{oq} + i_{od} \\ i_{lq} = C_f s v_{oq} + \omega C_f v_{od} + i_{oq} \end{cases} \qquad (4) $$

#### 3.1.1. Voltage and Current Loops

For the voltage and current controllers, a cascade loop has been used; the current loop must have the fastest response time and, hence the highest bandwidth. The voltage loop must be slower than the current loop, and it must be quick enough to guarantee that the system is properly operated. PI controllers have been employed by both regulators. This choice has been made due to the straightforward design of the PI controller gains and the simplicity of system modeling in the dq reference frame.
The state space representation of the current loop is described as follows:

$$S\begin{bmatrix} i_{ld} \\ i_{lq} \end{bmatrix} = \begin{bmatrix} -\frac{r_f}{L_f} & -\omega \\ \omega & -\frac{r_f}{L_f} \end{bmatrix} \begin{bmatrix} i_{ld} \\ i_{lq} \end{bmatrix} + \frac{1}{L_f} \begin{bmatrix} e_d - v_{od} \\ e_q - v_{oq} \end{bmatrix} \quad (5)$$

The terms $\omega L_f i_{lq}$ and $\omega L_f i_{ld}$ in Equation (1) represent a coupling between the two equations $e_d$ and $e_q$. In other words, a variation of the current $i_{ld}$ will create a variation of the current $i_{lq}$ and vice-versa.

The state space representation of the voltage loop is as follows:

$$s\begin{bmatrix} v_{od} \\ v_{oq} \end{bmatrix} = \begin{bmatrix} 0 & -\omega \\ \omega & 0 \end{bmatrix} \begin{bmatrix} v_{o,d} \\ v_{o,q} \end{bmatrix} + \frac{1}{c_f} \begin{bmatrix} i_{ld} - i_{od} \\ i_{lq} - i_{oq} \end{bmatrix} \quad (6)$$

### 3.1.2. Inner Loops Control Design

The objective of any control system is to shape the response of the system according to a given reference. It also aims to maintain the stability of the system in a closed loop with the desired performance while minimizing the effect of disturbances and measurement noise and avoiding the saturation of controllers, despite the uncertainties of modeling, variations of parameters, or changes in the operating point.

The control diagram used for the GFM-MG in Figure 3 consists of an external voltage loop and an internal current loop that provides the current reference and control signal, respectively. This type of control is called multi-loop control or cascaded loop control. It is usually chosen for current and voltage control of GFM inverters due to its superior disturbance rejection performance and current-limiting capability [31].

<figure><img src="image_5.png" /><figcaption>Figure 3. Inner loops (voltage and current controllers).</figcaption></figure>

When using the GFM configuration, the voltage and frequency references are offered by the local controller, such as droop control.

#### Current Loop Controller Design

The current control loop is responsible for the characteristics of the injected current. It is highly desirable that the inverter current be free of low-order harmonics. High-frequency harmonics can be eliminated with the LCL filter. Current control for the inner loop is implemented using standard feedback control. The current control can be expressed by the following system of equations:
The state space representation of the current loop is described as follows:

$$S\begin{bmatrix} i_{ld} \\ i_{lq} \end{bmatrix} = \begin{bmatrix} -\frac{r_f}{L_f} & -\omega \\ \omega & -\frac{r_f}{L_f} \end{bmatrix} \begin{bmatrix} i_{ld} \\ i_{lq} \end{bmatrix} + \frac{1}{L_f} \begin{bmatrix} e_d - v_{od} \\ e_q - v_{oq} \end{bmatrix} \quad (5)$$

The terms $\omega L_f i_{lq}$ and $\omega L_f i_{ld}$ in Equation (1) represent a coupling between the two equations $e_d$ and $e_q$. In other words, a variation of the current $i_{ld}$ will create a variation of the current $i_{lq}$ and vice-versa.

The state space representation of the voltage loop is as follows:

$$s\begin{bmatrix} v_{od} \\ v_{oq} \end{bmatrix} = \begin{bmatrix} 0 & -\omega \\ \omega & 0 \end{bmatrix} \begin{bmatrix} v_{o,d} \\ v_{o,q} \end{bmatrix} + \frac{1}{c_f} \begin{bmatrix} i_{ld} - i_{od} \\ i_{lq} - i_{oq} \end{bmatrix} \quad (6)$$

### 3.1.2. Inner Loops Control Design

The objective of any control system is to shape the response of the system according to a given reference. It also aims to maintain the stability of the system in a closed loop with the desired performance while minimizing the effect of disturbances and measurement noise and avoiding the saturation of controllers, despite the uncertainties of modeling, variations of parameters, or changes in the operating point.

The control diagram used for the GFM-MG in Figure 3 consists of an external voltage loop and an internal current loop that provides the current reference and control signal, respectively. This type of control is called multi-loop control or cascaded loop control. It is usually chosen for current and voltage control of GFM inverters due to its superior disturbance rejection performance and current-limiting capability [31].

<figure><img src="image_6.png" /><figcaption>Figure 3. Inner loops (voltage and current controllers).</figcaption></figure>

When using the GFM configuration, the voltage and frequency references are offered by the local controller, such as droop control.

#### Current Loop Controller Design

The current control loop is responsible for the characteristics of the injected current. It is highly desirable that the inverter current be free of low-order harmonics. High-frequency harmonics can be eliminated with the LCL filter. Current control for the inner loop is implemented using standard feedback control. The current control can be expressed by the following system of equations:
$$ \begin{cases} e_d^* = (k_{pc} + k_{ic}/s)(i_{ld}^* - i_{ld}) - \omega L_f i_{lq} + v_{od} \\ e_q^* = (k_{pc} + k_{ic}/s)(i_{lq}^* - i_{lq}) + \omega L_f i_{ld} + v_{oq} \end{cases} \quad (7) $$

where:

* $e_d^*$ and $e_q^*$ are the d- and q-axis components of the voltage modulation signals, respectively.

* $i_{ld}$ and $i_{lq}$ are the values of the inductance current for the d- and q-axis components, respectively.

* $k_{pc}$ and $k_{ic}$ are the proportional and integral PI regulator parameters for current control and $L_f$ represents the inductance of the inverter-side filter.

Figure 4 shows the detailed diagram of the current control loop. It should be noted that all the current control loops, all signals in the loop feedforward, and the feedback loops are direct quantities [32].

<figure><img src="image_6.png" /><figcaption>Figure 4. Block diagram of current controller loops.</figcaption></figure>

The transfer function of the d component of the current loop is identified by:

$$ \frac{i_{ld}(s)}{e_d(s)} = \frac{1/L_f}{s + r_f/L_f} \quad (8) $$

To decouple the dynamics of the loops, the internal loop (current loop) must be designed to have faster dynamics compared to the outer loop (voltage loop).

From Figure 4, it can be concluded that the two current control loops of the two d- and q-axes are similar. Thus, the corresponding controllers can also be identical. Since the switching frequency is significantly higher than the line frequency, sample delays can be neglected in controller design [33].

The transfer function of the current PI regulator is:

$$ K_i(s) = k_{pc} + \frac{k_{ic}}{s} \quad (9) $$

From the block diagram in Figure 5, the closed loop transfer function for the current loop is as follows:

$$ \frac{i_{ld}}{i_{ld}^*} = \frac{k_{pc}}{L_f} \frac{s + k_{ic}/k_{pc}}{s^2 + \frac{r_f + k_{pc}}{L_f}s + \frac{k_{ic}}{L_f}} \quad (10) $$
$$ \begin{cases} e_d^* = (k_{pc} + k_{ic}/s)(i_{ld}^* - i_{ld}) - \omega L_f i_{lq} + v_{od} \\ e_q^* = (k_{pc} + k_{ic}/s)(i_{lq}^* - i_{lq}) + \omega L_f i_{ld} + v_{oq} \end{cases} \qquad (7) $$

where:

* $e_d^*$ and $e_q^*$ are the d- and q-axis components of the voltage modulation signals, respectively.

* $i_{ld}$ and $i_{lq}$ are the values of the inductance current for the d- and q-axis components, respectively.

* $k_{pc}$ and $k_{ic}$ are the proportional and integral PI regulator parameters for current control and $L_f$ represents the inductance of the inverter-side filter.

Figure 4 shows the detailed diagram of the current control loop. It should be noted that all the current control loops, all signals in the loop feedforward, and the feedback loops are direct quantities [32].

<figure><img src="image_7.png" /><figcaption>Figure 4. Block diagram of current controller loops.</figcaption></figure>

The transfer function of the d component of the current loop is identified by:

$$ \frac{i_{ld}(s)}{e_d(s)} = \frac{1/L_f}{s + r_f/L_f} \qquad (8) $$

To decouple the dynamics of the loops, the internal loop (current loop) must be designed to have faster dynamics compared to the outer loop (voltage loop).

From Figure 4, it can be concluded that the two current control loops of the two d- and q-axes are similar. Thus, the corresponding controllers can also be identical. Since the switching frequency is significantly higher than the line frequency, sample delays can be neglected in controller design [33].

The transfer function of the current PI regulator is:

$$ K_i(s) = k_{pc} + \frac{k_{ic}}{s} \qquad (9) $$

From the block diagram in Figure 5, the closed loop transfer function for the current loop is as follows:

$$ \frac{i_{ld}}{i_{ld}^*} = \frac{k_{pc}}{L_f} \frac{s + k_{ic}/k_{pc}}{s^2 + \frac{r_f + k_{pc}}{L_f}s + \frac{k_{ic}}{L_f}} \qquad (10) $$
<figure><img src="image_7.png" /><figcaption>Figure 5. Block diagram of the closed-loop control for current.</figcaption></figure>

By assimilating the equation above with the quadratic characteristic equation, the damping factor and the natural oscillation frequency can be obtained as follows:

$$ \xi_i = \frac{r_f + k_{pc}}{L_f} \qquad (11) $$

$$ \omega_{ni}^2 = k_{ic} / L_f \qquad (12) $$

Hence, the parameters of the current regulator can be designed as follows:

$$ \begin{cases} k_{pc} = 2\xi_i\omega_{ni}L_f - r_f \\ k_{ic} = L_f\omega_{ni}^2 \end{cases} \qquad (13) $$

According to the theory of optimal techniques $\xi_i = 0.707$ and $\omega_{ni}$ are based on the time domain specification. Usually, the natural frequency is selected as $\omega_n = \omega_s/50$, with $\omega_s$ is the switching angular frequency.

## Voltage Loop Controller Design

Voltage regulation is required to inject good-quality energy. The external voltage control loop is developed using the standard feedback/feedforward control, which commonly uses a PI controller. The voltage control can be expressed as:

$$ \begin{cases} i_{ld}^* = (k_{pv} + k_{iv}/s)(v_{od}^* - v_{od}) - \omega C_f v_{oq} + F i_{od} \\ i_{lq}^* = (k_{pv} + k_{iv}/s)(v_{oq}^* - v_{oq}) + \omega C_f v_{od} + F i_{oq} \end{cases} \qquad (14) $$

where

* $i_{ld}^*$ and $i_{lq}^*$ are the d- and q-axis inductance current references, respectively;

* $v_{od}^*$ and $v_{oq}^*$ are the voltage references;

* $\omega$ is the angular frequency, $k_{pv}$ and $k_{iv}$ are the proportional and integral parameters of the PI regulator. For voltage control, $C_f$ represents the capacitance of the filter and is the feedforward current gain. Figure 6 shows the block diagram of the voltage control loop.

The transfer function of the voltage loop in the d-axis is:

$$ \frac{v_{od}(s)}{i_{ld}(s) - i_{od}(s)} = \frac{1}{C_f s} \qquad (15) $$
<figure><img src="image_8.png" /><figcaption>Figure 5. Block diagram of the closed-loop control for current.</figcaption></figure>

By assimilating the equation above with the quadratic characteristic equation, the damping factor and the natural oscillation frequency can be obtained as follows:

$$ \xi_i = \frac{(r_f + k_{pc}) / L_f}{2\sqrt{k_{ic} / L_f}} \qquad (11) $$

$$ \omega_{ni}^2 = k_{ic} / L_f \qquad (12) $$

Hence, the parameters of the current regulator can be designed as follows:

$$ \left\{ \begin{array}{l} k_{pc} = 2\xi_i\omega_{ni}L_f - r_f \\ k_{ic} = L_f\omega_{ni}^2 \end{array} \right. \qquad (13) $$

According to the theory of optimal techniques $\xi_i = 0.707$ and $\omega_{ni}$ are based on the time domain specification. Usually, the natural frequency is selected as $\omega_n = \omega_s/50$, with $\omega_s$ is the switching angular frequency.

## Voltage Loop Controller Design

Voltage regulation is required to inject good-quality energy. The external voltage control loop is developed using the standard feedback/feedforward control, which commonly uses a PI controller. The voltage control can be expressed as:

$$ \left\{ \begin{array}{l} i_{ld}^* = (k_{pv} + k_{iv}/s)(v_{od}^* - v_{od}) - \omega C_f v_{oq} + F i_{od} \\ i_{lq}^* = (k_{pv} + k_{iv}/s)(v_{oq}^* - v_{oq}) + \omega C_f v_{od} + F i_{oq} \end{array} \right. \qquad (14) $$

where

* $i_{ld}^*$ and $i_{lq}^*$ are the d- and q-axis inductance current references, respectively;

* $v_{od}^*$ and $v_{oq}^*$ are the voltage references;

* $\omega$ is the angular frequency, $k_{pv}$ and $k_{iv}$ are the proportional and integral parameters of the PI regulator. For voltage control, $C_f$ represents the capacitance of the filter and is the feedforward current gain. Figure 6 shows the block diagram of the voltage control loop.

The transfer function of the voltage loop in the d-axis is:

$$ \frac{v_{od}(s)}{i_{ld}(s) - i_{od}(s)} = \frac{1}{C_f s} \qquad (15) $$
<figure><img src="image_8.png" /><figcaption>Figure 6. Block diagram of voltage controller loops.</figcaption></figure>

The transfer function of the voltage PI regulator is:

$$K_v(s) = k_{pv} + \frac{k_{iv}}{s} \qquad (16)$$

From the block diagram in Figure 7, the closed-loop transfer function of the voltage loop is as follows:

$$\frac{u_d}{u_d^*} = \frac{1}{C_f} \frac{k_{iv} + k_{pv}s}{s^2 + \frac{k_{pv}}{C_f}s + \frac{k_{iv}}{C_f}} \qquad (17)$$

<figure><img src="image_9.png" /><figcaption>Figure 7. Block diagram of closed-loop control for voltage.</figcaption></figure>

Like the process of designing the current loop controller, the damping factor $\zeta_v$ and the natural oscillation frequency $\omega_{nv}$ of the voltage loop can be obtained as follows:

$$\zeta_v = \frac{k_{pv}/C_f}{2\sqrt{k_{iv}/C_f}} \qquad (18)$$

$$\omega_{nv}^2 = k_{vi}/C_f \qquad (19)$$
<figure><img src="image_9.png" /><figcaption>Figure 6. Block diagram of voltage controller loops.</figcaption></figure>

The transfer function of the voltage PI regulator is:

$$K_v(s) = k_{pv} + \frac{k_{iv}}{s} \qquad (16)$$

From the block diagram in Figure 7, the closed-loop transfer function of the voltage loop is as follows:

$$\frac{u_d}{u_d^*} = \frac{1}{C_f} \frac{k_{iv} + k_{pv}s}{s^2 + \frac{k_{pv}}{C_f}s + \frac{k_{iv}}{C_f}} \qquad (17)$$

<figure><img src="image_10.png" /><figcaption>Figure 7. Block diagram of closed-loop control for voltage.</figcaption></figure>

Like the process of designing the current loop controller, the damping factor $\zeta_v$ and the natural oscillation frequency $\omega_{nv}$ of the voltage loop can be obtained as follows:

$$\zeta_v = \frac{k_{pv}/C_f}{2\sqrt{k_{iv}/C_f}} \qquad (18)$$

$$\omega_{nv}^2 = k_{vi}/C_f \qquad (19)$$
Hence, the voltage regulator parameters can be designed as follows:

$$ \begin{cases} k_{iv} = C_f \omega_{nv}^2 \\ k_{pv} = 2 \xi_v C_f \omega_{nv} \end{cases} \qquad (20) $$

$\xi_v$ is chosen equal to 0.707 and $\omega_{nv}$ is chosen as $\omega_s/500$.

## 4. Grid-Forming Inverters Frequency Synchronization and Restoration

### 4.1. Droop Control and Virtual Impedance

In order to equally share the power between the GFM inverters and to ensure the power flow, the reference of the voltage control loop $v_{ref}$ is provided by the decentralized control that comprises the droop controller and the virtual impedance loop. The amplitude and phase of the voltage reference are generated by the droop control according to the measured active and reactive powers. The droop functions can be expressed as follows [34]:

$$ \begin{cases} \omega = \omega_o^* - m_p P \\ v_{od} = V_o^* - n_q Q \\ v_{oq} = 0 \end{cases} \qquad (21) $$

where $\omega_o^*$ and $V_o^*$ are the nominal frequency and voltage references, $m_p$ and $n_q$ are the droop coefficients for the frequency and the voltage, respectively. Notice that the d-axis is aligned with the phase A voltage in a three-phase system, thus the q-component is equal to zero.

The droop coefficients $m_p$ and $n_q$ can be selected based on the following equations:

$$ \begin{cases} m_p = \Delta f / \Delta P \\ n_q = \Delta V / \Delta Q \end{cases} \qquad (22) $$

Being, $\Delta f$ and $\Delta V$ are the maximum frequency and voltage amplitude deviations, respectively. Parameters $\Delta P$ and $\Delta Q$ are the rated active and reactive powers, respectively. The averaged power can be calculated through a low-pass filter to attenuate the high-frequency noises as follows:

$$ \begin{cases} P = \frac{\omega_c}{s+\omega_c} \frac{3}{2} (v_{od} i_{od} + v_{oq} i_{oq}) \\ Q = \frac{\omega_c}{s+\omega_c} \frac{3}{2} (v_{od} i_{oq} - v_{oq} i_{od}) \end{cases} \qquad (23) $$

A virtual impedance loop has been added to the decentralized control to improve the current sharing between the GFM inverters by fixing and normalizing the output impedance of the GFM inverters, which will determine the $P/Q$ power angle/amplitude relationship (inductive droop), thus, avoiding using additional physical inductors/resistors. Figure 8 shows the additional block of the virtual impedance loop; the output impedance of the VSI must be sufficiently inductive. Thus, the additional block of the virtual impedance loop can be expressed as shown below [35]:

$$ \begin{cases} v_{vird} = R_v \cdot i_{od} - \omega L_v \cdot i_{oq} \\ v_{virq} = R_v \cdot i_{oq} + \omega L_v \cdot i_{od} \end{cases} \qquad (24) $$

where $R_v$ and $L_v$ are the virtual resistance and inductance value $v_{vird}$ and $i_{od}$ are the virtual voltage compensation and output current in dq—reference frame, respectively. The closed-loop modeling and the stability analysis of the virtual impedance loop have been studied in previous works [36,37], and will not be addressed here.
Hence, the voltage regulator parameters can be designed as follows:

$$ \begin{cases} k_{iv} = C_f \omega_{nv}^2 \\ k_{pv} = 2 \xi_v C_f \omega_{nv} \end{cases} \qquad (20) $$

$\xi_v$ is chosen equal to 0.707 and $\omega_{nv}$ is chosen as $\omega_s/500$.

## 4. Grid-Forming Inverters Frequency Synchronization and Restoration

### 4.1. Droop Control and Virtual Impedance

In order to equally share the power between the GFM inverters and to ensure the power flow, the reference of the voltage control loop $v_{ref}$ is provided by the decentralized control that comprises the droop controller and the virtual impedance loop. The amplitude and phase of the voltage reference are generated by the droop control according to the measured active and reactive powers. The droop functions can be expressed as follows [34]:

$$ \begin{cases} \omega = \omega_0^* - m_p P \\ v_{od} = V_0^* - n_q Q \\ v_{oq} = 0 \end{cases} \qquad (21) $$

where $\omega_0^*$ and $V_0^*$ are the nominal frequency and voltage references, $m_p$ and $n_q$ are the droop coefficients for the frequency and the voltage, respectively. Notice that the d-axis is aligned with the phase A voltage in a three-phase system, thus the q-component is equal to zero.

The droop coefficients $m_p$ and $n_q$ can be selected based on the following equations:

$$ \begin{cases} m_p = \Delta f / \Delta P \\ n_q = \Delta V / \Delta Q \end{cases} \qquad (22) $$

Being, $\Delta f$ and $\Delta V$ are the maximum frequency and voltage amplitude deviations, respectively. Parameters $\Delta P$ and $\Delta Q$ are the rated active and reactive powers, respectively. The averaged power can be calculated through a low-pass filter to attenuate the high-frequency noises as follows:

$$ \begin{cases} P = \frac{\omega_c}{s+\omega_c} \frac{3}{2} (v_{od} i_{od} + v_{oq} i_{oq}) \\ Q = \frac{\omega_c}{s+\omega_c} \frac{3}{2} (v_{od} i_{oq} - v_{oq} i_{od}) \end{cases} \qquad (23) $$

A virtual impedance loop has been added to the decentralized control to improve the current sharing between the GFM inverters by fixing and normalizing the output impedance of the GFM inverters, which will determine the $P/Q$ power angle/amplitude relationship (inductive droop), thus, avoiding using additional physical inductors/resistors. Figure 8 shows the additional block of the virtual impedance loop; the output impedance of the VSI must be sufficiently inductive. Thus, the additional block of the virtual impedance loop can be expressed as shown below [35]:

$$ \begin{cases} v_{vird} = R_v \cdot i_{od} - \omega L_v \cdot i_{oq} \\ v_{virq} = R_v \cdot i_{oq} + \omega L_v \cdot i_{od} \end{cases} \qquad (24) $$

where $R_v$ and $L_v$ are the virtual resistance and inductance value $v_{vird}$ and $i_{od}$ are the virtual voltage compensation and output current in dq—reference frame, respectively. The closed-loop modeling and the stability analysis of the virtual impedance loop have been studied in previous works [36,37], and will not be addressed here.
<figure><img src="image_10.png" /><figcaption>**Figure 8.** Block diagram of grid-forming inverter controller.</figcaption></figure>

## 4.2. Proposed Synchronization Loop

Before connecting the incoming GFM inverter to the MG, it must be synchronized with the MG, and then the circuit breaker is closed for power sharing. Similarly, to connect the MG to the utility grid for grid-connected operation, a synchronization process is required. The synchronization process provides a seamless connection, which mitigates the current fluctuations and maintains the system's stability. The synchronization is achieved through the proposed synchronization control loop in a synchronous *dq* reference frame, as presented in Figure 9.

<figure><img src="image_11.png" /><figcaption>**Figure 9.** Block diagram of the synchronization control loop for GFM-based MG.</figcaption></figure>
<figure><img src="image_11.png" /><figcaption>**Figure 8.** Block diagram of grid-forming inverter controller.</figcaption></figure>

## 4.2. Proposed Synchronization Loop

Before connecting the incoming GFM inverter to the MG, it must be synchronized with the MG, and then the circuit breaker is closed for power sharing. Similarly, to connect the MG to the utility grid for grid-connected operation, a synchronization process is required. The synchronization process provides a seamless connection, which mitigates the current fluctuations and maintains the system's stability. The synchronization is achieved through the proposed synchronization control loop in a synchronous *dq* reference frame, as presented in Figure 9.

<figure><img src="image_12.png" /><figcaption>**Figure 9.** Block diagram of the synchronization control loop for GFM-based MG.</figcaption></figure>
The main difference between the state-of-the-art synchronization approaches and the proposed one is that the controller in those approaches switches from GFM mode to grid-following mode after connection to the PCC, causing the inverter to lose control over the voltage magnitude and frequency. Indeed, in the proposed approach, the inverter operates in GFM mode even after the synchronization has occurred.

When scheduling grid-connected mode operation, synchronization is released by utilizing the direct and quadrature voltage components Vdqg and VdqMG of both the grid and the MG, respectively. These components are acquired through the Park transformation, employing the phase angle provided by the phase-locked loop (PLL). A comparison between the direct and quadrature components of both MG and the main grid voltages produces signal errors, which serve as input for the proportional-integral (PI) regulators. The PI controllers generate correction signals, Esync and ωsync, to ensure proper synchronization. Similarly, for connecting an incoming VSI to the MG, the direct and quadrature voltage components of the MG and the incoming VSI are used. The synchronization is achieved when the voltage components are equal: VdMG = Vdg and VqMG = Vqg (MG and grid synchronization). To achieve this, a synchronization structure is required.

The synchronization structure includes a three-phase PLL, a low pass filter and a PI controller for both direct and quadrature axes as follows:

$$E_{\text{sync}} = (v_{dg} - v_{dMG}) \frac{\omega_c}{s + \omega_c} \frac{k_{ps}s + k_{is}}{s} \quad (25)$$

$$\omega_{\text{sync}} = (v_{qg} - v_{qMG}) \frac{\omega_c}{s + \omega_c} \frac{k_{ps}s + k_{is}}{s} \quad (26)$$

where $k_{ps}$ and $k_{is}$ are the PI parameters, which are the same for both axes and $\omega_c$ is the filter cut-off frequency. $E_{sync}$ and $\omega_{sync}$ are the synchronization controller output signals to be added for the droop controller functions P-w and Q-v, respectively at each VSI to synchronize itself. Notice that the three-phase PLL is used to extract the phase angle of the utility grid that is used after to transform both grid and MG voltages from the abc reference frame to the dq reference frame.

### 4.3. Frequency and Voltage Restoration

The secondary control is introduced to compensate for the steady-state error caused by the droop control deviations after load connection to meet the grid standard. In this work, a centralized topology is adopted to allow the GFM inverters to compensate for the frequency and voltage set points, as expressed as follows [38]:

$$\begin{aligned} \omega_{\text{rest}} &= k_{pF}(\omega_{\text{MG}}^* - \omega_{\text{MG}}) + k_{iF} \int (\omega_{\text{MG}}^* - \omega_{\text{MG}})dt \\ E_{\text{rest}} &= k_{pE}(E_{\text{MG}}^* - E_{\text{MG}}) + k_{iE} \int (E_{\text{MG}}^* - E_{\text{MG}})dt \end{aligned} \quad (27)$$

where $k_{pF}$, $k_{iF}$, $k_{pE}$, and $k_{iE}$ are the control gains of the secondary control regulators. Notice that the output must be saturated to avoid exceeding the maximum and minimal limits of the voltage and frequency drops.

The entire GFM control system, including inner loops, virtual impedance, droop control, and secondary control, is depicted in Figure 10.

#### 4.3.1. Frequency Restoration

To design the frequency restoration controller gains and to ensure system stability, the model depicted in Figure 11 is used. It consists of three main blocsk; the droop control block to determine the MG frequency, a reduced first-order PLL model to measure the MG frequency, and the secondary control compensator Gfsec(s) associated with a delay transfer function Gd(s) to mimic the communication line delay. From the developed model in Figure 10, the transfer function can be obtained as follows:
The main difference between the state-of-the-art synchronization approaches and the proposed one is that the controller in those approaches switches from GFM mode to grid-following mode after connection to the PCC, causing the inverter to lose control over the voltage magnitude and frequency. Indeed, in the proposed approach, the inverter operates in GFM mode even after the synchronization has occurred.

When scheduling grid-connected mode operation, synchronization is released by utilizing the direct and quadrature voltage components Vdqg and VdqMG of both the grid and the MG, respectively. These components are acquired through the Park transformation, employing the phase angle provided by the phase-locked loop (PLL). A comparison between the direct and quadrature components of both MG and the main grid voltages produces signal errors, which serve as input for the proportional-integral (PI) regulators. The PI controllers generate correction signals, Esync and ωsync, to ensure proper synchronization. Similarly, for connecting an incoming VSI to the MG, the direct and quadrature voltage components of the MG and the incoming VSI are used. The synchronization is achieved when the voltage components are equal: VdMG = Vdg and VqMG = Vqg (MG and grid synchronization). To achieve this, a synchronization structure is required.

The synchronization structure includes a three-phase PLL, a low pass filter and a PI controller for both direct and quadrature axes as follows:

$$E_{\text{sync}} = (v_{dg} - v_{dMG}) \frac{\omega_c}{s + \omega_c} \frac{k_{ps}s + k_{is}}{s} \quad (25)$$

$$\omega_{\text{sync}} = (v_{qg} - v_{qMG}) \frac{\omega_c}{s + \omega_c} \frac{k_{ps}s + k_{is}}{s} \quad (26)$$

where $k_{ps}$ and $k_{is}$ are the PI parameters, which are the same for both axes and $\omega_c$ is the filter cut-off frequency. $E_{sync}$ and $\omega_{sync}$ are the synchronization controller output signals to be added for the droop controller functions P-w and Q-v, respectively at each VSI to synchronize itself. Notice that the three-phase PLL is used to extract the phase angle of the utility grid that is used after to transform both grid and MG voltages from the abc reference frame to the dq reference frame.

### 4.3. Frequency and Voltage Restoration

The secondary control is introduced to compensate for the steady-state error caused by the droop control deviations after load connection to meet the grid standard. In this work, a centralized topology is adopted to allow the GFM inverters to compensate for the frequency and voltage set points, as expressed as follows [38]:

$$\begin{aligned} \omega_{\text{rest}} &= k_{pF}(\omega_{\text{MG}}^* - \omega_{\text{MG}}) + k_{iF} \int (\omega_{\text{MG}}^* - \omega_{\text{MG}})dt \\ E_{\text{rest}} &= k_{pE}(E_{\text{MG}}^* - E_{\text{MG}}) + k_{iE} \int (E_{\text{MG}}^* - E_{\text{MG}})dt \end{aligned} \quad (27)$$

where $k_{pF}$, $k_{iF}$, $k_{pE}$, and $k_{iE}$ are the control gains of the secondary control regulators. Notice that the output must be saturated to avoid exceeding the maximum and minimal limits of the voltage and frequency drops.

The entire GFM control system, including inner loops, virtual impedance, droop control, and secondary control, is depicted in Figure 10.

#### 4.3.1. Frequency Restoration

To design the frequency restoration controller gains and to ensure system stability, the model depicted in Figure 11 is used. It consists of three main blocsk; the droop control block to determine the MG frequency, a reduced first-order PLL model to measure the MG frequency, and the secondary control compensator Gfsec(s) associated with a delay transfer function Gd(s) to mimic the communication line delay. From the developed model in Figure 10, the transfer function can be obtained as follows:
$$ \omega_{MG} = \frac{G_{f \sec}(s) G_d(s)}{1 + G_{f \sec}(s) G_d(s) G_{PLL}(s)} \omega_{MG}^* - \frac{m G_{LPF}(s)}{1 + G_{f \sec}(s) G_d(s) G_{PLL}(s)} P \quad (28) $$

where the transfer function of each bloc is as follows:

$$ \begin{aligned} G_{f \sec}(s) &= \frac{k_{pF}s + k_{iF}}{s}, \\ G_{PLL}(s) &= \tau / (s + \tau), \\ G_d(s) &= \frac{1}{s + 1.5\omega_s}, \\ G_{LPF}(s) &= \frac{\omega_c}{s + \omega_c}, \end{aligned} $$

<figure><img src="image_12.png" /><figcaption>Figure 10. Block diagram of the entire control system of the MG.</figcaption></figure>

Consequently, the closed loop transfer function P to $\omega_{MG}$ can be obtained as follows:

$$ \omega_{MG} = - \frac{m \omega_c s (s^2 + sa + b)}{s^4 + s^3 c + s^2 d + se + f} P \quad (29) $$
$$ \omega_{MG} = \frac{G_{f\sec}(s)G_d(s)}{1 + G_{f\sec}(s)G_d(s)G_{PLL}(s)} \omega_{MG}^* - \frac{mG_{LPF}(s)}{1 + G_{f\sec}(s)G_d(s)G_{PLL}(s)} P \quad (28) $$

where the transfer function of each bloc is as follows:

$$ 
\begin{aligned}
G_{f\sec}(s) &= \frac{k_{pF}s + k_{iF}}{s}, \\
G_{PLL}(s) &= \tau/(s + \tau), \\
G_d(s) &= \frac{1}{s + 1.5\omega_s}, \\
G_{LPF}(s) &= \frac{\omega_c}{s + \omega_c},
\end{aligned}
 $$

<figure><img src="image_13.png" /><figcaption>Figure 10. Block diagram of the entire control system of the MG.</figcaption></figure>

Consequently, the closed loop transfer function P to $\omega_{MG}$ can be obtained as follows:

$$ \omega_{MG} = - \frac{m\omega_c s(s^2 + sa + b)}{s^4 + s^3 c + s^2 d + se + f} P \quad (29) $$
With the following parameters:

$$ 
\begin{aligned}
a &= \tau + 1.5T_s \\
b &= 1.5T_s \tau \\
c &= 1.5T_s + \omega_c + \tau \\
d &= \omega_c(1.5T_s + \tau) + \tau(1.5T_s + k_{pF}) \\
e &= \tau(\omega_c(k_{pF} + 1.5T_s) + k_{iF}) \\
f &= \tau k_{iF} \omega_c
\end{aligned}
$$

<figure><img src="image_13.png" /><figcaption>Figure 11. Block diagram of the frequency restoration control.</figcaption></figure>

Figure 12 depicts the step response of the model in (29) for a P step change. This model allows us to properly adjust the control parameters of the secondary control and study the limitations of the communications delay.

<figure><img src="image_14.png" /><figcaption>Figure 12. Example of transient response for frequency restoration.</figcaption></figure>

### 4.3.2. Amplitude Restoration

A similar method has been followed to adjust the voltage secondary controller parameters. The obtained block diagram, in this case, is depicted in Figure 13.
With the following parameters:

$$ 
\begin{aligned}
a &= \tau + 1.5T_s \\
b &= 1.5T_s \tau \\
c &= 1.5T_s + \omega_c + \tau \\
d &= \omega_c(1.5T_s + \tau) + \tau(1.5T_s + k_{pF}) \\
e &= \tau(\omega_c(k_{pF} + 1.5T_s) + k_{iF}) \\
f &= \tau k_{iF} \omega_c
\end{aligned}
$$

<figure><img src="image_14.png" /><figcaption>Figure 11. Block diagram of the frequency restoration control.</figcaption></figure>

Figure 12 depicts the step response of the model in (29) for a P step change. This model allows us to properly adjust the control parameters of the secondary control and study the limitations of the communications delay.

<figure><img src="image_15.png" /><figcaption>Figure 12. Example of transient response for frequency restoration.</figcaption></figure>

### 4.3.2. Amplitude Restoration

A similar method has been followed to adjust the voltage secondary controller parameters. The obtained block diagram, in this case, is depicted in Figure 13.
<figure><img src="image_15.png" /><figcaption>Figure 13. Block diagram of the amplitude restoration control.</figcaption></figure>

By the same procedure, the closed loop voltage dynamic model is as follows:

$$E_{MG}^* = \frac{G_{E \sec}(s)G_d(s)}{1 + G_{E \sec}(s)G_d(s)} E_{\sec} - \frac{nG_{LPF}(s)}{1 + G_{E \sec}(s)G_d(s)} Q \quad (30)$$

Being $G_{E \sec}(s)$ is the voltage compensator.

$$G_{E \sec}(s) = \frac{k_{pE}s + k_{iE}}{s} \quad (31)$$

Thus, the closed-loop transfer function of the voltage secondary controller from Q to $E_{MG}$ can be expressed as follows:

$$E_{MG} = -\frac{n\omega_c(s + 1.5)}{s^3 + as^2 + bs + c} Q \quad (32)$$

$$\begin{aligned} a &= k_{pE} + \omega_c + 1.5 \\ b &= \omega_c(k_{pE} + 1.5) + k_{iE} \\ c &= k_{iE}\omega_c \end{aligned}$$

By using this model, the dynamics of the system for a step change in Q can be obtained, as shown in Figure 14.

<figure><img src="image_16.png" /><figcaption>Figure 14. Transient response for amplitude restoration.</figcaption></figure>

## 5. Simulation Results

To implement and test the feasibility of the theoretical analysis developed above, a GFM inverters-based MG model was built in Matlab-Simulink, as illustrated in Figure 10. The used parameters are listed in Table A1 in Appendix A. The MG model consists of two
<figure><img src="image_16.png" /><figcaption>Figure 13. Block diagram of the amplitude restoration control.</figcaption></figure>

By the same procedure, the closed loop voltage dynamic model is as follows:

$$E_{MG}^* = \frac{G_{E \sec}(s)G_d(s)}{1 + G_{E \sec}(s)G_d(s)} E_{sec} - \frac{nG_{LPF}(s)}{1 + G_{E \sec}(s)G_d(s)} Q \quad (30)$$

Being $G_{E \sec}(s)$ is the voltage compensator.

$$G_{E \sec}(s) = \frac{k_{pE}s + k_{iE}}{s} \quad (31)$$

Thus, the closed-loop transfer function of the voltage secondary controller from Q to $E_{MG}$ can be expressed as follows:

$$E_{MG} = - \frac{n\omega_c(s + 1.5)}{s^3 + as^2 + bs + c} Q \quad (32)$$

$$\begin{align*} a &= k_{pE} + \omega_c + 1.5 \\ b &= \omega_c(k_{pE} + 1.5) + k_{iE} \\ c &= k_{iE}\omega_c \end{align*}$$

By using this model, the dynamics of the system for a step change in Q can be obtained, as shown in Figure 14.

<figure><img src="image_17.png" /><figcaption>Figure 14. Transient response for amplitude restoration.</figcaption></figure>

## 5. Simulation Results

To implement and test the feasibility of the theoretical analysis developed above, a GFM inverters-based MG model was built in Matlab-Simulink, as illustrated in Figure 10. The used parameters are listed in Table A1 in Appendix A. The MG model consists of two
VSIs interfaced using an LCL filter and connected to each other through a line. These GFM inverters supply a local load.

## 5.1. Voltage and Current Waveforms

Figures 15 and 16 illustrate the voltage and output current waveforms of the GFM inverters supplying a local load. Figure 16 further depicts the dynamic response of the voltage and current loops in the *dq* reference frame for both axes. Notably, the voltage controller achieves a settling time of 0.005 s while maintaining a steady-state error at its minimum of 0.1 V. Similarly, the current controller ensures a settling time of 0.006 s with a steady-state error of 10⁻⁵.

<figure><img src="image_17.png" /><figcaption>Figure 15. Grid-forming controlled inverter (a) output voltage and (b) current waveforms.</figcaption></figure>

<figure><img src="image_18.png" /><figcaption>Figure 16. Inner loops voltage and current d- and q-axes components.</figcaption></figure>
VSIs interfaced using an LCL filter and connected to each other through a line. These GFM inverters supply a local load.

### 5.1. Voltage and Current Waveforms

Figures 15 and 16 illustrate the voltage and output current waveforms of the GFM inverters supplying a local load. Figure 16 further depicts the dynamic response of the voltage and current loops in the *dq* reference frame for both axes. Notably, the voltage controller achieves a settling time of 0.005 s while maintaining a steady-state error at its minimum of 0.1 V. Similarly, the current controller ensures a settling time of 0.006 s with a steady-state error of $10^{-5}$.

<figure><img src="image_18.png" /><figcaption>Figure 15. Grid-forming controlled inverter (a) output voltage and (b) current waveforms.</figcaption></figure>

<figure><img src="image_19.png" /><figcaption>Figure 16. Inner loops voltage and current d- and q-axes components.</figcaption></figure>
Figure 17 illustrates the output currents of the two-paralleled GFM inverters controlled using droop control in stand-alone mode. Initially, both inverters shared the load equally. At $t = 1$ s, the second inverter is disconnected, and the remaining inverter continues to supply the load, ensuring uninterrupted power supply even if one inverter is tripped. This test shows the robustness of droop control in power-sharing among inverters without the need for communication, thereby enhancing system reliability.

<figure><img src="image_19.png" /><figcaption>**Figure 17.** Transient response of the output currents (a) VSI1 (b) VSI2, when the VSI 1 is disconnected at $t = 1$ s.</figcaption></figure>

In Figure 18, the spectrum of the voltage at the PCC is presented. The system employing the proposed controller demonstrates a low total harmonic distortion (THD) of 1.46%, indicative of improved power quality of the output voltage.

<figure><img src="image_20.png" /><figcaption>**Figure 18.** Spectrum of the voltage at the point of common coupling.</figcaption></figure>

## 5.2. Inverters Synchronization to the MG

The process of connecting an incoming GFM inverter into the MG involves a crucial synchronization step to ensure seamless integration, as depicted in Figure 19. Based on the proposed synchronization approach, Figure 19a illustrates the synchronization process by displaying the frequency profiles of both the MG and the incoming GFM inverter. At $t = 0.5$ s, the synchronization process is initiated. During this phase, the incoming
Figure 17 illustrates the output currents of the two-paralleled GFM inverters controlled using droop control in stand-alone mode. Initially, both inverters shared the load equally. At $t = 1$ s, the second inverter is disconnected, and the remaining inverter continues to supply the load, ensuring uninterrupted power supply even if one inverter is tripped. This test shows the robustness of droop control in power-sharing among inverters without the need for communication, thereby enhancing system reliability.

<figure><img src="image_20.png" /><figcaption>**Figure 17.** Transient response of the output currents (a) VSI1 (b) VSI2, when the VSI 1 is disconnected at $t = 1$ s.</figcaption></figure>

In Figure 18, the spectrum of the voltage at the PCC is presented. The system employing the proposed controller demonstrates a low total harmonic distortion (THD) of 1.46%, indicative of improved power quality of the output voltage.

<figure><img src="image_21.png" /><figcaption>**Figure 18.** Spectrum of the voltage at the point of common coupling.</figcaption></figure>

## 5.2. Inverters Synchronization to the MG

The process of connecting an incoming GFM inverter into the MG involves a crucial synchronization step to ensure seamless integration, as depicted in Figure 19. Based on the proposed synchronization approach, Figure 19a illustrates the synchronization process by displaying the frequency profiles of both the MG and the incoming GFM inverter. At $t = 0.5$ s, the synchronization process is initiated. During this phase, the incoming
inverter undergoes adjustments to match its frequency and its phase with that of the MG. These adjustments can lead to temporary frequency fluctuations in the incoming GFM inverter. These fluctuations are part of the synchronization procedure, and they are carefully managed to minimize any disruption to the MG’s operation. The critical moment arrives at $t = 2$ s when synchronization is successfully achieved. At this point, the incoming inverter’s frequency is perfectly aligned with that of the MG. Thus, the incoming GFM inverter can be safely connected to the MG. Upon connection, the incoming inverter immediately begins sharing active power within the MG, as can be seen in Figure 19b. This synchronization and subsequent power-sharing ensure that the MG is efficiently operating, maintaining stable frequency, and efficiently distributing electrical power to meet the connected loads power demand.

<figure><img src="image_21.png" /><figcaption>**Figure 19.** Synchronization process of inverters (a) frequency of two sides (b) Active power sharing between the two GFM inverters.</figcaption></figure>

### 5.3. *Frequency and Voltage Restoration Performance*

This test demonstrates how the secondary control restores the voltage and frequency of the GFM-MG to switch to grid-connected mode. As can be seen in Figure 20a, the secondary control is activated at $t = 0.5$ s and the system starts recovering the frequency to its nominal value. After that the system subjected load changes at $t = 2$ s and $t = 4$ s. It
inverter undergoes adjustments to match its frequency and its phase with that of the MG. These adjustments can lead to temporary frequency fluctuations in the incoming GFM inverter. These fluctuations are part of the synchronization procedure, and they are carefully managed to minimize any disruption to the MG’s operation. The critical moment arrives at $t = 2$ s when synchronization is successfully achieved. At this point, the incoming inverter’s frequency is perfectly aligned with that of the MG. Thus, the incoming GFM inverter can be safely connected to the MG. Upon connection, the incoming inverter immediately begins sharing active power within the MG, as can be seen in Figure 19b. This synchronization and subsequent power-sharing ensure that the MG is efficiently operating, maintaining stable frequency, and efficiently distributing electrical power to meet the connected loads power demand.

<figure><img src="image_22.png" /><figcaption>**Figure 19.** Synchronization process of inverters (a) frequency of two sides (b) Active power sharing between the two GFM inverters.</figcaption></figure>

### 5.3. *Frequency and Voltage Restoration Performance*

This test demonstrates how the secondary control restores the voltage and frequency of the GFM-MG to switch to grid-connected mode. As can be seen in Figure 20a, the secondary control is activated at $t = 0.5$ s and the system starts recovering the frequency to its nominal value. After that the system subjected load changes at $t = 2$ s and $t = 4$ s. It
can be noticed that the secondary control acted for both sudden changes and eliminated the deviation. Similarly, when the inverter two is disconnected at t = 6 s, the secondary control is quickly acted, and the frequency is kept at its set point after 2 s. It is clear from Figure 20b that the active power sharing among GFM inverters was not affected by the action of the secondary control.

<figure><img src="image_22.png" /><figcaption>**Figure 20.** Simulation results during load step changes (t = 2 s and t = 4 s) and sudden disconnection of inverter 2 (t = 6 s): (a) Frequency restoration (b) Active and reactive powers.</figcaption></figure>

5.4. *Impact of Communication Time Delays*

Communication infrastructures play a critical role in GFM-MG operation by providing and exchanging the data between the MG central controller (MGCC) and the DG units local controllers. In secondary control, the voltage and frequency correction signals are sent using the MGCC through a low-bandwidth communication infrastructure to restore the deviations caused by the primary control. For this, the communication delay effect on the secondary control has been investigated for different time delay amounts. Figure 21 shows the voltage and frequency during the restoration process. It is clear that the communication delays cause oscillations in both voltage and frequency, and the increase of the time delay results in high oscillations up to 300 ms where the system stability becomes threatened.
can be noticed that the secondary control acted for both sudden changes and eliminated the deviation. Similarly, when the inverter two is disconnected at t = 6 s, the secondary control is quickly acted, and the frequency is kept at its set point after 2 s. It is clear from Figure 20b that the active power sharing among GFM inverters was not affected by the action of the secondary control.

<figure><img src="image_23.png" /><figcaption>**Figure 20.** Simulation results during load step changes (t = 2 s and t = 4 s) and sudden disconnection of inverter 2 (t = 6 s): (a) Frequency restoration (b) Active and reactive powers.</figcaption></figure>

5.4. *Impact of Communication Time Delays*

Communication infrastructures play a critical role in GFM-MG operation by providing and exchanging the data between the MG central controller (MGCC) and the DG units local controllers. In secondary control, the voltage and frequency correction signals are sent using the MGCC through a low-bandwidth communication infrastructure to restore the deviations caused by the primary control. For this, the communication delay effect on the secondary control has been investigated for different time delay amounts. Figure 21 shows the voltage and frequency during the restoration process. It is clear that the communication delays cause oscillations in both voltage and frequency, and the increase of the time delay results in high oscillations up to 300 ms where the system stability becomes threatened.
<figure><img src="image_23.png" /><figcaption>**Figure 21.** Secondary frequency dynamics under different communication delays (from top to bottom 150 ms until 300 ms).</figcaption></figure>

5.5. *Synchronization with the Main Grid*

Synchronization is necessary for the transition from islanded mode to grid-connected mode to avoid high current fluctuations and equipment damage. The synchronization process between the DG unit and the main grid is illustrated in Figure 22a,b. As can be seen at the start of the synchronization the voltage waveforms are not synchronized yet and the voltage difference between the MG and the grid is high, during the synchronization process the voltage waveforms started becoming closer to each other as shown by Figure 22b and the voltage difference starts decreasing as depicted in Figure 22a. At the end of the synchronization process, the voltage waveforms are matched and the voltage error value is decreased to zero, which ensures a seamless transition mode. It is worth to notice that the synchronization process has no impact on the system stability since the bandwidth is much more reduced.
<figure><img src="image_24.png" /><figcaption>**Figure 21.** Secondary frequency dynamics under different communication delays (from top to bottom 150 ms until 300 ms).</figcaption></figure>

5.5. *Synchronization with the Main Grid*

Synchronization is necessary for the transition from islanded mode to grid-connected mode to avoid high current fluctuations and equipment damage. The synchronization process between the DG unit and the main grid is illustrated in Figure 22a,b. As can be seen at the start of the synchronization the voltage waveforms are not synchronized yet and the voltage difference between the MG and the grid is high, during the synchronization process the voltage waveforms started becoming closer to each other as shown by Figure 22b and the voltage difference starts decreasing as depicted in Figure 22a. At the end of the synchronization process, the voltage waveforms are matched and the voltage error value is decreased to zero, which ensures a seamless transition mode. It is worth to notice that the synchronization process has no impact on the system stability since the bandwidth is much more reduced.
<figure><img src="image_24.png" /><figcaption>Figure 22. Synchronization process (a) voltage difference (b) Grid and MG voltages.</figcaption></figure>

## 6. Discussion

The simulation results provide a comprehensive overview of the proposed control strategies' effectiveness. The GFM inverter exhibits a low total harmonic distortion (THD) of 1.46%, enhancing the power quality of the output voltage. In stand-alone mode, two paralleled GFM inverters controlled with droop control share the load seamlessly, demonstrating the system's reliability. The synchronization process is crucial for integrating an incoming inverter into the MG. It ensures the successful alignment of the frequency and phase, facilitating a smooth connection. Moreover, secondary control is proved to be vital in restoring MG voltage and frequency, efficiently managing load changes and inverters disconnection. Communication delays are identified as potential sources of voltage and frequency oscillations, threatening system stability. Lastly, the synchronization between the Distributed Generation (DG) unit and the main grid illustrates a gradual and stable transition from islanded to grid-connected mode. Overall, the proposed control strategies exhibit robust performance, ensuring stability and efficiency across diverse operating scenarios. Table 1 summarizes the main simulation results of the proposed control approach for frequency synchronization and amplitude restoration. However, the proposed control approach exhibit some limitations, notably a substantial frequency drop during the synchronization process, increasing the synchronization time. Additionally, the dynamic behavior of the voltage and current loops, assuming they are faster than the outer loop, is proven to be accurate for high-bandwidth power converters in low-power applications like MG and UPS. Nevertheless, in high-power scenarios such as transmission systems, the control bandwidth constraints imposed by the switching
<figure><img src="image_25.png" /><figcaption>**Figure 22.** Synchronization process (a) voltage difference (b) Grid and MG voltages.</figcaption></figure>

## 6. Discussion

The simulation results provide a comprehensive overview of the proposed control strategies' effectiveness. The GFM inverter exhibits a low total harmonic distortion (THD) of 1.46%, enhancing the power quality of the output voltage. In stand-alone mode, two paralleled GFM inverters controlled with droop control share the load seamlessly, demonstrating the system's reliability. The synchronization process is crucial for integrating an incoming inverter into the MG. It ensures the successful alignment of the frequency and phase, facilitating a smooth connection. Moreover, secondary control is proved to be vital in restoring MG voltage and frequency, efficiently managing load changes and inverters disconnection. Communication delays are identified as potential sources of voltage and frequency oscillations, threatening system stability. Lastly, the synchronization between the Distributed Generation (DG) unit and the main grid illustrates a gradual and stable transition from islanded to grid-connected mode. Overall, the proposed control strategies exhibit robust performance, ensuring stability and efficiency across diverse operating scenarios. Table 1 summarizes the main simulation results of the proposed control approach for frequency synchronization and amplitude restoration. However, the proposed control approach exhibit some limitations, notably a substantial frequency drop during the synchronization process, increasing the synchronization time. Additionally, the dynamic behavior of the voltage and current loops, assuming they are faster than the outer loop, is proven to be accurate for high-bandwidth power converters in low-power applications like MG and UPS. Nevertheless, in high-power scenarios such as transmission systems, the control bandwidth constraints imposed by the switching
frequency can result in delayed responses, decreased stability regions, and potential instability issues in grid-connected mode, as detailed in our analysis. Addressing and mitigating these limitations will be a priority for future works.

<table><caption>**Table 1.** Simulation results: Time domain and steady-state specifications of the proposed control diagram.</caption><thead><tr><th>Controller Type</th><th>Load Step</th><th>Rise Time (s)</th><th>Overshoot Ratio (%)</th><th>Settling Time (s)</th><th>Steady-State Error</th></tr></thead><tbody><tr><td>d-axis voltage controller</td><td rowspan="4">4500 W<br>500 VAR</td><td>0.0002</td><td>4.4%</td><td>0.005</td><td>10<sup>-1</sup></td></tr><tr><td>q-axis voltage controller</td><td>0.0005</td><td>0</td><td>0.004</td><td>10<sup>-1</sup></td></tr><tr><td>d-axis current controller</td><td>0.002</td><td>23%</td><td>0.006</td><td>10<sup>-5</sup></td></tr><tr><td>q-axis current controller</td><td>0.001</td><td>10%</td><td>0.006</td><td>10<sup>-2</sup></td></tr><tr><td>Type of disturbance</td><td>SC enabled</td><td>Load step</td><td>Inverter tripping event</td><td>Steady-State Error</td><td></td></tr><tr><td>Restoration Time (s)</td><td>1.5</td><td>1</td><td>1</td><td></td><td>10<sup>-10</sup></td></tr><tr><td>Synchronization</td><td>Undershoot Ratio (%)</td><td>Overshoot Ratio (%)</td><td>Settling Time (s)</td><td>Steady-State Error</td><td></td></tr><tr><td>Incoming inverter<br>frequency deviation</td><td>3%</td><td>1%</td><td>0.8</td><td></td><td>10<sup>-9</sup></td></tr></tbody></table>

## 7. Conclusions

This paper focused on the modeling, analysis, and design of GFM inverters within a MG. The islanded operation of GFM inverters is investigated. The droop control is adopted as a decentralized method, and a secondary control for frequency and voltage restoration is developed as centralized control loops. Moreover, this paper proposes a synchronization loop to connect incoming inverters to the MG. The successful application of this decentralized approach highlights the feasibility and accuracy of deploying GFM inverters in the distribution network without the need for communication. The simulation results highlight the robustness and efficiency of the implemented control strategies. The voltage controller, ensuring an impressive settling time of 0.005 s, maintains a minimal steady-state error of 0.1 V. Similarly, the current controller exhibits efficient dynamics, achieving a settling time of 0.006 s and a low steady-state error of 10<sup>-5</sup>. The designed controller contributes to the system's overall quality by minimizing total harmonic distortion (THD) to 1.46%, thereby enhancing the power quality of the output voltage. Moreover, the system displays interesting resilience during dynamic load conditions and tripping events, demonstrating a quick restoration time of 1 s with a minimal steady-state error of 10<sup>-10</sup>. The synchronization process further validates the system's reliability, with incoming inverters achieving synchronization in just 0.8 s. The MG synchronization with the main grid is accomplished in 3 s, maintaining a steady-state error ratio of 10<sup>-9</sup>. These simulation results not only confirm the accuracy of the assumed droop settings but also shows the responsive droop behavior to PQ load variations. The droop control methodology effectively meets load demand with precision, ensuring equitable power sharing between GFM inverters. Additionally, the proposed synchronization loop facilitates a seamless transition for incoming inverters without the need for communication between power generation units. This integrated approach demonstrates the potential for practical implementation, offering a reliable and efficient solution for MG operation with enhanced stability, power quality, and synchronization capabilities. Thus, these methods provide decentralized power sharing and avoid transients and undesired dynamics in the MG.

Future research possibilities include examining GFM inverters at distribution and transmission levels, addressing aspects such as hardware implementation, energy storage, system protection, fault ride-through capability, stability analysis, and economic dispatching. Furthermore, exploring the intricate dynamics between a GFM inverter and multiple grid-following inverters within a MG offers an additional avenue for future investigations.
frequency can result in delayed responses, decreased stability regions, and potential instability issues in grid-connected mode, as detailed in our analysis. Addressing and mitigating these limitations will be a priority for future works.

<table><caption>**Table 1.** Simulation results: Time domain and steady-state specifications of the proposed control diagram.</caption><thead><tr><th>Controller Type</th><th>Load Step</th><th>Rise Time (s)</th><th>Overshoot Ratio (%)</th><th>Settling Time (s)</th><th>Steady-State Error</th></tr></thead><tbody><tr><td>d-axis voltage controller</td><td rowspan="4">4500 W<br>500 VAR</td><td>0.0002</td><td>4.4%</td><td>0.005</td><td>10<sup>-1</sup></td></tr><tr><td>q-axis voltage controller</td><td>0.0005</td><td>0</td><td>0.004</td><td>10<sup>-1</sup></td></tr><tr><td>d-axis current controller</td><td>0.002</td><td>23%</td><td>0.006</td><td>10<sup>-5</sup></td></tr><tr><td>q-axis current controller</td><td>0.001</td><td>10%</td><td>0.006</td><td>10<sup>-2</sup></td></tr><tr><td>Type of disturbance</td><td>SC enabled</td><td>Load step</td><td>Inverter tripping event</td><td>Steady-State Error</td><td></td></tr><tr><td>Restoration Time (s)</td><td>1.5</td><td>1</td><td>1</td><td>10<sup>-10</sup></td><td></td></tr><tr><td>Synchronization</td><td>Undershoot Ratio (%)</td><td>Overshoot Ratio (%)</td><td>Settling Time (s)</td><td>Steady-State Error</td><td></td></tr><tr><td>Incoming inverter<br>frequency deviation</td><td>3%</td><td>1%</td><td>0.8</td><td>10<sup>-9</sup></td><td></td></tr></tbody></table>

## 7. Conclusions

This paper focused on the modeling, analysis, and design of GFM inverters within a MG. The islanded operation of GFM inverters is investigated. The droop control is adopted as a decentralized method, and a secondary control for frequency and voltage restoration is developed as centralized control loops. Moreover, this paper proposes a synchronization loop to connect incoming inverters to the MG. The successful application of this decentralized approach highlights the feasibility and accuracy of deploying GFM inverters in the distribution network without the need for communication. The simulation results highlight the robustness and efficiency of the implemented control strategies. The voltage controller, ensuring an impressive settling time of 0.005 s, maintains a minimal steady-state error of 0.1 V. Similarly, the current controller exhibits efficient dynamics, achieving a settling time of 0.006 s and a low steady-state error of 10<sup>-5</sup>. The designed controller contributes to the system's overall quality by minimizing total harmonic distortion (THD) to 1.46%, thereby enhancing the power quality of the output voltage. Moreover, the system displays interesting resilience during dynamic load conditions and tripping events, demonstrating a quick restoration time of 1 s with a minimal steady-state error of 10<sup>-10</sup>. The synchronization process further validates the system's reliability, with incoming inverters achieving synchronization in just 0.8 s. The MG synchronization with the main grid is accomplished in 3 s, maintaining a steady-state error ratio of 10<sup>-9</sup>. These simulation results not only confirm the accuracy of the assumed droop settings but also shows the responsive droop behavior to PQ load variations. The droop control methodology effectively meets load demand with precision, ensuring equitable power sharing between GFM inverters. Additionally, the proposed synchronization loop facilitates a seamless transition for incoming inverters without the need for communication between power generation units. This integrated approach demonstrates the potential for practical implementation, offering a reliable and efficient solution for MG operation with enhanced stability, power quality, and synchronization capabilities. Thus, these methods provide decentralized power sharing and avoid transients and undesired dynamics in the MG.

Future research possibilities include examining GFM inverters at distribution and transmission levels, addressing aspects such as hardware implementation, energy storage, system protection, fault ride-through capability, stability analysis, and economic dispatching. Furthermore, exploring the intricate dynamics between a GFM inverter and multiple grid-following inverters within a MG offers an additional avenue for future investigations.
**Author Contributions:** Conceptualization, I.B., E.E., A.H., Y.D., A.S., A.E.M.B. and B.K.; methodology, I.B., E.E., A.H., Y.D., A.S., A.E.M.B. and B.K.; software, I.B., E.E., A.H. and Y.D.; validation, I.B., E.E., A.H., Y.D., A.S., A.E.M.B. and B.K.; formal analysis, I.B., E.E., A.H., Y.D., A.S., A.E.M.B. and B.K.; investigation, I.B., E.E., A.H., Y.D., A.S., A.E.M.B. and B.K.; resources, I.B., E.E., A.H. and Y.D.; data curation, I.B.; writing—original draft preparation, I.B.; writing—review and editing, E.E., A.H., Y.D., A.S., A.E.M.B. and B.K.; supervision, E.E., A.H., Y.D., A.S. and A.E.M.B.; funding acquisition, E.E., A.H. and Y.D. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Data Availability Statement:** Data are contained within the article.

**Conflicts of Interest:** The authors declare no conflict of interest.

## Abbreviations

The following abbreviations are used in this manuscript:

<table><tr><td>GFM</td><td>Grid-forming</td></tr><tr><td>MG</td><td>Microgrid</td></tr><tr><td>VSI</td><td>Voltage source inverters</td></tr><tr><td>SG</td><td>Synchronous generators</td></tr><tr><td>DG</td><td>Distributed generation</td></tr><tr><td>PLL</td><td>Phase-locked loop</td></tr><tr><td>THD</td><td>Total harmonic distortion</td></tr><tr><td>PWM</td><td>Pulse width modulation</td></tr><tr><td>PCC</td><td>Point of common coupling</td></tr><tr><td>MGCC</td><td>Microgrid central controller</td></tr><tr><td>UPS</td><td>Uninterruptible power supply</td></tr></table>

## Appendix A

<table><caption>Table A1. Microgrid parameters.</caption><thead><tr><th colspan="4">Inverter Parameters (10 kVA Rating)</th></tr><tr><th>Parameter</th><th>Value</th><th>Parameter</th><th>Value</th></tr></thead><tbody><tr><td>fs</td><td>8 kHz</td><td>C<sub>f</sub></td><td>50 uF</td></tr><tr><td>L<sub>f</sub></td><td>1.35 mH</td><td>r<sub>f</sub></td><td>0.1 Ω</td></tr><tr><td>L<sub>c</sub></td><td>0.35 mH</td><td>r<sub>c</sub></td><td>0.03 Ω</td></tr><tr><th colspan="4">Line and Load parameters</th></tr><tr><td>rline</td><td>0.1 Ω</td><td>rload</td><td>25 Ω</td></tr><tr><td>Lline</td><td>0.35 mH</td><td>Lload</td><td>10<sup>-5</sup> mH</td></tr><tr><th colspan="4">Primary control parameters</th></tr><tr><td>m<sub>p</sub></td><td>9.4 × 10<sup>-5</sup> (=0.3% droop)</td><td>n<sub>q</sub></td><td>1.3 × 10<sup>-3</sup> (=2% droop)</td></tr><tr><td>Wn</td><td>314.16 rad/s</td><td>V<sub>n</sub></td><td>311 V</td></tr><tr><td>Wc</td><td>31.41 rad/s</td><td></td><td></td></tr><tr><td>R<sub>v</sub></td><td>0.0370</td><td>L<sub>v</sub></td><td>0.0200</td></tr><tr><th colspan="4">Voltage and current Controller parameters</th></tr><tr><td>Voltage controller</td><td></td><td>Current controller</td><td></td></tr><tr><td>K<sub>pv</sub></td><td>0.037</td><td>K<sub>iv</sub></td><td>393</td></tr><tr><td>K<sub>pc</sub></td><td>10.5</td><td>K<sub>ic</sub></td><td>16 × 10<sup>3</sup></td></tr><tr><td>F</td><td>0.75</td><td></td><td></td></tr></tbody></table>
**Author Contributions:** Conceptualization, I.B., E.E., A.H., Y.D., A.S., A.E.M.B. and B.K.; methodology, I.B., E.E., A.H., Y.D., A.S., A.E.M.B. and B.K.; software, I.B., E.E., A.H. and Y.D.; validation, I.B., E.E., A.H., Y.D., A.S., A.E.M.B. and B.K.; formal analysis, I.B., E.E., A.H., Y.D., A.S., A.E.M.B. and B.K.; investigation, I.B., E.E., A.H., Y.D., A.S., A.E.M.B. and B.K.; resources, I.B., E.E., A.H. and Y.D.; data curation, I.B.; writing—original draft preparation, I.B.; writing—review and editing, E.E., A.H., Y.D., A.S., A.E.M.B. and B.K.; supervision, E.E., A.H., Y.D., A.S. and A.E.M.B.; funding acquisition, E.E., A.H. and Y.D. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Data Availability Statement:** Data are contained within the article.

**Conflicts of Interest:** The authors declare no conflict of interest.

## Abbreviations

The following abbreviations are used in this manuscript:

<table><tr><td>GFM</td><td>Grid-forming</td></tr><tr><td>MG</td><td>Microgrid</td></tr><tr><td>VSI</td><td>Voltage source inverters</td></tr><tr><td>SG</td><td>Synchronous generators</td></tr><tr><td>DG</td><td>Distributed generation</td></tr><tr><td>PLL</td><td>Phase-locked loop</td></tr><tr><td>THD</td><td>Total harmonic distortion</td></tr><tr><td>PWM</td><td>Pulse width modulation</td></tr><tr><td>PCC</td><td>Point of common coupling</td></tr><tr><td>MGCC</td><td>Microgrid central controller</td></tr><tr><td>UPS</td><td>Uninterruptible power supply</td></tr></table>

## Appendix A

<table><caption>Table A1. Microgrid parameters.</caption><thead><tr><th colspan="4">Inverter Parameters (10 kVA Rating)</th></tr><tr><th>Parameter</th><th>Value</th><th>Parameter</th><th>Value</th></tr></thead><tbody><tr><td>fs</td><td>8 kHz</td><td>C<sub>f</sub></td><td>50 uF</td></tr><tr><td>L<sub>f</sub></td><td>1.35 mH</td><td>r<sub>f</sub></td><td>0.1 Ω</td></tr><tr><td>L<sub>c</sub></td><td>0.35 mH</td><td>r<sub>c</sub></td><td>0.03 Ω</td></tr><tr><th colspan="4">Line and Load parameters</th></tr><tr><td>rline</td><td>0.1 Ω</td><td>rload</td><td>25 Ω</td></tr><tr><td>Lline</td><td>0.35 mH</td><td>Lload</td><td>10<sup>-5</sup> mH</td></tr><tr><th colspan="4">Primary control parameters</th></tr><tr><td>m<sub>p</sub></td><td>9.4 × 10<sup>-5</sup> (=0.3% droop)</td><td>n<sub>q</sub></td><td>1.3 × 10<sup>-3</sup> (=2% droop)</td></tr><tr><td>Wn</td><td>314.16 rad/s</td><td>V<sub>n</sub></td><td>311 V</td></tr><tr><td>Wc</td><td>31.41 rad/s</td><td></td><td></td></tr><tr><td>R<sub>v</sub></td><td>0.0370</td><td>L<sub>v</sub></td><td>0.0200</td></tr><tr><th colspan="4">Voltage and current Controller parameters</th></tr><tr><td>Voltage controller</td><td></td><td>Current controller</td><td></td></tr><tr><td>K<sub>pv</sub></td><td>0.037</td><td>K<sub>iv</sub></td><td>393</td></tr><tr><td>K<sub>pc</sub></td><td>10.5</td><td>K<sub>ic</sub></td><td>16 × 10<sup>3</sup></td></tr><tr><td>F</td><td>0.75</td><td></td><td></td></tr></tbody></table>
<table><caption>Table A1. *Cont.*</caption><thead><tr><th colspan="4">Inverter Parameters (10 kVA Rating)</th></tr><tr><th>Parameter</th><th>Value</th><th>Parameter</th><th>Value</th></tr></thead><tbody><tr><td colspan="4" style="text-align: center; font-weight: bold;">Secondary control</td></tr><tr><td>KpE</td><td>0.2</td><td>KiE</td><td>0.05</td></tr><tr><td>KpF</td><td>0.01</td><td>KiF</td><td>5</td></tr><tr><td>τ</td><td>50 ms</td><td></td><td></td></tr></tbody></table>

## References

1. Gursoy, M.; Mirafzal, B. Direct vs. Indirect control schemes for grid-forming inverters—unveiling a performance comparison in a microgrid. *IEEE Access* **2023**, *11*, 75023–75036. [CrossRef]

2. Guerrero, J.M.; Vasquez, J.C.; Matas, J.; De Vicuña, L.G.; Castilla, M. Hierarchical control of droop-controlled AC and DC microgrids—A general approach toward standardization. *IEEE Trans. Ind. Electron.* **2010**, *58*, 158–172. [CrossRef]

3. Issa, W.; Al-Naemi, F.; Konstantopoulos, G.; Sharkh, S.; Abusara, M. Stability analysis and control of a microgrid against circulating power between parallel inverters. *Energy Procedia* **2019**, *157*, 1061–1070. [CrossRef]

4. Alsiraji, H.A.; Guerrero, J.M. A new hybrid virtual synchronous machine control structure combined with voltage source converters in islanded ac microgrids. *Electr. Power Syst. Res.* **2021**, *193*, 106976. [CrossRef]

5. Bevrani, H.; Ise, T.; Miura, Y. Virtual synchronous generators: A survey and new perspectives. *Int. J. Electr. Power Energy Syst.* **2014**, *54*, 244–254. [CrossRef]

6. Shuai, Z.; Hu, Y.; Peng, Y.; Tu, C.; Shen, Z.J. Dynamic stability analysis of synchronverter-dominated microgrid based on bifurcation theory. *IEEE Trans. Ind. Electron.* **2017**, *64*, 7467–7477. [CrossRef]

7. Wu, H.; Wang, X. Design-oriented transient stability analysis of grid-connected converters with power synchronization control. *IEEE Trans. Ind. Electron.* **2018**, *66*, 6473–6482. [CrossRef]

8. Rathnayake, D.B.; Razzaghi, R.; Bahrani, B. Generalized virtual synchronous generator control design for renewable power systems. *IEEE Trans. Sustain. Energy* **2022**, *13*, 1021–1036. [CrossRef]

9. Gurugubelli, V.; Ghosh, A.; Panda, A.K. Design and implementation of optimized virtual oscillatory controllers for grid-forming inverters. *ISA Trans.* **2023**, *139*, 685–712. [CrossRef]

10. Unruh, P.; Nuschke, M.; Strauß, P.; Welck, F. Overview on grid-forming inverter control methods. *Energies* **2020**, *13*, 2589. [CrossRef]

11. Rathnayake, D.B.; Akrami, M.; Phurailatpam, C.; Me, S.P.; Hadavi, S.; Jayasinghe, G.; Zabihi, S.; Bahrani, B. Grid forming inverter modeling, control, and applications. *IEEE Access* **2021**, *9*, 114781–114807. [CrossRef]

12. Guerrero, J.M.; Matas, J.; Garcia De Vicunagarcia De Vicuna, L.; Castilla, M.; Miret, J. Wireless-Control Strategy for Parallel Operation of Distributed-Generation Inverters. *IEEE Trans. Ind. Electron.* **2006**, *53*, 1461–1470. [CrossRef]

13. Anttila, S.; Döhler, J.S.; Oliveira, J.G.; Boström, C. Grid forming inverters: A review of the state of the art of key elements for microgrid operation. *Energies* **2022**, *15*, 5517. [CrossRef]

14. Geng, S.; Hiskens, I.A. Unified grid-forming/following inverter control. *IEEE Open Access J. Power Energy* **2022**, *9*, 489–500. [CrossRef]

15. Me, S.P.; Zabihi, S.; Blaabjerg, F.; Bahrani, B. Adaptive Virtual Resistance for Postfault Oscillation Damping in Grid-Forming Inverters. *IEEE Trans. Power Electron.* **2022**, *37*, 3813–3824. [CrossRef]

16. Ray, I. Review of impedance-based analysis methods applied to grid-forming inverters in inverter-dominated grids. *Energies* **2021**, *14*, 2686. [CrossRef]

17. Rathnayake, D.B.; Bahrani, B. Multivariable control design for grid-forming inverters with decoupled active and reactive power loops. *IEEE Trans. Power Electron.* **2022**, *38*, 1635–1649. [CrossRef]

18. Huang, X.; Wang, K.; Qiu, J.; Hang, L.; Li, G.; Wang, X. Decentralized control of multi-parallel grid-forming DGs in islanded microgrids for enhanced transient performance. *IEEE Access* **2019**, *7*, 17958–17968. [CrossRef]

19. Salem, Q.; Aljarrah, R.; Karimi, M.; Al-Quraan, A. Grid-Forming Inverter Control for Power Sharing in Microgrids Based on P/f and Q/V Droop Characteristics. *Sustainability* **2023**, *15*, 11712. [CrossRef]

20. Dragičević, T. Model predictive control of power converters for robust and fast operation of AC microgrids. *IEEE Trans. Power Electron.* **2017**, *33*, 6304–6317. [CrossRef]

21. Wang, X.; Li, Y.W.; Blaabjerg, F.; Loh, P.C. Virtual-impedance-based control for voltage-source and current-source converters. *IEEE Trans. Power Electron.* **2014**, *30*, 7019–7037. [CrossRef]

22. Bennia, I.; Daili, Y.; Harrag, A. Hierarchical Control of Paralleled Voltage Source Inverters in Islanded Single Phase Microgrids. In Proceedings of the International Conference in Artificial Intelligence in Renewable Energetic Systems, Tipaza, Algeria, 22–24 November 2020; Springer: Berlin/Heidelberg, Germany, 2020; pp. 302–313.

23. Bekker, I.; Hofmann, L.; Mertens, A. Secondary control with grid-forming inverters for an island grid restoration approach without communication. *Electr. Power Syst. Res.* **2022**, *213*, 108498. [CrossRef]
<table><caption>Table A1. Cont.</caption><thead><tr><th colspan="4">Inverter Parameters (10 kVA Rating)</th></tr><tr><th>Parameter</th><th>Value</th><th>Parameter</th><th>Value</th></tr></thead><tbody><tr><td colspan="4" style="text-align: center;">Secondary control</td></tr><tr><td>KpE</td><td>0.2</td><td>KiE</td><td>0.05</td></tr><tr><td>KpF</td><td>0.01</td><td>KiF</td><td>5</td></tr><tr><td>τ</td><td>50 ms</td><td></td><td></td></tr></tbody></table>

## References

1. Gursoy, M.; Mirafzal, B. Direct vs. Indirect control schemes for grid-forming inverters—unveiling a performance comparison in a microgrid. *IEEE Access* **2023**, *11*, 75023–75036. [CrossRef]

2. Guerrero, J.M.; Vasquez, J.C.; Matas, J.; De Vicuña, L.G.; Castilla, M. Hierarchical control of droop-controlled AC and DC microgrids—A general approach toward standardization. *IEEE Trans. Ind. Electron.* **2010**, *58*, 158–172. [CrossRef]

3. Issa, W.; Al-Naemi, F.; Konstantopoulos, G.; Sharkh, S.; Abusara, M. Stability analysis and control of a microgrid against circulating power between parallel inverters. *Energy Procedia* **2019**, *157*, 1061–1070. [CrossRef]

4. Alsiraji, H.A.; Guerrero, J.M. A new hybrid virtual synchronous machine control structure combined with voltage source converters in islanded ac microgrids. *Electr. Power Syst. Res.* **2021**, *193*, 106976. [CrossRef]

5. Bevrani, H.; Ise, T.; Miura, Y. Virtual synchronous generators: A survey and new perspectives. *Int. J. Electr. Power Energy Syst.* **2014**, *54*, 244–254. [CrossRef]

6. Shuai, Z.; Hu, Y.; Peng, Y.; Tu, C.; Shen, Z.J. Dynamic stability analysis of synchronverter-dominated microgrid based on bifurcation theory. *IEEE Trans. Ind. Electron.* **2017**, *64*, 7467–7477. [CrossRef]

7. Wu, H.; Wang, X. Design-oriented transient stability analysis of grid-connected converters with power synchronization control. *IEEE Trans. Ind. Electron.* **2018**, *66*, 6473–6482. [CrossRef]

8. Rathnayake, D.B.; Razzaghi, R.; Bahrani, B. Generalized virtual synchronous generator control design for renewable power systems. *IEEE Trans. Sustain. Energy* **2022**, *13*, 1021–1036. [CrossRef]

9. Gurugubelli, V.; Ghosh, A.; Panda, A.K. Design and implementation of optimized virtual oscillatory controllers for grid-forming inverters. *ISA Trans.* **2023**, *139*, 685–712. [CrossRef]

10. Unruh, P.; Nuschke, M.; Strauß, P.; Welck, F. Overview on grid-forming inverter control methods. *Energies* **2020**, *13*, 2589. [CrossRef]

11. Rathnayake, D.B.; Akrami, M.; Phurailatpam, C.; Me, S.P.; Hadavi, S.; Jayasinghe, G.; Zabihi, S.; Bahrani, B. Grid forming inverter modeling, control, and applications. *IEEE Access* **2021**, *9*, 114781–114807. [CrossRef]

12. Guerrero, J.M.; Matas, J.; Garcia De Vicunagarcia De Vicuna, L.; Castilla, M.; Miret, J. Wireless-Control Strategy for Parallel Operation of Distributed-Generation Inverters. *IEEE Trans. Ind. Electron.* **2006**, *53*, 1461–1470. [CrossRef]

13. Anttila, S.; Döhler, J.S.; Oliveira, J.G.; Boström, C. Grid forming inverters: A review of the state of the art of key elements for microgrid operation. *Energies* **2022**, *15*, 5517. [CrossRef]

14. Geng, S.; Hiskens, I.A. Unified grid-forming/following inverter control. *IEEE Open Access J. Power Energy* **2022**, *9*, 489–500. [CrossRef]

15. Me, S.P.; Zabihi, S.; Blaabjerg, F.; Bahrani, B. Adaptive Virtual Resistance for Postfault Oscillation Damping in Grid-Forming Inverters. *IEEE Trans. Power Electron.* **2022**, *37*, 3813–3824. [CrossRef]

16. Ray, I. Review of impedance-based analysis methods applied to grid-forming inverters in inverter-dominated grids. *Energies* **2021**, *14*, 2686. [CrossRef]

17. Rathnayake, D.B.; Bahrani, B. Multivariable control design for grid-forming inverters with decoupled active and reactive power loops. *IEEE Trans. Power Electron.* **2022**, *38*, 1635–1649. [CrossRef]

18. Huang, X.; Wang, K.; Qiu, J.; Hang, L.; Li, G.; Wang, X. Decentralized control of multi-parallel grid-forming DGs in islanded microgrids for enhanced transient performance. *IEEE Access* **2019**, *7*, 17958–17968. [CrossRef]

19. Salem, Q.; Aljarrah, R.; Karimi, M.; Al-Quraan, A. Grid-Forming Inverter Control for Power Sharing in Microgrids Based on P/f and Q/V Droop Characteristics. *Sustainability* **2023**, *15*, 11712. [CrossRef]

20. Dragičević, T. Model predictive control of power converters for robust and fast operation of AC microgrids. *IEEE Trans. Power Electron.* **2017**, *33*, 6304–6317. [CrossRef]

21. Wang, X.; Li, Y.W.; Blaabjerg, F.; Loh, P.C. Virtual-impedance-based control for voltage-source and current-source converters. *IEEE Trans. Power Electron.* **2014**, *30*, 7019–7037. [CrossRef]

22. Bennia, I.; Daili, Y.; Harrag, A. Hierarchical Control of Paralleled Voltage Source Inverters in Islanded Single Phase Microgrids. In Proceedings of the International Conference in Artificial Intelligence in Renewable Energetic Systems, Tipaza, Algeria, 22–24 November 2020; Springer: Berlin/Heidelberg, Germany, 2020; pp. 302–313.

23. Bekker, I.; Hofmann, L.; Mertens, A. Secondary control with grid-forming inverters for an island grid restoration approach without communication. *Electr. Power Syst. Res.* **2022**, *213*, 108498. [CrossRef]
24. Bennia, I.; Harrag, A.; Daili, Y.; Bouzid, A.; Guerrero, J.M. Decentralized secondary control for frequency regulation based on fuzzy logic control in islanded microgrid. *Indones. J. Electr. Eng. Comput. Sci.* **2023**, *29*, 85–100. [CrossRef]

25. Sadeque, F.; Mirafzal, B. Frequency restoration of grid-forming inverters in pulse load and plug-in events. *IEEE J. Emerg. Sel. Top. Ind. Electron.* **2022**, *4*, 580–588. [CrossRef]

26. Auichak, I.; Jacques, S.; Bissey, S.; Reymond, C.; Besson, T.; Le Bunetel, J.-C. A bidirectional grid-connected DC-AC converter for autonomous and intelligent electricity storage in the residential sector. *Energies* **2022**, *15*, 1194. [CrossRef]

27. Sharma, D.; Sadeque, F.; Mirafzal, B. Synchronization of inverters in grid forming mode. *IEEE Access* **2022**, *10*, 41341–41351. [CrossRef]

28. Litwin, M.; Zieliński, D.; Gopakumar, K. Remote micro-grid synchronization without measurements at the point of common coupling. *IEEE Access* **2020**, *8*, 212753–212764. [CrossRef]

29. Llaria, A.; Curea, O.; Jiménez, J.; Camblong, H. Survey on microgrids: Unplanned islanding and related inverter control techniques. *Renew. Energy* **2011**, *36*, 2052–2061. [CrossRef]

30. Bennia, I.; Daili, Y.; Harrag, A. LCL Filter Design for Low Voltage-Source Inverter. In Proceedings of the International Conference on Artificial Intelligence in Renewable Energetic Systems, Tipasa, Algeria, 22–24 November 2021; Springer: Berlin/Heidelberg, Germany, 2021; pp. 332–341. [CrossRef]

31. Loh, P.C.; Holmes, D.G. Analysis of multiloop control strategies for LC/CL/LCL-filtered voltage-source and current-source inverters. *IEEE Trans. Ind. Appl.* **2005**, *41*, 644–654. [CrossRef]

32. Haddadi, A.; Boulet, B.; Yazdani, A.; Joós, G. A μ-based approach to small-signal stability analysis of an interconnected distributed energy resource unit and load. *IEEE Trans. Power Deliv.* **2014**, *30*, 1715–1726. [CrossRef]

33. Issa, W.R. Improved Control Strategies for Droop-Controlled Inverter-Based Microgrid. Master’s Thesis, University of Exeter, Exter, UK, 2015. [CrossRef]

34. Pogaku, N.; Prodanovic, M.; Green, T.C. Modeling, Analysis and Testing of Autonomous Operation of an Inverter-Based Microgrid. *IEEE Trans. Power Electron.* **2007**, *22*, 613–625. [CrossRef]

35. Vasquez, J.C.; Guerrero, J.M.; Savaghebi, M.; Eloy-Garcia, J.; Teodorescu, R. Modeling, analysis, and design of stationary-reference-frame droop-controlled parallel three-phase voltage source inverters. *IEEE Trans. Ind. Electron.* **2012**, *60*, 1271–1280. [CrossRef]

36. Erdocia, J.; Urtasun, A.; Marroyo, L. Power Angle–Frequency Droop Control to Enhance Transient Stability of Grid–Forming Inverters under Voltage Dips. *IEEE J. Emerg. Sel. Top. Power Electron.* **2022**, *11*, 3751–3764. [CrossRef]

37. Qoria, T.; Gruson, F.; Colas, F.; Guillaud, X.; Debry, M.-S.; Prevost, T. Tuning of cascaded controllers for robust grid-forming voltage source converter. In Proceedings of the 2018 Power Systems Computation Conference (PSCC), Dublin, Ireland, 11–15 June 2018; IEEE: Piscataway, NJ, USA, 2018; pp. 1–7.

38. Khayat, Y.; Shafiee, Q.; Heydari, R.; Naderi, M.; Dragičević, T.; Simpson-Porco, J.W.; Dörfler, F.; Fathi, M.; Blaabjerg, F.; Guerrero, J.M. On the secondary control architectures of AC microgrids: An overview. *IEEE Trans. Power Electron.* **2019**, *35*, 6482–6500. [CrossRef]

**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
24. Bennia, I.; Harrag, A.; Daili, Y.; Bouzid, A.; Guerrero, J.M. Decentralized secondary control for frequency regulation based on fuzzy logic control in islanded microgrid. *Indones. J. Electr. Eng. Comput. Sci.* **2023**, *29*, 85–100. [CrossRef]

25. Sadeque, F.; Mirafzal, B. Frequency restoration of grid-forming inverters in pulse load and plug-in events. *IEEE J. Emerg. Sel. Top. Ind. Electron.* **2022**, *4*, 580–588. [CrossRef]

26. Auichak, I.; Jacques, S.; Bissey, S.; Reymond, C.; Besson, T.; Le Bunetel, J.-C. A bidirectional grid-connected DC-AC converter for autonomous and intelligent electricity storage in the residential sector. *Energies* **2022**, *15*, 1194. [CrossRef]

27. Sharma, D.; Sadeque, F.; Mirafzal, B. Synchronization of inverters in grid forming mode. *IEEE Access* **2022**, *10*, 41341–41351. [CrossRef]

28. Litwin, M.; Zieliński, D.; Gopakumar, K. Remote micro-grid synchronization without measurements at the point of common coupling. *IEEE Access* **2020**, *8*, 212753–212764. [CrossRef]

29. Llaria, A.; Curea, O.; Jiménez, J.; Camblong, H. Survey on microgrids: Unplanned islanding and related inverter control techniques. *Renew. Energy* **2011**, *36*, 2052–2061. [CrossRef]

30. Bennia, I.; Daili, Y.; Harrag, A. LCL Filter Design for Low Voltage-Source Inverter. In Proceedings of the International Conference on Artificial Intelligence in Renewable Energetic Systems, Tipasa, Algeria, 22–24 November 2021; Springer: Berlin/Heidelberg, Germany, 2021; pp. 332–341. [CrossRef]

31. Loh, P.C.; Holmes, D.G. Analysis of multiloop control strategies for LC/CL/LCL-filtered voltage-source and current-source inverters. *IEEE Trans. Ind. Appl.* **2005**, *41*, 644–654. [CrossRef]

32. Haddadi, A.; Boulet, B.; Yazdani, A.; Joós, G. A μ-based approach to small-signal stability analysis of an interconnected distributed energy resource unit and load. *IEEE Trans. Power Deliv.* **2014**, *30*, 1715–1726. [CrossRef]

33. Issa, W.R. Improved Control Strategies for Droop-Controlled Inverter-Based Microgrid. Master's Thesis, University of Exeter, Exter, UK, 2015. [CrossRef]

34. Pogaku, N.; Prodanovic, M.; Green, T.C. Modeling, Analysis and Testing of Autonomous Operation of an Inverter-Based Microgrid. *IEEE Trans. Power Electron.* **2007**, *22*, 613–625. [CrossRef]

35. Vasquez, J.C.; Guerrero, J.M.; Savaghebi, M.; Eloy-Garcia, J.; Teodorescu, R. Modeling, analysis, and design of stationary-reference-frame droop-controlled parallel three-phase voltage source inverters. *IEEE Trans. Ind. Electron.* **2012**, *60*, 1271–1280. [CrossRef]

36. Erdocia, J.; Urtasun, A.; Marroyo, L. Power Angle-Frequency Droop Control to Enhance Transient Stability of Grid-Forming Inverters under Voltage Dips. *IEEE J. Emerg. Sel. Top. Power Electron.* **2022**, *11*, 3751–3764. [CrossRef]

37. Qoria, T.; Gruson, F.; Colas, F.; Guillaud, X.; Debry, M.-S.; Prevost, T. Tuning of cascaded controllers for robust grid-forming voltage source converter. In Proceedings of the 2018 Power Systems Computation Conference (PSCC), Dublin, Ireland, 11–15 June 2018; IEEE: Piscataway, NJ, USA, 2018; pp. 1–7.

38. Khayat, Y.; Shafiee, Q.; Heydari, R.; Naderi, M.; Dragičević, T.; Simpson-Porco, J.W.; Dörfler, F.; Fathi, M.; Blaabjerg, F.; Guerrero, J.M. On the secondary control architectures of AC microgrids: An overview. *IEEE Trans. Power Electron.* **2019**, *35*, 6482–6500. [CrossRef]

**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.