PDA

View Full Version : Re: Cascade form IIR Filters


robert bristow-johnson
04-03-2007, 02:40 AM
On Apr 2, 7:31 pm, "robert bristow-johnson"
<[email protected]> wrote:
>
> we were just talking about this at the music-dsp mailing list. do you
> want explicit closed form formulae for biquad coefs for Butterworth.
> they exist. if you want i can get my email copies (and correct them,
> 'cuz i did copulate 'em up a bit at first, but i think we fixed it).
>

use this in reference to the Audio EQ cookbook that presently (and
forever, i hope) lives at:

http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt

for an Nth order Butterworth (N even or odd) you will have N/2 biquad
sections ((N-1)/2 for odd N or floor(N/2) for either even or odd N),
each will have the same resonant frequency w0 and will have Q:

Q = 1/( 2*sin((pi/N)*(n + 1/2)) )

where 0 <= n < (N-1)/2

then, use the cookbook LPF or HPF to get the coefs for each biquad
section.

if it's an odd order Butterworth, you'll need an additional 1st order
section:

H(z) = (b0 + b1*z^-1)/(a0 + a1*z^-1)


1st order LPF: H(s) = 1/(s+1)

b0 = sin(w0)
b1 = sin(w0)
a0 = cos(w0) + sin(w0) + 1
a1 = sin(w0) - cos(w0) - 1


1st order HPF: H(s) = s/(s+1)

b0 = cos(w0) + 1
b1 = -(cos(w0) + 1)
a0 = cos(w0) + sin(w0) + 1
a1 = sin(w0) - cos(w0) - 1


credits to Peter Schoffhauzer <[email protected]> for
catching and fixing errors.

r b-j