필터 지우기
필터 지우기

FFT single-sided amplitude spectrum plot spike at 1Hz of accelerometer data

조회 수: 3 (최근 30일)
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
DuckDuck
DuckDuck 2012년 5월 3일
thank you for your help. now i get this picture for the first window of fft data: http://img137.imageshack.us/img137/8308/firstwindowfftmagnitude.jpg
how can i make in matlab a spectrogram like this one http://img37.imageshack.us/img37/8367/spectrogram.jpg
now that i have the fft transformed data?
Dr. Seis
Dr. Seis 2012년 5월 3일
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.

댓글을 달려면 로그인하십시오.

채택된 답변

Dr. Seis
Dr. Seis 2012년 5월 3일
As a general rule of thumb, I will remove any trend and/or mean from the data before I run it through FFT.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by