0

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)));
plot(angle(spec_ori)-angle(spec_shifted))

Marcus Müller
  • 30,525
  • 4
  • 34
  • 58
D.Lan
  • 3
  • 2
  • 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. – Marcus Müller Jul 18 '18 at 06:45
  • (by the way, your exp(1i*2*pi*Fs*t) might not be what you think it is – plot its real and imaginary part) – Marcus Müller Jul 18 '18 at 07:02
  • @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). – D.Lan Jul 18 '18 at 07:33
  • But you don't do that shift. You're doing a different shift. Hence my "by the way". – Marcus Müller Jul 18 '18 at 07:44
  • @Marcus Müller I don't know what you mean. If you don't mind, let me know your thinking. – D.Lan Jul 18 '18 at 08:41
  • wait. I just revisited this. And: how different are your angles? As said, please plot your exp(1i*2*pi*Fs*t) and notice what a point-wise multiplication does. (you're right, this is a shift by Fs, I was wrong about that). – Marcus Müller Jul 18 '18 at 09:54

1 Answers1

1

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.

Marcus Müller
  • 30,525
  • 4
  • 34
  • 58