iFFT Scaling Problem
2 次查看(过去 30 天)
显示 更早的评论
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!
回答(2 个)
Amit
2011-12-21
Hi, I too have the same problem. If you resolved it could you share your result with me. Thanks.
0 个评论
Wayne King
2011-12-21
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 个评论
Dr. Seis
2011-12-21
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Transforms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!