Virtual Friction Subjected to Communication Delays in a Microgrid of Virtual Synchronous Machines

Virtual synchronous machines (VSMs) have become popular solutions for grid-tied inverters, suited to work on ac grids with an increasing share of distributed energy sources and storage. However, just like real synchronous machines, VSMs may experience power oscillations. Recently, a new damping concept called virtual friction (VF) has been proposed that makes use of real-time communication between several inverters. VF introduces an additional damping torque in the swing equation of the VSM, proportional to the deviation of the virtual rotor frequency from the center of inertia (COI) frequency. VF can apply high damping without imposing a strong response in the output power of the VSM during frequency transients. However, VF requires the transmission of frequencies over a communication network, which may suffer from transmission delays. We give an experimental proof of concept of VF both in an isolated microgrid and in grid-connected operation of a 45-kVA setup consisting of three VSMs realized by three-phase two-level insulated-gate bipolar transistor (IGBT)-based inverters. We consider continuous constant and discontinuous varying time delays and show theoretically and experimentally under what conditions delays can impact the output powers of the VSMs. Furthermore, we show how to correctly estimate the COI frequency with transmission delays using timestamps to align individual signals.

important grid services, such as inertial support and frequency droop. However, since they are based on digital algorithms rather than on electromechanics, interesting new possibilities arise for controlling the overall system.
One such new control method is called virtual friction (VF) [12], [13], which is meant to damp low-frequency (LF) oscillations in the grid. Traditionally, such oscillations are damped by local feedback, such as frequency droop, damper windings, and power system stabilizers [14], [15]. VF uses remote information from other generators, and it works like this: using digital communications, the center of inertia (COI) frequency of the grid, ω C , a weighted average of the frequencies of all VSMs, is estimated. This enables the application of an additional damping torque to the swing equation of each VSM, proportional to the deviation of the virtual rotor frequency of this VSM from ω C . One benefit of this is a significantly lower injection of excess power during grid frequency drops, as compared with using an equivalent amount of frequency droop. This is especially advantageous for power plants connected to inverters where limitations of the electronics or of the primary energy source, such as solar or wind, do not allow such a sudden increase in output power. The paper [13] showcased the damping performance of VF in a microgrid of four VSMs through simulations and theoretical analysis.
The paper [16] has investigated the influence of VF as opposed to frequency droop on the region of attraction of the preferred stable equilibrium point of the same microgrid that is investigated here. Results suggest that VF can increase this region of attraction, and hence, it may be a more robust damping strategy than frequency droop alone. We propose to use a combination of frequency droop and VF.
In order to send the individual (virtual) rotor frequencies required for the calculation of the COI frequency ω C , and then to send back ω C , a communication network is required between the different VSMs and a central controller (CC). Depending on the infrastructure that is used, such a network inherently introduces delays due to data transmission, propagation, and processing [17]. In modern 5G and fiber optical communication, latency can be below 1 ms [18], [19], [20], while for public 4G networks, latency is around 50 ms [19], [21]. Round-trip delays in commercial long distance optical fiber networks have been reported to be around 100 ms with little impact of distances up to a few thousands of km [22]. When using Modbus, Del Rivero et al. [23] reported delays below 100 ms in a laboratory setup.
The communication network needed for secondary control in a microgrid depends on the chosen architecture [24]. While the classical approach employs a central secondary controller, also decentralized approaches are possible. It was shown in [24] that such distributed secondary control can be negatively impacted by delays. Instability can occur for large delays (around 600 ms). Communication delays between a CC and local inverter controllers have also been investigated in [23] using time-varying delays with a mean of 68 ms. Here, the CC sent reference signals for power angles and local voltages. Khayat et al. [24] proposed to use a Smith predictor at the local controller level to compensate for delays. We note here that there exist approaches to estimate the COI frequency locally at each VSM to achieve damping, so that no communication network is required; see, for example, [25].
In this article, we investigate the computation of ω C at a CC and its use for VF. As in our conference paper [1], we compare the system behavior when mainly VF is used to provide damping, with cases where damping was applied using (high) frequency droop only. We extend the results in [1] by a theoretical analysis of delays and their impact on the damping performance of VF. We show that the impact of delays varies greatly with their location and size. In particular, if the delays from the CC to the VSMs are equal, then they have no impact on the power output of the VSMs. We show that the alignment of signals by using timestamps is efficient to keep the damping performance of VF strong when delays are present. Furthermore, we propose an extension of the COI frequency suitable for mixed grids, where not all the machines can communicate to the CC. Such a scenario is likely if VSMs are integrated into already existing grids. Since VF is a damping torque, it is not suitable for conventional grid-following inverters [e.g., based on phase locked loops (PLL)], which still are much more commonly used than VSMs. On the other hand, the speed control of real synchronous generators is too slow, so that VF cannot be used on these machines either. When using VF in such mixed grids, VF can still be an efficient damping method for VSMs, when using a modified COI-frequency formula. We mention that in our paper [13], we have considered only the case of equal delays, which means that the signals from all the VSMs to the CC are delayed by the same amount.
The remainder of this article is structured as follows. We give a brief theoretical description of the VSM and the VF mechanism in Section II. In Section III, we analyze the dynamics of the investigated microgrid and the effects of communication delays. In Section IV, we present our experimental setup and show results obtained for both an islanded microgrid and one that is connected to the main grid. We propose an extension of the COI-frequency calculation for the latter case. Finally, we show the impact of delays on the system for two delay models, using constant and random timevarying delays.

