advanced biquad programming: how to set gain for each biquad?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I am developing some tools for calculating the IIR transfer function coefficients for the biquads in the MiniDSP. So far I have successfully figured out how to calculate the coefficients for first and second order filter functions and a "gain block" (e.g. b0=gain, all other coefficients=0). I developed my calcs using some of the "cookbook" type of documents that are floating around the web.

The one thing I can not seem to figure out, is how to have a filter with a gain of than unity implemented together in the same biquad. I know in analog filter transfer functions I can just multiple the numerator coefficients by the voltage gain that I want to use, and that does the trick. This does not seem to work for an IIR filter.

For example, in a single biquad, I want to describe a 2nd order high pass filter with Q=0.7071, corner frequency 500Hz, and voltage gain of 0.707.

How to I include the over all biquad gain in my coefficient calculations? I'd like to know a general way to do this for any first or second order filter function.

Thanks in advance.

-Charlie
 
Charlie,

If you want to combine Gain (GdB) to one of your biquad filter, there is a simple way. Simply "Multiply" your numerators (all b0, b1, b2) to the linear gain value. (Glin)

e.g. H(z) = Glin * (b0 + b1z-1 + b2z-2) / ( 1+a1z-1 + a2z-2)

So Glin = 10^(GdB/20)

Makes sense?

DevTeam
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.