cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate bin frequency after FFT?

JTam.1
Associate II

The ODR of vibration sensor iis3dwb is 26667 Hz. If I set 2048 of FFT size, is the below calculation correct? Or we need to use the bandwidth 6 kHz to calculate the bin frequency. Please advise. Thanks!

0:  0 * 26667 / 2048 =    0.0 Hz

 1:  1 * 26667 / 2048 =   13.02 Hz

 2:  2 * 26667 / 2048 =   26.04 Hz

 3:  3 * 26667 / 2048 =  39.06 Hz

 4: ...

 5: ...

1024: 1024 * 26667 / 2048 = 13333.5 Hz

14 REPLIES 14

Hi @Javier Muñoz​ and @JTam.1​ ,

your first comment was correct on the bin calculation, but you are right, it depends also on the actual data rate at which you poll the data.

I think that what @Eleon BORLINI​ wrote in his answer means that after 6 kHz the data is attenuated.

that is just an approximation, the real system could be more complicated, but in most scenarios, the approximation is good enough.

Niccolò

If I use the full capability of iis3dwb and the FFT size has 2048, the table would be:

0:  0 * 6000 / 2048 =    0.0 Hz

 1:  1 * 6000 / 2048 =   2.93 Hz

 2:  2 * 6000 / 2048 =   5.86 Hz

 3:  3 * 6000 / 2048 =  8.79 Hz

 4: ...

 5: ...

2048: 2048* 6000 / 2048 = 6 kHz

Is it correct? Please advise. Thanks!

I would say that, if you are working with 26kHz ODR the right calculation is the one from @Javier Muñoz​ :

0:  0 * 13333,5/ 2048 =    0.0 Hz

 1:  1 * 13333,5/ 2048 =   7.51 Hz

 2:  2 * 13333,5/ 2048 =   13.02 Hz

 3:  3 * 13333,5/ 2048 =  19.53 Hz

 4: ...

 5: ...

2048: 2048* 13333,5/ 2048 = 13333,5 Hz

Niccolò

There is a Low Pass Filter (LPF2) of 6.3kHz in iis3dwb. So the output will cut off at 6.3k Hz as follow. Please advise. Thanks!

0:  0 * 13333,5/ 2048 =    0.0 Hz

 1:  1 * 13333,5/ 2048 =   6.51 Hz

 2:  2 * 13333,5/ 2048 =   13.02 Hz

 3:  3 * 13333,5/ 2048 =  19.53 Hz

 4: ...

 5: ...

968: 968* 13333,5/ 2048 =  6.3 kHz

Hi @JTam.1​ ,

the LP filter will attenuate frequencies above 6kHz, but you still need to take them into account

Niccolò