ENS implementation

34 downloads 0 Views 5MB Size Report
Feb 13, 2004 - to be implemented but patent protected, repetitively connects a ...... networks", Deutsches Patentamt, Patentschrift DE19504271 C1/1996.
ENS implementation Part of the PSO Eltra contract 4524/2003

13.02.2004 Remus Teodorescu, Lucian Asiminoaie, Adrian Timbus Aalborg University Institute of Energy Technology Department of Electrical Energy Conversion Pontoppidanstraede 101, DK9220 Aalborg East

2

Content

1. Introduction……………………………………………………………………………4 2. ENS implementation…………………………………………………………………..6 3. Conclusion……………………………………………………………………………26 4. Appendix…………………………………………………………………………….101 a. ENS design (july-august, 2003)……………………………………………..103 b. Published paper (APEC’04, PESC’04)…………………………………

109

3

4

Chapter 1

Introduction

This report is part of the research contract PSO-Eltra 2524/2003 where Aalborg University did cooperated with PowerLynx A/S for the development of the ENS function for the PowerLynx PV inverters. The work started 01.01.03 and ended 29.02.04 and involved Frede Blaabjerg, Remus Teodorescu, Lucian Asiminoaie and Adrian Timbus from Aalborg University and Uffe Borup from PowerLynx A/S. The objective was to make the PowerLynx PV inverters compatible with the german ENS standard which mainly consist in the requirement to disconnect from the grid in max. 2 seconds if the grid impedance is changed with 0.5 ohms resistive. During 01.07 – 31.08 2003, an algorithm based on the injection of a voltage of 75 Hz and the on-line measurement the 75Hz component from the grid current and voltage using simplified DFT was developed by Uffe Borup, Remus Teodorescu and Lucian Asiminoaie. The algorithm is described in detail in the report “ENS design” enclosed in Appendix A and in the two published paper (final paper for APEC’04 and approved digest for PESC’04) Then the algorithm was finally implemented and the experimental tests carried out proved to be satisfactory as shown in chapter 2 “ENS implementation”. Very few missed tests were recorded on very high inductive grid (0.6 + 1.1i) when the reactance is higher than the resistance. In the period 03.02.04 – 13.02.04 some attempts was done in order to improve the detection by compensating the delay in the voltage measurement but no improvement was noticed. Thus, these last minute changes was not included in the final version of the software. Finally, the detection mechanism of another PV running in parallel that injects t5Hz for ENS grid measurements has been done. The code for parallel ENS is also enclosed.

5

6

Chapter 2

ENS implementation

2.1 ENS function This chapter reveals the results obtained in laboratory after the implementation of the impedance calculation algorithm and software for ENS test. The main purpose of the laboratory tests is to show that the inverter, and hence the software developed, is complying with the ENS test.

2.1.1 The ENS test The ENS test is defined as follow: the test setup simulates a situation; where the local load conditions make the building of an islanding situation possible. The ENS must also, with this local load condition, be able to identify an impedance change and stop the inverter within 5 sec. The test setup has the following characteristics: •

the dc side is supplied by a controllable source.



on the ac side, inductors, resistors and capacitors are connected in parallel to the inverter. These loads can be adjusted accurately enough to ensure that the power flow to the grid is below 5% of the inverter rating.



a resistor of 0.5 ohm is connected in parallel to the islanding switch.



network impedance should be below 0.5 ohm.



functionality should be confirmed up to a network impedance of 2.5 ohm pure resistive and a network impedance of 1.66 ohm resistive combined with 1.1 ohm inductive (3.5mH).



in the whole range, a sudden increase of 0.5 ohm must stop the inverter.

The test runs as follows: •

the DC input is adjusted so that the PV output is equal to 100% load.



the resistors, inductors and capacitors are adjusted so that the current flowing to the grid is below 5%. (There is no requirement to the Q factor). 7



on this condition the network impedance is increased by 0.5 ohm and the time to disconnect is measured.



about 30 seconds after the system connects, the impedance is diminished for 5 seconds and increased again. The system must trip within the next 5 seconds.



this test is conducted at different impedances.

2.1.2 Laboratory setup To be able to fulfill the above conditions required by the ENS test, the following setup has been built in laboratory.

A local load composed by the resistance Rloc and inductance Lloc is connected in parallel with the PV inverter. This load is accurately adjusted so that the active and reactive power is compensated and ensures a small current flowing to the grid while the inverter runs at nominal power. To reach a network of 1.66 ohm impedance, a variable resistance is connected in series with the grid. This impedance is combined with 1.1 ohm inductive (3.5 mH). Furthermore, to be able to cause a change in grid impedance, 0.5 ohm resistance is also connected in series with the grid, with the possibility of short-circuit. Because the test is to be conducted at different network inductances, there is also a possibility to connect the California Instruments Power Supply instead of the regular grid, providing lower network impedance. Once the setup satisfies the hardware demands imposed by ENS test, the focus is set on the calculation algorithm and software implementation, making the inverter to comply with all above trip conditions.

8

2.1.3 Impedance calculation algorithm The calculation algorithm of grid impedance is presented in one of the previous chapters of this documentation. Anyway, this algorithm suffers few modifications in order to be able to make the inverter comply with the standards. The main change in the algorithm regards the method of calculation and this has been changed from the impedance calculation Zgrid to resistance calculation Rgrid. This modification was easily made considering only the real part of the impedance calculation Zgrid as shown below. Conform to the first algorithm, the calculation of grid impedance is performed as described by Eq. 1.1. Z=

Ur 2 + Ui2 I r 2 + Ii 2

(1.1) This has been further developed considering only its real part: R = Re(Z). The above equation thus becomes:

R=

U i Ii + U r I r I r 2 + Ii 2

(1.2)

This expression is calculated with the following line of C code in acpow_task.c file: /* Resistance calculation*/ EnsParameters.SumImpedance += (UNSIGNED16)( ( (UNSIGNED32)719 (EnsParameters.EnsVMod >> 8) ) / ( EnsParameters.EnsIMod >> 8 ) );

*

where the numerator and denominator are calculated in the acadc.c file like: EnsIMod = (UNSIGNED32)( EnsIreal * EnsIreal + EnsIimag * EnsIimag ); EnsVMod = (UNSIGNED32)( EnsVreal * EnsIreal + EnsIimag * EnsVimag );

Inverter’s behavior with both above algorithms (resistive and inductive) has been pursued during the tests and results are presented in the figures below.

(a) (b) Fig. 1.1. Detection of 0.5 Ohm change in the grid impedance. (a) using Z algorithm and (b) using R algorithm. 9

Measuring the average jump on both above figures, it can be observed that the algorithm using only the resistive part is more sensitive to 0.5ohm resistive change in grid impedance. An average jump of 0.33 ohm is obtained using the resistive algorithm, while using the Z algorithm only 0.23 ohms is measured. Based on the above results, the software is further developed on the basis of resistance calculation instead of impedance calculation. Anyway, further on this text, this is referred as impedance calculation instead of resistance calculation.

2.1.4 ENS injection frequency As stated in one of the previous chapters, the online calculation of grid impedance is made injecting a voltage (current) of a certain frequency into the grid and to measure the response to it. For this application, the 75Hz voltage is injected into the grid and this was chosen based on few criterions:



the 75Hz frequency is close enough to the fundamental grid frequency of 50 Hz, so that the impedance calculation at both frequencies are almost equal.



the 75Hz frequency is not present into the grid background as a harmonic, making thus the calculation more precisely.

Anyway, this voltage injection into the grid is regarded as disturbance both for the grid’s THD and inverter’s current controller respectively, thus the injection frequency is to be considered. On the one hand, for low THD rare injection is preferred, but on the other hand this gives poor information in time for the inverter about the grid impedance. Conform to ENS test, the inverter should detect the change of grid impedance with 0.5 ohm and stop within 5 seconds. Therefore, in the 5 seconds time interval, the inverter needs sufficient information about the value of grid impedance, so that it can stop if this is varying with 0.5 ohms. The value of 1injection/1second has been chosen as a compromise for this matter. The C code for the injection frequency resides in the acadc.c file and is given below: /* ENS */ EnsPeriodCount++; if ( ( EnsPeriodCount >= 50 ) && ( PaconAccessTestDelayENS() ) ) { /* 4 injections per second */ EnsPeriodCount = 0;

10

EnsEnable = TRUE; EnsThetaInj = 0; }

The figure below depicts the injection time of the inverter.

Fig 1.2. ENS injection frequency = 1 second

2.1.5 UgENS amplitude Another issue, to be considered during the injection, is the amplitude of the injected voltage. This has to be large enough to be distinguished from the background harmonics but small enough to not deteriorate the THD of the grid. Some tests were carried out in laboratory to investigate and find the suitable value of the voltage amplitude. The figures below show the obtained results for different values of UgENS varying between 20 and 60.

11

Fig. 1.3 Amplitude value of UgENS = 20. Ki = 1000, K75 = 300 if !ENS, K357=300. Averaging = 1sec, Sampling = 1sec. Zref=1880mΩ (real grid + 3.5mH). The Average Error = 700mΩ before applying the step and 300mΩ after.

Fig. 1.4 Amplitude value of UgENS = 40, Ki = 1000, K75 = 300 if !ENS, K357=300. Averaging = 1sec, Sampling = 1sec. Zref=1880mΩ (real grid + 3.5mH). The Average Error = 600mΩ before applying the step and 450mΩ after.

12

Fig. 1.5 Amplitude value of UgENS = 60. Ki = 1000, K75 = 300 if !ENS, K357=300. Averaging = 1sec, Sampling = 1sec. Zref=1880mΩ (real grid + 3.5mH). The Average Error = 500mΩ before applying the step and 720mΩ after. Based on the tests conducted in laboratory, the following conclusion can be draw:



the value of 50 and larger of UgENS results in overflow of the calculated impedance value.



The value of 45 for UgENS makes the inverter less sensitive to the change with 0.5 ohm in the grid impedance.



The value of 35 and less for UgENS make the inverter more sensitive to the change with 0.5 ohm in the grid impedance, but in the inverter is more exposed to parasitic trips.



The value of 40 for UgENS gives the best results. The inverter didn’t miss a trip during 35 tests and no parasitic trips occur with this setting.

Considering the accuracy of calculation of grid impedance, the sensibility to the changes in grid impedance and the influence on the grid’s THD, the value UgENS=40 has been finally chosen. This can be find in the acadc.c file and is described by the following lines of code: if ( EnsThetaInj & 0x80000000 ) { UgENS = 0 - (SIGNED16)( ( (SIGNED32)40 * LookUp1 ) >> 16 ); } else { UgENS = (SIGNED16)( ( (SIGNED32)40 * LookUp1 ) >> 16 ); }

13

2.1.6 Current Controller The current controller implemented for this application is detailed described in one of the previous chapters of this documentation. Anyway, in this section, few changes applied to this controller are described. First of all, the integral gain of the 50Hz controller has been changed from 1000 to 350. The change only applies during the ENS injection, the gain remaining 1000 otherwise. This decrease is made to avoid the interference of the 50Hz controller with the 75Hz controller. Anyway, there is a small drawback doing this, the controller is more sensitive to the changes in the grid voltage during the ENS injection, and thus a large change in the grid voltage can cause parasitic trip of the inverter. The code below shows the change of integral gain of 50Hz controller in respect to ENS value: if ( EnsEnable ) { Int1Inp = (SIGNED32)IOutError1 * (SIGNED32)350; /* prepared for division with 8192 instead of 8500*/ } else

{ Int1Inp = (SIGNED32)IOutError1 * (SIGNED32)1000; /* prepared for division with 8192 instead of 8500*/ }

2.1.7 Signal processing As depicted in Fig. 1.b, the impedance calculation signal quite oscillates along the time, thus the necessity for signal processing occurs in order to make possible the detection of change in grid impedance. After few tries with filters and other stuff, the final algorithm for detection of the 0.5 ohm change in the grid is as shown in the figure below.

Fig. 1.6. Algorithm of processing the calculated impedance signal

14

The calculated impedance signal suffers digital processing before going into the comparator with the instantaneous value. This processing consists in a median over 3 samples, followed by an average over 2 samples and all this is delayed with 4 samples. The difference between the instantaneous value and the processed signal is compared with the trip level. If the difference is larger than the value set for trip level, a trip of the inverter occurs. The algorithm of processing the calculated impedance signal is sustained by the following code: void PaconAccessSetENSParameters( UNSIGNED16 impedance ) { UNSIGNED8 i; UNSIGNED16 temp0; UNSIGNED16 temp1; UNSIGNED16 temp2; UNSIGNED16 temp; median2 = median1; median1 = median;

/* store previous median */ /* store previous median */

/* Delay avg 4 samples */ AvgDelayImp[4] = AvgDelayImp[3]; AvgDelayImp[3] = AvgDelayImp[2]; AvgDelayImp[2] = AvgDelayImp[1]; AvgDelayImp[1] = AvgDelayImp[0]; /* Begin Median buffer over 5 samples, running*/ GridImpedanceMedianBuffer[4] GridImpedanceMedianBuffer[3] GridImpedanceMedianBuffer[2] GridImpedanceMedianBuffer[1] GridImpedanceMedianBuffer[0]

= = = = =

GridImpedanceMedianBuffer[3]; GridImpedanceMedianBuffer[2]; GridImpedanceMedianBuffer[1]; GridImpedanceMedianBuffer[0]; impedance;

temp0 = GridImpedanceMedianBuffer[0]; temp1 = GridImpedanceMedianBuffer[1]; temp2 = GridImpedanceMedianBuffer[2]; /* Begin Median buffer over 3 samples, running*/ for ( i = 0; i < 2; i++ ) { if ( temp2 < temp1 ) { temp = temp2; temp2 = temp1; temp1 = temp; } if ( temp1 < temp0 ) { temp = temp1; temp1 = temp0; temp0 = temp; } } median = temp1; /* End Median buffer over 3 samples, running*/

15

/* Store in samples */

AvgDelayImp[0]

average

of

median

over

current

and

previous

AvgDelayImp[0] = ( median + median1) >> 1; if ( ( *PBDATDIR & 0x0030 ) == 0x0030 ) /* if grid relay is ON */ { /* Change in grid impedance between med(5) and med(5)+ avg(2)+ delay with 4 */ ChangeInGridImpedance = abs( GridImpedanceMedianBuffer[0]) - (SIGNED16)( AvgDelayImp[4] ) );

(SIGNED16)(

if ( (SIGNED16)( median ) < (SIGNED16)( AvgDelayImp[4])) { ChangeInGridImpedance = 0; }

2.1.8 Trip level The trip level is one of the important settings to be made. This level should carefully chosen so that the difference becomes larger than it when the 0.5 ohm change in grid occurs and smaller otherwise. Based on the tests conducted in laboratory, considering the worst-case situation (1.66 ohm resistive combined with 1.1 ohm inductive and both active and reactive power compensated by the local load), a value of 0.18 ohm is chosen for the trip level. The setting for trip level resides in papar.c file and is given by the following function: UNSIGNED16 PAR_GetDeltaGridImpedance( void ) { /* 300 mOhm */ return ( 180 ); }

2.1.9 Trip parameters If the calculated impedance signal shown in Fig. 1.b is carefully studied, the value of 0.18 ohm for trip level seems to be to small and the possibility of parasitic trip occurs. To minimize this occurrence, one more setting is made for the trip level: the inverter should trip only if two successive values of the difference signal are larger than the trip value. if ( PaconAccessNewGridImpedanceSampled() ) // { /* 100 ms expired */

16

if ( CountEns100ms > 20 )

CountEns100ms = 0; if(PaconAccessGetChangeInGridImpedance()> PAR_GetDeltaGridImpedance()) { ChangeImpCnt++; } else { ChangeImpCnt = 0; } if ( ( ChangeImpCnt >= 2 ) && ( !EnsError ) ) { /* Trip */ EnsError = TRUE; /* Notify power conrol */ Data[5] = PCE_GRID_PARAMETERS_OUT_OF_SPEC; OS_SendMessage( POWER_CONTROL_TASK, PC_EVENT_GRID, Data ); /* Log error */ ReportToLog( ERROR, ENS, PaconAccessGetGridImpedance() ); PaconAccessResetCnt(); } }

2.1.10

ENS startup delay

To avoid parasitic trips during the start-up of the inverter, when the calculated impedance value is not very accurate, and thus large difference between the instantaneous value and the processed one can occur, the comparison with the trip level starts after 20 seconds the inverter started. Another setting during the startup is made regarding the ENS injection; this would start after 1.5 seconds the inverter starts.

2.1.11

Results of the tests after final software implementation

Once the software reached its final version, the inverter is tested for a long time in different circumstances in laboratory. The occurrence of the parasitic trip over a range of impedance from 0.4 up to 2.2 ohm is pursued. Furthermore, the time of disconnect and the consistency of trip when this is provoked is also pursued over the same range of grid impedance. The inverter is tested with the following settings:



Trip level = 0.18 ohm



The compared value with this level is the one described in the signal processing section.



The inverter compares the above values after 20 seconds it stars and the ENS injection starts after 1.5 second.



The inverter should trip only if two successive values exceed the trip level. 17



The gains for current controller are as follows o Ki gain of the 50Hz controller is set to 350 if ENS ENABLE and 1000 otherwise. o The harmonics compensator is enabled and all gains for 3rd, 5th, and 7th controllers are set to 300 always. o The 75Hz controller is disabled, but is to be enable when two or more inverters are connected in parallel.

Test: Consistency of provoked trip in case of 2.2 ohm (1.66 ohm resistive combined with 1.1 ohm inductive) grid impedance The test is conducted following the ENS standard specifications. The 0.5 ohm resistance (which represents the change in grid impedance) is connected into the circuit when the inverter starts. This is suddenly removed for 5 seconds and reconnected again after this time. The inverter should not trip when the 0.5 ohm resistance is removed from circuit but after the reconnection, the inverter should detect the change in grid impedance and trip within 5 seconds. Considering the above conditions, 70 tests were executed in laboratory and inverter always trip within 5 seconds after the reconnection of 0.5 ohm resistance. The most dominating time of disconnection is 3-4 seconds.

2.2 Tests conducted at PowerLynx 2.2.1 Test Results: Step of grid impedance The test setup is as shown in the figure in Laboratory setup section. The reactive current is compensated by a mH parallel inductor. 2.2.2 Impedance step: resistive grid Functionality of trip at grid impedance step of 0.5 Ohm is tested four times at each impedance. First the positive step test is conducted; the impedance is step up with 0,5 Ohm. 30 sec after renewed connection, the second test is conducted, by step down by 0,5 Ohm followed by a step up of 0,5 Ohm

18

Test

Grid Impedance Ohm

Inverter Power

Grid Power

Trip Time

Trip peak Value

Passed Test

0.4 Ohm

Grid Voltage before start 211 V

Positive step of 0.5 ohm Neg. / Pos. step of 0.5 ohm Positive step of 0.5 ohm Neg. / Pos. step of 0.5 ohm Positive step of 0.5 ohm Neg. / Pos. step of 0.5 ohm Positive step of 0.5 ohm Neg. / Pos. step of 0.5 ohm

3.0 kW

35 VA

2-3 s

OK

0.4 Ohm

211 V

3.0 kW

15 VA

2-3 s

1.1 Ohm

212 V

3.0 kW

120 VA

2-3 s

1.1 Ohm

212 V

3.0 kW

40 VA

2-3 s

1.8 Ohm

198 V

3.0 kW

50 VA

2-3 s

331 – 446 mOhm 277 – 380 mOhm 332 – 420 mOhm 327 – 410 mOhm 342 – 366 mOhm

1.8 Ohm

URegRES75Max ) { URegRES75 = (SIGNED32)URegRES75Max ((SIGNED32)Int1Inp75 - (SIGNED32)Int2Out75) >> 13; } else if ( URegRES75 < 0 - URegRES75Max ) { URegRES75 = 0 (SIGNED32)URegRES75Max ((SIGNED32)Int1Inp75 - (SIGNED32)Int2Out75) >> 13; } else { URegRES75 += ((SIGNED32)Int1Inp75 (SIGNED32)Int2Out75) >> 13; } uRegTemp=((SIGNED32)URegRES75 * 8167) >> 13; Int2Out75 += ((SIGNED32)uRegTemp *(SIGNED32)12918)>> 9; /* integration of UregRES75 */ URegRES75rms += (UNSIGNED32)((URegRES75

*

URegRES75)

+

+

-

>>

14); URegRES75rmsDisp = (UNSIGNED16)(URegRES75rms); } else { URegRES75 = 0; Int2Out75 = 0;

23

}

