Alex Hoppus
Alex Hoppus

Reputation: 3935

Filtering spectrum using FIR filters

If i have signal values x[T] and filter coefficients b[i], i can perform filtering using convolution. enter image description here

Suppose i have spectrum of x (after FFT) and i need to perform filtering using filters coefficients, how can i perform this? I heard that in frequency domain it will be multiplying, rather than convolution (time domain). But i can't find an equation to use it. I have 614000 values in y = fft(x[T]) vector and 119 filter coefficients (generated using fdatool), i can't multiply them directly ... Thanks.

Upvotes: 0

Views: 774

Answers (2)

hotpaw2
hotpaw2

Reputation: 70673

You will need the spectrum of a zero-padded signal values x and the FFT of a zero-padded (to the same length) FIR filter kernel b in order to do fast-convolution by multiplication. Otherwise, without zero-padding you will end up doing circular convolution instead of linear convolution.

For long data vectors and relatively short FIR filter kernels, and to avoid needing really long FFTs and IFFTs for such, you might want to look into overlap-add or overlap-save fast convolution algorithms.

Upvotes: 3

ypnos
ypnos

Reputation: 52317

You need to transform your filter to frequency domain as well. Then in frequency domain you can use element-wise multiplication.

http://en.wikipedia.org/wiki/Convolution_theorem

Upvotes: 1

Related Questions