DSPRelated.com
Forums

Discrete high-pass Butterworth filter design rules

Started by marcin123 February 22, 2012
On 2/22/2012 2:15 PM, robert bristow-johnson wrote:
> On 2/22/12 1:34 PM, Jerry Avins wrote: >> On 2/22/2012 12:23 PM, robert bristow-johnson wrote: >>> On 2/22/12 11:33 AM, Jerry Avins wrote: >>>> >>>> A filter of order N has N degrees of freedom. >>> >>> ?? >>> >>> if you include IIR, i always thought that an Nth order filter has 2N+1 >>> degrees of freedom. 2N+1 knobs that can be twisted in arbitrary amounts. >>> >>> there are (for a canonical form) N states. is that what you mean, Jerry? >> >> Sort of. A digital "Butterworth" of order N has 2N+1 coefficients. > > okay, you said "filter of order N", now you're qualifying which kind of > filter. i would expect that tossing in such a qualification reduces the > number of knobs. it seems to me that once "Butterworth" is tossed in and > the order N is fixed, you have a switch (HPF, LPF, BPF, BRF), a knob for > frequency and another knob for overall gain. 2.5 degrees of freedom. if > you fix the switch to a setting, ain't the only controls what frequency > to set and how much gain? > >> The >> analog form that it imitates with reasonable success, "maximally flat >> magnitude response*", for which G(w) = 1/sqrt(1+w^2n). This results >> directly from setting all derivatives equal to zero at f=0. > > yeah, i know about that. > >> The >> different digital approximations (impulse invariance, bilinear >> transform) yield different filters. > > and that. > >> So what I meant was zeroing all accessible derivatives of the analog >> filter and deriving the digital approximation from the result. > > oh, i see. for (analog) Butterworth, you have to assume no zeros, and in > the denominator of |H(s)|^2, you have N-1 terms of w^2, w^4, etc., where > you set the coefs to zero to get maximally flat. i see it as N-1 > degrees, not N.
N includes the zeroth derivative, which can't be diddled. so you're right. Thanks. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
On Feb 22, 12:23�pm, robert bristow-johnson
<r...@audioimagination.com> wrote:
> On 2/22/12 11:33 AM, Jerry Avins wrote: > > > > > A filter of order N has N degrees of freedom. > > ?? > > if you include IIR, i always thought that an Nth order filter has 2N+1 > degrees of freedom. &#4294967295;2N+1 knobs that can be twisted in arbitrary amounts. > > there are (for a canonical form) N states. &#4294967295;is that what you mean, Jerry? > > -- > > r b-j &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;r...@audioimagination.com > > "Imagination is more important than knowledge."
For a butterworth, the normalized amplitude function is (1+w^2N)^-0.5, where w is radian frequency and N is the filter order. The zeroth order derivative can't be zero, hence the nominal value of 1 for w==DC. But then the next 2N-1 derivatives of the amplitude function are zero at DC. Other types of lowpass IIR filters, chebyshevs, for example have an amplitude function (1+epsilon*P(w))^-0.5 where P(w) is a polynomial of order 2N. When P(w) = w^2N, we maximize the number of derivatives = 0 at w==0. This is why a butterworth filter is often described as maximally flat at DC. Clay
>(1) is the cannonical difference equation for a 2nd-order IIR filter. > >(2) and (3) place a double zero at DC, insuring "high-pass-ness" > >(4) is exceptionally hard to believe, because it places a pole > at DC, which not only makes the filter metastable, but > forces the other pole to be real. The filter should be > of the form a1/a0 = -2 * cos(theta) and a2/a0 = d^2, where > theta is the filter's natural frequency in radians/sample, > and d is a function of theta that establishes the filter's > "Butterworth-ness" (I don't know what it is off the top > of my head -- I almost exclusively do control and comm > stuff, neither of which calls for this sort of filter). > > Since |2 * cos(theta)| < 2 for all real-valued and non- > trivial values of theta, and since |d| < 1 for a stable > filter, your rule (4) just cannot be. Are you sure that > you're looking at all the digits, and is the software > right? > >-- >My liberal friends think I'm a conservative kook. >My conservative friends think I'm a liberal kook. >Why am I not happy that they have found common ground? > >Tim Wescott, Communications, Control, Circuits & Software >http://www.wescottdesign.com >
Hi Tim, and others. I just discovered I didn't thank you for your answers back when I needed them. They helped me a lot. Sorry, and thank you.