DSPRelated.com
Forums

IIR filter question

Started by Rick Lyons April 5, 2006
Steve Underwood <steveu@dis.org> writes:

> Adaptive IIRs seem to be widely used these days.
Why do you say that, Steve? -- % Randy Yates % "Watching all the days go by... %% Fuquay-Varina, NC % Who are you and who am I?" %%% 919-577-9882 % 'Mission (A World Record)', %%%% <yates@ieee.org> % *A New World Record*, ELO http://home.earthlink.net/~yatescr
Rick Lyons wrote:

> Hi Guys, > I was asked to review a potential article > for the IEEE Sig. Proc. magazine. In that > article the author implies that IIR (recursive) > filters aren't as popular nowadays as they were in > the past (say 10-20 years ago). > > Now I'm no IIR filter designer, so I need your > opinions. Aren't IIR filters still as popular > now for audio signal processing as they were > 10 years ago? > > Thanks guys, > [-Rick-] >
For general purpose signal processing -- I don't know. For closing control loops? Minimum phase filters are the only way to go, and you want filters with as few poles as possible. So I think you'll see IIR filters there for decades to come. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/
Joerg wrote:

> I am no expert either but from what I have seen IIR is still > used, often with some added measures to muffle their inherent > instability upon signal loss.
What do you mean by "instability upon signal loss"?
> For narrowband applications wave digital filters (WDF) have made > inroads and probably eaten away at IIR's "market share", > especially in the telecom business.
Aren't WDF techically IIR too? Martin -- Quidquid latine scriptum sit, altum viditur.
Martin Eisenberg wrote:
> Joerg wrote:
...
> > For narrowband applications wave digital filters (WDF) have made > > inroads and probably eaten away at IIR's "market share", > > especially in the telecom business. > > Aren't WDF techically IIR too?
i think there is much more of a similarity to FIR. sorta like an analog, continuous-time delay line with discrete taps. if the taps are equally spaced you can do all of the FIR techniques such as Parks-McClellan to design tap coefficients. i suppose you can explicitly feed back to the input and it will be IIR. but you can do that with conventional FIRs, too. r b-j
Hi Rick,

> Looking at your Item# 2, the author of the article > that I'm reviewing states that IIR filters are "difficult, > if not impossible" to use for adaptive filtering.
In my item #2, I was refering to the transitioning of filter coefficients. IIR filters have fewer coefficients which generally makes them easier to adjust in real time. (There are stability issues to consider, but that is beyond the scope of this discussion.) Also, an IIR topology such as the Chamberlain topology has coefficients that directly map to filter parameters, making it very easy to adjust in real-time. I have never tried to implement an adaptive IIR filter in the traditional sense. However, for many of the reasons already discussed by others in the group, I would surmise that adaptive IIR filtering is more difficult than adaptive FIR filtering although not "impossible." Brian Neunaber
Hello Martin,

> >>I am no expert either but from what I have seen IIR is still >>used, often with some added measures to muffle their inherent >>instability upon signal loss. > > What do you mean by "instability upon signal loss"? >
When the input signal is abruptly lost and comes back the output of the filter might keep on ringing for a long time, sometimes pretty much forever.
> >>For narrowband applications wave digital filters (WDF) have made >>inroads and probably eaten away at IIR's "market share", >>especially in the telecom business. > > Aren't WDF techically IIR too? >
If done in the classical way they are usually stable. WDFs are a direct translation of analog components into the digital domain. Maybe there is another method these days but the only design methodology I know is to first design the analog filter and then proceed to translate to WDF. Suits me since I 'think analog' anyway ;-) Regards, Joerg http://www.analogconsultants.com
Martin Eisenberg wrote:

