DSPRelated.com
Forums

how to calculate quality factor from slope for IIR biQuad filters.

Started by Namrata March 5, 2005
I am on workin on a live project which is an DSP application. we are
using the BIQUAD IIR filter for performing the filtering. for
calculating the filter coefficients we are using the formulas given in
http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt
 for calculating the Alpha value from this formula sheet for the HPF
and LPF Quality factor or Bandwidth is required and we have slope
specified in the
specification. so i want to know that how the Quality Factor is
calculated from slope. please help us out. waiting eagerly for ur
reply.
Namrata wrote:
> I am on workin on a live project which is an DSP application. we are > using the BIQUAD IIR filter for performing the filtering. for > calculating the filter coefficients we are using the formulas given in > http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt > for calculating the Alpha value from this formula sheet for the HPF > and LPF Quality factor or Bandwidth is required and we have slope > specified in the > specification. so i want to know that how the Quality Factor is > calculated from slope. please help us out. waiting eagerly for ur > reply.
You don't need Q for the high- or low-pass filters there. Slope can mean many things in a filter. Your spec probably applies to the transition region; if so, it will determine the filter order. (Usually, only analog filters specify cut-off in terms of slope.) With your specification, you may prefer other design software, such as you will find at http://www-users.cs.york.ac.uk/~fisher/mkfilter/trad.html or http://www.dsptutor.freeuk.com/IIRFilterDesign/IIRFilterDesign.html. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
in article ccd008c0.0503042230.431e9b3f@posting.google.com, Namrata at
namrataasher@yahoo.com wrote on 03/05/2005 01:30:

> I am on workin on a live project which is an DSP application. we are > using the BIQUAD IIR filter for performing the filtering. for > calculating the filter coefficients we are using the formulas given in > http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt > for calculating the Alpha value from this formula sheet for the HPF > and LPF Quality factor or Bandwidth is required and we have slope > specified in the specification.
the slope parameter, S, is "for shelving EQ only". i dunno what meaning it would have if you used it for other filter types. the relationship between this shelf slope and Q is: 1/Q = sqrt((A + 1/A)*(1/S - 1) + 2) . the bandwidth parameter, BW, is "for BPF and notch or ... peaking EQ". not sure what meaning it would have for other filter types. the relationship between the BW parameter and Q is: 1/Q = 2*sinh(ln(2)/2*BW*w0/sin(w0)) . *all* of the filter types have a meaningful parameter Q which is the same as the electrical engineering definition when we learned about RLC circuits, except for the peaking EQ in which the meaning of Q was fudged so that a cut of some dB would undo a boost of the same dB *and* with the same Q. if i used the EE definition there instead, the cut would be narrower than the boost.
> so i want to know that how the Quality Factor is calculated from slope. > please help us out. waiting eagerly for ur reply.
something appears familiar here. are you "krish"? -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
>namrataasher@yahoo.com wrote on 03/05/2005 01:30: > >> I am on workin on a live project which is an DSP application. we are >> using the BIQUAD IIR filter for performing the filtering. for >> calculating the filter coefficients we are using the formulas given in >>
http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt
>> for calculating the Alpha value from this formula sheet for the HPF >> and LPF Quality factor or Bandwidth is required and we have slope >> specified in the specification. > >the slope parameter, S, is "for shelving EQ only". i dunno what meaning
it
>would have if you used it for other filter types. the relationship
between
>this shelf slope and Q is: 1/Q = sqrt((A + 1/A)*(1/S - 1) + 2) . > >the bandwidth parameter, BW, is "for BPF and notch or ... peaking EQ".
not
>sure what meaning it would have for other filter types. the
relationship
>between the BW parameter and Q is: 1/Q = 2*sinh(ln(2)/2*BW*w0/sin(w0)) . > >*all* of the filter types have a meaningful parameter Q which is the same
as
>the electrical engineering definition when we learned about RLC
circuits,
>except for the peaking EQ in which the meaning of Q was fudged so that a
cut
>of some dB would undo a boost of the same dB *and* with the same Q. if
i
>used the EE definition there instead, the cut would be narrower than the >boost. > >something appears familiar here. are you "krish"?
>r b-j rbj@audioimagination.com > >"Imagination is more important than knowledge."
EVERY THING HERE IS SO RELATED TO MY PROJECT, BUT TRUST MY I HAVE MY OWN SEPARATE IDENTITY. But even in this thread the same question is haunting..."how to transform the slope information to a realizable filter?" or "how to make a digital filter(HPF/LPF) using slope of the stopband filter?". given a filter it is easy to draw the slope of the frequency respose but to go about reverse seems to have a solution that is not yet clearly visible to me.... I have read much of what google could offer me. but still if anybody has any books in particular that answer this question pls let me know. thanking all those who gave some amount of their valuable time for helping, krish This message was sent using the Comp.DSP web interface on www.DSPRelated.com
krish wrote:

  ...

