# Stability and Reactive Power Sharing Enhancement in Islanded Microgrid via Small-Signal Modeling and Optimal Virtual Impedance Control

Ilyas Bennia, Yacine Daili, Abdelghani Harrag, Hasan Alrajhi, Abdelhakim Saim, Josep M Guerrero

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

## To cite this version:

Ilyas Bennia, Yacine Daili, Abdelghani Harrag, Hasan Alrajhi, Abdelhakim Saim, et al. Stability and Reactive Power Sharing Enhancement in Islanded Microgrid via Small-Signal Modeling and Optimal Virtual Impedance Control. International Transactions on Electrical Energy Systems, 2024, 2024, pp.1 - 25. 10.1155/2024/5469868. hal-05128953

HAL Id: hal-05128953

https://nantes-universite.hal.science/hal-05128953v1

Submitted on 25 Jun 2025

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published 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_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Research Article

# Stability and Reactive Power Sharing Enhancement in Islanded Microgrid via Small-Signal Modeling and Optimal Virtual Impedance Control

Ilyas Bennia ID,<fnref n="1" />,<fnref n="2" /> Yacine Daili ID,<fnref n="1" />,<fnref n="2" /> Abdelghani Harrag ID,<fnref n="1" />,<fnref n="2" /> Hasan Alrajhi ID,<fnref n="3" /> Abdelhakim Saim ID,<fnref n="4" /> and Josep M. Guerrero ID,<fnref n="5" />,<fnref n="6" />,<fnref n="7" />

Correspondence should be addressed to Ilyas Bennia; ilyasbennia@yahoo.com and Abdelhakim Saim; abdelhakim.saim@univ-nantes.fr

Received 18 December 2023; Revised 10 April 2024; Accepted 18 April 2024; Published 4 May 2024

Academic Editor: Marcos Tostado-Véliz

Copyright © 2024 Ilyas Bennia et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

In the context of integrating Renewable Energy Sources, Microgrid (MG) development is pivotal, particularly as a foundational technology for Smart-Grid evolution. Despite advancements in control techniques, challenges persist in ensuring system stability and accurate power sharing across diverse operational conditions and load types. The objective of this research is to control numerous paralleled inverters-based distributed generators (DGs) that contribute to power sharing in an island MG. The proposed methodology involves developing an innovative small-signal model for islanding MGs that incorporate virtual impedances. Subsequently, optimization algorithms based on Genetic Algorithm (GA) and Particle Swarm Optimization (PSO) are proposed and compared for designing the virtual impedances. These algorithms analyze all potential operating points, aiming to minimize reactive power mismatches while maximizing MG stability. The suggested objective function facilitates the simultaneous achievement of these objectives. The proposed approaches were tested using MATLAB-Simulink software, and the comparison of the results between conventional approach and the proposed optimal approaches shows significant improvement in terms of the dynamic response during load changes, such as a decrease in response time by up to 20%, a reduction in overshoot percentage by approximately 15%, and a settling time improvement of nearly 25%. These quantified improvements highlight the effectiveness of the GA and PSO methods in minimizing the reactive power-sharing error while optimizing MG performance and stability.

## 1. Introduction

In recent years, the growth of industries and populations has led to increased issues related to energy crises and environmental pollution. Additionally, the instability in fuel

markets has posed significant challenges for governments. As a response, a shift towards renewable energies is being observed in the energy sectors, with a focus on the widespread installation of distributed generation (DG) to meet the rising energy needs [1]. MG concept is defined as a small-

<footnote n="1">¹Renewable Energy Deployment and Integration Team, Mechatronics Laboratory (LMETR)-E1746200, Optics and Precision Mechanics Institute, Ferhat ABBAS University Setif 1, Setif 19000, Algeria</footnote>

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

<footnote n="3">³Department of Electrical Engineering, Umm Al-Qura University, Mecca, Saudi Arabia</footnote>

<footnote n="4">⁴Nantes Université, Institut de Recherche en Énergie Électrique de Nantes Atlantique IREENA-UR 4642, Saint-Nazaire F-44600, France</footnote>

<footnote n="5">⁵Center for Research on Microgrids (CROM), Department of Electronic Engineering, Technical University of Catalonia, Barcelona, Spain</footnote>

<footnote n="6">⁶ICREA, Pg. Lluís Companys 23, Barcelona, Spain</footnote>

<footnote n="7">⁷CROM, AAU Energy, Aalborg University, Aalborg East 9220, Denmark</footnote>
scale grid that connects loads and distributed energy sources within low-voltage distribution systems [2] as depicted in Figure 1. It is known for its ability to operate either connected to the main grid [3] or independently, making the integration of renewable energies more feasible [4]. Converter design is a crucial aspect of MG, for seamless energy transformation between DC and AC forms [5]. As highlighted in Figure 1, converters significantly influence grid synchronization, power quality, and energy flow within MGs [6]. Similarly, the LCL filter is considered as the most suitable option in terms of cost because of its smaller passive element size and its capability to effectively suppress and reduce high-frequency harmonics [7, 8]. To ensure high-quality current in MG, it is crucial to design the LCL filter properly [9]. The integration of wind-hydrogen systems into MGs is addressed in [10], with the emphasis placed on how energy flow management is conducted by advanced control strategies. Wind-hydrogen systems utilize excess wind power to electrolyze water, producing hydrogen for energy storage and use during periods of low wind availability [11]. Concurrently, PV systems generate electricity from sunlight, complemented by battery storage for managing fluctuations in solar irradiance [12]. The integration of solar photovoltaic (PV) and wind turbine renewable energy systems (RES) with Electrolyzer-Fuel Cell Energy Storage System (EFCS) and Battery Energy Storage System (BESS), aiming to minimize the weighted average cost of energy, has been addressed in [13].

The hierarchical control strategy is generally the most used for MGs [14], primarily because energy use and stability are optimized through its implementation [15].

Microgrids are faced with several technical challenges. The need for accurate sharing of power among DG units [16] and the need for effective regulation of frequency and voltage [17] are among these challenges. A lack of inertia and damping is also seen in MGs, mainly because Synchronous Generators (SGs) are not present. This causes the system to respond very quickly compared to traditional grids, making the system's stability very sensitive to disturbances [18]. Droop control is commonly recognized as a pivotal strategy due to its capability to simultaneously fine-tune both voltage and frequency [19]. This feature facilitates the distribution of power among parallel generation units, bypassing the necessity for communication between inverters [20]. However the application of droop control in MGs with complex impedance presents notable challenges [21]. It has been observed that droop control fails to distribute power with precision, particularly reactive power [22], due to neglecting the influence of the coupling of the DG units, which means that the coupling is uncontrollable for it. When the DG units operate in parallel, its accuracy of the power regulation is greatly reduced by the uncontrollable coupling, resulting in large power circulating current and power fluctuations of the MG [23]. Therefore, the drawback of the traditional droop control strategy induces the poor dynamic performance and efficiency of the MG.

Numerous approaches have been proposed in the literature to minimize errors in power-sharing. Frequency regulation in wind-based MGs has been enhanced using GA and PSO techniques. With the utilization of a STATCOM

current controller, GA and PSO algorithms are employed to optimize reactive power management [24, 25]. The methods known as the virtual active and reactive power frame, along with the virtual voltage and frequency frame, have been introduced in [26]. Nevertheless, these techniques are unable to simultaneously enhance the power sharing accuracy. The study in [27] concluded that if the virtual impedance is poorly designed or implemented, it may introduce current distortions in DG units, adversely impacting system stability and dynamics. The advanced virtual impedance control technique, discussed in [28], aims for enhanced power-sharing accuracy. It effectively adjusts the DG unit's equivalent impedance, targeting both fundamental and harmonic frequencies. However, it is important to note that its efficacy has only been validated in the context of a basic, single-phase islanded MG. Further testing in more complex or multiphase systems may be necessary to fully understand its capabilities and limitations. To minimize power-sharing mismatch, a method involving the injection of high-frequency signals was introduced in [29]. This technique ensures accurate power sharing but comes at the expense of inducing extra voltage distortions in the system. Furthermore, the feasibility of virtual impedances was discussed in [30] by the implementation of different virtual impedances. Despite that, a significant limitation of this approach is its exclusivity to DG units that are configured for voltage control mode, rendering it incompatible with units that are set up for current control mode. Virtual admittance was introduced in [31] as a way to share harmonic currents and reduce transmission losses. It has the advantage of being applicable to any inverter topology. However, excessive virtual admittance values can lead to potential instability by causing an inverter to reverse its harmonic current injection. Furthermore, an optimized virtual impedance controller was employed in [32] to prevent reactive power sharing errors. The main idea was to estimate the network's reactive power sharing errors based on local load measurements. A drawback is that the method for estimating errors in sharing reactive power relies on the assumption that all DG units are set to the same power rating. This implies that each unit is expected to contribute equally in terms of active and reactive power, an assumption that may not always hold true in practical scenarios. An enhanced droop control method, which incorporates coupling compensation and virtual impedance loops, is presented in [33]. However, it is noted that the performance of this proposed strategy diminishes when faced with uncertain capacities of DG units and varying levels of voltage and frequency. In [34], a MG model that incorporates virtual impedances and a Phase-Locked Loop (PLL) is presented. This model optimizes virtual impedances through PSO, effectively enhancing the MG stability index while reducing discrepancies in reactive power. However, it is worth noting that the robustness of this approach has not been extensively tested across different load types or under severe operational conditions. The authors in [35] introduced a virtual admittance-based method for reducing harmonic distortion in inverter currents. It utilizes a dual PID/PI control system within a synchronous reference frame, offering stability and
<figure><img src="image_3.png" /><figcaption>FIGURE 1: General scheme of an electrical microgrid.</figcaption></figure>

