Hi,
This question is for the electronic engineering types amongst you; any advice would be much appreciated..
So the problem; I am trying to undesrtand how to apply the following formula to calculate the co-efficients for a low pass FIR filter like so:
What i mean this this:
C = (Sin( n * pi * (Fc/Fn)) ) / (pi * n)
Where Fc = Cuttoff frequency, Fn = Nyquist frequency, i.e. Half the sampling frequency, and n = The filter tap you wish yo calculate.
I have found an example on the web whihc explains it, see link:
http://homepages.which.net/~paul.hills/Circuits/MercurySwitchFilter/FIR.html
The problem is I cannot see how they get from that formula to the final values for the filter taps they show; the formula seems to give the same answer regardless of the value for n, like this:
Taking the example in the link above...
Fc = 1Hz, Fs = 16Hz therefore Fn = 8Hz, applying:
C = (Sin( n * pi * (Fc/Fn)) ) / (pi * n)
For n=-2:
C = (Sin( -2 * pi * (1/8)) ) / (pi * -2) = 0.00218
For n=-1:
C = (Sin( -1 * pi * (1/8)) ) / (pi * -1) = 0.00218
For n=0:
C = (Sin( 0 * pi * (1/8)) ) / (pi * 0) = calculator says "Math Error" this is just plan wrong
For n=1:
C = (Sin( 1 * pi * (1/8)) ) / (pi * 1) = 0.00218
For n=2:
C = (Sin( 2 * pi * (1/8)) ) / (pi * 2) = 0.00218
See the problem? I assume I am misunderstanding something at a very fundamental level, but I have no idea what. I have not applied the hamming window correction formula to the results above, but in all cases the adjustment was in the range of 0.99999 which dosent alter the final filter tap values much... Any help would be greatly appreciated
This question is for the electronic engineering types amongst you; any advice would be much appreciated..
So the problem; I am trying to undesrtand how to apply the following formula to calculate the co-efficients for a low pass FIR filter like so:
What i mean this this:
C = (Sin( n * pi * (Fc/Fn)) ) / (pi * n)
Where Fc = Cuttoff frequency, Fn = Nyquist frequency, i.e. Half the sampling frequency, and n = The filter tap you wish yo calculate.
I have found an example on the web whihc explains it, see link:
http://homepages.which.net/~paul.hills/Circuits/MercurySwitchFilter/FIR.html
The problem is I cannot see how they get from that formula to the final values for the filter taps they show; the formula seems to give the same answer regardless of the value for n, like this:
Taking the example in the link above...
Fc = 1Hz, Fs = 16Hz therefore Fn = 8Hz, applying:
C = (Sin( n * pi * (Fc/Fn)) ) / (pi * n)
For n=-2:
C = (Sin( -2 * pi * (1/8)) ) / (pi * -2) = 0.00218
For n=-1:
C = (Sin( -1 * pi * (1/8)) ) / (pi * -1) = 0.00218
For n=0:
C = (Sin( 0 * pi * (1/8)) ) / (pi * 0) = calculator says "Math Error" this is just plan wrong
For n=1:
C = (Sin( 1 * pi * (1/8)) ) / (pi * 1) = 0.00218
For n=2:
C = (Sin( 2 * pi * (1/8)) ) / (pi * 2) = 0.00218
See the problem? I assume I am misunderstanding something at a very fundamental level, but I have no idea what. I have not applied the hamming window correction formula to the results above, but in all cases the adjustment was in the range of 0.99999 which dosent alter the final filter tap values much... Any help would be greatly appreciated