How Do SPICE Simulators Perform Their Calculations Internally?

  • Thread starter Thread starter jbusc
  • Start date Start date
  • Tags Tags
    Internal
Click For Summary

Discussion Overview

The discussion focuses on the internal workings of SPICE simulators, particularly how they perform calculations related to electronic components like transistors and the methods they use to solve systems of equations. Participants express interest in both the modeling of specific devices and the general computational techniques employed by SPICE.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification

Main Points Raised

  • One participant seeks detailed information on the internal operations of SPICE simulators.
  • Another participant mentions the Ebers-Moll model for bipolar transistors and suggests that the answer may vary depending on the specific version of SPICE being used.
  • A different participant questions the existence of a generic FET model and references a specific version of SPICE (hspice) that includes detailed descriptions of FET models.
  • It is noted that SPICE uses modified nodal analysis to set up a system of equations and employs Newton's method combined with the trapezoidal rule for time-stepping.
  • One participant expresses a desire to understand the complexity behind how SPICE utilizes input parameters beyond modified nodal analysis.
  • Another participant explains that SPICE reads elements from the input file and stamps constitutive relations into a matrix connecting nodes, detailing the process for linear and nonlinear systems, including the use of Jacobians and numerical techniques for solving equations.
  • A participant reflects on the simplicity of the concepts discussed but expresses frustration at the difficulty of finding detailed information online.

Areas of Agreement / Disagreement

Participants generally share insights and clarifications about SPICE's internal workings, but there is no consensus on the availability of comprehensive resources or the complexity of the internal processes. Multiple viewpoints on specific models and methods remain present.

Contextual Notes

Some discussions involve assumptions about the complexity of SPICE's internal calculations and the specific models used for different types of transistors, which may not be universally applicable across all versions of SPICE.

jbusc
Messages
210
Reaction score
0
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.
 
Engineering news on Phys.org
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
 
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. :)
 
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.
 
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?
 
jbusc said:
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?

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.
http://ocw.mit.edu/NR/rdonlyres/Electrical-Engineering-and-Computer-Science/6-336JFall2003/DDF74FDE-003D-42C6-AE1F-09E39CC48A0C/0/lec2.pdf"
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.
 
Last edited by a moderator:
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.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
Replies
4
Views
1K
  • · Replies 26 ·
Replies
26
Views
4K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 15 ·
Replies
15
Views
7K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 20 ·
Replies
20
Views
33K
Replies
6
Views
5K