II. SYSTEM DESCRIPTION A. Virtual Synchronous Machines
In Fig. 1, we show the (simplified) electric circuit of phase a of the inverter, and phases b and c are identical. The inverter leg of phase a is controlled by the PWM signal generator unit based on the reference voltage g a . The switches of the inverter generate the output voltageg a , whose average voltage over one switching cycle is g a . An LC L filter with inductors L s and L 2 and capacitor C s is used to filter out the switching noise ing a . The resistive parts of the coils are denoted by R s and R 2 , respectively. Sensors measure the current passing through L s and the voltage v a on the filter capacitor.
We briefly introduce here the VSM algorithm used in our experiments in Section IV. A full description of this VSM algorithm can be found in [26] (see also [27] and [28]). The relevant parts of this algorithm, namely, the swing equation, the reactive power control, and the fast output current controller (OCC), as shown in Fig. 2, are described in the following. The torque equation of the VSM in [26] is where ω and J are the VSMs frequency and inertia, respectively, T e is the electric torque, T d is the combined damping torque, as shown in Fig. 3, and T m is the mechanical torque, obtained from the active and reactive power set points. S denotes the saturating integrator from [26], [27], and [29]: an integrator that maintains its state and output within a given interval. The rotor angle θ is obtained by integrating the rotor frequency of (1) (modulo 2π). The rotor angle θ is used for all dq-transformations and for calculating the synchronous internal voltages e = [e a e b e c ] ⊤ . These are where i f is the rotor field current, m > 0 is an inductance constant, and sin θ = [sin θ sin θ − 2π 3 sin θ + 2π 3 ] ⊤ . The difference between e and the measured grid voltage v = [v a v b v c ] ⊤ is applied to a series R LC virtual impedance with parameters R g , L g , and C g to calculate the virtual currents i virt . After Park transformation, their q-component i virt,q is employed to determine the electric torqueT e = −mi f i virt,q . Low-pass filtering this gives the torque T e in (1). i f is regulated by an integral controller, also a saturating integrator where Q = Q set − Q is the difference between the reactive power output Q and its set point Q set , D q > 0 is the voltage droop coefficient, V is the amplitude of the measured grid voltages, V r is the reference voltage amplitude, and K m > 0 is the inverse controller gain. Finally, the OCC generates the voltage references g sent to the PWM generator and ensures that the measured output Simplified block diagram of the VSM from [26] showing the swing equation (torque balance), an integral controller for the field current i f , a virtual impedance block, and the fast OCC. The latter ensures that the output currents i dq track the reference currents i ref,dq . Fig. 3. In a VSM with VF, the damping torque T d is obtained by adding the torques of VF, HF droop, and LF droop. While the frequency droop torque is proportional to ω − ω n , the VF damping torque is proportional to ω − ω C (see (4) for ω C ). The signals ω C , ω 1 , ω 2 , and ω 3 are sent over a communication line, which introduces delays. Delayed signals are colored in blue. currents track the current references i ref . To prevent overcurrents, the current references i ref are determined by a limitation block. In addition to the tracking error ε = i ref,dq − i dq , the OCC receives also ω, θ, v, and i; see [26]. Fig. 3 shows how the damping torque T d for the VSMs in this work is calculated. It consists of VF, LF droop, and highfrequency (HF) droop, where the HF-droop signal is obtained by subtracting the output of a first-order low-pass filter from the unfiltered signal. In our realization, the time constant of this filter is 1 s, and the HF-droop coefficient D HF is one to six times larger than the LF-droop coefficient D LF . The VF torque is F · (ω − ω C ), where ω C (the weighted average of the generator frequencies) is calculated by a CC; see (4), and F is the VF coefficient. Note that the differences (ω − ω C ) only depend on the differences of the VSM frequencies. These differences can be kept small by sufficiently increasing the VF coefficient F, such that even during a large frequency drop, (ω − ω C ) remains small compared with (ω − ω n ) [13]. As a consequence, the active power output during such events remains within reasonable bounds, even for large F.
It is helpful, for the theoretical analysis, to separate the system dynamics into two timescales: a fast one that models the dynamics of the OCC and the switches of the VSM (<1 ms) and a slow one, which models the dynamics of ω, θ and i f (>10 ms). An even slower timescale (>50 s) could be used, if secondary control is considered relevant; however, this shall be ignored here. We assume that the OCC is properly tuned, and the impedance of the grid is not too high, such that the OCC is stable and ensures that the current tracking error ε ≈ 0.
Hence, on the slow timescale, which is the one of interest for us here, the dynamics of the OCC can be neglected. Under these assumptions, the VSM can be described by a simplified model, described in Section II-B.

