Skip to main content
Graduate II
January 25, 2024
Solved

FFT function and buffer size

  • January 25, 2024
  • 1 reply
  • 1453 views

Watching some videos online about FFT and trying to use (in STM32CubeIDE) the arm_rfft_fast_f32 function of the arm_math.h DSP library, it is not clear to me why the buffer output produced by that function is N/2 long and not N

luke514_0-1706189998758.png

Is it something related to Shannon's theorem? To the symmetry of the spectrum? (i.e. is it symmetrical around the origin).

You are welcome to share external links if there are detailed explanations that I did not see during my internet search.

    This topic has been closed for replies.
    Best answer by Sarra.S

    Hello @luke514

    The output buffer length is N/2 due to the properties of the FFT itself 

    >>To the symmetry of the spectrum?

    yes, the spectrum is symmetric around the Nyquist frequency, which is half the sampling rate. so, the second half of the FFT output is a mirror image of the first half.

    Typically, The buffer's size must correspond to a power of 2

    1 reply

    Sarra.SAnswer
    ST Employee
    January 25, 2024

    Hello @luke514

    The output buffer length is N/2 due to the properties of the FFT itself 

    >>To the symmetry of the spectrum?

    yes, the spectrum is symmetric around the Nyquist frequency, which is half the sampling rate. so, the second half of the FFT output is a mirror image of the first half.

    Typically, The buffer's size must correspond to a power of 2