The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design >> RF Design >> Converting S-parameters to TDR https://designers-guide.org/forum/YaBB.pl?num=1183106931 Message started by jefkat on Jun 29^{th}, 2007, 1:48am |
Title: Converting S-parameters to TDR Post by jefkat on Jun 29^{th}, 2007, 1:48am Hi everybody! I am looking for some online tool , some C/Matlab code which would convert S11 data into TDR data for me. Anyone knows anything?. Please let me know if you know. Thanks much Shaf |
Title: Re: Converting S-parameters to TDR Post by mg777 on Jun 29^{th}, 2007, 3:53am Do you mean the TDR response of a line terminated by that S11? Any decent RF Spice simulator will support an [S] block with proper d.c extrapolation. Even a plain vanilla freebie Spice can be used if the S11 nicely converts to a Z frequency table. Caution: Ill-conditioned [S] matrices can give rise to misleading results. Lossy/dispersive lines can be tricky as well. M.G.Rajan |
Title: Re: Converting S-parameters to TDR Post by jefkat on Jul 2^{nd}, 2007, 12:47am No that's not what I mean :) Its just what you do in Time domain reflectometery. Doing this actually you can find how impedance behaves along the line (discontinuties,or any other changes). Here is the code that I wrote (with a colleague's help) to do just that load C:\Shaf\gen.s11; %load the file which has S11 Spar=gen(:,2:3); % All the rows but 2nd and 3rd columns Freq=gen(:,1); % All rows but first column fvec_sim = [0:600e6/2048:600e6-600e6/2048]; % from 0 to 600MHz, 2048 points number_rows=size(Spar); % number_rows=number_rows(1,1); % number of rows for i=1:1:number_rows % turning them into proper imaginary notation Spar_procd(i,1)=Spar(i,1)+j*Spar(i,2); end fdelta = fvec_sim(2)-fvec_sim(1); fsim = max(fvec_sim)+fdelta; tsim = 1/fsim; % tsim is step in time. time = [0:tsim:1/fdelta-tsim]; s11 = interp1(Freq,Spar_procd,fvec_sim,'linear','extrap'); s11_windowed = s11.*(1 + cos(pi*fvec_sim/fsim))/2; t11 = ifft(s11_windowed); impedance = 50*(1+t11)./(1-t11); % Zo is 50 tdr = impedance; c0 = 299792458; % speed of light in vacuum in m/s c0_fr4 = 1/2 * c0; % speed of signal through TL fr4_inch_per_sec = c0_fr4*100/2.54; fr4_inchvec = time*fr4_inch_per_sec; inchvec = fr4_inchvec/2; figure; plot(inchvec,abs(impedance)); grid on; xlabel('Distance (in inches)','FontSize',12,'FontWeight','bold'); ylabel('Impedance (in Ohms)','FontSize',12,'FontWeight','bold'); title('TDR plot','FontSize',12,'FontWeight','bold'); |
Title: Re: Converting S-parameters to TDR Post by mg777 on Jul 2^{nd}, 2007, 7:01am Can you explain the logic behind this code? I'm having trouble understanding it. M.G.Rajan |
Title: Re: Converting S-parameters to TDR Post by jefkat on Jul 3^{rd}, 2007, 8:06am Logic behind this code ..here it goes S11 gives you the reflection as a function of frequency Take the inverse Fourier Transform and change it into refletion as a function of time Reflection as a function of time can inturn be changed into impedance in time Since now you know how impedance changes as a fuction of time and since you can convert time into distance (knowing the speed down the transmission line) you can easily find impedance as a functions of distance from your generator. Now I have a question . If I have S-paramters (taken with 50 ohm as a referenece impedance) how can I translate these (if I can) to 100 ohm S-parameters?? any cool way? |
Title: Re: Converting S-parameters to TDR Post by yang on Aug 31^{st}, 2007, 11:54am I think you just use the definition of S parameters. S11=(ZL-50)/(ZL+50) -> ZL then you can calculate the S parameter under 100Ohm reference use this equation. |
Title: Re: Converting S-parameters to TDR Post by prcken on Feb 26^{th}, 2016, 7:43pm jefkat wrote on Jul 2^{nd}, 2007, 12:47am:
1m=39.37inch it should be fr4_inch_per_sec = c0_fr4/100/2.54; ? is the distance matches the length of your T-line? what if the start freq is not 0Hz? thanks |
Title: Re: Converting S-parameters to TDR Post by rickr on Aug 2^{nd}, 2019, 11:50pm How did you come up with the "windowed" equation below? s11_windowed = s11.*(1 + cos(pi*fvec_sim/fsim))/2; |
Title: Re: Converting S-parameters to TDR Post by Ken Kundert on Aug 5^{th}, 2019, 1:36am I believe you can use Spectre. It has a tdr analysis. It is not supported by ADE, but I think you can use it from the command line. Run 'spectre -h tdr' for information about it. -Ken |
Title: Re: Converting S-parameters to TDR Post by rickr on Aug 5^{th}, 2019, 9:18pm Thank you. I am trying to plot the TDR within Matlab. |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |