Plot Impedance from Touchstone Files
46 ビュー (過去 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!