# How to compute DFT of IIR

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.

• 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? – robert bristow-johnson Sep 23 '15 at 23:06
• stream in blocks, WOLA'd – panthyon Sep 23 '15 at 23:07
• 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). – robert bristow-johnson Sep 23 '15 at 23:10
• 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. – panthyon Sep 23 '15 at 23:27
• 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. – hotpaw2 Sep 24 '15 at 18:17