[sdiy] Digital Bandpass Filters

Magnus Danielson cfmd at bredband.net
Thu May 27 01:00:10 CEST 2004


From: "M.A.Koot" <makoot at gmx.net>
Subject: Re: [sdiy] Digital Bandpass Filters
Date: Thu, 27 May 2004 00:04:05 +0200
Message-ID: <002b01c4436d$5ce27de0$0100000a at michanovich>

Hi Michiel,

So this went to the list also... ah!

> Thanks a lot for the great reply at my problem here!
> I think I can follow you there. As I'd like to confirm, your idea is
> actually to have a low and highpass filter, cascading them, and let the two
> curves of the indivual filters cut each other.

Actually, I'm way more nastier than that, I make a lowpass and highpass out of
the same filter-core at the same time. Look at the IIR-filter topology, and
then imagine that another output is added with separate output summing.
Another way is to take the output of the filter and subtract from the input
signal. More or less the same but not the same level of control.

So, in a way it becomes a bunch of highpass and lowpass filters, but reusing
part of the filters such that it becomes a perfect matching complement.

> For example, having a low pass starting at 100 hz, and having a high pass,
> beginning at 99 hz (all 3dB points that is..). Then first passing the signal
> thru the low pass, and then the high pass should give the same result as the
> band pass I'm asking for.
> Now suggesting I understood it correctly, that would mean that it's actually
> the same as using bandpass algorithm in one stroke isn't it? I mean, I could
> try it, but would it really solve the problem then of still having a
> passband with too much attenuation instead of an unaffected signal?

I think the individual filters is _much_ simpler to design.

> I have this question while I think to the analog version of an active
> filter. The analog version of a high pass is having a C in front of the
> Opamp, and Low pass is having a C in the feedback loop, and a bandpass then
> is a combination of both, if I refer correctly.
> So I'd like to try your theory, but wouldn't it just present the same
> results? ...or am I mistaking?..

You should be looking at the analog type of state-variable filter. If you learn
the state-variable filter and how the poles and zeros comes from different
parts of the filter and how you get multiple outputs from it, then you are on a
good road to follow me thoughtwise all the way here. I have been fooling around
with analog and digital filters for ages and especially exercising myself in
filter theory. Also, I have been thinking about how to do RTA-designs
efficiently.

> Oh by the way, I've been playing with the filter designer of Matlab this
> evening, and it seems that the attenuation of a small passband is dependet
> of the filterfrequency. For example at low (20 to 21 hz) frequencies the
> attenuation in the pass is way to much, tho at 400 to 401 hz it's nearly 0
> dB. Then again, a lot higher around 1kHz, the attenuation is increasing
> again. Quite strange I think.

Again, the 20-21 Hz filter has lower "Q" than the 400-401 Hz filter.

      f
       c
Q = -------
    f  - f
     h    l

Where fl is the lower -3dB corner, fh is the upper -3dB corner and fc is the
centerfrequency such that fc^2 = fl*fh.

Also, there is more to it. I have *no* idea what the Matlab filter designer
stuff do. It's a black box and there is gazillion ways of doing things. I don't
use Matlab for filterdesign. You need to understand what the filter design
software does and not does for you or you are toast.

> To keep a low attenuation I must decrease the filterorder again then
> (although at high frequencys that's of little conern anymore, as the
> tolerance is much higher in those areas)..
> Secondly I'd like to ask why you suggest using a Butterworth, as the
> steepness must be as high as possible I believe. So I was more thinking of
> chebyshev or elliptical. I know butterworth has a flat response, but the
> ripple is not as important I think.. Or am I completely mistaking now?

Steepness lies in the number of poles you have in a filter. You can fool
yourself by fiddeling around with the zeros a little, but you see, I already
had a good plan for those. The Cauer and Elliptic filter is a play with zeros.

The Chebyshev responses is more resonant response in order to acheive a sharper
knee. However, more resonant filters means screwier response, doesn't loose the
energy as quickly etc. It's a strategy which used to be important but I think
it has faded as a major strategy, we can do alot better many times with
synthesis.

A non-resonant type of response such as Butterworth, Bessel-Thompson or Gauss
has many benefits, but people are always looking at the cool stuff (Chebyshev,
Elliptic etc) and don't see what you can do with the classical stuff if you use
it in just a little different maner. They have good properties!

The point I am making here is that you can use less poles if you do band-
splitting instead of traditional bandpass filters. It is also easier to make
the responses match up etc. The downside is that the depth of the design for
a particular channel becomes deeper. For measurement purposes you don't want
too much of the resonant stuff, that helps to ruin your ability to respond to
quick changes in amplitude, which you may want to do in RTA applications.

Cheers,
Magnus - with them filters in mind...



More information about the Synth-diy mailing list