The Sensitivity of Grid-Connected Synchronverters With Respect to Measurement Errors

The synchronverter algorithm is a way to control a switched mode power converter that connects a DC energy source to the AC power grid. The main features of this algorithm are frequency and voltage droops as well as synthetic inertia, so that the inverter resembles a synchronous generator (SG). Many versions of this algorithm have been proposed and tested, but all share the same “basic control algorithm”, which is based on the equations of a SG. We analyze the sensitivity of the output currents of a synchronverter, with respect to the measurement errors. We show that some of the sensitivity functions exhibit high gains at the relevant frequencies, leading to distorted grid currents, which makes the use of this inverter control algorithm problematic. We then do a similar analysis assuming that we have controlled current sources available at the grid output of the converter, that we control using virtual currents generated in the algorithm. The virtual currents are flowing through virtual output inductors, that we can choose to be significantly larger than the actual output inductors. We show that using the current sources reduces the sensitivity considerably, thus indicating a better approach to synchronverter design.

The hardware of a synchronverter is the same as for a conventional three phase inverter, except that some DC energy storage is required to emulate inertia. This extra The associate editor coordinating the review of this manuscript and approving it for publication was Derek Abbott . storage is normally provided by capacitors or batteries. The novelty lies in the control algorithm, which is based on the (simplified) model of a synchronous generator (SG). In some respects synchronverters are even better for the stability of the grid than SGs, because their parameters are adjustable and they can react faster to changes on the grid. This paper investigates two related topics: (1) The sensitivity of the currents of a synchronverter functioning according to the basic synchronverter algorithm, when connected to a powerful grid modeled as an infinite bus, with respect to voltage and current measurement errors. (2) The same sensitivity, when the synchronverter works with a virtual output impedance, and the resulting virtual output currents are used as reference signals for ideal current sources injecting currents into the grid. We show that the sensitivities are much reduced in the second case, and hence we suggest that future developments should follow this road. To deal with these aims, we recall the fifth order gridconnected synchronverter model, that takes into account the measurement errors, a variation of the model in our recent paper [16], where the measurement errors are ignored. The equilibrium points of the resulting system are of course the same as for the model in [16], as discussed there. For the sensitivity analysis, we do a small signal analysis around the stable equilibrium points of this model.
For the proper operation of an individual inverter we need the sensitivity of the inverter currents with respect to grid voltage and current measurement errors to be small. Our research is motivated by the following practical observation: in a synchronverter running under the basic algorithm from [35] or one of its later variations, such as the one in [20], the errors can be very disturbing, causing strong distortions of the grid currents, especially at relatively low power. This issue has been pointed out also in our recent conference paper [26], however no detailed analysis has been provided.
To understand intuitively where the problem lies with the synchronverter designs from [20], [34], [35], we look at the simplified circuit diagram of a grid-connected inverter in Figure 1, taken from [16]. The outputs of the algorithm are the desired averages (over one switching cycle) of the voltages g a , g b and g c at the output of the inverter legs. In the original algorithm from [35], g a , g b and g c are the internal synchronous voltages of the virtual SG, while in the version of [20] they are the voltages after the virtual inductor, which is (n−1) times the output filter inductor, as shown in Figure 2 (taken from [20]). (In this paper we do not consider the virtual series capacitor introduced in [20], which is very large so that it has an influence only near the frequency zero.) Thus, the original algorithm is a particular case of the one in [20], corresponding to n = 1, and here we consider the version with arbitrary n ≥ 1 for greater generality. The reasons for increasing the output impedance of the inverter using virtual inductors and virtual resistors have been explained in [20], [21]. In short, the inverter with the classical synchronverter algorithm would be unstable with the very small values of L s and R s that are usually found in commercial inverters, and increasing the real filter inductor by a factor of about 30 would make it very bulky and expensive.
A voltage measurement error v a in phase a may be due to a combination of sensor imprecision, calibration errors, quantization errors, and processing delay. This error will cause a similar sized error g a in the signal g a , because g a is FIGURE 2. The output circuit of a synchronverter with filter inductor L s and its resistance R s . e a is the synchronous internal voltage. The output filter elements multiplied with (n − 1) are virtual. Only phase a is shown.
approximately following v a . This will cause an error current i a that, expressed via its Laplace transform i a , is given by: For a typical inverter of 10 kW nominal output, L s would be around 2 mH, resulting in an impedance of around 0.63 at the nominal grid frequency of 50 Hz. Hence, having g a of the order of 4 V (which is a normal value according to our experience, and is a small error when expressed as a percentage of the AC voltage range) will result in i a of the order of 6 A, which is intolerably high. One can try to fight this phenomenon by striving for very high precision in measurements and calibrations, and devising all sorts of ingenious ways to compensate for the processing delay. However, overall this is a losing battle, and this has led us to seek a fundamentally different approach.
Very briefly, the new approach is to add current loops to the inverter, let the synchronverter work with virtual currents, which results in a very robust system, and then use the virtual currents as reference values for the current loops. If the current loops are good, they can be regarded, at least for low frequencies (hundreds of Hz), as controlled current sources. As already mentioned, we do the sensitivity analysis both for the algorithm from [20], [35] and also for this new approach when we have current sources at the output of the inverter, to understand whether this reduces the sensitivity of the currents with respect to measurement errors. It will turn out that indeed, the sensitivity will be reduced by a large factor, approximately n − 1.
The fifth order mathematical model of the grid connected synchronverter containing the measurement errors is derived in Section II. In Section III we briefly recall the main results on the equilibrium points and the stability of this model, derived in our recent paper [16]. In Section IV we perform a small signal analysis around the stable equilibrium points, and we provide Bode plots of the resulting sensitivities, for a typical 10kW inverter. These plots confirm what we have said about sensitivities in this section. In Section V we derive the model and the sensitivities of synchronverters with ideal current sources at their outputs, and we plot these sensitivities for synchronverters with the same parameters as in the example in Section IV. The comparison will show that indeed the current sources lead to a significant improvement.

