A new impedance measurement method and its application to stability analysis of the inverter-grid system

Grid-connected inverter have been extensively used in the renewable energy grid-connect systems, such as solar and wind. Interaction between the grid and the inverter may gener-ate harmonic resonances that lead to reduced power quality and even instability. To analyse the stability of the inverter-grid system using impedance-based stability criterion, inverter impedance has to be known. Impedance measurement in the dq-domain requires the pre-cise synchronous phase angle to obtain accurate measurement. For impedance measurement in the stationary frame, inaccuracy usually results from not considering the effects of grid impedance and the frequency coupling. A new impedance measurement method in the stationary frame is proposed to obtain accurate measurement. The proposed method takes into account the grid impedance and its interaction with the inverter. Thus, it over-comes the limitations


INTRODUCTION
Grid-connected renewable sources such as solar and wind have been developed rapidly and more grid-connect inverters are used in the grid-connected systems [1,2]. Interaction between the grid and the inverter, however, may cause the stability issue and harmonic oscillations in practical applications [3]. To analyse the stability of the inverter-grid system using the impedancebased stability criterion [4], inverter impedance has to be known. Inverter impedance can be obtained by the analytical model approach [5][6][7] and the measurement methods [8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23]. Analytical models are based on detailed knowledge about the inverter. They have limitations in practical applications, because detailed information of the inverter parameter is difficult to obtain for commercial confidential concern [8]. Thus, the measurement approach is commonly used in that the device under test can be viewed as a black box and no prior knowledge of the internal structure and parameters is needed [9]. When measuring impedance or admittance, which is a smallsignal phenomenon, one must measure an input which can be a perturbation voltage or current. Then, an output (voltage or current) is also should be measured. The measured impedance or admittance is the ratio between the input and output signals [10]. Impedance measurement can be performed either in the dqframe [16,17,20,22,24,25] or in the stationary frame [18,19,[27][28][29][30]. Most three-phase inverter impedance measurements are expressed in the form of a 2 × 2 matrix impedance [16][17][18][19][20][21][22][23][24][25][26]. Matrix impedance measurement (MIM) is usually based on two perturbations, in which four equations are actually established to obtain four entries in the matrix impedance. The inverter impedance matrix can be obtained in the dq-frame based on transient response [24]. However, the produced multi-tone perturbations might be susceptible to noise. A perturbation method was proposed to add each signal with an optimal phase angle [25]. Additionally, MIM in the dq-frame converts the measured voltages or currents into the dq-frame, provided that the synchronization angle is known. The introduction of synchronous angle may cause the deviation of converted voltage and current in dq-frame away from the actual ones. As a result, error may occur between the measured impedance and the actual impedance [17]. On the other hand, MIM can be performed in the stationary frame [26]. The impact of non-zero phase angle in the fundamental voltage on impedance measurement in the stationary frame was examined [29]. And, a perturbation-based identification process was proposed to eliminate the influence so that more accurate measurement results can be obtained. Moreover, the selection of magnitude and type of perturbation was studied when measuring the impedance of wind turbines using a multi-megawatt grid simulator [30]. These methods above need to measure current and voltage at two different frequencies simultaneously. However, the commercial frequency response analyser (FRA) is not suited for the situation. Thus, the special equipment such as measurement and perturbation injection unit needs to be developed.
A few are described by the single-impedance measurement [27][28][29][30][31]. Single impedance measurement requires one perturbation at a single frequency and obtains the response at the same frequency. This measurement can be realized by FRA. Nevertheless, single impedance measurement does not consider the frequency coupling effect in the inverter-grid system [27]. The ignorance of frequency coupling effect may lead to inaccurate stability analysis results [18]. A refined impedance measurement method was proposed to incorporate the frequency coupling effect into the measurement [28]. But this refined measurement was implemented under the assumption that the grid impedance is zero. Although the simulation has demonstrated the improved accuracy, the performance of the refined method has not been experimentally verified [27]. A measurement method with FRA under non-zero grid impedance was proposed [31]. But the measured inverter impedance is based on known grid impedance. This circumstance that gird impedance is known may not be available in the actual application.
In practical applications, when an inverter is connected to the grid, the grid impedance always exists and its effect to the inverter should be considered. Further, the grid impedance is usually unknown to the inverter and to the operator. When analyzing the stability of inverter connecting to the grid, the inverter impedance needs to be accurately captured for correct stability analysis. However, such effective inverter impedance measurement is not yet available.
A new impedance measurement method for the gridconnected inverter with unknown grid impedance is proposed. The method conducts the measurement using FRA. Since the method is performed in the stationary frame, the synchronous angle concern occurred in the dq-frame measurement is avoided. The proposed method enables accurate measurement of the inverter impedance by incorporating the grid impedance and the frequency coupling effect into the measurement process. In particular, the grid impedance is not known in advance.
Main contributions of the proposed impedance measurement method include: 1. A measurement method to obtain the inverter impedance considering the frequency coupling effect and unknown grid impedance.   Section 2 overviews the drawbacks of the present impedance measurement methods in the dq-frame and in the stationary frame. Principle and implementation procedures of the proposed method are described in Section 3. Performance comparison of the mentioned methods is given in Section 4. Experimental verification on the effectiveness of the proposed measurement method is presented in Section 5 via a built-in 5-kW inverter-grid system platform and the off-the-shelf FRA.

PROBLEMS OF CURRENT MEASUREMENT METHODS
This briefly describes the present impedance measurement methods for the inverter-grid system and points out the limitation of each method.
The inverter-grid system is shown in Figure 1. In Figure 1, Z g is the grid impedance, v ga,b,c and i a,b,c are, respectively, three-phase grid voltage and current. V dc is the voltage of DC bus. The system can be represented using either the Norton or Thevenin equivalent circuit. The inverter is modelled by a Norton-equivalent circuit consisting of an ideal current source (I c ) in parallel with inverter output impedance (Z o ). The grid is modelled by Thevenin equivalent circuit consisting of an ideal voltage source (V g ) in series with a grid impedance (Z g ) [15,33]. In order to make stable system operation, the ratio of the grid impedance to the inverter output impedance, Z g ∕Z o , needs to satisfy the Nyquist criterion [15,33]. Thus, if the grid impedance and inverter impedance are known, then stability of the system can be evaluated.
For the system in Figure 2, the inverter impedance is the target of the measurement. Measurements are usually done by injecting the voltage or current perturbation at the point of common coupling (PCC) and measuring the voltage and current responses. When measuring the impedance, which is a small-signal phenomenon, one must measure an input (current or voltage) and an output (voltage or current). For a linear system (or a nonlinear system that is linearized around an operating point), the input and output signal components at the same frequency are related by a transfer function which defines the gain and phase shift at that frequency [10].

Impedance measurement in dq-frame
Inverter impedance or admittance in dq-frame can be expressed in the matrix form . (1) Y dq is used to describe the relationship between the small variations of dq-axis voltages and currents. It is expressed as a 2 × 2 matrix. ∆ denotes a small deviation of the respective variable from the equilibrium point. Figure 3 illustrates a simplified diagram of the impedance measurement setup. First, the perturbation is injected at PCC. Two linearly independent perturbations are applied so that four entries of Y dq can be obtained. Then, the measured voltage V abc and current I abc are transformed into dq-frame components. The following equation is established: The subscripts '1' and '2' denote the two linearly independent perturbations.
In the course of transforming the measured voltage and current from the abc frame into the dq-frame, the synchronization phase angle m must be estimated for the coordinate transformation. However, the estimated m usually is not equal to the actual m of the PCC voltage. This may lead to inaccurate voltage and current measurement in the dq-frame.
The relationship between the measured admittance Y dq and the actual admittance Y s dq can be expressed as [17] .
In (3), G PLL is the transfer function of the phase-locked loop (PLL) where k PLL_P denotes the proportional gain and k PLL_i the integral gain of the PLL controller. V d 0 and V q0 are the steadystate PCC voltages at the dq-axis. I d 0 and I q0 are the steady-state grid-connected current at the dq-axis. The introduction of synchronous phase angle results in the deviation of Y dq from Y s dq . It can be seen from (3) that the deviation is related to the dq-axis reference current, the grid voltage, and the PLL bandwidth.

Impedance measurement in the stationary frame
The impedance measurement in the stationary frame is commonly expressed in the matrix form [18,19] [ where bold face denotes the complex phasor. Note from (5) that admittances in the first column Y p and J p of the impedance matrix are functions of the frequency p , whereas that in the second column Y n and J n are functions of the coupled frequency 2 0 − p [32]. It can be seen from (5) that the frequency coupling phenomenon occurs in the stationary frame. Frequency coupling describes the situation that the voltage perturbation at frequency p produces the current response at two different frequencies. One is at the perturbation frequency p , another at the coupled frequency 2 0 − p where 0 is the grid line frequency.
When the frequency coupling effect in the inverter-grid system is not considered, the inverter impedance can be expressed as It can be seen from (6) with (5) that the single impedance measurement represents only one entry in the impedance matrix. Ignorance of other entries leads to inaccurate stability analysis of the inverter-grid system in some cases [20,32].
A refined impedance measurement method was proposed to overcome the drawback of the single impedance measurement [28]. Figure 4 shows the refined impedance measurement setup, where current source perturbation is connected in parallel at PCC. The refined measurement works as follows. First, a known impedance, expressed by admittance Y 1 , is connected in series with inverter. Then the current (or voltage) perturbation of frequency p is injected into the system. The following equation is [ The current (or voltage) perturbation at the coupling frequency 2 0 − p is injected into the system to obtain another equation Next, connect admittance Y 2 in series with the inverter. Similarly, inject the perturbations at frequency p and 2 0 − p into the system. The following equations are obtained: [ 0 Solving Equations (7)-(10) yields the four admittances in (5). Two concerns about the refined measurement method occur. One is that, although the simulation result has demonstrated the accuracy improvement, the refined method has not been experimentally verified. Another is that the above inverter impedance does not correctly represent the true inverter impedance because the grid impedance is not zero in actual inverter-grid applications. The obtained four admittances, Y p , J p , J n , and Y n do not accurately reflect the true values.
When Z g is considered, the correct expression of (7) should be expressed as (11) Similar adjustments apply to (8)-(10).

PROPOSED IMPEDANCE MEASUREMENT METHOD
This section describes in detail the proposed impedance measurement in the stationary frame. This method considers the

3.1
Proposed impedance measurement method Figure 5 shows the small signal representation of the invertergrid system. Z g is the non-zero grid impedance. Y eq is the output admittance of the inverter, which is to be measured. It can be expressed as [32] Y eq ( As shown in (12), Y eq can be obtained by the four admittance elements in the 2 × 2 impedance matrix of (5) and the grid impedance Z g .
The key element of the proposed measurement method is the inserted test impedance Z test . Two different Z test are considered, denoted by Z test,1 and Z test,2 . The voltage perturbation V s at frequency p is injected into PCC. Voltages V t and V pcc , and current I are measured using FRA.
When Z test is not inserted, the measured signals are denoted as V t,0 , V pcc,0 , and I 0 . Then, the obtained inverter impedance is represented by the admittance The grid impedance also can be measured by (14) without considering the background harmonics.
In fact, Y eq0 can be expressed as [32] Y eq0 ( In (15), Y eq0 is known from (13) and Z * g (2 0 − p ) can be derived from (14). Detailed derivation is given in the Appendix. Both are obtained directly from measured data. This leaves three unknown Y p , J n J p , and Y n to be determined. Thus, two more equations are needed.
To achieve this goal, a small impedance Z test is connected in series to the grid. Figure 5 shows the connection setup. First, connect Z test,1 and perform the measurement to obtain the measured signals, denoted as V t,1 , V pcc,1 , and I 1 . Then, Y eq1 can be obtained The grid impedance to be measured is Then, we have Next, another small Z test,2 is connected. The measured signals are denoted as V t,2 , V pcc,2 , and I 2 . Similarly, we have and It follows from (15), (18), and (21) that we can solve for Y p ( p ), J p ( p )J n (2 0 − p ), and Y n (2 0 − p ) from the measured data Y eq0 , Y eq1 , and Y eq2 , plus Z g , Z g + Z test,1 , and Z g + Z test,2 . At this moment, Y eq of (12) exactly represents the true inverter impedance that considers the grid impedance. Figure 6 shows the measurement setting of the inverter-grid system. FRA generates a small perturbation voltage V s,a to be injected into phase a via a power amplifier (PA) and isolation When Z test is not connected, FRA measured signals are denoted as I a,0 , I b,0 , V ab,0 , V bc,0 , and V t,ab0 . Decompose them in the positive and negative sequence components as

Implementation
When considering the positive sequence, I 0 = I p,0 , V pcc,0 = V pcc,p0 , and V t,0 = V t,p0 . It follows from (18) and (14) that Next, when Z test,1 is connected, the measured signals are expressed as I a,1 , I b,1 , V ab,1 , V bc,1 , and V t,ab1 . Similar to the expressions from (22) to (24), in the positive sequence, we have I 1 = I p,1 ,V pcc,1 = V pcc,p1 , and V t,1 = V t,p1 . Then, it follows from (16) and (17) that Similarly, we have

Concern of operating point under strong grid
Since Z test is connected at PCC, it causes a voltage drop. This alters the terminal voltage V g,pcc at PCC, which may make the inverter under test away from the desired operating point. The voltage at PCC becomes where V g and I g are the grid voltage and current, respectively. If the change in magnitude of V g,pcc is small, then the operating point can be considered unchanged during the impedance measurement when the grid impedance varies. For example, when |V g − V g,pcc |∕V g is less than 1%, V g,pcc only changes slightly and this could be guidelines for selecting the value of Z test . Consequently, Z test cannot be too large. Moreover, any difference between two test impedances Z test,1 and Z test,2 is allowed when the measurement is performed under ideal conditions. Measurement errors in the actual application exist and may cause the solved Y st to be inaccurate. To mitigate the effects caused by the measurement error, it is found that the greater the difference between Z test 1 and Z test 2 , the more accurate the solved Y st . The reason is that the established independent equations based on Z test to solve Y st become less sensitive to the FIGURE 8 Three-phase inverter-grid system measurement error as the difference between Z test 1 and Z test 2 increases. This finding is for the strong grid.
The other method that can avoid the change of operating point is the voltage compensation. The regulating transformer can compensate for the voltage drop due to Z test .

PERFORMANCE EVALUATION
This section validates the proposed method by simulation. Performance evaluation on the existing measurement methods discussed in Section 2, such as the measurement in dq-frame, the single and refined measurements in the stationary frame, are also presented. Figure 8 shows the three-phase inverter-grid system used in evaluation. This system was realized in Matlab/Simulink. Transfer functions G fv and G fi represent the combined effect of transducer delay, low-pass filter, and analog-to-digital conversion for the voltage and current measurement. L g is the grid inductance. R d and C f form the RC filter to filter out the switching frequency voltage ripples at PCC. The parameters of this system are listed in Table 1.

Performance of the proposed method
Suppose that the voltage perturbation V s,a was applied to phase a at PCC. The perturbation frequencies were set from 5 Hz to 595 Hz in an increment of 10 Hz. The test impedances are Z test 1 = 1.5 mH and Z test 2 = 3 mH. Since |V g − V g,pcc |∕V g is much smaller than 5%, the operating points at different test impedances are considered unchanged. It follows from (25) to (30) and the procedure outlined in the flow chart of Figure 7 that we obtain three measured inverter impedances, Y eq0 , Y eq1 , and Y eq2 as well as three impedances Z g , Z g + Z test,1 , and Z g + Z test,2 at frequency p . Substituting these six values into (15), (18), and (26) and solving the simultaneous equations, we obtain the admittance Y p , J n J p , and Y n . Then, Y eq for a grid impedance with L g = 3 mH can be obtained using (12).  Figure 9 illustrates the frequency response of Y eq using the measured Y p , J n J p , and Y n . The frequency response of Y eq using the analytical model described in [18,32] is also shown for accuracy evaluation. The expressions of Y p , J p , J n , and Y n in the analytical model are shown in the Appendix. It can be seen from Figure 9 that frequency responses of the impedance by the proposed measurements and that by the analytical model match very well.

Performance of current measurement methods
The impedance measurement in the dq-frame and refined measurement methods in the stationary frame discussed in Section 2 were also employed for impedance measurement of the system shown in Figure 6. Frequency response of the corresponding admittance Y eq was plotted for measurement accuracy comparison. The single impedance measurement in the stationary frame is not performed because the measurement does not capture the required information, such as the admittance J n , J p , and Y n . Impedance measurement in the dq-frame was conducted to obtain the impedance matrix Y dq , which was converted to Y st in the stationary frame by linear transformation [7]. The linear transformation is shown in the Appendix. In addition, the entries in Y st correspond to the admittance Y p , J n , J p , and Y n . Then, Y eq can be obtained by using (12). Figure 10 shows the frequency response of Y eq measured in the dq-frame and that of the analytical model. It is observed from Figure 10 that the frequency response of Y eq from measurements in the dq-frame does not match well with that of the analytical model in many frequency bands. The reason may be due to inaccurate estimation of the synchronization phase angle [17].
The refined measurement method in the stationary frame does not consider the grid impedance, although the frequency coupling effect is considered. Establishing and solving Equations (7) to (10) with the measured data yield the admittances in Y st . Then, the inverter admittance Y eq is obtained using (12). Figure 11 displays the frequency response of Y eq obtained by the refined measurement and that of the analytical model. It can be seen from Figures 10 and 11 that the refined measurement exhibits better result than the single measurement method. However, the results in the frequency range from 200 Hz to 300 Hz still do not match well with the analytical results. This phenomenon may be due to the fact that the grid impedance is not considered in the refined measurement method.
In summary, it can be seen from Figures 9-11 that the propose method enables accurate impedance measurement, whereas the existing measurement methods may exhibit errors in some frequency intervals. Inaccurate measurement of inverter output impedance may produce misleading stability analysis results in some cases [18,28].

EXPERIMENTAL VALIDATION
An inverter-grid system including the perturbation source was constructed to experimentally verify the effectiveness of the proposed measurement method. Figure 12 depicts the test setup. Parameters of the inverter-grid system and the impedance Z test used in the experiment are the same as that in the Frequency responses of Y eq by the proposed measurement and the analytical model Different grid impedances are used to demonstrate the accuracy of the proposed method. Figure 13 shows the Bode plots of the inverter impedance from the experimental measurement by the proposed method and that by the analytical model. Figure 13(a) shows the measured inverter impedance Y eq,3m when the grid impedance is with L g1 = 3 mH, and Figure 13(b) the measured Y eq,5.1m when the grid impedance is with L g2 = 5.1 mH. It can be seen from Figure 13 that results obtained by the proposed method match well with that by the analytical model. To further verify the accuracy of measurement, we analyse the stability of the inverter-grid system using the measurement results. Figure 14 shows the frequency responses of the inverter impedance obtained from the experimental measurement. The grid impedances corresponding to L g1 = 3 mH and L g2 = 5.1 mH are also shown.
From Figure 14, that grid impedance with L g1 and 1∕Y eq,3 intersect at 193 Hz, at which the phase difference is 161 • . This implies a stable response of the inverter-grid system. On the other hand, the magnitude response of 1∕Y eq,5.1 intersects with that of L g2 at about 164 Hz and the phase difference is 191 • . This implies that the system is unstable in response with the resonant or unexpected harmonic component near 164 Hz. Figure 15 shows the experimental PCC voltage and currents. Two cases corresponding to the two different sets of grid inductance are compared. A stable response is observed in Figure 15(a) when the grid impedance is L g1 = 3 mH, which agrees with the analysis shown in Figure 14. Figure 15(b) depicts the experimental waveforms for grid impedance with L g2 = 5.1 mH. It can be seen from Figure 15(b) that the system experiences harmonic instability [33]. This is consistent with that predicted from Figure 14.
Spectral analysis of the current in Figure 15(b) is shown in Figure 16. It is observed from Figure 16 FIGURE 14 Frequency responses of grid impedance and inverter impedance. Z g1 denotes the grid impedance with L g1 = 3 mH and Z g2 is that with L g2 = 5.1 mH

CONCLUSION
This paper had presented a stationary frame-based impedance measurement method in the inverter-grid system. The proposed method enabled accurate measurement by incorporating the grid impedance and frequency coupling effect into the measurement method, which have not been developed before. Easily implemented scheme was developed to simulate different values of grid impedance to obtain the output impedance of the inverter. Limitations of the existing measurement methods were also analysed. Compared with the existing methods, there were two advantages for the proposed measurement method. One was that the method could be applied in practical application where grid impedance was unknown. Another was accurate measurement results were obtained with using the commercial FRA. Simulation and experimental results had demonstrated that the proposed impedance measurement method produces correct stability analysis results. The proposed method is conducted under the condition of strong grid. If the system is under weak grid, the method may not be applicable because the added Z test may cause unstable operation. Future work will investigate how to measure the impedance of the inverter under a weak grid.

APPENDICES
The expressions of Y p , J n , J p , and Y n in the analytical model are [18,32] Below we show how to obtain Z * g (2 0 − p ) from (14).
In the study, the perturbation frequency generated by FRA is set as the arithmetic progression. Suppose that the initial frequency is p,1 and the tolerance is d . We have the following equation is a positive integer. The impedance at 2 0 − p can be obtained from (14) by the process shown in (A.8) and (A.9).
The following is that the impedance matrix Y dq in the dqdomain was converted to Y st in the stationary frame by linear transformation. The linear transformation can be expressed as . (A.10)