Not a member?

# Discussion Groups | Comp.DSP | [Question] How to get BW or Q from slope(db/oct) for HPF

There are 9 messages in this thread.

You are currently looking at messages 1 to .

Is this discussion worth a thumbs up?

0

# [Question] How to get BW or Q from slope(db/oct) for HPF - krish - 2005-03-02 07:20:00

```Topic : To design an IIR HPF filter using IPP(Intel Integrated Performance
Primitives) library.
Current need: to calculate BW or Q from slope.

The specification of filter is :
Cutt-off frequency : in Hz
Slope : in dB/oct

We are having an IPP library which has IIR filter implementation
function. This function has following parameters:

pTaps:-	 Pointer to the array containing the taps. The number of
elements in the array is 2*(order+1) for arbitrary filters and 6*numBq
for BQ filters.i.e. This is the array of coeffiecients A0, A1, A2 AND BO,

tapsFactor:-  Scale factor for the taps of Ipp32s data type
(for integer versions only)

numBq:-  Number of cascades of biquads. This argument is used for BQ
filters.

order:- Order of the IIR filter. This argument is used for arbitrary
filters.

pDlyLine:- Pointer to the array containing the delay line values. The
number of elements in the array is order for arbitrary filters and
2*numBq for BQ filters.

pState:-  Pointer to the IIR state structure to be created.

We have certain formulae for the coeffiecients which require the
Bandwidth or Quality factor to calculate the coefficients.

So how to get the Bandwidth for Lowpass or highpass filter if we have
the slope in db/oct.....

Hoping for valuable help in this matter and thankyou very much for

This message was sent using the Comp.DSP web interface on
www.DSPRelated.com
```
______________________________

# Re: [Question] How to get BW or Q from slope(db/oct) for HPF - Jerry Avins - 2005-03-02 11:03:00

```krish wrote:
> Topic : To design an IIR HPF filter using IPP(Intel Integrated Performance
> Primitives) library.
> Current need: to calculate BW or Q from slope.

...

There is no general connection between slope and bandwidth. You are
barking up the wrong tree.

It seems that the package permits you to build whatever you want, and
that your difficulty is knowing what to want. That knowledge comes from
understanding what a filter does and how it does it. There are several
books you can use. Most of them are in the bibliography for beginners at
http://www.dspguru.com. Just in case you don't find it at DSPguru,
http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt
has some design formulas that might help.

Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
```
______________________________

# Re: [Question] How to get BW or Q from slope(db/oct) for HPF - robert bristow-johnson - 2005-03-02 11:54:00

```Jerry mentioned the Audio EQ Cookbook at harmony-central.com but there are

in article m...@giganews.com, krish at
c...@rediffmail.com wrote on 03/02/2005 07:20:

> Topic : To design an IIR HPF filter using IPP(Intel Integrated Performance
> Primitives) library.

dunno anything about the IPP.  maybe Minister of Algorithms at Intel, Eric
Jacobsen, can address some issues for you.

> Current need: to calculate BW or Q from slope.
>
> The specification of filter is :
> Cutoff frequency : in Hz

this maybe should be defined.  is it the -3.01 dB corner frequency?

> Slope : in dB/oct

the slope exactly where?  in the passband?  (of course not, it was a
rhetorical question.)  but where?  the asymptotic slope for the analog
prototype, as you get closer and closer to DC (which on a log-freq graph is
like -infinity) for a HPF is 6.02 dB/octave per order.  the Q does not
affect that.

however, at some frequencies just around the cutoff, there *is* a way that
the Q affects the rapidity of roll-off.  but that is a complicated question
because it depends on where and, if you're cascading biquads, the slopes of

now, if you want your HPF to be maximally flat in the passband (which means
you'll get the steepest slope possible without having any bumps in the
passband), you will want an Inverse Chebyshev (or Chebyshev type 2).  in
that, you have to specify a maximum tolerable stopband ripple and the Qs
(and locations of zeros) are different for different biquad sections.  if
you don't want *any* stopband ripple nor bumps in the passband, you need a
Butterworth HPF filter and the Qs are different in each biquad section.

> We have certain formulae for the coeffiecients which require the
> Bandwidth or Quality factor to calculate the coefficients.

you have to be more clear on what you want for the filter behavior before
you can decide what the Qs are for each biquad section.

> So how to get the Bandwidth for Lowpass or highpass filter if we have
> the slope in db/oct.....

for LPF, there is an additional issue if bilinear transform is used in the
design.  because of frequency warping, the slope as you approach the Nyquist
frequency will become infinite, even for a finite order filter.

--

r b-j                  r...@audioimagination.com

"Imagination is more important than knowledge."

```
______________________________