II. MODELLING THE GRID-CONNECTED SYNCHRONVERTER WITH MEASUREMENT ERRORS
In this section we review the basic fifth order model of a synchronverter connected to a sinusoidal, balanced grid with very low impedance, known as an ''infinite bus''. This model is based on those in [16], [20], [35], which in turn are based on the equations of a SG, as found for instance in [12], [13]. The novelty here is that we also include the influence of the grid voltage and output current measurement errors. We follow the terminology and notation of [16]. The simplified model of a synchronverter, given in Figure 3, shows how the voltage measurement errors η and the current measurement errors ξ influence the signals in a synchronverter. The model ignores low-pass filters included in the algorithm to reduce high frequency noise, as well as saturation blocks included in the algorithm for stability and protection (see [6], [20]).
Let θ g denote the grid angle and ω g the grid frequency, so that ω g =θ g . The nominal grid frequency is denoted by ω n . Let θ denote the synchronverter rotor angle, and ω its angular velocity, so that ω =θ. The difference δ = θ − θ g is the power angle. Then the grid voltage vector is where V is the rms value of the line voltage.
Denote by M f > 0 the peak mutual inductance between the virtual rotor winding and any one stator winding, by i f the variable field current (or rotor current) and by e the vector of electromotive forces, also called the internal synchronous voltage. We rewrite [35, eq.(4)]: We apply the unitary Park transformation U (θ) to (1) and (2). For any three dimensional signal v, the first two components of U (θ)v are called the dq coordinates of v, denoted by v d , v q . By using the notation m = √ 3/2M f , we obtain The voltage sensors measure v a , v b and v c , while the current sensors are placed to measure i ga , i gb and i gc , in order to avoid most of the switching noise. From the measurements, i a , i b and i c must be estimated, by adding to i ga , i gb , i gc the currents flowing to the filter capacitors (see Figure 1).
Denote by η = [η d η q ] the voltage measurement errors, and by ξ = [ξ d ξ q ] the current measurement errors, expressed in dq coordinates. Thus, the synchronverter control algorithm gets are the estimated synchronverter output currents, expressed in dq coordinates.
We have already introduced the voltages g = [g a g b g c ] that the synchronverter algorithm sends to the PWM block. Note that the basic algorithm is a special case of the one presented below, corresponding to n = 1. In the basic synchronverter algorithm, we have g = e. According to the modified synchronverter equations [20, eq.(22)] and taking into account the measurement errors, we have By applying the Park transformation on the circuit equations corresponding to Figure 2, we have Here, L s and R s are the inductance and the resistance of the output filter inductor. Combining (4)-(6) and using the notation R = nR s , L = nL s , we get the differential equations of the grid currents: The angular frequency satisfies the swing equation where J > 0 is the virtual inertia of the rotor, T m > 0 is the nominal active mechanical torque from the prime mover, is the estimated electric torque computed using the measured output currents and D p > 0 is the frequency droop constant. The torque T m is computed from P set (the desired active VOLUME 9, 2021 power) and Q set (the desired reactive power) using the formula The justification for this formula will be in Proposition 3. From the definition of the power angle δ: The instantaneous inverter output reactive power is see for instance [20, eq.(16)]. Due to the measurement errors, the following estimate Q est of Q is computed in the basic synchronverter control algorithm: at equilibrium where we have neglected products of error terms.
The field current i f evolves according to [20, eq.(15)], which represents the integral controller that adjusts the field current: In (15), K > 0 is a large constant. The valueQ represents a compromise between tracking the reference reactive power Q set and tracking the reference value v set for the amplitude of v. Tracking v set makes sense only if the inverter is connected to the infinite bus through a line impedance, and not directly, as in our model. Still, our model reflects the full field current controller. In (16), D q > 0 is the voltage droop coefficient and V is as in (1). Denote The fifth order grid-connected synchronverter model that includes voltage and current measurement errors can be constructed by combining the equations (7)-(15), with state vector z ∈ R 5 . The input of this model is the measurement error vector u ∈ R 4 . The components of z and u are We write this model as a nonlinear dynamical system: where Remark 1: The model in [16], [20] uses a ''saturating integrator'' for integrating the right-hand side of (15), in order to ensure that i f stays in a reasonable operating range. This helps in proving stability with a relatively large region of attraction in [16], and it helps the system overcome faults. In the analysis of this paper, we ignore the saturating integrator, our model uses just a simple integrator, which is reasonable since in practice, the saturation limits are very rarely reached, it happens only during faults.
Remark 2: The instantaneous active power P from the synchronverter to the grid (see also [20, eq.(17)]) is Solving the equations (13) and (19) for the dq currents, we get the following nice formula:

