[sdiy] Digital Bandpass Filters

M.A.Koot makoot at gmx.net
Thu May 27 00:04:05 CEST 2004


Hi Markus,

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.
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 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?..

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.
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?

Cheers,
Michiel

----- Original Message -----
From: "Magnus Danielson" <cfmd at bredband.net>
To: <makoot at gmx.net>
Cc: <synth-diy at dropmix.xs4all.nl>
Sent: Wednesday, May 26, 2004 9:27 PM
Subject: Re: [sdiy] Digital Bandpass Filters


> From: "M.A. Koot" <makoot at gmx.net>
> Subject: [sdiy] Digital Bandpass Filters
> Date: Wed, 26 May 2004 16:30:08 +0200 (MEST)
> Message-ID: <9217.1085581808 at www52.gmx.net>
>
> > Hello all,
>
> Hi Michiel,
>
> > It might not be the right place to ask, but currently I really wouldn't
know
> > where else I could better. If anyone could point me to a better
newsgroup on
> > this matter that'd be great!
>
> This is the right place! ;O)
>
> > I'm currently doing my degreeproject on designing a RTA (Real Time
Analyser)
> > in software code.
>
> Ah!
>
> I still miss the 30-band 1/3-octave Klark Technics DN-60 RTA! Analog
analysis
> with a 6502 running the LED-stuff. Mechanically it was a little bit whimpy
> inside.
>
> > Now if there's anybody who doesn't know what an RTA is, in a nuttshell:
it's
> > like a spectrum analyser, displaying the current frequency components in
a
> > sound-signal by showing moving bars for every frequencyband.
> > I have to design a filterset to simulate this thing, so I'm working my
way
> > with Digital third-Octave IIR Band-Filters.
> > I try to do this with Matlab, or using National Instruments tools, and
> > programming the rest in Visual Basic. Though since I have very little
> > experience with digital filters, I have some problems designing these.
>
> Right.
>
> > For the lowest bands in the analyser, I will need bandpassfilters with a
> > very small passband.
> > For example the utter lowest one needs a low Cutoff of 0,712 Hz and High
> > cutoff of 0,898 Hz.
> > That means a Passband of only 0,186 Hz! And I still have to maintain
only a
> > low attenuation in the passband following the IEC Norm.
>
> Actually, that's not very narrow. The centerfrequency of 0,8 Hz and
> 0,8/0,712 = 0,898/0,8 = 2^(1/6). The static relationship between the
center
> frequency and corner frequency makes them about as easy or difficult to
do.
>
> > While checking out some filters from National Instruments, I found that
they
> > are quite nice, but when I try to design these lowest bandfilters, I
have to
> > make them small and I have to crank up the Order to keep the curve
steep.
> > The problem is only, that even if I increase the order, it's still not
> > enough, and the curve doesn't make it to the top of the band before it's
> > going down again (the high cutoff).
> > Not only that, if I increase the filter order to over 50, the filter
seems
> > to go crazy, and that's no option either ;)
> > I'm using elliptical filters at the moment, as they seem to have the
highest
> > possible steepnes of all, but obviously not enough.
>
> Hmm... that is not what is supposed to be happening!
>
> > It's probably not very suprising with this kind of a small passband, but
it
> > just can't be wider. And since a hardware RTA can do it by using it's
own
> > digital filters, it must be able for me to do it too in software.
>
> It should, it should.
>
> You don't need to do passband filters, you can do it with band-splitting
> filters instead. Look at a standard state-variable filter, it allows you
to
> splitt the signal between a upper and lower band, that comming out of the
> highpass and lowpass outputs respectively. An ideal band-splittning filter
> has the property that when the two output signals are added to each other
is
> the total response that of an allpass filter. This can be acheived by
setting
> up the zeros of the high and low pass outputs such that their
zero-polynomial
> together form the allpass response zero-polynomial:
>
>
>         Zl(z)          Zh(z)          Za(z)                   Zl(z) +
Zh(z)
> Hl(z) = -----  Hh(z) = -----  Ha(z) = ----- = Hl(z) + Hh(z)
= -------------
>          P(z)           P(z)           P(z)                        P(z)
>
> One brute force way to generate Zl(z) and Zh(z) from Za(z) is simply to
let
> Zh(z) has the higher order part and Zl(z) the lower order part of the
> polynomial. Za(z) is generated from P(z) according to traditional methods.
>
> The P(z) is chosen for the band-splitting frequency and rank needed. You
most
> probably want a maximum-flat response, but that doesn't really work well
here,
> but I'd say Butterworth-like is probably a good idea.
>
> Now, you are going to design a number of these band-splitting filters,
where
> each has two outputs, being basically two different output summations from
the
> same feedback core (i.e. the same P(z) implementation). See it as an IIR
filter
> with double feed-forward summing. Anyway, these band-splitters you use to
> create a band-splittning tree where the first band-splitting filter
divides
> the input signal into two bands, each having an equal amount of target
bands
> in them. You need 31 band-splitting filters to create a 32-band structure.
>
> Each band-splitting filter should be easy enought to design and if only
care is
> spent on ensuring sufficient resolution and correction for frequency
skewing I
> don't think it should be a hard job to do.
>
> > Does anybody maby have experiency with this? Experiences with digital
> > bandfilter design, or could anyone maby point me out a newsgroup which
is
> > related to this subject? I would be very very thankfull.
>
> I did neither, I pointed in a different direction, I hope you enjoyed that
> instead! ;O)
>
> Cheers,
> Magnus - who almost feels like testing it out... ;O)
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20040527/b946a9a0/attachment.htm>


More information about the Synth-diy mailing list