<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>Hi Markus,<BR><BR>Thanks a lot for the great reply at my
problem here!<BR>I think I can follow you there. As I'd like to confirm, your
idea is<BR>actually to have a low and highpass filter, cascading them, and let
the two<BR>curves of the indivual filters cut each other.<BR>For example, having
a low pass starting at 100 hz, and having a high pass,<BR>beginning at 99 hz
(all 3dB points that is..). Then first passing the signal<BR>thru the low pass,
and then the high pass should give the same result as the<BR>band pass I'm
asking for.<BR>Now suggesting I understood it correctly, that would mean that
it's actually<BR>the same as using bandpass algorithm in one stroke isn't it? I
mean, I could<BR>try it, but would it really solve the problem then of still
having a<BR>passband with too much attenuation instead of an unaffected
signal?<BR><BR>I have this question while I think to the analog version of an
active<BR>filter. The analog version of a high pass is having a C in front of
the<BR>Opamp, and Low pass is having a C in the feedback loop, and a bandpass
then<BR>is a combination of both, if I refer correctly.<BR>So I'd like to try
your theory, but wouldn't it just present the same<BR>results? ...or am I
mistaking?..<BR><BR>Oh by the way, I've been playing with the filter designer of
Matlab this<BR>evening, and it seems that the attenuation of a small passband is
dependet<BR>of the filterfrequency. For example at low (20 to 21 hz) frequencies
the<BR>attenuation in the pass is way to much, tho at 400 to 401 hz it's nearly
0<BR>dB. Then again, a lot higher around 1kHz, the attenuation is
increasing<BR>again. Quite strange I think.<BR>To keep a low attenuation I must
decrease the filterorder again then<BR>(although at high frequencys that's of
little conern anymore, as the<BR>tolerance is much higher in those
areas)..<BR>Secondly I'd like to ask why you suggest using a Butterworth, as
the<BR>steepness must be as high as possible I believe. So I was more thinking
of<BR>chebyshev or elliptical. I know butterworth has a flat response, but
the<BR>ripple is not as important I think.. Or am I completely mistaking
now?<BR><BR>Cheers,<BR>Michiel<BR><BR>----- Original Message -----<BR>From:
"Magnus Danielson" <<A
href="mailto:cfmd@bredband.net">cfmd@bredband.net</A>><BR>To: <<A
href="mailto:makoot@gmx.net">makoot@gmx.net</A>><BR>Cc: <<A
href="mailto:synth-diy@dropmix.xs4all.nl">synth-diy@dropmix.xs4all.nl</A>><BR>Sent:
Wednesday, May 26, 2004 9:27 PM<BR>Subject: Re: [sdiy] Digital Bandpass
Filters<BR><BR><BR>> From: "M.A. Koot" <<A
href="mailto:makoot@gmx.net">makoot@gmx.net</A>><BR>> Subject: [sdiy]
Digital Bandpass Filters<BR>> Date: Wed, 26 May 2004 16:30:08 +0200
(MEST)<BR>> Message-ID: <<A
href="mailto:9217.1085581808@www52.gmx.net">9217.1085581808@www52.gmx.net</A>><BR>><BR>>
> Hello all,<BR>><BR>> Hi Michiel,<BR>><BR>> > It might not be
the right place to ask, but currently I really wouldn't<BR>know<BR>> >
where else I could better. If anyone could point me to a better<BR>newsgroup
on<BR>> > this matter that'd be great!<BR>><BR>> This is the right
place! ;O)<BR>><BR>> > I'm currently doing my degreeproject on
designing a RTA (Real Time<BR>Analyser)<BR>> > in software
code.<BR>><BR>> Ah!<BR>><BR>> I still miss the 30-band 1/3-octave
Klark Technics DN-60 RTA! Analog<BR>analysis<BR>> with a 6502 running the
LED-stuff. Mechanically it was a little bit whimpy<BR>>
inside.<BR>><BR>> > Now if there's anybody who doesn't know what an RTA
is, in a nuttshell:<BR>it's<BR>> > like a spectrum analyser, displaying
the current frequency components in<BR>a<BR>> > sound-signal by showing
moving bars for every frequencyband.<BR>> > I have to design a filterset
to simulate this thing, so I'm working my<BR>way<BR>> > with Digital
third-Octave IIR Band-Filters.<BR>> > I try to do this with Matlab, or
using National Instruments tools, and<BR>> > programming the rest in
Visual Basic. Though since I have very little<BR>> > experience with
digital filters, I have some problems designing these.<BR>><BR>>
Right.<BR>><BR>> > For the lowest bands in the analyser, I will need
bandpassfilters with a<BR>> > very small passband.<BR>> > For
example the utter lowest one needs a low Cutoff of 0,712 Hz and High<BR>>
> cutoff of 0,898 Hz.<BR>> > That means a Passband of only 0,186 Hz!
And I still have to maintain<BR>only a<BR>> > low attenuation in the
passband following the IEC Norm.<BR>><BR>> Actually, that's not very
narrow. The centerfrequency of 0,8 Hz and<BR>> 0,8/0,712 = 0,898/0,8 =
2^(1/6). The static relationship between the<BR>center<BR>> frequency and
corner frequency makes them about as easy or difficult to<BR>do.<BR>><BR>>
> While checking out some filters from National Instruments, I found
that<BR>they<BR>> > are quite nice, but when I try to design these lowest
bandfilters, I<BR>have to<BR>> > make them small and I have to crank up
the Order to keep the curve<BR>steep.<BR>> > The problem is only, that
even if I increase the order, it's still not<BR>> > enough, and the curve
doesn't make it to the top of the band before it's<BR>> > going down again
(the high cutoff).<BR>> > Not only that, if I increase the filter order to
over 50, the filter<BR>seems<BR>> > to go crazy, and that's no option
either ;)<BR>> > I'm using elliptical filters at the moment, as they seem
to have the<BR>highest<BR>> > possible steepnes of all, but obviously not
enough.<BR>><BR>> Hmm... that is not what is supposed to be
happening!<BR>><BR>> > It's probably not very suprising with this kind
of a small passband, but<BR>it<BR>> > just can't be wider. And since a
hardware RTA can do it by using it's<BR>own<BR>> > digital filters, it
must be able for me to do it too in software.<BR>><BR>> It should, it
should.<BR>><BR>> You don't need to do passband filters, you can do it
with band-splitting<BR>> filters instead. Look at a standard state-variable
filter, it allows you<BR>to<BR>> splitt the signal between a upper and lower
band, that comming out of the<BR>> highpass and lowpass outputs respectively.
An ideal band-splittning filter<BR>> has the property that when the two
output signals are added to each other<BR>is<BR>> the total response that of
an allpass filter. This can be acheived by<BR>setting<BR>> up the zeros of
the high and low pass outputs such that their<BR>zero-polynomial<BR>>
together form the allpass response
zero-polynomial:<BR>><BR>><BR>>
Zl(z)
Zh(z)
Za(z)
Zl(z) +<BR>Zh(z)<BR>> Hl(z) = ----- Hh(z) = ----- Ha(z) = ----- =
Hl(z) + Hh(z)<BR>=
-------------<BR>>
P(z)
P(z)
P(z)
P(z)<BR>><BR>> One brute force way to generate Zl(z) and Zh(z) from Za(z)
is simply to<BR>let<BR>> Zh(z) has the higher order part and Zl(z) the lower
order part of the<BR>> polynomial. Za(z) is generated from P(z) according to
traditional methods.<BR>><BR>> The P(z) is chosen for the band-splitting
frequency and rank needed. You<BR>most<BR>> probably want a maximum-flat
response, but that doesn't really work well<BR>here,<BR>> but I'd say
Butterworth-like is probably a good idea.<BR>><BR>> Now, you are going to
design a number of these band-splitting filters,<BR>where<BR>> each has two
outputs, being basically two different output summations from<BR>the<BR>>
same feedback core (i.e. the same P(z) implementation). See it as an
IIR<BR>filter<BR>> with double feed-forward summing. Anyway, these
band-splitters you use to<BR>> create a band-splittning tree where the first
band-splitting filter<BR>divides<BR>> the input signal into two bands, each
having an equal amount of target<BR>bands<BR>> in them. You need 31
band-splitting filters to create a 32-band structure.<BR>><BR>> Each
band-splitting filter should be easy enought to design and if only<BR>care
is<BR>> spent on ensuring sufficient resolution and correction for
frequency<BR>skewing I<BR>> don't think it should be a hard job to
do.<BR>><BR>> > Does anybody maby have experiency with this?
Experiences with digital<BR>> > bandfilter design, or could anyone maby
point me out a newsgroup which<BR>is<BR>> > related to this subject? I
would be very very thankfull.<BR>><BR>> I did neither, I pointed in a
different direction, I hope you enjoyed that<BR>> instead!
;O)<BR>><BR>> Cheers,<BR>> Magnus - who almost feels like testing it
out... ;O)<BR>><BR>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>