Digital Signal Processing Reference
In-Depth Information
( r
j
)
2. Select N samples of data ( j = 1 to N ), for the r th filtering round
where N is also the FFT length, usually a power of 2, L is the filter
order, using
x
(
r
)
x
=
x
r
=
1
2
,
=
j
1
2
,
N
(2.13)
j
j
+
(
r
1
)(
N
L
)
3. Perform an N -point FFT on
( r
j
)
.
4. Carry out a term by term multiplication of X ω , j and H ω , j for j = 1 to N .
5. Perform an N -point inverse FFT on results of 4 to obtain filtered
result,
x
creating X
( r
j
)
y
( j = 1 to N ) for the r th round, using the real part of the
IFFT if
x
are real.
j
6.
Discard the last L data points from each successive cycle of filtering
in 5.
7.
Append the remaining N
L filtered data points to the previous set of
results, y ( r
1) . Repeat steps 2 to 7 until data exhausted.
8.
Shift all elements in total data set, y by L /2 forward in time to align
with original data.
The procedure given above could be set in pseudocode as shown in Figure 2.13.
The implementation could take on several forms. For example, the method of
updating the samples could be via a routine designed to read an interface and pass
a predetermined set of values to the filter procedure. The output yout , could be
saved directly to disk by appending to existing stored data, or displayed in real
time. In Matlab
, a second technique known as the overlap-add technique is
achieved via
y = fftfilt(h,x,N) (2.14)
where the symbols are as used above. It should be noted that if the filter order is
less than about 45, the direct or time domain method is more efficient, whereas for
larger orders, the frequency domain approach is preferred. The optimum FFT
length N for frequency domain convolution is given in Table 2.1, bearing in mind
that below about 45 the time domain approach is more efficient [6].
Table 2.1
Optimum FFT Lengths
Filter Order, L
Optimum FFT Length, N
18-29
128
30-52
256
53-94
512
95-171
1024
311-575
2048
Search WWH ::




Custom Search