# How to get BW or Q from slope(db/oct) - krish - 2005-03-03 00:15:00

```Hello friends,
Well the reason why I asked precisely about getting BW or Q from
slope(dB/oct) is the lack of time due to approaching deadline of project.
We are adviced to use IPP library since it is a reliable library (must be
rigourously tested for what it claims it does).  It can provide the output
of an IIR filter if we provide it with some important parameters required
for filtering. So now our essential part is to get these parameters (A0,
A1, A2 AND BO,B1, B2 (for bi-quad)) according to the user's choice of
filter and parameters.
Ours will be a GUI which provide user with following options:-
HPF  or LPF.
for HPF:-
Cuttoff frequency(Hz):-  63, 80, 125, 160, 250, 350, 500, 700, 1K.
slope(db/oct):- 0, -3, -6, -12, -24

for LPF
Cuttoff frequency(Hz):-  1K, 1.4K, 2K, 3K, .... 16K(some 8 values)
slope same as in HPF.

user can choose only one of these values and not out of this.

so now finding the coefficients is next step. (after getting the H(Z) and
realizing it).
If user keeps Cuttoff same and varies the slope then H(z) must also change
accordingly. Even the transfer function shall change when the desired slope
is changed. Hence precisely what is that change in the transfer function
when the slope is changed??

The cookbook formulae of
http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt
provide a way out if we provide these formulae with either BW or Q.

and obviously the slope (fall of signal in stop band) must affect both Q
and BW. so I want to know how to relate the changing slope to the BW or
Q.

Thanking you for your involvement and opinions,

This message was sent using the Comp.DSP web interface on
www.DSPRelated.com
```
______________________________

# slope and BW or Q - krish - 2005-03-03 00:37:00

```hello,
>There is no general connection between slope and bandwidth. You are
>barking up the wrong tree.
----------------------
are you sure?  doesnt the effective bandwidth change with Q. and Q is
nothing but the sharpness of response. Slope is how the response behaves
in stopband. Well if you are right then please explain one thing. what
steps must be followed if user changes the slope (he can choose either 0,
-3, -6, -12, -24). definitely the response must change. how shall it be
Thanking you for your involvement and response,

This message was sent using the Comp.DSP web interface on
www.DSPRelated.com
```
______________________________

# Re: slope and BW or Q - Jerry Avins - 2005-03-03 10:02:00

```krish wrote:
> hello,
>
>>There is no general connection between slope and bandwidth. You are
>>barking up the wrong tree.
>
> ----------------------
> are you sure?  doesnt the effective bandwidth change with Q. and Q is
> nothing but the sharpness of response. Slope is how the response behaves
> in stopband. Well if you are right then please explain one thing. what
> steps must be followed if user changes the slope (he can choose either 0,
> -3, -6, -12, -24). definitely the response must change. how shall it be
> Thanking you for your involvement and response,

Of course slope is one of the filter's properties, just as center
frequency and bandwidth are. Each can be chosen independently of the
others. With any given filter structure, they interact, which is to say
that each coefficient in the defining equation affects all of them.

You write, "Slope is how the response behaves in stopband." That's not
entirely true. I suspect that you have transition slope in mind. Slope
describes how amplitude changed with frequency. Sometimes slope is an
intentional part of the pass band, as in a tone control.

Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
```
______________________________

# Re: how to design filter using slope - robert bristow-johnson - 2005-03-04 01:03:00

