필터 지우기
필터 지우기

inverse Fourier transform of a signal

조회 수: 6 (최근 30일)
Shan  Chu
Shan Chu 2016년 3월 1일
댓글: Deepshikha Bhargava 2020년 6월 7일
Hello all, I got a real signal from network analyzer and this network analyzer can transform the signal for me. However, when I used the command ifft, I couldn't get the signal that I saw before. Could you please suggest how to do it? The stimulus in the txt file is the frequency (the range is from 0.1 Ghz to 0.3 Ghz).
if true
clear all
close all
clc
load('cable.mat');
filename = 's11.txt';
M = csvread(filename,9,0);
f=M(:,1);
s11=complex(M(:,2),M(:,3));
y = ifft(s11);
plot(abs(y))
end
  댓글 수: 2
Star Strider
Star Strider 2016년 3월 1일
You cannot take the ifft of an incomplete fft such as yours. You need all the frequencies from 0 to 0.3 GHz, or preferably the original time-domain signal that you can then filter to isolate the frequencies of interest to you.
Shan  Chu
Shan Chu 2016년 3월 2일
편집: Shan Chu 2016년 3월 2일
Hi, is it ok if I apply zeros for the range of frequency from 0 to 0.1 Ghz? Then using the ifft

댓글을 달려면 로그인하십시오.

답변 (1개)

John BG
John BG 2016년 3월 1일
Shan
try the following:
1.- don't care about the file extension:
A=csvread('s11.s2p',9,0)
or
A=csvread('s11.txt',9,0)
or
A=csvread('s11.dat',9,0)
or
A=csvread('s11.csv',9,0)
It does not matter, as long as the file extension is .s2p .txt .dat .csv the input is exactly the same.
2.- get plot-able data
f=A(:,1)
s11re=A(:,2)
s11im=A(:,3)
s11mod=(s11re.^2+s11im.^2).^5
s11ang=atan(s11im./s11re)
3.- now try plotting s11:
plot(s11mod)
or
s11=s11re+i*s11im
plot(s11.*conj(s11))
or
plot(s11mod.^2)
or
plot(10*log10(s11mod.^2))
5.- do you really need s11 in time domain? s11 is already frequency domain
6.- You may also find useful to build an rfckt object to replicate the 3D expensive real Network Analyzer plot onto the rftool Smith chart and polar diagram:
data=rfckt.datafile
data.AnalyzedResult.Freq=f
S_data=complex(zeros(2,2,1601))
s11re=A(:,2)
s11im=A(:,3)
s11=s11re+i*s11im
S_data(1,1,:)=s11
data.AnalyzedResult.S_Parameters=S_data
now the variable 'data' can be imported into rftool
launch rftool:
rftool
go to: File > Import from Workspace
choose: data
on the lower half of the rftool GUI tick only s11, all other s parameters empty
Smith Chart: Z Chart
now you should see a more or less static copy of what you got while cutting the coaxial.
If you find this answer of any help solving this question, please click on the thumbs-up vote link,
thanks in advance
John
  댓글 수: 3
Sagar Dutta
Sagar Dutta 2020년 2월 10일
Shan Chu, Did you find the solution to convert into time domain using ifft? I am also trying to do the same thing, need some help.
Deepshikha Bhargava
Deepshikha Bhargava 2020년 6월 7일
Facing the same problem. Has anyone found the solution?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Visualization and Data Export에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by