This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CMSIS-DSP: question about FFT and the frequency bin example

Hi,

I hope this is the right place to ask about DSP/FFT.

I'm digging deeper into CMSIS-DSP and managed to get the FFT frequency bin example to work on a Cortex-M3. I have a few questions about CMSIS in general, as well as FFT and the bin example in special:

  1. The FFT bin example data contains a 10kHz signal with noise overlay. On the Keil website the input signal is shown, but the axis labels of the input are wrong IMO. For the first graph, at least the X-axis should have a time scale, not a frequency scale. So, does anybody know the time scale for the shown graph? I want to know how many periods of a 10kHz signal are in the example data.
  2. I'm still learning about FFT, so I copied the output data from the example into Excel and made a graph for visualization. The input data consists of complex data values, with the imaginary part set to 0. The output data is half of size of the input data (2048 vs 1024). The output data itself seems to be mirrored. This is because the input data has the imaginary part set to zero, right? So, when feeding only real data into a FFT for complex values, only the lower half of the output is valid and the FFT resolution is effectively only the half?
  3. If the imaginary part would be non-zero values, the resolution doesn't change?
  4. How to calculate the bandwidth of a bin? Let's assume a sample frequency of 100kHz and a 1024-point FFT. The bandwidth is then 100kHz / 2 / 1024 (sample frequency divided by two because of Nyquist frequency). So, the bandwidth of each bin is 48.82Hz, is this right? Or does the division has to be made by 1023 because bin 0 always contains a frequency of 0Hz (DC value), so it's divide by N-1?

Regards,

Ralf