DSPRelated.com
Forums

Any shape IIR Filter

Started by sparafucile17 October 26, 2007
Let's say I have a particular freqeuncy response that I can draw out on
paper and I want an IIR filter to do just that.  What is the best approach
to this problem.  I know there are simpler ways to do this using FIR
filters but let's say my constraint was to only use the IIR form.

For example the frequency shape I need is a smiley face or a parabola. 
It's not a peak-notch type or a band-reject filter, but siomething kinda
inbetween.  How could I feed in this "desired frequency response" data to
generate coefficients for an any shape IIR filter?

Any ideas?

Regards,
Jeff 
DSP Engineer

sparafucile17 wrote:

> Let's say I have a particular freqeuncy response that I can draw out on > paper and I want an IIR filter to do just that. What is the best approach > to this problem. I know there are simpler ways to do this using FIR > filters but let's say my constraint was to only use the IIR form. > > For example the frequency shape I need is a smiley face or a parabola. > It's not a peak-notch type or a band-reject filter, but siomething kinda > inbetween. How could I feed in this "desired frequency response" data to > generate coefficients for an any shape IIR filter? > > Any ideas?
There is no universal solution. The typical suboptimal approach is to split the response into the several frequency bands and equalize each band. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On 26 Okt., 19:33, "sparafucile17" <sparafucil...@hotmail.com> wrote:
> Let's say I have a particular freqeuncy response that I can draw out on > paper and I want an IIR filter to do just that. What is the best approach > to this problem. I know there are simpler ways to do this using FIR > filters but let's say my constraint was to only use the IIR form. > > For example the frequency shape I need is a smiley face or a parabola. > It's not a peak-notch type or a band-reject filter, but siomething kinda > inbetween. How could I feed in this "desired frequency response" data to > generate coefficients for an any shape IIR filter?
You can use FDLS: http://apollo.ee.columbia.edu/spm/external/tipsandtricks/files/TandT_Jan2007.zip
>On 26 Okt., 19:33, "sparafucile17" <sparafucil...@hotmail.com> wrote: >> Let's say I have a particular freqeuncy response that I can draw out
on
>> paper and I want an IIR filter to do just that. What is the best
approach
>> to this problem. I know there are simpler ways to do this using FIR >> filters but let's say my constraint was to only use the IIR form. >> >> For example the frequency shape I need is a smiley face or a parabola. >> It's not a peak-notch type or a band-reject filter, but siomething
kinda
>> inbetween. How could I feed in this "desired frequency response" data
to
>> generate coefficients for an any shape IIR filter? > >You can use FDLS: > >http://apollo.ee.columbia.edu/spm/external/tipsandtricks/files/TandT_Jan2007.zip > >
Wow, this is some intriguing information! I will really have to stew on this data for a while, but it looks very promising. I used to be an IEEE member and now I'm wishing that I still was! That's cool that this was published in Jan of this year. I really appreciate the Matlab code that Gregory Berchin provided. This will really accelerate my ability to test this as a viable solution. Any other ideas are still welcome. Thanks, Jeff
On Fri, 26 Oct 2007 14:12:43 -0500, "sparafucile17"
<sparafucile17@hotmail.com> wrote:

