FFT frequency bucket amplitude varies even with constant tone applied

后端 未结 1 1336
醉话见心
醉话见心 2021-01-23 10:16

I am trying to use FFT to decode morse code, but I\'m finding that when I examine the resulting frequency bin/bucket I\'m interested in, the absolute value is varying quite sign

相关标签:
1条回答
  • 2021-01-23 10:59

    Make sure you are using the magnitude of the FFT result, not just the real or imaginary component of a complex result.

    In general, when a longer constant amplitude sinusoid is fed to a series of shorter FFTs (windowed STFT), the magnitude result will only be constant if the period of the sinusoid is exactly integer periodic in the FFT length. e.g.

    f_tone modulo (f_sampling_rate / FFT_length) == 0
    

    If you are only interested in the magnitude of one selected tone frequency, the Goertzel algorithm would serve as a more efficient filter than a full FFT. And, depending on the setup and length restrictions required by your chosen FFT library, it may be easier to vary the length of a Goertzel to match the requirements for your target tone frequency, as well as the time/frequency resolution trade-off needed.

    0 讨论(0)
提交回复
热议问题