URegRES75rms = 0;

For this kind of tests the following setup has been used. Few tests on both resistive and inductive grid have been conducted where PV1 is the device under test while PV2 is the disturbance factor.

Test 1. Test on inductive grid. PV1 is not injecting in the same time with PV2. During this test it has been observed that every time PV2 starts there is a drop in calculated inductance value of PV1, the drop being around 0.2 – 0.3 ohm, thus a suddenly stop of PV2 will cause a trip of PV1. Test 2. Test on resistive grid. PV1 is not injecting in the same time with PV2 On the resistive grid the drop in calculated impedance value of PV1 is not so large, a value of 50 – 100 mOhm was noticed. This makes the PV1 to not be influenced by the operation of PV2 even this is started and stopped few times. Test 3. Test on resistive grid. PV1 is injecting in the same time with PV2 In case when both PV1 and PV2 inject in the same time, the calculated value for grid impedance of PV1 drops to half of its real value. This thing makes the PV1 to trip if PV2 is stopped.

24

Conclusion In some situations, like highly inductive grid or simultaneous injections, the second inverter running influences PV1 so that the precision of grid impedance calculation is affected. As consequence, every time the second inverter stops, PV1 trips. Thus, the situation of simultaneously injection should by avoid. 2.4.1 Tests with two inverters running in parallel – UregRES75 used to detect the second inverter ENS injection For these tests, the setup as for above tests has been used. Following these tests, the value of

UregRES75 was monitored. This value can be used to detect if another PV inverter is injecting 75Hz voltage into the grid and thus to condition whenever the inverters should inject. Before to be used as injection condition, the value of UregRES75 suffers some signal processing. Initial, this value is a sinusoidal waveform with the frequency of 75Hz and amplitude no larger than 1040 (40V – see above section). This is used to calculate an integrated value over the time period between two injections as is shown in the code below: /* integration of UregRES75 */ URegRES75rms += (UNSIGNED32)((URegRES75 * URegRES75) >> 14); URegRES75rmsDisp = (UNSIGNED16)(URegRES75rms);

The integration of URegRES75rms stars after the ENS injection stops and the value is reset every time an injection starts. The value of

URegRES75rms

is shifted >>14 so that it shows 0 on the

display when only one inverter is not injecting and a value above zero within 30 – 70 for resistive grid and > 100 for highly inductive grid when the second inverter starts injecting. Thus a clear detection of the ENS injection for the second or other PV inverters Conclusion Taking advantage of signal processing, it is possible to use the value of URegRES75rms to detect whenever another inverter is injecting ENS voltage into the grid. Therefore, this is considered the starting point in the attempt to synchronize and organize the injections when more inverters run in parallel.

25

26

Chapter 3

Conclusion

This chapter presents the conclusion draw after the implementation of final version of the ENS software and some tests conducted in laboratory to see if this software complies with the demands of the ENS standard.

First of all, the conclusion draw here only refers to the ENS function implemented in software. One of the main changes related to this function is the impedance calculation algorithm, which has been changed from calculation of Z to calculation of R instead. This change was mainly made due to an increased sensitivity to 0.5 ohms resistive change on a highly inductive grid impedance (1.6+1.1i).

As mentioned in this documentation, the calculation of grid impedance is made based on voltage injection in the grid. This voltage has a frequency of 75Hz and few tests, where its amplitude and injection frequency have been changed, were conducted in laboratory. Based on the results obtained, the value of 40 (in samples, 450V=1024 samples) for the voltage amplitude and a frequency of 1 second_1 for the injection was chosen.

The calculated impedance value over time has been plotted and as result quite large oscillations were observed. This leads to a signal processing algorithm in order to obtain a more steady value. The algorithm is described in one of the sections of this documentation and as consequence of this algorithm a trip level of 180 mohm was chosen.

Based on this signal processing algorithm and the chosen trip level, tests at different grid impedances were performed in laboratory. The results of these tests are also presented in this documentation. 27

There were few attempts to improve the ENS function, attempts based on the compensation for system delay. Two tries were made, one based on the voltage measurement delay and one based on the zero crossing delay but both of them prove to be useless in this case. As consequence, the ENS function use the same signal processing algorithm and the same trip level as stated above.

The value for trip level seems to be quite low and thus the inverter can be exposed to parasitic trips. To avoid this phenomenon, the condition of two successive values above the trip level was set to enable the trip.

The behavior of two inverters running in parallel was studied. There were some tests conducted in laboratory to pursue the influence of the second inverter over the first one. One of the main conclusion draw from here is that the situation when both inverters inject in the same time should be avoided. Therefore, the necessity of organize the injections occurs. For this purpose, a 75Hz resonant controller has been implemented, and the regulated voltage

UregRes75 is used to check whenever another inverter is injecting into the grid. Based on this voltage, an algorithm to organize the inverters’ injections when more than one are running in parallel is to be developed in the future work.

28

Appendix A1. ENS design A2. Published papers

29

30

A1. ENS Design

3.1 State of the Art 3.1.1 Introduction In the last ten years the PV development has increased the number of connected systems to the grid. Besides all electrical regulations such systems must also meet certain countryspecific technical recommendations (Germany), especially when connecting in dispersed power generating networks. The European regulation EN503301-1 [13] sets the utility fail-safe protective interface for the PV-line commutated converters. The goal of the regulation is to isolate the supply within 5 seconds due to impedance changes of Z = 0.5Ω. The main impedance step changes are detected by means of tracking and step change evaluation of the dynamic main impedance. Unfortunately, even grid impedance measuring is well treated in the literature [1]-[13], not always the methods can easily be embedded into a non-dedicated platform, i.e. PV inverters. Thus, specific limitations like real-time computation, medium A/D conversion accuracy, fix point numerical limitation, etc., prove that some techniques are not suitable in fast and reliable measurement requirements [8]. Therefore, the goal is to develop of a fast and simple method for line impedance estimation to comply with standards limitations when using it into a DSP controller, which is attractive seen from a cost issue. This project focuses on a method of on-line grid impedance measurement. The project analyses a method where the grid impedance can be estimated using the existing PV sensors and logical control. This approach provides a fast and low cost solution to meet the required standards. By implementing the presented methods it is possible to estimate, at any instant, the power supply grid impedance. State of the art concerning impedance measurement technique will also be described providing the background of chosen methods.

31

3.1.2 Study of literature Different techniques can be used for line impedance measurements. It is noticeable that, usually these techniques build and use special hardware devices to obtain the respective measurements. Once the inputs are acquired by voltage and current measurement, the processing part follows, usually involving large mathematical calculations in order to obtain the impedance value.

Fig. 4.1.1 shows the usual technique for impedance measuring. The dedicated measuring device is denoted by "Z"-block and is usually a separated part of the inverter. Rg and Lg are resistive and inductive part of the grid, while Vs represents the ideal source supply. The capacitive part of the model, usually coming from consumer side, is denoted by Cg. The "h" argument of the components shows the frequency dependency of the model.

Filter

Ii(h)

Cg (h)

Rg(h) XLg (h) Vs (h)

Z

Inverter

Grid

Fig. 4.1.1. PV-inverter to grid connection with impedance measuring.

The state of the art divides the measuring solutions into two major categories: - passive methods - active methods Passive method uses the non-characteristic signals (line voltages and currents), which are already present in the system. Since this method will depend on the existing background distortion of the voltage this will not be the case for implementing it into a PV inverter. Active methods make use of deliberately "disturbing" the power supply network followed by acquisition and signal processing. The way of "disturbing" the network can vary; therefore active methods are also divided into two major categories: 32

- transient methods - steady-state methods.

3.1.2.1

Transient active methods

It is worth to mention that the transient methods are well suited for obtaining fast results, due to the limited time of the disturbing effect on the network. Shortly, by this technique "Z" device generates a transient current into the network (e.g. a resistive short-circuit), and then measures the grid voltage and current at two different time instants, before and after the impulse occurrence. The impulse will bring in a large harmonic spectrum that afterwards should be analyzed. The results obtained show network response over a large frequency domain, making this method well suited in applications where the impedance must be known at different frequencies. However, this method must involve high performance in A/D acquisition devices and also must use special numerical techniques to eliminate noise and random errors [3]. These requirements are difficult to be achieved on a non-dedicated harmonic analyzer platform like a PV inverter even a DSP control is used.

3.1.2.2

Steady-state active methods

Steady-state methods inject a known and typically periodically distortion into the grid and then make the analyses in the steady state period. One technique proposes solution like development of a dedicated inverter topology [10] and by measuring the phase difference between supply and inverter voltage to compute the line impedance. Another technique easy to be implemented but patent protected, repetitively connects a capacitive load to the network and measures the difference in phase shift of the voltage to the current.

33

3.1.2.3

Establishing the solution

The technique proposed in this project is a steady-state technique that injects a noncharacteristic harmonic current into the network and records the voltage change response. Results are processed by means of a simplified Fourier analyses at the particular injected harmonic. In this way the method has the entire control of the injected current and the computation resumes only to specific Fourier terms for obtaining the final result. It is worth to mention that the same technique can be used to obtain the line characteristics over a wide frequency range, if multiple analyses are extending the injected frequency [6]. Some requirements must be consider prior to simulation and implementation: - the final implementation must use the existing hardware of the PV inverter, preferably involving no changes in A/D circuitry and board design. - the implementation should consider measuring the absolute value of the grid impedance - the fault levels that trip the inverter are: - absolute grid impedance > 1.75 Ohm (PowerLynx specification) - changes in grid impedance > 0.5 Ohm over a period of 5sec (EN503301-1) - the implementation should consider a redundancy method of determining the grid impedance by 2 different devices that can trip the output relay. - the implementation should facilitate connection of multiple PV inverters to the same grid, without interference between similar PV inverters - the implementation should consider the issue of the active ripple control in Germany (see PowerLynx specification) All above requirement have been discussed together, leading to the following conclusions: - the inverter can inject a harmonic disturbance into grid by adding a sinusoidal signal to current reference or to the voltage reference. - adding the harmonic sinus to the current reference could have a negative impact on calculation time, due to the slow response of the current controller. - the injection must be repeated with a certain period thus minimizing the amount of distortion due to harmonic injection, and facilitate multiple connection of the PV inverter to the same grid. 34

- a low frequency harmonic injection is desired to be implemented, due to the closer result of the harmonic impedance to the 50 Hz impedance. Thus the 75-200 Hz frequency range came into attention. - a low frequency is also far away from the usual grid harmonic resonance (usually 500Hz2000Hz) that will give errors in estimation - the effect of the capacitive load of the grid, could be neglected if low frequency injection. - a non-characteristic 50 Hz frequency must be injected, not to overlap on an existing harmonic on the grid.

3.1.3 Principle of operation The challenge is to measure the impedance when the system is energized, loaded and furthermore, the local grid-connected PV inverter is supplying active power to the grid. As shown in Fig. 4.1.1 also characteristic harmonics (denoted by "h" argument) have to be taken into account. That leads to the idea of analyzing the grid as a complex structure characterized by its harmonic components. This model is further depicted in Fig. 4.1.2, by decomposing the complex model into individual frequency plans. Vs(h) stands for the grid voltage harmonic dependency. It includes both the background distortion of the grid and of the harmonic distortion generated by consumers. h=1

Filter

Ii(h)

Inverter

Rg(h) XLg (h) Vs (h) XCg (h)

h=3 h=5 h=3h+1

Grid

Fig. 4.1.2. Decomposition into multiple models of the characteristic harmonics. It is clear to see, according to Fig. 4.1.2, that using a characteristic harmonic current for injection produces a major impact in processing the measured voltage and current. One solution is to measure the background distortion previous to the harmonic injection then using this information as a subtracting part from the real measurements. Since this approach requires much DSP processing power and memory, the real implementation will have to avoid such an alternative. 35

To facilitate the algorithms, a non-characteristic harmonic current is used instead as the injected disturbance. The network model with respect to non-characteristic harmonic (referred as hx) is depicted in Fig. 4.1.3. Compared to Fig. 4.1.2 it is clear that Vs(hx) has a value of zero if it is assumed that the respective harmonic is not present in the network.

Further assumption such as the injected harmonic can be of low frequency, enables to eliminate the capacitor of which the effect is negligible at low frequency.

Ig(hx)

Filter

Ii(hx)

Rg(hx) XLg(hx)

Vg(hx)

Inverter

Grid

Fig. 4.1.3. Diagram of converter to grid connection considering non-characteristic harmonic.

