I am working in MATLAB with a frequency domain signal that is a sum of complex exponentials, e.g.

$X(\omega) = \sum_i e^{-j\omega t_i} $ where $t_i > 0$ $ \forall $ $ i $

I expect the output to be a sum of delta functions, e.g. $x(t) = F^{-1}[X(\omega)] \approx \sum_i \delta(t_i)$

I have noticed that when the time bin lines up exactly with the $t_i$, I get an excellent $\delta(t_i)$ function. However when the time bin is off slightly, there is significant energy spread throughout the rest of the time axis, as below:

code output

Does anyone have a clearer idea why this happens? Or even better, a solution? (Perhaps a window that better treats these delta functions?, or a better way to do this IFFT?) Code used to generate image is below

Nfft = 2^12;
Tend = 20e-9;%20 ns of runtime
t = linspace(0,Tend,Nfft); %time
Ts = t(2) - t(1); %sampling rate, s
Fs = 1/Ts; %sampling rate, Hz
f = (-Fs/2):Fs/Nfft:(Fs/2 - Fs/Nfft); %frequency

%create complex exps. with delays 4ns, 6ns, 10ns
%4 ns exists as a time bin
ts = [4e-9 6e-9 10e-9];

%create exponentials
exps = zeros(length(ts),length(f));
for k = 1:length(ts)
    exps(k,:) = exp(-1j .* 2*pi.*f .*ts(k));
X_f = sum(exps); %create f-domain signal

x_t =real(ifft((X_f))); %ifft

plot(t.*1e9,20.*log10(x_t)); %plot
xlabel('Time, ns'); ylabel('dB');

Yes, this is leakage.

Your problem is in the discrete domain and your nomenclature is for the continuous domain. Often times the two are conflated, as you have done, and this causes confusion.

The inverse DFT and the forward DFT are basically the same animal. The only difference is the convention used in the sign of the exponent and the normalization factors you use. So a window function can "shape" your sidelobes (leakage) somewhat, but can't eliminate them.

What is your larger purpose?

| improve this answer | |

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.