proper IFFT procedure for converting S-params into time domain reflectometry
Show older comments
Basic discontinuety was simulated 0Hz to 40Ghz 40000 samples as presented in the photos . S-parameters were extracted as S2P file(attached in the link). My goal is to see the discontinuety using time domain reflectometry. what is the proper way to do IFFT in this case? What windows should I multiply with? Thanks.

Answers (1)
Inverting something like that is always something of a problem.
While the nufft function can take irregularly-sampled time vectors and produce a reasonable Fourier transform, to the best of my knowledge, nothing similar exists for the inverse Fourier transform (using irregularly-sampled frequencies). The only way I can think of to do that is to interpolate to a constantiinterval frequency vector, (if necessary, create the conjugate and append it appropriately), give that to ifft and hope for the best.
That is what I did here for
. If this result works for you, use it for the other S-parameters as well.
Try something like this --
UZ = unzip('sparam_file.zip')
S = sparameters(UZ{1})
parms = S.Parameters;
S11 = squeeze(parms(1,1,:));
S12 = squeeze(parms(1,2,:));
S21 = squeeze(parms(2,1,:));
S22 = squeeze(parms(2,2,:));
freqs = S.Frequencies;
[Flo,Fhi] = bounds(freqs)
[df1,df2] = bounds(diff(freqs))
figure
tiledlayout(2,2)
nexttile
plot(freqs, mag2db(abs(S11)))
grid
ylim([-40 1])
title('S_{1,1}')
nexttile
plot(freqs, mag2db(abs(S12)))
grid
ylim([-40 1])
title('S_{1,2}')
nexttile
plot(freqs, mag2db(abs(S21)))
grid
ylim([-40 1])
title('S_{2,1}')
nexttile
plot(freqs, mag2db(abs(S22)))
grid
ylim([-40 1])
title('S_{2,2}')
Iv = 1E+7;
Fs = 2*Fhi;
Ts = 1/Fs
Fi = linspace(Flo, Fhi, Iv).';
S11i = interp1(freqs, S11, Fi);
S11fi = [flip(conj(S11i(2:end))); S11i];
T11fi = ifft(S11fi);
% tv = (0:numel(T11fi))*Ts;
figure
plot(real(T11fi))
grid
xl = xlim
title('IFFT of S_{1,1}')
Ax = gca;
tix = Ax.XTick;
Ax.XTickLabel = tix*Ts;
figure
plot(real(T11fi))
grid
xlim([0 70])
title('IFFT of S_{1,1} (Zoomed)')
Ax = gca;
tix = Ax.XTick;
Ax.XTickLabel = tix*Ts;
.
Categories
Find more on Frequency Domain Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