The PV inverter is used directly to inject the harmonic current by adding a harmonic voltage to the voltage reference of the PV inverter. This eliminates the need of building the special block "Z" shown in Fig. 4.1.1. By using the same sensors (denoted by Ig and Vg) as for the control loop, the PV records the time-domain response waveforms. The measurements are processed in a way of Fourier analysis for the specific harmonic used, and finally the injected harmonic voltage and current are obtained. Next the relations easily to calculate the line impedance, according to Fig. 4.1.3 can be done as: Z (h) =

Z ( h) =

V (h) I ( h)

V ∗ e jϕV = Z ∗ e jϕ Z jϕ I I ∗e

Z ( h ) = R g + j ∗ ω h ∗ Lg

(1) (2) (3)

where Rg and Lg denote the resistive and inductive part of the grid and ωh represents the frequency of the injected harmonic.

36

Since the main target is the grid impedance at the fundamental frequency further processing must be done. Eq. (4) gives the result of the grid impedance at the frequency of 50 Hz, by a simple mathematical substitution of injected harmonic with fundamental frequency. Z (50Hz) = Rg + j ∗ ω50 ∗ Lg

(4)

An alternative of (4) is the assumption that the injected frequency can be closer to fundamental frequency; therefore the calculated impedances for those frequencies have almost similar values. Also a correction factor based on a grid characteristic can be implemented. This alternative saves processing time. The principle of operation also takes into account the injecting duration of the harmonic to be limited, usually around one fundamental period. The injection is periodically repeated in a way that multiple operations (algorithm running) are performed in a second. This enlarges the implementation but has the advantage of allowing other similar PV inverter (e.q. multiple inverters together connected in a PV farm) to operate on (to measure) the same grid. The problem of parallel PV operation is reduced to the method of common accessing the same channel, similar as in computer networking. Moreover, having multiple running of the algorithm gives the chance to average the impedance within maximum duration of 5 seconds [13]. In this way random errors due to noise and A/D flickering can be minimized.

37

3.1.4 REFERENCES [1] K.O.H. Pedersen, A.H. Nielsen, N.K. Poulsen, "Short-circuit impedance measurement" IEE Proc. Gener., Transm. and Distrib., Vol. 150 Issue: 2 , pp. 169 -174. [2] B. Palethorpe, M. Sumner, D.W.P. Thomas, "System impedance measurement for use with active filter control" Proc. on Power Electronics and Variable Speed Drives, 2000. (IEE Conf. Publ. No. 475), pp. 24 -28. [3] B. Palethorpe, M. Sumner, D.W.P. Thomas, "Power system impedance measurement using a power electronic converter" Proc. on Harmonics and Quality of Power, 2000, Vol. 1, pp. 208 -213. [4] M.B. Harris, A.W. Kelley, J.P. Rhode, M.E. Baran, "Instrumentation for measurement of line impedance", Proc. on Applied Power Electronics Conference, 1994, Vol.2. pp. 887 893. [5] J.P. Rhode, A.W. Kelley, M.E. Baran, "Complete characterization of utilization-voltage power system impedance using wideband measurement" Proc. on ICPS Conference, 1996, pp. 123 -130. [6] J.P. Rhode, A.W. Kelley, M.E. Baran, "Complete characterization of utilization-voltage power system impedance using wideband measurement" IEEE Trans. on Industry Applications, Vol. 33 No: 6, 1997, pp. 1472 -1479. [7] L.S. Czarnecki, Z. Staroszczyk, "On-line measurement of equivalent parameters of distribution system and its load for harmonic frequencies" Proc. of IEEE Instrumentation and Measurement Technology Conference, 1995. IMTC/95, 1995 pp. 692-698. [8] Z. Staroszczyk, "Problems in real-time wide band identification of power systems" Proc. of IEEE Instrumentation and Measurement Technology Conference, 1998, Vol. 2, pp. 779 784. [9] Z. Staroszczyk, A. Josko, "Real-time power system linear model identification: instrumentation and algorithms" Proc. Instrumentation and Measurement Technology Conf., 2000, Vol. 2, pp. 897 -901. [10] N. Ishigure, K. Matsui, F. Ueda, "Development of an on-line impedance meter to measure the impedance of a distribution line" Industrial Electronics, 2001. Proc. ISIE '01, Vol. 1 , pp. 549 -554. [11] K. Matsui, N. Ishigure, F. Ueda, "On-line impedance meter to measure the impedance of a distribution line using inverter" Proc. of IECON '01. Vol. 2, pp. 1230 -1236. [12] U. Borup , “Design and control of a ground power unit“ Ph.D. dissertation, Aalborg University, Institute of Energy Technology, 2000, ISBN 87-89179-36-6. [13] European Standard EN 50330-1, Photovoltaic semiconductor converters Part 1: Utility interactive fail safe protective interface for PV-line commutated converters, 1999 38

3.2 Simulation Regarding the implementation, there are two techniques under consideration: •

Using single harmonic current injection (referred to as SHC injection), then perform the Discrete Fourier Transformation (DFT) amplitude and phase calculation and finally having the grid impedance at the harmonic according to (2), (3) and (4).



Using two harmonic currents injections (referred to as THC injection), then perform only DFT amplitude calculation.

The THC injection is explained by simultaneously injecting two harmonics followed by DFT amplitude analyses for the particular injected harmonics. This approach provides an alternative to compute the phase angle. It is worth to mention that THC injection can be used when both Rg and Lg need to be known. Thus, by computing the grid impedance in two different points (two different harmonics) the grid parameters are calculated by solving following set of equations. Z12 = Rg 2 + ω12 ∗ Lg 2  2 2 2 2 Z 2 = Rg + ω 2 ∗ Lg 2

(5)

2

Z1 − Z 2 ω12 − ω 2 2

(6)

ω1 2 Z 2 2 − ω 2 2 Z 1 2 Rg = ω1 2 − ω 2 2

(7)

Lg =

where:

ω1, ω2 denote injected harmonic frequencies. Z1, Z2 are the amplitude of impedance calculated on ω1, ω2 Rg, Lg are grid resistance and inductance Previous to implementation, a set of simulations must be made in order to assure the harmonic current injected method meets all feasible requirements.

39

A simple validation test must be done in order to assure the correctness of the technique. The validation uses the SHC injection techniques on a stationary grid model. The grid model is depicted in Fig. 4.2.4. The diagram includes separate blocks for fundamental voltages and for the background harmonics on the grid. The injection is made by the "harmonic current injection block".

Vg(h)=∑V

Harmonic current injection

Fundamental Voltage

+

Background distortion

+

Z(h)

+

Harmonic Impedance Model Ig(h)=∑I 1 Z(h)

Grid Voltage Measurement Grid Current Measurement

Harmonic Impedance Model

Fig. 4.2.4. Complex harmonic model of the grid to validate the technique.

"Z(h)" blocks depict the complex harmonic model of the grid impedance. The complex frequency impedance model is divided into individual frequency model according to the relations:

Z (h) = Z (h1 ) + Z (h2 ) + Z (h3 ) + ... + Z (hk )

Z ( hk ) = Rg + j ∗ ω k ∗ Lg

(8) (9)

where: hk stands for different relevant harmonic frequency for grid modeling Rg and Lg represent the resistive and inductive grid part to be estimated. The implementation of the impedance estimation model used (10) for DFT calculation [12] for voltage and current harmonic components are: N −1 N −1  2π * h * n   2π * h * n  Λ h = ∑ v(n) * cos  − j * ∑ v(n) * sin   N N     n =0 n =0

Λ h = λhr + j * λhi

where: 40

(10)

N is the number of points/samples per fundamental period v(n) is the input signal (voltage or current) at point n

Λh is the complex Fourier vector of the hth harmonic of the input signal λhr is the real part of Λh λhi is the imaginary part of Λh

The Simulink model of the implemented DFT block using (10) is shown in Fig. 4.2.5.

Cos harmonic n-sample s vector Dot Product A/D Sampl ing





Real part



Imaginary part

Input n-sample s vector Dot Product



Sin harmonic n-sample s vector

Fig. 4.2.5. Vector approach to calculate Discrete Fourier Transformation.

First test that have been done is to validate the DFT model, considering the vector multiplication as in Fig. 4.2.5. (file: xFinalDocumentation \ 2-Simulations \ Models \ DFT_VectorModel.mdl)

41

Fig. 4.2.6. Simulation test for validating the DFT algorithm.

The test consist in supplying the input of the model with a complex signal composed by summing different sinusoidal component (by changing the frequency and the amplitude of the sinus), and to notice if the algorithm can recognize the amplitude of a given harmonic component. In above experiment the frequency used was 400Hz and amplitude of 1.5. Result shows, after 40ms, the result to be exactly the input amplitude. First 20ms are used for sampling the input and for storing into input buffer. That explains the 0 value during the first 20ms. The experiment has been repeated with different values for amplitude and frequency, the results being similar. It worth noting the simulation has been done in the discrete time domain, as it will be in DSP implementation. Thus some error will occur due to sampling. However, even if final implementation must be in fix-point variables, the actual simulations and next ones do not consider this approach. A fix point implementation will be taken into account later by implementing a S-function.

42

3.2.1 SHC Simulation A simple simulation (file: xFinalDocumentation \ 2-Simulations \ Models \ SHC.mdl) test with Rg= 0.7654 Ω and Lg=0.321 mH is made considering the grid and DFT analyzer models implemented as described. The results displayed in Fig. 4.2.7 shows that results are relatively precise if stationary conditions of the grid.

Fig. 4.2.7. Simulation test with SHC technique.

The grid model is designed in Fig. 4.2.8 as explained in (8)-(9) considering only 5th, 7th, 11th harmonic on the model. The harmonic injection is made at 200Hz frequency (4th) by the special block "Voltage 4*50".

43

Fig. 4.2.8. Complex grid model used in SHC simulation.

The inside details on SHC block are given by Fig. 4.2.9, that uses a Simulink block depicted by "4th Harmonic Analyzer" and detailed in Fig. 4.2.10.

0.7654 -0.000321 0.772

0.5 VMagn

1 In Voltage

Voltage

0.5779

IMagn IPhase

2 In Current

Imag1

Vmag8

VPhase

Imag8

ZMagn

0.8652 Zmag8

ZPhase

u(1) * cos(u(2))

Current Vharm Zcomplex

Fcn1

4th Harmonic Analyzer 2*pi* 1*50 Fundam Harm 0.7654 - 0.4034i Zphz1

u(1) * sin(u(2)) * (u(3)/u(4)) Fcn2

2*pi* 4*50

-K-

1 Out Gain

4th Harm sqrt( u(1)^2+u(2)^2 ) -0.485 Zphz

Fig. 4.2.9. Details on SHC block. 44

Fcn3

DSP 7 Vharm 1

Sin harmonic1

Voltage 1 Downsample4

Buffer1 5

-3.84e-015 - 0.5i DSP

Row Sum

1 Cos harmonic

Downsample1

Dot Product Buffer2

DSP

Row Sum

1 Sin harmonic

Matrix Sum1

Downsample3

Dot Product1 Buffer3

Matrix Sum3

Zphz1

1

|u|

-K-

6 ZPhase

2 VPhase pi/2

0.7654 - 0.4034i

Constant

-K-

8

|u|

Gain2

ZMagn

VMagn

u VComplex Magn-Angle

Gain

Product1

Zphz3

Zcomplex

u Product

ZComplex Magn-Angle

0

Constant2

2

Row Sum

Current

Dot Product2

1 Downsample2

Buffer4

Matrix Sum2 Row Sum

Dot Product3

Matrix Sum4

3

|u|

-K-

IMagn

u IComplex Magn-Angle

Gain1

4 IPhase

pi/2 -K-

0.2694 - 0.5113i

Constant1

Zphz2

Gain3

Fig. 4.2.10. Details on "4th Harmonic Analyzer" block.

The "4th Harmonic Analyzer" bloc extracts, by the mean of DFT, the harmonic current as well as the harmonic voltage, giving its respective amplitudes and phases. Thus the SHC block can compute the module of the grid impedance. The results obtained show very good results, as good as 4 decimal precision even more. This experiment validate the proposed method of single harmonic injection (SHC)

3.2.2 THC Simulation According to (5)-(7) the same results can be obtained if THC method is take into consideration. The benefit of this method was explained by giving the final value of the R and L without computing the angle of the complex impedance (Z). The THC simulation runs in the same manner as SHC. Next will be given some of the simulation results. (file: xFinalDocumentation \ 2-Simulations \ Models \ THC.mdl)

45

Fig. 4.2.11. Simulation test with THC technique.

The grid model remains the same, however the injection must consider now two harmonics component, that's why the grid model includes a supplementary injection block of 12th harmonic.

Fig. 4.2.12. Complex grid model used in THC simulation.

46

According to Fig. 4.2.12, the THC simulation considers the injection to be with 8th and 12th harmonic components. The "2 Harmonic Injection THC" block will have the implementation given by (5)-(7). It can be notice in Fig. 4.2.13 that two "Harmonic Analyzer" blocks are used, the implementation of these blocks being identical as in SHC simulation.

Fig. 4.2.13. Details on THC block. It have been noticed that accuracy increases if the harmonic frequencies have more distance in between. If they are closer (ω1~ω2) the results (estimated Rg and Lg) contains some errors due to the divisions of small numbers in (6)-(7). All simulations conclude the DFT implementation gives good results with both methods when static conditions of the grid (no variation in parameters have been simulated).

3.2.3 PV Simulation Furthermore, the grid estimation technique is simulated into a non-ideal case using a PV model (file: xFinalDocumentation \ 2-Simulations \ Models \ plynx_85_gm_09jul.mdl). The injected harmonic has been chosen of 4th harmonic with amplitude of 10A. (Fig. 4.2.14, middle). The grid parameters are set to Rg=1 Ω and Lg=0.3 mH. Thus the Zg should have value of 1.005 Ω. The results (Fig. 4.2.14, upper image) show around 1.15 Ω, indicating a maximum 20% deviation of the impedance. Green line indicates the Zg of 1.005 Ω, and blue one is the 47

impedance estimation. As it can be noticed the injection is not permanent as in earlier simulations but considering some interruption.

Fig. 4.2.14. Results obtained on PV simulation. This approach will have the benefit of minimizing the disturbance injected into the grid. The impact of injecting the harmonic current can be seen on the waveform of the supplied current to the grid (Fig. 4.2.14, lower image). It can be noticed that, even the results were very precise in the earlier simulations, the model will not give the same precision when it is used in the context of the internal PV algorithm. The errors appear because of a small internal delay from voltage anti-aliasing filter. This delay has a significant impact on the angle calculation leading to incorrect inductance estimation. If the supplementary phase shift due to anti-aliasing filter is taken into account the results of estimation are improving.

3.2.4 Vector vs. Scalar implementation In the context of using the presented method into the DSP logical control further aspects must be studied. One aspect resides in the computing time required for DFT operation to be performed. Since the DFT can only be calculated after all samples are achieved, the calculation can overload 48

the DSP. It is estimated that using the implementation shown in Fig. 4.2.5 (referred as a vector technique) the DSP will require more time performing the final calculation. This will need a multi-tasking programming technique specially developed for impedance calculation. This approach is to be avoided since one of the project goals was to embed the impedance estimation routine into the DSP in the easiest way and without requiring extra resources.

To overcome this limitation the next proposed idea is to perform the multiplications and summations of DFT terms (10) using a running sum. The principle is depicted in Fig. 4.2.15. Running ∑

+

Cos(n)

x

+

Sin(n)

x

+

Running ∑

+

Real part

A/D Sampling

Imaginary part

Fig. 4.2.15. DFT diagram. Running sum approach. A comparison of the principles is given by Fig. 4.2.13. It can be seen that vector technique involves more calculation time once the samples are acquired and also large memory space for samples storage. Start of a new period Sampling Storage of n-samples vector

Updates in running sum

Start of a new period

DFT Calculation

DFT Final Calculation

Fig. 4.2.13. Comparison of vector and running-sum approaches.

49

Fig. 4.2.16. Running-sum (scalar) implementation of the DFT.

The Simulink model of the DFT is given by Fig. 4.2.17. Simulation have been run considering this approach instead of vector multiplication in DFT, with very close results.

50

Fig. 4.2.17. Running-sum (scalar) implementation of the DFT.

