Harmonic Identification Methods Based on Moving. Average Filters for Active Power Filters. Francisco D. Freijedo, Jesus Doval-Gandoy, Oscar Lopez and ...
Harmonic Identification Methods Based on Moving Average Filters for Active Power Filters Francisco D. Freijedo, Jesus Doval-Gandoy, Oscar Lopez and Jacobo Cabaleiro Department of Electronic Technology, University of Vigo, ETSEI, Campus Universitario de Vigo, 36200, Spain. Email:{fdfrei,jdoval,olopez}@uvigo.es
Abstract—Harmonic detection is very important in the control of Active Power Filters (APFs). This paper presents a technique for harmonic identification, based on moving average filters (MVAs) and heterodyning, very suitable for digital implementation. The approach of fundamental component identification is contributed both for single-phase and three-phase voltage/current systems. Selective harmonic identification is also feasible. Due to the rapid step-response, good harmonic/noise cancellation of MVAs, and good frequency adaptation of the proposed algorithms, they have a very good performance compared with other alternatives. Experimental results of digital implementation in a rapid prototyping platform (dSpace DS1103), including an APF prototype are contributed proving the theoretical approaches. Details and experimental results of FPGA implementation, a clear trend in the field of digital control, are also contributed. Index Terms—Active Filters, Digital control, Harmonic Analysis, Heterodyning, PWM converters, Signal processing.
I. I NTRODUCTION The proliferation of equipment with switching non-linear loads is an important factor responsible for 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]. Different mitigation solutions have been proposed and used, involving passive filters, active power filters (APFs) 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 increasing interest to develop and use better active filtering solutions, specially feedforward controlled APFs [2]–[6]. One of the key parts for a proper implementation of a feedforward controlled active power filter is to use a good method for identifying the system harmonics and therefore to supply a good reference to the controller block [7]. This paper presents novel identification algorithms for single-phase and three-phase systems very suitable for digital implementation. The key of the algorithms is the implementation of Moving Average Filters (MVAs). MVAs are well suited for cancellation at harmonic frequencies due to their regular frequency response and rapid transient (step) response. The delay through the filters is compensated with predictive filters
as explained in section III-A, so even though the proposed systems are open loop, they achieve frequency adaptation. The frequency adaptive feature is an important advantage with respect to other algorithms such as Fast Fourier Transform, Discrete Fourier Transform, Kalman filters, Adaptive Filters, etc working in an open loop manner. In order to improve the performance of such algorithms it has been proposed the use of phase locked loops (PLL) or other closedloop algorithms resulting in hybrid systems [4], [8]–[10] with good adaptation but complex dynamics. Moreover, the PLL dynamics is dependent from the input amplitude, which also could complicate the tuning [11]. The dynamics of the proposed system is independent from the input amplitudes because it is a pure open loop algorithm. The filtering process based on MVAs has a better cancellation versus transient response tradeoff than systems using typical IIR filters, such as the proposals of [12]–[14]. The filtering limitations appear at specific conditions such as interhamonics. The MVA filters which set the filtering and transient responses of the whole system. The single-phase algorithm for identifying the fundamental component of the input wave works as follows: the main idea is to obtain the fundamental component as a function of two random phase unitary orthogonal sinusoidal waves oscillating at the same frequency. These two Fourier coefficients are obtained by heterodyning and filtering through MVAs. Once the Fourier coefficients and the axis waves are know, the fundamental component of the input signal can be reconstructed in real time. The extension of the algorithm to three-phase systems can be made by means of Park transformations; two random orthogonal unitary waves and two MVAs are employed as well. After filtering the direct and quadrature components, the fundamental positive-sequence can be reconstructed by means of the inverse of the Park transformation matrix. These algorithms can be easily extended to higher order harmonics identification; the internally generated random waves must oscillate at the desired harmonic frequency and then the selected harmonic Fourier coefficients (or Park variables) are moved to dc; then MVA filters are used. A section is dedicated to FPGA implementation. Thanks to their ever-increasing integration and development capacities FPGAs are becoming a very suitable alternative to DSP in digital control [15], [16]. The algorithm for fundamental
978-1-4244-2279-1/08/$25.00 © 2008 IEEE
1
S
Z1n
2·LPF
ix1
X
f (dc,2Z1n ,4Z1n ,6Z1n ,...)
X
cos(u) yˆ
2·LPF
i y1
Ȉ
& i1
X
(a) IdMVA1 scheme.
i1y
Y
i1
K Ts
Integrator
omega
[random_Cos]
b sin(w1nt+qR)
[random_Sin]
-2*pi*50
i1x
X
& ia & ib & ic
K Ts z-1
(c) Digital oscillator algorithm. IdMVA1 figures.
LPF
[Tdq]
LPF
id 1
iq1 [T ]-1 dq
& ia1 & i &b1 ic1
Z1nt T R
S
Z1n
Integrator
-omega
w1n
Fig. 1.
(1)
2*pi*50
z-1
(b) Axis diagram.
The scheme of the single-phase algorithm, named IdMVA1, is depicted in Fig. 1(a). It is expected that the input wave (iin ) rotates at the nominal frequency (ω1n = 2π50 rad/s) and has multiple harmonic components; the aim of the identification algorithm is to know its fundamental component (i1 ).
³
S
A5 sin(5ω1n t + θ5 ) + A7 sin(7ω1n t + θ7 ) + ...
Random phase generation
θi being constant offset values. i1 can be expressed as a function of two arbitrary orthogonal waves rotating at ω1n : i1 = |i1x | sin(ω1n t + θR ) + |i1y | cos(ω1n t + θR )
X
& i
xˆ
Random phase generation
A. Single-phase: identification of the fundamental component
i1
sin(u)
Z1nt T R
II. BACKGROUND
iin = A1 sin(ω1n t + θ1 ) +A3 sin(3ω1n t + θ3 )+
³S
cos(w1nt+qR)
component identification in a single-phase signal has been implemented in the Xilinx Spartan 3E device. A fixed point pipeline and VHDL description has been used. Experimental results from FPGA and prototyping platform (dSpace DS1103) implementations prove the high performance of the theoretical approaches. A prototype of single-phase shunt APF has also been implemented, using the dSpace platform for the control. The current reference is obtained by subtracting the fundamental component from the whole load current. This control algorithm is very simple (there is not dc link control loop). Its goal is to show the feasibility and high performance of the proposed algorithms.
(2)
θR being an unknow constant offset value. Through the generation of two arbitrary, orthogonal and unitary amplitude waves i1 can be represented in a rotating reference frame as → − the i 1 vector (Fig. 1(b)). In this paper, sin(ω1n t + θR ) and cos(ω1n t + θR ) are generated through the digital implementation of the model of an analog RC oscillator; this algorithm is very suitable both for DSPs and FPGAs. Fig. 1(c) depicts the Matlab/Simulink model of the proposed digital oscillator which generates two unitary random orthogonal waves. As seen, there are not inputs; the integrators are saturated to ±0.99 and one of them must have an initial stored value different from zero. This diagram, once implemented, is very low resource consuming and the generated waves have a very low total harmonic distortion (THD). (0.70% when implemented at a sampling frequency (fs ) of 10 kHz.) The input wave is multiplied by these two axis signals results in: 1 [A1 cos(θ1 − θR )+ 2 A1 cos(2ω1n t + θ1 + θR ) + A3 cos(2ω1n t + θ3 − θR )+ A3 cos(4ω1n t + θ3 + θR ) + A5 cos(4ω1n t + θ5 − θR ) + ...], (3)
Fig. 2.
Block diagram of IdMVA3.
and 1 [A1 sin(θ1 − θR )+ 2 A1 sin(2ω1n t + θ1 + θR ) + A3 sin(2ω1n t + θ3 − θR )+ A3 sin(4ω1n t + θ3 + θR ) + A5 sin(4ω1n t + θ5 − θR ) + ...] (4) iin × cos(ω1n t + θR ) =
As seen in (3) and (4), the outputs of the multipliers have a DC component proportional to A1 and even harmonic components. Therefore, low pass filters (LPF) can be used to decouple |i1x | and |i1y |. The output of each LPF block is multiplied by its corresponding axis wave, resulting in i1 (eq. (2)). B. Extension to three-phase systems (IdMVA3) Any unbalanced component of a three-phase system of voltages/currents can be expressed as the sum of a positive, a negative and a homopolar sequence [17]. Through Tdq ,the Park transformation matrix for the positive sequence oscillating at ω1n with arbitrary offset, the fundamental positive sequence components can be ”moved” to DC.
iin × sin(ω1n t + θR ) =
Tdq
sin(ω1n t + θR ) 2 sin(ω1n t + θR − 2π = 3 ) 3 sin(ω1n t + θR + 2π 3 )
cos(ω1n t + θR ) cos(ω1n t + θR − 2π 3 ) 2π cos(ω1n t + θR + 3 ) (5)
2
C. Identification of higher harmonic components Selective harmonic compensation makes APFs versatile for compensation of reactive power, harmonic currents and imbalance in source currents and their combinations, depending upon the limited rating of the APF [18], [19]. The approaches of IdMVAs are valid for higher harmonics identification by using the selected frequency to generate the axis waves. The key idea is to shift the desired Fourier coefficients (or Park variables) toward DC (heterodyning).
Phase (deg)
Magnitude (abs)
1 0.8 0.6 0.4 0.2
0 0 -45 -90 -135
-180 0
50
100
150
200
250
300
350
400
450
500
Frequency (Hz)
550
(a) H(z) frequency response. 1
Amplitude
The oscillator of Fig. 1(c) and simple trigonometric rules are used to generate Tdq . The input waves are multiplied by the Tdq matrix resulting in the Park variables id and iq . They are filtered through LPFs, canceling all the harmonic components and the second harmonic due to the negativesequence, giving rise to DC values (id1 and iq1 ). By means of the inverse of Tdq , the fundamental component positivesequence is reconstructed. The negative sequence can be obtained in the same manner by using − sin(ω1n t+θR ) instead of sin(ω1n t + θR ).
0.8
0.6
0.4
0.2
III. M OVING AVERAGE F ILTERS AS LPF
A. Compensating for the MVA delay with predictive filters: frequency adaptation feature In section II, eq. (1), the actual input frequency (ω1 ) has been considered constant and nominal (ω1n ). However, the input frequency could oscillate in a wide range around the nominal (±2 Hz, or even more) [21]. This leads to an average steady-state phase error in the reconstruction process: θerror = (ω1 − ω1n ) · tdelay
(7)
tdelay being the delay induced by the low pass filters. MVAs have linear-phase. Linear-phase is a feature of FIR filters for which the coefficients are symmetrical around the center coefficient [22]. Linear phase results in a constant time delay for any input frequency. The time of delay for frequencies below 100 Hz of H(z) is 0.005 s [22]: θerror ≈ +(−)1.8 deg for an input signal oscillating at 51 Hz (49 Hz). In this subsection a refinement of the filtering process is proposed. Through predictive filters, with transfer function P (z), linked to each MVA this error can be cancelated. As
0.002
0.004
0.006
0.008
Time (sec)
0.01
0.012
0.014
(b) H(z) step response. Fig. 3.
MVA filter responses. fs = 10 kHz and n = 100.
1.005
Magnitude (abs)
1 1 − z −n (6) H(z) = n 1 − z −1 Fig.3(a) depicts the frequency response of H(z). Fig.3(b) shows the step response of the MVA; the transient time lasts n samples (half a fundamental cycle).
00
1.004 1.003 1.002 1.001
1 6
Phase (deg)
In this paper the use of moving average filters (MVA) as LPF is proposed. fs = 10 kHz has been chosen taking into account the tradeoff between accuracy and using of resources. The main features of MVAs are its zero gain for multiples its fundamental frequency (ω1mva ), and its unitary gain without phase delay for DC [20]. In order to cancel the even harmonics n = 2πfs /ω1mva = 100 has been chosen. The transfer function of the MVA (H(z)) is:
4
2
0 0
Fig. 4.
0.5
1
1.5
2
2.5
Frequency (Hz)
3
P (z) frequency response at low frequencies.
fs = 10 kHz is considered, the number of samples of delay through the MVA filters is n2 = tdelay /fs = 50. Assuming 2π it is correct to approximated the trajectory that td