Clear Filters
Clear Filters

iFFT Scaling Problem

2 views (last 30 days)
cmd
cmd on 27 Apr 2011
Commented: Nina Nounou on 20 Mar 2017
Hi,
I want the transform a return loss versus frequency data to time domain. I have a .txt file from a cable analyzer within frequency return loss and phase information.
I wrote the ifft code. At time axis there is no problem , but the return loss values in time domain didn't match with the cable analyzer result. So i have to multiply it with a value. The code i wrote is as below:
fid = fopen('10.txt');
values= fscanf(fid,'%f %f %f \n',[3,inf]);
values = values';fclose(fid);
f = values(:,1);
rloss = values(:,2);
degree = values(:,3);
amp = 10.^(rloss/10);
radian = degree*pi/180;
complex = amp.*exp(i*radian);
GAMMA_F = complex;
%-------------IFFT-----------------------%
NFFT =517;
f1 = 700e6;
f2 = 1000e6;
Fstep = (f2-f1)/(NFFT-1);
dt = 1/(Fstep*(NFFT-1));
t = dt* [0:NFFT-1];
GAMMA_T = 30*ifft(GAMMA_F,NFFT);
RL = 10*log(abs(GAMMA_T));
In this code i have to multiply the ifft result with 30 in order to match with analyzer result. Why?
And if i change the source .txt file for a different experiment result. I have to multiply with a different factor?
I need to help to resolve this problem.
Thnaks in advance!
  1 Comment
Nina Nounou
Nina Nounou on 20 Mar 2017
hi i have the same problem as you ,can you help me please

Sign in to comment.

Answers (2)

Amit
Amit on 21 Dec 2011
Hi, I too have the same problem. If you resolved it could you share your result with me. Thanks.

Wayne King
Wayne King on 21 Dec 2011
It's hard to say anything definitive without knowing what is actually in this code:
rloss = values(:,2);
degree = values(:,3);
amp = 10.^(rloss/10);
I don't think this is your issue, but I doubt you want:
RL = 10*log(abs(GAMMA_T));
I suspect you minimally want
RL = 10*log10(abs(GAMMA_T));
or
RL = 20*log10(abs(Gamma_T));
  2 Comments
Dr. Seis
Dr. Seis on 21 Dec 2011
I would have suspected that the lack of symmetry (i.e., lack of negative frequencies) in the frequency domain data would have been the culprit.
Wayne King
Wayne King on 21 Dec 2011
@Elige Grant that is also a very good point!

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!