Hi, Chuck
Biquad filters are based on a finite-difference equation: y(n)=ff1*w(n)+ff2*w(n-1)+ff3*w(n-2) w(n)=x(n)+fb1*w(n-1)+fb2*w(n-2)
Now, we can get rid of w, because it's basically a dummy variable and write everything in terms of x and y. Y is the output, and X is the input
w(n)-fb1*w(n-1)-fb2*w(n-2)=x(n) ff1*w(n)+ff2*w(n-1)+ff3*w(n-2)=y(n) so,
y(n)-fb1*y(n-1)-fb2*y(n-2)=ff1*x(n)+ff2*x(n-1)+ff3*x(n-2)
ff stands for feedforward, fb stands for feedback The left side of this equation is the IIR part (feedback), the right side is the FIR part (feedforward). Usually, digital filters like these use a z-transform to write transfer functions (relations of output/input) where z^(-1) is the unit delay operator (one sample delay) Y/X=(ff1 + ff2*z^(-1) + ff3*z^(-2))/(1 - fb1*z^(-1) - fb2*z^(-2)) again, the numerator is the feedforward part, the denominator is the feedback part
Often, biquad filter equations are written with a plus, instead of a minus on the feedback. Is this one of the differences you find?
As for references, I have nothing in particular to suggest. I just have a digital control systems textbook with a z-transform table.
Here's an experiment I was playing with a while back, making a percussion instrument from biquad filters. I used the table to find an expression for damped sines (ds.pd), and it goes like this:
Z[ a^n*sin(b*n)]=a*sin(b)*z^(-1)/ ( 1 - 2*a*cos(b)*z^(-1) + a^2*z^(-2) )
So, then, I just worked out some formulas to calculate a and b, given decay time by 20dB (factor 10) and a fundamental frequency. Then, I put those calculations into the format of pd's biquad filter. (These objects like damped sines are just band-pass filters, and when you hit them with an impulse they ring at the fundamental frequency)
You can find different types of expressions for biquad filters to do efficient low-pass filtering, band-pass filtering, and high-pass filtering. And you can put several of them together to make filters of higher order. Probably some other things I'm missing?
Later, Chuck
On 1/28/07, Chuckk Hubbard badmuthahubbard@gmail.com wrote:
I am already not quite on top of biquad filters, but as I research them I see Pd's version looks a lot different than the other ones I see around. Is it comparable? I can see that it should be IIR, as past values of w can be used in the current value, but I can't tell much else about it. Anyone know a reference explaining this kind of setup?
-Chuckk
-- "Far and away the best prize that life has to offer is the chance to work hard at work worth doing." -Theodore Roosevelt
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list