1
$\begingroup$

This question pertains to frequency domain filtering. I'd like to multiply an IIR filter's frequency response by a buffer of samples that have been FFT'd. I get how I'd evaluate an FIR, I'd FFT and zero-pad it (is this assumption correct?).

For an IIR would I just evaluate the impulse response of the IIR for a sequence 1 followed by N zeros where N is the length of the FFT, and then FFT that impulse response. Is this the right approach? Don't want to go too far down the rabbit hole without catching any caveats beforehand.

$\endgroup$
  • $\begingroup$ the method of using the FFT to do filtering is most often called "fast convolution". you would have to approximate the IIR with an FIR. is this a stream of samples or are you processing a finite file of samples? $\endgroup$ – robert bristow-johnson Sep 23 '15 at 23:06
  • $\begingroup$ stream in blocks, WOLA'd $\endgroup$ – panthyon Sep 23 '15 at 23:07
  • $\begingroup$ okay, so then why do you want to accomplish the job of an IIR filter using the FFT? just IIR-ing it would be cheaper, and i think, easier to code. fast convolution is, comparatively, a mess. do you just want to process everything in the frequency domain with an existing WOLA engine? the WOLA that's in a, say, vocoder is different from the WOLA of fast convolution. the window in the latter can be rectangular (doesn't need to be, but you still have to satisfy $N \le B + L-1$ where $N$ is the FFT size, $B$ the windowed-block length, $L$ is the FIR length). $\endgroup$ – robert bristow-johnson Sep 23 '15 at 23:10
  • $\begingroup$ perhaps its not an IIR i want after all then. i have a set of criteria in the frequency domain that will be met or not from block to block. depending on that threshold, ive got a number of filters i'd want to use, but this number varies from block to block. it seems unnecessary to just create new filters while running each block, so i figured i'd take care of it in the frequency domain. but an fft'd FIR would accomplish that. i might be going about this problem the wrong way and a filterbank might work better. thanks for the insight. $\endgroup$ – panthyon Sep 23 '15 at 23:27
  • 1
    $\begingroup$ This condition is due to the fact that multiplication of finite length FFTs is equivalent to circular convolution, e.g. the filter response will wrap around from the back to the front (contaminating the future) of the signal if the data isn't sufficiently zero-padded before the FFT. Worse than just clicks. $\endgroup$ – hotpaw2 Sep 24 '15 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.