Analysis and implementation of virtual impedance for ﬁxed-frequency control strategy in microgrid

Classic droop control ensures the synchronization of distributed generation (DG) units inside a microgrid without requiring any deployment of communication links, however it causes unwanted frequency ﬂuctuations and degrades system dynamics. Angle droop control and V − I control have been developed as two major global positioning system (GPS)-based control methods, both of which realize a ﬁxed-frequency operation of the microgrid through synchronizing DG units with GPS timing technology and brings improvement to the dynamic response of the overall system. This paper reveals the similarities and the correlations between these two methods that they can both be regarded as different forms of virtual impedance control. A novel adaptive virtual impedance control method is proposed accordingly to generalize GPS-based control strategies into a uniﬁed control frame. An impedance and inner controller design approach considering both stability constraints and power quality requirements based on the small-signal model of GPS-based microgrids is presented for practical implementation. An adaptive transient resistance concept is adopted to enhance the system stability during large disturbances and grid faults. Case studies are presented to validate the system performance and fault ride-through abilities of the proposed control scheme.


INTRODUCTION
An increasing number of distributed energy resources (DER) such as wind turbines, photovoltaic panels and micro gas turbines have been seen integrated into the utility grid [1] to address energy deficiencies and environment issues. The significant discrepancies of physical characteristics between DERs and conventional synchronous generators (SG) require massive renovations with regard to planning, control and protection [2]. The concept of microgrid, which offers more flexibility to incorporate these renewable energy sources and avails the improvement of energy efficiency, is gaining a lot of attentions from researchers in recent years. A typical microgrid usually has various types of controllable energy sources, loads and operation scenarios, which makes robust control and communication structures extremely critical to facilitate a stable and economical operation of such a comprehensive system [3]. Centralized control scheme with communications among distributed generation (DG) units is a natural parametric aspects. A distributed power sharing control strategy for inverter-based microgrid using a need-based aperiodic data transmission scheme is proposed in [8] to reduce the burden on the communication network. A communication links free control strategy, referred to as 'washout filter-based power sharing' is first proposed in [7], which ensures accurate power sharing without compromising voltage and frequency regulation. A more detailed analysis is performed in [9] which illustrates the equivalence between washout filter-based strategy and secondary control. Although washout filter-based strategy do eliminate the necessity of employing communication links, the inherent secondary control structure still leads to transient frequency fluctuations. In addition, without operational information being transmitted between DG units, power sharing performance can be significantly sacrificed during frequency restoring process.
Authors in [10] present a global positioning system (GPS)based control method which utilizes V -I droop characteristics to achieve direct current sharing rather than focus on power sharing. Since the inherent delay of power measurement is eliminated in this method, the response of controller is largely improved. Considering that the deviations of grid voltage are limited within certain ranges during regular operations, the accuracy of active and reactive power sharing is generally desirable as long as accurate current sharing is guaranteed. Moreover, this method is a GPS-based control method which means instead of relying on the variation of frequency, the synchronization of DG units is realized by GPS timing technology. Hence, unwanted frequency deviations are totally avoided. Angle droop control proposed in [11] is another GPS-based control method which drops the angle of output voltage due to the variation of output active power to achieve desired active power sharing ratio. An auxiliary frequency droop loop is presented in [12] to achieve the coordination of inverter-based and synchronous DG units and ensure synchronization during GPS offline events.
Due to the intrinsic relationship between voltage and current, this paper is going to reveal that the droop coefficients introduced in V -I actually act quite similar to an equivalent virtual impedance. Virtual impedance is initially employed in droop control methods to decouple active and reactive regulation in microgrids with highly resistive lines [13]. An analogous comparison among various microgrid control method are carried out in [14] which demonstrates physical equivalence between angle droop control and traditional droop control method with virtual impedance. From this point of view, the piecewise linear droop function presented in [10] can be seen as an adaptive virtual impedance loop. Thus, it is possible to generalize GPSbased control schemes into a virtual impedance regulation strategy which will be further explained in this paper.
Large disturbance ride-through capability of GPS-based control is neglected in current literature yet is rather critical for microgrids to function robustly [11,[15][16][17]. Since frequency is fixed at nominal value and power calculation loops are excluded in V -I control method [18], dynamic responses are sped up which makes DG units even more vulnerable to disturbances like point of common coupling (PCC) voltage fluctuations or drastic load changes.
Virtual impedance control is widely introduced as a lossless circuit-oriented control concept to improve the power sharing accuracy and power grid stability [19], which also provides a deep physical insight into the design and analysis of DG control. Properly implementing adaptive virtual impedance can contribute to the operational stability and power sharing performance of the microgrid during disturbances [20]. However, if poorly designed or implemented, virtual impedance may deteriorate the dynamics of the overall system and even leads to instability. Since virtual impedance control is a well-studied and efficiency guaranteed method, by revealing the resemblance between existing GPS-based fixed frequency control methods and virtual impedance control, we unify these methods into a general virtual impedance form and consequently largely facilitate the structural and parametric optimization.
In order to improve the power sharing performance and stability of microgrids, this paper presents a generalized analysis and implementation approach of virtual impedance, which also ensures fixed-frequency operation of the microgrid. The existing microgrid control strategies including traditional P-f droop control [21], GPS-based angle droop [11] and V -I control [10], are first reviewed to investigate their similarities in terms of power sharing. The equivalence between existing angle droop and V -I control are revealed that they can both be regarded as different forms of virtual impedance control. A conclusion is derived as, when voltage magnitude and phase set-points are set to be the same, inverters should have the same per-unit impedance in order to share load in proportion to their power ratings. Virtual impedance therefore should be designed accordingly to ensure an equal power sharing inside the microgrid. A complete implementation scheme of the proposed virtual impedance control method is then introduced, including a basic virtual impedance control which guarantees accurate power sharing among DG units, and an adaptive transient resistance concept which addresses the vulnerability of GPS-based control schemes against large disturbances. An impedance design approach considering both stability constraints and power quality requirements based on the small-signal model of GPS-based microgrids is proposed.
VSI inverter model is a commonly adopted energy source model in current research on GPS-based fixed-frequency control and is utilized in this paper. Currently, the most critical problems that restrict the promotion of fixed-frequency control are synchronization and power sharing. The focus of this paper is to provide an effective virtual impedance framework which achieves both accurate synchronization and equal power sharing to establish a solid foundation to help the promotion of GPS-based fixed-frequency control.
The rest of this paper is organized as follows. In Section 2, the review of P-f droop control, angle droop control and V -I control is presented. The overall implementation scheme of the proposed virtual impedance control, as well as the adaptive virtual impedance loop, is elaborated in Section 3. In Section 4, the small-signal model of the method is given and the design approach of virtual impedance, which satisfies both stability constraints and power quality requirements, is detailed accordingly. Section 5 presents the design approach of the inner Case studies are presented in Section 6 to verify the effectiveness of the proposed approach. Section 7 concludes the work in this paper.

Power sharing in a generalized microgrids
A generalized islanded microgrid which consists of two DG units and a common load is illustrated in Figure 1. Two VSIbased distributed generators DG 1 and DG 2 are connected to the PCC via low-voltage cables with total feeder impedance of R 1 + jX 1 and R 2 + jX 2 (Z 1 ∠ 1 and Z 2 ∠ 2 in angle notation), respectively. Although the analysis of power sharing mechanisms here is conducted with only two DG units, it can be easily extended to multiple inverters connected in parallel. To simplify the deriving process and without loss of generality, the voltage magnitude and phase of the PCC can be set as references as v PCC = V L ∠0 • [22]. The output voltage of DG 1 and DG 2 are noted as V 1 ∠ 1 and V 2 ∠ 2 accordingly.
The active and reactive power of each DG unit injected into the common load at the PCC can be expressed as where i = 1, 2 is the serial number of DG units. This equation can be further expanded as Consequently, the active and reactive power sharing between DG 1 and DG 2 can be expressed as Equations (4) and (5) show that the output active and reactive power fully depend on output voltage and output impedance of DG units. In a high-voltage level system, transfer lines are usually inductive which leads to ≈ 90 • . Considering the voltage difference between difference nodes is usually small (i.e. i ≈ 0 and V 1 ∕V 2 ≈ 1), the above equations can be simplified as where ΔV i = V i − V L . This simplification is actually the theoretical basis of developing traditional P-f droop methods [21] and GPS-based Pdroop methods [11]. Nevertheless, in a low-voltage level system, transfer lines are usually resistive leading to ≈ 0 • . Considering the same fact that voltage difference between difference nodes is usually small, similar simplification can be written as which is used to design Q-f droop controllers in low-voltage microgrids with dominantly resistive lines [22].
Rewriting the output voltage of DG i in rectangular coordinates as V i = V Ri + jV Ii and considering the assumption of ≈ 0 • , Equations (4) and (5) can be expressed as where ΔV Ri = V Ri − V L . This equation actually means active and reactive power sharing between DG units can be controlled through adjusting the corresponding voltage components, which forms the theoretical foundation of V -I droop methods [10].
The analysis conducted so far shows present power sharing strategies with frequency fixed or floated are all based on either one of the two assumptions that transfer lines are mainly either inductive or resistive. However, microgrids are usually hybrid grids with all types of connecting lines. In a mediumvoltage microgrid, moderate X ∕R values of feeder lines may engender large power sharing errors with the aforementioned existing strategies, hence a more generic power sharing strategy capable of dealing with any X ∕R values of feeder lines is required.
Predicated on GPS timing technology, DG units can be synchronized with an 1 pps timing signal. In addition, setting output voltage amplitudes of DG units to be identical enables all DG units to share the same preset output voltage V 1 ∠ 1 = V 2 ∠ 2 = V r ∠ r accurately. Further assuming the output impedance of the two DG units shown in Figure 1 have the same impedance angle ( 1 = 2 ), Equations (4) and (5) can be simplified as GPS Timing Signal

Voltage Controller
Current Controller

GPS Satellite
S=P+jQ FIGURE 2 GPS-based virtual impedance implementation scheme which shows as long as the two DG units have the same output voltage reference and feeder impedance angle, active and reactive power can be shared in exact proportion to the magnitude of their feeder impedance. The DG units are supposed to share the load in proportion to their power ratings, which means the active and reactive output power of each DG unit should satisfy Considering Equations (4), (5) and (9), in order for (10) to hold, a sufficient set of conditions for output impedance can be given as which is to say, the feeder impedance of all DG units should share the same impedance angle and have a magnitude inversely proportional to their power ratings. This set of condition is usually hard to satisfy as the selection of feeder impedance is limited by a lot of requirements other than power sharing performance such as oscillation damping performance. Alternatively, virtual impedance method can be introduced in this case to achieve desirable power sharing accuracy without sacrificing other design requirements in impedance design procedure [23].

Equivalence between virtual impedance control and angle droop control
A typical virtual impedance control scheme leveraging the GPS synchronizing technology is depicted in Figure 2. The basic manipulation of the virtual impedance method is to drop output voltage reference in proportion to the output current with a slope of virtual impedance [14], which yields (12) in which v o , v r , R v , X v , i o are the output voltage, voltage reference, virtual resistance and reactance, output current, respectively. After the implementation of virtual impedance, the equivalent output impedance of each DG unit can be given as The rationale of virtual impedance technique can be expressed as, in order for (10) to hold, virtual impedance should be properly chosen such that the equivalent output impedance denoted in (13) satisfy (11).
The voltage drop associated with virtual impedance can be given as Taking v o as the voltage reference, its voltage angle can be set as o = 0 • . Therefore, (14) can be rewritten as The classic angle droop control and its variants are developed based on two assumptions, feeder lines are highly inductive and the angle difference between neighbouring nodes is relatively small [6,11,15,16]. To satisfy these two assumptions, virtual impedance is chosen to be purely inductive. Further approximating V r and V o with nominal voltage V n [14], the angle difference Δ associated with virtual impedance can be derived through simplifying (15) as Equation (16) shows virtual impedance methods can be seen as alternating the angle of output voltage proportional to active power, which is equivalent to the angle droop method introduced in [24]. Moreover, larger angle droop coefficients actually mean larger virtual inductance is adopted to reduce output impedance mismatch [14].
Since microgrids are usually medium-or low-voltage power networks with unity or even lower X ∕R ratio, with angle droop control, accurate power sharing is usually difficult to maintain during load transients due to strong coupling between active and reactive power.
Moreover, output power is used as control signal in angle droop methods to adjust interfacing voltage. Since low-pass filters (LPF) are essential in power droop control methods to mitigate high-frequency oscillations, angle droop methods are intrinsically low bandwidth controllers suffering from slow dynamics [10].

Equivalence between virtual impedance control and V -I control
With Park transformation, the control law of basic virtual impedance control (12) can be transformed into d -q reference frame as Rather than drooping voltage angle according to output power, the V -I controller modifies voltage reference corresponding to output current in synchronous reference frame (SYRF) (d -q coordinate) as [10] where R c and jX c represent the output impedance. I od and I oq are the d and q axis components of output current. T x is the control matrix defined by Based on the assumption that line reactance X is sufficiently smaller than resistance R in low-voltage networks, the V -I droop method sets off-diagonal elements of the control matrix T x to zero and replaces diagonal elements with piecewise linear droop functions of output currents to decrease current sharing error under heavy loading conditions. Consequently, the control law (18) can be transformed into where f (⋅) denotes the piece-wise monotonic linear function.
Comparing (20) with (17), it is easy to infer that V -I droop control is intrinsically an adaptive virtual impedance control with different values of virtual resistance implemented for dand q-axis components. For d -axis and q-axis, respectively, the virtual resistance can be written as Therefore intrinsically, V -I control regulates active and reactive current separately with different values of d -and q-axis virtual resistance. Nevertheless, in a medium-voltage microgrid with unity X ∕R ratio, the simplification that line reactance X is sufficiently smaller than resistance R may bring in sizable power sharing errors.
To sum up, angle droop control methods suffer from slow dynamics and only suitable in power networks with high X ∕R ratio. V -I droop methods are developed specifically for low X ∕R. In addition, since GPS-based controls are developed to work under fixed frequency, they have relatively small inertia compared with traditional frequency droop strategies, which makes DG units more vulnerable to disturbances in microgrids.
To address the problems existing in current GPS-based control methods and improve system robustness, a novel hierarchical virtual impedance control structure is proposed in Section 3.

PROPOSED ADAPTIVE HIERARCHICAL VIRTUAL IMPEDANCE CONTROL STRUCTURE
In order to improve power sharing accuracy and disturbance ride-through capabilities in medium-voltage microgrids with unity X ∕R ratio, a novel hierarchical control strategy is proposed in this section.
As shown in Figure 3, the proposed control structure consists of a basic virtual impedance control loop and a disturbance ride-through control. All DG units are synchronized with GPS timing signal to ensure a fixed frequency operation of the microgrid. The errors introduced by GPS timing and timer quantization are typically less than 1¯s [25]. The frequency drift of oscillators ranges from a few parts per billion to 100 parts per million depends on the type of the oscillator [26]. Therefore, the maximum angle error is less than 1 • using GPS timing technology, which is acceptable for the control of inverter-based microgrid [18]. The virtual resistance and reactance in basic virtual impedance control loop is specifically designed such that the equivalent output impedance of the DG units satisfy (11). The disturbance ride-through control is a transient adaptive resistance control aiming at improving system robustness during grid disturbances.
Voltage drop produced by virtual impedance loop is subtracted from the voltage reference to produce an actual impedance effect. A cascaded voltage-current Proportional-Resonant (PR) controller with harmonic compensations is utilized to regulate the output voltage accordingly.

Basic virtual impedance control
Since the power factor is usually higher than 0.7 in practice, virtual resistance leads to higher voltage deviations than reactance of the same magnitude. Hence, the value of virtual resistance is limited by the permissible voltage range, which might result in poor power sharing accuracy in practice [17]. In order to achieve a desirable voltage regulation while taking advantage of the damping improvement of the virtual resistance, a classic virtual impedance scheme is adopted in this paper as the basic impedance control loop. The voltage drop effect due to basic virtual impedance loop is derived as This voltage drop is then subtracted from the voltage reference generated by a three-phase reference generator block, which guarantees the voltage reference is coordinated with a global reference frame. The modified voltage reference is then fed to the cascaded voltage-current controller to regulate the output voltage. Basic virtual resistance R v and reactance X v are given as where R d and X d represent the desired equivalent impedance. −R c and − j L c are introduced to compensate the mismatch of physical feeder impedance. In order to achieve proper active and reactive power sharing among DG units, the virtual resistance and reactance of each unit is chosen inversely proportional to its power rating as The physical feeder impedance R c + j L c can be estimated through either online or offline methods. For instance, an online estimation method of utility grid impedance based on injecting an current with a frequency close to the fundamental and measuring the voltage response is proposed in [27]. However, further discussion on detailed estimation technology is not the focus of this paper.

Adaptive virtual resistance for disturbance ride-through
An adaptive resistance control strategy designed for improving the disturbance ride-through ability of GPS-based microgrid is illustrated in Figure 4. This event triggered control strategy is introduced to improve the robustness of the control system with respect to large disturbances. It is activated when the magnitude of output current is excessively large. When the output current exceeds the preset upper bound, a sufficiently big transient virtual resistance will be implemented to restrict the range of output power and improve the damping of the control system.
In order for the controller to have a fast response in case an unwilling disturbance occurs in the microgrid, a classic fast peak detector is used to extract the largest peak I mag of the output currents [28]. The current magnitude is then compared with two preset thresholds to determine the value of the virtual resistance to be implemented. If the current magnitude I mag is less than the lower threshold I T 1 , the microgrid is considered to be operating normally and only basic virtual impedance is implemented. When the current magnitude is larger than the higher threshold I T 2 , a severe fault is considered to be present and the DG unit will be immediately tripped for protection. When I mag is between I T 1 and I T 2 , the disturbance ride-through loop is enabled. The distance between current magnitude I mag and the lower threshold I T 1 is calculated as M d = I mag − I T 1 . M d is multiplied by a coefficient K r to form the responsive virtual resistance ΔR v . The final virtual resistance implemented in basic virtual impedance control is then adjusted accordingly. In this way, a high output current magnitude will produce a large series transient resistance at the DG interface. The current spike generated by the disturbance will be limited to a lower value by the proposed disturbance ride-through control.

DESIGN OF VIRTUAL IMPEDANCE
The increase of virtual resistance and reactance improves steady-state power sharing and large virtual resistance also contributes to damping performance during transients. However, this increase also has some disadvantages: Large virtual resistance results in big voltage drop; Large virtual reactance causes oscillations in system. Therefore, the implemented virtual impedance must be carefully chosen not to deteriorate voltage regulation and stability of the whole system. In this section, the stability of an autonomous microgrid incorporated with virtual impedance control is studied based on the state-space model. Unstable margin of virtual impedance are derived through eigenvalue analysis and combined with voltage regulation requirements to form the desired equivalent impedance range for the determination of virtual impedance.

Small-signal model of proposed control
General small-signal modelling and stability analysis for autonomous microgrids using conventional droop control has already been reported in multiple literature like [21,29,30]. In order to facilitate the design of virtual impedance for GPSbased control, a new small-signal model of islanded microgrid with fixed frequency and virtual impedance is discussed here.
The general systematic diagram of the virtual impedance and GPS timing based microgrid is shown in Figure 2. The vir-tual impedance control law equation (12) can be represented in SYRF as The LHS d -and q-axis components of voltage reference are then fed to cascaded PR voltage-current controllers inframe, which can be modelled as PI controller in SYRF as [31] where I * fdq and I fdq are the reference and measured value of the filter inductor current. V * fdq is the inverter reference voltage. K pv , K rv , K pi and K ri are the proportional and resonant coefficients of the voltage and current controllers, respectively.
Besides, the dynamic model of the output filter (LC filter) and the coupling impedance can be expressed as [21] where R f and X f are the resistance and reactance of the filter inductor, respectively. C f is the capacitance of the filter capacitor. Equations (27)-(31) can be combined and linearized around an arbitrary equilibrium point to formulate the smallsignal model of the DG unit aṡ where state sector x is defined as in which dq and dq are the states of the cascaded PR voltagecurrent controller in SYRF. The detailed form of state matrix A DG is shown in (34) at the bottom of the next page, in which n is the nominal angular speed.

Stability and transient performance boundary
As illustrated in Figure 5, a typical autonomous islanded microgrid, consists of three DG units and two loads, is considered. System parameters are presented in Table 1. The microgrid is operating with 380 V rated voltage and 50 Hz nominal frequency. The power ratings of DG units are set in proportion of 1.5:2:1. The eigenvalues of the system, as shown in Figure 6 using negative logarithmic scales, possess a large range of frequency components and can be divided into three different clusters. Sensitivity factors, given by the sensitivity of the eigenvalue i to the diagonal element a kk of the system state matrix A mg , is often adopted to measure the association between state variables and modes [21]. Sensitivity factor analysis shows the high-frequency eigenvalues in cluster 2 are sensitive to the state variables associated with LC filters and output impedance. Cluster 3 is formed Root locus of the considered microgrid with equivalent output reactance varying from 0 to 0.838 pu by eigenvalues mainly influenced by the proportional and resonant gains of cascaded voltage-current controllers. The eigenvalue group most adjacent to the imaginary axis, cluster 1, is highly sensitive to virtual impedance and thus should be seriously addressed in design procedure.
The trajectory of dominant eigenvalues with equivalent output resistance fixed at 0.0208 pu and reactance varying from 0 to 0.838 pu is depicted in Figure 7. It can be seen as virtual reactance increases, roots in cluster 1 moves away from real axis which indicates increasing oscillation in system. A pair of dominant eigenvalues 3−4 are attracted to imaginary axis as virtual reactance continues to increase and eventually enter the right half plane at X eq = 0.762 pu. Consequently, the system becomes unstable. On the other hand, the high-frequency eigenvalues FIGURE 8 Desired equivalent impedance range 11−14 move slowly towards the imaginary axis making the system even more oscillatory. In conclusion, while high values of virtual impedance help to alleviate power sharing deviations that result from parameter drifts and computational errors, they have a negative impact on the overall system stability. Therefore, there exists a trade-off between power sharing accuracy and system stability.
The system damping feature is mainly decided by non-zero imaginary conjugate poles and all roots possess negative real components indicating a stable operation [32]. Two constraints could be set for virtual impedance design in order to maintain proper transient performance: (1) The real components of all eigenvalues should be less than threshold T sb to ensure a desirable system stability performance; (2) The ratio of imaginary and real components of conjugate roots should be limited less than T dp to confine the damping ratio [32]. These constraints yield following inequalities: Here, constraining parameters are selected as T sb = −10 and T dp = 3. The desired stability and damping boundary for equivalent output impedance of DG units are illustrated in Figure 8. Permissible area locates at the right side for both boundaries.

Voltage regulation and power transfer boundary
In order to guarantee a proper and safety operation of islanded microgrids, the voltage and angle differences between DG units and PCC point should always be constrained within desired limits. European standard EN 50160 requires 10-min voltage magnitude should remain between 90% and 110% of the nominal voltage for 95% of the time in low-voltage networks [33].
Due to the maximum voltage magnitude and angle deviations allowed for proper operation in microgrid, Equations (2) and (3) actually define the maximum possible real and reactive power a DG unit can deliver to the PCC. In order for microgrid to operate stably, the DG units should always have power transfer capacities greater than actual demands, which yields where max and are the maximum permissible angle difference and voltage boundary coefficient. In this paper, they are chosen as max = 5 • and = 5%, respectively. The permissible equivalent output impedance range constrained by real and reactive power capacity bounding curves are also depicted in Figure 8. As shown, the equivalent output impedance of all DG units should stay inside the two boundaries to acquire desirable power output ability. Finally, to ensure proper operation of a islanded GPS-based microgrid, all the constraints mentioned above should be satisfied, which leads to the shaded region (desired equivalent impedance range) in Figure 8.
Since the equivalent impedance here includes both the virtual impedance and actual output impedance and function very much like a real output impedance of GPS-based generation units, it is to be noted that while the design procedure introduced here are proposed for virtual impedance implementation, it is actually applicable for any plugged-in device synchronized with GPS signals in microgrid in terms of stability analysis and operation optimization.

CASCADED VOLTAGE-CURRENT PR CONTROLLER DESIGN
The design procedure of virtual impedance proposed in previous section is based on a pre-determined cascaded voltagecurrent PR controller with parameters empirically tuned at the fundamental frequency. However, when operating with intensive non-linear loads or load transients, equivalent output impedance of inappropriately tuned inner control loops may cause a huge negative impact on original virtual impedance control structure. A practical voltage-current controller analysis procedure is discussed in this section.
Compared with real reactance, virtual reactance is directly determined rather than be calculated from actual inductance, which means virtual reactance has the same magnitude at all frequencies. Consequently, virtual reactance causes less harmonic voltage drops than real reactance. On the other hand, since vir-

FIGURE 9
Block diagram of the overall closed-loop control structure tual impedance control loop utilizes output current to directly determine voltage control signal, it is possible to perform fast and accurate tracking to harmonic signals. However, it requires the inner control loop to be properly designed to exhibit decent performance for both fundamental and harmonic signals.
A double-loop voltage-current controller is utilized to regulate the output voltage for both fundamental and harmonic currents. The control loops consists of proportional terms and resonant terms tuned at both fundamental frequency and harmonic frequencies such as 5th, 7th and 11th. The transfer functions of voltage and current control blocks can be expressed as 2K rhv c s 2K rhi c s where K rhv and K rhi are resonant coefficients for harmonics at order h.
Since the control diagram is developed in stationary coordinate instead of rotating dq-coordinate, coupling effects between d and q components are avoided. Consequently, the dynamics of the overall system can be modelled in two independent single-phase systems [31]. The control diagram of the proposed control structure can thus be simplified as shown in Figure 9. In order to evaluate the closed-loop dynamic characteristics of the double-loop controller, Mason's theorem is applied for block diagram reduction and the output interface of the DG unit can be modelled as where G (s) is the closed-loop voltage control gain. Z out describes the influence of output current I o (s) over DG interfacing voltage V o (s) and can be seen as the equivalent impedance introduced by control loops according to Thevenin's theorem. G (s) and Z out (s) can be expressed as The bode plots of the closed-loop transfer function G (s) with K pv selected as [0.01 0.05 0.1] considering only fundamental frequency are shown in Figure 10. The objective of parameter design includes achieving bandpass-filter closed-loop behaviour with a narrow bandwidth at fundamental frequency and avoiding resonances in boundary frequencies [13]. It is worth mentioning that other parameters of the double-loop controller can also be analysed in a similar way to ensure proper response characteristics of the closed-loop system.
As aforementioned, the coefficient Z out (s) of the second term on the RHS of Equation (41) describes an equivalent output impedance introduced by voltage-current control loop. This equivalent impedance also contributes to the total DG output impedance during transients and hence should be carefully taken care of to avoid degrade the dynamics of the whole system. The characteristics of Z out in frequency domain with only fundamental resonant controller incorporated and K pv varying from 0.01 to 0.1 are depicted in Figure 11. To avoid possible coupling of the controller impedance and virtual impedance loop, the magnitude of the equivalent controller impedance should be 10 times smaller than the desired total impedance [32]. As shown in Figure 11, when K pv is chosen as 0.01, 0.05 and 0.1, the controller impedance at fundamental frequency is about 0.0151, 0.0007 and 0.0151 Ω, respectively. Compared with the total impedance range (larger than 0.15 Ω due to stability boundary as shown in Figure 8), the equivalent output impedance of voltage-current controller is reasonably small and thus sufficiently satisfies the aforementioned requirement.

CASE STUDIES
In order to validate the efficacy of the proposed design approach of virtual impedance control scheme, a prototype  microgrid, which has the structure as shown in Figure 5, is investigated. The simulations are conducted on MATLAB-Simulink platform with the Simscape Electrical toolbox. An extra DG unit, DG4, which is identical in rating and control parameters to DG3, and load 4 are added to Node 3 through Line 3 to highlight the merits of the proposed design and control methods. The parameters of the newly added components are listed in Table 2. The R∕X ratios of feeder lines are set to be near 1 and the discrepancy of the output impedance are intentionally exaggerated to emulate a worst case situation.

Performance of existing control method
The dynamic performance of the microgrid under consideration using existing angle droop (P-) control method [11] is presented in the first case. Figures 12(a)-(c) illustrate the active power outputs, reactive power outputs and output voltage of DG units during step load change, respectively. Initially, system operates in the steady state with no power control implemented. The power sharing ratio of four DG units is only determined by the topology of the microgrid in this period. At t = 0.3 s, angle droop control is adopted by all DG units to improve the performance of power sharing in the microgrid. Load 4 is then raised from (11.4 kW, 3.6 kVar) to (15.4 kW, 5.2 kVar) at t = 0.9 s and reduced to initial value at t = 1.5 s. Figure 12 shows the system dynamics have several  Figures 12(a) and (b) that the active and reactive power sharing is still poor after the implementation of angle droop control due to the intentionally exaggerated mismatch of feeder impedance. Conventional Pcontrol is based on the assumption that feeder lines are dominantly inductive. The X ∕R ratios of feeder lines in the considered microgrid are around 1 which limits the improvement of the power sharing using angle droop control.

Performance of proposed virtual impedance control
The system performance of the proposed control method is depicted in Figure 13. The virtual impedance control loop is enabled at t = 0.3 s. Just like the first case, a step load of 4.0 kW and 1.6 kVar is added to and cut out from the connection point of DG4 at t = 0.9 s and t = 1.5 s, respectively.
As can be seen in Figures 13(a) and (b), the sharing errors of active and reactive power generated by four DG units are largely reduced upon the activation of the proposed virtual impedance control. The accurate power sharing performance is well main-  tained during and after applying the step load. In order to quantify the accuracy of power sharing, the power sharing error of DG unit i can be calculated as [10] P err,i = P i P rated,i − Consequently, the maximum active and reactive power sharing errors for the angle droop control method (denoted as P-) and proposed adaptive virtual impedance control method (denoted as AVI) can be obtained as in Table 3. It is shown that the maximum active and reactive power sharing errors have been reduced from 3.99% and 4.72% to 0.31% and 1.30%, respectively, before the step load is connected, as well as from 5.65%

FIGURE 14
Comparison of DG3 current between existing control method and proposed control method. (a) DG3 current using Pcontrol; (b) DG3 current using proposed control and 4.65% to 1.03% and 2.50% after the connection, which reveals a significant improvement in power sharing performance using proposed control method.
In addition, compared with the system response of existing Pcontrol shown in Figure 12, not only is the power sharing accuracy largely improved, but the proposed control also manages to achieve a faster and much smoother dynamic response. The transient process has been largely accelerated from about 0.6 s down to less than 0.1 s. The improvement of system dynamics can be further confirmed by the comparison of DG3 current between angle droop control method and proposed control method as shown in Figure 14. It is observed that the output current of DG3 using proposed control has fewer oscillations and smaller overshoot during the variation of system load. The 5A current overshoot in angle droop control is totally eliminated in the proposed control.

Fault ride-through capability
The response of the microgrid using proposed control with and without adaptive disturbance ride-through loop after a severe three-phase short circuit fault is depicted and compared in Figure 15. The proposed virtual impedance control is implemented at t = 0.1 s. A three-phase short circuit occurs at t = 0.4 s at the terminal of DG4 and is cleared after five cycles (0.1 s). In the case that only fixed virtual impedance is adopted, the active power outputs of all four DG units are observed to surge to about 6.5 times the original output right after the fault as shown in Figure 15(a). It is worth mentioning that this result is obtained in MATLAB/Simulink simulation. In a realistic power system, DG units would be cut out way before the output power climbs up to such a high level. In contrast, Figure 15(b) shows when adaptive disturbance ride-through loop is enabled, instead of power surges, the output power of DG units drops to only about 1/3 times the original output in response to the fault thanks to the increase of virtual resistance (see Figure 15c). After clearing of the fault, the active power output of all four DG units rises back to the initial point and the power sharing continues with desirable accuracy within less than 10 cycles. To sum up, the smooth transitions during fault occurrence and clearing validate the reliable fault ride-through capability of the proposed control approach.

HIL experiment results
In this case, we perform a Hardware-in-the-Loop (HIL) experiment to validate the performance of the proposed control algorithm when implemented in a real microcontroller. The testbed of the HIL experiment is as shown in Figure 16(a), which consists of an OPAL-RT OP5700 real simulator to emulate the DG units and networks of the microgrid, two TI TMS320F28335 microcontrollers to implement the proposed control and generate sinusoidal pulse width modulation (SPWM) signals, a host computer to build and upload model parameters and an oscilloscope to monitor and capture voltage and current waveforms. The structure of the benchmark microgrid is the same as shown in Figure 5 but with two DG units and two loads. The parameters of the DG units and loads are set to be the same as the first two DG and loads given in Tables 1 and 2, respectively. The GPS timing signals are generated by the OP5700 and utilized by the two microcontrollers to coordinate the edges of SPWM pulses. It is very common to have non-linear load in a realistic microgrid system. In order to test the performance of the proposed control in case of non-linear loads, a series RL load comprising a 28.8 Ω resistor and a 35.2 mH inductor is connected to Node 2 via a three-phase full bridge diode rectifier. The output current and voltage of DG1 and DG2 are shown as in Figure 16(b). It is observed due to the connection of this non-linear load, the output current of DG1 and DG2 contains a large portion of harmonics. Fast Fourier Transformation (FFT) shows that the total harmonic distortion (THD) of the output current of DG1 is as high as 10.63%. However, thanks to the implementation of the PR inner control loops, the waveform of the DG1 voltage in Figure 16 is very close to a sinusoid curve. The total harmonic distortion of the phase A output voltage of DG1 is only 0.54%, which is far below the permissible range (2.5%) defined in IEEE standard Std 519-2014. The results of the HIL experiment confirms the feasibility and performance of the proposed control in a realistic application scenario considering the presence of nonlinear loads.

CONCLUSION
This paper reveals the similarities and the correlation between two major fixed-frequency control methods for microgrid, namely, angle droop control and V -I control. An adaptive virtual impedance control method is proposed, due to the revela-tion that power sharing ratio is inherently determined by output impedance, to unify existing fixed-frequency control strategies into a unified control frame. A transient virtual resistance employment strategy is leveraged to improve fault ride-through ability of the proposed control. In addition, a virtual impedance optimization and design approach considering both stability constraints and power quality requirements is presented based on the small-signal model of GPS-based microgrids for practical implementation. Case studies indicate a significant improvement in power sharing performance using proposed control method in case there exists large discrepancy in the output impedance of DG units. In addition, it is also verified that the output current with proposed control has fewer oscillations and smaller overshoot during the variation of system load. The fault ride-through capability of the proposed control approach is confirmed to be reliable by the smooth transitional process during fault occurrence and clearing.