FFT single-sided amplitude spectrum plot spike at 1Hz of accelerometer data
Mostra commenti meno recenti
i m trying to plot the alpitude spectrum of Z-axis accelerometer with a sample frequency of ~50Hz and signal length 18429.
Fs=46.9350530441355
% t is the time vector in millisecond from 0 to 392648.965000002
L=length(y) % y is accelerometer data 18429 records
subplot(2,1,1)
plot(t,y)
title('Signal')
xlabel('time (milliseconds)')
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
Y = fft(y,NFFT)/L;
f = Fs/2*linspace(0,1,NFFT/2+1);
subplot(2,1,2
% Plot single-sided amplitude spectrum.
plot(2*abs(Y(1:NFFT/2+1)))
title('Single-Sided Amplitude Spectrum of y(t)')
xlabel('Frequency (Hz)')
ylabel('|Y(f)|')
What i get on second plot it starts with x(1), y(18.46) and than fading. the data are from accelerometer atached to car windsheald.
9 Commenti
Wayne King
il 27 Apr 2012
What is your question?
DuckDuck
il 3 Mag 2012
Dr. Seis
il 3 Mag 2012
You aren't plotting the amplitude spectrum against your frequencies "f", so how do you know the spike is at 1Hz? Your frequency increment (df) is Fs/NFFT, which is approximately 46.935/32768 = 0.0014. So your first non-zero frequency should be 0.0014 Hz, not 1Hz.
Regardless... as this is acceleration data, you highest amplitudes should be at higher frequencies. Is your data superimposed on a low-frequency sine wave? Or does it have a linear trend associated with it?
DuckDuck
il 3 Mag 2012
Dr. Seis
il 3 Mag 2012
See my previous questions... are your high-frequency data superimposed on a very low-frequency sinusoidal wave? Or are your high-frequency data superimposed on a linear trend?
Can you load a picture of what your time data look like?
DuckDuck
il 3 Mag 2012
Dr. Seis
il 3 Mag 2012
Ah... yeah, you should remove the mean before you run it through the FFT. Aside from that, there are some low-frequency bits in there, but none that should compare to the mean. Your first amplitude in Y is at zero-frequency, which is the mean of the data.
DuckDuck
il 3 Mag 2012
Dr. Seis
il 3 Mag 2012
I would create a new question... others who are more familiar with running the Matlab function "spectrogram" and overlaying plots will be able to help you. You do not need to transfer your time data into the frequency domain before you use "spectrogram" - you will input your time data directly.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Spectral Measurements in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!