III. EQUILIBRIUM POINTS OF THE FIFTH ORDER GRID-CONNECTED SYNCHRONVERTER
In this section we briefly recall some results on the equilibrium points of the fifth order model (18) (of a grid-connected synchronverter), based on [16]. In the sequel, angles are always regarded modulo 2π, i.e., δ and δ + 2π are considered to be the same angle. To find the equilibrium points of the model (18), we set u = 0 andż = 0 in (18). The following result, taken from [16,Sect. 4], concerns mainly the equation that must be satisfied by the active power P at an equilibrium point.
Proposition 3: Consider the model (18), with u = 0. We assume that R, L, J , m, D p , D q , V , ω g , ω n , v set > 0 and the real parameters T m and Q set are given. We denotẽ and we use the notationQ introduced in (16). A necessary condition for this system to have equilibrium points is At every equilibrium point of this system we have and P satisfies the equatioñ Remark 4: The formula (23) is used in the synchronverter algorithm to determine the value of the parameter T m , if the reference values P set and Q set are given and if some estimate (for instance, zero) is adopted for the differences ω n − ω g and v set − √ 2/3V . If we adopt the estimates ω g = ω n and √ 2/3V = v set , then this computation of T m reduces to (11).
is an equilibrium point. The intuition behind this is clear: if we rotate the rotor by a half circle and at the same time invert the current i f in the rotor, then due to the symmetry of the rotor we get the same rotor field (in the fixed coordinate system of the stator). Thus, if the system was at equilibrium before this rotation by π, then it must be again at equilibrium.
Remark 6: There is an exceptional infinite set of equilibrium points of the system (18), which corresponds to the parameters T m and Q set chosen such that In these equilibria, i e f = 0, so that the rotor is inactive, the angle δ e can be chosen freely, and the currents i d and i q can then be computed from (20). The active power in these equilibrium points is Denote M = (P M , Q M ) ∈ R 2 . The set of equilibrium points of (18) where i e f > 0 can be parametrized by the corresponding powers (P, Q), and then it is a two-dimensional manifold diffeomorphic to R 2 \ {M }. Remark 7: The real system can never reach an equilibrium point with the property i e f ≤ 0. The reason is that the synchronverter algorithm that controls the true system has a saturating integrator to compute i f , as explained in Remark 1, and the minimum value of i f is set to be positive.
The following theorem, also taken from [16,Sect. 4], tells us how to compute the equilibrium points of (18) corresponding to given values of the parametersT m andQ, except for the exceptional values discussed in Remark 6.
Theorem 8: We work under the assumptions of Proposition 3, withT m andQ given. Then the model (18), with u = 0, has equilibrium points if and only if (21) holds.
Suppose that (21) is true, and let us denote by P l and P r the two real solutions of (23), so that P l ≤ P r , and P l +P r 2 = − V 2 2R . At every equilibrium point z e = [i e d i e q ω g δ e i e f ] that corresponds to the givenT m andQ, we have P = P l or P = P r .
Let P be the active power at an equilibrium point z e as above. Assume that P andQ are not the exceptional pair M described in (24) and (25). Then the equilibrium angle δ e satisfies tan δ e = ω g LP − RQ If the angle δ e is measured modulo 2π, and (21) holds with strict inequality, then the model (18) has precisely four equilibrium points. Two of them, denoted by z e l and z e r , have the property that i e f > 0. At z e l , P = P l , and at z e r , P = P r . There are also the two symmetric equilibrium pointsz e l and z e r where i e f < 0, as described in Remark 5. If (21) holds with equality, then P l = P r = −V 2 /2R and the model has precisely two equilibrium points, which are a symmetric pair, as described in Remark 5.
Once δ e has been found, the values i e d and i e q can be computed from (20), and i f can be computed from (10) (with ξ q = 0 and T e =T m ).

