For the newbies here (like me): I have compiled recipes (step by step instructions) for coding three kinds of 2-pole digital filters, both low-pass and high-pass, complete with correction factors to ensure that the 3 dB cutoff frequency stays where you put it when you cascade filters together. http://unicorn.us.com/alex/2polefilters.html The recipes cover Butterworth, Critically-Damped, and Bessel filters. I also include test results; i.e. plots of actual frequency response and step-function temporal response for each filter. I was interested only in filters that exhibited no ripple in the frequency response. Therefore I didn't include Chebyschev, Elliptical, and other ripply types. What brought this on? Well, I spent many frustrating hours looking in vain for a general purpose "recipe" for a particular filter. I wanted formulas for the end result (the filter coefficients), that didn't require me to understand much about DSP. All I could ever find were numeric tools that let me construct one-of-a-kind filters with specific, numeric performance specifications, which wasn't useful to me. I needed the formulas! The Bessel filter in particular has a lamentable dearth of information available. With the patient help of the good people in this newsgroup, I gradually grew to understand more about DSP, to the point where I was finally able to derive a filter independently, all by myself (Bessel lowpass). Rather than do it over again each time I need it, I tabulated the formulas in an easy-to-use step-by-step table. I find it ironic that I now have filter recipes that one can use without understanding how to derive filters, but I had to learn something about how to derive filters to complete my set of recipes. You'd think something like this would be covered in the comp.dsp FAQ. That was actually one of the first places I went when I began this quest. -Alex
Recipes for non-ripple 2-pole filters available
Started by ●August 15, 2004
Reply by ●August 15, 20042004-08-15
axlq wrote:> I have compiled recipes (step by step instructions) for coding three > kinds of 2-pole digital filters, both low-pass and high-pass, complete > with correction factors to ensure that the 3 dB cutoff frequency stays > where you put it when you cascade filters together. > > http://unicorn.us.com/alex/2polefilters.html... You're a good man, Alex! You ought to be strutting around with your thumbs under your armpits around; you can be justly proud. You're right: that page ought to make it into the FAQ. As Tom Lehrer attributed to Werner Von Braun, "That's not my department." Let's hope someone knows how to arrange it. Jerry -- ... the worst possible design that just meets the specification - almost a definition of practical engineering. .. Chris Bore ������������������������������������������������������������������������
Reply by ●August 15, 20042004-08-15
Nice work, Alex! I second the motion to get it added to the FAQ. -- % Randy Yates % "Ticket to the moon, flight leaves here today %% Fuquay-Varina, NC % from Satellite 2" %%% 919-577-9882 % 'Ticket To The Moon' %%%% <yates@ieee.org> % *Time*, Electric Light Orchestra http://home.earthlink.net/~yatescr
Reply by ●August 15, 20042004-08-15
In article <411f87db$0$5916$61fed72c@news.rcn.com>, Jerry Avins <jya@ieee.org> wrote:>axlq wrote: >> I have compiled recipes (step by step instructions) for coding three >> kinds of 2-pole digital filters, both low-pass and high-pass, complete >> with correction factors to ensure that the 3 dB cutoff frequency stays >> where you put it when you cascade filters together. >> >> http://unicorn.us.com/alex/2polefilters.html > >You're a good man, Alex! You ought to be strutting around with your >thumbs under your armpits around; you can be justly proud.Thanks Jerry, I am. And I'm grateful for all the advice and teaching, to which you contributed in a major way. I had wanted to include a Gaussian filter in there also, but that one stymied me. Bilinear transformation doesn't seem applicable in that case. I'd also like to extend the page to cover 4th order filters. The 4th-order Butterworth and Critically-damped ones are easy to implement in 2-pole sections. However, the Bessel is giving me trouble; I can't figure out how to decompose the s-domain polynomial s^4 + 10s^3 + 45s^2 + 105s + 105 into two 2nd-order polynomials. What's worse, I recall solving such problems in high school. It might be easier if I knew how the poles are supposed to be distributed in polar coordinates in the z plane, but that information seems impossible to come by.>You're right: that page ought to make it into the FAQ. As Tom Lehrer >attributed to Werner Von Braun, "That's not my department." Let's hope >someone knows how to arrange it.I found a FAQ submission address. I'll see what they say. -Alex
Reply by ●August 15, 20042004-08-15
"axlq" <axlq@spamcop.net> wrote in message news:cfo700$ckm$1@blue.rahul.net...> I'd also like to extend the page to cover 4th order filters. The > 4th-order Butterworth and Critically-damped ones are easy to > implement in 2-pole sections. However, the Bessel is giving > me trouble; I can't figure out how to decompose the s-domain > polynomial s^4 + 10s^3 + 45s^2 + 105s + 105 into two 2nd-order > polynomials. What's worse, I recall solving such problems in high > school. It might be easier if I knew how the poles are supposed > to be distributed in polar coordinates in the z plane, but that > information seems impossible to come by. > -AlexThe roots for 1 10 45 105 105 are: -2.896212-0.867234i -2.896212+0.867234i -2.103789+2.657418i -2.103789-2.657418i This should allow you to implement a Bessel filter as two two pole filters. You need to get a math package. Peter Nachwey
Reply by ●August 16, 20042004-08-16
In article <HtCdncY_3otRfILcRVn-vg@comcast.com>, Peter Nachtwey <peter@deltacompsys.com> wrote:>"axlq" <axlq@spamcop.net> wrote in message >news:cfo700$ckm$1@blue.rahul.net... >> I'd also like to extend the page to cover 4th order filters. The >> 4th-order Butterworth and Critically-damped ones are easy to >> implement in 2-pole sections. However, the Bessel is giving >> me trouble; I can't figure out how to decompose the s-domain >> polynomial s^4 + 10s^3 + 45s^2 + 105s + 105 into two 2nd-order >> polynomials. > >The roots for 1 10 45 105 105 are: > >-2.896212-0.867234i >-2.896212+0.867234i >-2.103789+2.657418i >-2.103789-2.657418iGroan. I was kinda hoping they'd be nice whole numbers, or at least have functional form like cos(pi*f(n)) or something.>This should allow you to implement a Bessel filter as two two pole filters. >You need to get a math package.I know, but I can't afford one that does symbolic math. SciLab seems to be more for numerical applications. -Alex