Hi Filippo,
It’s clear that you need to understand the DFT/FFT better, and I have
provided some links below. Here are some ideas that might get you started
in the right direction.
If you want to look at the harmonics of 50 Hz, up to the 50th harmonic,
you should probably sample at 50 Hz x 128 = 6,400 samples per second.
This
would require you to provide an anti-alias filter that p***** frequencies
up to 2,500 Hz (i.e., 50 Hz x 50), and blocks all frequencies above 3,200
Hz (i.e., one-half the sampling rate).
Then, take the FFT with N=128, convert the output from rectangular to
polar form, and discard the phase. This will give you 65 data points,
providing the amplitudes of the sinusoids: DC, 50Hz, 100 Hz, 150Hz, 200
Hz,
... 3,200 Hz.
Good luck!
Steve
http://www.dspguide.com/ch3/2.htm
http://www.dspguide.com/ch3/4.htm
http://www.dspguide.com/ch8/2.htm
and forward
http://www.dspguide.com/ch12.htm
and forward


|