IV. SMALL SIGNAL ANALYSIS
We consider the output of the system (18) to be the grid currents (in dq coordinates), y = [i d i q ] . We linearize this system near the stable equilibrium point, to explore the small signal behavior of the dq currents as a result of the measurement errors. Define the small signal state variableŝ Denoteẑ = [î dîqωδîf ] (the state deviation from equilibrium) andŷ = [î dîq ] (the output deviation).
We define a function F : R 5 × R 4 → R 5 as follows: The linearized system will be of the form where A lin is the Jacobian A lin = ∂F/∂z computed at the equilibrium point z e with u = 0, while B lin = ∂F/∂u (evaluated at the same point). The matrix C lin is simply the projector from R 5 to R 2 by selecting the first two components. Denote again k = Naturally, we are only interested in asymptotically stable equilibrium points, i.e., those where H −1 A lin is a stable matrix. There is a detailed discussion on stable equilibrium points of (18) in our paper [16], and we sketch a result from there. We assume that R, L, J , m, D p , D q , V , ω g , ω n , v set > 0 are fixed (as in Proposition 3). The real parameters T m and Q set can be changed by the user, giving rise to a manifold of equilibrium points. We consider only the submanifold where i f > 0 (there is also a symmetric submanifold with i f < 0, as explained in Remark 5). This submanifold (with i f > 0) can be parametrized by the powers P and Q: for every pair (P, Q) ∈ R 2 except for the singular point M defined in (24) and (25), there is a single equilibrium point with i f > 0.
We define a point C ∈ R 2 by C = (−V 2 /2R, 0). We denote by S the angular sector in R 2 that is bounded by the line CM and the vertical line passing through C, see Figure 4, which has been adapted from [16]. Normally, the state of a synchronverter is kept in a region contained in S, because for well chosen parameters, equilibrium points for which (P, Q) ∈ S and P 2 + Q 2 is not too large, are stable. Below we try to explain this stability issue a bit more, but for the full details we refer to [16].
It has been shown in [16,Sect. 5] that if (P, Q) is in S and a certain 4th order model is stable (which is often the case), and if (P, Q) is not too large (which is true within the normal operating range of the inverter), then for k > 0 sufficiently small, the model (18) is asymptotically stable around the corresponding equilibrium point. This fact is illustrated in Figure 4, which refers to Example 1 later in this section. The figure shows the points C and M for this example, the sector S and the part of the sector where the stability of the fourth order model is true, highlighted in green. This being a converter of nominal power 9 kW, the region of interest H is, say the disk defined by P 2 + Q 2 ≤ 20 kW, shown in Figure 4. Within H, we see that the green part is exactly H ∩ S. The figure also shows the set of stable equilibrium points of the model for four different values of k.
In the following, we will illustrate the excessive sensitivity of the synchronverter to measurement errors by using Bode amplitude plots for a numerical example.  3 Volts. This is based on a real inverter that we have built, see [15]. The parameters are: J = 0.2 kg·m 2 /rad, D p = 3 N·m/(rad/sec), L s = 2.27 mH, R s = 0.075 , K = 5000 A, n = 25, D q = 0 VAr/Volt, m = 3.5 H. We take T m = 31.69 Nm (according to [20, eq.(24)], this mechanical torque corresponds to P set = 9000 W and Q set = 0 VAr). For simplicity we let v set = 2 3 V = 325.26 Volt, Q set = 0 VAr, so thatQ = 0, and m = 1. We have R = nR s = 1.875 , L = nL s = 56.75 mH, φ = 83.99 • , and I f = [1.3; 13.4]. Note that at the grid frequency, positive (negative) measurement error sequences are mapped through the Park transformation into constants (sinusoids with frequency 2ω g ). Therefore, when looking at the Bode plots from Figures 5 and 6, we have to focus our attention to the frequency range [0, 2ω g ].
From Theorem 8 we know that there are four equilibrium points. We are interested in the two that have i e f > 0: Some routine computations show that the first equilibrium point is stable and the second one is unstable.
We mention that if we compute the active power P at the above two equilibrium points according to (19), we get that P = 9 kW at the stable equilibrium point (which is exactly P set ) while P = −93.64 kW at the unstable equilibrium point. This corresponds to what we expect based on Theorem 8. It can be verified that the two symmetric equilibrium points x e 1 andx e 2 (where i e f < 0) are unstable. It is not true that one of the two equilibrium points with i f > 0 (whose existence is guaranteed by Theorem 8) has to be stable. Indeed, if we modify this example by taking K = 100 A (instead of 5000 A), then both equilibrium points with i f > 0 are unstable. It is possible that, similarly to the main result of [21], under additional assumptions on the parameters, (18) has a stable equilibrium point that is almost globally asymptotically stable -this is an open question. Figure 5 shows the Bode amplitude plots of the small signal transfer functions from each measurement error to i d , at the stable equilibrium point. Figure 5(a) shows a large gain from η d to i d at the grid frequency (which corresponds to the frequency zero in dq coordinates). This gain is of the order of 3 dB, which means that a voltage measurement error of 4 V (entirely plausible, as it is about the resolution of the voltage sensor) would cause a current deviation of about 6 A, which is unacceptable. (This particular conclusion was already presented in Section I, based on an intuitive argument, while here we have deduced it from more precise computations.) An even larger peak of the gain from η d to i d occurs around the frequency 30 Hz in dq coordinates. The gain from η q to i d is almost as large as the gain from η d to i d , and again we see a peak around 30 Hz. Figure 6 shows the Bode amplitude plots of the transfer functions from the measurement errors to i q . The plots in Figure 6 are less critical than those in Figure 5. Note that in both Figures 5 and 6, the gains from the current measurement errors to the output currents are less disturbing than the gains from the voltage measurement errors to the output currents.