improved damping in LC filters; however, the disadvantage lies in potential instability at the low-pass power filter resonant frequency. An improved adaptive virtual impedance method is proposed in [36]. The strategy addresses voltage drops in DG units while maintaining power quality and managing circulating currents. However, it introduces a slower dynamic response due to the added control loop for voltage compensation. In summary, recent research explores various methods to enhance power-sharing accuracy in MGs, focusing on virtual impedance and admittance techniques. These approaches, though beneficial in certain configurations, exhibit limitations in complex or multiphase systems and may introduce system distortions or instabilities. Furthermore, their effectiveness varies based on inverter control modes and DG unit capacities. Despite advancements in droop control and impedance optimization, challenges persist in ensuring system stability and accurate power distribution across diverse operational conditions and load types.

This study aims to enhance the MG stability and improve the accuracy of reactive power sharing. Its main contributions can be listed as follows:

(i) First, an improved small-signal model for the island MGs with virtual impedances is proposed.

(ii) A comparative analysis was conducted to identify the optimal virtual impedances for MGs using GA and PSO.

(iii) A new objective function that makes it easier to accomplish the objectives simultaneously is proposed as part of the proposed optimization algorithm, which analyzes the MG stability at all feasible operating points.

This paper is structured as follows. Small-signal analysis and MG modeling are introduced in Section 2. A sensitivity analysis and virtual impedance optimization method are described in Section 3. Section 4 contains the simulation
results and discussions. Finally, the paper is concluded in Section 5.

## 2. Microgrid Modeling and Small-Signal Stability Analysis

A mathematical model of a standalone MG has been built to study how adding virtual impedance affects the MG's stability. This model uses a technique called state-space representations to describe the different parts of the MG. Since the models are complex and not straightforward, a simpler version called a small-signal model is created. This is done by simplifying the complex models around a certain operating point and then combining them in a single framework. As shown in Figure 2, the MG is divided into three parts: inverters, lines, and loads. Each inverter is shown in its own framework, and the position angle at which it operates is controlled by its own droop controller.

### 2.1. Power Measurement-Droop Control and Interface Circuit.
In islanding mode, operation DG units are interfaced to the MG using voltage source converters in a grid forming topology where the voltage and frequency set points are handled by the droop control [37] as depicted in Figure 3. The active P and reactive Q powers can be obtained by calculating them using the dq components' voltage and current outputs and averaging them using a low-pass filter (LPF) with reduced bandwidth. Therefore, the measured power P and Q are defined by the following equation:

$$ egin{cases} P = \frac{\omega_c}{s + \omega_c} \cdot p \implies \dot{P} = -P\omega_c + \frac{3}{2}\omega_c(v_{od} \cdot i_{od} + v_{oq} \cdot i_{oq}), \\ Q = \frac{\omega_c}{s + \omega_c} \cdot q \implies \dot{Q} = -Q\omega_c + \frac{3}{2}\omega_c(v_{oq} \cdot i_{od} - v_{od} \cdot i_{oq}), \end{cases} \quad (1) $$

where $\omega_c$ is the cutoff frequency of the low-pass filter and $v_{od}$, $v_{oq}$, $i_{od}$, and $i_{oq}$ are the sensed voltages and currents in the dq reference frame. Hence, the linearized model of power control can be expressed as follows:

$$ egin{cases} \Delta \dot{P} = -\omega_c \Delta P + \omega_c (I_{od} \Delta v_{od} + I_{oq} \Delta v_{oq} + V_{od} \Delta i_{od} + V_{oq} \Delta i_{oq}), \\ \Delta \dot{Q} = -\omega_c \Delta Q + \omega_c (I_{oq} \Delta v_{od} - I_{od} \Delta v_{oq} - V_{oq} \Delta i_{od} + V_{od} \Delta i_{oq}). \end{cases} \quad (2) $$

### 2.2. Virtual Impedance Equations.
As written in equation (3), the virtual impedance is added in the droop control voltage loop, where $R_v$, $X_v$, and $V_{vir}$ are, respectively, virtual resistance, virtual reactance, and virtual voltage drop. According to the control strategy, the q-axis voltage component is fixed at zero. In the next section, the optimization algorithm will be used to figure out the parameters of virtual resistance and virtual inductance.

$$ egin{cases} V_{vir} = (R_v \cdot i_{od} - X_v \cdot i_{oq}), \\ \Delta V_{vir} = (R_v \cdot \Delta i_{od} - X_v \cdot \Delta i_{oq}). \end{cases} \quad (3) $$

As previously stated, the voltage and frequency set points are determined by the voltage source converters throughout the droop control, as can be seen in the following equation:

$$ egin{cases} \omega^* = \omega_n - m_p \times (P - P_0), \\ \Delta \omega^* = -m_p \times \Delta P, \\ V_{od}^* = V_{od_n} - n_q (Q - Q_0) - V_{vir}, \\ \Delta V_{od}^* = -n_q \times \Delta Q - \Delta V_{vir}, \end{cases} \quad (4) $$

where $V_{od_n}$ and $\omega_n$ denote the nominal voltage and frequency and $m_p$ and $n_q$ denote the droop coefficients.

A common reference frame is required to build the small-signal model. Hence, the reference frame of one of the inverters is defined as the common D-Q reference frame. To translate the variables from an individual inverter d-q frame reference frame into the global D-Q frame, the angle difference $\delta$ for each inverter is defined as follows:

$$ egin{cases} \delta = \int (\omega - \omega_{com}), \\ \Delta \delta = \Delta \omega - \Delta \omega_{com} = -m_p \Delta P - \Delta \omega_{com}, \end{cases} \quad (5) $$

where $\omega_{com}$ is the angular frequency of the common frame. As depicted in Figure 4, the axis set (D-Q) is the common reference frame rotating at a frequency $\omega_{com}$ while axes (d-q) 1 and (d-q)2 are the reference frames of the second and third inverters rotating at $\omega_1$ and $\omega_2$, respectively.

