Reply by Jerry Avins September 24, 20042004-09-24
Per Vognsen wrote:

> Jerry Avins <jya@ieee.org> wrote in message news:<415371aa$0$4027$61fed72c@news.rcn.com>... > >>Per Vognsen wrote: >> >> >>>I've been wondering whether the often-stated maximal flatness >>>conditions on analog Butterworth filters are enough to uniquely >>>determine the coefficients of the transfer function? Let's review >>>these conditions for a filter of order n: > > [...] > >>Set as many derivatives to zero at f=0 as there are degrees of freedom. > > > This was essentially my original plan of attack but doing this for a > general transfer function of order n gets really messy so I took > another less "mechanical" approach but one which I think still > provides decent motivation for how the Butterworth transfer functions > are derived. I just started learning this stuff a couple of days ago > so I hope the following is mostly accurate. I'll post it here in the > hopes that someone else might get something out of it. > > Motivation for the Butterworth filter > ===================================== > > Consider the ideal "brick-wall" analog low-pass filter. It has flat > phase response and an amplitude response defined by > > 1 if -1 <= w <= 1 > 0 otherwise > > This filter cannot be realized in practice, unfortunately. Thus we > have to be satisfied with various kinds of approximations. There are a > couple of obvious ways to approach this: either focus on approximating > just the phase response or just the amplitude response. Let's take the > amplitude response as a starting point.
You can come much closer to brick wall that with Butterworth if you allow certain departures from some of its features. A Butterworth's response is a monotonic function of frequency. By allowing ripple either in the pass- or stopband, a sharper cut-off can be had for a given complexity. There are some time-domain properties that deteriorate with sharper cut-off, but no worse than the grick-wall filter itself. [heavy math snipped; supper awaits] Jerry -- ... they proceeded on the sound principle that the magnitude of a lie always contains a certain factor of credibility, ... and that therefor ... they more easily fall victim to a big lie than to a little one ... A. H. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by glen herrmannsfeldt September 24, 20042004-09-24

Per Vognsen wrote:

(snip)

