DSPRelated.com
Forums

design an iir by time-domain impulse response

Started by banton July 1, 2006
Hi,

I wonder if there are methods to calculate the coefficients
of a recursive iir filter, for a given time-domain impulse response.
(Of course I can not give an infinite impulse response, but if I want
a filter which follows approximately the given impulse response
of maybe 16 samples or so - it can have an additional 'tail' afterwards)

I wonder if this might be usefull for the implementation of a filter
which has a fir section which yields a rising shape and a delayed
iir section which is approximately the same shape but decaying, so
that the end result could have a 'kind of symmetric' response.

Example

feed forward coefficients:

 0.0625 0.125 0.25  0.5  1.0

and feedback coefficients which should give the same (for the first 5
samples) but in reverse order.

For my given example of course this would be very easy, but I would
like to know if there are methods which can approximate arbitrary
time-domain impulse responses.

gr.
Anton   

banton wrote:
> Hi, > > I wonder if there are methods to calculate the coefficients > of a recursive iir filter, for a given time-domain impulse response. > (Of course I can not give an infinite impulse response, but if I want > a filter which follows approximately the given impulse response > of maybe 16 samples or so - it can have an additional 'tail' afterwards) > > I wonder if this might be usefull for the implementation of a filter > which has a fir section which yields a rising shape and a delayed > iir section which is approximately the same shape but decaying, so > that the end result could have a 'kind of symmetric' response. > > Example > > feed forward coefficients: > > 0.0625 0.125 0.25 0.5 1.0 > > and feedback coefficients which should give the same (for the first 5 > samples) but in reverse order. > > For my given example of course this would be very easy, but I would > like to know if there are methods which can approximate arbitrary > time-domain impulse responses.
There must be some hidden presumption that you don't state, which makes a trivial problem into a non-trivial one. The trivial solution to your example is to just use an FIR to get exact linear phase response. You can always approximate any impulse response arbitrarily well with an FIR filter. Why do you want to use an IIR instead? It is more cumbersome to design, and yields only an approximately symmetric impulse response. A simple rule might help: specifiying L (consecutive) taps of an impulse response requires, in general, a rational transfer function where the sum of the order of the numerator and denominator is equal to L. This fixes the fist L samples of the impulse response. The behaviour of the impulse response after the L-th step is determined by the recursive part, and is (in the stable case) just a sum of exponentially decaying sinusoids (perhaps with polynomial weighting). The smaller the denominator order, the less terms in the sum. Regards, Andor
>banton wrote: >> Hi, >> >> I wonder if there are methods to calculate the coefficients >> of a recursive iir filter, for a given time-domain impulse response. >> (Of course I can not give an infinite impulse response, but if I want >> a filter which follows approximately the given impulse response >> of maybe 16 samples or so - it can have an additional 'tail'
afterwards)
>>
.....
>There must be some hidden presumption that you don't state, which makes >a trivial problem into a non-trivial one. > >The trivial solution to your example is to just use an FIR to get exact >linear phase response. You can always approximate any impulse response >arbitrarily well with an FIR filter. Why do you want to use an IIR >instead? It is more cumbersome to design, and yields only an >approximately symmetric impulse response.
I need a lowpass filter which starts to rolloff immediately (0.001 normalized frequency or so). I think I would need a fir filter which is much to large for my problem. But this filter needs to be in parallel with filters with different cutoff frequencies, so I guess I need approximately linear phase for that.
>A simple rule might help: specifiying L (consecutive) taps of an >impulse response requires, in general, a rational transfer function >where the sum of the order of the numerator and denominator is equal to >L. This fixes the fist L samples of the impulse response. The behaviour >of the impulse response after the L-th step is determined by the >recursive part, and is (in the stable case) just a sum of exponentially >decaying sinusoids (perhaps with polynomial weighting). The smaller the >denominator order, the less terms in the sum. > >Regards, >Andor
I understand but it seems that my idea will not really work, since L would be too large. I have to rethink my strategy. Actually, I should have written this as a followup to a previous thread, in which I asked about building a filter with variable (controlable) rolloff slope. http://www.dsprelated.com/showmessage/57969/1.php My apologies for the mistake. When I posted my question I had this idea of creating iir filters which I could run in parallel and adjust the balance between them and at this moment I thought it is a seperate problem Just for the record I found a matlab/octave function called 'prony' which approximates a given time-domain impulse response with a recursive filter. thanks, Anton