V. SENSITIVITIES OF THE SYNCHRONVERTER WITH IDEAL CURRENT SOURCES AT ITS OUTPUTS
In the previous section, we have shown that the output currents of a classical synchronverters are very sensitive to the grid voltage measurement errors. To overcome this problem, we propose to use controlled current sources at the output of the converter. We will modify the basic control algorithm accordingly. Similar modifications have been proposed, for instance, in [3], [10], [17], [19], [22], [26]. An interesting recent synchronverter design is in [7], which proposes to include an output admittance synthesizer in the control algorithm of the inverter, that enables to allocate desired output admittance values at multiples of the grid frequency, separately for the positive and negative sequence components, and without the need to measure the grid voltages. This technique allows to obtain very clean sinusoidal output currents (it is an interesting question whether this is desirable for the grid). Our design will behave like a SG, so that if the grid voltages are distorted or unbalanced, then the currents will also be distorted or unbalanced, since they are ''trying to counteract'' the distortions on the grid.
A simplified representation of the proposed modified AC output power circuit of the converter is as shown on Figure 7, that shows only one out of three identical phases. In this modified version of the synchronverter algorithm, we use the virtual currents i virt = [i virt,a i virt,b i virt,c ] as references for the current sources and also for computing the electric torque. The virtual impedance consists of an inductor L g ≈ nL s in series with a resistor R g ≈ nR s . Since L g and R g are much larger than L s and R s , the voltage measurement errors will influence the output currents much less, as we show below. We denote again by η = [η a η b η c ] the voltage measurements errors in the three phases. Then the virtual current in phase a satisfies the differential equation and we have similar equations for the other phases.
Applying the Park transformation and using (4), (3), we get The measured synchronverter output currents (in dq coordinates) are (i virt,d +ξ d ), (i virt,q +ξ q ), where the measurement errorsξ d ,ξ q are partly due to the original measurement errors ξ d , ξ q and partly due to the imperfection of the controlled current sources.
The electric torque computed using i virt is T e = −mi f i virt,q and the estimate Q est of the instantaneous output power is computed in the control algorithm by In the model of the new system, the currents i d , i q are replaced with i virt,d , i virt,q . Comparing the equations (29), (30) with their counterparts from (7), (8) (remembering that L g ≈ nL s = L, R g ≈ nR s = R) shows that what has changed is that the influence of η d , η q on the (virtual) currents has been decreased by a factor 1/(n − 1). The equilibrium points of the new system are the same as for the model (18). In the linearization of the new system, that looks similarly to (28), the matrices A lin and C lin remain the same, but in the matrix B lin the terms n − 1 have been replaced by 1. The other rows of B lin remain unchanged, so that we do not get an overall (n − 1) times reduction of the influence of η d , η q , but we still get a substantial improvement, as we shall see in the Bode plots corresponding to Example 1 from the previous section.   Figure 8(a) shows a decrease of approximately 20 dB for the gain from η d to i d at the grid frequency (which corresponds to the frequency zero in dq coordinates). This new gain is of the order of −17 dB, which means that a voltage measurement error of 4 V (the resolution of the voltage sensor) would cause a current deviation of about 0.56 A, which is acceptable. Figure 9 shows the Bode amplitude plots of the transfer functions from the measurement errors to i q for the original and the modified system. These plots also show a considerable improvement due to the use of the current sources.

