DSPRelated.com
Forums

Wanted: critically-damped high-pass IIR filter

Started by axlq July 31, 2004
"Tim Wescott" <tim@wescottnospamdesign.com> wrote in message
news:10h0v2fothvrk9a@corp.supernews.com...
> axlq wrote: > > > > 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.
I haven't found it to be quite that ticklish, but then, I'm probably spoiled working with 32-bit floating point DSPs. With fewer bits, Tim's suggestions make more sense.
"axlq" <axlq@spamcop.net> wrote in message news:cep3vq$7vs$4@blue.rahul.net...
> In article <2n9vicFu6stdU1@uni-berlin.de>, > Jon Harris <goldentully@hotmail.com> wrote: > >"Randy Yates" <yates@ieee.org> wrote in message news:acxciftz.fsf@ieee.org... > > > >> 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. > > > >It may be relevant because the OP had complained that when he > >cascaded 2 of his identical filters, the response wasn't what he > >expected/wanted. > > You're both right... > > I did complain that the cascading two of my critically-damped > 2nd-order filters resulted in losing the critical damping. And yes, > I really do want a high-order high-pass filter that's critically > damped, with no overshoot or ringing, and I don't care what kind of > filter it is or how it's constructed, as long as it works. It needs > to be an IIR filter because I may need to dynamically change the > cutoff in real time, and this isn't practical with an FIR filter. > > Peter Nachtwey posted in this thread the algorithm for a 2-pole > highpass Bessel. I coded it up last night but haven't tried > stacking them yet to see how the damping works at higher orders > (I had to leave on a business trip, so won't get back to it until > Friday). I was interested to see that the frequency response falls > off at the same rate as the critically-damped "Butterworth" filter, > although the Bessel has a slightly sharper shoulder when adjusted > for the same 3 dB point.
FYI, when a higher-order Bessel filter is implemented as second order sections, not only is the damping factor different for each section, but the cut-off frequency is as well. For Butterworth, each section retains the same cut-off (that of the overall filter) and only the damping factor changes. For example a 4th order Bessel filter with a 3dB point (Fc) of 1kHz consists of a 2nd order section with Fc=1436 Hz/Q = 0.5219 followed by one with Fc=1610 Hz/Q=0.8058. The same Butterworth filter would be Fc=1000 Hz/Q=1.3065 followed by Fc=1000 Hz/Q=0.5412. Sometimes some concrete numbers help illustrate a point.
> As the "OP" here, I want to thank you all for the lively discussion. > I don't know much about deriving my own filters (yet). Z-transforms > and how to use them still mystify me (although I'm slowly "getting > it"). I don't have any feel for how poles and zeros must be > distributed in the z plane to get the behavior I want -- especially > balancing my frequency-domain requirements with my time-domain > requirements. And I suspect I might need to learn something like > Matlab or Mathcad. All of this seems like a dauntingly steep > learning curve to build a little filter. Is there any good book or > web site that is technically detailed yete intellectually accessible > to a layman? Everything I find is either too basic or too obscure. > All I know about DSP I've learned by osmosis, and this thread has > contributed much enlightenment. > > Even better, if a "DSP Recipes" book exists, analogous to the > classic "Numerical Recipes" book, that would be a godsend. I can > sort of understand the FIR/IIR filtering chapter in Numerical > Recipes, but there's not enough there.
I've had good success implementing basic IIR filters using RB-J's filter cookbook: http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt He has formulas for the HP coefs given any arbitrary Q or damping factor. I also second the recommendation made elsewhere to obtain a math package for quick testing of ideas.
Tim Wescott <tim@wescottnospamdesign.com> writes:
> [...] > 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.
For a second-order system, they're one and the same thing. -- Randy Yates Sony Ericsson Mobile Communications Research Triangle Park, NC, USA randy.yates@sonyericsson.com, 919-472-1124
Randy Yates wrote:

