# Taking the fft of a signal sampled above the Nyquist rate but getting strange results

조회 수: 2 (최근 30일)
L'O.G. 2022년 4월 22일
편집: Matt J 2022년 4월 23일
I have been trying to reproduce a frequency domain function from a time domain signal, but getting nothing like what I expect.
I am sampling the signal above the Nyquist rate. The dt below is 1e-4. When I reconstruct the signal, it looks like what I expect:
So I think I reconstructed it correctly. Notice that it is on a log-log plot.
I take the FFT by doing the following:
nfft = 2^nextpow2(length(xt));
df = 1/dt;
freq = (df/2)*linspace(0,1,nfft/2+1);
xf = fft(xt,nfft)/length(xt);
And then I get this for the single-sided fft when I type plot(freq,2*xf(1:numel(freq))):
Notice that this also is on a log-log scale. Unfortunately, this is nothing like I expect. It looks like it's been flipped about a horizontal line from what I would expect more or less. I certainly would think that it wouldn't be monotonically decreasing like this.
Have I made any error in my implementation of the fft? More specifically, does any of this make sense conceptually from the trend I see in log-log space for the time domain signal? Is there a good sanity check I can do?
(I realize this is part Matlab question, part fft concepts, but I would appreciate some insight. I'm really stuck.)

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

### 답변 (1개)

Matt J 2022년 4월 22일
편집: Matt J 2022년 4월 22일
nfft = 2^nextpow2(length(xt));
df = 1/nfft/dt;
freq = df*(0:nfft-1);
xf = abs(fft(xt,nfft))*dt;
half=1:nfft/2;
plot(freq(half),xf(half))
##### 댓글 수: 4이전 댓글 2개 표시이전 댓글 2개 숨기기
L'O.G. 2022년 4월 22일
Thanks for the response. It's the complete signal in the time domain: x(t) = ∑t/tau. I cover the range of all possible constants tau, and I sample above the Nyquist rate which I base on the smallest tau. I thought that should be sufficient. I'm really stumped.
Matt J 2022년 4월 22일
편집: Matt J 2022년 4월 23일
Well, x(t) = ∑t/tau is an infinite linear ramp. For one thing, this looks nothing like the signal you have posted. For another, it goes to infinity both at t=inf and t=-inf, so it is not Fourier transformable signal. It therefore has no bandwidth from which you could compute a Nyquist rate.

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

### 카테고리

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

R2021b

### Community Treasure Hunt

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

Start Hunting!

Translated by