> It turns out to be easier to work with the energy of the brick-wall > filter rather than the amplitude response. These are related in a > simple manner: if H(s) is the transfer function for a filter then > |H(iw)| is the amplitude response at frequency w and the energy at > frequency w is |H(iw)|^2. Fortunately the amplitude response of the > brick-wall filter equals its energy.
Usually energy (also power and intensity) are the square of the amplitude. -- glen
Reply by Per Vognsen September 24, 20042004-09-24
Jerry Avins <jya@ieee.org> wrote in message news:<415371aa$0$4027$61fed72c@news.rcn.com>...
> Per Vognsen wrote: > > > I've been wondering whether the often-stated maximal flatness > > conditions on analog Butterworth filters are enough to uniquely > > determine the coefficients of the transfer function? Let's review > > these conditions for a filter of order n:
[...]
> > Set as many derivatives to zero at f=0 as there are degrees of freedom.
This was essentially my original plan of attack but doing this for a general transfer function of order n gets really messy so I took another less "mechanical" approach but one which I think still provides decent motivation for how the Butterworth transfer functions are derived. I just started learning this stuff a couple of days ago so I hope the following is mostly accurate. I'll post it here in the hopes that someone else might get something out of it. Motivation for the Butterworth filter ===================================== Consider the ideal "brick-wall" analog low-pass filter. It has flat phase response and an amplitude response defined by 1 if -1 <= w <= 1 0 otherwise This filter cannot be realized in practice, unfortunately. Thus we have to be satisfied with various kinds of approximations. There are a couple of obvious ways to approach this: either focus on approximating just the phase response or just the amplitude response. Let's take the amplitude response as a starting point. It turns out to be easier to work with the energy of the brick-wall filter rather than the amplitude response. These are related in a simple manner: if H(s) is the transfer function for a filter then |H(iw)| is the amplitude response at frequency w and the energy at frequency w is |H(iw)|^2. Fortunately the amplitude response of the brick-wall filter equals its energy. There are various features of the brick-wall filter's energy one can try to emulate when searching for an approximation. One is that the energy is even, i.e. the energies at w and -w are equal. This is actually true for the energy of any filter. This rules out a whole class of potential approximations straight off the bat. Another pair of noteable features is that it is flat at w = 0 and asymptotic to the frequency axis. Yet another feature is that the filter should pass DC through unmodified, so the energy at w = 0 should be unity. As far as being asymptotic to the frequency axis is concerned, a simple function with this property is the function 1/w whose graph is a hyperbola. The function 1/w is not even though, and hence unsuitable as an energy function. We can fix this since squaring any function results in an even function, and the square of 1/w, namely 1/w^2, inherits the property of being asymptotic to the frequency axis. So far we have managed to find an approximation to the ideal energy that is even and asymptotic to to the frequency axis. The function 1/w^2 does not satisfy the requirement of being flat at w = 0, since it blows up (tends to infinity) as w approaches 0. We can get around this by adding a positive number to the denominator, thus preventing the denominator from ever becoming zero. Denoting this number by C, the proposed modification is 1/(C + w^2). It is important to note that this modified version of 1/w^2 still possesses the properties of being even and asymptotic to the frequency axis. The only property left to consider is that the energy should be unity at w = 0. Evaluating our energy approximation at w = 0, we get 1/C. Since we want this to be unity, we set C = 1. We have thus arrived at the following amplitude response approximation: E(w) = |H(iw)|^2 = 1/(1 + w^2) The cut-off frequency of a filter is defined as the lowest frequency where the amplitude response is sqrt(1/2), corresponding to an energy of 1/2. Letting w_c denote the cut-off frequency, this condition can be written as E(w_c) = 1/2 Solving this equation for w_c, 1/(1 + w_c^2) = 1/2 1 = 1/2 + 1/2 w_c^2 w_c^2 = 1 w_c = +/- 1 and hence the cut-off is at +/- 1. If our desired cut-off frequency +/- w_c is different from 1, we can perform the substitution w -> w/w_c to shift the cut-off. This energy approximation represents the lowest order approximation to the ideal energy function. We can raise the w^2 term in the denominator to higher integer powers without changing the properties we have been focusing on. Letting n be a positive integer, define E_n(w) = 1/(1 + (w^2)^n) = 1/(1 + w^2n) Our original approximation E(w) corresponds to the n = 1 case. As higher and higher values of n are used, the energy at w = 0 becomes increasingly flat and the downward slope becomes steeper and steeper. In the n -> infinity limit, we in fact get the ideal brick-wall energy. We now have an energy approximation but we ultimately need a transfer function if we want to perform any filtering. Thus we seek a transfer function H_n such that |H_n(iw)|^2 = E_n(f) for a given choice of n. That is, |H_n(s)|^2 = H_n(s) = E_n(-i s) since s = iw. Plugging this into E_n, we find that E_n(-i s) = 1/(1 + (i^2)^n s^2n) = 1/(1 + (-1)^n s^2n) We can factor the denominator polynomial 1 + (-1)^n s^2n into 2n linear factors, due to the fundamental theorem of algebra; each linear factor corresponds to a root of the polynomial. Furthermore, since the coefficients of the polynomial are real, it follows that the linear factors (i.e. the roots) occur in complex-conjugate pairs. We can group the roots into two disjoint subsets, each of size n. The first subset contains all the roots in the upper half-plane, and the second subset contains those in the lower half-plane. Denote those in the upper half-plane by a_1, ..., a_n and those in the lower half-plane by b_1, ..., b_n such that a_i is conjugate to b_i for each i = 1, ..., n. We can then factor E_n(-i s) into a pair of conjugate polynomials E_n(-i s) = 1/((s - a_1) ... (s - a_n)) 1/((s - b_1) ... (s - b_n)) Note that the second factor is conjugate to the first because conjugation distributes over multiplication. We are almost there! If we set H_n(s) = 1/((s - a_1) ... (s - a_n)) then it is easy to see that we have |H_n(s)|^2 = E_n(-i s) = E_n(w) since |H_n(s)|^2 = H_n(s) conj(H_n(s)).
Reply by Jerry Avins September 24, 20042004-09-24
Randy Yates wrote:

