7
$\begingroup$

The only 'authoritative' web reference (=very often linked) for calculating the coefficients for digital biquad filters seems to be this:

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

Does anywone knows if there is out there any othe good reference or tutorial explaining the role and usage of the parameters Q, BW, dbGain ?

For example: when shoud I use Q instead of BW in specifications ? And what exactly is the meaning of Q? For what I see it's related to the bandwidth of passband filters (in which unit? Hz or normalized frequency?), but maybe I'm wrong. If not, how are they related ?

When and how should I specify the dbGain param? If I build a bandpass filter with the above formulas, I get a gain higher than around f0. How to correctly scale the a,b coeffs to obtain a unitary gain ?

Here some other interesting info about Bandwidth (BW) and Q specifications

http://www.rane.com/note170.html

EDIT after answers

For what I see, one effect of the Q is to raise the selectivity on the center frequency, so a biquad bandpass with a higher Q should be more selective than a biquad with a lower one cutting down heavily the off-center frequency. BUT, in the example I have a singal with tho alternating sine wave with frequency 1000 and 3000 hz (FS is 44100):

Sines 1 and 3 kHZ

If i filter around the 3000 hz using a bandpass with a Q=2 I get a pretty good signal with little ripples in the bandstop (bandpass biquad coeff: b=[0.0939, 0, -0.0939], a=[1.0, -1.6492,0.8122])

Biquad Q = 2

So I decide to raise the Q up to 20 to lowering the ripples, but all I obtain is this ! (bandpass biquad coeff: b=[0.0103, 0, -0.0103], a=[1.0, -1.8014, 0.9795])

Biquad Q = 20

Why the Q=20 biquad bandpass seems to raise the frequency in the bandstop instead of cut it off and why it spreads even more the center frequency ? Why doesn't it make my signal sharper ? Is there a way to mitigate these issues ?

Thanks for the help !

$\endgroup$
  • $\begingroup$ Most of these questions can be answered quickly and easily with a simple Google search. E.g. "Q" or "Q factor" is a long-established way of defining filter "sharpness" which pre-dates DSP: en.wikipedia.org/wiki/Q_factor $\endgroup$ – Paul R Oct 7 '12 at 0:36
3
$\begingroup$

A biquad is simply a two-pole IIR filter, where both the numerator and denominator of the transfer function are quadratic equations. Thus, you can factor the coefficient equations, and then use any reference regarding a filter's behavior related to pole/zero placements in the Z-plane to determine the behavior.

One tutorial method I recall was a software package where you could drag the poles and zeros around and see a plot of the resulting response.

Q is a term from classic analog filter design which relates the inverse of bandwidth relative to center frequency. So, given a known center frequency, the use of Q or bandwidth (depending on your exact interpretation or measurement method) is roughly interchangeable (after reciprocating one of them).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.