> in article 98SdnWv0t6g60A7enZ2dnUVZ_s6dnZ2d@rcn.net, Jerry Avins at
> jya@ieee.org wrote on 12/04/2005 15:12:
>
>
>>robert bristow-johnson wrote:
>>
>>...
>>
>>
>>>now if "s" is normalized, then it does *not* have dimension. and then
>>>the BLT substitution is
>>>
>>>(normalized) s <-- (1/tan(w0/2)) * (z-1)/(z+1)
>>>
>>>where w0 is your significant frequency (radian/sample) in the actual
>>>digital filter corresponding to "1" is the normalized analog
>>>prototypes.
>>
>>Say again? the argument to a trig function (or any other transcendental)
>>*must* be dimensionless.
>
>
> correct, and radian/sample *is* dimensionless. w0 is essentially the angle
> (in radians) of the significant frequency placed on the unit circle. it's
> the same w0 as in the cookbook: w0 = 2*pi*f0/Fs .
I generally use w as frequency. For normalizing in analog filter design,
x = w/w_0 is common. Using W for frequency and w for normalized
frequency is another shorthand, but somehow, you don't inspire me to
think of capital letters. :-)
Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
Reply by robert bristow-johnson●December 4, 20052005-12-04
in article 98SdnWv0t6g60A7enZ2dnUVZ_s6dnZ2d@rcn.net, Jerry Avins at
jya@ieee.org wrote on 12/04/2005 15:12:
> robert bristow-johnson wrote:
>
> ...
>
>> now if "s" is normalized, then it does *not* have dimension. and then
>> the BLT substitution is
>>
>> (normalized) s <-- (1/tan(w0/2)) * (z-1)/(z+1)
>>
>> where w0 is your significant frequency (radian/sample) in the actual
>> digital filter corresponding to "1" is the normalized analog
>> prototypes.
>
> Say again? the argument to a trig function (or any other transcendental)
> *must* be dimensionless.
correct, and radian/sample *is* dimensionless. w0 is essentially the angle
(in radians) of the significant frequency placed on the unit circle. it's
the same w0 as in the cookbook: w0 = 2*pi*f0/Fs .
--
r b-j rbj@audioimagination.com
"Imagination is more important than knowledge."
Reply by Jerry Avins●December 4, 20052005-12-04
robert bristow-johnson wrote:
...
> now if "s" is normalized, then it does *not* have dimension. and then
> the BLT substitution is
>
> (normalized) s <-- (1/tan(w0/2)) * (z-1)/(z+1)
>
> where w0 is your significant frequency (radian/sample) in the actual
> digital filter corresponding to "1" is the normalized analog
> prototypes.
Say again? the argument to a trig function (or any other transcendental)
*must* be dimensionless.
Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
Reply by robert bristow-johnson●December 4, 20052005-12-04
John E. Hadstate wrote:
> I am quoting from Gold and Rader, Digital Processing of
> Signals, McGraw-Hill, 1969, Page 72:
>
> 1. Note the critical frequencies ... of the desired
> digital filter.... Compute a new set of
> frequencies by:
>
> w_A = tan (w_D * T / 2)
what are the units or even dimension of w_A? i am used to seeing
"digital" frequency as dimensionless (rad/sample is dimensionless), but
not "analog" frequency (unless we're talking about a normalized
frequency prototype). that expression is weird because it has it
backwards.
...
> 3. Replace s by (z-1)/(z+1) in H(s) and perform the
> algebra necessary to express the resulting H'(z)
> as a ratio of polynomials; this yields the
> desired digital filter.
there's a serious scaling issue here. if there is no Fs or 1/T in that
substitution, the dimension of "s" in the substitution of step cannot
be 1/time as it is in the basic BLT.
> This is the procedure I know by the name "Bilinear
> Transformation."
John that *is* a bilinear transformation, but the scaling is sloppy.
it's funny but i don't have Gold and Rader. long ago, i thought i was
buying it and i ended up getting Rabiner & Gold. anyway, all of the
texts i have (including Rick's book) have the BLT as
(not normalized) s <-- (2/T) * (z-1)/(z+1)
or a mathematical equivalent. "T" is the sampling period. you can see
that "s" has dimension of 1/time as a frequency quantity should have.
the Gold and Rader is letting the 2/T factors cancel each other out in
both. by simply leaving it off, they are defining the unit time to be
such that T = 2. so Nyquist is always 1/4. it's a little weird.
now if "s" is normalized, then it does *not* have dimension. and then
the BLT substitution is
(normalized) s <-- (1/tan(w0/2)) * (z-1)/(z+1)
where w0 is your significant frequency (radian/sample) in the actual
digital filter corresponding to "1" is the normalized analog
prototypes.
> > that means you CAN "get from a Butterworth LPF to a
> > Butterworth HPF
> > just by moving the zeros from -1 to +1,"
> >
>
> Well, that's what I saw in practice, but there were too many
> pieces missing for me to believe I was correctly
> interpreting what I was seeing.
call it serindipity, but your interpretation was correct. for a
digital Butterworth LPF designed using BLT, if you leave the poles
alone and move all of the zeros from z = -1 to z = +1, you end up with
a Butterworth HPF with -3 dB frequency unmoved. i think i went through
the math rigorously enough to prove it. (oh, i guess i never proved
that the complex reciprocal involves reciprocating the magnitude and
negating the angle, but i proved everything else.)
> Thanks for the analysis and confirmation.
yer welcome.
r b-j
Reply by John E. Hadstate●December 4, 20052005-12-04
"robert bristow-johnson" <rbj@audioimagination.com> wrote in
message
news:1133668505.293994.320680@o13g2000cwo.googlegroups.com...
> John E. Hadstate wrote:
>>
>>
>> I guess that means that you can't get from a Butterworth
>> LPF
>> to a Butterworth HPF just by moving the zeros from -1 to
>> +1,
>> which is what I did.
>
> YES YOU CAN! (but only for the Butterworth case.)
>
> i dunno if you're overlooking something, but, as far as i
> can see,
> you're not doing this quite right.
>
> first of all, the non-normalized BLT transformation is not
> s <-- (z-1)/(z+1) but is
>
> s <-- 2*Fs * (z-1)/(z+1)
>
I am quoting from Gold and Rader, Digital Processing of
Signals, McGraw-Hill, 1969, Page 72:
1. Note the critical frequencies ... of the desired
digital filter.... Compute a new set of
frequencies by:
w_A = tan (w_D * T / 2)
2. Design a transfer function H(s) with the
properties of the digital filter [using] the new
frequencies and ranges. There is no need to
synthesize H(s).
3. Replace s by (z-1)/(z+1) in H(s) and perform the
algebra necessary to express the resulting H'(z)
as a ratio of polynomials; this yields the
desired digital filter.
This is the procedure I know by the name "Bilinear
Transformation."
>
> that means you CAN "get from a Butterworth LPF to a
> Butterworth HPF
> just by moving the zeros from -1 to +1,"
>
Well, that's what I saw in practice, but there were too many
pieces missing for me to believe I was correctly
interpreting what I was seeing. Thanks for the analysis and
confirmation.
Reply by robert bristow-johnson●December 3, 20052005-12-03
John E. Hadstate wrote:
>
> Thanks, Robert. I had forgotten about the s-->1/s
> transformation.
but that preserves the -3 dB corner frequency only in the normalized
case. when W0 (the -3 dB corner frequency in the analog filter) is 1.
in general to transform from an LPF to HPF, it's s/W0 --> W0/s . i
chose to do this with normalized LPF (which is 1/(1+s)) and normalized
HPF (s/(1+s)) because there is nothing that says we can't define our
unit of time (or frequency) so that W0 is 1.
> When I tried it with a single real pole, I
> did not get filters with the pole locations in the same
> place:
>
> LPF(s) = a / (s + a)
here "a" is your pole (in rads/sec)
> HPF(s) = s / (s + (1/a))
hmmmm. now it's 1/a. are you sure that is what you wanna do?
> Translating a-->b and s-->(Z-1)/(Z+1) yields:
what's your sampling rate in this bilinear mapping? if your "a" and
"b" are
> LPF(Z) = (b/(b+1)) * (Z + 1) / (Z + (b-1)/(b+1))
>
> HPF(Z) = (b/(b+1)) * (Z - 1) / (Z + (1-b)/(1+b))
>
> I guess that means that you can't get from a Butterworth LPF
> to a Butterworth HPF just by moving the zeros from -1 to +1,
> which is what I did.
YES YOU CAN! (but only for the Butterworth case.) that is because for
the normalized LPF, substituting 1/s for s does NOT move the
Butterworth poles (that are equally spaced on the left half of the unit
circle in the s-plane) but *does* move the s-plane Butterworth zeros
that are at infinity for the LPF (and the BLT maps those to z = -1) to
zero for the HPF (and the BLT maps those to z = 1). i was trying to
affirm that observation of yours.
> Or am I overlooking something?
i dunno if you're overlooking something, but, as far as i can see,
you're not doing this quite right.
first of all, the non-normalized BLT transformation is not
s <-- (z-1)/(z+1) but is
s <-- 2*Fs * (z-1)/(z+1)
where s is not normalized. secondly, if w0 is the "significant
frequency" for your final design of the digital filter, to hit that
target exact, you have to compensate (pre-warp) the analog counterpart
to that, W0, anticipating the BLT frequency warping effect. a little
review:
s = 2*Fs*(z-1)/(z+1)
like the exact mapping of z = exp(s/Fs), the BLT mapping of z = (1 +
s/(2*Fs))/(1 - s/(2*Fs)) also maps the j*W axis in the s-plane to the
unit circle in the z plane (and back again), but to different
frequencies. so if we drive the digital filter with a sinusoid of
frequency is "w" in radians per sample, that will map to some frequency
on the j*W axis, but not precisely to j*w*Fs (which is where we would
hope if z = exp(s/Fs) = exp(j*w*Fs/Fs) = exp(j*w). so we plug exp(j*w)
into "z" every and see what comes out for "s".
s = 2*Fs*(exp(j*w)-1)/(exp(j*w)+1)
= 2*Fs*(exp(j*w/2)-exp(-j*w/2))/(exp(j*w/2)+exp(-j*w/2))
= 2*Fs*j*sin(w/2)/cos(w/2)
= j*2*Fs*tan(w/2)
so our actual digital filter frequency of w (rad/sample) maps to an
analog filter frequency of
W = 2*Fs*tan(w/2) (rad/sec if Fs is in Hz)
so if you want your actual corner frequency of the digital filter to
end up at w0 (rad/sample) then you have to design your analog corner
frequency to be at
W0 = 2*Fs*tan(w0/2)
now, for a general and complex filter, you have the freedom to prewarp
*every* significant frequency, if you have freedom to move that
frequency parameter around in the analog prototype. but for these
Butterworth LPFs or HPFs, there is only one significant frequency, only
one degree of freedom. so you can fix the frequency warping at w0, but
you have to take what you get for all other frequencies (DC comes out
okay, but infinity gets mapped to Nyquist).
now the way i was taught to design these analog filters was to take
these *normalized* prototypes, the normalized prototype for any 1st
order LPF is H(s) = 1/(1+s), and you stick in "s/W0" in for the
normalized "s" to get a LPF with corner frequency at W0. you stick in
W0/s to get an HPF. you stick in Q*(s/W0 + W0/s) in for the normalized
LPF "s" to get an BPF. etc.
now let's do the LPF and plug in ALL of our substitutions and you get:
normalized s <-- s/W0
s/W0 = s/[2*Fs*tan(w0/2)] <-- [2*Fs*(z-1)/(z+1)]/[2*Fs*tan(w0/2)]
so you finally get
normalized s <-- 1/tan(w0/2) * (z-1)/(z+1)
THAT is where you specilize your filter to do its thing at w0. in the
analog world, there is no reason to have anything else except
normalized poles for a Butterworth (for the Chebyshev, the poles are
somewhere else, but W0 is still normalized in the design and you still
use the BLT immediately above to design this.
so, again no poles at "a", if you want your life to be simple. the LPF
to HPF mapping of 1/s --> s will NOT move the normalized Butterworth
poles, but *will* move the zeros at infinity (of which the BLT sends to
z = -1) to zero (which the BLT will send to z = 1).
that means you CAN "get from a Butterworth LPF to a Butterworth HPF
just by moving the zeros from -1 to +1,"
r b-j
Reply by John E. Hadstate●December 3, 20052005-12-03
"robert bristow-johnson" <rbj@audioimagination.com> wrote in
message
news:1133582204.755185.137570@g49g2000cwa.googlegroups.com...
> John E. Hadstate wrote:
> ...
>
>> What is the arrangement of poles for a maximally-flat
>> high-pass filter?
>
> well, normally to map from a normalized LPF prototype to a
> normalized
> HPF prototype by substituting s <-- 1/s . that
> effectively leaves
> the normalized s-plane poles where they are (magnitude is
> reciprocated,
> angle is negated) and moves the implied zeros at infinity
> (which map to
> z = -1 by the BLT) to zero (which map to z = 1 by the
> BLT).
>
Thanks, Robert. I had forgotten about the s-->1/s
transformation. When I tried it with a single real pole, I
did not get filters with the pole locations in the same
place:
LPF(s) = a / (s + a)
HPF(s) = s / (s + (1/a))
Translating a-->b and s-->(Z-1)/(Z+1) yields:
LPF(Z) = (b/(b+1)) * (Z + 1) / (Z + (b-1)/(b+1))
HPF(Z) = (b/(b+1)) * (Z - 1) / (Z + (1-b)/(1+b))
I guess that means that you can't get from a Butterworth LPF
to a Butterworth HPF just by moving the zeros from -1 to +1,
which is what I did. Or am I overlooking something?
Reply by Real_McCoy●December 3, 20052005-12-03
"John E. Hadstate" <jh113355@hotmail.com> wrote in message
news:di7kf.34286$i7.17517@bignews2.bellsouth.net...
> I recently implemented a generalized digital IIR Butterworth
> low-pass filter class. It calculates the coefficients as if
> the filter was implemented as a cascade of second-order
> canonic sections if the order is even, or a cascade preceded
> by a single real pole if the order is odd. The critical
> digital frequency is translated by the usual formula and
> then s-->(z-1)/(z+1). All of this is textbook stuff. I got
> around to testing this filter today and it performed exactly
> as expected.
>
> On a hunch, I changed the coefficient calculations so that
> instead of putting the zeros at z=(-1), I put the zeros at
> z=1. Re-testing indicated that the new filter was
> high-pass, no ripples in either pass-band or stopband, and
> appeared to be maximally-flat, with a -3dB cutoff frequency
> exactly where it was before.
>
> My question is: is this a legitimate Butterworth high-pass
> filter?
>
> I know that the Butterworth LPF has its poles located on a
> semi-circle that is centered on the origin of the s-plane
> with a radius equal to the cutoff frequency. What is the
> arrangement of poles for a maximally-flat high-pass filter?
> How is it possible that the bilinear transform creates
> z-plane pole positions that are right for either high-pass
> or low-pass Butterworth filters, with the only difference
> being the location of the multiple zeros?
>
>
>
It's the low-pass prototype that has all its poles on a circle (inc the
unstable ones). You then do a low-pass to (say) high-pass or bandpass or
whatever you need. The resulting filter could well have zeros for some cases
so the circle thing is for the prototype only.
McC
Reply by robert bristow-johnson●December 2, 20052005-12-02
John E. Hadstate wrote:
...
> My question is: is this a legitimate Butterworth high-pass filter?
it just might be.
> I know that the Butterworth LPF has its poles located on a
> semi-circle that is centered on the origin of the s-plane
> with a radius equal to the cutoff frequency.
think of that cutoff frequency as w0 = 1, so that that semicircle is
the left half of the unit circle in the s-plane. the adjustment to the
BLT, taking account of frequency warping can be done to that normalized
s quite nicely:
1 1 - z^-1
normalized s <-- ----------- * ----------
tan(w0/2) 1 + z^-1
where w0 = 2*pi*f0/Fs and f0 is the corner frequency.
and the normalized Nth order butterworth LPF is
N-1
H(s) = product{ 1/(s - p_n }
n=0
where the poles are p_n = exp( j*(pi/2 + pi/(2N) + pi*n/N) )
> What is the arrangement of poles for a maximally-flat high-pass filter?
well, normally to map from a normalized LPF prototype to a normalized
HPF prototype by substituting s <-- 1/s . that effectively leaves
the normalized s-plane poles where they are (magnitude is reciprocated,
angle is negated) and moves the implied zeros at infinity (which map to
z = -1 by the BLT) to zero (which map to z = 1 by the BLT).
> How is it possible that the bilinear transform creates
> z-plane pole positions that are right for either high-pass
> or low-pass Butterworth filters, with the only difference
> being the location of the multiple zeros?
well, i hope i just answered that above, John.
r b-j
Reply by John E. Hadstate●December 2, 20052005-12-02
I recently implemented a generalized digital IIR Butterworth
low-pass filter class. It calculates the coefficients as if
the filter was implemented as a cascade of second-order
canonic sections if the order is even, or a cascade preceded
by a single real pole if the order is odd. The critical
digital frequency is translated by the usual formula and
then s-->(z-1)/(z+1). All of this is textbook stuff. I got
around to testing this filter today and it performed exactly
as expected.
On a hunch, I changed the coefficient calculations so that
instead of putting the zeros at z=(-1), I put the zeros at
z=1. Re-testing indicated that the new filter was
high-pass, no ripples in either pass-band or stopband, and
appeared to be maximally-flat, with a -3dB cutoff frequency
exactly where it was before.
My question is: is this a legitimate Butterworth high-pass
filter?
I know that the Butterworth LPF has its poles located on a
semi-circle that is centered on the origin of the s-plane
with a radius equal to the cutoff frequency. What is the
arrangement of poles for a maximally-flat high-pass filter?
How is it possible that the bilinear transform creates
z-plane pole positions that are right for either high-pass
or low-pass Butterworth filters, with the only difference
being the location of the multiple zeros?