### 2.3. Voltage Controller Loop.
A typical proportional and integral (PI) regulator is used in the voltage control loop. The PI controller's input is the signal formed by comparing the sampled output voltage to the power controller's reference value, and a feed-forward gain is applied to correct for output current disturbances and provide the dq current reference components, as illustrated below:
<figure><img src="image_4.png" /><figcaption>FIGURE 2: MG and state-space model.</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>FIGURE 3: Proposed control scheme of a VSI in island mode.</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>FIGURE 4: Reference frame transformation.</figcaption></figure>
$$
\left\{
\begin{aligned}
\frac{d\phi_d}{dt} &= v_{od}^* - v_{od}, \\
\Delta\dot{\phi}_d &= \Delta v_{od}^* - \Delta v_{od}, \\
\frac{d\phi_q}{dt} &= v_{oq}^* - v_{oq}, \\
\Delta\dot{\phi}_q &= \Delta v_{oq}^* - \Delta v_{oq}, \\
i_{ld}^* &= F i_{od} - \omega_n C_f v_{oq} + K_{pv}(v_{od}^* - v_{od}) + K_{iv}\phi_d, \\
\Delta i_{ld}^* &= K_{iv}\Delta\phi_d + K_{pv}\Delta v_{od}^* - K_{pv}\Delta v_{od} - \omega_n C_f \Delta v_{oq} + F \Delta i_{od}, \\
i_{lq}^* &= F i_{oq} + \omega_n C_f v_{od} + K_{pv}(v_{oq}^* - v_{oq}) + K_{iv}\phi_q, \\
\Delta i_{lq}^* &= K_{iv}\Delta\phi_q + K_{pv}\Delta v_{oq}^* + \omega_n C_f \Delta v_{od} - K_{pv}\Delta v_{oq} + F \Delta i_{oq},
\end{aligned}
\right.
\qquad (6)
$$

where $K_{pv}$, and $K_{iv}$ are the voltage controller's proportional and integral gains, respectively; $C_f$ is the LC filter's per-phase capacitance; and $F$ is the feed-forward voltage controller gain.

**2.4. Current Controller Loop.** Similar to the voltage controller, the current controller uses a PI regulator to eliminate the error between the sensed current and the reference one and then generates the PWM signal as shown in the equation below:

$$
\left\{
\begin{aligned}
\frac{d\gamma_d}{dt} &= i_{ld}^* - i_{ld}, \\
\Delta\dot{\gamma}_d &= \Delta i_{ld}^* - \Delta i_{ld}, \\
\frac{d\gamma_q}{dt} &= i_{lq}^* - i_{lq}, \\
\Delta\dot{\gamma}_q &= \Delta i_{lq}^* - \Delta i_{lq}, \\
v_{id}^* &= v_{od} - \omega_n L_f i_{lq} + K_{pc}(i_{ld}^* - i_{ld}) + K_{ic}\gamma_d, \\
\Delta v_{id}^* &= K_{ic}\Delta\gamma_d + K_{pc}\Delta i_{ld}^* - K_{pc}\Delta i_{ld} - \omega_n L_f \Delta i_{lq}, \\
v_{iq}^* &= v_{oq} + \omega_n L_f i_{ld} + K_{pc}(i_{lq}^* - i_{iq}) + K_{ic}\gamma_q, \\
\Delta v_{iq}^* &= K_{ic}\Delta\gamma_q + K_{pc}\Delta i_{lq}^* + \omega_n L_f \Delta i_{ld} - K_{pc}\Delta i_{lq},
\end{aligned}
\right.
\qquad (7)
$$

where $K_{pc}$, and $K_{ic}$ denote the proportional and integral gains of current, respectively; $i_{ld}$, and $i_{lq}$ denote the filter dq currents; and $L_f$ is the per-phase inductance.

**2.5. LCL Filter Model.** To eliminate the harmonics created by the PWM switching inverter, an LCL filter is interfaced between the inverter and the point of coupling. The LCL filter dynamics are represented by the state equations below in (8), which assume that the inverter generates the desired inverter bridge voltage.

$$
\left\{
\begin{aligned}
\frac{di_{ld}}{dt} &= \frac{-R_f}{L_f} i_{ld} + \omega i_{lq} + \frac{1}{L_f} v_{id} - \frac{1}{L_f} v_{od}, \\
\frac{di_{lq}}{dt} &= \frac{-R_f}{L_f} i_{lq} - \omega i_{ld} + \frac{1}{L_f} v_{iq} - \frac{1}{L_f} v_{oq}, \\
\frac{dv_{od}}{dt} &= \omega v_{oq} + \frac{1}{C_f} i_{ld} - \frac{1}{C_f} i_{od}, \\
\frac{dv_{oq}}{dt} &= -\omega v_{od} + \frac{1}{C_f} i_{lq} - \frac{1}{C_f} i_{oq}, \\
\frac{di_{od}}{dt} &= \frac{-R_c}{L_c} i_{od} + \omega i_{oq} + \frac{1}{L_c} v_{od} - \frac{1}{L_c} v_{bd}, \\
\frac{di_{oq}}{dt} &= \frac{-R_c}{L_c} i_{oq} - \omega i_{od} + \frac{1}{L_c} v_{oq} - \frac{1}{L_c} v_{bq}.
\end{aligned}
\right.
\qquad (8)
$$

The state-space equations in (9) are obtained by linearizing (8) around the operational points:

$$
\left\{
\begin{aligned}
\Delta\dot{i}_{ld} &= -\frac{R_f}{L_f}\Delta i_{ld} + \omega_o\Delta i_{iq} - \frac{1}{L_f}\Delta v_{od} + \frac{1}{L_f}\Delta v_{id} + I_{lq}\Delta\omega, \\
\Delta\dot{i}_{lq} &= -\omega_o\Delta i_{id} - \frac{R_f}{L_f}\Delta i_{lq} - \frac{1}{L_f}\Delta v_{oq} + \frac{1}{L_f}\Delta v_{iq} - I_{ld}\Delta\omega, \\
\Delta\dot{v}_{od} &= \frac{1}{C_f}\Delta i_{ld} + \omega_o\Delta v_{oq} - \frac{1}{C_f}\Delta i_{od} + V_{oq}\Delta\omega, \\
\Delta\dot{v}_{oq} &= \frac{1}{C_f}\Delta i_{lq} - \omega_o\Delta v_{od} - \frac{1}{C_f}\Delta i_{oq} - V_{od}\Delta\omega, \\
\Delta\dot{i}_{od} &= \frac{1}{L_c}\Delta v_{od} - \frac{R_c}{L_c}\Delta i_{od} + \omega_o\Delta i_{oq} - \frac{1}{L_c}\Delta v_{bd} + I_{oq}\Delta\omega, \\
\Delta\dot{i}_{oq} &= \frac{1}{L_c}\Delta v_{oq} - \omega_o\Delta i_{od} - \frac{R_c}{L_c}\Delta i_{oq} - \frac{1}{L_c}\Delta v_{bq} - I_{od}\Delta\omega.
\end{aligned}
\right.
\qquad (9)
$$
where $v_{bd}$, $v_{bq}$ are the dq axis nodes voltages; $v_{id}$, $v_{iq}$ are the inverter voltages in the dq frame, respectively; and $\omega_o$, $I_{ld}$, $I_{lq}$, $V_{od}$, $V_{oq}$, $I_{od}$, $I_{oq}$ are steady-state values at the examined operating point.

**2.6. Complete Inverter Model.** To interface the output variables $i_{odq}$ to the entire system model, they must be transferred to the common DQ frame using the transformation matrix as exhibited in (10) and (11):

$$[i_{oDQ}] = [T][i_{odq}] = \begin{bmatrix} \cos(\delta) & -\sin(\delta) \\ \sin(\delta) & \cos(\delta) \end{bmatrix} [i_{odq}]. \quad (10)$$

The obtained linearized model of the output currents of the inverter is shown in the following equation:

$$[\Delta i_{oDQ}] = \begin{bmatrix} \cos(\delta_o) & -\sin(\delta_o) \\ \sin(\delta_o) & \cos(\delta_o) \end{bmatrix} [\Delta i_{odq}] + \begin{bmatrix} -I_{od} \sin(\delta_o) - I_{oq} \cos(\delta_o) \\ I_{od} \cos(\delta_o) - I_{oq} \sin(\delta_o) \end{bmatrix} [\Delta \delta]. \quad (11)$$

Similarly, the bus voltage is the input signal to the inverter model, which is stated in the DQ global reference frame. The bus voltage must be converted to the local inverter reference frame using the reverse transformation illustrated below:

$$[v_{bdq}] = [T^{-1}][v_{bDQ}] = \begin{bmatrix} \cos(\delta) & \sin(\delta) \\ -\sin(\delta) & \cos(\delta) \end{bmatrix} [v_{bDQ}]. \quad (12)$$

The obtained linearized model of the output voltages of the inverter is shown in the following equation:

$$[\Delta v_{bdq}] = \begin{bmatrix} \cos(\delta_o) & \sin(\delta_o) \\ -\sin(\delta_o) & \cos(\delta_o) \end{bmatrix} [\Delta v_{bDQ}] + \begin{bmatrix} -V_{bD} \sin(\delta_o) + V_{bQ} \cos(\delta_o) \\ -V_{bD} \cos(\delta_o) - V_{bQ} \sin(\delta_o) \end{bmatrix} [\Delta \delta]. \quad (13)$$

As a result, a standard inverter model in the common frame can be obtained by aggregating the state-space models shown in equations (1)–(13). A 13-order small-signal state-

space equation and the output equation of a single inverter unit can be expressed as follows:

$$[\Delta \dot{x}_{invi}] = A_{INVi} [\Delta x_{invi}] + B_{INVi} [\Delta v_{bDQi}] + B_{i\omega com} [\Delta \omega_{com}], \quad (14)$$

$$\begin{bmatrix} \Delta \omega_i \\ \Delta i_{oDQi} \end{bmatrix} = \begin{bmatrix} C_{INV\omega i} \\ C_{INVCi} \end{bmatrix} [\Delta x_{invi}], \quad (15)$$

where

$$[\Delta x_{invi}] = [\Delta \delta_i \Delta P_i \Delta Q_i \Delta \phi_{di} \Delta \phi_{qi} \Delta \gamma_{di} \Delta \gamma_{qi} \Delta i_{ldi} \Delta i_{lqi} \Delta v_{odi} \Delta v_{oqi} \Delta i_{odi} \Delta i_{oqi}]^T. \quad (16)$$

The entire state-space matrices of one inverter are presented in Appendix.
**2.7. Parallel Inverter Model.** A small-signal model of the MG depicted in Figure 2, which is composed of three parallel inverters, can be obtained based on the model of individual inverters developed in (14) and (15), as below:

$$[\Delta\dot{x}_{INV}] = A_{INV}[\Delta x_{INV}] + B_{INV}[\Delta v_{bDQ}], \quad (17)$$

$$[\Delta i_{oDQ}] = C_{INVC}[\Delta x_{INV}], \quad (18)$$

where

$$[\Delta x_{INV}] = [\Delta x_{inv1} \Delta x_{inv2} \Delta x_{inv3}]^T, \quad (19)$$

$$[\Delta v_{bDQ}] = [\Delta v_{bDQ1} \Delta v_{bDQ2} \Delta v_{bDQ3}]^T, \quad (20)$$

$$A_{INV} = \begin{bmatrix} A_{INV1} + B_{1\omega com}C_{INV\omega1} & & \\ & A_{INV2} + B_{2\omega com}C_{INV\omega2} & \\ & & A_{INV3} + B_{3\omega com}C_{INV\omega3} \end{bmatrix}; \\ B_{INV} = \begin{bmatrix} B_{INV1} & & \\ & B_{INV2} & \\ & & B_{INV3} \end{bmatrix}; \quad (21)$$

$$C_{INVc} = \begin{bmatrix} C_{INVc1} & & \\ & C_{INVc2} & \\ & & C_{INVc3} \end{bmatrix}. $$

**2.8. Subsystem Models (Lines and Loads).** For the MG presented in Figure 2, the small-signal state-space model network can be obtained, as shown in equation (22), noticing that the model is in the common DQ reference frame:

$$[\Delta\dot{i}_{lineDQ}] = A_{NET}[\Delta i_{lineDQ}] + B_{1NET}[\Delta v_{bDQ}] + B_{2NET}\Delta\omega, \quad (22)$$

$$[\Delta\dot{i}_{loadDQ}] = A_{LOAD}[\Delta i_{loadDQ}] + B_{1LOAD}[\Delta v_{bDQ}] + B_{2LOAD}\Delta\omega, \\ \text{Where } A_{NET} = \begin{bmatrix} \frac{R_{line1}}{L_{line1}} & \omega_0 & & \\ -\omega_0 & \frac{R_{line1}}{L_{line1}} & & \\ & & \frac{R_{line2}}{L_{line2}} & \omega_0 \\ & & -\omega_0 & \frac{R_{line2}}{L_{line2}} \end{bmatrix}; \quad (23)$$

$$B_{1NET} = \begin{bmatrix} \frac{1}{L_{line1}} & & \frac{1}{L_{line1}} & & & \\ & \frac{1}{L_{line1}} & & \frac{1}{L_{line1}} & & \\ & & \frac{1}{L_{line2}} & & \frac{1}{L_{line2}} & \\ & & & \frac{1}{L_{line2}} & & \frac{1}{L_{line2}} \end{bmatrix}.$$
The matrix coefficient of the load model is almost the same as the network model above, for this is not developed here.

2.9. *Entire Microgrid Model.* To well predict the effects of load perturbation, the input variables vbDQ must be translated into states. This is achieved by adding a large

enough virtual resistance RN between each node and ground. This resistance has a neglected impact on the dynamic stability of the system. Kirchhoff's voltage law can be used to find the equations that describe the bus voltage in terms of the inverter, load currents, and line currents given by

$$[\Delta v_{bDQ}] = R_N(M_{INV}[\Delta i_{oDQ}] + M_{LOAD}[\Delta i_{loadDQ}] + M_{NET}[\Delta i_{lineDQ}]), \quad (24)$$

where $M_{INV}$ maps the DG connection points onto MG network nodes, $M_{LOAD}$ maps load connection points onto nodes, and MNET maps the connecting lines onto nodes. Figure 2 consists of $s=3$ DG, $n=2$ lines, $p=2$ loads, and $m=3$ nodes.

Thus, the 47 ($2n+2p+13s$) order small signal of the entire MG model can be obtained as follows:

$$\begin{bmatrix} \Delta \dot{x}_{INV} \\ \Delta \dot{i}_{lineDQ} \\ \Delta \dot{i}_{loadDQ} \end{bmatrix} = A_{MG} \begin{bmatrix} \Delta x_{INV} \\ \Delta i_{lineDQ} \\ \Delta i_{loadDQ} \end{bmatrix}. \quad (25)$$

$A_{MG}$ is presented in Appendix.

$$\begin{align*}
R_N &= \begin{bmatrix} r_N & & & \\ & \ddots & & \\ & & r_N & \\ & & & r_N \end{bmatrix}_{2m \times 2m} ; \\
M_{LOAD} &= \begin{bmatrix} -1 & & & \\ & 0 & -1 & \\ & 0 & 0 & 0 \\ & & 0 & 0 \\ & & & -1 & 0 \\ & & & & -1 \end{bmatrix}_{2m \times 2p} , \\
M_{INV} &= \begin{bmatrix} 1 & & & \\ & 1 & & \\ & & 1 & \\ & & & 1 \\ & & & & 1 \end{bmatrix}_{2m \times 2s} ; \\
M_{NET} &= \begin{bmatrix} -1 & & & \\ & 0 & -1 & \\ & 1 & 0 & -1 \\ & & 1 & 0 \\ & & & 1 & 0 \\ & & & & 1 \end{bmatrix}_{2m \times 2n} .
\end{align*} \quad (26)$$

The equations without incorporating the virtual impedance can be found in [38].

### 3. Sensitivity Analysis and Virtual Impedance Optimization

To explore how various factors influence the system behavior, particularly the impact of virtual impedance variation on stability, and to establish the stability limits of virtual impedance for future use in optimization algorithms, a sensitivity analysis was conducted. This analysis utilized the linearized system model previously described. The steady-state operating point was determined through time-domain simulations in MATLAB-Simulink, as shown in Table 1. For this purpose, a specific operating point of the system was selected. Based on this operating point, a small-signal model of the test system was developed. The test system stability and behavior were then examined by analyzing its eigenvalues, derived from this model. To cover a broad range of scenarios, different test cases were examined, which are detailed as follows.

Figure 5 presents the eigenvalue spectrum of the system, as derived from the system state matrix AMG, with Rv and Lv set to zero. This spectrum reveals a wide range of frequency components, which can be categorized into three distinct clusters. An analysis of the participation factors of different states in these eigenvalues demonstrates that each cluster corresponds to specific sensitivities in the system. Cluster 1, located closer to the origin and considered the dominant system mode, is particularly sensitive to the state variables of the power controller. These low-frequency dominant modes highlight the critical influence of power control variables. Cluster 2 includes medium frequency modes, which are found to be highly sensitive to the state variables of the inner loop controllers and the output LC filter blocks. This indicates that variables related to voltage and current controllers and the output LC filter significantly impact these medium frequency modes. Cluster 3 represents the high-frequency modes that are situated far from the origin. The analysis indicates that these modes are sensitive to a variety of factors, including the state variables of the LC filter, the coupling inductor blocks, the voltage and current controllers of the inverters, and the network line currents. This diversity in sensitivities points to the complex interplay of factors influencing the high-frequency behavior of the system [38].
<table><caption>TABLE 1: Operating point.</caption><thead><tr><th>Parameter</th><th>Value</th><th>Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Vod</td><td>[380.8 381.8 380.4]</td><td>Voq</td><td>[0 0 0]</td></tr><tr><td>Iod</td><td>[11.4 11.4 11.4]</td><td>Ioq</td><td>[0.4 -1.45 1.25]</td></tr><tr><td>Ild</td><td>[11.4 11.4 11.4]</td><td>Ilq</td><td>[-5.5 -7.3 -4.6]</td></tr><tr><td>Vbd</td><td>[379.5 380.5 379]</td><td>Vbq</td><td>[-6 -6 -5]</td></tr><tr><td>Wn</td><td>[314]</td><td>δ<sub>o</sub></td><td>[0 0.0012 -0.0113]</td></tr><tr><td>Iline1d</td><td>[-3.8]</td><td>Iline1q</td><td>[0.4]</td></tr><tr><td>Iline2d</td><td>[7.6]</td><td>Iline2q</td><td>[-1.3]</td></tr></tbody></table>

<figure><img src="image_7.png" /><figcaption>FIGURE 5: The eigenvalue spectrum of the system.</figcaption></figure>

**3.1. Effect of Active Power Droop Gain on System Eigenvalue Spectrum.** Figure 6 illustrates how two pairs of complex-conjugate dominant low-frequency eigenvalues, belonging to cluster 1, change in response to variations in the active power droop gain mp. The droop gain in this analysis varied between 1.57e-5 and 3.14e-4, which corresponds to a droop range from 0.05% to 1%. This gain, mp, was uniformly applied to all three inverters in the system. The eigenvalues shown in the figure are particularly sensitive to the state variables associated with the active power components of the power controllers in certain inverters. These eigenvalues are indicative of the dynamic interactions and behavior related to the active power sharing among the DGs in the system.

**3.2. Effect of Reactive Power Droop Gain on System Eigenvalue Spectrum.** Figure 7 presents the behavior of low-frequency modes in relation to changes in the reactive power droop gain nq for all three inverters. The droop gain in this analysis varied between 3.17e-4 and 4.8e-3, which corresponds to a droop range from 0.5% to 8%. From the figure, it is observed that the low-frequency modes are generally less sensitive to changes in the reactive power droop gains. However, it is noted that a few other modes within the same cluster show a higher degree of sensitivity. An interesting point is that certain dominant modes become slightly more stable when the reactive power droop gains are larger. The increase in reactive power droop gain is found to enhance the transient response and improve reactive power sharing among the inverters. However, this comes with a trade-off in terms of bus voltage regulation at the load connection points. For instance, a reactive power drop of 8% in the output voltage, though a somewhat extreme example, effectively demonstrates that the system low-frequency dominant modes exhibit a lower sensitivity to changes in

the reactive power droop gain. This aspect is crucial for understanding the balance between system stability and voltage regulation under varying reactive power conditions.

**3.3. Effect of Coupling Inductance on System Eigenvalue Spectrum.** Figure 8 displays how the dominant modes, identified in the context of the system's dynamics, respond to variations in the coupling inductance values for all three inverters. In this analysis, the coupling inductance of each inverter denoted as Lc1, Lc2, and Lc3 is adjusted in uniform steps. The figure reveals that these dominant modes tend to be more stable when the coupling inductance values are higher. This stability improvement with larger inductor values is a key observation. However, it is noted that due to the physical proximity of inverters 1 and 2, the mode related to these two inverters is particularly sensitive to changes in their coupling inductance. This sensitivity can lead to instability at smaller inductance values. While increasing the coupling inductance does enhance the stability margin of the system, it comes with certain drawbacks. These include higher costs associated with larger inductors, increased power losses, and poorer regulation of bus voltage. Therefore, while the adjustment of coupling inductance is an effective method to improve system stability, it requires careful consideration of the associated trade-offs in terms of cost, efficiency, and voltage regulation.

**3.4. Effect of Virtual Impedance Parameters on System Eigenvalue Spectrum.** In Figure 9, the migration of the system's eigenvalues is depicted as a function of the virtual resistance Rv, ranging from 0 to 10 Ω, with the same Rv value applied to all three inverters. The directional arrows in the figure illustrate the path of eigenvalue migration. An increase in Rv is observed to shift the low-frequency mode
<figure><img src="image_8.png" /><figcaption>FIGURE 6: Effect of increasing the active droop gain on system eigenvalue spectrum.</figcaption></figure>

<figure><img src="image_9.png" /><figcaption>FIGURE 7: Effect of increasing the reactive droop gain on system eigenvalue spectrum.</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>FIGURE 8: Effect of coupling inductance on system eigenvalue spectrum.</figcaption></figure>

eigenvalues further from the origin, indicating enhanced damping and greater system stability. However, this increase causes the medium frequency mode eigenvalues to migrate rightwards, making the system more susceptible to variations in the state variables of the inner loop controllers and the output LC filter. This necessitates a careful balance to leverage the benefits for low-frequency modes without significantly impacting the medium frequency modes.

Similarly, Figure 10 presents the trajectory of the system eigenvalues in response to changes in the virtual inductor $L_v$, within the range of 0 to 0.1 H, again uniformly applied to all inverters. The trajectory shows a two-step migration for the low-frequency mode eigenvalues. Initially, an increase in $L_v$ leads to a leftward shift, enhancing the transient response and reducing the system's sensitivity to power control loops. However, the subsequent rightward shift counteracts these benefits. The remaining clusters of eigenvalues predominantly move leftwards, indicating complex effects on the system dynamics due to changes in $L_v$.

**3.5. Virtual Impedance Optimization.** In determining the stability limits of the virtual impedance parameters, a critical eigenvalue analysis was employed. This ensures system stability during the optimization process and enhances

computational efficiency. The established stability limits for the virtual impedance parameters are [0, 8 Ω] for the virtual resistance and [0, 0.03 H] for the virtual inductance. The primary goal of the optimization approach is to minimize the error in reactive power sharing during steady-state conditions and to enhance the transitory response of the system through optimal virtual impedance design. In the realm of metaheuristic algorithms, the GA stands out as a widely recognized population-based stochastic method. It has been extensively used in various research domains, including renewable energy systems and MG design and control, for addressing complex optimization challenges. GA is particularly well-suited for this type of application due to its ability to handle continuous/discrete problems seamlessly. It integrates constraints directly into the genes and conducts searches from multiple points, ensuring a thorough exploration of the solution space. Additionally, its ease of implementation makes it an attractive choice for practical applications [39]. As such, GA has been adopted in this study to determine the optimal values of virtual impedance, thereby improving reactive power sharing. Furthermore, PSO, another prominent metaheuristic algorithm, is also considered in this study. PSO, known for its simplicity and efficiency in converging to optimal solutions, works by
<figure><img src="image_11.png" /><figcaption>FIGURE 9: Effect of increasing the virtual resistance (Rv): 0 < Rv < 10 Ω.</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>FIGURE 10: Effect of increasing the virtual inductance (Lv): 0 < Lv < 0.1 H.</figcaption></figure>

simulating the social behavior of birds or fish. Each particle in the swarm represents a potential solution, and they collectively explore the solution space, influenced by their own experience and that of their neighbors. This algorithm's ability to effectively navigate complex search spaces makes it a valuable tool in optimizing virtual impedance parameters [40]. By employing both GA and PSO, the study uses the strengths of these algorithms to achieve a more robust and effective optimization of virtual impedance. This dual approach ensures a comprehensive exploration of the solution space, leading to more reliable and efficient outcomes in the optimization of reactive power sharing and system response. The reason for adopting droop control is their high capability of sharing active power without using communications. However, it is not the case for reactive power; the mismatch in line impedance causes errors in reactive power sharing. Thus, the integral summation of the reactive power mismatches for all DG units multiplied by their reactive power droop coefficients is to be minimized. As a result, the objective function that must be minimized should be pertinent to the reactive power and formulated in a straightforward manner, to avoid increasing the computational burden, as follows:

$$O.F = \min \sum_{i=1}^{n_{DG}} \sum_{j=1}^{n_{DG}} \left| n_i Q_i - n_j Q_j \right|, \quad (27)$$

where $Q_i$ and $Q_j$ are measured reactive powers of DGi and DGj, respectively, $n_i$ and $n_j$ are the voltage droop coefficients of DGi and DGj, and $n$ is the number of DG units. The optimization function (OF) focuses on minimizing the summation of reactive power mismatches across converters, weighted by their reactive power droop coefficients. The selection of these parameters, alongside others within the

multiterm cost function, is pivotal due to their direct impact on system stability and power sharing efficacy. The chosen values for the simulation are grounded in a balance between theoretical rigor and practical applicability, ensuring an optimal blend of system stability and dynamic responsiveness. This delicate selection process, especially for the reactive power droop coefficients, is crucial as it significantly influences the system's behavior, addressing the control mechanism's sensitivity to parameter variation. Hence, the parameter choices, thoroughly justified and backed by preliminary simulations, underscore their paramount importance in achieving a robust and well-balanced MG control architecture.

The optimization constraints are determined as follows:

$$\begin{cases} R_{vi}^{\min} \le R_{vi} \le R_{vi}^{\max}, \\ L_{vi}^{\min} \le L_{vi} \le L_{vi}^{\max}. \end{cases} \quad (28)$$

The main purpose is to minimize the fitness function (28) based on the constraints in (28).

The flowchart of the GA and PSO algorithms for optimal virtual impedance design is depicted in Figure 11 that can be summarized as follows:

(1) Initialization of the optimization variables which are Lv1, Lv...Lvn, and Rv1, Rv2...Rvn in the predefined range which is considered as the stability limits of the system.

(2) After setting the population and parameters for GA and PSO, GA undergoes selection, crossover, and mutation, while PSO focuses on particle evaluation and updating velocities and positions.

(3) The time-domain simulation under MATLAB Simulink at time = t according to the desired operating points.
(4) Calculation of the objective function.

(5) If the voltage drops exceed their limits, the algorithm resets to the initial step to begin once more.

(6) The voltages in MG must remain in an acceptable range, if the voltage limits are not respected the algorithm returns to the first step to decrease the voltage drops because minimizing the reactive power exchanges implies voltage drops which need to be respected, another solution is to change the voltage set points within the respected boundaries.

(7) If the voltage limits are respected, the algorithm returns the optimal parameters for virtual inductances and resistances.

Note that the optimization algorithm is run offline and the obtained virtual impedances are then used in converter controllers.

The GA/PSO algorithm is being utilized with parameters detailed in Table 2, and the convergence of GA and PSO algorithms is demonstrated in Figure 12. The optimal values for the virtual resistances and inductances were successfully determined. These values, essential for the control loops of the converters, are comprehensively presented in Table 3.

Figure 13 displays the eigenvalue maps for the system with and without the implemented virtual impedance, using both GA and PSO methods. It is evident that the eigenvalues of the low-frequency modes with the optimally tuned virtual impedance have shifted leftwards. This shift signifies enhanced system stability and improved dynamic response, providing greater damping. Notably, the GA method resulted in a more stable system compared to the PSO.

**4. Validation of the Proposed Approach**

A 3-bus MG, as depicted in Figure 2, was modeled in MATLAB-Simulink using optimal control parameters. This simulation aimed to evaluate its steady-state and transient performance in an islanded operation mode. For the simulation, a constant voltage was maintained for the dc buses, with the inverter parameters detailed in Table 4. The primary goal of the proposed optimal virtual impedances was to improve dynamic response and enhance reactive power sharing under various operating conditions. The transient performance was tested by applying a step change in the load at bus 1 from 0.5 to 1 second, leading to significant disturbances in active and reactive power sets. In parallel, a comprehensive comparison of two optimized methods, GA and PSO, against a conventional method was performed, focusing on active/reactive power, frequency, and converters' current component responses during both steady-state and transient operations. This included scenarios like black starts or load disturbances at 0.5 seconds.

4.1. *Inverters' Output Power and Frequency.* Figure 14(a) shows a comprehensive comparison between two optimized methods, GA and PSO, and a conventional method; as it can be seen in Figure 14(a), the GA and PSO methods were observed to ensure equal active power sharing among

inverters in steady-state operation, signifying effective load distribution and system balance. In contrast, the conventional method encountered significant issues during transient operations, such as large overshoots, low-frequency oscillations, and a faster yet less effective rise time, indicating its instability and inefficiency in response to sudden changes. The analysis further detailed specific performance metrics over the interval of 0.5 s to 1 s. The conventional method, though showing a slightly faster rise time, suffered from significantly higher overshoot percentages and longer settling times. This was indicative of a more aggressive but less controlled response. For instance, the rise times under the conventional method were 0.102 s for DG1, 0.072 s for DG2, and 0.015 s for DG3, which were generally faster than those under the GA (0.079 s for DG1, 0.069 s for DG2, and 0.022 s for DG3) and PSO methods (0.09 s for DG1, 0.069 s for DG2, and 0.024 s for DG3). However, this speed came at the cost of stability. In terms of overshoot, the conventional method significantly underperformed, with overshoots of 30% for DG1, 5.5% for DG2, and 54% for DG3, compared to much lower values in the GA (7.0% for DG1, 0.04% for DG2, and 8.3% for DG3) and PSO methods (8.7% for DG1, 0.05% for DG2, and 14% for DG3). This highlighted the conventional method's tendency to react excessively to disturbances. The settling times further emphasized the superiority of the GA and PSO methods. The GA method had settling times of 0.15 s for DG1, 0.10 s for DG2, and 0.16 s for DG3, and the PSO method had slightly longer times of 0.17 s for DG1, 0.11 s for DG2, and 0.20 s for DG3. In contrast, the conventional method exhibited the longest settling times, with 0.46 s for DG1, 0.31 s for DG2, and 0.49 s for DG3.

The reactive output of the inverters, depicted in Figure 14(b), was analyzed, revealing significant insights despite no reactive loads being connected to the system. Due to line impedance mismatches, there was an exchange of reactive power between inverters. For the conventional method, a substantial amount of reactive power exchange was observed, especially before the load disturbance was introduced, with values of -1.5 k Var, -0.5 k Var, and 2 k Var. This exchange was accompanied by large overshoots and low-frequency oscillations. After the load disturbance at bus 1, this amount decreased (-0.1 k Var, -0.7 k Var, 1 k Var), but it remained significant, highlighting a flaw in droop control. In contrast, the GA method, as seen in Figure 14(b), showed a minimal amount of circulating reactive power (-0.05 k Var, 0 Var, 0.18 k Var), without low-frequency oscillations and with fewer overshoots. After the load disturbance, the reactive power values were negligible (0 Var, 0 Var, 0.1 k Var), confirming the effectiveness of the GA method in enhancing reactive power sharing. Furthermore, the PSO method also demonstrated small amounts of circulating currents (-0.2 k Var, 0.1 k Var, 0.3 k Var) before and (0 Var, -0.1 k Var, 0.18 k Var) after the load perturbation. However, the GA method proved to be superior in reactive power sharing, characterized by an absence of low-frequency oscillations and reduced overshoots. Data from Table 5 reinforced these findings. The peak overshoots for DGs using the enhanced GA method were much lower than those using the
<figure><img src="image_13.png" /><figcaption>FIGURE 11: Continued.</figcaption></figure>
<figure><img src="image_14.png" /><figcaption>FIGURE 11: Flowchart algorithm for virtual impedance optimization: (a) GA; (b) PSO.</figcaption></figure>

<table><caption>TABLE 2: GA and PSO parameters.</caption><thead><tr><th>GA</th><th>PSO</th></tr></thead><tbody><tr><td>Max.iterations: 500</td><td>Max.iterations: 500</td></tr><tr><td>Population size: 10</td><td>Swarm size: 10</td></tr><tr><td>Selection: roulette</td><td>v<sub>max</sub>: 20% of a search range</td></tr><tr><td>Mutation (rate): uniform (0.1)</td><td>[w<sub>min</sub> w<sub>max</sub>] = [0.40, 9]</td></tr><tr><td>Crossover (rate): arithmetic (1.5)</td><td>[c1, c2] = [2, 2]</td></tr></tbody></table>

conventional method. Specifically, the GA method showed overshoots of 0.5%, 4.0%, and 3.5% for DG1, DG2, and DG3, respectively, compared to the conventional method's 39%, 17%, and 30%. Additionally, higher overshoots in the conventional method implied longer settling times, with values of 0.48 s, 0.40 s, and 0.50 s for DG1, DG2, and DG3, respectively, against the GA method's significantly shorter times of 0.09 s, 0.09 s, and 0.10 s. These metrics clearly illustrate the superiority of the GA method over the conventional method in terms of reactive power sharing and system stability.

The frequency dynamic responses depicted in Figure 14(c) are presented for both the conventional method and the proposed optimal approaches during black starts and subsequent load connections. These responses, related to the active power response, mirror the active power due to their control by a P-f droop mechanism. It is observed that the conventional method exhibits notable drawbacks, including significant overshoots and low-frequency oscillations. These issues are indicative of increased heat losses, leading to a reduced lifecycle for the connected loads. Conversely, the frequency responses under the proposed
<figure><img src="image_15.png" /><figcaption>FIGURE 12: Convergence of GA and PSO algorithms.</figcaption></figure>

<table><caption>TABLE 3: Optimized virtual impedances.</caption><thead><tr><th>Virtual parameters</th><th>R<sub>v1</sub></th><th>R<sub>v2</sub></th><th>R<sub>v3</sub></th><th>L<sub>v1</sub></th><th>L<sub>v2</sub></th><th>L<sub>v3</sub></th></tr></thead><tbody><tr><td>GA</td><td>0.037</td><td>0.016</td><td>0.064</td><td>0.02</td><td>0.018</td><td>0.017</td></tr><tr><td>PSO</td><td>0.020</td><td>0.077</td><td>0.038</td><td>0.008</td><td>0.02</td><td>0.025</td></tr></tbody></table>

<figure><img src="image_16.png" /><figcaption>FIGURE 13: Comparison of eigenvalues trace: with optimal virtual impedance (GA and PSO) vs. without virtual impedance.</figcaption></figure>
<table><caption>TABLE 4: 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">Droop 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/sec</td><td>V<sub>n</sub></td><td>381 V</td></tr><tr><td>Wc</td><td>31.41 rad/sec</td><td></td><td></td></tr><tr><th colspan="2">Voltage controller</th><th colspan="2">Current controller</th></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>1.6 × 10<sup>4</sup></td></tr><tr><td>Bandwidth</td><td>400 Hz</td><td>Bandwidth</td><td>1.6 kHz</td></tr><tr><td>F</td><td>0.75</td><td></td><td></td></tr><tr><th colspan="4">Line and load parameters (see Figure 2)</th></tr></tbody></table>

<figure><img src="image_17.png" /><figcaption>FIGURE 14: Continued.</figcaption></figure>
<figure><img src="image_18.png" /><figcaption>FIGURE 14: Comparison of conventional control method with the proposed optimal methods: (a) active power; (b) reactive power; (c) frequency.</figcaption></figure>

<table><caption>TABLE 5: Comparison of time-domain specifications between the conventional method and the proposed control diagram.</caption><thead><tr><th rowspan="2">Sl. No</th><th rowspan="2">Parameters</th><th colspan="3">Proposed GA [0, 0.5 s]</th><th colspan="3">Proposed PSO [0, 0.5 s]</th><th colspan="3">Conventional [0, 0.5 s]</th></tr><tr><th>DG1</th><th>DG2</th><th>DG3</th><th>DG1</th><th>DG2</th><th>DG3</th><th>DG1</th><th>DG2</th><th>DG3</th></tr></thead><tbody><tr><td rowspan="3">1</td><td>Active power (P)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>tr (s)</td><td>0.079</td><td>0.069</td><td>0.022</td><td>0.09</td><td>0.069</td><td>0.024</td><td>0.102</td><td>0.072</td><td>0.015</td></tr><tr><td>Mp (%)</td><td>7.0</td><td>0.04</td><td>8.3</td><td>8.7</td><td>0.05</td><td>14</td><td>30</td><td>5.5</td><td>54</td></tr><tr><td></td><td>ts (s)</td><td>0.15</td><td>0.10</td><td>0.16</td><td>0.17</td><td>0.11</td><td>0.20</td><td>0.46</td><td>0.31</td><td>0.49</td></tr><tr><td rowspan="3">2</td><td>Reactive power (Q)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>tr (s)</td><td>DG1</td><td>DG2</td><td>DG3</td><td>DG1</td><td>DG2</td><td>DG3</td><td>DG1</td><td>DG2</td><td>DG3</td></tr><tr><td>Mp (%)</td><td>0.06</td><td>0.06</td><td>0.07</td><td>0.08</td><td>0.07</td><td>0.09</td><td>0.06</td><td>0.07</td><td>0.07</td></tr><tr><td></td><td>ts (s)</td><td>0.5</td><td>4.0</td><td>3.5</td><td>9</td><td>3</td><td>6</td><td>39</td><td>17</td><td>30</td></tr><tr><td></td><td></td><td>0.09</td><td>0.09</td><td>0.10</td><td>0.2</td><td>0.12</td><td>0.13</td><td>0.48</td><td>0.40</td><td>0.50</td></tr><tr><td rowspan="3">3</td><td>iod</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>tr (s)</td><td>DG1</td><td>DG2</td><td>DG3</td><td>DG1</td><td>DG2</td><td>DG3</td><td>DG1</td><td>DG2</td><td>DG3</td></tr><tr><td>Mp (%)</td><td>0.04</td><td>0.02</td><td>0.0007</td><td>0.06</td><td>0.04</td><td>0.07</td><td>0.07</td><td>0.03</td><td>0.0007</td></tr><tr><td></td><td>ts (s)</td><td>24</td><td>11</td><td>80</td><td>20</td><td>9</td><td>10</td><td>50</td><td>22</td><td>86</td></tr><tr><td></td><td></td><td>0.2</td><td>0.15</td><td>0.2</td><td>0.24</td><td>0.3</td><td>0.27</td><td>0.49</td><td>0.45</td><td>0.49</td></tr><tr><td rowspan="3">4</td><td>ioq</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>tr (s)</td><td>DG1</td><td>DG2</td><td>DG3</td><td>DG1</td><td>DG2</td><td>DG3</td><td>DG1</td><td>DG2</td><td>DG3</td></tr><tr><td>Mp (%)</td><td>0.02</td><td>0.006</td><td>0.01</td><td>0.04</td><td>0.06</td><td>0.06</td><td>0.05</td><td>0.014</td><td>0.3</td></tr><tr><td></td><td>ts (s)</td><td>10</td><td>13</td><td>25</td><td>25</td><td>50</td><td>10</td><td>60</td><td>44</td><td>43</td></tr><tr><td></td><td></td><td>0.1</td><td>0.4</td><td>0.13</td><td>0.2</td><td>12</td><td>26</td><td>0.48</td><td>0.4</td><td>0.47</td></tr></tbody></table>

optimal controls, employing GA and PSO, demonstrate marked improvements. Notably, these methods exhibit reduced overshoots, which correlate with shorter settling times and fewer oscillations. However, it is important to note the presence of some signal ripples in the GA approach, as seen in Figure 14(c). These ripples are less pronounced in the PSO method, highlighting a subtle yet significant difference in the performance of the two optimization techniques.

## 4.2. Converters' Output Current Components.
Based on Figure 15, the Ioq current (q-axis current component) using the conventional method exhibits different values of current (DG1 = 4 A, DG2 = 1 A, and DG3 = -5 A) for all three inverters. However, the inclusion of optimal virtual impedance

based on GA and PSO (yielding similar results) effectively equalizes these values across all inverters (DG1 ≈ DG2 ≈ DG3 ≈ 0 A). This uniformity indicates the success of the proposed optimal virtual impedances in eliminating q-component current exchange between Distributed Generators (DGs).

The time-domain performance specifications post-load connection, as detailed in Table 5, reveal significant differences when optimal virtual impedance is used, resulting in faster settling times and improved damping for both dq-axis current components. Comparing the three methods—Proposed GA, Proposed PSO, and Conventional—using the table's data, several observations can be made. Firstly, the rise time is notably shorter for the conventional method in DG3 (0.0007 s), indicating a more rapid
<figure><img src="image_19.png" /><figcaption>FIGURE 15: Comparison of output currents in conventional control method with proposed optimal methods: (a) inverter 1; (b) inverter 2; (c) inverter 3.</figcaption></figure>

initial response. However, the proposed GA and PSO methods demonstrate more consistent and generally shorter rise times across DG1 and DG2, suggesting a more uniform and controlled response. Secondly, the overshoot percentages are significantly lower with the proposed GA and PSO methods compared to the conventional method. This is particularly evident in DG3, where the conventional

method overshoot reaches 86%, while the proposed methods substantially reduce it to 80% (GA) and 10% (PSO). Lastly, the settling times observed with the proposed methods are considerably shorter than those with the conventional method, indicating that the proposed approaches enable the system to achieve stability more quickly and effectively.
<figure><img src="image_20.png" /><figcaption>FIGURE 16: Comparison of measured PCC RMS voltage in conventional control method with proposed optimal methods.</figcaption></figure>

<figure><img src="image_21.png" /><figcaption>FIGURE 17: Spectrum of the voltage (a) and current (b) at the point of common coupling under GA optimal virtual impedances.</figcaption></figure>

### 4.3. PCC Voltage RMS.
In Figure 16, the Point of Common Coupling (PCC) RMS voltage of DGs using the proposed GA, PSO, and conventional methods is depicted. The observation reveals that the load voltage is effectively maintained within permissible limits across all methods. A notable aspect is the voltage drop exhibited by the GA method, which is around 1.3%—a value that is comfortably below the 3% threshold. This voltage drop is intrinsically linked to the cost of reactive power sharing, a factor that should be duly considered during the design process, particularly in the optimization of algorithms. It is important to note that the q-axis voltage component (voq) for both the GA and PSO methods remains zero in the steady-state regime, as dictated by the control diagram. The d-axis output voltage displays uniform values across all three inverters, irrespective of whether the GA or PSO algorithm is used. Despite load changes, the voltage remains within the permitted interval for both approaches, with a drop that does not exceed the acceptable limit of 3%. Additionally, there is a slight improvement in voltage overshoots, decreasing from 0.13% in the conventional method to 0.09% in both the GA and PSO approaches.

Turning to Total Harmonic Distortion (THD), Figure 17 illustrates the THD analysis of the load voltage and current using the GA approach, performed with the MATLAB FFT toolbox. This analysis indicates that the THD is kept within permissible limits for both voltage and current, measuring 2.1% and 2.23%, respectively. This compliance with THD limits underscores the effectiveness of the GA approach in

maintaining the quality of power supply, reflecting its capability to manage harmonics within acceptable ranges.

### 4.4. Nonlinear Load Test.
To assess the effectiveness of the proposed GA-based control scheme under nonlinear loading conditions, a rectifier-based load circuit was employed. Figures 18(a) and 18(b) illustrate the successful maintenance of accurate active and reactive power sharing, in contrast to the conventional approach where a significant disparity in reactive power sharing is evident, as shown in Figure 18(c). Furthermore, the frequency dynamics remain stable without any perturbations, confirming the system's stability. The waveforms of the nonlinear load current are also presented in Figure 18(d), showing a peak-to-peak ripple of less than 3%, reinforcing the system's capability to efficiently manage nonlinear load dynamics with minimal distortion.

### 4.5. Reactive Power Step.
An additional test scenario was conducted to validate the efficacy of reactive power sharing. This test involved introducing a reactive load step of 5 k VAR at bus number 1 and $t=0.5$ s, utilizing the Simpower system load. It is important to note that this scenario does not represent a real-case scenario. Figure 19 shows the reactive power sharing dynamics among conventional, optimized GA, and PSO approaches. In the timeframe from 0 s to 1 s, the GA-optimized approach demonstrated superior precision in reactive power distribution compared to both the PSO and conventional methods. Notably, the GA method
<figure><img src="image_22.png" /><figcaption>FIGURE 18: Comparison of conventional method with GA proposed method under nonlinear (a) active power; (b) reactive power; (c) frequency; and (d) current.</figcaption></figure>

ensured an equitable distribution of the reactive load across the inverters. Between 0 and 0.5 seconds, the reactive power contributions from DG1, DG2, and DG3 were maintained at 0 k VAR, signifying a balanced initial state. This state transitioned between 0.5 s and 1 s, with DG1 contributing 1.6 k VAR, DG2 at 1.7 k VAR, and DG3 at 1.8 k VAR, illustrating a near-uniform load sharing. Conversely, the PSO approach exhibited less optimal reactive power distribution. Initially, from 0 to 0.5 seconds, the values for DG1, DG2, and DG3 were recorded at -0.2 k VAR, -0.1 k VAR, and 0.4 k VAR, respectively. This denotes a slight imbalance in the reactive power sharing, which somewhat improved from 0.5 s to 1 s, with the values adjusting to 1.6 k VAR for DG1,

1.5 k VAR for DG2, and 1.8 k VAR for DG3. The conventional method, however, showed a marked disparity in reactive power sharing. In this method, the reactive load predominantly relied on inverter one, primarily due to its proximity to the load. This resulted in unequal distribution, as evidenced from 0 to 0.5 seconds with DG1 at -0.1 k VAR, DG2 at -0.7 k VAR, and DG3 at 0.9 k VAR. The negative values indicate the presence of circulating currents from DG3 to DG1 and DG2. This disparity became more pronounced from 0.5 s to 1 s, with DG1 bearing a significant portion of the load at 4.1 k VAR, compared to 0.6 k VAR for DG2 and 0.3 k VAR for DG3. Such an uneven distribution poses a risk of overloading the closest inverter (in this case,
<figure><img src="image_23.png" /><figcaption>FIGURE 19: Comparative analysis of reactive power sharing: GA, PSO, and conventional methods.</figcaption></figure>

DG1), potentially leading to equipment damage or failure. It is important to note that voltage drop should be carefully considered in the design process to ensure it remains within an acceptable range, typically achieved by adjusting the voltage settings.

**5. Conclusions**

In conclusion, this study presents a substantial advance-
ment in MG technology, emphasizing the enhancement of
system stability and reactive power sharing accuracy. The
research introduces a novel small-signal model for island
MGs. It incorporates virtual impedances and uses GA and
PSO for comparative analysis to identify optimal virtual
impedance configurations. Moreover, a detailed sensitivity
analysis is conducted. This analysis assesses how changes in
virtual impedance affect system stability. The simulation
results, carried out using MATLAB-Simulink software,
clearly demonstrate the superiority of the proposed
methodology over traditional approaches. This study im-
proves reactive power sharing while also demonstrating

a significant improvement in the system's stability and
dynamic response during load changes. Specifically, the
simulation results show a reduction in response time by up
to 20%, a decrease in overshoot percentage by approxi-
mately 15%, and an improvement in settling time of nearly
25%.

It is noted that one of the limitations is associated with
assuming a constant DC bus, and it is recommended that
a variable DC bus model can be utilized in future research to
analyze the impact of this assumption on reactive power
sharing more accurately. Processing requirements can be
saved and practicality can be increased through the sim-
plification of small-signal model. For dynamic assessment,
the utilization of the optimization strategy online can en-
hance the performance further, particularly when there are
load variations. The concentration of the study on a par-
ticular MG configuration brings attention to the necessity of
additional research evaluating the methodology's adaptation
to various configurations in order to achieve a reactive
power-sharing solution that is more widely applicable and
adaptable.
# Data Availability

No data were used to support this study.

# Conflicts of Interest

The authors declare that they have no conflicts of interest.

# Acknowledgments

Open-access funding was enabled and organized by COUPERIN CY23.

# References

[1] A. Agarwala, "Towards next generation power grid transformer for renewables: technology review," 2023.

[2] J. Gallegos, P. Arévalo, C. Montaleza, and F. Jurado, "Sustainable electrification—advances and challenges in electrical-distribution networks: a review," *Sustainability*, vol. 16, no. 2, p. 698, 2024.

[3] M. B. Abdelghany, A. Al-Durra, and F. Gao, "A coordinated optimal operation of a grid-connected wind-solar microgrid incorporating hybrid energy storage management systems," *IEEE Transactions on Sustainable Energy*, vol. 15, no. 1, pp. 39–51, 2024.

[4] E. Elbouchikhi, M. F. Zia, M. Benbouzid, and S. El Hani, "Overview of signal processing and machine learning for smart grid condition monitoring," *Electronics*, vol. 10, no. 21, p. 2725, 2021.

[5] N. K. Saxena, A. Kumar, and D. Wenzhong Gao, "Review of excitation techniques for squirrel cage induction generator based micro grid using dynamic compensation," *Electric Power Components and Systems*, vol. 50, no. 3, pp. 149–165, 2022.

[6] N. K. Saxena, A. Kumar, and V. Gupta, "Enhancement of system performance using STATCOM as dynamic compensator with squirrel cage induction generator (SCIG) based microgrid," *International Journal of Emerging Electric Power Systems*, vol. 22, no. 2, pp. 177–189, 2021.

[7] N. K. Saxena, A. R. Gupta, S. Mekhilef et al., "Firefly Algorithm based LCL filtered grid-tied STATCOM design for reactive power compensation in SCIG based Micro-grid," *Energy Reports*, vol. 8, pp. 723–740, 2022.

[8] N. K. Saxena, A. Gupta, M. F. Jalil, V. Gupta, and R. Bansal, "LCL filter design of STATCOM using genetic algorithm scheme for SCIG based microgrid operation," *Electric Power Components and Systems*, pp. 1–14, 2023.

[9] I. Bennia, Y. Daili, and A. Harrag, "LCL filter design for low voltage-source inverter," *présenté à Artificial Intelligence and Heuristics for Smart Energy Efficiency in Smart Cities: Case Study: Tipasa, Algeria*, pp. 332–341, Springer, Berlin, Germany, 2022.

[10] M. B. Abdelghany, V. Mariani, D. Liuzza, O. R. Natale, and L. Glielmo, "A unified control platform and architecture for the integration of wind-hydrogen systems into the grid," *IEEE Transactions on Automation Science and Engineering*, 2023.

[11] S. Sharma, B. K. Chauhan, and N. K. Saxena, "Artificial neural network grid-connected MPPT-based techniques for hybrid PV-WIND with battery energy storage system," *Journal of The Institution of Engineers (India): Series B*, vol. 104, no. 6, pp. 1217–1226, 2023.

# International Transactions on Electrical Energy Systems

[12] N. K. Saxena, S. Sharma, and B. K. Chauhan, "Grid connected fuzzy logic control-based MPPT techniques for hybrid photovoltaic wind with battery system," *International Journal of Power and Energy Conversion*, vol. 1, no. 1, pp. 280–309, 2023.

[13] Z. Medghalchi and O. Taylan, "A novel hybrid optimization framework for sizing renewable energy systems integrated with energy storage systems with solar photovoltaics, wind, battery and electrolyzer-fuel cell," *Energy Conversion and Management*, vol. 294, Article ID 117594, 2023.

[14] I. Bennia, A. Harrag, Y. Daili, A. Bouzid, and J. M Guerrero, "Decentralized secondary control for frequency regulation based on fuzzy logic control in islanded microgrid," *Indonesian Journal of Electrical Engineering and Computer Science*, vol. 29, no. 1, pp. 85–100, 2022.

[15] M. B. Abdelghany, V. Mariani, D. Liuzza, and L. Glielmo, "Hierarchical model predictive control for islanded and grid-connected microgrids with wind generation and hydrogen energy storage systems," *International Journal of Hydrogen Energy*, vol. 51, pp. 595–610, 2024.

[16] W. Issa, S. Sharkh, and M. Abusara, *A Review of Recent Control Techniques of Drooped Inverter-Based AC Microgrids*, Wiley, Hoboken, NJ, USA, 2023.

[17] I. Bennia, E. Elbouchikhi, A. Harrag et al., "Design, modeling, and validation of grid-forming inverters for frequency synchronization and restoration," *Energies*, vol. 17, no. 1, p. 59, 2023.

[18] V. Gali, P. K. Jamwal, and N. Gupta, "Stability enhancement of grid side converter in PV-wind-BESS based microgrid under weak grid conditions," *Electric Power Systems Research*, vol. 221, Article ID 109481, 2023.

[19] Y. Daili, A. Harrag, and I. Bennia, "New droop control technique for reactive power sharing of parallel inverters in islanded microgrid," *présenté à Artificial Intelligence and Renewables Towards an Energy Transition 4*, Springer, Berlin, Germany, 2021.

[20] Q.-C. Zhong and Y. Zeng, "Universal droop control of inverters with different types of output impedance," *IEEE Access*, vol. 4, pp. 702–712, 2016.

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

[22] A. Arabpour and H. Hojabri, "An improved centralized/decentralized accurate reactive power sharing method in AC microgrids," *International Journal of Electrical Power & Energy Systems*, vol. 148, Article ID 108908, 2023.

[23] S. Islam, A. Khalfalla, M. Hamoud, H. Mehrjerdi, A. Iqbal, and V. Marzang, "« Distributed secondary controller to minimize circulating current flowing among sources in DC microgrid," *IEEE Access*, vol. 11, pp. 89488–89505, 2023.

[24] N. K. Saxena, W. D. Gao, A. Kumar, S. Mekhilef, and V. Gupta, "Frequency regulation for microgrid using genetic algorithm and particle swarm optimization tuned STATCOM," *International Journal of Circuit Theory and Applications*, vol. 50, no. 9, pp. 3231–3250, 2022.

[25] N. K. Saxena and A. Kumar, "Reactive power control in decentralized hybrid power system with STATCOM using GA, ANN and ANFIS methods," *International Journal of Electrical Power & Energy Systems*, vol. 83, pp. 175–187, 2016.
[26] J. M. Guerrero, L. GarciadeVicuna, J. Matas, M. Castilla, and J. Miret, "Output impedance design of parallel-connected UPS inverters with wireless load-sharing control," *IEEE Transactions on Industrial Electronics*, vol. 52, no. 4, pp. 1126-1135, 2005.

[27] Y. Wang, J. Tang, J. Si, X. Xiao, P. Zhou, and J. Zhao, "Power quality enhancement in islanded microgrids via closed-loop adaptive virtual impedance control," *Protection and Control of Modern Power Systems*, vol. 8, no. 1, p. 10, 2023.

[28] J. He, Y. W. Li, J. M. Guerrero, F. Blaabjerg, and J. C. Vasquez, "An islanding microgrid power sharing approach using enhanced virtual impedance control scheme," *IEEE Transactions on Power Electronics*, vol. 28, no. 11, pp. 5272-5282, 2013.

[29] A. Tuladhar, H. Jin, T. Unger, and K. Mauch, "Control of parallel inverters in distributed AC power systems with consideration of line impedance effect," *IEEE Transactions on Industry Applications*, vol. 36, no. 1, pp. 131-138, 2000.

[30] X. Wang, Y. W. Li, F. Blaabjerg, and P. C. Loh, "Virtual-impedance-based control for voltage-source and current-source converters," *IEEE Transactions on Power Electronics*, vol. 30, no. 12, pp. 7019-7037, 2015.

[31] C. Blanco, D. Reigosa, J. C. Vasquez, J. M. Guerrero, and F. Briz, "Virtual admittance loop for voltage harmonic compensation in microgrids," *IEEE Transactions on Industry Applications*, vol. 52, no. 4, pp. 3348-3356, 2016.

[32] Y. Zhu, F. Zhuo, F. Wang, B. Liu, R. Gou, and Y. Zhao, "A virtual impedance optimization method for reactive power sharing in networked microgrid," *IEEE Transactions on Power Electronics*, vol. 31, no. 4, pp. 2890-2904, 2016.

[33] Z. Peng, J. Wang, D. Bi et al., "Droop control strategy incorporating coupling compensation and virtual impedance for microgrid application," *IEEE Transactions on Energy Conversion*, p. 1, 2019.

[34] B. Pournazarian, S. S. Seyedalipour, M. Lehtonen, S. Taheri, and E. Pouresmaeil, "Virtual impedances optimization to enhance microgrid small-signal stability and reactive power sharing," *IEEE Access*, vol. 8, pp. 139691-139705, 2020.

[35] M. Izadi and A. Akbari Foroud, "Harmonic reduction of three-phase power inverter injection current using virtual admittance," *International Transactions on Electrical Energy Systems*, vol. 31, no. 2, Article ID e12739, 2021.

[36] K. Sabzevari, S. Karimi, F. Khosravi, and H. Abdi, "Modified droop control for improving adaptive virtual impedance strategy for parallel distributed generation units in islanded microgrids," *International Transactions on Electrical Energy Systems*, vol. 29, no. 1, p. e2689, Article ID e2689, 2019.

[37] I. Bennia, A. Harrag, and Y. Daili, "Adaptive resonant controller based SOGI-FLL for three-phase voltage source inverters," in *Proceedings of the 2022 19th International Multi-Conference on Systems, Signals & Devices (SSD)*, pp. 756-762, IEEE, Sétif, Algeria, May 2022.

[38] N. Pogaku, M. Prodanovic, and T. C. Green, "Modeling, analysis and testing of autonomous operation of an inverter-based microgrid," *IEEE Transactions on Power Electronics*, vol. 22, no. 2, pp. 613-625, 2007.

[39] S. Katoch, S. S. Chauhan, and V. Kumar, "A review on genetic algorithm: past, present, and future," *Multimedia Tools and Applications*, vol. 80, no. 5, pp. 8091-8126, 2021.

[40] A. Tharwat and W. Schenck, "A conceptual and practical comparison of PSO-style optimization algorithms," *Expert Systems with Applications*, vol. 167, Article ID 114430, 2021.