B. Modeling a Grid Comprising Several VSMs
For the theoretical discussion of the power oscillations in a microgrid comprising three VSMs, we briefly introduce a simplified, but powerful model that is known to represent this type of dynamics well: the friction-enhanced power system (FEPS) model [13]. This model is obtained from the network reduced power system (NRPS) model (see [30], [31], and [32, Ch. 6]) by including VF. As the stability analysis of these models has been presented in the mentioned publications, we refrain from a detailed analysis. The FEPS model represents a power grid with N VSMs, connected via a passive network modeled by constant (complex) impedances. Each VSM is modeled as a constant amplitude, variable frequency, balanced three-phase voltage source, and generating positive sequence only. Under these assumptions, the FEPS model is given by the following N equations. The swing equation for each VSM is where D j is the frequency droop coefficient, F j is its VF coefficient, and P set, j = T m ω n is the set power of VSM j. Clearly, (2) is obtained from (1) by differentiating, neglecting saturation effects, multiplying with ω n , and introducing M j = ω n J j , where J j is the inertia of VSM j, as well as P e, j = ω n T e . In this model, we have assumed that the HF-and LF-droop coefficients of generator j are equal, namely, D j . We note that the NRPS model is written as a power balance equation, whereas the VSM equation (1) is a torque balance equation. In order to avoid confusion in the following, we defer here from the standard notation of the NRPS model and continue to use the droop constant D j expressed in kg · m 2 /s, as in Fig. 3. This leads to an additional multiplication by the (constant) ω n in (2) in front of F j and D j .
The electric power P e, j depends on the differences between the rotor angles θ k of the VSMs where a jk = |Y jk | E j E k for 1 ≤ j, k ≤ N , with [Y jk ] being the admittance matrix of the grid including the loads, E j is the amplitude of the output voltage of VSM j, and ϕ jk = arg Y jk − (π/2). (Note that we have deviated from the notation given by Dörfler and Bullo [30], where they require a j j = 0. This is, however, only a choice of notation.) The COI frequency ω C is defined as in [33]: denoting ω k =θ k with a frequency f s , samples are fed into a buffer by the sender. At each sampling moment t s , the receiver reads (and removes) every sample from the buffer delayed by at least τ (t) = τ min + τ var . It may be that no such samples are in the buffer; then, no new information is received at t s . If new info has been received, then τ var gets assigned a new random value.
We introduce the following notation for the damping ratio ρ j and the share of VF of the overall damping σ j : The value of D HF, j is used instead of D j to define ρ, if D HF, j ̸ = D LF, j , since HF droop mainly defines the system damping. The parameters J j , D j , and F j can be used to tune system behavior for a given grid. The correlation of these parameters with the damping and the frequency of power oscillations will be described with the help of a linearized version of the FEPS model. It is useful to define the grounded rotor angles We are interested in uniform grids where the ratios of frequency droop to inertia D j /J j and VF to inertia F j /J j are the same for all VSMs. In such grids, we define

C. Modeling of Delays
We employ two different models for delays. Model 1 assumes constant delays (between 0 and 5 s) and a sampling period equal to the switching period of the inverters, such that sampling effects are negligible. The simplicity of this model helps to isolate the effects of delays on the behavior of the grid, and it will be used for recognizing the most important delay effects. Model 2 assumes a variable network delay and a sampling frequency f s , which is lower than the switching frequency. In this model, the transmission delay has a minimum value of τ min and an additional randomly varying delay of τ var . τ var is uniformly distributed between 0 and τ var,max . We illustrate model 2 in Fig. 4. This delay model is difficult to analyze theoretically, but can be used to demonstrate the impact of more realistic network delays.

A. Stability of the Linearized FEPS Model
We have linearized the FEPS model around the steady state of the uniform and islanded microgrid shown in Fig. 9 when using the line impedances, loads, and set powers as defined in Section IV-A1 and when L 2 is disconnected. We show here the influence of J , D, ρ, and σ on the dynamics of the system. In the following, J and D refer to the base values of inertia and frequency droop. The respective values for VSM j are obtained by The FEPS model of this grid has five poles, of which two pole pairs correspond to the dynamics of δ j from (5) (which are closely linked to the output powers of the VSMs). They may be complex valued for some values of J and D. The fifth pole corresponds to the frequency dynamics of the system and is always on the real axis. Fig. 5 shows the five poles for J = 0.5 kg · m 2 , ρ = 40 s −1 , and σ = 1 as large red marks. In this limit case, only VF and no frequency droop is used, such that one pole is at the origin. Two other poles are on the real axis, and two are complex conjugate. For this pole pair, we show isolines of constant J , D, and ρ. They indicate how these parameters impact the position of the pole pair, if the poles are complex conjugate (in case they become real, the isolines do not give any information anymore). Note here that for the second pole pair, it is possible to draw similar isolines for J and D. They have been excluded here for readability. For decreasing σ from 1 to 0, the frequency-related pole moves from the origin toward the point [−40 0]s −1 (marks from bright to dark), while the remaining four poles do not move. σ correlates inversely with the coupling strength of the VSM frequency to ω n . Fig. 6 illustrates this behavior; here, the frequency of VSM 3 is plotted subsequent to a load disconnection. In the extreme case, if σ = 1 (light orange), the system frequency increases infinitely, with the pole at the origin acting as an integrator. The power imbalance between the sum of the set powers and the consumed electrical power in the grid defines the slope of this frequency increase. A higher σ (with the same damping) leads to a lower coupling of the output power Fig. 6. FEPS model: plots of ω 3 after disconnecting a load starting from steady state at the initial frequency ω 3 = 313.15 rad/s. We show curves for increasingly high σ from 0 (light orange) to 1 (black) with fixed damping ratio ρ = 40 s −1 . When no frequency droop is used (i.e., σ = 1), and if a power imbalance between load and mechanical power input exists, then the model acts as an integrator, such that ω → ∞ for t → ∞ (this is the light orange curve).
of the VSM with a frequency change. Of course, in order to set a reference frequency ω n and to not move the σdependent pole to the origin, some level of frequency droop is required.

