How do I plot the FFT of signal from accelerometer
97 views (last 30 days)
The Sample rate of the accelerometer from the arduino IDE was 833Hz and I placed the accelerometer on a shaker, The shaker has an input frequency of 200Hz and amplitude of 3Vpp in 13s. The data generated was recorded in .CSV as attached.
Can anyone help with the FFT code using either the X-axis(First column) or Y-axis data(Second column) ?
Sampling rate is fs=833 Hz and there are N=1110 samples. (I deleted line 1 since it has only one number.)
When you do the FFT, you get a vector of N complex numbers. The first N/2+1 of those numbers correspond to frequencies 0:df:Fs/2, where df=fs/N.
Plot the amplitudes of the first N/2+1 elements of the FFT, versus the frequecies as described above.