```krish at <c...@rediffmail.com> asked me to forward this to the
group, so here it is:

http://www.dsprelated.com/showmessage/30694.php
to contact you.  His message follows:

problem in site.----if u can, pls forward it as a follow up----

Well, but in many applications/ software products, i hv seen them giving the
user the option for changing slope and varying the output. My problem is
that how do i do the same in our project? if user has chosen a slope then
how do i filter accordingly? i have read the books on analog filter design
but i cant recollect anything particular like that. and the worst part is
Secondly the cookbook formulae mention that we can calculate the
coefficients of the filter from the BW and Q, but no other variable is taken
in granted.
Also i realise that slope directly affects the order of the filter.
hence more the slope required more the order of filter and hence i shall
Also if u have other mailing-lists like comp.dsp who u think can help me
pls provide me with the same. Thanking you,

```
______________________________

# Re: how to design filter using slope - robert bristow-johnson - 2005-03-04 01:40:00

```on 03/04/2005 00:14, c...@rediffmail.com at
c...@rediffmail.com wrote:

> site.----if u can, pls forward it as a follow up----

valid.

> Well, but in many applications/ software products, i hv seen them giving the
> user the option for changing slope

changing the slope *where*??

> and varying the output. My problem is that
> how do i do the same in our project? if user has chosen a slope then how do i
> filter accordingly?

i guess you take that slope, expressed in dB/octave and divide by 6 and the
remaining number is the order of filter you need to implement.

> i have read the books on analog filter design but i cant
> recollect anything particular like that. and the worst part is that my

deadline for what?  is this school related or job related?

> Secondly the cookbook formulae mention that we can calculate the coefficients
> of the filter from the BW and Q, but no other variable is taken in granted.

for shelving filters, there is a shelf-slope parameter that you can use

> Also i realise that slope directly affects the order of the filter. hence more
> the slope required more the order of filter and hence i shall cascade the
> biquads. for -6dB a biquad will work. but how to give 0dB and -3 dB using a

a slope of 0 dB/octave is either the peak of a bandpass filter, or the
passband of a LPF or HPF, or a wire.  what do you mean by 0 dB?

a filter with -3 dB/octave slope is a pink-noise filter and, if you type
"pink noise" into Google and hit "I'm feeling lucky", you'll go to:

http://www.firstpr.com.au/dsp/pink-noise/

in there is a few different descriptions of how to design a pink-noise
filter of which one is a simple design of mine.  essentially, you alternate
between a real pole (-6 dB/octave) and a real zero (+6 dB/octave) in such a
way to get -3 dB/octave.

> Also if u have other mailing-lists like comp.dsp who u think can help me pls
> provide me with the same.

comp.dsp is a USENET newsgroup and not a mailing list.  it's the best place
to ask questions like those you have.  perhaps the music-dsp which you can
find at http://shoko.calarts.edu/~glmrboy/musicdsp/music-dsp.html and at
http://musicdsp.org/ are good places to go.  in any case, listen carefully
to the responses you get and try to think about and answer the questions
they ask you to clarify the question.  impossible or nebulous questions get

--

r b-j                  r...@audioimagination.com

"Imagination is more important than knowledge."

```
______________________________

# Re: slope and BW or Q - Jerry Avins - 2005-03-04 11:24:00

```c...@rediffmail.com wrote:
> 		http://www.dsprelated.com/showmessage/30774.php
> 		to contact you.  His message follows:
>
problem in site.----if u can, pls forward it as a follow up----
>
> Well, but in many applications/ software products, i hv seen them
giving the user the option for changing slope and varying the output. My
problem is that how do i do the same in our project? if user has chosen
a slope then how do i filter accordingly? i have read the books on
analog filter design but i cant recollect anything particular like that.
and the worst part is that my deadline is nearing.
>     Secondly the cookbook formulae mention that we can calculate the
coefficients of the filter from the BW and Q, but no other variable is
taken in granted.
>     Also i realise that slope directly affects the order of the
filter. hence more the slope required more the order of filter and hence
give 0dB and -3 dB using a bi-biquad???.
>     Also if u have other mailing-lists like comp.dsp who u think can
help me pls provide me with the same. Thanking you,

"Slope" is not specific enough to be useful. I can guess from what you
write that you think of it as the asymptotic slope is analog filters,
what in radio work is called "skirt selectivity". In that case, it is
the same as filter order and usually specified that way.

It is sometimes possible to plug numbers into a formula that isn't
understood and get useful results. It isn't possible all the time. I
think you need to know a little more about digital filters -- IIRs for
"How to do it" isn't enough. You need to know what to accomplish.