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!