Issue with "tstep" in transi...

  • kriszhyan

    kriszhyan - 2013-01-04

    I'm confused with "tstep" in transient simulation. I thought it was like a hint to spice. But when I set it to a different value, the simulation result changed. Here is an example I tried out. The netlist is as follows. It was copied from the ngspice examples.

    Ba gib 0 I=-1e-2*v(gib,0)+1e-2*v(gib,0)^3
    La gib 0 1.2e-6
    Ra gib 0 158.113
    Ca gib 0 1e-9 ic=0.5
    Rb bad 0 1k

    .tran 1e-9 5e-7 uic
    .print tran gib

    The simulation results for "gib" are different when I set "tstep" to different values, e.g., 1e-9, 2e-9, etc. Could someone explain this to me?

    Thanks in advance.

  • Holger Vogt

    Holger Vogt - 2013-01-05

    ngspice simply follows your suggestions.

    Look at the time differences in the printed values.

    If you try tstep = 1e-7 however, you will see that ngspice now does not use this value, but selects a finer step size due to some precision requirements.

    By the way, to compare results, I would suggest to not only look at numbers, but at the plot of gib versus time.



Log in to post a comment.

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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks