Reply by robert bristow-johnson●April 17, 20072007-04-17
On Apr 16, 9:22 am, Jerry Avins <j...@ieee.org> wrote:
>
> For practical purposes, the center frequency of a flat topped bandpass
> filter is half way between the band edges.
in log frequency? (the answer is "yes" for when the center frequency
is far below Nyquist, which it is for the analog prototype, having an
"infinite" Fs, but in a digital filter, it so happens that when the
center frequency is at Nyquist/2, then it's symmetrical in linear
frequency.)
> Operationally, that's the
> only special thing about it. So you put the upper and lower band edges
> where they're wanted, and the rest is a matter of technique.
it's also a matter of what is desired in the end product. sometimes,
the precise location of the resonant frequency is more important than
the precise location of the bandedges. at least i can imagine so for
some audio application.
r b-j
Reply by Jerry Avins●April 16, 20072007-04-16
robert bristow-johnson wrote:
...
> what about the bandedges? well, this depends on what it is you wanna
> do. it turns out that the BLT frequency warping will tend to push the
> bandedges closer to each other (in log frequency) as w0 increases. in
> some cases, it may be desirable to compensate for this "skrunching" of
> the bandwidth in a similar way that one compensates for frequency
> warping of the significant (center) frequency.
...
> but if bandwidth is important, then you might want to "pre-warp" that
> specifaction to begin with. the 1st-order approximation for doing
> that in log frequency is:
>
> analog BW = w0/sin(w0) * (digital BW)
>
> this is assuming you still want the significant (center) frequency to
> be placed precisely where you want it. normally for a BPF, you have
> two degrees of freedom with the bandedges and significant frequency,
> not three. you can place the upper and lower bandedge precisely where
> you want them, but then you have to take what you get regarding the
> center frequency. or you can place the center frequency precisely
> where you want it and *one* bandedge at exact locations (providing
> neither go over Nyquist) and take what life dishes out regarding the
> other bandedge. or you can place the center frequency and the
> *difference* of the bandedges (whether in linear frequency or log
> frequency), what we normally think of the "bandwidth", but neither
> bandedge will come out to be exactly where they were for the analog
> prototype.
For practical purposes, the center frequency of a flat topped bandpass
filter is half way between the band edges. Operationally, that's the
only special thing about it. So you put the upper and lower band edges
where they're wanted, and the rest is a matter of technique.
Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply by Rune Allnor●April 16, 20072007-04-16
On 15 Apr, 23:24, Jerry Avins <j...@ieee.org> wrote:
> The analog band-pass design procedures I know take as inputs center
> frequency and bandwidth. Can you tell me about any that explicitly use
> the band edges?
None that I have found elsewhere or have found a published
name for. I designed my pocedure from the point of view that
the end product is a discrete-time domin filter which is to
be implemented in double precision floating point arithmetics.
This in contrast to somebody who have to implement an analog
filter as an RLC cirquit with 20% tolerance on the components.
Rune
Reply by robert bristow-johnson●April 16, 20072007-04-16
On Apr 15, 5:24 pm, Jerry Avins <j...@ieee.org> wrote:
>
> The analog band-pass design procedures I know take as inputs center
> frequency and bandwidth. Can you tell me about any that explicitly use
> the band edges?
it turns out that for every degree of freedom (or independent
frequency parameter) you have for the analog filter, it's also a
degree of freedom for the digital filter (at least with the BLT
mapping) and you can compensate (pre-warp) for each independent
frequency parameter, if that's what you want to do.
i dunno if i want to get bogged down with this, but my recommendation
is first design the analog filter completely in normalized "s", that
is an analog filter where the most significant frequency (the one you
really want to be spot on, even after transformation) at f0=1/(2*pi)
or omega0 = 2*pi*f0 = 1 or when s = j. this is legitimate because
there is no mathematical qualitative difference between 10 Hz, 100 Hz,
or a zillion Hz. it all just a matter of choice of units and the
accompanying conversion factors. in this case, a simple LPF will look
like:
H(s) = 1/(1 + s)
or, for 2nd order
H(s) = 1/(1 + s/Q + s^2)
or for a 2nd order BPF
H(s) = s/(1 + s/Q + s^2)
whatever. what you DON'T see are transfer functions that have the
significant frequency as a parameter like
H(s) = (s/omega0) / (1 + (s/omega0)/Q + (s/omega0)^2)
because we're deliberately choosing our units in continuous time so
that to make that scaling factor go away.
then to BLT that to the z-domain and fix that frequency warping
problem (inherent to the BLT) automatically, one substitutes:
s <- 1/tan(w0/2) * (1 - z^-1)/(1 + z^-1)
where w0 is where your significant radian frequency is in normalized
digital frequency (that is the scale where Nyquist = pi). that would
mean that
w0 = omega0/Fs = 2*pi*f0/Fs
where Fs is the sampling frequency measured in the units as is f0 (not
radian frequency). there are some nice trig identies for that
tan(w0/2) that you can use.
what about the bandedges? well, this depends on what it is you wanna
do. it turns out that the BLT frequency warping will tend to push the
bandedges closer to each other (in log frequency) as w0 increases. in
some cases, it may be desirable to compensate for this "skrunching" of
the bandwidth in a similar way that one compensates for frequency
warping of the significant (center) frequency.
take, for instance the above BPF. at the center frequency, the gain
of this BPF is Q. this peak gain is different from a constant gain
you can always toss in because as Q gets larger, the peak gain gets
larger whereas the "skirts" of the frequency response do not change.
if it were a constant gain factor increasing, all of the frequency
response would increase by the same dB.
so, suppose this gain at resonance (even for an LPF) is what is
important to you. then do nothing about the bandedges, because of the
mapping of the BLT, every bump and ripple in the analog filter shows
up in the digital filter with the same gain, but at different (warped)
frequencies.
but if bandwidth is important, then you might want to "pre-warp" that
specifaction to begin with. the 1st-order approximation for doing
that in log frequency is:
analog BW = w0/sin(w0) * (digital BW)
this is assuming you still want the significant (center) frequency to
be placed precisely where you want it. normally for a BPF, you have
two degrees of freedom with the bandedges and significant frequency,
not three. you can place the upper and lower bandedge precisely where
you want them, but then you have to take what you get regarding the
center frequency. or you can place the center frequency precisely
where you want it and *one* bandedge at exact locations (providing
neither go over Nyquist) and take what life dishes out regarding the
other bandedge. or you can place the center frequency and the
*difference* of the bandedges (whether in linear frequency or log
frequency), what we normally think of the "bandwidth", but neither
bandedge will come out to be exactly where they were for the analog
prototype.
i'll admit, i did a lot of thinking about this ca. 1993/94 and some
since.
r b-j
Reply by Jerry Avins●April 15, 20072007-04-15
Rune Allnor wrote:
> On 15 Apr, 20:05, Jerry Avins <j...@ieee.org> wrote:
>
>> You don't really want to prewarp the center frequency of a band-pass
>> filter. Both band edges will come out wrong. It's OK to start a design
>> that way and then vary center frequency and bandwidth iteratively to
>> come out where you want. Modern filter programs make that easier than
>> finding the solution to the non-linear equation.
>
> If this is a question of designing a discrete-time filter from
> a continuous-time prototype, you would want to be very careful
> about how to organize the flow of the job.
>
> How I would do this:
>
> - Specify Fs, corner frequencies and attenuations in pass band
> and stop and in discrete-time domain
> - Pre-warp this specification to continuous-time domain
> - Use the analog formulas to design a CT low-pass prototype
> - Use the BLT to transform the LP prototype from CT to DT domain,
> making very sure to keep track of corner frequencies
> - Apply an LP -> BP frequency transform in digital domain
> in order to produce a bandpass filter with the correct
> corner frequencies
>
> As you can see, the center frequency never enters the
> discussion and is not important.
>
> I have no idea whether the center frequency of the analog
> spec would map to the center frequency to the digital spec;
> I would be surprised if it can be shown that it always does.
It's easy to show that it never does, an excersize in arm waving left
for the reader.
The analog band-pass design procedures I know take as inputs center
frequency and bandwidth. Can you tell me about any that explicitly use
the band edges?
Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply by Rune Allnor●April 15, 20072007-04-15
On 15 Apr, 20:05, Jerry Avins <j...@ieee.org> wrote:
> You don't really want to prewarp the center frequency of a band-pass
> filter. Both band edges will come out wrong. It's OK to start a design
> that way and then vary center frequency and bandwidth iteratively to
> come out where you want. Modern filter programs make that easier than
> finding the solution to the non-linear equation.
If this is a question of designing a discrete-time filter from
a continuous-time prototype, you would want to be very careful
about how to organize the flow of the job.
How I would do this:
- Specify Fs, corner frequencies and attenuations in pass band
and stop and in discrete-time domain
- Pre-warp this specification to continuous-time domain
- Use the analog formulas to design a CT low-pass prototype
- Use the BLT to transform the LP prototype from CT to DT domain,
making very sure to keep track of corner frequencies
- Apply an LP -> BP frequency transform in digital domain
in order to produce a bandpass filter with the correct
corner frequencies
As you can see, the center frequency never enters the
discussion and is not important.
I have no idea whether the center frequency of the analog
spec would map to the center frequency to the digital spec;
I would be surprised if it can be shown that it always does.
Rune
Reply by Jerry Avins●April 15, 20072007-04-15
Chris Barrett wrote:
> When one discretizes a transfer function, does one loose accuracy in the
> center frequency?
No.
> If yes, how can one compensate so that accuracy is not lost?
The answer was 'no', but you can compensate for the real problem.
> I have an analog transfer function. When ever I run the
> bilinear transform on it and plot the frequency response, the center
> frequency is shifted.
The bilinear transform warps critical frequencies. Low frequencies
aren't much affected, but infinite frequency maps to Fs/2. A single
important frequency can be "prewarped". If w is the frequency you want
after z transforming, the w' to use before is (IIRC) 2*Fs*tan(w/2).
You don't really want to prewarp the center frequency of a band-pass
filter. Both band edges will come out wrong. It's OK to start a design
that way and then vary center frequency and bandwidth iteratively to
come out where you want. Modern filter programs make that easier than
finding the solution to the non-linear equation.
Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply by Chris Barrett●April 15, 20072007-04-15
When one discretizes a transfer function, does one loose accuracy in the
center frequency? If yes, how can one compensate so that accuracy is
not lost? I have an analog transfer function. When ever I run the
bilinear transform on it and plot the frequency response, the center
frequency is shifted.