This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

origin of angles and gain amplitude relationship between FFT

Hi to all , 

I have some doubts about the FFT using ADC values .
- I want to know , when the FFT is calculated and returned vector magnitude and phase , the relationship between the amplitude of the input signal and the
amplitude of the output signal vector magnitude.

- And my other question is , in the phase vector, which is the angles origin ? because I have problems in the calculation of total harmonic distortion and reactive power , active power and power factor .

I set the ADC mode dual sample and hold , to acquire voltage and current simultaneously , and when assigned to the tension is the reference , the calcul is not correct, because the phase that brings me to the position of the fundamental frequency is -1.64 rad and should be 0 or 2pi.

The FFT takes as input 64 values ​​, the fundamental frequency of the input signal is 50Hz and the sampling frequency that is 3K2 Hz .

Thank you. hope to answer
  • Hi Jose, 

    Which DSP library are you using-the fixed-point or FPU library? For a 50Hz fundamental, you should see a peak in the (50*64/300 ~ 11) 11th bin. Since the frequency spacing, i.e. Fs/N =  300/64 = 4.6875 Hz/bin you wont get an exact match for 50Hz. You will see a peak in the 11th bin, and probably leakage in the 10th bin as well. 

    I believe we normalize the FFT by dividing by N, so you should see the amplitude preserved, but again you will see leakage for this specific case.

    Im not really sure i understand about the phase part. you expect it to be 0 or 2pi at the fundamental, i.e. purely imaginary in the 11th bin?