DSPRelated.com
Forums

Wanted: critically-damped high-pass IIR filter

Started by axlq July 31, 2004
axlq wrote:

> In article <10gu9cutj123gf7@corp.supernews.com>, > Tim Wescott <tim@wescottnospamdesign.com> wrote: > >>By "critically damped" do you mean "poles only occur in pairs on the >>real line" or do you mean "monotonic time domain response"? >> >>Where I come from (control theory) "critically damped" means the former, >>_not_ the latter. > > > Where I come from, it means that the response to a step function > converges most quickly without overshoot. I'm not well-versed > enough in this field of DSP to know what that means in terms of > distribution of poles and zeros. > > The critically-damped filter I was using looks exactly like a > Butterworth, except for a term in the coefficient denominator being > 2W instead of sqrt(2)W, where W is "omega" the angular cutoff > frequency. > > I have described the calculations for this filter at > http://unicorn.us.com/alex/buttercrit.html > > The calculation includes a correction factor for the cutoff > frequency when cascading multiple filters, to preserve the 3 dB > frequency at the desired value. > > -Alex
I need to go look at my books for common usage. A 2nd-order critically damped filter is one where the two poles fall on top of each other, so the denominator looks like (s + a)^2 or (z - b)^2. This is satisfied nicely by your "d=2" expression. I'm pretty sure that usage (if there is any at all) talks about the damping of pole pairs, but not of a monotonic-in-time filter being "critically damped". -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
axlq wrote:

> In article <410fbb50$0$2820$61fed72c@news.rcn.com>, > Jerry Avins <jya@ieee.org> wrote: > >>axlq wrote: >> >> >>> ... If I had any more than my limited >>>DSP knowledge, I'd try to come up with a 4th-order or 6th-order >>>critically-damped highpass filter in one go, rather than by stacking >>>2nd-order filters, but I don't have the knowledge to construct such >>>a thing. >> >>Whatever you design, implement as a cascade of second-order sections. >>Higher orders lead to numerical instability, such as needing the >>difference between large approximate numbers yielding a result whose >>potential error exceeds its size. Cascades are hard enough -- in >>practice, even their order matters. Don't buy trouble. > > > Even a 4th-order Bessel will lead to instability? Or a 4th-order > critically damped Butterworth-like thing? > > The reason I wanted this was because I noticed that my 2nd-order > critically damped high pass filter, when cascaded, stopped being > critically damped. I suspected that the stacking might be > responsible somehow. This made me curious if a 4th-order critically > damped highpass filter, designed from scratch, would exhibit the > same ringing I observed when cascading two 2nd order filters. > > -Alex
Personally I'm careful even around 2nd-order filters. If I can I realize resonant 2nd-order filters in state-space, where [ w d ] x_n = | | * x_{n-1} + b * u_n, y_n = c * x_{n-1} + d * u_n. [ -d w ] 2nd-order non-resonant filters should _always_ be broken down into 1st-order filters. The reason it's an issue is because the amount that your poles will move for infinitesimal changes in the coefficients can be astounding, and the modes of your filter are often not well separated from the states (meaning that your filter states are very close together even though the filter is due for a large excursion). It's worst when you have poles close to 1, when even a slight truncation of a coefficient or a state can be disastrous. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Randy Yates wrote:

> Tim Wescott <tim@wescottnospamdesign.com> writes: > >>Cascading two second order Butterworths doesn't give you one fourth >>order Butterworths, but _any_ 2N-order filter can be made by cascading >>N 2nd-order filters. >> >>You just make one 2nd-order filter for each of the complex pole >>pairs in the big filter, distribute your zeros appropriately, and >>cascade away. > > > Your point, then, is that, e.g., a fourth-order Butterworth does > not decompose into second-order Butterworths when factored. That > is, the second-order sections that result from factoring a > fourth-order Butterworth are not Butterworth. > > This may be true (my books are at work so I can't look up the > defining characteristics of Butterworth filters), but I don't > think relevent to the OPs inquiry. He just wants a high order > filter with no overshoot or ringing and could give a squat > as to whether or not the individual sections are Butterworth, > Bessel, or Rube Goldberg.
Well, he cares to the extent that a Bessel or a Butterworth can be looked up in a book and used, while a Rube Goldberg must be whipped up on the spot, then proven to work right. If he doesn't want a filter that rings he doesn't want a Butterworth; anything with that sharp of a corner in the frequency response will ring. A Bessel may work; he'll have to try it out. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Jon Harris wrote:

