1. Introduction
In the context of the accelerating global energy transition and the deepening implementation of the “dual carbon” strategy, the penetration rate of distributed generation (DG), represented by wind and photovoltaic (PV) power, continues to rise in power systems. This has made microgrid technology a key carrier for the flexible consumption of distributed energy and efficient grid management [
1,
2]. Microgrids operate in two modes: grid-connected and islanded, with stable operation under islanded mode being particularly critical [
3]. When a microgrid disconnects from the main grid and enters islanded operation, the system loses the rigid voltage and frequency support provided by the large grid. Consequently, it becomes highly susceptible to random load fluctuations, intermittent output changes from renewable energy sources, and network topology switching, facing severe challenges such as uneven power sharing and dynamic instability of voltage and frequency [
4]. To address the issues of low inertia and weak damping characterizing high-penetration power-electronic-based power systems, virtual synchronous generator (VSG) control technology has emerged as a solution [
5]. By simulating the rotor motion equations and electromagnetic transient characteristics of synchronous generators in the inverter control loop, VSG provides necessary inertia support and damping, becoming a mainstream control scheme for enhancing frequency and voltage stability in islanded microgrids [
6,
7].
However, traditional VSG control essentially relies on active power–frequency (P-f) and reactive power–voltage (Q-V) droop characteristics to achieve multi-unit parallel operation [
8]. Although this mechanism facilitates autonomous power sharing, it introduces unavoidable inherent limitations when confronting load fluctuations and non-homogeneous physical networks. On the one hand, traditional droop control relies on a passive error-accumulation mechanism to respond to load variations. When an islanded microgrid is subjected to sudden load fluctuations, this passive response mechanism struggles to rapidly establish a new power equilibrium. Consequently, the system becomes highly susceptible to severe dynamic frequency and voltage dips, or even transient instability, thereby degrading the overall power quality [
9]. On the other hand, in low-voltage microgrids, line impedances typically exhibit resistive-inductive characteristics, and their parameters often display significant spatial disparities due to varying physical locations. Such non-homogeneous line impedances directly result in mismatched equivalent output impedances among DG units, thereby invalidating the power decoupling assumptions underlying traditional P-f and Q-V droop controls. The resultant active-reactive power coupling not only impedes the precise sharing of reactive power proportional to DG capacities but also triggers high-frequency oscillations and severe reactive circulating currents among parallel inverters [
10], which severely compromise the operational security and equipment reliability of the microgrid [
11]. To overcome the limitations of primary control, existing research widely adopts a hierarchical control architecture, introducing a secondary control layer to achieve zero-error recovery of frequency and voltage, as well as precise power sharing. Early secondary control mostly adopted a centralized architecture, which relies heavily on a central controller and high-bandwidth communication, posing a risk of single-point failure [
12,
13].
Compared with centralized schemes, distributed control strategies utilize sparse communication networks, offering advantages such as strong robustness, low communication costs, high reliability, and ease of system expansion. Reference [
14] added an integral feedforward compensation loop to distributed secondary control, achieving frequency difference elimination between inverters without communication. Reference [
15] added a secondary frequency regulation strategy to the droop control, allowing frequency to autonomously recover to nominal values in standalone microgrids, but neither considered the restoration of reactive power and voltage. Reference [
16] proposed an improved Q-V droop control strategy that effectively improved voltage control precision, yet the system voltage could not be accurately restored to the nominal value. Reference [
17] applied virtual impedance technology and fractional-order PI controllers to secondary frequency regulation; however, focusing primarily on local circuit topology control without distributed multi-unit coordination, it is rendered inadequate for complex microgrids featuring heterogeneous impedances. Reference [
18] presents a decentralized adaptive virtual impedance framework that dynamically modulates virtual impedance utilizing local output currents to facilitate accurate power sharing. To augment dynamic stability, the authors in [
19] leverage a model based on small signal analysis to execute the offline parameter tuning of both droop and dual closed-loop controllers via a hybrid optimization algorithm. Nevertheless, the scope of these methodologies remains strictly restricted to the primary control stratum. As a result, they possess an inherent inability to eradicate the deviations intrinsic to conventional droop mechanisms in the steady state, failing to accomplish the exact secondary restoration of system frequency and voltage. In recent years, consensus algorithms based on multi-agent systems (MASs) have become a research hotspot in distributed secondary control due to their decentralization and strong robustness. Reference [
20] realized secondary voltage recovery and load redistribution based on MAS distributed control. Reference [
21] proposed a distributed cooperative control strategy combining MAS consensus algorithms, achieving precise power sharing and effectively suppressing circulating currents. Although the above methods considered consensus-based droop control, they did not utilize it for the adaptive regulation of virtual impedance. References [
22,
23] adopted event-triggered mechanisms in distributed consensus secondary control, effectively reducing the microgrid’s dependence on communication networks while maintaining high regulation precision. However, multi-objective coordination under secondary control was not realized.
Furthermore, with the introduction of secondary control, the microgrid control system evolves into a high-order, nonlinear, and strongly coupled complex system, involving the cooperative tuning of VSG primary control parameters and secondary control gains. To solve the difficulty of parameter tuning, intelligent optimization algorithms have been introduced. References [
24,
25] used deep reinforcement learning (DRL) to realize distributed frequency regulation, but this requires pre-training and necessitates retraining when model generalization ability is weak. References [
26,
27] applied particle swarm optimization (PSO) to the parameter optimization of droop control, effectively improving power coupling and sharing precision, but they failed to eliminate static errors in frequency and voltage caused by load changes. Reference [
28] utilized the PSO algorithm to solve convergence issues in complex microgrid power flow calculations; however, it focused primarily on steady-state economic operation or static analysis, and the weights in the fitness function were fixed. Reference [
29] proposed a multi-VSG reactive power sharing and voltage support control based on twin delayed deep deterministic policy gradient (TD3) but ignored frequency support issues. Reference [
30] proposed a dynamic inertia VSG control based on MAS and DRL, effectively suppressing system power oscillations, yet it failed to consider power sharing. Reference [
31] proposed a multi-objective parameter optimization framework based on the PSO algorithm, achieving global optimization of control parameters and smooth switching between modes by simultaneously optimizing key pole damping in grid-connected and islanded modes; however, it lacked the capability for online adaptive adjustment.
Existing research has extensively explored dynamic disturbance rejection in microgrids. Specifically, Reference [
32] developed a synchronization strategy utilizing self-recovery droop control to maintain frequency stability during mode transitions. Reference [
33] suppressed harmonic interference caused by nonlinear loads utilizing grid-side voltage feedforward compensation, while the frequency self-recovery trajectory was optimized in reference [
34] by introducing deviation-proportional feedforward. Although these localized methods achieve effectiveness, control strategies remain predominantly focused on the elimination of steady-state errors in frequency and voltage. In view of the deficiencies in active load disturbance rejection and global cooperative optimization of control parameters in existing research, this paper proposes a consistency-based hierarchical cooperative control strategy for islanded microgrids that integrates load-observation-based dynamic reference feedforward (LODRF) and adaptive particle swarm optimization (APSO). The main contributions and structure of this paper are summarized as follows:
- (1)
An improved adaptive virtual impedance (IAVI) strategy is proposed to establish coordination between the primary and secondary control layers. By incorporating consistency error signals from the secondary layer to reconfigure virtual parameters, this method compensates for voltage drop differences caused by line impedance mismatches and improves power decoupling.
- (2)
An active feedforward control mechanism based on LODRF is proposed. By observing load power variations at the point of common coupling (PCC) in real time, a feedforward path is established to reconstruct the power baseline for each VSG unit. This strategy overcomes the inherent response latency of feedback control, significantly reducing the transient excursions of frequency and voltage while accelerating the dynamic recovery process.
- (3)
An optimization model based on the APSO algorithm is established using the integral of time-weighted absolute error (ITAE) as the objective function. This approach incorporates voltage and current dual-loop control parameters into a unified optimization space, resulting in smoother waveforms after optimization compared to the standard PSO (SPSO) algorithm.
- (4)
A simulation model of an islanded microgrid containing four heterogeneous distributed generation units is established. Under scenarios of sudden load increase and decrease, comparison of the system before and after adding the IAVI and LODRF modules, as well as with different PSO models, verifies the significant advantages of the proposed strategy over traditional strategies in terms of error recovery of frequency and voltage and precise power sharing.
2. Basic Principles of VSG Primary Control
The control system proposed in this paper adopts a hierarchical architecture, comprising a primary control layer and a secondary control layer. The structure of the primary control is shown in
Figure 1.
At the primary control layer, each single DG unit contains the main VSG control, which consists of the power calculation module, droop control, and the voltage and current dual-loop control module. Specifically, voltage and current sensors transmit the measured three-phase load voltage and current to the instantaneous power calculation module to obtain the active and reactive power output of the system. After filtering, these values are fed into the active power–frequency regulator and the reactive power–voltage exciter, respectively, to generate the required reference phase angle and reference voltage. Finally, these references are synthesized and input into the voltage and current dual-loop control module to generate the modulation wave, thereby controlling the switching of the six IGBTs in the three-phase inverter bridge, completing the basic VSG control process.
2.1. VSG Droop Control System
In SGs, primary frequency regulation is achieved by the governor, which functions to modulate the mechanical power output of the prime mover in response to variations in grid frequency. The governor module of the VSG can be designed by emulating the variation relationship between the active power and frequency of the SG. The mechanical power
based on the droop characteristic is defined as
where
denotes the active power reference value, and
represents the active power droop coefficient.
The motion of a synchronous generator’s rotor is governed by Newton’s second law, which establishes the physical relationship between unbalanced power and the rate of change in frequency:
where
represent the moment of inertia and the damping coefficient, respectively;
and
denote the mechanical torque, electromagnetic torque, and damping torque of the synchronous generator, respectively;
,
refer to the virtual mechanical input power and output electromagnetic power, respectively;
signify the actual angular velocity and nominal angular velocity, respectively; and
is defined as the power angle.
By substituting Equation (1) into Equation (2) and rearranging the terms, the closed-loop dynamic equation for the active power loop of the VSG is obtained:
A typical first-order inertial element is characterized by Equation (3). The condition is satisfied when the system reaches the steady state. At this juncture, the frequency deviation is directly proportional to the power deviation , and the accuracy of active power sharing among parallel units is determined by . The time constant is expressed as . The time constant is increased by a larger inertia , resulting in a slower rate of frequency change, thereby enhancing the disturbance rejection capability of the system against transient fluctuations.
Consequently, the emulation of the active power–frequency regulation characteristic of the SG within the VSG is illustrated in
Figure 2.
The automatic voltage regulator (AVR) functions to maintain the stability of the terminal voltage by regulating the rotor excitation current in real time to control the internal induced electromotive force. In islanded microgrids, the VSG control strategy emulates the regulation characteristics of the AVR by introducing a reactive Q-V droop mechanism. This mechanism dynamically adjusts the output voltage amplitude of the inverter according to the reactive power demand of the system, thereby achieving voltage support and rational reactive load sharing among multiple DG units.
To emulate the excitation characteristics based on the Q-V droop control strategy, the control law is expressed as
where
denotes the internal reference voltage amplitude of the VSG;
represents the no-load nominal voltage amplitude;
signifies the measured output reactive power;
refers to the reactive power reference value; and
is defined as the reactive droop coefficient.
The specific implementation of the reactive power–voltage regulation is depicted in
Figure 3. As illustrated, the control loop dynamically synthesizes the output voltage reference
based on Equation (4). According to this control logic, when the system’s reactive power
increases, the inverter automatically reduces the output voltage amplitude
according to
, thereby altering the voltage drop distribution across the output impedance. For parallel inverters with similar impedance characteristics, this mechanism ensures that reactive power is precisely shared in inverse proportion to the droop coefficients.
2.2. Voltage and Current Dual Closed-Loop System
The internal reference voltage amplitude U and phase angle are derived from the aforementioned control strategies. However, direct utilization of these signals as modulation waves for sinusoidal pulse width modulation (SPWM) would render the system open-loop, resulting in high sensitivity to load disturbances and susceptibility to LC filter resonance. Consequently, to ensure high-quality output voltage waveforms and rapid dynamic tracking capabilities, a voltage and current dual-loop control architecture is established beneath the power outer loop.
Governed by KVL and Kirchhoff’s current law (KCL), the dynamic balance equations of the circuit in the three-phase stationary coordinate system can be formulated as
where
and
denote the three-phase output voltages of the inverter bridge arms and the filter capacitor voltages, respectively;
and
represent the currents flowing through the filter inductor
and the output currents flowing to the load, respectively; and
signify the filter capacitance, and parasitic resistance of the inductor, respectively.
By applying the Park transformation, the mathematical model of the inverter main circuit in the synchronous rotating
coordinate system is derived as
where subscripts
and
denote the components on the d-axis and q-axis, respectively.
It is evident from Equations (7) and (8) that cross-coupling terms exist between the variables of the two axes, which severely degrades the system’s dynamic performance. To achieve independent decoupled control, PI controllers incorporating feedforward compensation are adopted.
The objective of the inner current loop is to rapidly track the current command and enhance system bandwidth. Let
and
be the inverter output voltage commands. The control law is designed as
where
and
are the PI parameters of the current loop; and
,
are the inverter output current commands. By introducing the cross-coupling feedforward compensation terms (
) and voltage feedforward terms (
,
), the physical coupling within the system is mathematically neutralized, thereby simplifying the closed-loop transfer function into a first-order system.
The outer voltage loop is designed to track the voltage reference
generated by the VSG and provide the current reference
for the inner loop. Its control law is expressed as
where
and
are the PI parameters of the voltage loop; and
,
are the filter output voltage commands. The introduction of cross-coupling terms (
,
) and load current feedforward (
,
) significantly improves the dynamic response speed under sudden load variations and mitigates voltage dips.
The schematic of the VSG voltage and current dual-loop control is depicted in
Figure 4. Through dual PI controllers and feedforward decoupling, independent control of the dq-axis currents and voltages is realized, ensuring excellent steady-state tracking performance.
3. Distributed Secondary Cooperative Control Strategy
While primary control realizes the fundamental functionality of the VSG, the inherent characteristics of droop control inevitably result in steady-state deviations in system frequency and voltage. Furthermore, line impedance mismatches among distributed generation units hinder precise power sharing. Consequently, a secondary control layer is introduced to eliminate steady-state errors and achieve zero-error recovery of frequency and voltage, along with accurate power allocation. The distributed cooperative control architecture adopted is depicted in
Figure 5.
The secondary control framework is illustrated in
Figure 5, the load feedforward module utilizes measurements from the PCC to generate dynamic power references,
P* and
Q*, after filtering. These references are employed to modify the static power setpoints of the primary control. Simultaneously, distributed secondary controllers cooperatively compute frequency and voltage feedback compensation signals,
and
, via a consensus algorithm over a sparse communication network. Each VSG unit exchanges information solely with its neighboring nodes. By generating compensation signals through consistency protocols, the strategy eliminates steady-state deviations under load disturbances, realizing zero-error restoration of frequency and voltage while ensuring that active and reactive power are shared precisely in proportion to the rated capacities of the DGs.
The evolution of control parameters toward the global optimum is driven by the APSO cooperative optimization layer through a closed-loop iterative mechanism, where the PI coefficients of the voltage and current loops are defined as the initial particle swarm within a four-dimensional search space. Within each iteration cycle, nonlinear inertia weights are dynamically adjusted as a function of the current iteration count to maintain an optimal balance between global exploration breadth and local convergence precision. Subsequently, the transient trajectories of frequency and voltage under load perturbations are captured in real time by the ITAE fitness evaluation unit, with the resulting time-weighted absolute error integral being utilized for particle parameter updates. By evaluating individual historical experiences () against the global swarm optimum (), the velocity and position of each particle are collaboratively corrected. This optimization process is executed iteratively until the system performance index converges to a predefined threshold. Consequently, a set of optimal control parameters is generated to ensure rapid transient recovery and high steady-state precision across various disturbance conditions, thereby realizing a deep functional synergy between the underlying physical control and the intelligent optimization algorithm.
3.1. Load-Observation-Based Dynamic Reference Feedforward Strategy
In traditional droop control, power reference values are typically fixed at nominal operating points. Under this static reference paradigm, the controller responds passively to total system load variations, relying on the accumulation of local power errors. This mechanism suffers from inherent drawbacks, including dynamic response lag and significant transient power sharing deviations. The core philosophy of the LODRF strategy is to leverage real-time load information from the PCC to actively update the power baseline of each VSG, thereby enhancing the system’s dynamic disturbance rejection capability.
The total active power
and reactive power
on the system side are acquired at the PCC. To mitigate measurement noise and high-frequency harmonics induced by inverter switching, the acquired signals undergo low-pass filtering:
where
denotes the cut-off frequency of the low-pass filter (typically set to 100 rad/s); and
,
represent the smoothed total load observations.
Assuming the system comprises
DG units and the rated apparent capacity of the
-th DG is
, the power sharing weight coefficient
is defined as
It is evident from Equation (12) that
. According to the LODRF strategy, the power reference value for the
-th DG is formulated as
Upon a step change in load, each DG can directly acquire the target power reference allocated based on capacity ratios, bypassing the delay associated with error accumulation. This mechanism effectively accelerates the transient response speed of the system.
3.2. Consistency-Based Frequency Restoration and Active Power Sharing
To restore the system frequency to its nominal value
and ensure active power is shared precisely according to capacity, a frequency-active power secondary controller is designed as follows:
where
denotes the finally generated frequency compensation term;
represent the control gains for the frequency restoration and active power sharing consistency algorithms, respectively. The pinning gain
is utilized to introduce global reference information. In this work,
is set as the sole node receiving the global frequency reference, resulting in
, while the pinning gains for other units are set to
.
This paper designates
as the leader node of the control network, with its internal phase angle serving as the reference for the power angle magnitude of the whole network. The term
is the element of the communication topology adjacency matrix
, where
if nodes
i and
j are connected, and 0 otherwise. Based on the simulation configuration, a linear communication topology is implemented, and the corresponding adjacency matrix
is defined as follows:
In Equation (14), the first term serves as the frequency consistency term, driving the synchronization of DG frequencies; the second term acts as the frequency pinning term, pulling the system frequency towards the reference value; and the third term is the normalized active power consistency term, ensuring accurate capacity-based power allocation.
In this controller, Equation (14) achieves frequency recovery. The final compensation term is superimposed onto the primary P-f droop loop:
3.3. Voltage Recovery and Reactive Power Sharing Based on Adaptive Virtual Impedance
Within the low-voltage microgrid scenario comprising four heterogeneous DGs investigated in this work, the primary objective is to ensure that the dynamically varying total system load is shared among DG units strictly proportional to their rated capacity ratio of
, the equivalent circuit of which is illustrated in
Figure 6. Nevertheless, the inevitable line impedance heterogeneity connecting individual units to the PCC deteriorates reactive power sharing precision, creating a risk of unit overloading. Furthermore, these impedance discrepancies precipitate circulating currents by inducing terminal voltage disparities among the parallel inverters.
Consider the
-th VSG characterized by an output terminal voltage phasor
, which is connected to the PCC via a line impedance
. Let the voltage phasor at the PCC be the reference phasor
. The complex power
injected by the VSG into the PCC is expressed as
where
denotes the complex power output of the
-th VSG;
is the conjugate of the output current phasor;
represents the PCC voltage phasor;
signifies the output voltage phasor of the
-th VSG; and
is the line impedance.
Expanding Equation (17) in phasor form and separating the real and imaginary components yields the nonlinear expression for reactive power
:
where
denotes the power angle. Since
remains sufficiently small within the typical operating range of the VSG, the linear approximations
and
are justified. Furthermore, considering that the terminal voltage magnitude
approximates the PCC voltage, Equation (18) can be simplified as
It is evident from Equation (18) that the reactive power is strongly correlated not only with its primary control variable, the voltage difference , but also with the power angle . This coupling relationship compromises the validity of traditional droop control strategies based on P-f and Q-V decoupling assumptions.
To effectively suppress circulating currents among parallel units, it is imperative that the output terminal voltage amplitudes
of all VSGs are maintained as consistently as possible. According to Equation (4), the condition for equalizing all
is:
Under the objective of capacity-based allocation, is typically inversely proportional to the rated reactive capacity , satisfying . Consequently, the actual output reactive power is required to be distributed strictly in proportion to capacity. However, since the value of is co-determined by , and while also being significantly influenced by the line parameters and , precise sharing cannot be achieved solely by voltage equalization.
To address this challenge, an IAVI strategy is designed within the secondary cooperative control framework. As illustrated in
Figure 7, the core philosophy is to generate a correction signal
via the secondary controller based on the reactive power sharing error, which is then utilized to dynamically modulate the virtual impedance value.
The normalized reactive power sharing error
is estimated via the consistency algorithm:
Subsequently, the correction signal
is generated through a PI controller:
where
is the reactive power control gain of the consistency term; and
denote the proportional and integral coefficients of the reactive power PI controller, respectively. This correction signal is applied to adaptively adjust the virtual impedance:
where
, denote the adaptive virtual resistance and inductance of the
-th DG;
are the nominal setpoints; and
represent the adaptive regulation gains.
By utilizing the adaptive virtual impedance parameters derived from Equation (4) in conjunction with the inverter output current components in the dq frame, the virtual voltage drops
and
are formulated as:
This voltage drop is directly subtracted from the primary voltage reference, achieving precise indirect regulation of reactive power.
To restore the system voltage to the nominal value, a voltage compensation signal
is generated based on the consistency algorithm:
Substituting Equation (24) into the primary Q-V droop loop results in the zero-error regulation of the final voltage:
4. Adaptive Particle Swarm Optimization Algorithm
In islanded microgrids incorporating secondary cooperative control, the dynamic response characteristics of the underlying voltage and current dual-loop controllers directly dictate the system’s dynamic performance during load fluctuations and secondary regulation processes. Given the strong coupling and nonlinear features of multi-machine parallel microgrid systems, conventional empirical tuning methods struggle to strike an optimal balance between system rapidity and stability under complex disturbances. To this end, this paper transforms the optimization of VSG dual-loop parameters into a global cooperative optimization process under multidimensional constraints. In this model, the optimization variables are defined as a four-dimensional position vector , comprising the proportional and integral coefficients of the voltage and current loops. To ensure the symmetry of the equivalent output impedance and fundamentally mitigate high-frequency reactive circulating currents caused by parameter mismatch, the algorithm constrains all DG units within the microgrid to adopt identical controller parameter configurations, with the search space strictly confined within the predefined stability region of the control system.
Conventional steady-state error metrics are insufficient for capturing the intensity of transient oscillations and the damping characteristics during disturbances. Consequently, this paper establishes a comprehensive objective function
based on the ITAE criterion to quantitatively assess the cumulative deviations of system voltage and frequency throughout the complete dynamic evolution process:
where
is the evaluation start time (set to 0.3 s) to assess the dynamic recovery capability after the control strategy intervention;
is the simulation end time (set to 1.5 s);
denotes the number of DGs;
and
represent the real-time output voltage amplitude and frequency of the
-th DG, respectively;
and
are weighting coefficients used to balance the optimization priorities of voltage and frequency. Since the numerical value of frequency deviation (typically <0.2 Hz) is far smaller than that of voltage deviation, to balance the dimensional disparity, it is typically set that
. By introducing the time multiplier
, the objective function imposes progressively severe mathematical penalties on sustained oscillations during the later stages of the transient process. This mechanism effectively drives the optimization algorithm to identify a global optimal parameter set that simultaneously ensures rapid response, minimal overshoot and steady-state error.
While SPSO offers efficient global search capabilities via swarm intelligence, it is inherently susceptible to premature convergence and entrapment in local optima, particularly when navigating high-dimensional multimodal objective functions. The inertia weight serves as a critical parameter governing the trade-off between the algorithm’s global exploration and local exploitation. Consequently, to mitigate these limitations and enhance convergence precision, a nonlinear dynamic adaptive inertia weight mechanism is introduced herein.
In the proposed APSO framework, the velocity vector
and position vector
of the
-th particle at the
-th iteration are updated according to the following evolution equations:
where
denotes the dimensionality of the search space (set to 4);
epresents the time-varying inertia weight;
are the cognitive and social acceleration coefficients, respectively (both set to 2.0), which govern the particle’s tendency to move towards its personal historical best
and the global swarm best
; and
are random variables uniformly distributed in the range
, introduced to enhance the stochasticity of the search process.
To strike a balance between extensive global exploration in the initial phase and refined local exploitation in the final phase, a nonlinear dynamic decreasing strategy for the inertia weight
is employed:
where
and
define the upper and lower bounds of the inertia weight, set to 0.9 and 0.4, respectively;
and
denote the current and maximum iteration counts. This nonlinear profile ensures high inertia initially to facilitate escape from local extrema, while progressively reducing inertia to accelerate convergence speed near the global optimum. The specific parameter configuration of the APSO algorithm is tabulated in
Table 1.
Building upon the aforementioned mathematical formulation and evaluation criteria, the APSO algorithm is utilized to perform the cooperative optimization task. Within each iterative cycle, the algorithm initiates by injecting the candidate PI parameter configurations, represented by the current swarm of particles, into the Simulink-based physical model. Subsequently, a time-domain simulation is executed, subjected to a step-load disturbance. Following the simulation, the data acquisition module extracts the full time-domain voltage and frequency response trajectories across the evaluation window, which are then substituted into J to determine the corresponding fitness value. At the core layer of the algorithm, a logical judgment unit facilitates a real-time comparison between the current fitness value and
and
. Should the predefined update criteria be satisfied, the particle parameters are refined via evolutionary operators. This iterative process continues until the maximum iteration count is reached. The detailed execution procedure and the integrated joint-simulation logic are illustrated in
Figure 8.
5. Simulation Results
To rigorously validate the efficacy and superiority of the hierarchical cooperative control strategy based on load feedforward and particle swarm optimization proposed herein, a comprehensive islanded microgrid simulation platform comprising four heterogeneous DG units was constructed within the MATLAB/Simulink 2024b environment. In this model, four independent VSG inverter units are interfaced in parallel with the PCC via resistive-inductive line impedances possessing distinct parameters, denoted as
&
through
&
. Each VSG unit incorporates an ideal DC voltage source, a three-phase inverter bridge, an LC filter, and its specific primary controller. The aggregate system load comprises a local load and a switchable disturbance load, both coupled to the PCC. To faithfully emulate the inherent heterogeneity of the system, the rated capacity ratio of the four VSG inverters is configured as
, with the detailed topological structure depicted in
Figure 9.
The overarching architecture of the hierarchical cooperative control system is schematized in
Figure 10.
Figure 10a delineates the primary control layer deployed locally on the four DGs, where each controller receives frequency and voltage compensation signals from the secondary layer and synthesizes the reference voltage vector
U and phase
based on the droop mechanism. These references undergo abc/dq coordinate transformation to yield d-q frame components, which, in coordination with the outputs from the IAVI module and inner-loop decoupling terms, constitute the input vector for the voltage and current dual-loop controller. The voltage and current control module subsequently outputs the three-phase modulation reference
, which generates the driving pulses via the SPWM module to regulate the inverter.
Figure 10b presents the global secondary cooperative control layer; the left panel displays the P-f cooperative controller, while the right panel shows the Q-V cooperative controller, employed to generate restoration compensation signals for frequency and voltage, respectively. Furthermore, the LODRF module utilizes real-time load data acquired at the PCC to proactively generate power sharing references for each DG.
The dynamic load profile of the system is programmed as follows: during the interval [0 s, 0.5 s], the system sustains a base load of 36 kW active power and r reactive power; at t = 0.5 s, the load serves a step increment of 100%, reaching an aggregate demand of 72 kW + 48 kVar; at t = 1.0 s, load shedding occurs where the load is halved, instantaneously returning the system to its initial state. The detailed electrical and control parameters employed in the simulation are tabulated in
Table 2.
5.1. Conventional Primary Control
To elucidate the inherent limitations of conventional control strategies, this section first evaluates the system’s dynamic performance operating solely under traditional droop control without the integration of the IAVI module. The objective is to rigorously verify the direct detrimental impact of line impedance mismatches and P-Q coupling on stable system operation. The simulation results are presented in
Figure 11.
As detailed in
Figure 11a, governed by the inherent steady-state error characteristic of droop control, the system frequency consistently deviates below the nominal
throughout the
interval, experiencing an exacerbated dip following the load step at
. Moreover, the frequency trajectories of the individual DGs fail to synchronize, exhibiting sustained, asynchronous low-frequency oscillations. In
Figure 11c, the DGs fail to share the active power load in proportion to their rated capacities, a phenomenon accompanied by significant power fluctuations.
Attributable to severe line impedance mismatches,
Figure 11b exposes pronounced disparities in the output terminal voltages of the DGs. This voltage imbalance directly compromises the reactive power distribution mechanism. Consequently, as depicted in
Figure 11d, the reactive power outputs diverge significantly from the theoretical
sharing ratio, thereby exciting high-frequency circulating currents among the inverters, which further aggravates system instability.
5.2. Primary Control Based on IAVI and Control Parameter Optimization
Addressing the limitations of conventional primary control, this section integrates the IAVI module into the primary control architecture. Simultaneously, acknowledging that the dynamic performance is heavily contingent upon the tuning of the underlying voltage and current dual-loop PI parameters, this study compares the efficacy of different optimization algorithms. The parameters are calibrated using SPSO with fixed inertia weight and the proposed APSO, respectively, where the specific optimized parameters are detailed in
Table 2. The subsequent figures illustrate the dynamic profiles of system frequency, voltage, active power and reactive power following the introduction of IAVI under these two distinct optimization strategies.
A comparative analysis with
Figure 11 reveals that, as shown in
Figure 12, the frequency and voltage curves of all DGs achieve rapid convergence post-optimization, thereby validating the efficacy of IAVI in decoupling and stabilizing the system. Furthermore, by contrasting the SPSO results depicted in
Figure 12a,c with the APSO results shown in
Figure 12b,d, it is evident that the trajectories optimized by APSO are significantly smoother with minimized fluctuation ranges. This indicates that the system exhibits superior damping characteristics and robustness following APSO. However, constrained by the inherent regulatory nature of primary control, the frequency of the four DGs hovers around
during
, and the output voltage settles near
, with further deviations occurring after the load doubles in the
interval.
As illustrated in
Figure 13, the power outputs for all DGs accurately adhere to the 1:1:2:2 rated capacity ratio under both SPSO and APSO schemes upon the integration of the IAVI mechanism. However, the proposed APSO strategy demonstrates superior execution performance. During the [0, 0.5 s] interval, high-frequency oscillations of approximately 0.3 kW and 0.2 kVar are observed in
and
under SPSO. In contrast, the steady-state fluctuations of active and reactive power are effectively suppressed within 0.1 kW and 0.1 kVar by the APSO strategy during the same period. Similarly, during the load step interval of [0.5, 1 s],
and
are stabilized at approximately 8.9 kW and 5.45 kVar by the APSO algorithm. Conversely, the power outputs under SPSO exhibit significant ripples, fluctuating between 8.8 and 9.1 kW for active power and between 5.3 and 5.6 kVar for reactive power. The numerical superiority of APSO regarding waveform smoothness and oscillation suppression validates its enhanced efficiency for searching optimal solutions within complex and high-dimensional parameter spaces.
In practical microgrid operation, line impedance frequently undergoes dynamic variations due to network reconfiguration, feeder switching, or environmental factors. To evaluate the adaptive capability of the strategy proposed in this paper under network parameter fluctuations, a line impedance perturbation experiment was conducted.
The system initially operates at rated conditions. At
t = 0.3 s, the line impedance of DG
1 was subjected to a sudden 50% reduction through parallel equivalent branches, the detailed simulation design of which is depicted in
Figure 9. As illustrated in
Figure 14, since all units initially maintained fixed virtual impedance parameters, the frequency
manifested a deviation to 49.969 Hz, and the voltage
dropped to 310.92 V. Simultaneously, the active and reactive power outputs of DG1 deviated from the theoretical setpoints by 0.25 kW and 0.58 kVar, respectively. Following the activation of the adaptive virtual impedance adjustment at t = 0.5 s, the virtual resistance
of DG1 was reconfigured to 0.24 Ω, and the virtual inductance was updated to 3.87 mH. Consequently, all electrical variables rapidly converged to their theoretical steady-state values. The system maintained stability during the load doubling at [0.8, 1.2 s] and load shedding at [1.2, 1.5 s], accurately tracking the theoretical power sharing trajectories. These results demonstrate that the proposed strategy can ensure precise power allocation and maintain operational robustness via parameter reconfiguration even when the physical network structure undergoes severe perturbations.
5.3. Hierarchical Cooperative Control
To remediate the inherent limitations of primary control regarding steady-state deviations and imprecise power sharing, and to rigorously validate the superiority of the proposed APSO algorithm in terms of convergence efficacy and optimization quality, a comparative analysis between APSO and SPSO was conducted within the hierarchical cooperative control framework. The specific algorithmic parameters are detailed in
Table 1. In the simulation sequence, the complete secondary control layer is activated at
. Subsequently, the system is subjected to a load doubling at
, reaching a peak aggregate load of
, followed by a load shedding event at
where the load returns to its initial state of
. The simulation duration is fixed at
, with the optimization objective defined as the weighted ITAE for frequency and voltage over the interval
. The convergence trajectories of the iterative process are illustrated in
Figure 15.
As depicted in
Figure 15, while both algorithms eventually converge to a low fitness value, the APSO algorithm exhibits significantly superior convergence characteristics compared to SPSO. Although SPSO demonstrates a rapid initial descent, it succumbs to premature convergence after the 10th iteration, characterized by stagnation in fitness value reduction. In stark contrast, the APSO algorithm converges to a superior fitness value (ITAE = 0.122936) within merely five iterations and maintains stability thereafter. This evidence underscores APSO’s enhanced capability to balance global exploration and local exploitation throughout the iterative process, thereby achieving swifter and deeper convergence.
The post-optimization performance indices are tabulated in
Table 3. While marginal differences are observed in overshoot and RMSE, the maximum frequency and voltage deviations optimized by APSO are restricted to 0.0031 Hz and 0.014 V, representing substantial reductions of 3.1% and 36.4%, respectively, relative to the SPSO baseline. Regarding steady-state precision, the average active and reactive power sharing errors under APSO are both maintained below 0.9%, corresponding to improvements of 19.2% and 16.4% over SPSO. These metrics unequivocally demonstrate the superiority of the proposed APSO algorithm in minimizing steady-state errors and enhancing allocation accuracy.
The system dynamic response under the optimal parameter configuration derived from APSO is illustrated in
Figure 16a,b display the frequency and terminal voltage profiles, while
Figure 16c,d present the active and reactive power output trajectories.
As observed in
Figure 16a,b, following the engagement of secondary control at
t = 0.3 s, the steady-state deviations in frequency and voltage are rapidly eliminated, with values being precisely restored to 50 Hz and 311 V. Even under severe load step disturbances at
t = 0.5 s and
t = 1.0 s, the system retains robust recovery capabilities. Notably, the transient frequency and voltage deviations are capped at 0.0031 Hz and 0.014 V, accompanied by a swift settling time and negligible oscillation.
Regarding power allocation, as shown in
Figure 16c,d, the output power of each DG at
t = 0.3 s is calibrated strictly to its theoretical setpoint, maintaining the requisite 1:1:2:2 ratio. Specifically, during the interval [0.3 s, 0.5 s],
and
; during [0.5 s, 1.0 s],
and
, with steady-state errors consistently suppressed below 0.9%. These results effectively corroborate the precision of the proposed strategy in power sharing.
Furthermore, to verify the dynamic enhancement provided by the LODRF strategy, a comparative analysis was performed under identical conditions. The simulation results prior to the inclusion of the LODRF module are presented in
Figure 17.
Analysis of
Figure 17 reveals that without LODRF, the maximum frequency and voltage deviations under load disturbance at
t = 0.5 s reach 0.0144 Hz and 0.03 V. Comparing these benchmarks with the results in
Figure 16a,b, it is evident that the proposed LODRF strategy attenuates the maximum dynamic deviations of frequency and voltage by 78.5% and 53.3%, respectively. Moreover, the effective recovery times are shortened by approximately 0.01 s and 0.09 s. This serves as compelling evidence of the improvements LODRF confers upon transient stability and rapid recovery capability.