0
votes

I want to create a bandpass filter that filters my audio signal into an arbitrary amount of equally sized sub-bands. Now I'm trying to achieve this using a Butterworth filter (is this a good solution for a problem of this nature?).

Let's say I have a signal with a sampling frequency of 1200Hz, and thus a Nyquist frequency of 600Hz. Now I want to decompose this signal into three different sub-bands, each of length 200Hz. How do I achieve this?

I've tried reading up on the documentation, but I still need some clearing up: as I've understood it, I want to use the following overloaded butter()-function:

butter(#order, [min_freq, max_freq]/nyq_freq)

Is this correct? It says the minimum and maximum frequencies must be in the interval (0,1) - how do I go about creating the first and final sub-bands? Just choose arbitrary small/big values (0.0001 and 0.9999)? And what does the #order do? Is it true that an higher order gives more exact cutoff on the signal but that it then requires a more extensive computation?

1

1 Answers

0
votes

According to the documentation, the value for Wn

must lie between 0 and 1, where 1 corresponds to the Nyquist rate—half the sample rate or π rad/sample

but the Nyquist rate is not the same as the Nyquist frequency (as you can read here https://dsp.stackexchange.com/questions/26721/difference-between-nyquist-rate-and-nyquist-frequency)

Basically, the Nyquist rate is twice your bandwidth.

The order is the degree of the resulting polynomial of the filter. If n=1 the the signal will decay 20 dB/decade. If n=2 then it will decay 40 dB/decade and so on. For some uses, lower order filters won't be possible because the signal won't be able to decay to the desired values at the given frequencies. And yes, theoretically, the higher the order, more exact will be the cutoff (and it will require more calculations) but in real filters it could be hard to achieve a very high order filter.