Jump to content

Frequency bin explanation please!


Jennings

Recommended Posts

Hi, I'm trying to get the frequency spectrogram from a STFT, but I don't really understand how the frequency scale goes in the spectrogram. Under the default setting, the time steps are 128 and the frequency bins are 512, but that seems to give me double the correct frequency readings (150 instead of 70). If I change the frequency bins to 256, then I do get the correct frequency scale.

Could someone please explain what frequency bins are in layman's terms, and why changing them from 512 to 256 gets me the "correct" scale and is this scale in kHz or how could I find that out? Thank you so much!

Link to comment
  • 1 month later...
Hi, I'm trying to get the frequency spectrogram from a STFT, but I don't really understand how the frequency scale goes in the spectrogram. Under the default setting, the time steps are 128 and the frequency bins are 512, but that seems to give me double the correct frequency readings (150 instead of 70). If I change the frequency bins to 256, then I do get the correct frequency scale.

Could someone please explain what frequency bins are in layman's terms, and why changing them from 512 to 256 gets me the "correct" scale and is this scale in kHz or how could I find that out? Thank you so much!

Richard,

I have found your question here more or less by accident and it's a good one. It seems as if nobody here found it interesting enough to reply. I have for a long time also wondered about the significance of this input variable to the STFT-function. I came to the conclusion that this parameter does actually not really manipulate the frequency resolution at all. If the number of frequency bins is larger than your window width then it merely introduces more frequency bins by interpolation. This mean you have more points on the plot along the frequency axis but no better resolution. It's kind of a strange parameter to me too and I usually set it equal to the window length.

Maybe others want to comment more but looking at the actual date of your entry I don't think this will happen. Maybe it's better to post these type of question on info-labview.

Anyway, very happy wireworks. I hope you are doing well

Regards

Urs

Urs Lauterburg

Physics demonstrator

Physikalisches Institut

University of Bern

Switzerland

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.