>Any other ideas are still welcome.
FDLS requires phase information in addition to magnitude; not always easy to come by. You can derive the minimum phase characteristic from the magnitude, however, and FDLS should work fine with that. If you only need to match magnitude, there are magnitude-only IIR least squares techniques available. For an example, see section 5.3.1 of the original Oppenheim & Schafer for the method proposed by Steiglitz. Greg Berchin
On Oct 26, 10:33 am, "sparafucile17" <sparafucil...@hotmail.com>
wrote:
> Let's say I have a particular freqeuncy response that I can draw out on > paper and I want an IIR filter to do just that. What is the best approach > to this problem. I know there are simpler ways to do this using FIR > filters but let's say my constraint was to only use the IIR form. > > For example the frequency shape I need is a smiley face or a parabola. > It's not a peak-notch type or a band-reject filter, but siomething kinda > inbetween. How could I feed in this "desired frequency response" data to > generate coefficients for an any shape IIR filter? > > Any ideas?
Long long ago, when 8-bit home computers were just starting to become popular, I wrote a program for a friend of mine who was an analog designer. Sort of like a video game, except that the joystick selected and moved around poles and zeros (conjugate pairs) on a complex plane, and the fire button caused a frequency response plot to be updated (slowly, back then). Apparently this analog designer was using it to help design some active filters for some unusual response curve requirements. Don't know if there is some digital z-plane version of this kind of video game around, or whether it might be useful to see if one can get "close enough" (high score? :) by just "playing around". IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
On 26 Okt, 19:33, "sparafucile17" <sparafucil...@hotmail.com> wrote:
> Let's say I have a particular freqeuncy response that I can draw out on > paper and I want an IIR filter to do just that. What is the best approach > to this problem. I know there are simpler ways to do this using FIR > filters but let's say my constraint was to only use the IIR form. > > For example the frequency shape I need is a smiley face or a parabola. > It's not a peak-notch type or a band-reject filter, but siomething kinda > inbetween. How could I feed in this "desired frequency response" data to > generate coefficients for an any shape IIR filter? > > Any ideas?
A couple of years ago I browsed some papers by Ken Steiglitz, which appeared in the IEEE Transactions on Acoustics, Speech and Signal Processing some time in the early -70s. The articles described how to design IIR filters with more or less arbitrary frequency response by means of optimization methods. It's been some time since I read those papers, but at the time I got an impression that the design by optimization methdos for FIRs and IIRs are based on different strategies, as the FIR specification is a desired continuous response with allowable ripple, whereas the IIR spec in the Steiglitz papers were given in discrete points, with a result based on a "connect the dots" approach. Rune
"sparafucile17" <sparafucile17@hotmail.com> schrieb im Newsbeitrag 
news:yaidneqCALJ0ub_anZ2dnUVZ_qKgnZ2d@giganews.com...
> Let's say I have a particular freqeuncy response that I can draw out on > paper and I want an IIR filter to do just that. What is the best approach > to this problem. I know there are simpler ways to do this using FIR > filters but let's say my constraint was to only use the IIR form. > > For example the frequency shape I need is a smiley face or a parabola. > It's not a peak-notch type or a band-reject filter, but siomething kinda > inbetween. How could I feed in this "desired frequency response" data to > generate coefficients for an any shape IIR filter? > > Any ideas? > > Regards, > Jeff > DSP Engineer
Hello Jeff, You could try with Scilab's "yulewalk" function. http://scilabsoft.inria.fr/product/man/html/eng/signal/yulewalk.htm http://www.scilab.org/ yulewalk - least-square filter design With Matlab: yulewalk http://static.scribd.com/docs/5d5x34sksumje.pdf Best regards, Helmut
Helmut Sennewald wrote:

> "sparafucile17" <sparafucile17@hotmail.com> schrieb im Newsbeitrag > news:yaidneqCALJ0ub_anZ2dnUVZ_qKgnZ2d@giganews.com... > >>Let's say I have a particular freqeuncy response that I can draw out on >>paper and I want an IIR filter to do just that. What is the best approach >>to this problem. I know there are simpler ways to do this using FIR >>filters but let's say my constraint was to only use the IIR form. >> >>For example the frequency shape I need is a smiley face or a parabola. >>It's not a peak-notch type or a band-reject filter, but siomething kinda >>inbetween. How could I feed in this "desired frequency response" data to >>generate coefficients for an any shape IIR filter? >> >>Any ideas? >> >>Regards, >>Jeff >>DSP Engineer > > > > Hello Jeff, > > You could try with Scilab's "yulewalk" function. > http://scilabsoft.inria.fr/product/man/html/eng/signal/yulewalk.htm > http://www.scilab.org/ > yulewalk - least-square filter design > > > > With Matlab: yulewalk > http://static.scribd.com/docs/5d5x34sksumje.pdf > > Best regards, > Helmut > >
Don't know if solves his problem Will probably do nicely for mine. And it's been sitting in front of me all along. Thanks
On Fri, 26 Oct 2007 12:33:29 -0500, "sparafucile17"
<sparafucile17@hotmail.com> wrote:

>Let's say I have a particular freqeuncy response that I can draw out on >paper and I want an IIR filter to do just that. What is the best approach >to this problem. I know there are simpler ways to do this using FIR >filters but let's say my constraint was to only use the IIR form. > >For example the frequency shape I need is a smiley face or a parabola. >It's not a peak-notch type or a band-reject filter, but siomething kinda >inbetween. How could I feed in this "desired frequency response" data to >generate coefficients for an any shape IIR filter? > >Any ideas? > >Regards, >Jeff >DSP Engineer
Hi Jeff, If you have access to the IEEE Signal Processing magazine, there's an article in the "DSP Tips & Tricks" column, in Jan. 2007, that might help you. It's title is: "Precise Filter Design" by Greg Berchin. A slightly expanded version of that material is in the new IEEE Press book, "Streamlining Digital Signal Processing". Good Luck, [-Rick-]