Analyzing Circuits with SPICE on Linux
If you're going to have trouble with SPICE, most likely it will be with a circuit you can't analyze. The good news is that SPICE3 is improved in this respect, and you have some control over how numerical solutions are determined. When SPICE calculates node voltages and branch currents, it uses thresholds for tolerable errors to determine when a simulation reaches its answer—that is, when it reaches numerical convergence. The three parameters controlling the thresholds can be set on the .options statement and are named ABSTOL, VNTOL and RELTOL. ABSTOL is the smallest current you want SPICE to accept. Increasing ABSTOL from its default value of 12pA can help a simulation to converge. VNTOL is the smallest voltage that you want SPICE to accept. Increasing VNTOL from its default value of 10V can help a simulation to converge. RELTOL is the ratio of the numerical answer found during the present iteration to the numerical answer found during the last iteration. Increasing RELTOL can help a DC analysis to converge, but increasing RELTOL can also cause transient analysis problems. If you get a warning from SPICE saying “timestep too small”, RELTOL is probably set too large.
The parameters ITL1 through ITL6 control the number of iterations to perform before SPICE gives up, and control methods are used to attain convergence.
Obviously the accuracy of the simulation results can be no better than the convergence thresholds used during analysis. If you don't need to relax the thresholds, this won't present a problem since the tolerances on component values and variations in component performance stand to present much more discrepancy between nominal simulated performance and real-world measured performance.
This article is far from an exhaustive treatment of what SPICE can do for you and how to use it to its fullest advantage. SPICE is both prevalent and useful to engineers, and has been so for nearly 30 years. If you never use SPICE, I hope you caught at least a glimpse of an engineer's bread and butter. If you use or will use SPICE, I hope this article gave you some insight into its use on Linux machines.
|Where's That Pesky Hidden Word?||Aug 28, 2015|
|A Project to Guarantee Better Security for Open-Source Projects||Aug 27, 2015|
|Concerning Containers' Connections: on Docker Networking||Aug 26, 2015|
|My Network Go-Bag||Aug 24, 2015|
|Doing Astronomy with Python||Aug 19, 2015|
|Build a “Virtual SuperComputer” with Process Virtualization||Aug 18, 2015|
- Concerning Containers' Connections: on Docker Networking
- Problems with Ubuntu's Software Center and How Canonical Plans to Fix Them
- A Project to Guarantee Better Security for Open-Source Projects
- Where's That Pesky Hidden Word?
- Firefox Security Exploit Targets Linux Users and Web Developers
- My Network Go-Bag
- Doing Astronomy with Python
- Build a “Virtual SuperComputer” with Process Virtualization
- Three More Lessons
- diff -u: What's New in Kernel Development