iFFT Scaling Problem
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Antworten (2)
Amit
am 21 Dez. 2011
Hi, I too have the same problem. If you resolved it could you share your result with me. Thanks.
0 Kommentare
Wayne King
am 21 Dez. 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 Kommentare
Dr. Seis
am 21 Dez. 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.
Siehe auch
Kategorien
Mehr zu Transforms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!