3.2.4.1 Conclusion - harmonic injection method can provide the estimation of the grid impedance - usage of this method on ideal case gives precise results - usage of this method on a more realistic case (discrete-domain, hardware limitation) gives accurate results if some of the external conditions are known and compensated - this method can provide good results even the injection is not continuous (ex: injection on an interval multiple of 20ms) - the scalar technique of running sum can be implemented instead of the vector technique, with the benefit of reducing the final calculations and reducing the required space for variables storage. - due to more simple implementation the SHC injection is preferable instead of THC. - the increases in THD can be kept under control by changing the amplitude and duration interval of the injection. 51

3.2.5 Fix-point simulations Another implementation issue that have to be taken care off, regards the numerical calculation used since the chosen DSP can only perform computations in fix point numerical format. The testing, prior to implementation can be done by building a S-function in C-programming language. The variables used for algorithm implementation are declared as integers (on 16 or 32 bits, with or without sign, depending on the usage). Therefore further simulations can be performed to foresee and reveal some of the typical fixpoint problems. In order to make the simulation closer to real implementation the input signals (grid current and grid voltage) will be used from a real experiment, achieved by a Tektronix oscilloscope and stored on a floppy disk. This approach gives the chance to observe the impact of fix-point implementation on a real signal. The PV grid current and voltage are shown in Fig. 4.2.18.

Fig. 4.2.18. Grid voltage and grid current of the PV inverter (3kW).

Considering these waveforms the simulation can be done by supplying the input signals from a "mat" file, rather than using the model of the grid presented in § 2.1-2.2.

52

The signals (voltage and currents) are first offline mixed with the result of injecting a harmonic current over a known grid. Thus a 75 Hz of 0.5A current is injected over a grid with 1 Ω resistive part. The inductive part is set to 0 to not involve a phase shifting of the signals. This limitation enlightens the interpretation and analyses. Above statements are equivalent to adding a 0.5 A component to the grid current and a 0.5 V to the grid voltage. The effect of injection could be noticed in Fig. 4.2.20, with a little amplitude changes, at the moment of injection. The voltage waveform however is not displayed since the difference is not clear to see due to the high value of the fundamental voltage component.

Ig

Ug

Fig. 4.2.19. Time-domain waveforms of PV grid current Ig and grid voltage Ug at 3 kW PV power.

Fig. 4.2.20. Time-domain comparison of grid current with and without harmonic injection. The PV power is 1.9 kW.

The resultant signals (OutFile_2.mat) provide the inputs of the simulation. The simulation diagram is presented in Fig. 4.2.21. (file: xFinalDocumentation \ 2-Simulations \ S-function \ simulink_Sfun_v7.mdl)

53

Fig. 4.2.21. S-function Simulink diagram.

For comparison reason the schematic uses two different calculation methods, to observe the fix-point related errors: - 2 Simulink blocks: "Current" and "Voltage" (that are considered giving correct results) - and the implemented S-function block "Fix point Harmonic Analyzer" Also for testing some different situations some other auxiliary blocks exist in the diagram like: Modified Network, Zero Shift, Zero Cross and appropriate scopes for debugging and analyzing the waveforms. The input signals (grid voltage and grid current) will be sampled at a frequency equal to DSP sampling frequency. The effect of the sampling can be seen in Fig. 4.2.22. Comparative to original signals some errors can be noticed, for the higher frequencies, due to the sampling. In order to reduce these errors the injected frequency should not be too big. A value of 75 Hz is considered to be appropriate for the sampling frequency.

54

Fig. 4.2.22. Grid voltage and grid current sampled waveforms.

Fig. 4.2.23. Grid voltage and grid current waveforms. Sampled and 1024 bit scaled.

55

Fig. 4.2.23 shows the effect of scaling the input signal on + 1024 bits. The same scaling happens into DSP. After running the simulation the conclusions are: - because of a slight shift (when captured on oscilloscope), the imaginary component of the voltage and the current will not have the value of zero. - voltage estimation is 0.9 V instead of 0.5 V as it should be - if the analyze is performed on a pure voltage signal (only oscilloscope waveforms, no harmonic injection) the result of the harmonic voltage amplitude is 0.4 V (the effect is explained either by a 75 Hz voltage pre-distortion component or by DFT errors due to nonproper anti-aliasing filter) - comparing the results obtained from fix-point S-function and from Simulink built-in block, the results are close. - current estimation is better than voltage estimation probably due to the fact that current is multiplied by (1024/39.1) to be scaled into + 1024 bits, and the voltage just by (1024/450). This increases the current resolution. Much time has been spent to fit the right values for fix-point variables for keeping away the rounding errors and overflowing. Because the voltage is higher in amplitude, one idea that came into discussion was to subtract the fundamental component, remaining only the harmonic components (the injected harmonic and the background distortion). The idea has been tested and it proves to be more beneficial for the grid current than for the voltage. The explication is that the current can have different value depending on the current reference. That will give different value in DFT summing, with difficulties in scaling the variables. Thus subtracting the fundamental component will provide a way of keeping the summation in DFT under control. Even this approach will not bring any advantage in accuracy it will keep a stable DFT fix-point calculus. The implementation is shown in Fig. 4.2.24, that actually represents inside details of "Scaling" block and the signals are available in Fig. 4.2.25.

56

Fig. 4.2.24. Implementing the fundamental subtraction for voltage and current.

Fig. 4.2.25. Voltage and current results after subtraction.

57

After subtracting of the fundamental, the new obtained signal can be amplified in order to increase the resolution when performing fix-point operations. The results are encouraging, especially for the voltage, which get closer to Simulink block result, comparative to earlier simulation.

Fig. 4.2.26. Results with subtraction and amplification.

One of the issues that have been trying to mitigate was dimensioning the variables. Since it is easier to solve the problem on simulation board than on real experiments, more tests have been done changing one of the next variables: - sin/cos amplitudes - input signal (by changing the scaling factor) - the final result of the DFT summation. The limitations taken into consideration were: - to keep a higher accuracy - to keep running sums under a 32 bits, signed integer - to obtain the final value of the summation under a 16 bit, signed integer, in order to perform the square. 58

More information can be obtained by studying the evolution of the DFT running sums for both signals (voltage and current) Fig. 4.2.27 and Fig. 4.2.28 show the evolution of the running sum when: - sin/cos have values of 213 - input signals are used without subtracting of the fundamental It can be noticed that the sums can have very high values even the final values are very smalls (these actually represent the real and the imaginary part). Actually, this phenomenon must be analyzed in order not to lose too much resolution but still to have the evolution within 32 bits variables. The final value of the sum can be observed, for example, at 0.04 ms. In some cases this value is near to zero, indicating a very low result. This is the case of the SumCos sum of the current and the voltage. The 0 value of the SumCos indicates the cosine component of the signal has almost zero amplitude. The sinus component instead gives bigger values, because of the synchronization of the injection and DFT calculation to zero cross moment.

Fig. 4.2.27. Running sum of the current signal.

59

Fig. 4.2.28. Running sum of the voltage signal.

The same simulation is repeated for the case of supplying the S-function with subtracted signals (input signal minus fundamental). The results look different now from earlier simulation, with sharp changes that can be explained by the increase in weight of the harmonics. The running sums are at least 10 times lower than before. Because of the increase in resolution, the final result (ex. the value of the sum at 0.04 ms) is more easily spotted.

60

Fig. 4.2.29. Running sum of the subtracted current signal.

Fig. 4.2.30. Running sum of the subtracted voltage signal.

61

3.2.5.1 Conclusions: - the method (harmonic injection) can provide a mean of impedance measurement - a careful attention must be paid to analyze the grid voltage signal - subtraction of the fundamental current provide a way of avoiding numerical errors because of independence of current variation. - subtraction of the fundamental voltage is desirable to reduce the amplitude of the running sum in the benefit of the final value. - the experiments could consider also some amplitude increases of the injection

62

3.3 Implementation

3.3.1 Implementation Implementing the C-code with simulation conclusions has started the experimental work. Different phases of programming code have been tested due to different numerical and physical issues. Not all programming phases will be discussed here, but only the final code. However typical problems that are interested to be known and must be avoided in the future will be posted. Since the experimental results displayed next will make use of different C-variables name, more details about C-code programming can be found in the source code files: xFinalDocumentation \ 5-Programming \ ENS-C-Code-30aug2003 \ *.c As simulations proves, it is possible to estimate the grid impedance by: - injecting a known harmonic - the harmonic should be of low frequency - the harmonic should not interfere with an existing or characteristic 50 Hz frequency - the amplitude of the injection are to be tested with more than 0.5 A - the injection can be done by voltage injection or by current injection, First programming task was to build an injection function that can be easily changed (meaning the frequency of the harmonic) and activated by a simple "if" condition since this injection should non-continuously happen (with some repeating and stops rates). The injection has been made sinusoidal by using a generic sinus look-up table already built in. The frequency of the sinus has been set to 75 Hz, in the idea that is closer to 50 Hz frequency and will facilitate the impedance calculation at 50 Hz. Injection of the harmonic could be done: 1. - by adding the new signal (75 Hz sinus) to the current reference, before current control loop

63

2. - by adding the new signal (75 Hz sinus) to the voltage reference, added to the voltage PWM. Since the current controller is considered being slower, then second solution is mainly considered.

Note: either solution chosen will have to endure the consequence of the current control transfer characteristic. Next picture will display the phenomena of the harmonic injection, with pictures on the inverter current as well as on the line voltage. It has been noticed that the harmonic current is stable and can be easily measured. While the harmonic voltage is hard to be measured even professional instruments have been used. The amplitude of the harmonic sinus is set internally to 5 and should give a value of almost 2 A. However due to current close loop characteristic, the output of the harmonic injection is less then calculated value, around 0.2 A. The oscilloscope has been used to measure the harmonic amplitude since it can perform a FFT analyze. Fig. 4.3.31 shows the effect of the injection and the FFT analyze (red waveform). The effect of the injection on the current is barely noticed since the harmonic injection is rather small. The voltage disturbance is even harder to be observed on the voltage waveform.

Fig. 4.3.31. Continuous harmonic injection of a 75 Hz, amplitude 5 sinus. Time domain waveform of the inverter current, grid voltage and FFT analyze of the inverter current.

64

However, the harmonic current is stable and can be measured. The harmonic voltage, instead, proves to have an unstable response when measuring. Next figures will give such example for the same injection as above. The voltage FFT snapshots have been successively taken after current snapshot.

Fig. 4.3.32. FFT on the line voltage A hill in the 75 Hz harmonic voltage & FFT on the line voltage. A sag in the 75 Hz harmonic voltage.

Note: The similar phenomenon is noticed for the 150 Hz frequency also. There could not be found any explication for these phenomena. One solution to mitigate the sags and hills on the 75 Hz frequency has been tried by changing the frequency to 62.5 Hz and to 200 Hz. The issue remains even these changes. Solution has been found by increasing the amplitude of the injected signal to a higher value. The actual inside setting is UgENS=20 (was 5). Experiments have been run also with value of 10, but the results were not satisfactory. Next step is to implement the running sum (see Simulation report) and to assure no overflow occurs.

65

Fig. 4.3.3. The effect of non-synchronization causes changes in running sum shapes Tests prove that running sums (ex: sum of Cos Voltage, channel 3) have permanent changing in shapes. The explication have been found in the fact that: - the injection function is freely done, without synchronization. - the calculation of the sums have also no synchronization. This imposes synchronizing the injection and the calculation to be done at the zero-cross moment of the line voltage (almost the same as the inverter current). Since the sinus (a look-up table on + 16 bits) is too large to perform the correct calculation of running sums, this is reduced to a + 29 sinus amplitude Furthermore, the running sums can be computed considering the subtraction technique (see Simulations.doc) instead of direct measured current and voltage. By this technique the measured signals have the fundamental component subtracted, with the effect of minimizing the amplitude of the sums. Simulations showed good results for the current and for the voltage. However the voltage does not seems to be so easy to be implemented. Next figure will present the subtracted signal (current and voltage).Fig. displays the result of subtraction for the current signal (channel 3).

66

It is noticeable now the amplitude of the injected harmonic is higher then before (actual measurement with UgENS=20). The result of subtraction will contain mainly the harmonic components and a rest of fundamentals since the phase of the input current signal was different than internal 50 Hz sinus (the substituting part). The signal presented on channel 3 will be the input into the DFT algorithm.

Fig. 4.3.4. The current difference (input-fundamental) The resultant signal is not identical to the simulation result since the harmonic content is continuously changing on the grid. However the waveform presented on channel 3 has stable shape, on a reasonable observation time. The voltage, however, bring again an issue to DFT calculation. The result of the subtraction has a random modification in shape. Even much effort have been spent to solve this issue, the problem still remains. One of the suppositions was a small phase shift between the input line voltage and the internal 50 Hz subtracted part. If this phase shift is not constant this will give a pulsation as in next figures.

67

Fig. 4.3.5. The voltage difference (input minus fundamental). Stables waveforms .

Fig. 4.3.6. The voltage difference (input minus fundamental). Random pulsation phenomenon Fig. shows the result of the subtraction when the results are stables in waveforms. Fig. gives a clue of the pulsation. It is worth to mention that has not been noticed any correlation of the pulsation to any internal (DSP) or external events. That concludes the voltage to be computed as it is read from the A/D device, without 50 Hz component subtraction.

68

Conclusion: - the current will be used with subtraction - the voltage will be used without subtraction The evolution of the running sum have been checked to see if any overflowing.

Fig. 4.3.7. The running sin sum of the subtracted current signal

Fig. 4.3.8. The running cos sum of the subtracted current signal.

69

Note: The evolution of the running sum for the subtracted current signal has an opposite sign comparative to simulation results. This is due to different subtraction operation; in simulation the subtraction is Iinput-Iintern, while in DSP is opposite.

Fig. 4.3.9. The running sin sum of the voltage signal.

Fig. 4.3.10. The running cos sum of the voltage signal. Experiments have been done also with subtracted voltage (as for the current) but due to the amplitude pulsation (as discussed) the results are unpredictable. 70

Fig. shows an incidence of such a result. It is clear that such voltage calculation will give huge errors in impedance estimation.

Fig. 4.3.11. The running sin sum of the subtracted voltage signal. Every above experiment considers a continuous injection of the 75 Hz harmonic. Since this will increase the harmonic distortion it is advisable to make the injection more rarely. How rear this injection should be it is a trade off impedance accuracy and THD change. By successive testing 2 cases have been tested further: - one by injecting the harmonic on every 14 fundamental periods (Fig. 33) - one by injecting the harmonic on every 8 fundamental periods (Fig. 4.3.)

Fig. 33 Injection of the harmonic at every 14

Fig. 4.3.13. Injection of the harmonic at every

fundamental periods

8 fundamental periods

71

Since the results were satisfactory using the 1/14 ratio, many of the next experiments have been done in this condition. If no other specifications, by default, this ratio will be used next. After implementing this 1/14 ratio in software, the results (running sums) have been checked again to ensure stability. The effect of the temporary injection will be depicted next, leading that the sums are stables.

Fig. 4.3.14. The running sin sum of the

Fig. 4.3.15. The running cos sum of the

subtracted current signal Injection of the

subtracted current signal Injection of the

harmonic at every 14 fundamental periods

harmonic at every 7 fundamental periods

Fig. 4.3.16. The running sin sum

Fig. 4.3.17. The running cos sum

of the voltage signal Injection of the harmonic at of the voltage signal Injection of the harmonic at every 14 fundamental periods 72

every 7 fundamental periods

It is clear to see the running sums are computed during the harmonic injection duration, every time starting at a zero-cross moment. Even the zero cross moment is well determined by an internal routine, however this will not ensure that next zero-cross will happen exactly after 170 samples (20 ms fundamental period and sampling frequency of 8500 samples/sec gives 170 samples per period). To avoid cases that will lead some calculation error in DFT running sums, a supplementary condition has been implemented by counting a number of samples of 340, even a new zerocross moment will happen. However even this condition is not really necessary if the algorithm will run with a 1/14 injection ratio, this will minimize the DFT errors. Next will be displayed an occurrence of such a case when the zero-cross happened faster than achieving all 340 samples. This is indicating by the fact that running CosSum for voltage is not launched and stayed in zero for the entire duration, up to next launching. In order to be able to see such case a continuous injection is made.

Fig. 4.3.18. Occurrence of missing the last 340th sample. The cause of such occurrence could not be explained, unless some delay due to a task with more priority than of the current control (where the ENS_Calculation function exists). 73

However such case will not happens since the injection is done with the 1/14 repetition ratio. Once the running sums are under control (no overflowing) last check is to ensure: - the final value (the result of the integration) is big enough to get out from errors - the final value fits into a 16 bit variable, to further compute the sum of the squares (that gives the module square and should not be bigger than 32 bit variable) All these conditions are achieved if the final values of the running sums are decreased by a number of times: - 25 for current sums - 29 for voltage sums The sums are then added as next formulas shows: 2

