Plot Impedance from Touchstone Files
45 次查看(过去 30 天)
显示 更早的评论
Hello Guys,
I have been using RF Toolbox quite extensively for my Signal Integrity work. I can import touchstone file, and use 'frplot' function to plot all kinds of SI data (like S11, S22 etc). However, I am not able to plot Impedance graph from touchstone file (.s2p or .s4p or .s8p). Is there a way this can be achieved? Is there a pre-defined function that can be used to plot impedance?
Note: I am currently using MATLAB 2018a version.
Thank you for your help.
1 个评论
Srikanth K
2021-2-3
Convert your S-parm file to Z-parm and plot impedance plots..you can use below fucntion to do that.
Z = zparameters('defaultbandpass.s2p');
z11 = rfparam(Z,1,1);
plot(Z.Frequencies, imag(z11)) ;% this is for imaginary part of Z-, change as per your requrements
look below link for more info..
https://www.mathworks.com/help/rf/ref/zparameters.html
采纳的回答
更多回答(1 个)
Srikanth K
2021-2-8
Unfortunatly ,I guess we dont have a direct TDR fucntion but we can make one by writing our own function.
Please find the below link for your refeance.
the above link provides TDR response Time Vs Voltage.You can plot in Impedance vs Time using below script(for referance).
filename = 's_parm.s2p';
S_parm_cb = sparameters(filename);
s11 = rfparam(S_parm_cb,1,1);
freq = S_parm_cb.Frequencies;
Vin = 1;
tdrfreqdata = Vin*(s11+1)/2;
tdrfit = rationalfit(freq,tdrfreqdata,'NPoles',350);
Ts = 5e-12;%
N = 10000; % Number of samples
Trise = 5e-11; % Define a step signal
[Vtdr,tdrT] = stepresp(tdrfit,Ts,N,Trise);
ylabel('Differential TDR (V)');
xlabel('Time (ns)');
legend('Calculated TDR');
ylim([0.46 0.55]);
t11_row=(((2*Vtdr)-Vin)/Vin);
tdrz=50*((1+t11_row)./(1-t11_row));
figure
plot(tdrT*1e9,tdrz,'b','LineWidth',2);
ylabel('TDR (Ohm)');
xlabel('Time (ns)');
legend('Calculated TDR');
ylim([40 60]);
2 个评论
Simon
2022-3-29
Thank you for your answer, Srikanth and Ajeya Gupta. It is really helpful! But I don't understand how “tdrfreqdata = Vin*(s11+1)/2” and "t11_row=(((2*Vtdr)-Vin)/Vin)" come from. Can you explain it for me? Thank you very much.
My email:919736488@qq.com
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 SPICE files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!