Abstract

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-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 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 and reactive 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 and are defined by the following equation:where is the cutoff frequency of the low-pass filter and , , , and are the sensed voltages and currents in the dq reference frame. Hence, the linearized model of power control can be expressed as follows:

2.2. Virtual Impedance Equations

As written in equation (3), the virtual impedance is added in the droop control voltage loop, where , , and 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.

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:where and denote the nominal voltage and frequency and and 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 for each inverter is defined as follows:where 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 while axes (d-q)1 and (d-q)2 are the reference frames of the second and third inverters rotating at and , 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:where , and are the voltage controller’s proportional and integral gains, respectively; 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:where , and denote the proportional and integral gains of current, respectively; , and denote the filter dq currents; and 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.

The state-space equations in (9) are obtained by linearizing (8) around the operational points:where , are the dq axis nodes voltages; , are the inverter voltages in the dq frame, respectively; and , , , , , , are steady-state values at the examined operating point.

2.6. Complete Inverter Model

To interface the output variables to the entire system model, they must be transferred to the common DQ frame using the transformation matrix as exhibited in (10) and (11):

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

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:

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

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:where

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:where

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:

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 bywhere maps the DG connection points onto MG network nodes, 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:

is presented in Appendix.

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].

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 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 Lv, 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 Lv 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 Lv.

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 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:where and are measured reactive powers of DGi and DGj, respectively, and 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:

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 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 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 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.

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 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, 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 advancement 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 improves 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 approximately 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 simplification of small-signal model. For dynamic assessment, the utilization of the optimization strategy online can enhance the performance further, particularly when there are load variations. The concentration of the study on a particular 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.

Appendix

Algebraic Matrix for Microgrid Model

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.