Reply by mnentwig August 21, 20142014-08-21
>This is exactly what has always confused me. I think you are saying that >what I have on my web page is standard textbook material, but I have
never
>been able to find another web site or text that gives these design >equations explicitly. In other words, the general purpose design
equations
>for any type of filter where all that is needed are the analog filter >coefficients.
Hi, for more advanced filter design, you could have a look here: http://www.nt.tuwien.ac.at/fileadmin/users/gerhard/diss_Lang.pdf The code examples are available online. I think there is at least some IIR materal in there. Generally, IIR wouldn't be my first choice in most cases (maybe more so, if a fast 32-bit multiplier is available) _____________________________ Posted through www.DSPRelated.com
Reply by FilterDan August 21, 20142014-08-21
A cookbook recipe like pre-warped bilinear transform will do to design "a"
filter for most problems. It's been a standard textbook chapter for two
decades or longer, no one doubts that it works.

This is exactly what has always confused me. I think you are saying that
what I have on my web page is standard textbook material, but I have never
been able to find another web site or text that gives these design
equations explicitly. In other words, the general purpose design equations
for any type of filter where all that is needed are the analog filter
coefficients. 

http://www.iowahills.com/A4IIRBilinearTransform.html

For example, in Randy Allred's "Digital Filters for Everyone", he lists
numerous different equations for very specific filter types. For example,
one set of equations for a Butterworth low pass and another set of
equations for a Bessel low pass. But if I remember correctly, he ends up
with the same filter coefficients that I do.

	 

_____________________________		
Posted through www.DSPRelated.com
Reply by mnentwig August 21, 20142014-08-21
>> High end performance isn't a big concern for me.
Well, I guess that answers the original question ("what am I missing"). If you can afford to cut some corners, fine. A cookbook recipe like pre-warped bilinear transform will do to design "a" filter for most problems. It's been a standard textbook chapter for two decades or longer, no one doubts that it works. Now, once performance / cost become an issue, there may be more efficient alternatives. BTW, first-order noise shaping can help quite a bit. Simply store the LSBs that rounding drops from the accumulator, and add them in the next cycle before rounding. _____________________________ Posted through www.DSPRelated.com
Reply by FilterDan August 21, 20142014-08-21
BTW, you won't avoid "partitioning" of high order filters if performance
matters.


High end performance isn't a big concern for me.

I should explain that the material on my web site isn't intended for DSP
experts. As an RF engineer, I have worked with a lot of EE's and software
engineers who want to use a digital filter for something really basic, but
have no idea how to design or implement one.

At my last job for example, we had no DSP expertise in house and the
software guys needed a simple FIR low pass to run on a MSP430. High end
performance was the least of their concerns. 

I just want my stuff to be good enough to get guys like that started.	 

_____________________________		
Posted through www.DSPRelated.com
Reply by FilterDan August 21, 20142014-08-21
>0.01 is not a particularly narrow filter. For example, it's 960 Hz for a
96
>kHz audio signal. Scale that down by two orders of magnitude for a DC
block
>and numeric precision becomes quite a bit more difficult. > >_____________________________ >Posted through www.DSPRelated.com >
I see what you are saying. My lower limit is about 0.001 for 32 bits. _____________________________ Posted through www.DSPRelated.com
Reply by mnentwig August 21, 20142014-08-21
BTW, you won't avoid "partitioning" of high order filters if performance
matters.
A series arrangement is not necessarily the most efficient way, there's
more to it.
See slides 25 and 29 here:
http://www.site.uottawa.ca/~mbolic/elg6163/ELG6163_IIR.pdf

	 

_____________________________		
Posted through www.DSPRelated.com
Reply by mnentwig August 21, 20142014-08-21
0.01 is not a particularly narrow filter. For example, it's 960 Hz for a 96
kHz audio signal. Scale that down by two orders of magnitude for a DC block
and numeric precision becomes quite a bit more difficult.	 

_____________________________		
Posted through www.DSPRelated.com
Reply by robert bristow-johnson August 20, 20142014-08-20
On 8/20/14 10:54 AM, FilterDan wrote:
> Every article I see regarding IIR filter design seems to make the subject > far more complicated than it needs to be. >
check out the cookbook. i am told it needs *more* content, but i am hesitant to add any.
> > These filters seem to work fine, and this method works for any filter type > (i.e. Buterworth, Elliptic, low pass, bandpass, etc). All that's needed are > the 2nd order analog filter coefficients and a cutoff frequency in terms of > Nyquist to calculate T. > > This method guarantees stability because the left hand s plane poles are > guaranteed to map to within the unit circle on the z plane. There is no > question of how to match Elliptic (or Inv Chebyshev) zeros with poles. And > this method avoids the biquad partitioning problem on high order filters, > as described in Understanding DSP by Rick Lyons (p. 291). > > Is this simple method deficient in some sense? What am I missing?
other than the effects of frequency warping (which can be compensated for one frequency parameter for each degree of freedom in the design using what we call "pre-warping") i can't think of a downside to bilinear transform. one consequence of frequency warping in the BLT is that for an LPF, if the analog filter goes to -inf dB gain at f=inf, then the digital filter will dive to -inf dB gain at Nyquist. you might like that or you might not. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by Tim Wescott August 20, 20142014-08-20
On Wed, 20 Aug 2014 11:08:39 -0500, FilterDan wrote:

> This statement is generally not correct for IEEE single-precision (32- > bit) floating point, which is what's available on a lot of DSP hardware. > At some combination of filter order and pole position, it won't even be > correct for IEEE double-precision (64-bit) floating point, although you > have a lot more room to mess around in. > > (Note that this is even the case for a second-order or first-order > filter, but you have to be filtering REALLY low frequencies compared to > the sampling rate before it becomes an issue). > > > I'll take a closer look at this, but when I emulate fixed pt in my > program, > the filters work fine with just 28 bits, even when the cutoff is as low > as 0.01 (Inv Cheby low pass)
The two determining factors are coefficient quantization and quantization noise. Coefficient quantization is just that: the coefficients can't be infinitely precise, so when they're calculated their values are rounded off. As polynomial order goes up, the sensitivity of the polynomial's roots to variations in its coefficients goes up. When you have a low- frequency filter with poles all bunched up close to z=1, just a little bit of change in pole position can have a big effect on filter performance. Part of the reason that you may find what you're doing so simple, and what's written about so complicated, is that those authors may be trying to cover all of the "gotchas" that one eventually runs into (and are recalled with remembered pain), while you are just covering the part that often -- but not always -- works. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by FilterDan August 20, 20142014-08-20
This statement is generally not correct for IEEE single-precision (32-
bit) floating point, which is what's available on a lot of DSP hardware.  
At some combination of filter order and pole position, it won't even be 
correct for IEEE double-precision (64-bit) floating point, although you 
have a lot more room to mess around in.

(Note that this is even the case for a second-order or first-order 
filter, but you have to be filtering REALLY low frequencies compared to 
the sampling rate before it becomes an issue).


I'll take a closer look at this, but when I emulate fixed pt in my program,
the filters work fine with just 28 bits, even when the cutoff is as low as
0.01 (Inv Cheby low pass)	 

_____________________________		
Posted through www.DSPRelated.com