FFT for non-periodic signal

50 ビュー (過去 30 日間)
Ngoc
Ngoc 2013 年 12 月 19 日
コメント済み: Chris Turnes 2016 年 6 月 21 日
Assume that I have a sequence of N different samples, so my signal is non-periodic. Is it ok I take the FFT for the whole sequence at a time after using a Hanning window which length is also N? Is the result different if I use part of my signal and 'make' it periodic?

採用された回答

Wayne King
Wayne King 2013 年 12 月 19 日
It is fine to use fft() on non-periodic data. The DFT (discrete Fourier transform) works just fine on non-periodic data. However, it is implicit in the DFT that the signal is extended periodically.
Look at the equation for the inverse DFT, the signal is N-periodic just as the DFT is N-periodic.
  2 件のコメント
piyush arya
piyush arya 2016 年 6 月 21 日
Shouldn't the signal be 0 at endpoints. My signal is o at the beginning at non-zero at the end.
Chris Turnes
Chris Turnes 2016 年 6 月 21 日
No; there's nothing about the DFT or inverse DFT that imposes a restriction on the sample values. Like Wayne said, the DFT essentially implicitly assumes that the signal is extended periodically; that doesn't mean the samples on the ends have to match in value.

サインインしてコメントする。

その他の回答 (2 件)

Ngoc
Ngoc 2013 年 12 月 19 日
Thank you, I also have another question. In Matlab, is the magnitude of the result spectrum half of the true value? And I use a Hanning window, meaning that there will be loss in the spectrum magnitude, how can I compensate it?

Wayne King
Wayne King 2013 年 12 月 19 日
編集済み: Wayne King 2013 年 12 月 19 日
Ngoc, you have to compensate for the effect of the window. Do you have the Signal Processing Toolbox? If so, let periodogram() with the 'power' option take care of that for you
Fs = 1000;
t = 0:1/Fs:1-1/Fs;
x = 2*cos(2*pi*100*t);
[Sxx,F] = periodogram(x,flattopwin(length(x)),length(x),Fs,'power');
plot(F,Sxx)
Note the power is correctly reported as 2, which is A^2/2
If you have non-periodic data,then periodogram() with the 'power' option defaults to 'psd', which is more appropriate.
In other words, the 'power' option is appropriate when you have a line spectrum consisting of sinusoidal components.
  1 件のコメント
Ngoc
Ngoc 2013 年 12 月 23 日
Oh thank you Wayne. Now I need to plot the spectrum results. Do you know how I can get this attached color map? I already have k for x axis, f for y axis, and now I need to plot the matrix which is the result of the fft.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by