> Tim Wescott <tim@wescottnospamdesign.com> writes: > >>[...] >>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. > > > For a second-order system, they're one and the same thing.
Exactly so. Confusion arises because for higher-order systems they can differ, and because it's unclear to youngsters which is the defining characteristic and which is derived. I submit that the behavior was characterized before the advent of root-locus plots, and so barely monotonic gets my vote. On the other hand (and a good thing I have only two), if math-minded whippersnappers want to appropriate "critically damped" to apply to pole positions, we can always fall back on "dead beat" to describe "fastest possible response without overshoot". 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;
Jerry Avins wrote:

> Randy Yates wrote: > >> Tim Wescott <tim@wescottnospamdesign.com> writes: >> >>> [...] 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. >> >> >> >> For a second-order system, they're one and the same thing. > > > Exactly so. Confusion arises because for higher-order systems they can > differ, and because it's unclear to youngsters which is the defining > characteristic and which is derived. I submit that the behavior was > characterized before the advent of root-locus plots, and so barely > monotonic gets my vote. On the other hand (and a good thing I have only > two), if math-minded whippersnappers want to appropriate "critically > damped" to apply to pole positions, we can always fall back on "dead > beat" to describe "fastest possible response without overshoot". > > Jerry
Not to be confused with deadbeat dads or deadbeat escapement. -- 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;
This excerpt explains a little of how he came to be Lord Kelvin.
http://www.wordiq.com/definition/William_Thomson,_1st_Baron_Kelvin

With a receiving instrument set to indicate a particular strength of 
current, the rate of signalling would be very slow on long cables 
compared to land lines; so a different form of instrument was required 
for cable work. This fact stood greatly in the way of early cable 
enterprise. Thomson first solved the difficulty by his invention of the 
"mirror galvanometer". The merit of this receiving instrument is, that 
it indicates with extreme sensibility all the variations of the current 
in the cable, so that, instead of having to wait until each signal wave 
sent into the cable has travelled to the receiving end before sending 
another, a series of waves may be sent after each other in rapid 
succession. These waves, encroaching upon each other, will coalesce at 
their bases; but if the crests remain separate, the delicate decipherer 
at the other end will take cognisance of them and make them known to the 
eye as the distinct signals of the message.
Mirror galvanometer

The mirror galvanometer is at once beautifully simple and exquisitely 
scientific. It consists of a long fine coil of silk-covered copper wire, 
and in the heart of the coil, within a little air-chamber, a small round 
mirror, with four tiny magnets cemented to its back, is hung, by a 
single fibre of floss silk no thicker than a spider's line. The mirror 
is of film glass silvered, the magnets of hair-spring, and both together 
sometimes weigh only one-tenth of a grain. A beam of light is thrown 
from a lamp upon the mirror, and reflected by it upon a white screen or 
scale a few feet distant, where it forms a bright spot of light. When 
there is no current on the instrument, the spot of light remains 
stationary at the zero position on the screen; but the instant a current 
traverses the long wire of the coil, the suspended magnets twist 
themselves horizontally out of their former position, the mirror is of 
course inclined with them, and the beam of light is deflected along the 
screen to one side or the other, according to the nature of the current. 
If a positive current gives a deflection to the right of zero, a 
negative current will give a deflection to the left of zero, and vice versa.

The air in the little chamber surrounding the mirror is compressed at 
will, so as to act like a cushion, and "deaden" the movements of the 
mirror. The needle is thus prevented from idly swinging about at each 
deflection, and the separate signals are rendered abrupt and "dead 
beat", as it is called. At a receiving station the current coming in 
from the cable has simply to be passed through the coil of the "speaker" 
before it is sent into the ground, and the wandering light spot on the 
screen faithfully represents all its variations to the clerk, who, 
looking on, interprets these, and cries out the message word by word. 
The small weight of the mirror and magnets which form the moving part of 
this instrument, and the range to which the minute motions of the mirror 
can be magnified on the screen by the reflected beam of light, which 
acts as a long impalpable hand or pointer, render the mirror 
galvanometer marvellously sensitive to the current, especially when 
compared with other forms of receiving instruments. Messages could be 
sent from the UK to the USA through one Atlantic cable and back again 
through another, and there received on the mirror galvanometer, the 
electric current used being that from a toy battery made out of a lady's 
silver thimble, a grain of zinc, and a drop of acidulated water.

