inverse Fourier transform of a signal

2 visualizaciones (últimos 30 días)
Shan  Chu
Shan Chu el 1 de Mzo. de 2016
Comentada: Deepshikha Bhargava el 7 de Jun. de 2020
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 comentarios
Star Strider
Star Strider el 1 de Mzo. de 2016
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 el 2 de Mzo. de 2016
Editada: Shan Chu el 2 de Mzo. de 2016
Hi, is it ok if I apply zeros for the range of frequency from 0 to 0.1 Ghz? Then using the ifft

Iniciar sesión para comentar.

Respuestas (1)

John BG
John BG el 1 de Mzo. de 2016
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 comentarios
Sagar Dutta
Sagar Dutta el 10 de Feb. de 2020
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 el 7 de Jun. de 2020
Facing the same problem. Has anyone found the solution?

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by