2021-05-04 11:07 PM
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
Solved! Go to Solution.
2021-05-11 02:40 AM
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ò
2021-05-04 11:24 PM
Should be about right : https://en.wikipedia.org/wiki/Discrete_Fourier_transform
> Or we need to use the bandwidth 6 kHz to calculate the bin frequency.
Not sure what that means.
I suppose 6kHz is the BW limit of the sensor, and thus would not enter the calculation.
2021-05-04 11:32 PM
Hi Ozone, you meant that the calculation would be stopped after reaching 6kHz (460: 460 * 26667/2048 = 6kHz), right? Please advise. Thanks!
2021-05-05 12:45 AM
@JTam.1
>The ODR of vibration sensor iis3dwb is 26667 Hz.
Then youre sampling the vibration 26667 times per second,
Nyquist law tells us : that makes your bandwidth (max rfecuency of signals you will be able to detect in theory) 26667/2=13333,5hz
If your FFT has 2048 bins your table would be: (bins are the number of discrete divisions the fft is going to make out of your bandwith)
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
>Or we need to use the bandwidth 6 kHz to calculate the bin frequency. Please advise. Thanks!
why 6khz
2021-05-05 12:57 AM
Hi Javier, the datasheet of iis3dwb sensor said that it is capable of measuring accelerations with a bandwidth up to 6 kHz with an output data rate of 26.7 kHz.
2021-05-05 01:03 AM
okay i got confused there, i think the datasheet missuses the word bandwidth....
If 6khz is the sampling rate, your FFT´s Nyquist bandwidth is 3khz.
0: 0 * 3000/ 2048 = 0.0 Hz
1: 1 * 3000/ 2048 = 1.46 Hz
3: ...
4: ...
2048: 2048* 3000/ 2048 = 3000 Hz
Anyway at this point you should test the vibrations you read maybe with a small motor spinning at a certain speed.
There is a LOT of different deffinitions of bandwith , thats why i think the datasheet meant sampling frecuency.
2021-05-05 01:29 AM
@JTam.1 also very important, at what frecuency are you actually polling the chip for data? Maybe youre not using the full capability of the iis3dwb .
2021-05-05 01:37 AM
Hi @JTam.1 , @Javier Muñoz ,
the acquisition band is actually 26.667kHz, while the "mechanical flat band" is actually 6kHz.
This means that, modelling the accelerometer as a first order low-pass filter, the mechanical cut-off frequency is around 6kHz. You can however acquire at higher speed, mostly for a reduction noise purpose (when you perform averages on the oversampled data).
The reason is mostly related to the mechanical characteristics of the sensor, whose flat bandwidth is determined by the internal mechanical structure of the MEMS.
Signals above 6kHz can be acquired but will result in an appreciable attenuation.
-Eleon
2021-05-05 01:48 AM
@Eleon BORLINI so 6khz is the maximum rate you can sample the accelerometer before noise and non linear stuff happens?
2021-05-05 01:51 AM
It's most related to the sensitivity of the signal: above 6kHz, it drops at about 20 dB/decade (linear, but not flat and decreasing). The noise attenuates too, but the overall S/N will be lower due to the drop of the sensitivity.
-Eleon