Filtering in Frequency Domain

advertisement

Filtering in Frequency Domain - Better or worse?

Samantha R. Summerson

4 November, 2009

1 Filtering in Frequency Domain

y ( n ) =

X a k y ( n − k ) +

X b m x ( n − m )

If a k

= 0, the filter is IIR, meaning that the time duration of h ( n ) is infinite. If a k

= 0 for all k , then the filter is FIR, meaning that the time duration is less than infinity. Suppose we wish to filter a signal in the frequency domain, i.e. use the transforms of functions to perform filtering.

x ( n ) ↔ X ( e j 2 πf

)

Y ( e j 2 πf

) = H ( e j 2 πf

) X ( e j 2 πf

)

Y ( e j 2 πf

) ↔ y ( n )

In order to perform filtering in the frequency domain, we need explicit formulas for the DTFTs. We generally don’t have this, we need to use the DFT.

First, we assume that the input is of finite duration N x

, which is a reasonable assumption as it is impossible to create a signal of infinite duration.

x ( n ) ↔ X ( k )

Y ( k ) = H ( k ) X ( k )

Y ( k ) ↔ y ( n )

How do you pick the length of the DFT for h ( n )? Suppose h ( n ) is FIR and has duration N h

. From last class, we know that the length of the output will N = N x

+ N h

− 1. Thus, we take length N x ( n ) and h ( n ), padding each of the signals with zeros to make them the appropriate length.

DFTs for both

2 Filtering in Time or Frequency?

We have two methods for filtering: filtering in time and filtering in frequency. Which method has higher computational complexity? For a FIR filter, we have a difference equation of the form y ( n ) =

X b m x ( n − m ) .

m

The values for lenght N h b m define our filter, so the number of b m

. Then we require 2 N h terms is the length of our filter. Suppose

− 1 operations for output and the length of the output is N h

+ h (

N n x

) has

− 1, meaning that the total number of operations required is

( N h

+ N x

− 1)(2 N h

− 1) .

To filter in the frequency domain, we need to compute DFTs. This requires operations. Additionally, to multiply two DFTs together, we need 6( N x

+ N h

N x

+ N h

2

− 1 log( N x

+ N h

− 1)

− 1) operations. Finally, to do

1

the inverse DFT we again need

N x

+ N h

2

− 1 for filtering in the frequency domain is log( N x

+ N h

− 1) operations. Thus, the total number of operations

( N x

+ N h

− 1) log( N x

+ N h

− 1) + 6( N x

+ N h

− 1) .

For really small lengths for N x and N h filtering in the time domain requires less operations, but in general computation for filtering in the frequency domain is orders of magnitude less.

2

Download