B. Dynamics of the COI Frequency
In the following, we investigate the dynamics of ω C , showing that little or no oscillations are expected in this variable if the received signals are aligned or the delays are small.
For a weighted mean, such as ω C from (4), it is known that If the grid is uniform, as in (6), it can be shown that the dynamics of ω C depend only on the total power balance in the grid. This dependence can be expressed by a first-order transfer function. We introduce the following notation: Let E be the set of edges in the network graph, In a fully connected graph, there are n e = ( N 2 ) = (N !/2(N − 2)!) such edges. Note that the FEPS model of a real, connected network is obtained by Krohn reduction and, therefore, is expected to be fully connected. By differentiating (4) and using (2) and (8) Substituting ω C on the right-hand side of the equation gives Using a trigonometric identity, this becomes where We note that (10) is the equation of a first-order low-pass filter from u to ω C . Here, u is the power balance of the grid with the total mechanical power input P M , a constant P D added by frequency droop, and the constant P L , which can be interpreted as the local short circuit power consumption. In (11), P L − (. . .) is the total electrical power consumption in the network, while the terms P M , P D , and P L are constants. The sum (. . .) depends on the rotor angle differences of the VSMs in the network. For a network with purely inductive lines between all generators and with loads connected only directly to the generators (an unlikely scenario), we have In such a case, u in (10) becomes a constant u = P M + P D + P L and, hence, ω C converges to a steady-state value. Of course, in a real grid, lines are not only inductive, and the loads are distributed in the network, instead of being connected directly to the generators. Then, u depends on cos( e ). Thus, small variations in e around zero have little impact on ω C . Equation (10) shows that the dynamics of ω C correspond to a single pole on the real axis: for increasing σ = ( f /d + f )or equivalently, for decreasing d-this pole moves to the right, as can also be seen in Fig. 5.

C. Delays
We assume here that the COI frequency is calculated by a CC (which may also execute additional tasks, such as optimal dispatch or secondary control). Communication delays, thus, arise for both the signals sent from the VSMs to the CC and for the transmission of ω C back to the inverters.
Interestingly, in an isolated and uniform microgrid as in (6), the power output of the VSMs is neither impacted by delays from the VSMs to the central processor nor by equal delays from the central processor back to the VSMs (by equal, we mean that the signal ω C arrives at each VSM after the same amount of time): indeed, subtracting (2) for VSM j from (2) for VSM N , we get, using the notation from (5) Note that the terms f ω C and dω n have canceled on the righthand side of the equation. There are N − 1 such equations describing the dynamics of the grounded rotor angles. Note that the dependence of δ j on ω C and ω n has vanished in (12), so that ω C does not impact the dynamics of the grounded rotor angles. Indeed, the terms P e, j and P e,N , given in (3), can be rewritten using only δ j (see also [13]). While this result does not state anything about the dynamics of ω C in such a case, this shows that if all VSMs receive the same (delayed) signal ω C , the output powers P e, j of the VSMs are not impacted by these delays. We refer to Sections IV-B1 and IV-B2 for a demonstration of these effects. It is possible to write a modified version of (9) for a system impacted by delays, if all VSMs receive the same signal ω C (t) = ω C (t −τ ), with τ > 0. In such a case,ω C replaces ω C on the right-hand side of (9). Using trigonometric identities, as after (10), we can writė Denote the right-hand side of (13) by v. Note that v is a bounded signal. Taking the Laplace transform of (13), we get We note that Re(1 − e −τ s ) > 0 for all s ∈ C + (the open right half-plane), whence Re[s + d + f (1 − e −τ s )] > d for all s ∈ C + . This easily implies that the factor H (s) appearing in (14) is bounded on C + , |H (s)| < (1/d) for all s ∈ C + . In other words, H is a stable transfer function. We remark that, in addition, H is positive real, and its impulse response is in L 2 [0, ∞). The poles of H (there are infinitely many) can be computed using the Lambert W function; see [34,Appendix A]. From the stability of H , we conclude that if system (12) is stable, i.e., its state variables δ j converge to an equilibrium, then also ω C converges to an equilibrium value.
At low frequencies, H (s) can be approximated by a Taylor expansion of the term e −τ s . Neglecting all terms of higher order, the first-order approximation of H is This expression for the time constant T of this low-pass filter indicates that increasing f and τ slows down the convergence of ω C , an observation that is confirmed in Fig. 16.