2

V2mod=(ΣVCos) + (Σ VSin) 2

2

I2mod =(ΣICos) + (Σ ISin)

The calculations still have no physical meaning since the values should be multiplied by a 2/340 factor to obtain the meaning of the real part and imaginary part of the voltage and current. This approach is used because is no need to overload the DSP with supplementary multiplication. It have been decided the multiplication to be done as a multiplication factor when impedance is finally computed. Next after the V2 and I2 calculations, another task take care of computing the square root in order to obtain the V and I values. Finally a division and a multiplication by the mentioned factor give the impedance result. Scaling: - for Voltage: Vcalculated= (29 * 1024/450 * 340/2 / 25) * Vgrid - for Current: Icalculated= (29 * 1024/39.1 * 340/2 / 29) * Igrid Vgrid/Igrid = Kfactor * Vcalculated/Icalculated Zgrid = Kfactor * Zcalc Kfactor = 719, for having the grid impedance 1000 mOhm = 1000 bits

74

Finally the result is averaged to overcome the noise problems and is available to be displayed and take into tripping conditions.

75

76

3.4 Experiments

3.4.1 Setting up the experiments In order to compare the results to reference values a validation method must be found: 1. authorized measuring instruments must be used 2. a disturbance platform with some known parameter must be built 3. the grid must be measured and known prior to ENS tests 1. Instrument There are two instruments used in next experiments - Smartech, that can provide the resistive and inductive part of the grid. The impedance measurement is done by connecting a known load to the grid, noticing the voltage drop with and without given load. The load is connected a half period of the fundamental, short enough not to cause the current trip protection. This high current causes instead a voltage drop that can be measured. Fig. 4.4.34 shows the current pulse and voltage drop caused by the Smartech instrument (the negative pulse at the beginning of the waveform) as long as injected harmonic of the inverter (at the end of the waveform).

Fig. 4.4.34. Smartech measurement method. A high current pulse causes a grid voltage drop. 77

The current waveform is taken from the inverter feeder to the grid and shows that a current is drawn from the inverter as well. The conclusion is essential for further explications when reading the instrument, since it proves the instruments drawn some current from inverter as well as from the grid. It is easy to foresee that an error will occur if the instrument measures in the same time as the ENS harmonic injection of the inverter. This is the reason for using the instrument only in situation when the inverter is stopped or does not uses the ENS routines. For curiosity reason the Smartech instrument have been connected to measure the grid when the inverter ran with ENS routines. Some cases the results were having close values to real impedance but in most of the cases large random deviations were displayed, even internal measuring errors (FrE= frequency error, probably) - Unilap100, that can provide only the resistive part of the grid The principle of operation has not been exactly identified but it is expected to be similar to Smartech by connecting a known load and measuring the voltage drop. It performs instead the connection of the load 4 times, creating 4 moments of high currents. Probably the instrument makes an average of readings.

Fig. 4.4.35. Unilap100 measurement method.

78

Fig. 4.4.36. Unilap100 interference with ENS measurement. Fig. 4.4.36 shows the interference of the Unilap100 instrument with ENS injection method, leading to same conclusion of not using the instrument when the ENS is running. Same experiments as in Smartech case, using the Unilap100 instrument when the inverter ran with ENS routines, have been performed. The results still show random deviation from grid impedance, however with less error than Smartech, probably due to averaging.

3.4.2 Test platform. In order to perform a complete set of tests by independently changing the resistive part and the inductive part of the grid, a test platform have been build as in next figure. The components have next values: - the resistive part has a value of Rt=0.5 Ω - the inductive part has value of Lt=0.85mH and internal resistance of rLt=0.056 Ω The inductance has been measured using a RLC-meter the results being: @ Freq

@ 100 Hz

@ 1 kHz

@ 10 kHz

L

857 uH

857 uH

848 uH

R

0.056 Ω

0.823 Ω

1.383 Ω

79

Modified grid Injection

Rt=0.5 Ω

PV inverter

Measuring Instruments

Lt=0.8 mH Grid

Using this platform a step change can be simulated: - of 0.5 Ω in resistive part by connecting the Rt resistance - of 0.8mH in inductive part by connecting the Lt inductance.

3.4.3 Grid parameters By using described instruments the grid parameters have been measured in two cases, when the PV inverter is not connected to grid and when the PV inverter is connected but running without ENS routines (including no harmonic injection and no DFT calculation). Lt means an impedance of Xt=2*pi*50*Lt=0.269 [Ω] Table I. Grid impedance measurement, PV not connected Instrument

80

Smartech

Unilap100 R

Measurement

Z [Ω]

R [Ω]

X [Ω]

Grid

1.23

1.22

0.04

1.30

[Ω]

Grid+Rt

1.73

1.73

0.04

1.81

Grid+Lt

1.33

1.28

0.29

1.36

Table II. Grid impedance measurement, PV connected but no ENS routines PV Inverter, I1=3A,

Experiment Instrument

No Harmonic Injection Smart

Unilap

ENS

Z

R

Z

THDv

[Ω]

[Ω]

[Ω]

[%]

Grid

0.93

0.99

-

Grid + Rt

1.26

1.41

Grid + Lt

FrE

0.98

Measurement

PV Inverter, I1=11.3A, No Harmonic Injection

Norma 100

Smart

Unilap

ENS

Norma 100

THDi

Z

R

Z

THDv

THDi

[%]

[Ω]

[Ω]

[Ω]

[%]

[%]

2.1%

30%

0.90

0.94

-

1.9%

7%

-

2.2%

32%

1.22

1.25

-

1.9%

6%

-

2.1%

32%

0.95

0.97

-

2.0%

7%

Table II shows that both instruments indicate a smaller value of the grid impedance than before. The explication has been found because of connecting the PV to the grid, making by this, a stiffer grid (a smaller Z). Actually, the instruments will measure the parallel connection of the grid impedance and PV internal impedance.

3.4.4 Experiments As noticed in simulation stage the impedance estimation depends on the amplitude of the harmonic injection. It is clear, this will increase the THD in current as in voltage, with the consequence of reducing the PV performance. For this reason following test have been performed to establish the right amplitude that gives a fair estimation. In order to minimize the current THD, the injection has been performed in a non-continuous mode (inject-calculate, wait, inject-calculate, wait…). Next experiments will use the value of UgENS variable as a measure of the harmonic amplitude, since it is easier to establish correlations by referring to the software value, then to the real value (that could not be exactly measured if is non-continuous injection). The amplitude of the injection will be different: - UgENS=40 - UgENS=20 - UgENS=10 - UgENS=5

81

The repetition ratio of the injection will be different: - 1/1 (continuous) - 1/8 - 1/14

Table III. ENS measurement, UgENS=40, Injection 1/1 (continuous) Experiment Instrument

PV Inverter, I1=3A,

PV Inverter, I1=11.3A,

Continuous Injection ENS

Norma 100

Continuous Injection ENS

Norma 100

Z

THDv

THDi

Z

THDv

THDi

[Ω]

[%]

[%]

[Ω]

[%]

[%]

Grid

-

2.4 %

100 %

-

2.1 %

20 %

Grid + Rt

-

2.5 %

60 %

-

2.3 %

23 %

Grid + Lt

-

2.3 %

100 %

-

2.3 %

22 %

Measurement

Table IV. ENS measurement, UgENS=40, Injection 1/8 Experiment Instrument Measurement

PV Inverter, I1=3A,

PV Inverter, I1=11.3A,

Continuous Injection

Continuous Injection

ENS

Norma 100

ENS

Norma 100

Z

THDv

THDi

Z

THDv

THDi

[Ω]

[%]

[%]

[Ω]

[%]

[%]

Grid

1.20

1.9 %

50 %

1.18

1.8 %

17 %

Grid + Rt

1.68

1.8 %

50 %

1.70

1.7 %

15 %

Grid + Lt

1.40

2.0 %

55 %

1.30

1.7 %

11 %

Table V. ENS measurement, UgENS=40, Injection 1/13 Experiment Instrument Measurement Grid

PV Inverter, I1=3A,

PV Inverter, I1=11.3A,

Continuous Injection ENS

Norma 100

Continuous Injection ENS

Norma 100

Z

THDv

THDi

Z

THDv

THDi

[Ω]

[%]

[%]

[Ω]

[%]

[%]

1.15

1.9 %

47 %

1.12

1.8 %

10 %

Grid + Rt

1.65

1.8 %

42 %

1.6

1.7 %

9%

Grid + Lt

1.35

2.1 %

40 %

1.3

1.9 %

9%

Table VI. ENS measurement, UgENS=20, Injection 1/8 Experiment Instrument Measurement

82

PV Inverter, I1=3A,

PV Inverter, I1=11.3A,

Continuous Injection

Continuous Injection

ENS Z

Norma 100 THDv

THDi

ENS Z

Norma 100 THDv

THDi

[Ω]

[%]

[%]

[Ω]

[%]

[%]

Grid

1.2

1.9 %

45 %

1.15

1.8 %

10 %

Grid + Rt

1.75

1.95 %

41 %

1.67

1.8 %

7%

Grid + Lt

1.3

1.9 %

43 %

1.3

1.8 %

9%

Table VII. ENS measurement, UgENS=20, Injection 1/14 Experiment Instrument

PV Inverter, I1=3A,

PV Inverter, I1=11.3A,

Continuous Injection ENS

Norma 100

Continuous Injection ENS

Norma 100

Z

THDv

THDi

Z

THDv

THDi

[Ω]

[%]

[%]

[Ω]

[%]

[%]

1.15

1.85 %

40 %

1.1

1.8 %

8.5 %

Grid + Rt

1.65

1.85 %

37 %

1.65

1.7 %

7.5 %

Grid + Lt

1.35

2.0 %

36 %

1.3

1.85 %

8%

Measurement Grid

Table VIII. ENS measurement, UgENS=10, Injection 1/14 Experiment Instrument Measurement Grid

PV Inverter, I1=3A,

PV Inverter, I1=11.3A,

Continuous Injection ENS

Norma 100

Continuous Injection ENS

Norma 100

Z

THDv

THDi

Z

THDv

THDi

[Ω]

[%]

[%]

[Ω]

[%]

[%]

1.7

1.8 %

35 %

1.5

1.8 %

7%

Grid + Rt

2.4

1.8 %

33 %

1.9

1.7 %

6%

Grid + Lt

1.7

1.8 %

38 %

1.5

1.8 %

7%

These conclude using UgENS=20 (app 1.3A peak) and a repetition rate of 1/14 (one injection at every 14 fundamental periods) Note: The grid impedance results (ENS column in above tables) are taken by reading the mean value of the AD2 PWM output DSP channel using an oscilloscope. It worth to mention the tables data are not precise, but close to the DSP internal computed value of the impedance. A simple experiment is made by setting an internal constant value of 1000 to be displayed on AD2 channel, scaling the output to give 1V. The output channel AD2 displays a waveform closer to 1V but having a 100 Hz component even the inside value was set to a constant value of 1000. (see channel 3, pink waveform, on Fig. 4.4.37) The mean value is 978 instead of 1000. This indicates that real data could be little higher than tables above. Since is harder to make a rescaling of AD or readjustment of tables data, the measurement will consider values to be correct (within acceptable truth domain). Final validation of the result should be made, however, by directly reading the internal parameters of impedance, on a display screen, instead of oscilloscope. 83

Anyway, further experiments performed here will have to accept the given waveform for the impedance result as it is displayed in Fig. 4.4.37.

Fig. 4.4.37. Waveform of the AD2-PWM channel set to 1000. Tables show a slight variation of the impedance when changing the supplied power level. It has been noticed the implementation has a deviation when different power of the PV are used. Next figures show the phenomena. Note (for all figures): - channel 3 (pink color waveform) = impedance estimation on analog PWM AD2 - channel 2 (cyan color waveform) = the PV current, supplied to the grid Fig. 4.4.38 and Fig. 4.4.39 display the influence of current changes on impedance estimation. It can be seen the increase of current produces 2 consequences: - a small decrease in the average value of the impedance (the mean value is little lower) - an increase in error estimation (changes around average value get amplified)

84

Fig. 4.4.38. Effect of the PV current on impedance estimation. PV is directly connected to the grid

Fig. 4.4.39. Effect of the PV current on impedance estimation. PV is directly connected to the grid

85

The increase in errors could be explained by the fact that an increase in PV current increases also the noise and EMI spikes. This can induce errors in A/D conversion. Also aliasing errors start counting if high amplitude of noise. Fig. 4.4.40 shows an example of impedance estimation when the grid contains also Rt connected. This should give a total estimation of 1.7Ω. The average value indicates a value of 1.6 Ω. However because of the high PV current (8Arms) some errors appear, the result oscillating around 1.6 Ω

Fig. 4.4.40. Impedance estimation at 8A PV power. PV is connected through Rt to the grid Same experiments have been repeated by gradually increasing the PV current (Fig. 4.4.41, Fig. 4.4.42). The described phenomenon is repeating also on impedance estimation.

86

Fig. 4.4.41. Effect of the PV current on impedance estimation. PV is directly connected to the grid

Fig. 4.4.42. Effect of the PV current on impedance estimation. PV is directly connected to the grid

87

Also Rt has been connected to observe if any changes on described phenomenon. Fig. 4.4.43 shows the results. Conclusion is that Rt brings no difference in estimation behavior.

Fig. 4.4.43. Effect of the PV current on impedance estimation. PV is connected through Rt to the grid. Further tests have been performed to see the results of the ENS implementation when step changes in grid impedance value: Measurement of the local grid gave - grid resistive part Rg=1.2 Ω - grid inductive part Xg=0.04 Ω, equivalent to Lg=0.12mH Using the test platform is possible to independently change the resistive or the inductive part of the grid. Connecting the resistance Rt, the inverter will see in front a new grid that will have an impedance of: ZRt = sqrt( (Rg+Rt)2 + Xg2 ) = 1.70047 Ω, from original Zg=1.2 Ω Connecting the inductance Lt, the inverter will see in front a new grid that will have an impedance of:

88

ZLt = sqrt( (Rg+RLt)2 + (Xg+Xt)2 ) = 1.313 Ω, from original Zg=1.2 Ω By connecting Rt or Lt, the results of the ENS estimation should also change according to above calculation. Next experiments show the response of the ENS algorithm to the step change of the grid. Note (for all figures): - channel 3 (pink color waveform) = impedance estimation on analog PWM AD2 - channel 2 (cyan color waveform) = the PV current, supplied to the grid - channel 1 (blue color waveform) = the differential voltage across the inserted element (Rt or Lt). If the blue line has value of zero it indicates the PV inverter is directly connected to the grid. While a bigger value on the blue line indicates the PV inverter is connected to the grid through an series element (Rt or Lt). This channel is used to provide information about the moments when the grid changes, thus facilitating measuring the delay time. Note: the mean indication on channel 3 has been left from earlier experiments and does not have a special purpose on display. Next table gives brief explications of the figures. Figure

Conditions of the experiments

Observations

Conclusions

Fig. 4.4.44

Rt, Average=4samples (1sec), Low PV Current

Good synchronization, of the

Waveform is smooth

Fig. 4.4.45

Rt, Average=4 samples (1sec), Medium PV Current

Bad syncro of the average

The increase in current bring

Fig. 4.4.46

Rt, Average=4 samples (1sec), High PV Current

Typical syncro of the average

The increase in current bring

Fig. 4.4.47

Rt, Average=8 samples (2sec), Low PV Current

Fig. 4.4.49

Rt, Average=8 samples (2sec), Medium PV Current

average estimation errors estimation errors The waveform is smoothed Good synchronization, of the

The waveform is smoothed

average Fig. 4.4.48

Rt, Average=8 samples (2sec), High PV Current

Fig. 4.4.50

Lt, Average=4 samples (1sec), Medium PV Current

Fig. 4.4.51

Lt, Average=8 samples (2sec), Medium PV Current

The waveform is smoothed The impedance increase is

The impedance change can be

smaller

noticed

The impedance increase is

The waveform is smoothed

smaller Fig. 4.4.52

Rt then Lt, Average=4 samples (1sec), Medium PV Current

89

