IFFT scaling for locating discontinuity

2 views (last 30 days)
I need help on IFFT scaling. I am trying to transform wideband frequency measurement into time domain, ultimately into distance to check the discontinuity point, but I am having problem with the x axis scaling after IFFT, it is not locating at correct discontinuity point. Could you please suggest me something or point out an error in my code, please. Details of measurement is: Start frequency:10e9 Stop frequency:26.5e9 Number of frequency points:1001 Single sided positive frequency measurement.
code is: f1=10e9; %start frequency f2=26.5e9; % stop frequency NFFT=1001; %number of frequency points fvec_sim=mag(:,1); %frequency points load1=mag(:,2); %mag load2=phase(:,2); %phase radian = load2*pi/180; %converting phase into rad Z = load1.*exp(i*radian); %converting mag and phase info into complex form
%fdelta = fvec_sim(2)-fvec_sim(1); %fsim = fvec_sim(NFFT); tsim = 1/(f2-f1);
%dt = 1/(2*f2);
t=[0:NFFT-1]*tsim; %s11_windowed = Z.*(1 + cos(pi*fvec_sim/f2))/2;
%window=hann(length(Z)); %s11_windowed =window.*Z; t11 = ifft(Z);
distance = (((3e8)*(t))/2); hold on; plot(distance,abs(t11),'red', 'LineWidth',1.5); hold on; grid on; xlabel('Distance (in m)','FontSize',12,'FontWeight','bold'); ylabel('Magnitude (in linear)','FontSize',12,'FontWeight','bold'); title('TDR plot','FontSize',12,'FontWeight','bold');

Answers (0)

Community Treasure Hunt

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

Start Hunting!