D. Unequal Delays and Their Compensation
While different delay compensation mechanisms have been proposed in the literature (for example, the Smith predictor [23], [24], [35]), we show here that aligning the received signals according to a timestamp already proves very effective in maintaining strong damping in spite of delays.
If the received samples are not aligned before summation, the estimate of ω C (denoted byω C ) may show strong oscillations during transients, while the real ω C oscillates very little. In such a case, if delays affecting the signals sent from the CC to the VSMs are also unequal, the damping effect of VF can be significantly degraded; see Fig. 7. The simulation shown in Fig. 7 involves two VSMs connected over a tie-line. VSM 1 submits ω 1 and receives ω C with 80-ms delay. The communication delays between the CC and VSM 2 are negligible. The round-trip delay of 160 ms between the CC and VSM 1 is very close to the period of the interarea oscillations (which depends on the J j and D j + F j ; see Section III-A). Subsequent to a disturbance (i.e., after a grid reconfiguration, fault, or load change), oscillations occurring between the VSMs are observed in ω 1 , ω 2 , andω C . Without any delay compensation (top), the damping effect of VF is very low, andω C strongly oscillates. If, for the same system, the frequency of the second generator ω 2 is artificially delayed by 80 ms at the CC and, therefore, aligned with ω 1 , the oscillations inω C vanish, and the damping effect is stronger (bottom).
To achieve alignment, signals can be sent with a timestamp that can be obtained, for example, from a GPS module with a typical accuracy below 20 ns [23], [36]. Based on this timestamp, the CC can artificially delay all signals to the largest delay τ max , such that theω C becomes For the simple case of two VSMs connected via a tie-line, we show how to estimate the oscillation frequency and the damping factor. For simplicity, we assume that the VSMs have equal inertia M, set power P set , frequency droop D, and VF constant F. As before, we assume that there are no delays in the communication between VSM 1 and the CC, while between VSM 2 and the CC, there is a delay of τ both ways. The FEPS model of this system is wherep = (1/M)(P set + ω 2 n D − a 0 sin(ϕ 0 )) and a 0 and ϕ 0 are the diagonal values of the network admittance matrix and the phase angle matrix. Using the grounded rotor angle δ = θ 1 − θ 2 , the three equations (16) becomë We are interested in the effect of τ on the damping and frequency of oscillations in this microgrid. We may look at very small angular disturbances only, so that sin(δ) ≈ δ. We obtain Because of the symmetry of the system, it appears reasonable to assume that after sufficient time, the two VSMs oscillate with the same frequency and a phase shift of 180 • . A solution for (17) can, thus, be attempted by using the Ansatz ω 1 (t) = ω 0 + e kt (k sin(νt) + ν cos(νt)) ω 2 (t) = ω 0 − e kt (k sin(νt) + ν cos(νt)) where k < 0 and ω 0 > 0 is the equilibrium frequency. This allows us to write δ and its derivatives as follows: The delayed signal ω 1 (t −τ ) then can be expressed as follows: ω 1 (t − τ ) = ω 0 + e kτ e kt (k cos(ντ ) + ν sin(ντ )) sin(νt) + e kτ e kt (ν cos(ντ ) − k sin(ντ )) cos(νt). (20) Similar expressions are obtained for ω 2 (t − τ ) and for ω 2 (t − 2τ ). Substituting (18)- (20) in (17) and by comparing the terms multiplied by sin(νt) and cos(νt), we obtain the following equations for k and ν: Using a numerical solver, τ -dependent solutions can be obtained for (21). Fig. 8 shows these k and ν computed for an example where M = ω n , f = 2, d = 1, a = 65 600, ϕ = 0.566, and τ ∈ [0 0.4] (we have taken J = 1). Fig. 8(a) shows a set of such solutions ν (in Hz), indexed from 1 to 9. The dashed horizontal line marks the natural oscillation frequency without delays, ν 0 = ((d 2 /4) − (2a/M) cos ϕ) 1/2 , and the vertical dashed lines show the delays τ 0 that match the half-period of this ν 0 . The damping for each of these solutions is shown in Fig. 8(b). The black solid lines overlapping the red solution number 1 indicate the damping k and frequency ν obtained by simulating the FEPS model (for each delay τ , the values are estimated by curve fitting a decaying sine to the signal ω 1 − ω C ). Fig. 8 shows that there are many solutions for k and ν for each τ . Most of these solutions are strongly damped and have an inverse dependency on τ . Solution 1 (with the lowest damping) is predominant until τ ≈ 0.4. The damping k of this solution is worst for τ = τ 0 and has another peak at τ = 2τ 0 . Interestingly, ν of solution 1 shows a negative slope around τ 0 and 2τ 0 and ν = ν 0 at τ 0 and at 2τ 0 . Solution 3 becomes the predominant (i.e., the least damped) solution for τ > 0.4, so that the black curve (obtained by simulation of the FEPS model and curve fitting) jumps from solution 1 to solution 3 at τ ≈ 0.4. In Section IV-B2, we will show that experiments in the three-VSM microgrid produce similar results.

