[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Audio filter design - how to calculate kernel order from cutoff frequency

Posted on 2004-10-25
13
Medium Priority
?
433 Views
Last Modified: 2012-08-14
I have written a filter design wizzard to go with an audio DSP application, which offers the following FIR windowing functions as kernels: Blackman, Hamming, Hanning, Triangular and Rectangular. It allows low pass and high pass filtering. It works fine, but I just don't know how to calculate an appropriate filter order to give the desired cutoff frequency. I need to know how to calculate this for EACH of the above windowing functions.
Thanks.
0
Comment
Question by:HorridMan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
13 Comments
 
LVL 3

Accepted Solution

by:
andYetAnotherLoginName earned 500 total points
ID: 12398468
So, your situation is:

given order, CAN calculate cutoff;
given cutoff,CANNOT calculate order.

why don't you just pre-calc some table of (order, cutoff) value pairs, and then use some sort of interpolation on that data to select order that result into given cutoff ?..

yeah, that's called cheating.
0
 
LVL 22

Expert Comment

by:grg99
ID: 12399554
I don't quite get your question.   IIRC the cutoff frequency of each filter is not a function of the filter order.    The filter order determines the steepness of the dropoff, the maximum attenuation, and the number of artifacts in the rejection band.

0
 
LVL 22

Expert Comment

by:grg99
ID: 12420826
For example, for the same cutoff frequency,  an order 13 filter gives about 40 db attenuation in the stop band, a 26 order one gives about 80db attenuation.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:andYetAnotherLoginName
ID: 12420881
grg99: perhaps by "cutoff" he mean freakuency, for which attenuation is more than <some-special-value-here> db?
0
 
LVL 22

Expert Comment

by:grg99
ID: 12421281
Maybe!

I suspect there is no simple formula for this.  I'd do a simple binary cut-and-try:  See if order 30 is good enough, if so, try 15, if not try 60, divide and conquer.  The applets I've used do each calculation in less than a second, so time is not a big issue.



0
 
LVL 3

Expert Comment

by:andYetAnotherLoginName
ID: 12421311
that's virtually the same I have suggested :-P
0
 
LVL 22

Expert Comment

by:grg99
ID: 12423471
You can't really interpolate from tables, as there are all kinds of oscillating cyclic peaks that vary depending on ALL the parameters.  If the curves of attenuation vs poles was monotonically increasing, you'd have a chance, but in general you don't and can't.

it gets even worse with things like Tsybchev filters with nulls, these can get really wild.

0
 

Author Comment

by:HorridMan
ID: 12430976
Okay thanks. I'll just leave this question up a little while longer.
0
 

Author Comment

by:HorridMan
ID: 12431052
 I am using the term cutoff frequency not to mean the lowest frequency that is attenuated, but the the frequency at which a given amount of attenuation (say 10% of the stopband attenuation) has occurred. That has always been the idea presented in textbooks I have read. But I'm 100% self taught, so forgive me if I sound like I'm out to lunch on this. But changing the filter order CERTAINLY DOES have an effect on which frequency is attenuated by a given amont. (I tested it again just now). I want to know how to work out what order will give provide users with the cutoff they specifiy with a known sampling rate.
0
 
LVL 3

Expert Comment

by:andYetAnotherLoginName
ID: 12431084
That sounds like my guess. If "order" is an only varying parameter, use my suggestion, if no, grg99 way would be easier (you don't want to mess with multidimensional interpolation just to find your cutoff).
0
 
LVL 22

Assisted Solution

by:grg99
grg99 earned 500 total points
ID: 12432796
Ok, we have a problem with terminoligy.

Thee are two different parameters mixed up here:

#1 is the "cutoff frequency", which is usually specified as the point where the response is down to half power (.707 voltage).

#2 is the "attenuation slope", which is usually characterized as so many db per octave.

Most of the design equations are set up so that #1 doesnt change with filter order, but of course #2 does.

As noted before, there's probably no simple formula for this, if there was, it would be easier to design filters without all the fancy math and iteration.

 

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Complex Numbers are funny things.  Many people have a basic understanding of them, some a more advanced.  The confusion usually arises when that pesky i (or j for Electrical Engineers) appears and understanding the meaning of a square root of a nega…
Article by: Nicole
This is a research brief on the potential colonization of humans on Mars.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question