Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

SPICE internals

  1. Sep 21, 2006 #1
    Are there any good sources anywhere for detailed info on how SPICE simulators work internally? I'm interested in learning more about how spice actually goes about its calculations, thanks.
     
  2. jcsd
  3. Sep 21, 2006 #2
    Are you interesting in how it models a transistor or how sets up and solves a system of equations? Pretty much any answer will be specific to a particular version of spice but for the transistor:
    In general this model is used:
    http://en.wikipedia.org/wiki/Bipolar_junction_transistor#Ebers.E2.80.93Moll_model
    If you can specify more parameters then often this one is used:
    http://eesof.tm.agilent.com/docs/ic...MODELING/3TRANSISTORS/1GummelPoon/GP_DOCU.pdf

    This link seems effective but to be honest I only glanced through it:
    http://en.wikipedia.org/wiki/SPICE
     
  4. Sep 21, 2006 #3
    Oh ya, I supose that answer is only good for bipolar transistors. Not sure sure if there is a generic FET model. I kinda doubt it. The version I use is hspice.
    http://www.stanford.edu/class/ee133/spice/hspiceman.pdf
    There is a chapter that describe the various FET models in excruciating detail if you are really interested. I have never been that interested myself and only use it for reference when necessary. :)
     
  5. Sep 21, 2006 #4
    It uses modified nodal analysis to set up a system of equations, and then uses Newton's method combined with the trapezoidal rule to step through time.
     
  6. Sep 22, 2006 #5
    I'm fairly familiar with spice input, that is, the measured parameters which define the electrical behavior of the transistor or other devices.

    What I want to know is more about the details of how it actually goes about using those parameters. Like, I know it uses the modified nodal analysis, but it's surely more complex than that internally, right?
     
  7. Sep 22, 2006 #6
    It's really not that complicated. It reads each element off the input file, and then stamps a constitutive relation into a matrix connecting the nodes that the device is connected to.
    Systems from circuits
    Have a look at slides 19-32 specifically and it shows you how to turn a resistor network with sources into a linear system. If you have capacitors or inductors, it does the same thing by adding a C and an L matrix and time derivatives to get a dynamical linear system. It gets a little bit trickier when you include nonlinear elements because then it needs to know the Jacobian (change in current with respect to change in voltage at each node it's connected to) of each element and it stamps those into a linearized system.

    Once it has the system assembled, it uses your standard numerical technique to solve for all of the node voltages. If the system is linear, it just solves it with LU decomposition or an iterative scheme. If the system is dynamical, it uses the trapezoidal rule (I think) to itegrate through time. If the system is nonlinear, it just uses Newton's method to create a bunch of linearized versions of the system and solves those.
     
  8. Sep 22, 2006 #7
    hmm, I see. I guess it's conceptually pretty simple then, but it makes me wonder why I had trouble finding info on the web about the exact details. thanks.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: SPICE internals
  1. Spice Sucks? (Replies: 11)

  2. Spice model (Replies: 3)

  3. Spice software (Replies: 1)

  4. Spice Lying? (Replies: 18)

Loading...