I have a unit response function h(n), and its DFT is H(n). I am wondering if we just see the H(n) and know if it is a FIR or a IIR? I think we cannot since just look at the H(n) I cannot see any noticeable difference. Thanks
can we just see the Fourier Spectrum of a filter and know if it is a FIR or a IIR?
Started by ●March 21, 2006
Reply by ●March 21, 20062006-03-21
VijaKhara wrote:> I have a unit response function h(n), and its DFT is H(n). I am > wondering if we just see the H(n) and know if it is a FIR or a IIR? I > think we cannot since just look at the H(n) I cannot see any noticeable > difference. > > ThanksGenerally the term "discrete Fourier transform" implies that you are taking the transform over a finite amount of time. Because the transform is finite there is no way to distinguish a finite sequence from an infinite one. In theory if you took a _full_ Fourier transform of a sequence, extending to infinity, you would be able to tell if it could be generated by a linear IIR filter vs. an FIR filter. In practice you could take a DFT of a response function and approximate it with a linear IIR filter, then check your approximation to see how accurate it would be. Probably the easiest thing to do, however, would be to do an inverse DFT on your H(n), look at the resulting h(n) and see if it looks finite or infinite. All fancy math aside, I think that's what I would do. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/
Reply by ●March 21, 20062006-03-21
"VijaKhara" <VijaKhara@gmail.com> wrote in message news:1142959978.601223.284610@z34g2000cwc.googlegroups.com...> I have a unit response function h(n), and its DFT is H(n). I am > wondering if we just see the H(n) and know if it is a FIR or a IIR? I > think we cannot since just look at the H(n) I cannot see any noticeable > difference. > > ThanksI'd say you are correct - in general. BTW - I presume you mean H(f) (not H(n)) H(f) can have a magnitude vs freq and a phase vs freq. You might be able to guess a little better if you looked at the phase vs freq response. A non-linear phase response makes it likely that your filter is a non-FIR filter. A few more notes on terminology. I could have an impulse response h(n) which describes the transfer function of a black box (say a room). I could choose to use an FIR or IIR implementation that approximates this impulse response h(n) (call it h(n)'). Studying h(n) and its DFT will give you close to nothing. Studying h(n)' and its DFT might give a few clues on the filter (which we've already talked about). Cheers Bhaskar
Reply by ●March 21, 20062006-03-21
in article 1142959978.601223.284610@z34g2000cwc.googlegroups.com, VijaKhara at VijaKhara@gmail.com wrote on 03/21/2006 11:52:> I have a unit response function h(n), and its DFT is H(n). I am > wondering if we just see the H(n) and know if it is a FIR or a IIR? I > think we cannot since just look at the H(n) I cannot see any noticeable > difference.i would recommend using the notational convention common in DSP texts of indicating a discrete-time (or discrete-frequency) sequence with brackets instead of parenths. use "h[n]" instead of "h(n)". and leave the parenths for continuous-time functions such as the implulse response "h(t)" of an analog filter. anyway, there are a class of FIR filters sometimes known as "Truncated IIR filters" (TIIR) which can be efficiently implemented with an IIR filter and a delay line to subtract out the "tail" of the remaining IIR. anyway, with TIIR, i can make an FIR approach the IIR to whatever level of precision i want. the spectrums will likewise get just as close to each other. so i think the answer to your question is simply "no". -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by ●March 21, 20062006-03-21
VijaKhara wrote:> I have a unit response function h(n), and its DFT is H(n). I am > wondering if we just see the H(n) and know if it is a FIR or a IIR?Your filter is FIR (otherwise you couldn't take the DFT of its impulse response).
Reply by ●March 21, 20062006-03-21
"Andor" <andor.bariska@gmail.com> wrote in message news:1142968534.670045.177150@t31g2000cwb.googlegroups.com...> VijaKhara wrote: > >> I have a unit response function h(n), and its DFT is H(n). I am >> wondering if we just see the H(n) and know if it is a FIR or a IIR? > > Your filter is FIR (otherwise you couldn't take the DFT of its impulse > response). >Or, said another way, when you take the DFT of a unit sample response then you are forced into finite time. That *makes* it a FIR filter: thus Andor's comment "your filter is a FIR". Now, if the original was an IIR filter and you truncate its unit sample response into a FIR, that doesn't mean you might not still implement an IIR to get similar results. Otherwise, it *is* a (possibly long) FIR that you're analyzing. Fred
Reply by ●March 21, 20062006-03-21
Andor wrote:> VijaKhara wrote: > > > I have a unit response function h(n), and its DFT is H(n). I am > > wondering if we just see the H(n) and know if it is a FIR or a IIR?Even if it originally was a truncated IIR, you could use the DFT results to construct a FIR which would the produce identical DFT results. Thus you couldn't tell the difference in that direction. But perhaps there are FIR responses that are impossible to duplicate via a truncated IIR under certain restrictions (degree, numeric precision, latency, etc.) So the answer may be asymmetric once any details are filled in.> Your filter is FIR (otherwise you couldn't take the DFT of its impulse > response).So is it your opinion that every digitally-represented IIR with a decay that takes the filter response tail well below the quantization floor of the filter output and state representation in finite time is actually a FIR, since you could take a numeric DFT of the impulse response in that situation? IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
Reply by ●March 22, 20062006-03-22
Ron N. wrote: ...> > Your filter is FIR (otherwise you couldn't take the DFT of its impulse > > response). > > So is it your opinion that every digitally-represented IIR with > a decay that takes the filter response tail well below the > quantization floor of the filter output and state representation > in finite time is actually a FIR, since you could take a numeric > DFT of the impulse response in that situation?My opinion is every filter with a finite duration impulse response is an FIR filter.
Reply by ●March 22, 20062006-03-22
Andor wrote:> Ron N. wrote: > ... > > > Your filter is FIR (otherwise you couldn't take the DFT of its impulse > > > response). > > > > So is it your opinion that every digitally-represented IIR with > > a decay that takes the filter response tail well below the > > quantization floor of the filter output and state representation > > in finite time is actually a FIR, since you could take a numeric > > DFT of the impulse response in that situation? > > My opinion is every filter with a finite duration impulse response is > an FIR filter.I might add that the problem of order reduction is somewhat related, but much more interesting. Assume that a measured impulse response has at some time N decayed below a threshold where we feel that truncation introduces acceptable error. This truncated impulse response can be perfectly implemented using an N-th order FIR. How do we go about designing an M-th order IIR system (if possible sparse) with an impulse response that minimizes some kind of cost function on the difference vector of the two impulse resonses (the FIR impulse response can be extrapolated with 0 to measure the error)?
Reply by ●March 22, 20062006-03-22
VijaKhara wrote:> I have a unit response function h(n), and its DFT is H(n). I am > wondering if we just see the H(n) and know if it is a FIR or a IIR? I > think we cannot since just look at the H(n) I cannot see any noticeable > difference.No, you can not tell the difference between an IIR and an FIR system by looking at the spectrum. There are two main arguments: 1) As others already have commented, the DFT works on a finite data sequence, so any spectrum is generetaed from the impulse response of an FIR filter. 2) Even if you have the N-length spectrum of a "true" FIR filter of length M, M<N, a test for trailing zeros would not work due to numerical inaccuracies. So the two possible tests are inconclusive: You can not test for infinite duration since you can only work with finite data sequences, and you can not test for vanishing coefficients since the impulse response of a stable IIR filter vanishes "sufficiently far" into the transient. Rune






