即使应用恒定音调,FFT频率桶幅度也会变化 [英] FFT frequency bucket amplitude varies even with constant tone applied

查看:85
本文介绍了即使应用恒定音调,FFT频率桶幅度也会变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用FFT解码摩尔斯电码,但是我发现,当我检查我感兴趣的结果频率仓/桶时,即使呈现恒定的音调,绝对值也有相当大的变化.这使我无法使用阈值附近的上升和下降来解码音频摩尔斯.我什至尝试了一个似乎无处不在的简单示例,但是它也有所不同...我无法弄清我做错了什么,而且我的数学还不够聪明,无法理解与FFT相关的所有公式.我现在一定有可能,但我不知道如何...任何人都可以帮忙吗?

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 significantly even when a constant tone is presented. This makes it impossible for me to use the rise and fall around a threshold and therefore decode audio morse. I've even tried the simple example that seems to be copied everywhere, but it also varies... I can't work out what I'm doing wrong, and my maths is not clever enough to understand all the formulas associated with FFT. I now it must be possible, but I can't find out how... can anyone help please?

推荐答案

请确保您使用的是FFT结果的幅度,而不仅仅是复杂结果的实部或虚部.

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

通常,当将较长的恒定振幅正弦波馈送到一系列较短的FFT(带窗STFT)时,仅当正弦波的周期在FFT长度上正好是整数周期时,幅度结果才是恒定的.例如

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

如果您只对所选音调频率的大小感兴趣,那么Goertzel算法将比全FFT效率更高.而且,根据所选FFT库所需的设置和长度限制,更改Goertzel的长度以符合目标音调频率的要求以及所需的时间/频率分辨率之间的权衡可能会更容易.

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.

这篇关于即使应用恒定音调,FFT频率桶幅度也会变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