relation between the fft of full and segmented signal

1 回表示 (過去 30 日間)
zozo
zozo 2012 年 9 月 21 日
Hello,
Suppose I the following signal of 10s:
fs=1e4;
t_duration=10; % duration of signal (seconds)
t = 0:1/fs:t_duration-1/fs; % time samples
s=sin(2*pi*1000*t); %narrowband signal from the source
N=length(s);
I compute its FFT and plot 2-sided spectrum as:
S=fft(s);
f=fs*[0:N-1]/N;
stem(abs(S)); %peaks at 10001 and 90001
Now, if i break the signal into 10 segments of 1s duration each and take its fft() and plot, the bins are somehow jumbled.
s1=s(1:10000);
N1=length(s1);
S1=fft(s1);
f1=fs*[0:N1-1]/N1;
stem(abs(S1)); %peaks at 1001 and 9001
Ofcourse, if I plot the magnitude spectrum with 'f' and 'f1' vectors, I get the peaks at right frequencies.
But without 'f' and 'f1', how can I relate/interpret this 1s segment result to my original 10s long signal? please clarify.
  3 件のコメント
zozo
zozo 2012 年 9 月 21 日
It means plotting without x-axis..as I did in my script above!
Wayne King
Wayne King 2012 年 9 月 21 日
I answered the question below.

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

採用された回答

Wayne King
Wayne King 2012 年 9 月 21 日
編集済み: Wayne King 2012 年 9 月 21 日
That's because the spacing between the DFT bins depends not only on the sampling frequency, but ALSO on the length of the input signal.
The spacing is Fs/N, in the second case you have reduced the length of the signal by a factor of 10 so your DFT bins are spaced much more 10 times farther apart.
In the first case, your spacing is 0.1 Hz. In the second case, your spacing is 1 Hz.
  1 件のコメント
zozo
zozo 2012 年 9 月 21 日
Thank you @Wayne. I got the point. The thing is I am trying to estimate the spectral matrix from a data (covariance matrix using FFT). To have a full rank matrix, I have divided my data (8x100000) into 10 blocks each of 8x10000. Now I compute the FFT in each of 8 channels, and compute the covariance matrix Sxx(8x8) bin by bin for all 10000 bins, by taking average of corresponding bin from all the blocks. But my overall result is somehow not converging to true spectral matrix. If you/any one is familiar with adaptive beamforming, please help me out.

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

その他の回答 (0 件)

カテゴリ

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