The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 28th, 2024, 6:24pm
Pages: 1
Send Topic Print
Converting S-parameters to TDR (Read 15934 times)
jefkat
Community Member
***
Offline



Posts: 69

Converting S-parameters to TDR
Jun 29th, 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
   
Back to top
 
 
View Profile   IP Logged
mg777
Senior Member
****
Offline



Posts: 131

Re: Converting S-parameters to TDR
Reply #1 - Jun 29th, 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

Back to top
 
 
View Profile   IP Logged
jefkat
Community Member
***
Offline



Posts: 69

Re: Converting S-parameters to TDR
Reply #2 - Jul 2nd, 2007, 12:47am
 
No that's not what I mean Smiley
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');



Back to top
 
 
View Profile   IP Logged
mg777
Senior Member
****
Offline



Posts: 131

Re: Converting S-parameters to TDR
Reply #3 - Jul 2nd, 2007, 7:01am
 

Can you explain the logic behind this code? I'm having trouble understanding it.

M.G.Rajan

Back to top
 
 
View Profile   IP Logged
jefkat
Community Member
***
Offline



Posts: 69

Re: Converting S-parameters to TDR
Reply #4 - Jul 3rd, 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?
Back to top
 
 
View Profile   IP Logged
yang
New Member
*
Offline



Posts: 4

Re: Converting S-parameters to TDR
Reply #5 - Aug 31st, 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.
Back to top
 
 
View Profile yang   IP Logged
prcken
Junior Member
**
Offline



Posts: 18
PRC
Re: Converting S-parameters to TDR
Reply #6 - Feb 26th, 2016, 7:43pm
 
jefkat wrote on Jul 2nd, 2007, 12:47am:
No that's not what I mean Smiley


fr4_inch_per_sec = c0_fr4*100/2.54;




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

Back to top
 
 
View Profile   IP Logged
rickr
New Member
*
Offline



Posts: 2

Re: Converting S-parameters to TDR
Reply #7 - Aug 2nd, 2019, 11:50pm
 
How did you come up with the "windowed" equation below?
s11_windowed = s11.*(1 + cos(pi*fvec_sim/fsim))/2;
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Converting S-parameters to TDR
Reply #8 - Aug 5th, 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
Back to top
 
 
View Profile WWW   IP Logged
rickr
New Member
*
Offline



Posts: 2

Re: Converting S-parameters to TDR
Reply #9 - Aug 5th, 2019, 9:18pm
 
Thank you. I am trying to plot the TDR within Matlab.
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.