I think 'spec_ori' & 'spec_shifted' spectrum amplitude and phase are same in below code. Because of 'spectrum shiting property' (What effect does a delay in the time domain have in the frequency domain?). But both are different. why?

K = 4 * 10^10;
Fs = 10 * 10^6;
t_len = 40 * 10^(-6);
t=-t_len/2:1/Fs:t_len/2; % time axis in range
omega = -Fs/2:1/t_len:Fs/2;
chirp = exp(1i*pi*K*t.^2);
spec_ori = fft(chirp);
spec_shifted = fft((chirp .* exp(1i*2*pi*Fs*t)));

  • $\begingroup$ Well, the DFT (which fft implements) is bijective. Hence, if the input is different, the output must be different. So, I really don't see how the shift properties of the DFT let you assert these should be identical; on the contrary, the shift property even defines how these should be different. $\endgroup$ Jul 18 '18 at 6:45
  • $\begingroup$ (by the way, your exp(1i*2*pi*Fs*t) might not be what you think it is – plot its real and imaginary part) $\endgroup$ Jul 18 '18 at 7:02
  • $\begingroup$ @Marcus Müller thank you for your reply. I thought if spectrum shift to Fs(sampling frequency), it is same as the original spectrum because of spectrum folding(DFT property). $\endgroup$
    – D.Lan
    Jul 18 '18 at 7:33
  • $\begingroup$ But you don't do that shift. You're doing a different shift. Hence my "by the way". $\endgroup$ Jul 18 '18 at 7:44
  • $\begingroup$ @Marcus Müller I don't know what you mean. If you don't mind, let me know your thinking. $\endgroup$
    – D.Lan
    Jul 18 '18 at 8:41

These angular errors are in the order of $10^{-10}$. These are numerical inaccuracies caused by the fact that exp() can't be arbitrarily exact.

"Exact" would mean that exp(1i*2*pi*Fs*t) would just yield a vector [1 1 1 … 1]; if you'd hit that, the input to the fft would be identical, because multiplication with $1$ doesn't do anything.

So, always consider the error relative to the phenomenon you're observing. You wondered about something that was about 200 dB lower in amplitude than the observed quantity.

  • $\begingroup$ Ok I see. Thank you for your answer & advise it was helpful. $\endgroup$
    – D.Lan
    Jul 18 '18 at 10:39
  • $\begingroup$ Cool! You can thank me by accepting this answer. $\endgroup$ Jul 18 '18 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.