To further summarize, I want to create a function in matlab that finds the time domain signal $y(n)$ and its $n$ time components ($n=0,1,2,...$) given the numerator and denominator of a transfer function (filter) and the input sequence. I want to know if you can use the DFT and circular convolution to convolve $H(\omega)$ and $X(\omega)$ if the former is an IIR filter (there's a feedback).

  • $\begingroup$ Can you please edit the question for clarity? The series of operations mentioned in the post is not entirely clear and a few steps could be considered redundant. Would it be possible to describe what exactly are you trying to achieve? $\endgroup$
    – A_A
    Nov 27 '16 at 14:00
  • $\begingroup$ Done. Sorry for being a bit confusing. $\endgroup$ Nov 27 '16 at 14:27
  • $\begingroup$ If you have the transfer function and the input sequence, if the filter is LTI, what is the issue here? You just have to convolve the two sequences. $\endgroup$
    – Tendero
    Nov 27 '16 at 14:38
  • $\begingroup$ The catch is that I want the process to be done in the frequency domain, not in the time domain itself. So what should I do after using fourier transform on both the H(z) and x(n)? $\endgroup$ Nov 27 '16 at 14:44
  • $\begingroup$ Thank you. There already is such a function in MATLAB. Can I please ask if this is some kind of homework where you have been asked to "emulate" the way that function operates? $\endgroup$
    – A_A
    Nov 27 '16 at 14:55

You can't apply an IIR filter in the frequency domain, at least not without some approximation. As the name implies, the impulse response of an IIR filter is of infinite length which also means that you need infinitely high resolution in the frequency domain. Any DFT based implementation would require a finite frequency resolution, otherwise your FFT length becomes infinite.

Choosing a finite FFT length is the equivalent to truncating the impulse response.

In practice, of course, you can always come up with a good-enough approximation that's close enough to meet your specific requirements. Most IIRs have exponential decay so it dies off pretty fast. However, why would you? In terms of computational efficiency, memory consumption and latency, a direct IIR implementation will almost always beat any frequency domain algorithm by a wide margin. What's the problem you are trying to solve ?

  • $\begingroup$ Oh that's a clear explanation. Thank you. What I'm trying to solve is how can you implement an IIR filter in the frequency domain. Since filter function in the matlab can actually handle an IIR or FIR system since its contents do time domain filtering (convolution), this rises up to why I'm curious about the IIR filtering in the time domain. So you said that you need to approximate the IIR to FIR right? How can you do that? Thanks for any help. $\endgroup$ Nov 27 '16 at 19:18
  • $\begingroup$ So I found this thread stackoverflow.com/questions/20108462/… and I think it answers my questions. But in that thread the OP didn't do any approximation of the IIR filter, so is this really possible? I tried running the function he made but got different outputs compared to the filter function. $\endgroup$ Nov 27 '16 at 19:48
  • $\begingroup$ @LeBlancLord My question still stands: WHY do you want to do this in the frequency domain? It's slower, less precise, has higher latency and requires way more memory. I can't think of a case where a direct time domain, when done properly, isn't much better. Another point: IIR filtering in the time domain is NOT convolution. Convolution is only applicable to FIR filters. $\endgroup$
    – Hilmar
    Nov 27 '16 at 20:00
  • $\begingroup$ I want to prove that multiplication of two DFTs in the frequency domain (the filter being an IIR) would produce the output spectrum which can be Inversed DFT to obtain the output time domain signal. Yes I know it's not practical in real life applications, I just wanted to know the theory behind it by making a function for it. $\endgroup$ Nov 27 '16 at 20:10
  • 1
    $\begingroup$ @LeBlancLord: What do you mean by lccde ? Anyway, you can't prove this. First: your IIR filter is unstable. The output is unbounded. Even if it were stable (replace 8 with 1/8 for example) the length of the output is infinite. Any DFT needs a finite length, so they can't be the same. $\endgroup$
    – Hilmar
    Nov 28 '16 at 14:19

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.