The practical advantage of this extreme delicacy is that the signal 
waves of the current may follow each other so closely as almost entirely 
to coalesce, leaving only a very slight rise and fall of their crests, 
like ripples on the surface of a flowing stream, and yet the light spot 
will respond to each. The main flow of the current will of course shift 
the zero of the spot, but over and above this change of place the spot 
will follow the momentary fluctuations of the current which form the 
individual signals of the message. What with this shifting of the zero 
and the very slight rise and fall in the current produced by rapid 
signalling, the ordinary land line instruments are quite unserviceable 
for work upon long cables.



-- 
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;

In article <4111090b$0$2818$61fed72c@news.rcn.com>,
Jerry Avins  <jya@ieee.org> wrote:
>> 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 > >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!)
Aargh. Wrong URL. I meant: http://kwon3d.com/theory/filtering/fil.html ...which is gone. They seem to have reorganized the web site. Now you have to go to "Theories and Practice of Motion Analysis" / Data Processing / Butterworth Digital Filters / Filter Coefficients. Near the bottom there are some recursive formulas for generating filter coefficients for a Butterworth filter of order 2N. Following those formulas you'll find this: "For example, a 6th-order low-pass filter has 3 (6 divided by 2) elementary 2nd-order filters. Passing the data through these 3 2nd-order filters consecutively is the same to passing them through the 6th-order filter once." Now that I look at that sentence, it doesn't explicitly say that you get another Butterworth from cascading lower-order Butterworths. The implication is certainly there, however. -Alex
In article <411156d5$0$2849$61fed72c@news.rcn.com>,
Jerry Avins  <jya@ieee.org> wrote:
>This excerpt explains a little of how he came to be Lord Kelvin. >http://www.wordiq.com/definition/William_Thomson,_1st_Baron_Kelvin
Ah, yes, I used one of these in a college physics lab class, when studying damped harmonic oscillators. Except ours had a mirror that projected onto another mirror, and then another, back and forth until the light emerged on the screen, resulting in a very long light beam folded inside the unit, requiring infitesimal movement of the mirror to cause a large motion on the screen. And air pressure wasn't used for damping. Instead, a variable resistor was placed in parallel with the coil of wire, so that the natural induction between the magnet and the coil would induce an opposing force on the magnet mirrors, damping the motion. You could adjust the resistor for overdamping, underdamping, or critical damping as needed. -A
axlq wrote:

   ...

> Following those formulas you'll find this: "For example, a 6th-order > low-pass filter has 3 (6 divided by 2) elementary 2nd-order > filters. Passing the data through these 3 2nd-order filters > consecutively is the same to passing them through the 6th-order > filter once." > > Now that I look at that sentence, it doesn't explicitly say that you > get another Butterworth from cascading lower-order Butterworths. > The implication is certainly there, however. > > -Alex
Only if you expect it to be there. Knowing better, I wouldn't hav imagines it meaning that. It's a bind: you can't even walk down the block without making assumptions, and there's no way to identify them all or check them out if there were. We're all bound to get stung sometime. It's only a question of how often. 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 <411156d5$0$2849$61fed72c@news.rcn.com>, > Jerry Avins <jya@ieee.org> wrote: > >>This excerpt explains a little of how he came to be Lord Kelvin. >>http://www.wordiq.com/definition/William_Thomson,_1st_Baron_Kelvin > > > Ah, yes, I used one of these in a college physics lab class, when > studying damped harmonic oscillators. > > Except ours had a mirror that projected onto another mirror, > and then another, back and forth until the light emerged on the > screen, resulting in a very long light beam folded inside the unit, > requiring infitesimal movement of the mirror to cause a large motion > on the screen. And air pressure wasn't used for damping. Instead, > a variable resistor was placed in parallel with the coil of wire, > so that the natural induction between the magnet and the coil would > induce an opposing force on the magnet mirrors, damping the motion. > You could adjust the resistor for overdamping, underdamping, or > critical damping as needed. > > -A
The resistor reduces the sensitivity by shunting some of the current away from the coil. The one in my mechanical VOM has the coil wound on a conductive bobbin whose thickness is part of the design. It seems to be a bit overdamped. 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;