> Joerg wrote: > > >>I am no expert either but from what I have seen IIR is still >>used, often with some added measures to muffle their inherent >>instability upon signal loss. > > > What do you mean by "instability upon signal loss"? >
(snip) It's a consequence of quantization, which is what you call the effect of rounding off the signal after multiplies and adds. When you have a signal going into the filter the effects of the quantization tends to appear to be white noise with a uniform distribution. When the signal goes away, however, the quantization tends to look like little blocks of infinite gain because small input changes result in step changes at the output. These little infinite gain blocks practically guarantee that any 2nd-order filter will oscillate. Since the human ear (and no doubt other applications) are far more sensitive to single tones than they are to white noise this can cause problems with your system. You can reduce this effect by increasing your filter precision and/or injecting an intentional noise signal into the filter input, but you can't make it go away. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/
Tim Wescott wrote:
> Martin Eisenberg wrote: > >> Joerg wrote: >> >> >>> I am no expert either but from what I have seen IIR is still >>> used, often with some added measures to muffle their inherent >>> instability upon signal loss. >> >> >> >> What do you mean by "instability upon signal loss"? >> > (snip) > > It's a consequence of quantization, which is what you call the effect of > rounding off the signal after multiplies and adds. > > When you have a signal going into the filter the effects of the > quantization tends to appear to be white noise with a uniform > distribution. When the signal goes away, however, the quantization > tends to look like little blocks of infinite gain because small input > changes result in step changes at the output. These little infinite > gain blocks practically guarantee that any 2nd-order filter will > oscillate. Since the human ear (and no doubt other applications) are > far more sensitive to single tones than they are to white noise this can > cause problems with your system. > > You can reduce this effect by increasing your filter precision and/or > injecting an intentional noise signal into the filter input, but you > can't make it go away.
The technique called fraction (or remainder) saving can reduce it greatly, sometimes eliminating any trace of a limit cycle. R.B-J. showed explicitly how to apply the technique to a DC blocker, but it works wherever division is done. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Jerry Avins wrote:
> Tim Wescott wrote: > > Martin Eisenberg wrote: > > > >> Joerg wrote: > >> > >>> I am no expert either but from what I have seen IIR is still > >>> used, often with some added measures to muffle their inherent > >>> instability upon signal loss. > >> > >> What do you mean by "instability upon signal loss"? > > > > It's a consequence of quantization, which is what you call the effect of > > rounding off the signal after multiplies and adds.
the name for this is "limit cycling" and it is non-linear phenomena and should not be confused with unstable IIR filters (because of pole location).
> > When you have a signal going into the filter the effects of the > > quantization tends to appear to be white noise with a uniform > > distribution.
if the signal amplitude is a good deal larger than the quantization step. then where the pre-rounded signal lands within the step is pretty random and the quantization error is pretty well "pdeudo-independent" of the signal.
> > When the signal goes away, however, the quantization > > tends to look like little blocks of infinite gain because small input > > changes result in step changes at the output. These little infinite > > gain blocks practically guarantee that any 2nd-order filter will > > oscillate.
that is not a bad way to look at it.
> > Since the human ear (and no doubt other applications) are > > far more sensitive to single tones than they are to white noise this can > > cause problems with your system. > > > > You can reduce this effect by increasing your filter precision and/or > > injecting an intentional noise signal into the filter input,
this noise is called "dither", and, strictly speaking, the place to inject the dither is immediately before the quantization block, not necessarily the input (you wouldn't want the dither to be in the input feedforward states of the IIR or of an FIR).
> > but you can't make it go away.
yes, and no. strictly speaking, you cannot with finite power dither decouple *all* of the moments of the quantization error from the signal, but with triangular PDF dither with amplitude of 2 LSBs, you can decouple the first two moments, the mean and the variance, of the quantization error from the signal getting quantized. dunno about other applications but no audio or aural experiment has ever shown that human beings can here the correlation of the quantized signal to 3rd and higher order statistical moments of the quantization noise. with that kind of dither you really *can* make it go away. the quantizer sounds like constant power white noise (if the dither was white and there is no noise shaping) and the probabilistic mean of the quantized output is precisely the value of the input to the quantizer.
> The technique called fraction (or remainder) saving can reduce it greatly,
at low frequencies, Jerry. it makes it *worse* at Nyquist, but even at Fs = 44.1 kHz, our ears don't give a rat's ass about increased noise at Nyquist.
> sometimes eliminating any trace of a limit cycle.
only for DC. there is no DC limit cycle if you do fraction saving. other low frequencies the quantization noise is reduced and at some frequency about an octave below Nyquist, there is the trade off. above that frequency, it gets worse but we don't really care.
> R.B-J. showed explicitly how to apply the technique to a DC blocker
Tim knows about that DC blocking trick and i remember Tim improved upon it, making it 2 instructions per sample (with the right pipelining) reducing it from 3 which i never thought could ever be done. i'm still impressed. (i.e. Tim made a permanent impression on me with that, and if Grant wants to, we should update the trick at dspguru.com .) r b-j
R.Lyons@_BOGUS_ieee.org (Rick Lyons) wrote in news:44344259.337998187
@news.sf.sbcglobal.net:

> > Hi Guys, > I was asked to review a potential article > for the IEEE Sig. Proc. magazine. In that > article the author implies that IIR (recursive) > filters aren't as popular nowadays as they were in > the past (say 10-20 years ago). > > Now I'm no IIR filter designer, so I need your > opinions. Aren't IIR filters still as popular > now for audio signal processing as they were > 10 years ago? > > Thanks guys, > [-Rick-] >
I did my first DSP project with an NEC 7725 in the late 1980s. It was a first generation DSP chip. In my application, I designed an FSK modem using IIR filters. FIR filters were not even an option since I din't have sufficient MIPS or memory. IIRs do not necessarily need great precision math. It mostly depends on the filter requirements. High performance audio filters tend to be critical since the poles and zeros can get very close to the unit circle at low frequencies. A bandpass filter with a center at fs/4 might be fairly insensitive. IIRs tend to take a lot less computation time and memory than a similar FIR. My the early and mid 1990s, I was using a Analog Devices 21xx (2105 or 2181) DSPs. The applications I did then used almost exclusively FIRs over IIRs. I think there were several reasons. 1. They are stable. 2. Memory was plentiful and MIPs were sufficient. 3. Linear Phase is often nice. 4. I was using 16 bit fixed point which can be a problem with IIR filters. Mask charges have also been increasing over the years. This means that fewer custom silicon created. I.P. is more likely to be directed to a programmable part that a custom ASIC. I think this also will reduce the the IIR numbers a bit. I am finding a new change in the last few years. Most of my applications have more than enough MIPS. I think that other features of devices have greater relative significance than in the past. You might decide that all candidates are fast but that processor A has better preripherals than B, or lower power, cost , etc. These might be the significant deciders. IF MIPs and memory are abundant, its often easier to go FIR than IIR. I do agree with Grant that with higher precision math IIR implementation is less of an issue. This is true whether you are looking a fixed point implementation or float. So I guess, I agree that IIRs are probably a little less popular than say 20 years ago. I think the change might have been about 15 years ago. With modern programmable devices, I think you still should should pick type the works best for the situation at hand. I have many applications that use both. -- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com