I have to take the FFT of a sin wave of 50 Hz and measure up to the 16 harmonics.
My sampling frequency is as per Nyquist criteria: fs = 16*50*2 = 1600 Hz = 1600 samples/sec
i.e in one period of 50Hz corresponds to 20 msec or 32 samples.
As shown in FIG-1, I will take 32 samples per cycle.
Then as per FIG-2 I will do the 32 point FFT of the ADC sample voltage series x[n]
where n
= 0 to 31
Then FFT algorithm returns the value X[k]
where k
= 0 to 31.
If
x[n]
is the sample of voltage.
So my question is in the output of the FFT algorithmX[k]
, where k = 0 to 31 :
X[0]
= fundamental frequency
X[1]
= 1st harmonic . . .
X[31]
= 31st harmonicIs it right ?
Also if value of
X[1]
= 1 + j, then magnitude ofX[1]
= sqrt(2) = 1.4142. So is this value 1.4142 the peak value of the first harmonic ? Now if I have to find RMS value of first harmonic then will it be Vrms = Vm/sqrt(2) = 1 ?Also should the 32 samples of the input signal start from zero crossing of the sin wave, or can I start at any time place of the sin wave as shown in figure-3?
- Also one more thing before feeding the 32 samples of the 50 Hz Signal to the FFT algorithm do I have to do some digital filtering on these samples .. why I am asking this question because suppose while taking 20 th & 16th sample if some noise spike comes then in that case it will not be the true value. If yes then which digital filtering method will be best ?
Please correct me.