Reply by October 11, 20082008-10-11
On Oct 10, 8:01&#4294967295;pm, "Zeph80" <surabhi_tal...@hotmail.com> wrote:
> In windowing method for FIR design, you specify the frequency response of > the desired filter at sample points fs/N, and perform an IDFT to obtain > h(n). > So doesnt this mean that you want fs to be as low as possible to specify > better frequency resolution. But Fs is generally many times the cut-off > frequency - more than the minimum of twice the cut off needed. > > Why is this?Isn't the frequency resolution that I specify for the filter > response going to be poorer as I choose higher Fs?
Here is an actionscript program that may help you see what you are trying to figure out: http://www.fourier-series.com/fourierseries2/flash_programs/LowPassFIR/index.html http://www.fourier-series.com/fourierseries2/convolution.html
Reply by Fred Marshall October 11, 20082008-10-11
Zeph80 wrote:
>> In windowing method for FIR design, you specify the frequency >> response of the desired filter at sample points fs/N, and perform an >> IDFT to obtain h(n). >> So doesnt this mean that you want fs to be as low as possible to >> specify better frequency resolution. But Fs is generally many times >> the cut-off frequency - more than the minimum of twice the cut off >> needed. >> >> Why is this?Isn't the frequency resolution that I specify for the >> filter response going to be poorer as I choose higher Fs? >> >> > > > N is the size of FFT. I guess my question is, when I design this > filter using the IDFT method, if I had a choice how would I select Fs > and why?
I think I see how you got there .... - if you assume that the length of the filter is fixed already then - then, you note that the sequence to be IDFTd is spread over Fs - then, the samples in the sequence move apart as Fs is increased. You ask if the sample rate should not be as low as possible and the answer is YES. No design should have it higher than "necessary" - and "necessary" is in the eye of the beholder for a number of reasons. I think you probably understand by now: - the length of the filter will be determined by the sharpness of transitions between stop bands and pass bands .. because it forces the distance between frequency sample points. The closer the frequency sample points have to be, the longer the filter has to be. - the temporal sample interval is the unit delay in the filter So: - given that the sample rate is determined by other factors anyway (as others have pointed out), it will be a low as possible before you reach the point of filter design. Well, except in more complicated cases. - you sample the intended frequency response as densely or as sparsely as your specification can stand. This determines the length of the filter. As long as you assume that the sample rate is as low as possible, then the filter length is pretty much fixed by your frequency response specification. I hope this helps. Fred
Reply by Rune Allnor October 11, 20082008-10-11
On 11 Okt, 02:01, "Zeph80" <surabhi_tal...@hotmail.com> wrote:
> In windowing method for FIR design, you specify the frequency response of > the desired filter at sample points fs/N, and perform an IDFT to obtain > h(n). > So doesnt this mean that you want fs to be as low as possible to specify > better frequency resolution. But Fs is generally many times the cut-off > frequency - more than the minimum of twice the cut off needed.
No. One doesn't select the sampling frequency quite as freely as that. The sampling frequency is the dominating system parameter, it's the hardest parameter to change. So one chooses it with a lot of safety margin just to be sure one doesn't loose soemthing that might be important. So once you get to filtering one particular signal you have to accept whatever sampling frequency was used, and go on from there.
> Why is this?Isn't the frequency resolution that I specify for the filter > response going to be poorer as I choose higher Fs?
No. The 'frequency resolution' is compensated by using more coeffcients in the filter. If you do the math you will find that it is the temporal duration of the filter that is important, not the number of coefficients. In other words, if a filter with sampling frequency f' requires 9 samples to meet a (physical frequency) spec, a filter with sampling frequency f" = 10*f' will require 10*9 = 90 samples to meet the same (physical frequency) spec. The two filters have different numbers of coeffcinets but their impulse responses last for the same (physical) time. Rune
Reply by SteveSmith October 11, 20082008-10-11
What you said may be true, but it is not a very fruitful way of looking at
the problem.  Three reasons I can think of: First, the sampling rate is
usually determined by other factors, such as the nature of the signal, the
analog processing done before the ADC, and the computational power of your
processor. It is not something that you adjust to faciliate the algorithm.


Second, it is easy to made N larger if you want better resolution in your
frequency response specification. 

Third, and most important, the frequency resolution of your final filter
does not usually depend on the accuracy of your initial specification. It
depends mainly on the length of the filter kernel.

Here's two links that may help. 
Regards,
Steve

http://www.dspguide.com/ch16/1.htm
http://www.dspguide.com/ch17/1.htm

Reply by Jerry Avins October 11, 20082008-10-11
Zeph80 wrote:
>> In windowing method for FIR design, you specify the frequency response of >> the desired filter at sample points fs/N, and perform an IDFT to obtain >> h(n). >> So doesnt this mean that you want fs to be as low as possible to specify >> better frequency resolution. But Fs is generally many times the cut-off >> frequency - more than the minimum of twice the cut off needed. >> >> Why is this?Isn't the frequency resolution that I specify for the filter >> response going to be poorer as I choose higher Fs? >> >> > > > N is the size of FFT. I guess my question is, when I design this filter > using the IDFT method, if I had a choice how would I select Fs and why?
You choose the sample rate to meet or exceed the signal's requirements. You choose N to provide the number of taps that you think your filter will need. More taps give better control of response at the cost of more delay and greater processing burden. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295; ** Posted from http://www.teranews.com **
Reply by Zeph80 October 11, 20082008-10-11
>In windowing method for FIR design, you specify the frequency response of >the desired filter at sample points fs/N, and perform an IDFT to obtain >h(n). >So doesnt this mean that you want fs to be as low as possible to specify >better frequency resolution. But Fs is generally many times the cut-off >frequency - more than the minimum of twice the cut off needed. > >Why is this?Isn't the frequency resolution that I specify for the filter >response going to be poorer as I choose higher Fs? > >
N is the size of FFT. I guess my question is, when I design this filter using the IDFT method, if I had a choice how would I select Fs and why?
Reply by Jerry Avins October 11, 20082008-10-11
Zeph80 wrote:
> In windowing method for FIR design, you specify the frequency response of > the desired filter at sample points fs/N, and perform an IDFT to obtain > h(n). > So doesnt this mean that you want fs to be as low as possible to specify > better frequency resolution. But Fs is generally many times the cut-off > frequency - more than the minimum of twice the cut off needed. > > Why is this?Isn't the frequency resolution that I specify for the filter > response going to be poorer as I choose higher Fs?
First of all, what are you calling N? I can think of a few alternatives. Basically, Fs is determined by other system constraints, not the least of them being the highest frequency present in the signal. Avoid the issue. For equiripple design, use something like http://www.dsptutor.freeuk.com/FIRFilterDesign/FIRFiltDes102.html. Your choice of windows is a bit limited, but probably adequate. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295; ** Posted from http://www.teranews.com **
Reply by Zeph80 October 10, 20082008-10-10
In windowing method for FIR design, you specify the frequency response of
the desired filter at sample points fs/N, and perform an IDFT to obtain
h(n).
So doesnt this mean that you want fs to be as low as possible to specify
better frequency resolution. But Fs is generally many times the cut-off
frequency - more than the minimum of twice the cut off needed. 

Why is this?Isn't the frequency resolution that I specify for the filter
response going to be poorer as I choose higher Fs?