Figures are displayed to show comparisons in different cases. The idea is to prove that an averaging greater than 1s is beneficial for smoothing the impedance estimation results. Here, the averaging consists in calculation of the arithmetical mean of a 4 (or 8) samples. After achieving the last sample, the mean wait for another 4 (or 8) samples. That explains the delay in estimation response (referred in table as "good/bad syncro"), depending on the moment when the Rt or Lt component is inserted. Bad syncro suggested that insertion of the Rt or Lt component did not happened with the beginning of the first sample. That is why the correct value of the estimation will be achieved at the beginning of the next average cycle. An alternative to this averaging method is to implement a low pass filter or a moving average. However, due to simplicity, the results are calculated by using the described average of 4 (or 8) samples.

Fig. 4.4.44. Impedance change due to Rt. Averaging is 1s. Low PV current.

90

Fig. 4.4.45. Impedance change due to Rt. Averaging is 1s. Medium PV current.

Fig. 4.4.46. Impedance change due to Rt. Averaging is 1s. High PV current.

91

Fig. 4.4.47. Impedance change due to Rt. Averaging is 2s. Small PV current.

Fig. 4.4.48. Impedance change due to Rt. Averaging is 2s. Medium PV current.

92

Fig. 4.4.49. Impedance change due to Rt. Averaging is 2s. High PV current.

Fig. 4.4.50. Impedance change due to Lt. Averaging is 1s. Medium PV current.

93

Fig. 4.4.51. Impedance change due to Lt. Averaging is 2s. Medium PV current.

Fig. 4.4.52. Impedance change due to successive Rt and Lt. Averaging is 1s. Medium PV current.

94

Note. An increase in grid inductance could give unpredictable results in estimation due to some resonance phenomena. One experiment has been run connecting 3 coils in series to the grid instead of Lg. The coils are similar as filters coils: - label data L=143uH, - measured value L=450uH @ low current, L=350uH @ nominal PV current

Connecting 3 coils gives a resonance phenomenon that amplifies itself, finally tripping the protections. The impedance estimation, in the mean time gains unpredictable results.

Fig. 4.4.53. Starting of the resonance when connecting 3 coils. The impedance estimation have big errors.

95

Fig. 4.4.54. The current resonance (cyan color)

The experiments conclude next setting: - UgENS=20 - harmonic injection repeating rate = 1/14 - average the impedance estimation: 4 - 8 samples.

96

3.5 Programming Next files are used to implement the ENS C code: These files contain (in brief): - acadc_drive.c - the function of the harmonic injection, DFT calculation, zero cross syncro - acadc_drive.h - a function declaration - acpow_task.c - function of sqrt calculation and averaging the grid impedance - acpow_task.h - a function declaration - pasys_system.h - a new "typedef enum" for ENS Delimiters: The code added for ENS is delimited by a BEGinning and an ENDing section sign that look like next: /* ->->-> BGN.ENS.Sct - */

...The ENS C code... /* ->->-> END.ENS.Sct - */ The "" field has no special reason but to ensure the correctness of the BGN-END section, in a way that can be easily followed. The field do not shows the order of the implementation, execution or debugging, it is just for a confirmation of the delimiter. The sections (BGN-END) are independent, they are not in chains or encapsulated in each other. Comments: There are comments in most of the new lines. These will make it easy to be followed, understand and implemented into the final C code. The parts taken from original code are not commented (ex: sinus lookup table, sqrt, etc...).

97

Variables: Variables used for ENS implementation are declared in such a manner that contains the "Ens" word, to be easily spotted. Usually, the variables look like: - "Ens_name" - "NameENS" - "EnsName" The "name" of the variable was given depending on the usage, for example: - Ens_VSumSin = the running Sum of the Sinusoidal term of the Voltage - Ens_ThetaInj = the Theta angle used to obtain the harmonic sinus for Injection - EnsAvgGridImp = the Average of Grid Impedance Anyway, there are few variables that do not comply to these rules, the initial intention was to be of temporary or debugging usage. The result: The result of the grid impedance is available in "EnsAvgGridImp" variable in "acpow_task.c" file. The intention is this variable to be displayed on LCD screen and further used for tripping the inverter when impedance changes over 0.5ohm above actual value. The actual implementation does not interfere to internal trip conditions.

98

3.6 Published papers

Practical issues in the implementation of online, embedded grid impedance estimation for PV inverters Corresponding Author: Lucian Asiminoaei, Aalborg University, Institute of Energy Technology, e-mail: [email protected] DK-9220, Aalborg SE, Denmark tlf: +45 9635 9287, fax +45 9815 1411 Co - Authors: Remus Teodorescu, Aalborg University, Institute of Energy Technology, DK-9220, Aalborg SE, Denmark e-mail: [email protected] tlf: +45 9635 9249, fax +45 9815 1411 Frede Blaabjerg, Aalborg University, Institute of Energy Technology, DK-9220, Aalborg SE, Denmark e-mail: [email protected] tlf: +45 9635 9254, fax +45 9815 1411 Uffe Borup, PowerLynx A/S, Ellegaardvej 36, DK-6400, Sonderborg, Denmark e-mail: [email protected] tlf: +45 7367 5763, fax +45 7367 5758

Abstract: New and better power quality requirements are issued due to the increase of the photo-voltaic (PV) installations. Thus, different methods are used for continuous grid monitoring. By injecting a non-characteristic harmonic current and measuring the voltage grid response it is possible to evaluate the grid impedance directly by PV inverter, providing a fast and low cost implementation. Even this principle theoretically provides the result of the grid impedance, when using it into the context of PV integration, different implementation issues affect the quality of the results. This paper presents the method, typical implementation problems encountered and adopted solutions for on-line grid impedance measurement. Practical tests on an existing PV inverter validate the chosen implementation solutions.

99

Practical issues in the implementation of online, embedded grid impedance estimation for PV inverters Abstract –

New and better power quality requirements are issued due to the increase of the photo-

voltaic (PV) installations. Thus, different methods are used for continuous grid monitoring. By injecting a non-characteristic harmonic current and measuring the voltage grid response it is possible to evaluate the grid impedance directly by PV inverter, providing a fast and low cost implementation. Even this principle theoretically provides the result of the grid impedance, when using it into the context of PV integration, different implementation issues affect the quality of the results. This paper presents the method, typical implementation problems encountered and adopted solutions for on-line grid impedance measurement. Practical tests on an existing PV inverter validate the chosen implementation solutions. I. INTRODUCTION

In the last ten years the PV development has increased the number of connected systems to the grid. Such systems must meet besides all electrical regulations also certain country-specific technical recommendations (ex: Germany), especially when connecting in dispersed power generating networks. Thus, for PV equipment, in certain situations, is required a grid detection and isolation method (commonly referred as ENS, the german abbreviation of Main Monitoring units with allocated Switching Devices). The European regulation EN503301-1 [1] sets the utility fail-safe protective interface for the PV-line commutated converters. The goal of the regulation is to isolate the supply within 5 seconds due to impedance changes of Z = 0.5Ω. The main impedance step changes are detected by means of tracking and step change evaluation of the dynamic main impedance. Therefore, PV inverters should make use of an on-line measurement technique in order to meet the regulation requirements of the utility fail-safe interface. Unfortunately, even grid impedance measuring is well treated in the literature [4]-[9], not always the methods can easily be embedded into a non-dedicated platform, i.e. PV inverters. A previous study [2] proposed the development of a fast and simple method for line impedance estimation to comply with limitation standards when using it into a PV inverter. The paper described a method where the grid impedance can be estimated using the existing PV sensors and logical control. This approach provides a fast and low cost solution to meet the required standards. However, even the proposed method theoretically provides the result of the grid impedance, when using this into the context of PV inverter, the quality of the measurement is affected by different implementation issues. Thus, specific limitations like real-time computation, medium A/D conversion

100

accuracy, fixed point numerical limitation, etc., became real challenges in keeping the initial requirement of a fast and reliable method [3]. This paper focuses on typical implementation steps and problems in on-line grid impedance estimation for PV inverters. Practical issues are examined and solutions are proposed and tested on an existing PV inverter. Recommendations, guidelines and adopted solutions are also described in this paper sustained by experimental records. II. IMPEDANCE MEASUREMENT TECHNIQUES

Fig. 4.1.1 shows the usual technique for impedance measuring. The measuring device is denoted by “Z”-block and usually, is a separated part of the inverter. The state of the art divides the measuring solutions in two major categories: the passive and the active methods. Passive method uses the non-characteristic signals (line voltages and currents), which are already present in the system [10]. Since this method will depend on the existing background distortion of the voltage this will not be the case for implementing it into a PV inverter. Active methods make use of deliberately “disturbing” the power supply network [11], [12] followed by acquisition and signal processing. The way of “disturbing” the network can vary, therefore active methods are also divided in two major categories: transient methods and steady-state methods.

Inverter

Cg (h)

Rg(h) XLg (h) Vs (h)

Ig(hx) Ii(hx)

Filter

Filter

Ii(h)

Z

Inverter

Grid

Fig. 55. PV-inverter to grid connection with impedance measuring.

Rg(hx) XLg(hx)

Vg(hx)

Grid

Fig. 56. Diagram of converter to grid connection considering non-characteristic harmonic.

Final paper will give a classification of the impedance measuring techniques supported by related references. The technique analyzed in this paper is a steady-state technique that injects a non-characteristic harmonic current into the grid and records the voltage change response. III. PRINCIPLE OF OPERATION

The PV inverter is used directly to inject the harmonic current by adding a harmonic sinus to the voltage reference of the PV inverter. This eliminates the need of building the special block “Z” shown in Fig. 4.1.1. By using the same sensors (denoted by Ig and Vg) as for the control loop, the PV records the time-domain response waveforms. The measurements are processed in a way of Fourier analysis for the specific harmonic used, and finally the injected harmonic voltage and current are obtained. Next relations calculate the line impedance according to Fig. 4.1.3:

101

Z (h) =

(1)

V ( h) I ( h)

Z ( h) =

V ∗ e jϕV = Z ∗ e jϕ Z I ∗ e jϕ I

(2)

where V and I are harmonic voltage and current vectors with respective amplitude of V, I and phase angles of ϕV, ϕI.

The principle of operation takes into account the injecting duration of the harmonic to be restricted, usually around one fundamental period. The injection is repeated in a non-continuous way, so several measurements (algorithm running) are performed in a second. This gives the advantage of allowing other similar PV inverter (ex. multiple inverters together connected in a PV farm) to operate on (to measure) the same grid. IV. EXPERIMENTAL IMPLEMENTATION

Regarding the implementation the proposed method uses next steps: - harmonic current injection into the grid, - measurement of the voltage and current using PV sensors, - Discrete Fourier Transformation (DFT) is performed separately for the current and for the voltage, - finally the harmonic grid impedance value is obtains according to (1) and (2). The implementation structure is depicted in Fig. 4.2.4. Existing PV sensors measure the voltage and current signals. The harmonic injection block makes the grid disturbance. The DFT calculation [13] for harmonic component is given by (3): N −1 N −1  2π * h * n   2π * h * n  Λ h = ∑ v(n) * cos  − j * ∑ v(n) * sin  N N     n =0 n =0

Λ h = λhr + j * λhi

Harmonic Injection

Anti-aliasing Sample&Hold

A/D

(3)

where: N is the number of points/samples per fundamental period v(n) is the input signal (voltage or current) at point n Λh is the complex Fourier vector of the hth harmonic signal λhr, λhi is the real, imaginary part of Λh

Windowing Pre-processing

DFT

Harmonic Voltage Impedance Post-processing

Voltage Signal

U Z= — I

Grid Anti-aliasing Sample&Hold

A/D

Windowing Pre-processing

Internal Logic Tripping &

Display

DFT Harmonic Current

Current Signal

Fig. 57. Implementation structure of grid impedance estimation.

Different implementation approaches were analyzed in order to assure the feasibility and an optimal implementation. Final paper will present in depth comments and guidelines. A summary of the reached conclusions is presented next.

102

Chapter 4 A. The Frequency of the Harmonic Injection The frequency of the harmonic injection is set to 75 Hz as it is not present normally in the grid voltage spectrum. The PV inverter injects the harmonic distortion as a continuous 75 Hz frequency component with the amplitude value of 1 A. The injection is meant to create a periodical distortion to measure the stationary waveform. Then, by recording the current and the voltage,

Fig. 58. Comparison of measured and offline calculated spectrum of the a) grid voltage and b) grid current.

the DFT algorithm is on-line performed for the 75 Hz component. Results are displayed in Fig. 58. Chapter 5 B. Vector vs. Scalar DFT Calculation The reason resides in the required time for DFT operation to be performed. Since the DFT gives the result only after all samples are acquired, the calculation can overload the DSP. To overcome the DSP burden, the proposed idea is to perform the multiplications and summations of DFT terms (3) using a running sum (further referred as scalar approach). The principle is depicted in Fig. 59. A comparison between vector and scalar principles is given in Fig. 4.2..

Cos(n)

Running ∑

+

x

+

Start of a new period Sampling Real part

Storage of n-samples vector

A/D Sampling Sin(n)

x

+

Running ∑

+

Start of a new period

DFT Calculation

Imaginary part

Fig. 59. DFT diagram. Running sum approach.

Updates in running sum

DFT Final Calculation

Fig. 60. Comparison of vector and running-sum approaches.

Chapter 6

Chapter 7 C. Synchronization of the DFT and harmonic injection On a stationary signal the running sums and consequently the result of the DFT are stables. If the implementation is made without further cautions of the injection and DFT calculations, the running sums do not have a stationary behavior. It is practically noticed the running sums will have a

103

continuous change of shapes. The final values of the running sums (which actually represents the imaginary and the real parts of DFT) also are continuously changing in time. This imposes synchronizing to every zero crossing of the grid voltage, of both, the harmonic injection process and the DFT running-sums restart. Chapter 8 D. Non-continuous harmonic injection Another implementation compromise is performing a non-continuous harmonic injection, equivalent to running the injection process only once per several fundamental cycles in order not to increase the current THDi. Moreover a non-continuous operation gives the opportunity other similar PV inverters to measure the grid in a PV farm environment in an asynchronous way. Experiments have revealed the optimum solution. Next section gives in Table I the result of the grid impedance as a function of repetition rate and amplitude. Fig. 61 shows the method of the non-continuous injection. Table I. ENS measurement, UgENS=40, Injection 1/13 ENS Amplitude Repetition Increase in ENS Measurement Measurement of the rate current injection [1/periods] THDi [%] Error [%] Z [Ω ]

3.5 A 3.5 A 1.3 A 1.3 A 0.7 A

1/9 1/14 1/9 1/14 1/14

11 % 4% 4% 2% 1%

1.20 Ω 1.14 Ω 1.17 Ω 1.12 Ω 1.53 Ω

- 0.0 % - 5.0 % - 2.5 % - 6.5 % + 44.5 % Fig. 61. Method of non-continuous injection of the harmonic.

Chapter 9 E. The amplitude of the harmonic injection This section sets the amplitude of the injected disturbance to have reliable measurements and consequently precise impedance estimation. Table II gives values for different amplitudes. Final paper details the experiment and results. Chapter 10 F. The windowing function

Windowing is the process by which the signal used for the Fourier analysis is limited to certain duration, under the assumption of a quasi-stationary nature of this duration, implying infinite periodicity [15]. Choosing the right size and type of the windowing function is of a great importance for the accuracy of the result. There are even international specifications issued [16] for using windowing functions on different application, especially for instrumentation. The challenge is applying this theory in the PV implementation context. After a careful analysis, the overall conclusion is choosing a unity window size of 40 ms corresponding to three 75 Hz periods. Thus, the leakage effect is considerable reduced and the size of the window is acceptable small.

104

Chapter 11 G. The invariance of running sums for the current signal The inverter current depends on the available power in the dc-link side of the PV inverter, which also depends on the ambient solar radiance. Therefore, the grid current signal used for DFT has large variation. This aspect needs a careful attention when assigning the dimension of fix-point variables that could swing between overflow and rounding errors, due to the fix-point limited resolution. A solution of this problem is to supply the DFT with the error signal, instead of the grid current, meaning the difference of the reference and measured current. Thus, the new signal is similar in spectral content as the original signal except the 50 Hz component. This approach gives for the shape of running sums a large degree of invariance with respect to the input power and PV rating. The voltage obviously is not exposed to this issue of dependence of PV rating. Chapter 12 H. Averaging the final result The final result of the grid impedance could not be practically obtained without the influence of errors. Permanent and random errors are usual issues in such environment [3]. A very convenient way of alleviating the random errors is by considering the noise having normal distribution. Thus, a simple average or a low pass filter solves the random error problem [16]. V. EXPERIMENTAL RESULTS

