Pynq z2 fft

PYNQ version & Board name & Tool Version : PYNQ z2

I am currently performing an FFT on a sine wave read by an ADC using an FFT IP core. However, there is an issue with the FFT amplitude. As shown in the attached image, while the FFT accurately detects the sine wave frequency, the amplitude keeps changing unexpectedly.

I am testing using an ILA, with the sine wave frequency set to 11kHz. The FFT IP parameters are as follows:

  • Fixed-point format: Q13.12
  • ADC input: 12-bit resolution

Despite applying scaling, I find it puzzling that the scaling factor seems inconsistent. Without applying any specific scaling factor, the output should remain stable, but my results vary significantly. Sometimes, negative values even appear in the output.

For example, the FFT output [12:0] fluctuates among values such as 144, 568, -38, and -278.

Could someone explain why the FFT amplitude keeps changing like this? Any guidance would be greatly appreciated.