fft of a finite duration real signal

조회 수: 3 (최근 30일)
vsee
vsee 2011년 4월 20일
Hello
I have signal which is finite in duration sampled at a certain frequency and has a lot of noise buried in the signal. I am trying to plot the spectrum using fft to find out what frequency the signal is in. I don't know if I am doing the fft right. The plot of time vs amplitude and spectrum is in the link below.
Can anyone please help? Thanks

답변 (1개)

Walter Roberson
Walter Roberson 2011년 4월 20일
What was the sampling frequency? It is difficult to make out on the graph but it appears you might have had 4 seconds of data at 30 kHz ?
Your frequency data is packed pretty tightly; you might want to zoom in on it. The interesting parts might be below 1 kHz or so.
  댓글 수: 1
vsee
vsee 2011년 4월 20일
There is a sample every 400ns which converts to a sampling frequency of 2.5MHz. Here is the code I used.
sig = csvread('tek0001CH1.csv',15);
init_ampl = sig(:, 2);
ampl = init_ampl';
fs = 2.5*10^6;
T = 1/fs;
L = 10000000;
t = [0:L-1]*T;
NFFT = 2^nextpow2(L);
Y = fft(ampl,NFFT/4+1)/L;
f = fs/2*linspace(0,1,NFFT/4+1);
subplot(2,1,1),plot(t, ampl);xlabel('time');ylabel('amplitude');
subplot(2,1,2),plot(f,20*log10(abs(Y)));xlabel('frequency');ylabel('20*log10|Y|');
There are a total of 10 million samples.
You are right about the frequency data being packed tight. I just want to know where the signal is so I can filter out the noise.

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

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by