Experimental results were obtained using the method described above and all proposed solutions. The impedance estimation (ENS) implementation was made on a 3 kW existing PV inverter. The PV uses for control algorithm a TMS 320F24x DSP with a built in A/D device. The performance of A/D acquisition device is 10-bit resolution and 1 µs conversion time. An anti-aliasing filters is used with a cut-off frequency of 1.6 kHz and a 350 µs delay in the control loop. Current and voltage were sampled at 8.5 kHz sampling rate. To resume all conclusions reached in § IV, Table II provides a summary. Stationary values of impedance measurement have been showed in § IV. This section is giving the dynamics of the estimation method. Fig. 62 shows the setup of the experiment. A supplementary resistor Rtest can be connected in series with the grid Further tests have been performed replacing the Rtest with an inductance of different values.

105

Harmonic Injection

Rtest = 0.5 Ω XLg = 0.03 Ω Rg = 1.2 Ω

PV inverter

Vo ltage Sensor

Current Sensor Oscilloscope Synchronization

Grid

Source voltage 220V / 50Hz

Fig. 62. Experimental setup diagram for testing the grid impedance change.

Table II. Final values and settings used in the PV implementation. Frequency of the injection Amplitude of the injection Repetition rate Windowing function Windowing size Type of DFT Average of the results

75 [Hz] 1.3 [A] 1/14 Unity 40 [ms] Running-sum 8 samples (app. 3sec)

Fig. 63. Dynamic response of the ENS method detecting 0.5 Ω impedance increase.

The experiment depicted in Fig. 63 shows good impedance estimation within the required time of 5 seconds, complying with ENS standards. More experiments will be given in the final paper.

VI. CONCLUSIONS

This paper presents the implementation of an on-line method of grid impedance estimation for PV inverters. The main focus has been on describing the implementation issues and adopted solutions. The principle of non-characteristic harmonic current injection can provide the impedance estimation. However, the implementation is not an easy task, especially on a non-dedicated product like PV inverter. This paper proves that the encountered issues can be overcome and minimized by a careful design and study. Finally, it leads, that such approach is validated by real measurements.

106

REFERENCES [1]

European Standard EN 50330-1, Photovoltaic semiconductor converters Part 1: Utility interactive fail safe protective interface for PVline commutated converters, 1999

[2]

L. Asiminoaei, R. Teodorescu, F. Blaabjerg, U. Borup, “A new method of on-line grid impedance estimation for PV inverters”, APEC Conference 2004, unpublished.

[3]

Z. Staroszczyk, “Problems in real-time wide band identification of power systems” Proc. Of IEEE Instrumentation and Measurement Technology Conference, 1998, Vol. 2, pp. 779 –784.

[4]

M.B. Harris, A.W. Kelley, J.P. Rhode, M.E. Baran, “Instrumentation for measurement of line impedance”, Proc. On Applied Power Electronics Conference, 1994, Vol.2. pp. 887 –893.

[5]

J.P. Rhode, A.W. Kelley, M.E. Baran, “Complete characterization of utilization-voltage power system impedance using wideband measurement” Proc. On ICPS Conference, 1996, pp. 123 –130.

[6]

J.P. Rhode, A.W. Kelley, M.E. Baran, “Complete characterization of utilization-voltage power system impedance using wideband measurement” IEEE Trans. On Industry Applications, Vol. 33 No: 6, 1997, pp. 1472 –1479.

[8]

B. Palethorpe, M. Sumner, D.W.P. Thomas, “System impedance measurement for use with active filter control” Proc. on Power Electronics and Variable Speed Drives, 2000. (IEE Conf. Publ. No. 475), pp. 24 –28.

[7]

L.S. Czarnecki, Z. Staroszczyk, “On-line measurement of equivalent parameters of distribution system and its load for harmonic frequencies” Proc. Of IEEE Instrumentation and Measurement Technology Conference, 1995. IMTC/95, 1995 pp. 692-698.

[9]

Z. Staroszczyk, A. Josko, “Real-time power system linear model identification: instrumentation and algorithms” Proc. Instrumentation and Measurement Technology Conf., 2000, Vol. 2, pp. 897 –901.

[10] K.O.H. Pedersen, A.H. Nielsen, N.K. Poulsen, “Short-circuit impedance measurement” IEE Proc. Gener., Transm. And Distrib., Vol. 150 Issue: 2 , pp. 169 –174. [11] B. Palethorpe, M. Sumner, D.W.P. Thomas, “Power system impedance measurement using a power electronic converter” Proc. On Harmonics and Quality of Power, 2000, Vol. 1, pp. 208 –213. [12] K. Matsui, N. Ishigure, F. Ueda, “On-line impedance meter to measure the impedance of a distribution line using inverter” Proc. Of IECON ’01. Vol. 2, pp. 1230 –1236. [13] U. Borup , “Design and control of a ground power unit“ Ph.D. dissertation, Aalborg University, Institute of Energy Technology, 2000, ISBN 87-89179-36-6. [14] N. Ishigure, K. Matsui, F. Ueda, “Development of an on-line impedance meter to measure the impedance of a distribution line” Industrial Electronics, 2001. Proc. ISIE ‚01, Vol. 1 , pp. 549 –554. [15] J. Arrillaga, N.R. Watson, S. Chen, “Power system quality assessment”, ISBN 0-471-98865-0. [16] IEC 61000-4-7, “Electromagnetic compatibility (EMC) – Part 4-7: testing and measurement techniques – General guide on harmonics and interharmonics measurement and instrumentation, for power supply systems and equipment connected thereto”, Second Edition, 2002.

107

A New Method of On-line Grid Impedance Estimation for PV Inverter Lucian Asiminoaei, Remus Teodorescu, Frede Blaabjerg,

Uffe Borup,

Institute of Energy Technology, Aalborg University, DK-9220, Aalborg SE, Denmark. [email protected], [email protected], [email protected]

PowerLynx A/S, Ellegaardvej 36, DK-6400, Sonderborg, Denmark. [email protected]

installations calls for new and better power quality requirements with respect to connection to the grid supply. Therefore, different methods are typically used for continuous grid monitoring, usually by using external devices. In this paper a new method for on-line measuring the grid impedance is presented. The presented method requires no extra hardware being accommodated by typical PV inverters, sensors and CPU, to provide a fast and low cost approach of on-line impedance measurement. By injecting a non-characteristic harmonic current and measuring the voltage grid response it is possible to evaluate the grid impedance. Practical test on an existing PV inverter validate the new method. Keywords – power system monitoring; grid impedance measurement; Discrete Fourier Transform; fixed point arithmetic; digital signal processors. I. INTRODUCTION In the last ten years the PV development has increased the number of connected systems to the grid. Besides all electrical regulations such systems must also meet certain countryspecific technical recommendations, especially when connecting into dispersed power generating networks. The European standard EN50330-1 (draft) [1] describes the ENS (the German abbreviation of Main monitoring units with allocated Switching Devices) requirement, setting the utility fail safe protective interface for the PV converters. The goal is to isolate the supply within 5 seconds after an impedance change of Z = 0.5 Ω. The main impedance is typically detected by means of tracking and step change evaluation. Unfortunately, even grid impedance measuring is well treated in the literature [2]-[7], not always the methods can easily be embedded into a non-dedicated platform, i.e. PV inverters. Thus, specific limitations like real-time computation, A/D conversion accuracy, fixed point numerical limitation, etc., make some techniques not suitable for fast and reliable measurement [6]. Therefore, the goal in this paper is to develop of a fast and simple method for line impedance

estimation to comply with standards limitations when using it into an existing DSP controlled PV inverter. This paper focuses on a new on-line grid impedance measurement as a way to determine the health degree of the grid. The paper proposes a method where the grid impedance can be estimated using the existing PV-inverter sensors and logical control. This approach provides a fast and low cost solution to meet the required standards. By implementing the presented methods it is possible to estimate, at any instant, the power supply line impedance. Estimation of the grid impedance using two different numerical methods are also explained and compared against experimental results. State of the art concerning impedance measurement technique is also described providing the background of chosen methods. II. LINE IMPEDANCE MEASUREMENT Different techniques can be used for line impedance measurements. It is noticeable that, usually these methods are using special hardware devices. Once the inputs are acquired by voltage and current measurement, the processing part follows, typically involving large mathematical calculations in order to obtain the impedance value. Fig. 1 shows the usual technique for impedance measuring. The dedicated measuring device is denoted by "Z"-block and is normally a separated part of the inverter. Rg and Lg are resistive and inductive part of the grid, while Vs represents the ideal source supply. The capacitive part of the model, which are coming from consumer side, is denoted by Cg. The "h" argument of the components shows the model dependency on the harmonic order.

Ii(h)

Filter

Abstract – The recent increase in photo-voltaic (PV)

PV-Inverter

Cg (h)

Rg(h) XLg (h) Vs (h)

Z

Grid

Fig. 1. Diagram of the PV-inverter with filter connection to grid with impedance measuring.

109

The passive method is using the non-characteristic harmonics (line voltages and currents) that are already present in the system. This method depends on the existing background distortion of the voltage [8] and, in numerous cases, the distortion does have neither the amplitude nor the repetition rate to be properly measured. This will not be the case for implementing it into a PV inverter. Active methods make use of deliberately "disturbing" the power supply network followed by acquisition and signal processing. The way of "disturbing" the network can vary, therefore active methods are also divided into two major categories: transient methods and steady-state methods, as described in the following. A. Transient active methods It is worth to mention that the transient methods are well suited for obtaining fast results, due to the limited time of the disturbing effect on the network. Shortly, by this technique the "Z" device generates a transient current into the network (e.g. a resistive short-circuit), and then measures the grid voltage and current at two different time instants, before and after the impulse occurrence. The impulse will bring in a large harmonic spectrum that afterwards should be analyzed. The results obtained show the network response over a large frequency domain, making this method well suited in applications where the impedance must be known at different frequencies. However, this method must involve high performance in A/D acquisition devices and also must use special numerical techniques to eliminate noise and random errors [9]. These requirements are difficult to be achieved on a nondedicated harmonic analyzer platform like a PV inverter even if DSP control is used. B. Steady-state active methods Steady-state methods inject a known and typically periodically distortion into the grid and then make the analyses into the steady state period. One technique proposes solution like development of a dedicated inverter topology [10] and by measuring the phase difference between supply and inverter voltage to compute the line impedance. Another technique easy to be implemented [11], repetitively connects a capacitive load to the network and measures the difference in phase shift of the voltage to the current. The technique proposed in this paper is a steady-state technique that injects a non-characteristic harmonic current into the network and records the voltage change response. Results are processed by means of a Fourier analyses at the particular injected harmonic. In this way the method has the entire control of the injected current and the computation resumes only to be specific Fourier terms for obtaining the final result. It is worth to mention that this technique can be

110

used to obtain the frequency characteristic of the grid, if the method repeats the measurements at different frequencies [4].

III. PRINCIPLE OF OPERATION The challenge is to measure the impedance when the system is energized, loaded and furthermore, the grid-connected PV inverter is supplying active power to the grid. As shown in Fig. 1 also characteristic harmonics (denoted by "h" argument) have to be taken into account. That leads to the idea of analyzing the grid as a complex structure characterized by its harmonic components. This model is further depicted in Fig. 2, by decomposing the complex model into individual frequency plans. Vs(h) stands for the grid voltage harmonic dependency. It includes both the background distortion of the grid and of the harmonic distortion generated by consumers. h=1

Ii(h)

Filter

The state of the art divides the measuring solutions into two major categories: the passive and the active methods.

PV-Inverter

X C g(h)

Rg(h) XLg (h) Vs (h)

h=3 h=5 h=3h+1

Grid

Fig. 2. Decomposition of complex harmonic model of the grid into multiple models of the characteristic harmonics using superimposing effect.

It is clear to see, according to Fig. 2, that using a characteristic harmonic current for injection produces a major impact in processing the measured voltage and current. One solution is to measure the background distortion previous to the harmonic injection then using this information as a subtracting part from the real measurements. Since this approach requires much DSP processing power and memory, the real implementation will have to avoid such an alternative. To facilitate the algorithms, a non-characteristic harmonic current is used instead of the injected disturbance. The network model with respect to non-characteristic harmonic (referred to as hx) is depicted in Fig. 3. Compared to Fig. 2 it is clear that Vs(hx) has a value of zero if it is assumed that the respective harmonic is not present in the network. A further assumption such as the injected harmonic can be of low frequency, enables to eliminate the parallel capacitor of which the effect is negligible at low frequency.

Ig(h x)

Filter

Ii(h x)

R g(h x) X Lg(h x)

V g(h x)

Grid

PV-Inverter

Fig. 3. Diagram of converter to grid connection considering non-characteristic harmonic. The principle of operation proposed in this paper is to inject the non-characteristic harmonic current into the grid using the PV inverter. It is worth mentioning that the final implementation is made with an interharmonic but the harmonic is referred further as a non-characteristic harmonic to give this principle a general approach. The PV inverter is used directly to inject the harmonic current by adding a harmonic voltage to the voltage reference of the PV inverter. This eliminates the need of building the special block "Z" shown in Fig. 1. By using the same sensors (denoted by Ig and Vg) as for the control loop, the PV records the time-domain response waveforms. The measurements are processed in a way of Fourier analysis for the specific harmonic used, and finally the injected harmonic voltage and current are obtained. Next relations easily calculate the grid impedance as: V ( h) (1) Z (h) = I ( h)

V ⋅ e jϕV = Z ⋅ e jϕ Z Z ( h) = I ⋅ e jϕ I Z ( h) = R g + j ⋅ ω h ⋅ L g

(2)

(3) where: Rg and Lg (referring to Fig. 3) denote the resistive and inductive part of the grid; ωh and ϕh represents the frequency respective the phase angle of the injected harmonic. Since the main target is to obtain the grid impedance at the fundamental frequency further processing must be done. Eq. (4) gives the value of the grid impedance at the frequency of 50 Hz, by a simple mathematical substitution of the injected harmonic with the fundamental frequency. Z (50 Hz ) = Rg + j ⋅ ω 50 ⋅ Lg (4) An alternative of (4) is the assumption that the injected frequency can be closer to the fundamental frequency; therefore the calculated impedances for those frequencies have almost similar values. Also, a correction factor based on a grid characteristic can be implemented for saving processing time. However, since usually there is no prior information where the PV inverter will operate, implementing such a grid correction factor turns out to be more likely a case to case practice, embedded into the final PV product.

The principle of operation also takes into account the injection duration of the harmonic to be limited, usually a multiple of the fundamental period. The injection is periodically repeated in a way that multiple results (running algorithm) that enable to average the impedance within the required duration of 5 seconds [1]. In this way random errors due to noise and A/D flickering can be minimized. Moreover, decreasing the duration of the harmonic injection, will limit the total current harmonic distortion. Even this approach add some complexity, the implementation has the advantage of allowing other similar PV inverter (ex. multiple inverters together connected in a PV farm) to operate on (to measure) the same grid. An inverter uses certain duration for the measurement process then waits to repeat the algorithm. During this interval any other similar PV inverter can measure the grid impedance. However, choosing the right values for the amplitude, duration of the harmonic injection and repetition interval is not easy and experiments can provide helpful information in this way. IV. IMPLEMENTATION Regarding the implementation, there are two techniques under consideration: • Using single harmonic injection (referred to as SH injection), then performing the Discrete Fourier Transformation (DFT) amplitude and phase calculation and finally having the grid impedance at the harmonic according to (2), (3) and (4). • Using two harmonic injections (referred to as TH injection), then performing only the DFT amplitude calculation. A. Single harmonic (SH) injection The PV injects the harmonic into the grid and measures the response of the injection using the current and voltage sensors. The signals are further derived in the way of DFT analysis and finally the amplitude and phase are obtained. The Discrete Fourier Transformation uses (5) for coefficients calculation [12] of the voltage and current harmonic. N −1 N −1 (5)  2π ⋅ h ⋅ n   2π ⋅ h ⋅ n  Λ h = ∑ v(n) ⋅ cos  n =0

N

 − j ⋅ ∑ v (n) ⋅ sin    n =0

N

 

Λ h = λhr + j ⋅ λhi where: N is the number of samples per fundamental period; v(n) is the input signal (voltage or current) at point n; Λh is the complex Fourier vector of the hth harmonic of the input signal; λhr is the real part of Λh; λhi is the imaginary part of Λh. The Simulink model of the DFT algorithm using (5) is shown in Fig. 4. The approach is referred as vector approach due to the vector-type mathematical operation (all samples are stored

111

into vectors and only after the last sample is acquired, the algorithm is performed).

