Plot Impedance from Touchstone Files
46 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commento
Srikanth K
il 3 Feb 2021
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
Risposta accettata
Più risposte (1)
Srikanth K
il 8 Feb 2021
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 Commenti
Simon
il 29 Mar 2022
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
Vedere anche
Categorie
Scopri di più su SPICE files in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!