"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message
news:aYGdnRlo6rmLtrjYnZ2dnUVZ_qidnZ2d@centurytel.net...
>
> "Chandra" <hichandra@gmail.com> wrote in message
> news:1159980151.941346.129010@i3g2000cwc.googlegroups.com...
>> Hi Guys,
>>
>> I want to have a band pass filter with cutoffs 0.15Hz and 2Hz and also
>> a low pass filter with a cutoff of 10Hz. I want to choose either one at
>> a time. I have to give the sampling frequency to both filters and so if
>> I give the same sampling frequency, is it not going to be a problem?
>> How do we decide which sampling frequency works well for both filters?
>> Please give me some info over it.
>>
>> Thanks,
>>
>> Chandra
>
> After the other responses some simple rules of thumb may help.....
>
> The length of a filter in time is roughly the reciprocal of the narrowest
> transition width. So, you need to specify the transition widths for all
> the filters. One would think that the 0.15Hz cutoff of the bandpass
> filter would be the most demanding - but maybe it isn't. If the 0.15 Hz
> cutoff has to be 60dB down at 0.1Hz but the 2Hz cutoff has to be 60dB down
> at 2.025Hz then it's the latter that is the most demanding of the two.
> A transition of .05Hz requires a filter unit sample response of length
> roughly 20 seconds..
>
> A lower sample rate gives a shorter filter of the same time length - since
> the filter delays would be equal to the sampling rate usually. So, if
> that matters to you, then a shorter sampling rate for the bandpass might
> be a good idea.
>
> Fred
I should have said:
...then a *lower* sampling rate for the bandpass might be a good idea.
That would result in a *shorter* filter in terms of coefficients for the
same frequency response (roughly).
Fred
Reply by Fred Marshall●October 5, 20062006-10-05
"Chandra" <hichandra@gmail.com> wrote in message
news:1159980151.941346.129010@i3g2000cwc.googlegroups.com...
> Hi Guys,
>
> I want to have a band pass filter with cutoffs 0.15Hz and 2Hz and also
> a low pass filter with a cutoff of 10Hz. I want to choose either one at
> a time. I have to give the sampling frequency to both filters and so if
> I give the same sampling frequency, is it not going to be a problem?
> How do we decide which sampling frequency works well for both filters?
> Please give me some info over it.
>
> Thanks,
>
> Chandra
After the other responses some simple rules of thumb may help.....
The length of a filter in time is roughly the reciprocal of the narrowest
transition width. So, you need to specify the transition widths for all the
filters. One would think that the 0.15Hz cutoff of the bandpass filter
would be the most demanding - but maybe it isn't. If the 0.15 Hz cutoff has
to be 60dB down at 0.1Hz but the 2Hz cutoff has to be 60dB down at 2.025Hz
then it's the latter that is the most demanding of the two.
A transition of .05Hz requires a filter unit sample response of length
roughly 20 seconds..
A lower sample rate gives a shorter filter of the same time length - since
the filter delays would be equal to the sampling rate usually. So, if that
matters to you, then a shorter sampling rate for the bandpass might be a
good idea.
Fred
Reply by Rune Allnor●October 5, 20062006-10-05
Chandra skrev:
> Hi Guys,
>
> I want to have a band pass filter with cutoffs 0.15Hz and 2Hz and also
> a low pass filter with a cutoff of 10Hz. I want to choose either one at
> a time. I have to give the sampling frequency to both filters and so if
> I give the same sampling frequency, is it not going to be a problem?
No. Why do you expect it to?
> How do we decide which sampling frequency works well for both filters?
Anything "well above" 20 Hz would work. Usually, the sampling
frequency is decided by other considerations that what filters
one wants to use.
> Please give me some info over it.
Lyons: "Understanding Digital Signal Processing"
Prentice-Hall, 2004.
Rune
Reply by Sparks●October 4, 20062006-10-04
Chandra wrote:
>
>I want to have a band pass filter with cutoffs 0.15Hz and 2Hz and also
>a low pass filter with a cutoff of 10Hz. I want to choose either one at
>a time. I have to give the sampling frequency to both filters and so if
>I give the same sampling frequency, is it not going to be a problem?
>How do we decide which sampling frequency works well for both filters?
>Please give me some info over it.
Yes, I think you may have some difficulty if both filters are fed at the
same sample frequency, although the extent of difficulty would depend on
how you spec'd the filters. The problem I think is caused by the 0.15Hz
cutoff for the bandpass filter.
For example, if you chose a sample frequency of 25Hz, and spec'd the
filters to have a passband ripple of 1dB and a stopband attenuation of
80dB, then the LP filter would require about 64 taps, but the Bandpass
filter would require over 500 taps.
If you filter/decimated by 4 before the BP filter then the taps would
reduce to about 120.
I suggest you download 'ScopeFir' and play about with some sampling and
filtering schemes to get a better feel for the problem, and hopefully
converge on a solution.
Reply by Chandra●October 4, 20062006-10-04
Hi Guys,
I want to have a band pass filter with cutoffs 0.15Hz and 2Hz and also
a low pass filter with a cutoff of 10Hz. I want to choose either one at
a time. I have to give the sampling frequency to both filters and so if
I give the same sampling frequency, is it not going to be a problem?
How do we decide which sampling frequency works well for both filters?
Please give me some info over it.
Thanks,
Chandra