FFT time delay, incorrect alighnment of the output wave

6 ビュー (過去 30 日間)
Sophie
Sophie 2013 年 9 月 15 日
Hi,
I shift the FFT of a sampled signal by a certain number of samples and take the inverse FFT to get a delayed signal. I use the formula:
x[n+k] -> FFT(x[n]) * exp(-j*2*pi*k*m/N), where N = the length of the signal, k is the amount of time delay in time domain and m is the running index.
When I take the IFFT, I see that the signal starts correctly but then it gets misaligned (For example, in Figure 1 you can see there are 2 peaks in place of one peak at t~70 s). Why am I getting this result?
My code is below:
%for fs=2*10^8 Hz and f_signal=300 MHz
Fs=300000000; %fs=300MHz
T=1/Fs; %the sampling period
t=0:T:((0.7*10^-6)-T);
L=length(t);
f_signal=3*10^6;
x=cos(2*pi*f_signal*t); % signal_T=1/(3*10^6); %= 3.3333e-07
X=fft(x);
delayed_samples= 126; %delay the signal by 126 samples:
Y=X.*exp(1j*2*pi*delayed_samples*[0:L-1]/L );
y_1=real(ifft(Y));
figure, plot(Fs.*t, x, 'g'), hold on, plot(Fs.*t, y_1, 'r'), legend ('x','delayed x') , title 'signals vs. samples'
%%%end of the script%%%%%%%
Figure 1 is

回答 (1 件)

Matt J
Matt J 2013 年 9 月 16 日
編集済み: Matt J 2013 年 9 月 16 日
Because it is a circulant shift. The discontinuity between x(1) and x(end) has been shifted circulantly to around frequency=83.
  2 件のコメント
Sophie
Sophie 2013 年 9 月 18 日
If I need them to be aligned what do I do?
Matt J
Matt J 2013 年 9 月 19 日
編集済み: Matt J 2013 年 9 月 19 日
Sample full periods of the sinusoid, so that there is no discontinuity between x(1) and x(end).

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

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by