-- snip --
> Another poster pointed out that this is a Linkwitzt-Riley filter, often used in > audio crossovers. > >
The first time that filter was cited I figured it was in a class with left-handed monkey wrenches and cans of vacuum (for charging vacuum lines, don't ya know). I now believe that they may actually exist. But I'm going to check. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
axlq wrote:

> In article <2na4dhFtq2njU1@uni-berlin.de>, > Jon Harris <goldentully@hotmail.com> wrote: > >>Randy is arguing that any higher order filter can be decomposed into second >>order sections (with possibly an odd first order section required). We all >>agree with that. >> >>Jerry is arguing that you can't make a 4th order Butterworth out of two 2nd >>order Butterworths. I think we all agree with that as well. >> >>There is no discrepancy, merely two people arguing two different points. > > > And this all started with me quoting a web page > http://www.rane.com/note147.html which stated that cascading N > 2-order Butterworths gives you a 2N-order Butterworth, because the > filter coefficients for any 2N-order Butterworth can be calculated > via recursing the 2-order coefficients. I now know that, while the > latter is true, the former is not. > > -Alex
I didn't find that after a cursory look at the page. Could you have misinterpreted what Miller intended? (I know how easy that is!) 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;
axlq wrote:

> In article <410fd4a4$0$2824$61fed72c@news.rcn.com>, > Jerry Avins <jya@ieee.org> wrote: > >>I don't understand what case you rest. Alex supposed that by cascading >>two order-N filters of a particular type, he would realize an order-2N >>filter of the same type. I tried to disabuse him. > > > And you did. I think what both of you are saying, both of you can agree > with: > > Jerry: You can't get a 2N-order Butterworth (or any specific type) by > cascading N 2-order filters of that type. > > Randy: You CAN get some sort of 2N-order filter by cascading N > 2-order filters. > > Both statements are true, are they not? > > -Alex
Yes. 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;
axlq wrote:

> In article <410fbb50$0$2820$61fed72c@news.rcn.com>, > Jerry Avins <jya@ieee.org> wrote: > >>axlq wrote: >> >> >>> ... If I had any more than my limited >>>DSP knowledge, I'd try to come up with a 4th-order or 6th-order >>>critically-damped highpass filter in one go, rather than by stacking >>>2nd-order filters, but I don't have the knowledge to construct such >>>a thing. >> >>Whatever you design, implement as a cascade of second-order sections. >>Higher orders lead to numerical instability, such as needing the >>difference between large approximate numbers yielding a result whose >>potential error exceeds its size. Cascades are hard enough -- in >>practice, even their order matters. Don't buy trouble. > > > Even a 4th-order Bessel will lead to instability? Or a 4th-order > critically damped Butterworth-like thing? > > The reason I wanted this was because I noticed that my 2nd-order > critically damped high pass filter, when cascaded, stopped being > critically damped. I suspected that the stacking might be > responsible somehow. This made me curious if a 4th-order critically > damped highpass filter, designed from scratch, would exhibit the > same ringing I observed when cascading two 2nd order filters. > > -Alex
A particular 4th-order filter can be implemented many ways. There are many combinations of poles and zeros. Do it on one grand go, and you have a single 4th-order equation to compute. Hard. Factor it into cascaded 2nd-order sections, and some of the difficulty is relieved. There are several ways to combine poles and zeros to make the second-order sections. The ways are not equally stable. (Associating zeros with the poles closest to them is usually good.) Numerical stability is also affected by the order of the cascade. Math is science. Implementation is art. 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;
Tim Wescott wrote:

> axlq wrote: > >> In article <10gu9cutj123gf7@corp.supernews.com>, >> Tim Wescott <tim@wescottnospamdesign.com> wrote: >> >>> By "critically damped" do you mean "poles only occur in pairs on the >>> real line" or do you mean "monotonic time domain response"? >>> >>> Where I come from (control theory) "critically damped" means the >>> former, _not_ the latter. >> >> >> >> Where I come from, it means that the response to a step function >> converges most quickly without overshoot. I'm not well-versed >> enough in this field of DSP to know what that means in terms of >> distribution of poles and zeros. >> >> The critically-damped filter I was using looks exactly like a >> Butterworth, except for a term in the coefficient denominator being >> 2W instead of sqrt(2)W, where W is "omega" the angular cutoff >> frequency. >> >> I have described the calculations for this filter at >> http://unicorn.us.com/alex/buttercrit.html >> >> The calculation includes a correction factor for the cutoff >> frequency when cascading multiple filters, to preserve the 3 dB >> frequency at the desired value. >> >> -Alex > > > I need to go look at my books for common usage. A 2nd-order critically > damped filter is one where the two poles fall on top of each other, so > the denominator looks like (s + a)^2 or (z - b)^2. This is satisfied > nicely by your "d=2" expression. I'm pretty sure that usage (if there > is any at all) talks about the damping of pole pairs, but not of a > monotonic-in-time filter being "critically damped".
In the old days (I'm talking J.C.Maxwell), "critical damping" referred to monotonic time response. A moving-coil galvanometer is critically damped if it doesn't overshoot. (Technicians and other hands-on types called this property "dead beat".) I don't think that the meaning has changed much. Saying that the damping factor is unity or describing the pole properties that achieve it ought to be just another description. I suspect that exceptions are anomalies. 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;
"Tim Wescott" <tim@wescottnospamdesign.com> wrote in message
news:10h0vbugqrh8b99@corp.supernews.com...
> Jon Harris wrote: > > -- snip -- > > Another poster pointed out that this is a Linkwitzt-Riley filter, often used
in
> > audio crossovers. > > > > > The first time that filter was cited I figured it was in a class with > left-handed > monkey wrenches and cans of vacuum (for charging vacuum lines, don't ya > know). I now believe that they may actually exist. > > But I'm going to check.
I'll save you some time: http://www.rane.com/note107.html
"axlq" <axlq@spamcop.net> wrote in message news:cep2ht$7vs$3@blue.rahul.net...
> In article <410fbb50$0$2820$61fed72c@news.rcn.com>, > > >Whatever you design, implement as a cascade of second-order sections. > >Higher orders lead to numerical instability, such as needing the > >difference between large approximate numbers yielding a result whose > >potential error exceeds its size. Cascades are hard enough -- in > >practice, even their order matters. Don't buy trouble. > > Even a 4th-order Bessel will lead to instability? Or a 4th-order > critically damped Butterworth-like thing?
"It depends." The factors it depends on are 1) the numeric precision you are using (8, 16, 24, 32... bit) and if it is fixed vs. floating point, 2) the filter implementation (direct form, etc.) 3) the filter parameters, especially cut-off frequency relative to sample rate (filters with very low cut-off frequencies relative to sample rate tend to have more problems). The "safe" way is to always break it down into 2nd order sections. If there is a strong reason to do otherwise, thoroughly test your filter across all operating parameters.