VI. EXPERIMENTAL RESULTS
We have built a small 3 level inverter with nominal power 2.5kW designed for grid voltages up to 230V rms, see Figure  10. The output filter parameters are L s = 7.2 mH, R s = 0.2 , with filter capacitor C s = 2.2µF, with an ST microcontroller executing the algorithm every 100µsec. We have realized on this inverter both the ''old'' algorithm from [20] with J = 0.04kg · m 2 , D p = 0.06kg · m 2 /s, D q = 0, K = 2000 A and n = 20, as well as the algorithm with current sources described here, that we call the ''new'' algorithm for brevity. The details of the current source design are not essential for this paper and would take much space, so we give them separately in [14]. For the new algorithm we have chosen L g = nL s and R g = nR s , and the other parameters are the same as for the old algorithm, so that if there would be no measurement errors, then in both cases the grid connected  inverter would follow the model (18) with u = 0. This allows us to make a realistic comparison of the sensitivity of the currents to measurement errors using the two algorithms.
In both algorithms, there are various extra details that we do not describe here: start-up procedures, current limitations, torque limitations, various low-pass filters to reduce the noise, as well as large virtual capacitors in series with the output, to prevent DC currents. These extra details have very little influence when the inverter is working normally.
Because of the high sensitivity of the old algorithm to measurement errors, we have cautiously done all these comparison experiments at a low grid voltage of 70 V rms (using an autotransformer). Figure 11 shows the grid voltages measured at the inverter legs at idle. It is clear that these voltages are distorted, and moreover the three phases are not balanced, with phase a having 1.3% lower voltage than phase c and phase b having 2.7% lower voltage than phase c.        as measured by external Hall sensors not connected to the inverter. The currents are distorted because the grid voltage is distorted, as we have seen earlier. At a moment denoted t = 0, we artificially introduce a voltage measurement error of 4V lasting for 5 msec in phase a, via the inverter control software. With the old algorithm, this measurement error causes a considerable overshoot of the current in phase a, lasting for about one period. The same experiment conducted with the new algorithm shows no visible impact on the currents. Figures 13 and 14 show the influence of measurement error pulses on phase a (of the same amplitude and duration as before) on i d and i q . The pulses are repeated every second. The data shown has been extracted from the microcontroller.
We see that the impact of the pulses is significantly larger with the old algorithm than with the new one. Figure 15 shows the impact of these pulses on the active power. In the case of the old algorithm the calculated active power exhibits disturbances lasting for about 100 msec.
We have conducted experiments where at first we have let the inverter work at steady state, and then at t = 1 we have artificially introduced a calibration error of 5% on phase a, proportional to the measured signal. Figures 16 and 17 show the currents i d and i q , as extracted from the microcontroller. This calibration error introduces disturbances with an amplitude of about 380 mA in i d and i q with the old algorithm, while only about 120 mA with the new algorithm.

VII. CONCLUSION
We have presented the sensitivity analysis for a fifth order synchronverter model connected to an infinite bus, with respect to voltage and current measurement errors. We have shown that the sensitivity of the grid currents to voltage measurement errors is too large to be acceptable, leading to distorted grid currents (as observed in experiments). We have proposed a modification of the basic control algorithm by using current sources controlled by virtual currents generated in the algorithm, via virtual output impedances. Computing the sensitivities for an example, we have seen that this modification dramatically improves the synchronverter sensitivities. The design of these current sources, integrated with the synchronverter design, is a long story that will be discussed in the paper [14]. Our computations and simulation results are well supported by experimental results, where we have compared the sensitivity of the currents of an inverter running according to the algorithm from [20] against the new algorithm proposed here. To make the comparison fair, we have taken the virtual impedances in the new algorithm equal to n times the real filter impedance of the inverter, so that the mathematical models describing the two inverters are equal, except for the influence of the measurement errors.