1
Novel Harmonic Identification Algorithm based on Fourier Correlation and Moving Average Filtering ´ Francisco D. Freijedo∗ , Member IEEE, Jes´us Doval-Gandoy∗ , Member IEEE, Oscar L´opez∗ , Member IEEE, ∗ ∗ Carlos M. Pe˜nalver , Member IEEE, Andr´es Nogueiras , Member IEEE, Enrique Acha† , Senior Member IEEE ∗ Department of Electronic Technology, University of Vigo. ETSII Campus Universitario, Vigo, 36200, SPAIN. Emails: {fdfrei,jdoval,olopez,penalver,aaugusto}@uvigo.es † Department of Electronics & Electrical Engineering, University of Glasgow, Glasgow, G12 8LT, Scotland, U.K. Email:
[email protected]
Abstract — With the aim to minimize the harmonic disturbances created by non linear loads, the active power filters have an important role in the improvement of power quality. Active filters need to identify the harmonic components of some specific system currents/voltages to calculate the filter current/voltage references and thus set the power devices switching to compensate for the harmonics. Therefore, the accuracy and quickness in the harmonic identification of the input signals have a very important role in the active filters control performance. This work presents a novel digital algorithm for harmonic identification based on Fourier correlation in quadrature and moving average filtering (MVA). The input signal has harmonic component at well known odd frequencies, and it can be expressed as a Fourier series. Therefore, by multiplying independently two orthogonal unitary signals rotating at a known frequency by the input signal, the output signals have the Fourier coefficients of this frequency shifted to dc and the other coefficients shifted to even harmonics. Then by placing a low pass filter after each multiplier, the dc coefficients are obtained. This correlation method has the problem of a relatively high gain of the employed low pass filters for the lowest order even harmonics. However, by replacing the low pass filter by a MVA comb filter with no dc delay and even harmonics cancellation, the searched coefficient can be obtained accurately and with only the computation and A/D converter delay, which can be neglected for low frequencies applications (50 Hz or 60 Hz the fundamental frequency). It is important to note that the outputs of the multipliers have only even harmonics, so the window width of the MVA can be reduced to half a cycle of the input fundamental signal, reducing the needed resources with respect to Fourier Transform based algorithms, which need an entire cycle window. The performance of the proposed identification method for harmonic identification and for active filtering is demonstrated with experimental results.
I. I NTRODUCTION The proliferation of equipment with switching non-linear loads is at the origin of the ac current distribution network pollution and the reactive power demand. These non-linear loads draw non-sinusoidal currents from the utility, causing interference with the near sensitive loads and limit the utilization of the available electrical supply. The quality of the electrical current thus becomes a significant concern for the distributors of energy and their customers [1].
1-4244-1298-6/07/$25.00 ©2007 IEEE.
Different mitigation solutions have been proposed and used involving passive filters, active filters and hybrid active-passive filters. Currently, due to the technological advance in switching devices, DSPs, FPGAs, numerical algorithms and digital control techniques, active filters have become more efficient than passive filters. Therefore, there is an increased interest to develop and use better active filtering solutions. One of the key parts for a proper implementation of an active filter is to use a good method for identifying the system harmonics [2]. The harmonic identification methods can be classied as time domain based and frequency domain based [2]. Moreover they can also be classified depending on the application as singlephase or three-phase methods [3] [4]. Of course the singlephase methods can be used in three phase systems applying the algorithm in each phase, or only in one if the three-phase system is balanced. In this paper a new single-phase and frequency-domain based harmonic identification method is proposed. The main idea is to obtain a known frequency component of the input wave as a function of two random orthogonal waves oscillating at the same known frequency too. By multiplying independently two orthogonal unitary signals rotating at a known frequency (axis) by the input signal, which has a fundamental component and odd harmonics, the output signals have the axis frequency Fourier coefficients shifted to dc and the other coefficients shifted to even harmonics. Then, to filter the even harmonics a moving average comb filter (MVA) is used. This MVA filter is tuned to have a gain of 2 (3 dBs) without phase delay for dc, and to cancel all the even harmonics. The MVA cancels completely the lowest order even harmonics and has a quick transient response improving the performance of a typical low pass filter. Moving average filtering has been use for the Recursive Discrete Fourier Transform (RDFT) calculation in [5], being the width of the MVA a cycle of the fundamental component (50 Hz or 60 Hz). However the width of the MVA of this work is half a cycle of the fundamental, because of the first frequency component to cancel after the multiplier is twice the fundamental component of the input (100 Hz or 120 Hz). It is very important this reduction in the width of the MVA window because of the needed
2
memory resources are reduced, and the time of response after a transient is the width of the MVA (10 ms or 8.3 ms). A summary of the main features of the proposed algorithm are: • It obtains the searched harmonic component recursively and in real time with almost no delay. The delay is only given by the A/D converters and computation time delay which can be neglecting for low frequency applications. • It is always stable since it is an open loop structure and the system response is independent of the amplitude of the input wave. Moreover it does not need tuning closed loop filters. • System faults are easily detectable and the time of response under transient is constant. The system spends half a cycle of the fundamental component, the width of the MVA window, to adapt completely itself to the new input. This enhances very much the performance with respect to low pass filter based algorithms. Respect to time based algorithms as PLL [6] the transient response is very much quicker under strong faults like deep sags, or big phase jumps, but penalizes a bit for small faults, although the adaptation is very smooth. • FPGA and DSP implementations are easy and do not require much resources. II. BASIC O PERATION The proposed method explanation is shown for an identification of a fundamental component of 50 Hz. The extraction of another harmonic can be easily deduced from the fundamental component identification. Being Vin the input wave with multiple harmonic components (Fig. 1(b)), the aim of the system is to know its fundamental component, Vin 1 . Vin 1 is a wave rotating at a known, or almost known, frequency (ω1 ), hence it can be expressed as a sum of two waves rotating at the same frequency. Then by choosing two arbitrary, orthogonal and unitary amplitude waves of frequency ω1 as axis, Vin 1 can be → − represented in a rotating reference frame as the V in 1 vector (Fig. 1(a)). The scheme of the system algorithm yielding to → − a V in 1 reconstruction, and hence to a phase and amplitude measure is depicted in Fig. 1(b) and detailed in the next subsections. A. Axis generation To generate the axis the sine (Xaxis ) and cosine (Yaxis ) algorithms are applied to a random sawtooth signal between −π and π of fundamental frequency (ω1 t + θo ). Considering the frequency of the input signal with a maximum deviation of 1 Hz the performance of the system is good, since the change → − of V in 1 in the reference frame is slow. The maximum phase error measured in stationary state with a 51 Hz input signal for axis frequency of 50 Hz is about 3 deg. The performance of the fixed frequency axis algorithm can be improved by adapting the frequency of the sawtooth signal by means of a zero crossing algorithm. However, the frequency of the axis should be limited in the range [49,51] Hz, and it should not be updated during transients.
B. Averaging process The input wave can have multiple harmonics, and can be expressed as a Fourier series. Vin = [A1 sin(ω1 t + θi 1 ) + A3 sin(3ω1 t + θi 3 )+ + A5 sin(5ω1 t + θi 5 ) + A7 sin(7ω1 t + θi 7 ) + ...]
(1)
To filter the non-fundamental components from the input signal the next process is done. The input wave is multiplied by the two axis signals, yielding the following results: 1 [A1 cos(θi 1 − θo )+ 2 A1 cos(2ω1 t + θi 1 + θo ) + A3 cos(2ω1 t + θi 3 − θo )+ A3 cos(4ω1 t + θi 3 + θo ) + A5 cos(4ω1 t + θi 5 − θo ) + ...] (2) Vin
× sin(ω1 t + θo ) =
1 [A1 sin(θi 1 − θo )+ 2 A1 sin(2ω1 t + θi 1 + θo ) + A3 sin(2ω1 t + θi 3 − θo )+ A3 sin(4ω1 t + θi 3 + θo ) + A5 sin(4ω1 t + θi 5 − θo ) + ...] (3) Vin
× cos(ω1 t + θo ) =
As it can be seen in (2) and (3) the outputs of the multipliers have a dc signal proportional to A1 and even harmonic components. To eliminate these harmonic components a moving average comb filter (MVA) is put after each multiplier. The main features of the implemented MVA are its zero gain for harmonic frequencies of its fundamental (ω1( mva ) ), and its double gain (3 dBs) without phase delay for dc. Being ωs the sample time of the filter, and n = ωs /ω1( mva ) the transfer function of the filter is. H(z) =
2 1 − z− n 1 − z−
n 1
(4)
To eliminate the harmonic components of (2) and (3) ω1( mva ) = 2ω1 is chosen. The Fig.2(a) depicts the frequency response of the MVA for f1( mva ) = ω1( mv a ) /2π = 100Hz; it can be seen the low gain at harmonic frequencies, and the double gain at dc. The Fig.2(b) shows the step response of the MVA; it is important to note that the MVA needs only half a cycle of ω1 (n samples) to adapt itself to the new input, and hence to establish the system speed of response to a transient. C. Reconstructing the input fundamental component To reconstruct the fundamental component of the input frequency, the output of each MVA filter is multiplied by → − → − its correspondent axis, yielding to V in 1 x and V in 1 y in the Fig. 1(a). Then, as in a phasor diagram, the addition of the → − two vector is the reconstructed signal of V in 1 . D. Phase-angle and frequency measure → − The phase of V in 1 is function of the sin axis, the angle → − → − between V in 1 and the sin axis (β), and the quadrant of V in 1 (Fig. 1(a)). β value is:
3
vin1y
Y
x 1
vin cos(w1t+qo)
x
sin()
Vin1x
x +
F(dc,w2,w4,w6...)
vin
w1
b sin(w1t+qo)
vin1x
X
x
cos()
w1t+qo
MVA
Vin1y
vin1
x
y
(a) Axis diagram. Fig. 1.
MVA
(b) General scheme.
Block diagrams of the algorithm. MVA Step Response (f1=100Hz; fs=10kHz) 2.5
2
Amplitude
1.5
1
0.5
0 0
(a) MVA frequency response. Fig. 2.
20
40
60
80
100 120 n (samples)
140
160
180
200
(b) MVA step response.
MVA filter features.
π |Vin 1 y | β= (5) 2 |Vin 1 x | + |Vin 1 y | → − The quadrant (Qi) of V in 1 in Fig. 1(a) is determined by Vin 1 x and Vin 1 y signs. For a digital implementation the next variables are defined: ⎧ ⎪ Q1, Q4. ⎨0 1 Q1, Q3. (6) b= ;a = 1 Q2. ⎪ −1 Q2, Q4. ⎩ −1 Q3. → − Then, the phase of V in 1 (θin 1 ) is expressed as: θin
1
= (ω1 t + θo ) +aπ + bβ X
(7)
axis
The frequency measure is the time derivative of θin
1.
is function of Vin
|Vin 1 | = Vin 2 1 x + Vin 2 1 y 1
1x
and Vin
1y
III. E XPERIMENTAL RESULTS In order to show the performance of the identification algorithm, it has been implemented in a fast prototyping platform dSpace DS1103, which contains a microprocessor, a DSP and an I/O interface. This platform uses Matlab/Simulink for its models. Moreover an active filter with the control algorithm implemented in the dSpace platform has been built to show the feasibility of the algorithm for active filtering. A. Identification algorithm implementation
E. Amplitude measure and fault detection The amplitude of Vin
The magnitude of the fundamental voltage vector can be used to detect grid faults. When there is a transient in the input, |Vin 1 | presents harmonic components during half a cycle. Moreover, if the transient has an amplitude change (sag or swell), |Vin 1 | presents during this half a cycle the sum of a step response due to the DC change and harmonic components.
. (8)
The algorithm of Fig. 1(b) have been programmed in Matlab/Simulink and implemented in the dSpace platform, working at a 10 Khz sampling frequency. The average computation time per iteration is 6 µs and the 12 bit A/D converter input delay 2 µs, so the real phase delay of the output is
4 System response for a 0.5 p.u. sag with a 45 deg. phase jump. 1 0.8 0.6
Amplitude (p.u.)
0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 0.12
Fig. 3.
0.13
0.14
0.15 Time (s)
0.16
0.17
0.18
(a) Input signal (bold), reconstructed input signal (dashed).
Identification algorithm features in steady state.
Phase error during a 0.5 p.u. sag. with a 45 deg. phase jump.
B. Active filtering implementation To show the feasibility of the algorithm for active filtering, a laboratory prototype of active filter has been built. The active filter control containing the identification algorithm has been implemented in the dSpace platform. Fig 5 shows the hardware circuit and the scheme of the control. The active filter is composed of a single phase IGBT voltage source inverter (VSI) connected in parallel to the load. The scheme also depicts an uncontrolled rectifier with inductive and resistive load as non-linear load; indeed it represents the multiple loads connected to the grid at any time. The control of the VSI is implemented in the dSpace platform which uses the load current (il ) and filter current (if ) for setting the IGBT switching times. The if and il measures have been done with Hall effect transducers, and their values have been adapted
40 30 20 10 0 -10 0.145
0.15
0.155 Time (s)
0.16
0.165
Amplitude measure during a 0.5 p.u. sag. with a 45 deg. phase jump. 1
Amplitude (p.u.)
around 0.15 deg., a 0.04 %. The number of samples of each MVA window are 100 (10 Khz/100 Hz). The experimental results for steady state are shown in Fig. 3. The input of the system is a 50 Hz square signal (CH1), which has a very high harmonic presence, being its RMS value 5 V. Programmed the algorithm to obtain the input fundamental component, the output reconstructed signal is shown in CH2. Its RMS value is 4.5 V, that is a 90% of the square wave, which corresponds with the theoretical value. Signal M3 shows the subtraction of the input square signal and its fundamental component, that is, the adding of the harmonics components, which will be used as reference for the implemented active filter of the next subsection. CH3 depicts the fundamental component phase measure, applying the algorithm of section II-D. Another interesting result is to shown the time of adapting after a transient (Fig. 4). As it has been mentioned before, the width of the MVA window sets the quickness in this transient response. To show this, a deep voltage sag with a 45 deg. phase jump has been programmed to appear at the input. This result is obtained with Matlab/Simulink simulation, and there is only a fundamental component of 50 Hz in the input signal. Fig. 4 shows that the settling time is exactly the same as the width of the MVA, 10 ms.
Phase error (deg.)
50
0.75
0.5 0.145
0.15
0.155 Time (s)
0.16
0.165
(b) Phase error and amplitude measure. Fig. 4.
System response for a transient.
to voltage values, so they could be connected to the dSpace interface. The table I shows the values of the implemented prototype. TABLE I VALUES OF THE PROTOTYPE COMPONENTS . Supply phase voltage Load resistance Load inductance Load inductance Active filter inductance Inverter dc-link nominal voltage Inverter switching frequency
Vs = 230V rms, 50Hz. R1 = 15Ω. L1 = 80mH. L2 = 24mH. Lf = 5mH. Vcd = 500V. fs = 20kHz.
The active filter control scheme is depicted in Fig. 5(b). The harmonics current reference (if ∗) to compensate is obtained by subtracting the load fundamental component (il 1 ) obtained using the identification algorithm with il as input. if ∗ is the current that the active filter must draw in order to compensate for the harmonics in the source current. Therefore the error signal given by if - if ∗ is controlled with a PI filter. The PI bandwidth limits the ability of this kind of active filters, to compensate for high order harmonics. The output of the PI controller is the modulation index of the PWM block. Unipolar
5
Fundamental (50Hz) = 12.32 , THD= 18.08% Is
Ls
PCC
L2
IL
L1
Vs R1 IF
Non linear load
Mag (% of Fundamental)
100 80 60 40 20
LF
0
0
200
400 600 Frequency (Hz)
800
1000
(a) Harmonic composition of source current without active filter. Active Filter
Fundamental (50Hz) = 12.21 , THD= 5.18% 100
IF +
IL
Fundamental component identification
IL1
+
IFh* PI current controller & PWM modullator
(b) Simplified implemented control algorithm. Fig. 5.
Laboratory prototype diagrams.
Mag (% of Fundamental)
(a) Active filter circuit.
80 60 40 20 0
0
200
400 600 Frequency (Hz)
800
1000
(b) Harmonic composition of Source current with active filter. Fig. 7. Effect of the active filter in the source current harmonic composition.
IV.
CONCLUSIONS
A novel harmonic identification algorithm based on Fourier correlation and moving average filtering has been proposed in this paper. The very high performance of the algorithm has been demonstrated both to steady state and to transient response with experimental results. Moreover an active filter laboratory prototype with the algorithm implemented in the control has been made and its feasibility has also been demonstrated with experimental results. Fig. 6.
Active filter currents. (10 A/Div)
V.
ACKNOWLEDGEMENTS
This work was supported by the Spanish Ministry of Education and Science under the project number ENE2006-02930. switching pattern is employed for generating the pulses of the VSI. Each VSI branch is controlled independently. Fig. 6 shows the prototype currents in steady state. CH1 shows the load current (il ) with a high presence of harmonics. CH2 depicts the filter current (if ) which compensate the greater part of the il harmonics. CH3 depicts the source current (is ) which is almost sinusoidal, and therefore it has a low amount of harmonics. Fig.7 shows the is harmonic composition with the active filter and without the active filter. It can be shown as the total is THD is reduced from 18% to 5%. It is important to note that the third harmonic appears since it is a single phase load. It is reduced from a 16 % of the fundamental to a 4 %.
R EFERENCES [1] E. Acha and M. Madrigal, Power Systems Harmonics, J. Willey, Ed. Jonh Willey & Sons, Ltd, 2001. [2] L. Asiminoaei, F. Blaabjerg, and S. Hansen, “Evaluation of harmonic detection methods for active power filter applications.” in Proceedings of APEC, 2005. [3] R. Alcaraz, E. J. Bueno, S. Cobreces, F. J. Rodriguez, C. Giron, and M. Liserre, “Comparison of voltage harmonic identification methods for single-phase systems,” in Proceedings of IECON, 2006. [4] R. Alcaraz, E. Bueno, M. Liserre, S. Cobreces, F. Rodriguez, and F. Huerta, “Comparison of voltage harmonic identification algorithms for three-phase systems,” in Proceedings of IECON, 2006. [5] S. Srianthumrong and S. Sangwongwanich, “An active power filter with harmonic detection method based on recursive dft.” in Proceedings of Harmonics and Quality of Power., 1998.
6
[6] F. D. Freijedo, J. Doval-Gandoy, O. Lopez, D. Pineiro, C. MartinezPenalver, and A. Nogueiras., “Real-time implementation of a spll for facts.” in Proceedings of IECON, 2006.
Francisco D. Freijedo (M’07) was born in Spain in 1978. He received the M.Sc degree in Physics from the University of Santiago de Compostela in 2002. Since 2003, he is pursuing the Ph.D. degree with the Department of Electronic Technology of the University of Vigo. Since 2005, he is an assistant professor of the same University. His research interests include Power Quality problems, grid connected switching converters, AC power conversion and FACTS.
´ Doval-Gandoy (M’99) received the M. Sc. degree from Polytechnic Jesus University of Madrid in 1991 and the Ph. D. degree from the University of Vigo, Vigo, Spain in 1999. From 1991 to 1994, he worked at industry. He is currently an Associate Professor at the University of Vigo. His research interests are in the areas of AC power conversion.
´ Oscar L´opez (M’05) was born in Spain in 1975. He received the M. Sc. degree from University of Vigo in 2001. Since 2004, he is pursuing the Ph.D. degree with the Department of Electronic Technology of the University of Vigo. He is currently an Assistant Professor of the same University. His research interest are in the areas of power switching converters technology.
˜ Carlos M. Penalver (M’92) was born in Spain in 1950. He received the M.Sc and Ph.D. degrees in electrical engineering from the Universidad Politcnica de Madrid in 1977 and 1982, respectively. He was an Associate Professor at the same university (1977/1983), Professor at the Universidad de Santiago (1984/1988), and full Professor at the Universidad de Oviedo (1989). He has been full Professor at the Universidad de Vigo since 1990. His research interest are in the areas of power switching converters technology, FACTS, active power filters and electrical machine drives.
Andres Nogueiras (M99) was born in Rosario, Argentina, 1967. He graduated in industrial engineering degree and received the Ph.D. cum laude degree in industrial engineering from the University of Vigo, Vigo, Spain in 1994 and 2003, respectively. He has been an research assistant at the Applied Electronics Institute Pedro Barrie de la Maza in 1994 and, since 1995, he has been an Assistant Professor in the Electronic Technology Department of the University of Vigo. His currents research interests are power electronics systems, switched converters non linear modelling, applied RAMS technologies and teaching power electronics through internet.
Enrique Acha (SM’02) was born in Mxico. He graduated from Universidad Michoacana de San Nicols de Hidalgo, Morelia, Michoacn, Mxico in 1979 and obtained his PhD degree from University of Canterbury, Christchurch, New Zealand in 1988. He was a postdoctoral Fellow at the University of Toronto, Toronto, ON, Canada, and the University of Durham, Durham, England. He has written three text books on various aspects of power electronic applications in electrical power systems and over one hundred research papers. He is the Professor of Electrical Power Systems at the University of Glasgow, Glasgow, Scotland. He is an IEEE PES Distinguished Lecturer.