IV. EXPERIMENTAL VALIDATION
We show experimental results for a microgrid consisting of three VSMs, line impedances, a transformer, and loads. The setup is shown in Figs. 9 and 10. S 2 allows to connect the microgrid to an infinite bus or to a load L 1 , both emulated by a programmable ac power supply. There are two voltage levels in the grid, separated through a delta-wye transformer: VSMs G 2 and G 3 are connected on the high-voltage side (190 V rms ), and a third VSM (G 1 ) is connected at the lowvoltage side (110 V rms ). L 1 is a 6-kW, 1.8-kVAr load, which is connected in all experiments with an islanded microgrid. The load L 2 consists of three line-to-line connected resistors of 110 each, representing a 2.95-kW load at 190 V rms . The line impedances (per line) are Z 1 = 2 mH, Z 2 = 4 , 5 mH, and Z 3 = 0.3 mH. All inverters have a three phase, two-level, insulated-gate bipolar transistor (IGBT)-based topology using a switching frequency of 10 kHz. G 2 and G 3 use an LC L filter with values L s = 2 mH, C s = 5 µF, and L 2 = 3.3 mH. The values of the LC L filter of G 1 are L s = 545 µH, C s = 22 µF, and L 2 = 120 µH. G 1 is powered by a 300-V dc power supply and employs an internal step-up converter to raise the dc voltage to 380 V. G 2 and G 3 are connected to the same dc power supply at 650 V. All inverters employ space vector modulation and have a power rating of 15 kW. G 1 is controlled by a dSpace DS1005 board (DS1), while G 2 and G 3 are controlled by a dSpace MicroLabBox (DS2). Delay models were implemented on DS2, and a CAN bus is used to communicate ω C and ω 1 between the two systems. In addition, a synchronization signal is sent from DS2 to DS1 in order to allow alignment of the recorded data for postprocessing and plotting. Fig. 9. Microgrid contains three VSMs and a transformer. S 2 allows either connecting the microgrid to a load L 1 or to an infinite bus (grid simulator). L 2 can be disconnected by S 1 . A CC communicating with all three VSMs calculates ω C . This section first focuses on experimental results without delays, similar to what was presented in [1]. Both islanded operation and grid-connected operation are shown. For the latter, we demonstrate the mentioned modified COI frequency, which takes into account the frequency of the main grid to improve damping in such cases. Subsequently, we focus on experiments with delays. We show results with the islanded microgrid, illustrating our theoretical findings of Section III-C as well as delays in grid-connected mode. Finally, we show results using delay model 2.

A. Fast Communication (No Delays)
We compare the damping of oscillations subsequent to a disturbance created by connecting L 2 in the islanded case to the scenario when the microgrid is connected to the infinite bus, which imposes a frequency drop (such as occurring after the loss of a generation unit in the main grid). We consider five different scenarios; see Table I: a reference case with minimum damping (LOW), a case using frequency droop (D), a case using mainly HF droop (DHF), and two cases using VF (VF and VFS). The grid is uniform, such that ρ is the same for each VSM. 1) Islanded Grid With L 2 : Fig. 11 shows experimental results with S 2 connected to L 1 (islanded grid), J = [0.3 0.1 0.18] kg · m 2 , and the power set points P set = [3 1 2] kW and Q set = [0.7 0.3 0.6] kVAr. L 2 is connected at t = 0 s, and the subsequent change in the grounded rotor angle, frequency, and output power of G 2 is observed. In scenario LOW, the grounded rotor angle δ 2 shows strong oscillations, which slowly decay over time. Scenarios D, DHF, and VF exhibit similar damping performance but with small oscillations only showing for about 1 s. No oscillations ensue in scenario VFS. Since the system inertia (the same in all scenarios) determines the initial rate of change of frequency (ROCOF), we see in Fig. 11(b) that these are identical. The VSMs have the same LF droop in scenarios LOW, DHF, VF, and VFS, so that ω 2 converges to the same steady-state value. Since DHF has a stronger initial action against changes of frequency, the convergence in scenario DHF is slower. Damping is the strongest in VFS, and similar damping is observed in scenarios D, DHF, and VF.
In Fig. 11, the active power P e,2 reaches a peak of 2 kW in all scenarios, in part due to the inertial action of G 2 , and later converges to 1.5 kW. Again, same damping is observed with D, DHF, and VF, while in scenario LOW, strong power oscillations appear. For completeness, we also show the reactive power output Q 2 . Similar to the active power, after an initial peak, the reactive power converges to a steady state with oscillations mainly occurring in scenario LOW. In the subsequent experiments, we do not show the reactive power output. Note that VF and frequency droop show equivalent damping performance.
2) Grid-Connected Mode With Grid Frequency Unknown to the CC: In Fig. 12, we show results when the microgrid is part of a larger main grid. and VFS, some (damped) oscillations remain. Scenarios D and DHF do not exhibit Oscillations and, however, entail a strong increase in active output power [ Fig. 12(c)]. As expected, this power increase is minimal in scenarios VF and VFS.
The above two experiments demonstrate the effectiveness of VF in damping oscillations for islanded microgrids where all virtual rotor frequencies are known. However, if this microgrid is not islanded anymore and without additional damping acting on the link between the microgrid and the main grid, VF is less effective. In such a case, it can be sufficient to increase the HF droop on one selected VSM in order to strengthen the damping link with the main grid, while maintaining a lower droop on the remaining two VSMs. Such a configuration may be of interest if not all VSMs are connected to power sources with the capability to deliver excess power on demand. We show in Fig. 13 that such a measure can achieve good damping for even those VSMs that cannot implement HF droop. Fig. 13 shows the power output of VSM 3 (top) and VSM 1 (bottom) for the scenarios LOW (blue) and VF (red) as before. Using settings based on scenario VF, the other curves show the output powers when the HF droop of VSM 1 is increased: D HF,1 = {3, 4, 5, 6}. This leads VSM 1 to respond with an increasingly large power output, while VSM 3 benefits from increasingly high damping. The performance of this mechanism depends on the ratio of the inertias (J 1 / J ), i.e., sufficiently large inertia is required on the VSM providing HF droop to impact ω C in a satisfactory manner.
Finally, Fig. 14 shows the power output of the three VSMs for scenarios LOW and VFS for the above experiment. Unlike in scenario LOW, the oscillations in VFS are strongly aligned in phase, which shows that damping between the generators is strong: they oscillate almost like a single unit against the infinite bus when VF is strong. This behavior is expected, since VF has no information about the outside grid and, therefore, only applies damping to intermachine oscillations. In the next section, we show a possible extension to the ω C calculation that can solve this drawback more effectively.
3) Grid-Connected Mode With Known Grid Frequency: An alternative to using frequency droop on at least one of the machines to achieve damping with respect to the main grid is the addition of the main grid frequency in the formula for ω C . To do so, we treat the main grid as an additional VSM with frequency ω ∞ and inertia J ∞ . This ω ∞ can be obtained, for example, from a PLL placed in the main grid. The modified ω C is defined as follows: Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.  In this formula, a suitable value for J ∞ must be chosen that is comparable to the total inertia in the microgrid. Fig. 15 shows how (22) can improve the damping performance of VF with different J ∞ values between 0 and 2 kg · m 2 for the system as in Section IV-A2. Good damping was obtained for J ∞ = 2 kg · m 2 , which corresponds to (J ∞ /(J 1 + J 2 + J 3 )) = 3.44.

