Transmission line model txl in NgSpice

Fahim
2013-04-14
2013-06-12
  • Fahim

    Fahim - 2013-04-14

    Hi,

    I am working on lossy tranmission line in NgSpice. I am using txl model in NgSpice.
    Can please let me know if the current model is working correctly or not.

    I am trying to get the effect of ISI in my transmission line but its giving me perfect output.
    However when i use same parameter in cadence I am getting proper ISI. That's why I am confused whether txl model is perfect to use in NgSpice?

    I am using below parameters.
    Y1 src2 0 out1 0 ymod LEN=331
    .MODEL ymod txl R=0.0047 L=4.54E-10 G==0 C=5.55E-14 length =9.06E-4

    please let me know your input or suggestion. may be that could help to solve my problem.

    Regards,
    Fahim Khan

     
  • Holger Vogt

    Holger Vogt - 2013-04-14

    Fahim,

    as always: Please do not assume that somebody will generate an input file and run tests from your sparse two lines given. Please submit a complete input file! What is the faulty behaviour in detail? If you have a comparison with CADENCE, please show both outputs (in a graph?) to us.

    Please note that the instance parameter LEN overrides the model parameter length.
    Your model specifies a length of 9e-4, the instance line says len (=length) = 331. If your R is given per meter, this means your transmission line has a length of 331m. Is that correct?

    Holger

     
  • Fahim

    Fahim - 2013-04-15

    Thanks Holger for your reply!!!!!! Actually I am not getting option to attach file.

    According to NgSpice document LEN is number of segment and length is length of one segment so the total length is multiplication of both.
    About RLGC parameters  this are for per segment.
    please let me know if we are interpreting it wrong.

    Regards,
    fahim

     
  • Holger Vogt

    Holger Vogt - 2013-04-15

    Fahim,

    no, and I have made that clearer in an update for the ngspice manual.

    R, L, C, G are given for a segment which is 'unit' long. length is the amount of segments for all transmission lines using that specific model. So all transmission lines using that model are unit*length long. LEN is changing this for the specific instance of the transmission line ( only the specific Yxxx line where LEN is given). LEN overrides (replaces) the model length parameter for this specific transmission line and gives the new number of segments, each again 'unit' long. So this transmission line now is unit*LEN long.

    Holger

     
  • Fahim

    Fahim - 2013-04-16

    Hi Holger,

    I have one question if LEN overrides lenght without changing anything then what is use of LEN?
    Is there any other model for lossy transmission line where I can mention value of R,L,C and G?

    Regards,
    Fahim

     
  • Fahim

    Fahim - 2013-04-16

    Hi,

    When we use txl model we are assuming LEN as total number of segment and length as size of one segment.
    Complete code is as below.

    * Transient simulation of txl Transmission lines
    .param PW=0.1NS
    .param V1=0 V2=0.35 TD=0NS TR=0.1*PW TF=0.1*PW PER = 20*PW
    vin1 src1 0 DC 0
    +PULSE ( V1 V2 TD TR TF PW PER)
    *******************************************  Transmission Line for FR4 traces*******************************
    Y1 src2 0 out1 0 ymod LEN=1500
    .MODEL ymod txl R=0.4 L = 2.37E-11 G=0.000051 C= 09.5E-15 length =8.46E-5
    Rs1 src1 src2 50
    Rl1 out1 0 50
    .control
    * Transient analysis (for time domain response):
    TRAN 1p 4ns 
    plot v(out1)
    plot v(src1)
    .endc
    .end
    

    Now here we are getting some output as charging and discharging. What happens that if we have to make more attenuation in TL then we increase value of R. but we dont see any effect in the output. However at some particular value of R such as 0.3 the values are very high in powers of 100. Is that proper behavior of txl model or we are missing something in our netlist.
    Thanks!!!!!

    Fahim

     
  • Fahim

    Fahim - 2013-04-16

    Hi,

    When we use txl model we are assuming LEN as total number of segment and length as size of one segment.
    Complete code is as below.

    * Transient simulation of txl Transmission lines
    .param PW=0.1NS
    .param V1=0 V2=0.35 TD=0NS TR=0.1*PW TF=0.1*PW PER = 20*PW
    vin1 src1 0 DC 0
    +PULSE ( V1 V2 TD TR TF PW PER)
    *******************************************  Transmission Line for FR4 traces*******************************
    Y1 src2 0 out1 0 ymod LEN=1500
    .MODEL ymod txl R=0.4 L = 2.37E-11 G=0.000051 C= 09.5E-15 length =8.46E-5
    Rs1 src1 src2 50
    Rl1 out1 0 50
    .control
    * Transient analysis (for time domain response):
    TRAN 1p 4ns 
    plot v(out1)
    plot v(src1)
    .endc
    .end
    

    Now here we are getting some output as charging and discharging. What happens that if we have to make more attenuation in TL then we increase value of R. but we dont see any effect in the output. However at some particular value of R such as 0.3 the values are very high in powers of 100. Is that proper behavior of txl model or we are missing something in our netlist.
    Thanks!!!!!

    Fahim

     
  • Robert Larice

    Robert Larice - 2013-04-21

    Hello Fahim,

      Regarding the confusion of your parameters,
        the instance parameter `len' overrides/replaces the
        model parameter `length'
      exactly what Holger already told you.

      Your specific instance thus describes a transmission line
       with a total delay of
          (* 1500 (sqrt (* 2.37e-11 9.5e-15))) ==  0.71 ns
        and with a characteristic impedance of
          (sqrt (/ 2.37e-11 9.5e-15)) == 49.95 Ohm

      If you hadn't mentioned the len=1500 on the instantiation `Y1'
      then you would have described a transmission line
        with a total delay of
          (* 8.46E-5 (sqrt (* 2.37e-11 9.5e-15))) == 0.040 ps
      which probably is nonsense.

      There is no such thing as `segments'.

      To avoid confusion, I'd recommend to use SI units
      for L, C, R, G, and len|length that is, specify
         L in
         C in
         R in
         G in
         len|length in
      and remember realistic values for L and C
      are on the order of
         1 uH/m  and 100 pF/m

      Apart from that, I'd not use the `xtl' model,
         better use the `ltra' model
      At least to me `xtl' seems to be completely broken,
        (at least in the ac domain)
        whilst I've used `ltra' successfully.
      But beware `ltra' requires either R=0 or G=0

      Further more, if you really need G for your FR4 traces,
      then you will need a model which
         models frequency proportional dielectric loss.
      As far as I know all ngspice transmission line models
        do only support constant G

    Regards
      Robert

     
  • Fahim

    Fahim - 2013-04-29

    Hi Robert,

    As you said I use ltra model as shown in attached code.

    Here I am getting perfect delay in my output. But I am not getting the proper charging and discharging effect in my output.
    Also we have taken value of resistance at zero frequency level,but due to skin effect the value of R should also be change as frequency change. Is that happen internally?

    Please find the attached my code.

    * Transient simulation of ltra Transmission lines 
    .param PW=0.1NS
    .param V1=0 V2=0.35 TD=0NS TR=0.1*PW TF=0.1*PW PER = 20*PW
    vin1 src1 0 DC 0  PULSE ( V1 V2 TD TR TF PW PER)
    ******************************************* Transmission Line for FR4 traces******************************* 
    O23 src2 0 out1 0 LOSSYMOD
    .model LOSSYMOD ltra r=5.14 g=0 l=292E-9 c=246e-12 len=1
    Rs1 src1 src2 34.84
    Rl1 out1 0 34.84
    .control
    * Transient analysis (for time domain response): 
    TRAN 10ps 100ns
    plot v(out1)
    *plot v(src1) 
    .endc
    .end
    
     
  • Robert Larice

    Robert Larice - 2013-04-29

    Hello Fahim,

      as far as I know, none of the ngspice transmission line models
         support frequency dependent parameters.
      Thus, as I've already mentioned, you can't directly model
         dielectrical loss which requires frequency proportional G
      nor
         skin effekt loss which requires sqrt(frequency) proportional R

    Regards,
      Robert

     
  • Fahim

    Fahim - 2013-04-29

    Thanks Robert

    I am trying to get ISI effect in my output. Do we have example in which we can see ISI effect in transmission line output.

    Regards,
    Fahim Khan

     
  • Robert Larice

    Robert Larice - 2013-04-29

    Fahim,

       from what you have written so far, I can noit infer
         what you are realy trying to do.

      For me, ISI means "Inter Symbol Interference"

      You get ISI effects for every circuit with an impulse
        response which is longer than your 1/baudrate

      Thus if you just want to see such a disturbance,
        then you don't need a transmission line at all.
      Any low pass, even a simple RC will do.

      Of course you can use a transmission line as well
        for that purpose.
      Even a lossless will do,
        if you terminate it incorrecty.

      But if you want to really "see" the ISI,
        then you need to plot an "Eye" diagram.
      This would ve a .control / .endc control language
        exercise.
      Use a "random voltage source" to generate a stimulus
         representing your NRZ data stream.
       Feed this into a low pass or incorrectly terminated
         lossless transmission line.
       Grab the output voltage, "linearize" it in the time domain,
          then "reshape" this vector into a  "set of curves"
          each one storing the output voltage for a single "Baud Step" duration.
       Then plot this "set of curves"
       This plot would show what is called an "Eye diagram"
          and you would see its "opening" suffering from "ISI"

    Regards,
      Robert

     
  • Robert Larice

    Robert Larice - 2013-05-01

    Fahim,

       Here is an example which plots an eye diagram
         of the output of a mismatched transmission line,
         addtionally loaded with some parasitics.
       The line length is 5ns, Z0 is 100Ohm,
         mismatch is 10dB both sides,
         plus roughly 100ps parasitics at both ends,
      running at 1GBit/s and driven with a PRBS7 sequence.

    Regards,
       Robert

    plot an eye diagram
    * (compile (concat "w32/src/ngspice "  buffer-file-name) t)
    * PRBS-7 sequence, Polynom z^7 + z^6 + 1
    VRTS3 1 0 DC 0 pwl(
    +    0.0ns 0
    +    0.1ns 1
    +    1.0ns 1
    +    1.1ns 0
    +    2.0ns 0
    +    2.1ns 0
    +    3.0ns 0
    +    3.1ns 0
    +    4.0ns 0
    +    4.1ns 0
    +    5.0ns 0
    +    5.1ns 0
    +    6.0ns 0
    +    6.1ns 0
    +    7.0ns 0
    +    7.1ns 1
    +    8.0ns 1
    +    8.1ns 1
    +    9.0ns 1
    +    9.1ns 1
    +   10.0ns 1
    +   10.1ns 1
    +   11.0ns 1
    +   11.1ns 1
    +   12.0ns 1
    +   12.1ns 1
    +   13.0ns 1
    +   13.1ns 1
    +   14.0ns 1
    +   14.1ns 0
    +   15.0ns 0
    +   15.1ns 1
    +   16.0ns 1
    +   16.1ns 0
    +   17.0ns 0
    +   17.1ns 1
    +   18.0ns 1
    +   18.1ns 0
    +   19.0ns 0
    +   19.1ns 1
    +   20.0ns 1
    +   20.1ns 0
    +   21.0ns 0
    +   21.1ns 0
    +   22.0ns 0
    +   22.1ns 1
    +   23.0ns 1
    +   23.1ns 1
    +   24.0ns 1
    +   24.1ns 0
    +   25.0ns 0
    +   25.1ns 0
    +   26.0ns 0
    +   26.1ns 1
    +   27.0ns 1
    +   27.1ns 1
    +   28.0ns 1
    +   28.1ns 1
    +   29.0ns 1
    +   29.1ns 0
    +   30.0ns 0
    +   30.1ns 1
    +   31.0ns 1
    +   31.1ns 1
    +   32.0ns 1
    +   32.1ns 1
    +   33.0ns 1
    +   33.1ns 0
    +   34.0ns 0
    +   34.1ns 1
    +   35.0ns 1
    +   35.1ns 0
    +   36.0ns 0
    +   36.1ns 0
    +   37.0ns 0
    +   37.1ns 1
    +   38.0ns 1
    +   38.1ns 0
    +   39.0ns 0
    +   39.1ns 1
    +   40.0ns 1
    +   40.1ns 1
    +   41.0ns 1
    +   41.1ns 0
    +   42.0ns 0
    +   42.1ns 0
    +   43.0ns 0
    +   43.1ns 0
    +   44.0ns 0
    +   44.1ns 1
    +   45.0ns 1
    +   45.1ns 1
    +   46.0ns 1
    +   46.1ns 0
    +   47.0ns 0
    +   47.1ns 1
    +   48.0ns 1
    +   48.1ns 1
    +   49.0ns 1
    +   49.1ns 1
    +   50.0ns 1
    +   50.1ns 1
    +   51.0ns 1
    +   51.1ns 0
    +   52.0ns 0
    +   52.1ns 1
    +   53.0ns 1
    +   53.1ns 1
    +   54.0ns 1
    +   54.1ns 0
    +   55.0ns 0
    +   55.1ns 1
    +   56.0ns 1
    +   56.1ns 0
    +   57.0ns 0
    +   57.1ns 1
    +   58.0ns 1
    +   58.1ns 1
    +   59.0ns 1
    +   59.1ns 0
    +   60.0ns 0
    +   60.1ns 1
    +   61.0ns 1
    +   61.1ns 1
    +   62.0ns 1
    +   62.1ns 0
    +   63.0ns 0
    +   63.1ns 0
    +   64.0ns 0
    +   64.1ns 1
    +   65.0ns 1
    +   65.1ns 0
    +   66.0ns 0
    +   66.1ns 0
    +   67.0ns 0
    +   67.1ns 1
    +   68.0ns 1
    +   68.1ns 0
    +   69.0ns 0
    +   69.1ns 0
    +   70.0ns 0
    +   70.1ns 0
    +   71.0ns 0
    +   71.1ns 1
    +   72.0ns 1
    +   72.1ns 1
    +   73.0ns 1
    +   73.1ns 1
    +   74.0ns 1
    +   74.1ns 0
    +   75.0ns 0
    +   75.1ns 0
    +   76.0ns 0
    +   76.1ns 0
    +   77.0ns 0
    +   77.1ns 0
    +   78.0ns 0
    +   78.1ns 1
    +   79.0ns 1
    +   79.1ns 0
    +   80.0ns 0
    +   80.1ns 1
    +   81.0ns 1
    +   81.1ns 1
    +   82.0ns 1
    +   82.1ns 1
    +   83.0ns 1
    +   83.1ns 1
    +   84.0ns 1
    +   84.1ns 1
    +   85.0ns 1
    +   85.1ns 0
    +   86.0ns 0
    +   86.1ns 0
    +   87.0ns 0
    +   87.1ns 1
    +   88.0ns 1
    +   88.1ns 0
    +   89.0ns 0
    +   89.1ns 1
    +   90.0ns 1
    +   90.1ns 0
    +   91.0ns 0
    +   91.1ns 1
    +   92.0ns 1
    +   92.1ns 1
    +   93.0ns 1
    +   93.1ns 1
    +   94.0ns 1
    +   94.1ns 0
    +   95.0ns 0
    +   95.1ns 0
    +   96.0ns 0
    +   96.1ns 1
    +   97.0ns 1
    +   97.1ns 1
    +   98.0ns 1
    +   98.1ns 0
    +   99.0ns 0
    +   99.1ns 1
    +  100.0ns 1
    +  100.1ns 0
    +  101.0ns 0
    +  101.1ns 0
    +  102.0ns 0
    +  102.1ns 0
    +  103.0ns 0
    +  103.1ns 1
    +  104.0ns 1
    +  104.1ns 0
    +  105.0ns 0
    +  105.1ns 0
    +  106.0ns 0
    +  106.1ns 1
    +  107.0ns 1
    +  107.1ns 1
    +  108.0ns 1
    +  108.1ns 1
    +  109.0ns 1
    +  109.1ns 1
    +  110.0ns 1
    +  110.1ns 0
    +  111.0ns 0
    +  111.1ns 0
    +  112.0ns 0
    +  112.1ns 0
    +  113.0ns 0
    +  113.1ns 1
    +  114.0ns 1
    +  114.1ns 0
    +  115.0ns 0
    +  115.1ns 1
    +  116.0ns 1
    +  116.1ns 0
    +  117.0ns 0
    +  117.1ns 0
    +  118.0ns 0
    +  118.1ns 0
    +  119.0ns 0
    +  119.1ns 0
    +  120.0ns 0
    +  120.1ns 1
    +  121.0ns 1
    +  121.1ns 1
    +  122.0ns 1
    +  122.1ns 0
    +  123.0ns 0
    +  123.1ns 0
    +  124.0ns 0
    +  124.1ns 0
    +  125.0ns 0
    +  125.1ns 0
    +  126.0ns 0
    +  126.1ns 0
    +  127.0ns 0
    +) r=0
    * source mismatch
    *   refl = (50 - 100)/(50 + 100) = -1/3   aprox 10dB
    * sink mismatch
    *   refl = (200 - 100)/(200 + 100) = +1/3   aprox 10dB
    * addtionally parasitics
    *   increasing the mismatch
    R1 1 11  50.0
    L1 11 2  10nH
    O1 2 0 3 0 ymod
    R2 3 0 200
    C2 3 0 2pF
    * delay = sqrt(L*C)*len
    * Z0 = sqrt(L/C)
    *
    * (sqrt (* 1e-6 100e-12))  10.0 ns
    * (sqrt (/ 1e-6 100e-12)) 100.0 Ohm
    .MODEL ymod ltra R=0 L=1u G=0 C=100p len=0.5
    .control
    tran 100ps 499.9ns
    linearize
    let eye = v(3)
    reshape eye [125][40]
    plot eye xlimit 0 2ns
    .endc
    
     
  • Fahim

    Fahim - 2013-05-05

    Thanks Robert for your help.
    yes I mean Inter Symbol Interference (ISI)only

    I am trying to to give PULSE as input and for that I am not getting any output for eye and it is giving me message as dimensions don't fit "eye" (total size = 10001). Please find the attached my code.

    * Transient simulation of txl Transmission lines 
    .param PW=0.1NS
    .param V1=0 V2=0.35 TD=0NS TR=0.1*PW TF=0.1*PW PER = 20*PW
    vin1 src1 0 DC 0  PULSE ( V1 V2 TD TR TF PW PER)
    ******************************************* Transmission Line for FR4 traces******************************* 
    O23 src2 0 out1 0 LOSSYMOD
    .model LOSSYMOD ltra r=5.21 g=0 l=5E-7 c=6.12E-11 len=1
    Rs1 src1 src2 90
    Rl1 out1 0 90
    .control
    * Transient analysis (for time domain response): 
    TRAN 10ps 100ns
    linearize
    let eye = v(out1)
    reshape eye [120][40]
    plot eye xlimit 0 2ns
    plot v(out1)
    *plot v(src1) 
    .endc
    .end
    

    Regards,
    Fahim

     
  • Robert Larice

    Robert Larice - 2013-05-05

    Fahim,

       youi have expressed a tran with 10os resolution and length 100ns
         which yields (after linearization) 100ns/10ps + 1 sample points
         which is 10001 sample points

      and then you `reshape''ed into an array of size 120*40 = 4800 points

      this doesn't fit.

      change your upper limit to 99.99ns, which yields 10000 points
       and reshape for example into  which is 10000 points too

      but you have another problem.
      you won't see any ISI effects if your stimulus is periodic.
      thats why people use pseudo random sequences for such
        measurements.
       for example the PRBS-7 sequence which I've posted.
       thats a well known pseudo random
       sequence of length 127 generated by a linear feedback
       shift register. in my case the shift register expressed
        multiplication with the polynom x modulo x^7+x^6+1
      please google a bit for  LFSR, PRBS,  and
          pseudo random bit sequence,
       to learn a bit about the (quite intresting by the way)
         theory which is involved here.

    Regards,
      Robert

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks