フィルターのクリア

inverse Fourier transform of a signal

6 ビュー (過去 30 日間)
Shan  Chu
Shan Chu 2016 年 3 月 1 日
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 Center および File ExchangeVisualization and Data Export についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by