DSPRelated.com
Forums

Help to interpret impulse response of an fixed point IIR filter

Started by Marko December 22, 2005
Thank you all :-)

"Tim Wescott" <tim@seemywebsite.com> skrev i meddelandet
news:qPCdneG2_JeoxDbeRVn-pg@web-ster.com...
> Fred Marshall wrote: > > > "Tim Wescott" <tim@seemywebsite.com> wrote in message > > news:yfmdnXCPfaXDzDbenZ2dnUVZ_tmdnZ2d@web-ster.com... > > > >>robert bristow-johnson wrote: > >> > >>>Tim Wescott wrote: > >>> > >>> > >>>>Marko wrote: > >>>> > >>>> > >>>> > >>>>>I have done an impulse response of an IIR filter. The impulse
response
> >>>>>of > >>>>>the filter does not return to zero but stops at a level close to zero
(I
> >>>>>think it's because limitations in fraction bits). The filter is > >>>>>implemented > >>>>>in fixed point arithmetic's. > >>>>> > >>> > >>> > >>>>The problem is that you are using a method of analyzing linear > >>>>systems (the FFT) on a nonlinear system (a filter with quantization), > >>>>and expecting the results to be consistent with linear system theory. > >>>> > >>>>If your filter settles out close enough to your DC value to be > >>>>acceptable then call it good, and don't sweat the impulse response > >>>>issues. > >>> > >>> > >>>Tim, i think that guy's problem is simply a case of limit cycling on > >>>the quantization. it can be dealt with by "first-order noise shaping > >>>with a zero at z=1" or simply called "fraction saving". that DC > >>>blocking filter trick at DSPguru.com deals with this issue. > >>> > >>>r b-j > >>> > >> > >>Closely related to
http://www.wescottdesign.com/articles/sigmadelta.html.
> > > > > > I'm surprised that no one has mentioned the fact that you can't really
do an
> > FFT of the impulse response of an IIR filter. The response at DC is the > > integral of the impulse response. But, in this case it's been
truncated.
> > This means that some part of the integral is missing. It's supposed to
sum
> > to zero but it doesn't. Are 48000 samples a little or a lot in terms of > > this particular impulse response and the sampling rate? > > I'm not suggesting that this is the likely cause of the problem seen.
Just
> > that it shouldn't be neglected out of hand. > > I'm sure someone will point out why this isn't a very important > > consideration in this case and THAT will answer the question! > > > > Fred > > > > > Good point. Assuming the response has mostly died off taking the FFT > should be valid, though. > > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com
It sounds like what you are after is a Bode plot of your filter, which
is simply a 20*log(mag) versus frequency and a phase versus frequency
plot.  You should be able to use your simulation tool to run a plot of
both the 's' equation and your 'z' equation and compare the results.  I
use Mathcad (what I have available) for this by calculating the
response on an array of 'jw' for the 's' equation and 'e^j*w' for the z
equation that runs from very small to Fsample/2.

I will also implement the equation in direct form (in mathcad) and plot
the response versus various test inputs.  This helps to show the
transient response of the filter and show that the DC values are as
intended.