Start of a new period Sampling

Cos harmonic n-samples vector

A/D Sampl ing





Dot Product

Start of a new period

Real part

Storage of n-samples vector

Input n -samples vector





Dot Product

samples are acquired and also large memory space for sample storage.

DFT Calculation

(a)

Imaginary part

Sin h armonic n-samples vector

Fig. 4. Vector approach to calculate Discrete Fourier Transformation (DFT). Both harmonic current and voltage are calculated this way, and then by using (2) the grid impedance value is obtained with respect to the frequency of the injected harmonic. One last step should be performed to translate the grid impedance value obtained for this frequency into the grid impedance value for 50 Hz. The frequency of the injected harmonic is chosen 75 Hz This is close to 50 Hz frequency and is estimated that the results of the impedance are also close; therefore this translation is not necessary. All presented guidelines are sufficient for obtaining the value of the grid impedance. However, in the context of using the SH method into the DSP control, further aspects must be studied. One aspect resides in the computing time required for DFT operation to be performed. Since the DFT can only be calculated after all samples are acquired, the calculation can overload the DSP. It is estimated that using the implementation shown in Fig. 4 (referred as a vector technique) the DSP will require much time performing the final calculation. This will need a multi-tasking programming technique specially developed for impedance calculation. This approach is to be avoided since one of the project goals was to embed the impedance estimation routine into the DSP in the easiest way and without requiring extra resources. To overcome this limitation the next proposed idea is to perform the multiplications and summations of DFT terms (5) using a running sum. The principle is depicted in Fig. 5.

Cos(n)

Running ∑

+

x

+

x

+

Running ∑

+

Real part

A/D Sampling Sin(n)

Imaginary part

Fig. 5. Running sum approach to calculate Discrete Fourier Transform (DFT).

Fig. 6 gives a comparison of the principles. It can be seen that vector technique involves much calculation time once the

112

Updates in running sum

DFT Final Calculation

(b)

Fig. 6. Comparison of the DFT calculation approaches a) vector approach, b) running-sum approache. The SH injection method finally proves to give promising results with respect to the DSP burden and result accuracy, therefore it is highly considered in the final implementation. B. Two harmonics (TH) injection The TH injection is explained as simultaneously injecting two harmonics followed by DFT amplitude analyses for those two particular injected harmonics. This approach provides an alternative of being involved with phase angle calculation, which could be difficult to implement if the DSP operates in fixed-point numerical format. It is also worth to mention that TH injection can be used when both Rg and Lg need to be known. Thus, by computing the grid impedance in two different points (meaning two different injected harmonics) the grid parameters are calculated by solving following set of equations. (6) Z 1 2 = R g 2 + ω1 2 ⋅ L g 2  2 2 2 2 Z 2 = R g + ω 2 ⋅ Lg Z1 − Z 2 ω12 − ω 2 2

(7)

ω12 Z 2 2 − ω 2 2 Z12 ω1 2 − ω 2 2

(8)

2

Lg = Rg =

2

where: ω1, ω2 denote injected harmonic frequencies; Z1, Z2 are the impedances calculated on ω1, ω2; Rg, Lg are grid resistance and inductance. From the mathematical point of view this method gives the result of the grid impedance (and in addition the resistive and inductive part), but simulations and further studies have not validated this method. If the interval between the chosen frequencies is too small then calculation of (7) and (8) can fall into numerical problems, especially with fixed-point DSP. On the opposite, if the interval is larger then the higher chosen frequency can be near a grid resonance, which again negatively affects the final result. Therefore, TH injection can be seen as a fair theoretical approach in the way of grid impedance estimation.

Vg(h)=∑V

Harmonic current injection

Fundamental Voltage

+

Background distortion

+

Z(h)

Harmonic Impedance Model Ig(h)=∑I 1 Z(h)

Grid Voltage Measurement Grid Current Measurement

+

Harmonic Impedance Model

Fig. 7. Complex harmonic simulation model of the grid to validate the technique. Z (h) = Z (h1 ) + Z (h2 ) + Z (h3 ) + ... + Z (hk )

(9) Z (hk ) = R g + j ⋅ ω k ⋅ L g (10) where: hk stands for different relevant harmonic frequencies; Rg and Lg are the resistive and inductive grid parts. A simple simulation with grid values of Rg=1 Ω and Lg=0.1 mH is made, considering the described grid model and SH injection method. The results are relatively precise if stationary conditions of the grid exist. Furthermore, the technique is simulated into a more realistic case using the PV model, which includes non-ideal models of A/D-acquisitioning devices, numerical filters, internal control loop, PWM modulator, anti-aliasing filters, etc. The grid parameters are identically set to Rg=1 Ω and Lg=0.1 mH. The simulation also considers intermittent injection of the harmonic as explained in § III. Fig. 8 shows the time domain waveforms of the impedance estimation, injected harmonic current and PV grid current. The harmonic current is 1.5 A RMS of 75 Hz frequency, with an injection duration of 40 ms (two complete fundamental cycles). The distortion effect of the injection can be seen on the PV grid current. It is worth to note, such distortion effect is not desired for the normal operation of the inverter due to the increase of current THD factor, therefore the non-continuous injection of the harmonic is beneficial. Fig. 8 presents such approach, showing a burst of 3 harmonic injections. A real PV

Impedance estimation evolution

Grid Impedance [Ω]

Simulations proposed are used to investigate and to assure the correctness of the techniques. The validation uses the SH injection techniques on a grid model depicted in Fig. 7. This diagram includes separate blocks for fundamental voltages and for the background harmonics on the grid. The SH injection is made by the harmonic current injection block. "Z(h)" blocks depict the complex harmonic model of the grid impedance. The complex frequency impedance model is divided into individual frequency models according to (9) and (10).

Estimated value of the grid impedance

Update moments

Real value of the grid impedance

(a) Harmonic Current [A]

V. SIMULATION

implementation considers similar approach but with a longer duration between bursts, minimizing the distortion effect. As noticed, the grid impedance result is obtained only after the last moment of the injection, because the DFT requires a complete set of samples. Therefore, the results are available only when update instants occur. The impedance results initially gave a 20% deviation from the real value. The error appeared because of an internal delay from the voltage anti-aliasing filter. This delay has a significant impact on the angle calculation, leading to incorrect inductance estimation. If the additional phase shift due to anti-aliasing filter is taken into account then the estimation is improving.

Injected Harmonic

1.5

0.75 0

-0.75 -1.5

PV Grid Current [A]

Initially, the TH method gain attention because of obtaining the values of Rg and Lg, but the drawbacks mentioned, encountered later in simulation and experimental phase, conclude for the first method, SH injection.

(b) PV grid Current

Distortion effect

(c)

Time [s]

Fig. 8. Simulation results using the SH injection method a) grid impedance estimation, b) injected harmonic, c) PV grid current.

The first result of the grid impedance is also affected by errors due to the transient effect on the grid current when the simulation starts. Even this value is not considered, it gives a clue about the influence of the current transients in estimation accuracy. Since these kinds of situations are expected in real operation further care should be paid. It can be noticed that even the results were very precise in the first (ideal) simulation, the model will not give the same precision when it is used in the context of a real case. Simulations have concluded that the grid impedance estimation can be embedded into the PV control algorithm and a careful design provides suitable results. VI. EXPERIMENTAL RESULTS Experimental results were obtained using the SH injection method and running-sum technique. The impedance estimation implementation was made on a 3 kW existing single phase PV inverter. The PV uses for control algorithm a TMS 320F24x (fixed point) DSP with a built-in A/D device. The performance of A/D acquisition device is 10-bit

113

resolution and 1 µs conversion time. The anti-aliasing filters used have a cut-off frequency of 1.6 kHz and introduce in a 350 µs delay in the voltage acquisition. Current and voltage were sampled at 8.5 kHz sampling rate. The diagram in Fig. 9 of the PV-inverter depicts the inverter structure where the grid impedance estimation is implemented. The diagram also shows the DC-DC converter connecting the photovoltaic cells to the dc-link bus and a computer that allows software development and communication with the DSP board. Inverter

dc-link

Current

Grid connection

DC-DC converter

Voltage

Control

75 Hz injection

Impedance estimation

DSP board

&

PWM

Protections

Software development and download

Tripping

PV cells

LCD Display

Fig. 9. System diagram of the PV-inverter with implementation of the grid impedance estimation.

Previous to the experiments, the local network has been manually measured using a UNILAP100 grid tester. The measured data are presented in Table I.

A comparative picture of the PV current with and without harmonic injection is shown in Fig. 10 for a power of 1.9 kW. The difference in the waveforms is relatively small since the injected harmonic has a small amplitude. More relevant information can be obtained if Fourier analysis is performed on both currents in Fig. 10. The spectrum data are displayed in Fig. 11 for both situations, with and without injection. One can note that fundamental components are higher than displayed but Fig. 11 focus on the harmonics. It is also worth noting that the spectrum analysis is performed on the signals given in Fig. 10, which is the case that is similar as infinitely repeating these waveforms. In real operation due to the non-continuous injection operation, the 75 Hz distortions, created on the current and voltage, are significant smaller than those presented. The results show the 75 Hz harmonic voltage and current with amplitude values of 1.91 V respective 1.5 A. This gives a total grid impedance of 1.27 Ω, measured at a frequency of 75 Hz. Translation into the 50 Hz domain requires phase angle calculation for harmonic voltage and current. Even the DFT provides also the phase angle, this is not implemented into algorithm, because of the DSP numerical issues. However, the estimated value of 1.27 Ω is very close to the measured value of 1.2 Ω at 50 Hz.

TABLE I. Manual measured grid parameters with UNILAP100 instrument. Utility voltage Utility frequency Grid impedance

220 [V] 50 [Hz] 1.2 [Ω]

The experiments have been done with the PV inverter supplying 3 kW into the grid. For measuring the grid quality performance, a VOLTECH PM100 instrument has been used and the results are shown in Table II. TABLE II. Measurements of output current and background distortion with PV power of 3 kW. Current

I1 I3 I5 I7 I9 I11 I13 THDi

Measured RMS Value 12.9 A 4.4 % 3.0 % 2.5 % 1.8 % 1.3 % 0.6 % 7.0 %

Voltage

V1 V3 V5 V7 V9 V11 V13 THDv

Measured RMS Value 237 V 0.30 % 0.90 % 0.80 % 0.20 % 0.14 % 0.03 % 1.3 %

The frequency used for harmonic injection is 75 Hz. The harmonic current has an amplitude of 1.5 A and is the result of adding a component of 75 Hz to the inverter voltage reference. The injection process starts simultaneously with the fundamental period.

114

Fig. 10. Time-domain comparison of grid current with and without 1.5 A harmonic injection. The PV power is 1.9 kW.

Fig. 12. Method of the non-continuous injection of the harmonic into the grid.

Fig. 11. Comparison of spectra with and without harmonic injection. a) Grid voltage. b) Grid current. The PV power is 3 kW. However, the implementation of the method requires a careful approach due to the process of non-continuous injection. Fig. 12 presents the PV grid current. Besides indication of the duration of the harmonic injection, the ratio of repetition is depicted as well. One can note the repetition rate is 1/14; meaning one injection is performed every 14 fundamental cycles. This ratio was experimentally chosen based on the following criteria. The injection should not be too often performed, since it will excessively increase the current THD. On the other hand, the injection should not be too rarely performed either, since it will not give the chance to efficiently filter the results, which consequently means an increase in estimation error. Table III gives such dependence on the repetition rate of the injection process. The ratio of 1/14 was experimentally considered as a good balance. Further tests are performed for assessing the estimation stability. Fig. 13 shows the impedance estimation evolution when the PV current is changing The PV current is gradually increased by changing the internal current reference in the PV inverter.

TABLE III. Current THD and measurement error dependence on the repetition rate of the injection process. The real grid impedance is 1.2 Ω. Repetition rate [1/periods] 1/1 1/9 1/14

Increase in current THDi [%] 6% 4% 2%

Impedance Measurement Z [Ω] 1.27 Ω 1.17 Ω 1.12 Ω

Measurement Error [%]

+ 5.8 % - 2.5 % - 6.5 %

The internal result of the impedance is available for reading on a filtered PWM analogue output from the DSP. This explains the high frequency ripple and spikes on the presented impedance waveform. The scale setting for the impedance display is 1 V corresponding to 1 Ω. The experiments show the impedance estimation is fairly stable as the PV current is changing. Slight variations around the mean value are however noticed. For that reason, postprocessing the result is necessary to eliminate random errors and A/D flickering. A convenient way to solve these issues is by using a low pass filter or a moving average. Implementing an average filter with a period of 3 seconds concludes a medium 10 % error in the grid impedance estimation. A value that is considered satisfactory for complying ENS requirements. VII. CONCLUSIONS This paper presents a new on-line method of grid impedance estimation. The main focus has been on using a steady-state intrusive method for the grid impedance estimation. Injecting a non-characteristic harmonic current into the grid and measuring the voltage response can estimate the grid impedance. In a context of practical use into a PV inverter, this method has the advantages of low cost and easy implementation with existing hardware.

115

The paper reveals the issues of implementing the proposed method into a DSP program. Finally, the approach is validated by real measurements and it works well with an accuracy of less than 10%.

Vol. 150, No. 2, 2003, pp. 169 -174. [9]

B. Palethorpe, M. Sumner, D.W.P. Thomas, "Power system impedance measurement using a power electronic converter", Proc. on Harmonics and Quality of Power, 2000, Vol. 1, pp. 208 -213.

[10] N. Ishigure, K. Matsui, F. Ueda, "Development of an on-line impedance meter to measure the impedance of a distribution line", Proc. of ISIE '01, 2001, Vol. 1, pp. 549 -554. [11] K. Klaus-Wilhelm, "Process and device for impedance measuring in AC networks as well as process and device for prevention of separate networks", Deutsches Patentamt, Patentschrift DE19504271 C1/1996. [12] U. Borup, "Design and control of a ground power unit", Ph.D. dissertation, Aalborg University, Institute of Energy Technology, 2000, ISBN 87-89179-36-6. [13] B. Palethorpe, M. Sumner, D.W.P. Thomas, "System impedance measurement for use with active filter control", Proc. on Power Electronics and Variable Speed Drives, 2000. No. 475, pp. 24 -28. [14] K. Matsui, N. Ishigure, F. Ueda, "On-line impedance meter to measure the impedance of a distribution line using inverter", Proc. of IECON '01. Vol. 2, 2001, pp. 1230 -1236.

Fig. 13. Impedance estimation when the PV current is changing from P=0.3 kW to P=3 kW (scale factor is 1 V corresponding to 1 Ω).

ACKNOWLEDGMENT The authors want to acknowledge the financial support of PSO-Eltra contract 4524 and the Danish Technical Research Council contract 2058-03-0003. REFERENCES [1]

European Standard EN 50330-1, Photovoltaic semiconductor converters Part 1: Utility interactive fail safe protective interface for PV-line commutated converters - Design qualification and type aprooval, 1999.

[2]

M.B. Harris, A.W. Kelley, J.P. Rhode, M.E. Baran, "Instrumentation for measurement of line impedance", Proc. of APEC'94, 1994, Vol.2. pp. 887 -893.

[3]

J.P. Rhode, A.W. Kelley, M.E. Baran, "Complete characterization of utilization-voltage power system impedance using wideband measurement", Proc. on ICPS Conference, 1996, pp. 123 -130.

[4]

J.P. Rhode, A.W. Kelley, M.E. Baran, "Complete characterization of utilization-voltage power system impedance using wideband measurement", IEEE Trans. on Industry Applications, Vol. 33, No. 6, 1997, pp. 1472 -1479.

[5]

L.S. Czarnecki, Z. Staroszczyk, "On-line measurement of equivalent parameters of distribution system and its load for harmonic frequencies", Proc. of IEEE Instrumentation and Measurement Technology Conference, IMTC/95, 1995 pp. 692-698.

[6]

Z. Staroszczyk, "Problems in real-time wide band identification of power systems", Proc. of IEEE Instrumentation and Measurement Technology Conference, 1998, Vol. 2, pp. 779 -784.

[7]

Z. Staroszczyk, A. Josko, "Real-time power system linear model identification: instrumentation and algorithms", Proc. of Instrumentation and Measurement Technology Conf., 2000, Vol. 2, pp. 897 -901.

[8]

K.O.H. Pedersen, A.H. Nielsen, N.K. Poulsen, "Short-circuit impedance measurement", IEE Proc. Gener., Transm. and Distrib.,

116