> Jerry Avins <jya@ieee.org> writes: > >>[...] >>Jerry >>-- >>... they proceeded on the sound principle that the magnitude of a lie >>always contains a certain factor of credibility, ... and that therefor >>... they more easily fall victim to a big lie than to a little one ... >> A. H. >>&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295; > > > Hey Jerry, > > I'm getting a long string of octal 227's at the end of your posts after > your .sig. Can you see it above? What's up with that? It just started > happening today (I think).
Could that be the underlining on my sig? I use the same character the "Engineering is ..." sig. What you sent looks OK here. Jerry
Reply by Randy Yates September 23, 20042004-09-23
Jerry Avins <jya@ieee.org> writes:
> [...] > Jerry > -- > ... they proceeded on the sound principle that the magnitude of a lie > always contains a certain factor of credibility, ... and that therefor > ... they more easily fall victim to a big lie than to a little one ... > A. H. > &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Hey Jerry, I'm getting a long string of octal 227's at the end of your posts after your .sig. Can you see it above? What's up with that? It just started happening today (I think). -- % Randy Yates % "With time with what you've learned, %% Fuquay-Varina, NC % they'll kiss the ground you walk %%% 919-577-9882 % upon." %%%% <yates@ieee.org> % '21st Century Man', *Time*, ELO http://home.earthlink.net/~yatescr
Reply by Jerry Avins September 23, 20042004-09-23
Per Vognsen wrote:

> I've been wondering whether the often-stated maximal flatness > conditions on analog Butterworth filters are enough to uniquely > determine the coefficients of the transfer function? Let's review > these conditions for a filter of order n: > > * The DC must be passed through the filter unmodified, |H(0)| = 1. > * The cut-off frequency must be at w = 1. (Cut-off normalization.) > * The 2n-1 first derivatives of |H(iw)| vanish for w = 0. (Maximal > flatness at w = 0.) > * The 2n-1 first derivatives of |H(iw)| as well as |H(iw)| itself must > be asymptotic to the frequency axis. (Maximal flatness at w = > infinity.) > > Consider the transfer function H(s) of an nth order Butterworth > filter. The transfer function is a ratio of polynomials, each of > degree n. Thus there are 2n coefficients in total. However, there are > only 2n-1 degrees of freedom since one can normalize the leading > coefficient of the numerator to be 1. > > I'm not sure exactly how to approach the derivation. If we assume that > the amplitude response is polynomial in w, then there is a unique > polynomial amplitude response of degree 4n+1 (since there are 4n+2 > conditions) that satisfies the above conditions. The question is then > how to go from the amplitude response to the transfer function. Since > there are only 2n-1 degrees of freedom in the choice of the transfer > function, many of these 4n+2 conditions on the amplitude response must > be dependent. > > Can anyone give me a prod in the right direction? References to online > resources would be fine. If there are any misconceptions inherent in > what I state above, I'd love to have them corrected as well!
Set as many derivatives to zero at f=0 as there are degrees of freedom. If x is the non-dimensional parameter f/f_c, and the filter order is n, then the transfer function for a low-pass Butterworth is H(x) = 1/{1 + jx^n), IIRC. The numerator is constant; the in the denominator has only two terms. Jerry -- ... they proceeded on the sound principle that the magnitude of a lie always contains a certain factor of credibility, ... and that therefor ... they more easily fall victim to a big lie than to a little one ... A. H. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Per Vognsen September 23, 20042004-09-23
I've been wondering whether the often-stated maximal flatness
conditions on analog Butterworth filters are enough to uniquely
determine the coefficients of the transfer function? Let's review
these conditions for a filter of order n:

* The DC must be passed through the filter unmodified, |H(0)| = 1.
* The cut-off frequency must be at w = 1. (Cut-off normalization.)
* The 2n-1 first derivatives of |H(iw)| vanish for w = 0. (Maximal
flatness at w = 0.)
* The 2n-1 first derivatives of |H(iw)| as well as |H(iw)| itself must
be asymptotic to the frequency axis. (Maximal flatness at w =
infinity.)

Consider the transfer function H(s) of an nth order Butterworth
filter. The transfer function is a ratio of polynomials, each of
degree n. Thus there are 2n coefficients in total. However, there are
only 2n-1 degrees of freedom since one can normalize the leading
coefficient of the numerator to be 1.

I'm not sure exactly how to approach the derivation. If we assume that
the amplitude response is polynomial in w, then there is a unique
polynomial amplitude response of degree 4n+1 (since there are 4n+2
conditions) that satisfies the above conditions. The question is then
how to go from the amplitude response to the transfer function. Since
there are only 2n-1 degrees of freedom in the choice of the transfer
function, many of these 4n+2 conditions on the amplitude response must
be dependent.

Can anyone give me a prod in the right direction? References to online
resources would be fine. If there are any misconceptions inherent in
what I state above, I'd love to have them corrected as well!