fft of a finite duration real signal

1 次查看(过去 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 中查找有关 Spectral Measurements 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by