career4krish@rediffmail.com wrote:
> krish visited DSPRelated.com and clicked on your name from this page:
> http://www.dsprelated.com/showmessage/30774.php
> to contact you. His message follows:
>
> I read your reply but wasnt able to post a follow up due to some
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
i shall cascade the biquads. for -6dB a biquad will work. but how to
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
your application -- before you can even understand what you're asking.
"How to do it" isn't enough. You need to know what to accomplish.
I'm sorry about your deadline; I can't help that from here. You can read
Chapters 19 and 20 at http://www.dspguide.com/ for some basic
understanding. Buy the book if it's in your budget, but first get
http://www.dsprelated.com/books/6.php if you get only one.
Jerry
--
The time to splurge is when the barrel is full, and when it is
nearly empty. from Hesiod; "Works and Days"
���������������������������������������������������������������������
Reply by robert bristow-johnson●March 4, 20052005-03-04
on 03/04/2005 00:14, career4krish@rediffmail.com at
career4krish@rediffmail.com wrote:
> I read your reply but wasnt able to post a follow up due to some problem in
> site.----if u can, pls forward it as a follow up----
you can always use Google Groups to post, as long as your return address is
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 is nearing.
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
instead of Q.
> 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
> bi-biquad???.
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
impossible or nebulous answers.
--
r b-j rbj@audioimagination.com
"Imagination is more important than knowledge."
Reply by robert bristow-johnson●March 4, 20052005-03-04
krish at <career4krish@rediffmail.com> asked me to forward this to the
group, so here it is:
krish visited DSPRelated.com and clicked on your name from this page:
http://www.dsprelated.com/showmessage/30694.php
to contact you. His message follows:
I read your reply but wasnt able to post a follow up due to some
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 i shall
cascade the biquads. for -6dB a biquad will work. but how to 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,
Reply by Jerry Avins●March 3, 20052005-03-03
krish wrote:
> hello,
> In your reply ---------
>
>>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
> done? Your reply might help me understand better.
> 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.
�����������������������������������������������������������������������
Reply by krish●March 3, 20052005-03-03
hello,
In your reply ---------
>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
done? Your reply might help me understand better.
Thanking you for your involvement and response,
This message was sent using the Comp.DSP web interface on
www.DSPRelated.com
Reply by krish●March 3, 20052005-03-03
Hello friends,
firstly thanks for your response.
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
Reply by robert bristow-johnson●March 2, 20052005-03-02
Jerry mentioned the Audio EQ Cookbook at harmony-central.com but there are
problems with answering your question directly.
in article m5mdnTcdJ5_tMrjfRVn-jw@giganews.com, krish at
career4krish@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
the other biquads.
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 rbj@audioimagination.com
"Imagination is more important than knowledge."
Reply by Jerry Avins●March 2, 20052005-03-02
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.
�����������������������������������������������������������������������
Reply by krish●March 2, 20052005-03-02
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,
B1, B2 (for bi-quad)
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
giving your precious time.
This message was sent using the Comp.DSP web interface on
www.DSPRelated.com