Hello,
I am working on the FFT calculation in order to measure the Harmonics. The issue I am facing is regarding the realization of the Harmonic magnitude as per my input.
Since ADC expects no negative value therefore I have added a DC-offset of 1volt to a 50Hz Sine wave of 1 Volt peak.
To explain it I am attaching results of the two sample tests conducted:
- The first column shows, the ADC values;
- The second column shows, the volts in the converted analogue voltage;
- The third column shows, the computed FFT from the RFFT.32mag function;
- The fourth column shows, the data conversion of output to Q30,
- The fifth column shows, since the input is scaled down by 16 so the output of Q30 is scaled (multiplied by 16);
- The sixth column shows, since the output is squared magnitude so we take the square root of it and,
- The seventh column shows, then we multiply it by 2 since the FFT is a mirror spectrum.
Now the queries:
Q1. I provided a DC offset of 1v but I got 1.23v at the output?
Q2. Since my harmonic value shall be 1volts instead of 1.23v (as marked) in both the tests conducted, I don't understand what I am doing wrong in order to calculate the right harmonic amplitudes?
-----------
Q3. I provided a DC offset of 1.5v but I got 1.83v at the output?
Q4. Since my harmonic value shall be 1volts instead of 1.23v (as marked) in both the tests conducted, I don't understand what I am doing wrong in order to calculate the right harmonic amplitudes?
--------
Q5. I provided a DC offset of 1.5v but I got 1.84v at the output?
Q6. Since my harmonic value shall be 0.5volts instead of 0.617v (as marked) in both the tests conducted, I don't understand what I am doing wrong in order to calculate the right harmonic amplitudes?
Please let me know. Looking forward to hearing from you soon.
Thank you.