B. Impact of Transmission Delays
In the following, we focus on the system behavior when delays are not negligible. To clearly demonstrate the effects of delays, we first show data with the simpler, continuous delay model 1, discussed in Section III-C. We first show experiments with equal and unequal delays in an islanded microgrid, followed by cases where the generators are part of a larger grid. In Section IV-B5, we show results with delay model 2.
1) Even Delays in an Isolated Microgrid: It was shown theoretically in Section III-C that in a uniform, islanded grid, equal delays (equal delays can be achieved by aligning signals at the CC and the generators) do not impact the power output. We show here an experiment with the same delay on all connection lines with round-trip delays from 0 to 5000 ms. The three VSMs are configured according to scenario VF with J = [0.5 0.4 0.65] kg · m 2 . Initially, P set = [2 2 1] kW. At t = 0 s, a step change in P set,3 = 6 kW is applied (here, no low-pass filter on P set was used). This constitutes a large disturbance in the grid. The output power of G 2 is shown in Fig. 16(a). Since the power balance in the microgrid is almost only defined by the connected loads, ω C increases subsequent to the load step until the droop mechanism restores the power balance [ Fig. 16(b)]. It can be seen that in all cases, the system behaves stable, and no impact on the power output of the generators is seen. However, ω C shows a more and more staircase-like behavior for increasing delays. A black dashed line indicates the continuation of the light blue curve before t = 5 s. All curves in Fig. 16(b) follow this black dashed line until one round-trip delay has passed since the disturbance. We recall in Section III-C where it was shown that equal delays cannot destabilize the system; instead, they slow down the dynamics of ω C . An intuitive explanation is as follows: the initial frequency increase is caused by the disturbance itself, while the ω C received by the VSMs is still the same. In this initial phase, scenario D would produce identical results with scenario VF. After sufficient time has passed, the VSMs receive the new ω C and react again with an increase in frequency. This process repeats indefinitely.
2) Unequal Delays in an Isolated Microgrid: The previous results showed the immunity of the power output to equal delays. In this section, we focus on unequal delays. As discussed in Section III-D, the most disadvantageous delays are those where the round-trip delay of one of the generators is close to time period of the oscillations. In the following, we define a base delay τ b for each experiment, which is chosen, such that it matches the half-period of the expected oscillations. A configuration of delays is denoted by d jk, with j, k ∈ {0, 1, 2, 3, A}. By j ∈ {1, 2, 3}, we mean that the communication from G j to the CC is delayed by τ b , whereas 0 means that the CC receives all signals undelayed. The letter A indicates that all three data lines from the VSMs to the CC are delayed by τ b . k refers to the data lines from the CC to the VSMs in the same way. For example, d3A means that data from G 3 to the CC are delayed by τ b , and all generators receive ω C with a delay τ b . However, the data lines of G 1 and G 2 toward the CC are not delayed. In Section IV-B5, we will further use the letter S to indicate that the samples are aligned in case of a random delay. Fig. 17 shows the grounded angle, frequency, and active power of G 1 subsequent to a connection of L 2 . The three VSMs are configured according to scenario VF with τ b = 320 ms, J = [0.4 0.2 0.2] kg · m 2 ( f = 0.83, ρ = 12), P set = [3 1 2] kW, and Q set = [600 500 300] VAr. In this experiment, J is such that for low damping, G 2 and G 3 oscillate against G 1 . A delay impacting the communication between G 1 and the CC, thus, is the most detrimental. In this plot, we compare d00 (no delay), d10 (delays only from G 1 to the CC), and d11 (delays both ways between G 1 and the CC) with two compensation techniques: dA1 (alignment of all signals at the CC and, thus, a delay on all data lines VSM to CC) and dA A (alignment at the CC and also at the generators). The lowest damping is seen in case d11, where the round-trip delay between G 1 and the CC matches the oscillation period. If, in such a case, the signals are aligned at the CC (dA1), the damping improves significantly. The grounded angles and active power output for delay cases d00, d10, and dA A are identical, as predicted by the theory in Section III-C: in these three cases, all three VSMs receive the sameω C . Fig. 17(b) shows that the speed of convergence of the frequency increases with the number of impacted communication lines from d00 to dA A.
3) Correlation of Oscillation Frequency and Delay: In Section III-D, we showed how the damping k and the frequency ν are impacted by unequal delays. The strongest decrease in the VF damping was observed in the simple two-VSM system if τ = τ 0 . In the experimental three-VSM grid, a similar dependence can be observed; see Fig. 18. Here, the VSMs are as in Section IV-B2 with delay configuration d11 (the "worst" case). After (dis)connecting L 2 , we observe the oscillations of G 1 for different delays. For each experiment with a certain delay τ b , the damping k and oscillation frequency ν can be estimated by curve fitting (as previously described in Section III-D). The obtained values for k and ν are plotted as the functions of τ b in Fig. 18(a). Solid lines indicate values for the experiment conducted when connecting L 2 and dashed lines when disconnecting L 2 . The black line is a plot of the frequency f τ = 1/(2τ b ). It can be observed that the damping is lowest when τ b matches the oscillation half-period (the intersection between the black and the blue lines) at τ b ≈ 0.35. The output power of G 1 is shown for selected τ b in Fig. 18(b). The lowest damping is seen for the yellow curve where τ b = 0.350 s, which matches the peak in Fig. 18(a). In this case, the oscillation period is 700 ms = 2τ b , as expected. These results match well with the observations made in Section III-D.
4) Delays in Grid-Connected Operation: The above delay analysis was done for an isolated microgrid. While, in gridconnected mode (as in Section IV-A2) with unequal delays, the same observations can be made as in an isolated grid, increasing delays in this case can change the power output of the VSMs during a frequency drop. Fig. 19 shows such an experiment where ω ∞ is as in Section IV-A2. The delay configuration is dA0 (where also ω ∞ is delayed by τ b ), J ∞ = 1 kg · m 2 , J = [0.2 0.1 0.07] kg · m 2 ( f = 0.83, ρ = 12), P set = [1 1.5 1.2] kW, and Q set = [600 200 200] VAr. In such a scenario, delays lead to an increase in the output power of the VSMs: while t < τ b , the power output and the  grounded angles behave like in scenario D (blue), since during this initial interval following the start of the frequency drop, the receivedω C remains constant. When t ≥ τ b , the VSMs start receiving information about the frequency drop, and the output power decreases. 5) Random Delays: We show here results with the delay model 2 in the islanded case. Damping is as in scenario VF, J = [0.4 0.2 0.2] kg · m 2 , P set = [3 1 2] kW, and Q set = [600 500 300] VAr. If signal alignment at the CC is performed in a scenario, we denote this by dÃ A. Here, τ min = τ var,max = 200 ms. This choice is made, so that τ min + (1/2)τ var,max = 300 ms, which is approximately the half-period of the expected oscillations and, thus, again close to the worst case. We compare the delay cases d00, d33, and dÃ A for the sampling frequencies of 100 and 3 Hz in Fig. 20. A sampling rate of 100 Hz does not visibly impact the system behavior (dark blue). No impact on grounded angle and power output is seen if the sampling frequency is decreased to 3 Hz. However, the system frequency converges slower, similar to what was observed in Section IV-B1. The case d33 with 100-Hz sampling frequency shows similar results as with delay model 1, with weak damping. Decreasing the sampling frequency to 3 Hz in this case further slows down the frequency dynamics and disturbances become less regular (however, they persist for an equally long time). Finally, aligning signals at the CC while delays on all three channels from the CC to the VSMs are equal leads to the slowest frequency convergence. In this case, however, the peak in grounded angle and output power observed in case d33 does not occur, and disturbances are less pronounced.

V. CONCLUSION
We provide a theoretical and experimental evaluation of VF in a microgrid when communication channels introduce delays. We show that VF allows decoupling frequency support from damping and can be used as an effective tool for microgrids where strong frequency droop cannot be used due to limitations of the primary energy sources. The theoretical analysis shows that equal delays cannot deteriorate the damping effect of VF. For delays >100 ms, the frequency convergence in isolated microgrids is slower than without delays. Unequal delays can cause ω C to oscillate and, if the delays are close to the oscillation half-period, can deteriorate damping. Such delays can be avoided by aligning individual signals at the CC and potentially at the VSMs, using timestamps. An extension of the COI calculation is introduced that strengthens damping of VSMs against the main grid. Finally, a random delay model is tested. The presented theoretical and experimental results suggest that delays as occurring in real communication systems can be compensated by simple mechanisms, such as signal alignment. Further research is suggested to investigate the risks of cyberattacks and communication losses as well as more complex delay compensation mechanisms, such as Smith predictors.