Skip to main content
Visitor II
August 8, 2024
Question

FFT spectral resolution not enough

  • August 8, 2024
  • 1 reply
  • 1247 views

Hello comunity,


I am using the CMSIS DSP library in order to perform FFT to 1412 sample set with a sampling freq of 16.83Khz.

I am trying different approaches to find the 16th harmonic after the fft, but i get an inaccurate value.

for example, Zero-padiing until 4096(supported length) is an spectral resolution of 16.83Khz/4096 = 4.10Hz

but for a fundamental freq of 11.9 i need to get the freqs values 11.9*16 = 190.4


Can anyone knows how can i achieve this?

    This topic has been closed for replies.

    1 reply

    Explorer
    August 8, 2024

    190.4 / 4.10 = 46.439, your 16-th harmonics falls in between 46-th and 47-th bins, so take average of both to get magnitude.

    SuperXingAuthor
    Visitor II
    August 19, 2024

    Hello, thanks for the response.

    why this can be a solution? if i use the average i will not get the real magnitude

    Explorer
    August 19, 2024

    Right, just sum - not divided.

    Its may not be accurate depends on windowing function applied. Since you didn't tell if there is any windowing.

    In the worst case scenario its required to sum up 20 neighbouring bins around , 10 on the left and 10 on the right side.

    But minimum spacing between harmonics also should be >20, so lower sampling rate necessary. Or bigger fft size, making ration 11.9/ 4.1 > 20.