> EVERY THING HERE IS SO RELATED TO MY PROJECT, BUT TRUST MY I HAVE MY > OWN SEPARATE IDENTITY.
I never doubted that.
> But even in this thread the same question is > haunting..."how to transform the slope information to a realizable > filter?" or > "how to make a digital filter(HPF/LPF) using slope of the stopband > filter?".
What are you trying to accomplish? What kind of signals do you deal with? How do you define "slope"?
> given a filter it is easy to draw the slope of the frequency respose but > to go about reverse seems to have a solution that is not yet clearly > visible to me....
The filter's on R.B-J's cookbook page are all single-section biquads. To change asymptotic slope, you need to change the number of sections. ... Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
>What are you trying to accomplish? What kind of signals do you deal >with? How do you define "slope"?
Well, I am trying to design a digital IIR filter whose specification mentions the required cutt-off frequency for the HPF (as well as LPF) and the slope in (dB/Oct). This slope according to me is the transition band slope which (I have come to conclusion that) determines the order of the filter. What else could slope mean in HPF or LPF when given in some negative(db/oct) value??. the required filter is supposed to deal with voice signals.
>The filter's on R.B-J's cookbook page are all single-section biquads. To
>change asymptotic slope, you need to change the number of sections.
Well even by changing the section a minimum of 6db/oct of slope is added/subtracted. coz one pole corresponds to a 6db/oct of slope(something I came across while reading). what to do if one desires 3 db/oct or some in-between value.??? This message was sent using the Comp.DSP web interface on www.DSPRelated.com
krish wrote:
>>What are you trying to accomplish? What kind of signals do you deal >>with? How do you define "slope"? > > Well, I am trying to design a digital IIR filter whose specification > mentions the required cutt-off frequency for the HPF > (as well as LPF) and the slope in (dB/Oct). This slope according to me is > the transition band slope which (I have come to conclusion that) > determines the order of the filter. What else could slope mean in HPF or > LPF when given in some negative(db/oct) value??. the required filter is > supposed to deal with voice signals. > > >>The filter's on R.B-J's cookbook page are all single-section biquads. To > > >>change asymptotic slope, you need to change the number of sections. > > Well even by changing the section a minimum of 6db/oct of slope is > added/subtracted. coz one pole corresponds to a 6db/oct of slope(something > I came across while reading). what to do if one desires 3 db/oct or some > in-between value.??? > > This message was sent using the Comp.DSP web interface on > www.DSPRelated.com
3 db/octave is hard to do. It is approximated by alternating poles and zeros. The number needed depends on how good an approximation must be over how wide a band. Someone, I believe R.B-J., pointed out that pink noise is generated from white noise by a filter with 3 db/octave slope, and gave a URL where one could be found. (Reversing the sequence of poles and zeros reverses the slope of the response.) Look back in one of your threads. The slope given in a specification is often intended to be a minimum, not a target. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������