DSPRelated.com
Forums

IIR filter design

Started by Erik de Castro Lopo September 5, 2003
Al Clark wrote:
> > Erik, > > I don't have any suggestions but I am very interested in a filter program > that does a good job at matching arbitrary responses. One of the filters > that comes to mind is the standard A Weighting filter. It is defined (by > standard) in the s plane and therefore does not map perfectly into the z > plane. > > Can your program accept a function written as H(s) as a target?
Not at the moment, but give any abritrary H(s) and a sample rate, it should be possible to turn that into a combined magnitude/phase response which can then be matched. Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo nospam@mega-nerd.com (Yes it's valid) +-----------------------------------------------------------+ "MS apparently now has a team dedicated to tracking problems with Linux and publicizing them. I guess eventually they'll figure out this back fires..." -- William Burrow
"Erik de Castro Lopo" <nospam@mega-nerd.com> wrote in message
news:3F5A70C7.50C784DE@mega-nerd.com...
> Erik de Castro Lopo wrote: > > > > Hi all, > > > > As we all know, designing IIR filters is easy enough > > for low filter order but is far more difficult when > > higher order filters are required to meet design > > contraints like low passband ripple, narrow transition > > bands and high levels of attenuation in the stopband. > > > > I'm currently working on a program for designing IIR > > filters and this software has recently produced a LP > > filter with the following specs: > > > > Order : 18 > > Passband : 0 - 0.2*fs < 0.1 dB ripple > > Stopband : 0.25*fs - 0.5*fs > 100 dB attenuation > > Another run of this program (4.5hrs) produced a 13th order > filter meeting the same specs. Obviously, some more work > is needed to find the minimum order for a given design > spec. > > Erik
It looks to me like a standard 10th-order elliptic filter can meet your specs, and actually have a stopband attenuation of over 104 dB. Alternatively, it could get exactly 100 dB attenuation and have a passband ripple of 0.035 dB. I assume that matlab could generate these, though I haven't tried it. An elliptic filter can be generated very quickly using standard techniques that don't require extensive search or iteration. Is there some other constraint or problem that makes a standard elliptical filter not work here? -- Eric Backus R&D Design Engineer Agilent Technologies, Inc. 425-356-6010 Tel
Erik de Castro Lopo wrote:

> Bernhard Holzmayer wrote: >> ... >> Matlab caused a lot of pain when I tried to design even lower >> order filters (4th order Butterworth), when the relation between >> cutoff-frequency and sampling frequency decreases: >> try this: 4th order HPF and LPF (independently) at 1.5Hz >> (Fs=48kHz). >> ... > > Is that a high pass or low pass filter? > > Erik
Both. I started with this (for LPF): Fs = 48000; qz = quantizer('single',[32,8]); [b,a] = butter(4, fy / (Fs/2) ); [sos,g] = tf2sos(b,a); The result was poor. Applying a hint from Mathworks, I changed to: Fs = 48000; qz = quantizer('single',[32,8]); [z,p,k] = butter(4, fy / (Fs/2) ); [sos,g] = zp2sos(z,p,k); Results were ok, except at 1.5Hz. At 1.5Hz I shifted the frequency to fy=1.495Hz until I succeeded. Note: The internal stability method isstable() failed in my special situation and had to be replaced by a patched version from Mathworks. Bernhard -- before sending to the above email-address: replace deadspam.com by foerstergroup.de
Erik de Castro Lopo <nospam@mega-nerd.com> wrote in message news:<3F5C408D.A4753D8F@mega-nerd.com>...
> robert bristow-johnson wrote: > > > > Erik de Castro Lopo <nospam@mega-nerd.com> wrote in message news:<3F592C33.DD349F59@mega-nerd.com>... > > ... > > > I'm therefore asking people here the following questions: > > > > > > 0) How big and how "difficult" are the IIR filters you > > > have designed? > > > > i have chained together maybe 4 or 5 biquads in cascade. the noise > > starts to get to be a little bad by then. > > Hi Robert, > > Since its you saying this, i have to resume that you are > talking about implementations using 24 bit fixed point > arithmetic :-). Correct?
yes. (for 4 or 5 biquads.) long ago i implemented some filtering on the MC68000 (wasn't real time but i wanted it done that day). that was 16 bit, didn't know all of the tricks i know now and it was pretty bad for more than 4th order. r b-j (remotely in North Dakota)