I'm currently looking into building my own spice models from datasheet specs to ensure accuracy. Are there any references for this sort of thing? I've looked around online and haven't found anything great.
This is a tough field to get into. The learning curve is extremely steep, so be warned. Another thing I should mention upfront is that you can't build very good intrinsic device models (diode, BJT, FET, etc.) from the datasheet alone. Very few parameters will line up one-to-one, and the charts they usually publish aren't under the conditions you need to extract the underlying model parameters. You'll likely need to get measurement equipment and several part samples to acquire good data.
I started with the book recommended by the author of LTspice, which is Semiconductor Device Modeling with SPICE (2nd ed.) by Massobrio & Antognetti. At first, I felt completely overwhelmed by this book, but if you can just focus a bunch of time on Chapter 1 (diodes), then you'll find the later chapters are just building off that initial chapter. Maybe reread that chapter a couple times. The later chapters will cover actual parameter extraction techniques, but it's important to know what the parameters are doing first.
Several years later, I stumbled upon this next one which I think was very useful in its own right. It is called SPICE: Practical Device Modeling (1st ed.) by Kielkowski. However, it is a little outdated since it is focuses on SPICE2 while the most popular SPICE packages nowadays (except PSpice) are built off of SPICE3. You actually need to be aware of these little quirks if your intent is to make good models with wide compatibility. Think of PSPICE and SPICE3 to be two separate main branches off of SPICE2, while packages like LTspice and ngspice are little twigs hanging off of SPICE3.
Other than those...the built-in LTspice help is great, and the ngspice user manual is useful too. I've had to look at the PSpice Reference Guide a couple times as well, but make sure you save that PDF because I don't know how long that link will last. There aren't really any online resources I found particularly useful until you get to opamp macromodels, although for many opamps I prefer to use LTspice's built-in UniversalOpamp2 and adjust its parameters to fit the opamp I would like to model. For info on that, see the example schematic found at Documents\LTspiceXVII\examples\Educational\UniversalOpamp2.asc (assuming a Windows PC installation). Anyway, here are some honorable mentions for other macromodels:
The documentation that comes with circuit simulators usually focuses on how to make the software dothings, assuming that the user already knows what needs to be done. The books on this page have beenselected to help fill this gap.
Both the SPICE novice and experienced users will find the material useful.The early chapters discuss devices and analyses, each starting with a simplelinear example accessible to a novice and works though tutorial-style to more advancedmaterial. Later chapters discuss hierarchical models, distortion analysis, tackling non-convergence issues, algorithms and how these are affected by setting options.
The structure of this book makes it particularly useful as a text to accompanyan analog design course for engineering students. It includes many examples, which are available for download from the author's website.Some examples use PSpice syntax and may need to be translated, e.g. using the ps2macspice script available elsewhere on this website,before they will work with MacSpice and other simulators that use Berkeley syntax.
Kielkowski spent many years training engineers to use SPICE, and this experiencecomes through strongly in this book. Most topics are covered in three stages: anintroduction explaining the basic principles; simple examples illustrating howthe principles are applied to circuit analysis; a discussion of issues that occur inpractical cases and how these can be addressed. The mathematics used in explanationsis rarely above high-school level.
The book is not perfect. In particular, it has a tendency to cover the same pointseveral times in different places. (I assume that this is because it was derivedfrom training material.) In one or two places, it describes SPICE2 behaviourwithout making it clear that SPICE 3 differs. However, I believe that, with thehelp of Inside SPICE, almost every user would be able to diagnose and cure most ofthe problems they are likely to encounter in day-to-day circuit analysis with SPICE.
The target audience is analog and mixed-signal circuit designers who have some experience of usingSPICE. Emphasises the fundamental characteristics and behaviour of circuit simulators in general.Simulation pitfalls (e.g. convergence and accuracy issues) their causes and how to avoid them arecarefully explained. It also discussed how to make measurements of properties such as loop gain anddistortion measurements with a circuit simulator. Simulation of awkward circuits, such asoscillators, charge-storage or very large circuits is also covered.
It is possible to simulate A/D and D/A convertors with Spice, but it'snot particularly easy. This bookconcentrates on undersampled (aka Nyquist) convertors. It seems to be aimed at practisingengineers and engineering students, and develops a set building-block models that can be combined togetherto analyse complicated systems.
The title of this book should have been Handbook of Circuits, each with a SPICE Simulation. It is acompilation of ca 50 circuits that have been both tested and simulated. The idea seems to be thatthe reader will use these as a starting point for development and modification of their own designs.
Although written to support Spice Opus, much of the discussion in this book is applicable to otherSpice 3f5 derivatives such as MacSpice. It includes a discussion of the basic mathematics of circuit analysis, and the algorithms implemented in Spice.
A very good book about switched-mode power supplies (SMPS). These are difficultto simulate because activity occurs over a wide range of time-scales from nanosecondsto seconds. To overcome these difficulties the author develops analogbehavioural models and subcircuits that serve as macro-models for parts of the systems.A strength of the book is the way it includes validation of models withinthe development process.
This book is an excellent toolkit for practising designers, but it is not atextbook for novices. 'Cookbook' describes it well, it provides a comprehensive setof expertly constructed recipes, but a sound understanding of both SMPS design andSPICE are essential pre-requisite knowledge.
The title of this otherwise excellent book does not convey the balance ofthe content. Firstly, the authors explain how simulators work, not how to usethem. Secondly, a majority of the content is a detailed description of thealgorithms used by analogue circuit simulators. The target audience seemsto be senior undergraduates on engineering degrees. The authors draw onboth the research literature and practical experience developing simulatorcodes. Towards the end of the book a few chapters discuss the principlesof mathematical optimisation methods and the simulation of digitalcircuits.
Kielkowski gives detailed step-by-step methods for constructing, from datasheets and/or measurements, SPICE modelsfor: resistors, and inductors; rectifier and Zener diodes; bipolar transistors;small-signal JFETs; power MOSFETs; and analog behavioral elements. The styleand tone is practical rather than academic, similar to his 'Inside Spice' (see above).
If your work involves mosfets modelled with BSIM3 or BSIM4you must consider getting a copy of this book.Chapters 3 and 4 were the highlights for me. The formerincludes a very useful list of BSIM3 parameters withpractical explanations of what they mean and how they areused. The latter discusses flaws in BSIM3, and is essentialreading.
SPICE ("Simulation Program with Integrated Circuit Emphasis")[1][2] is a general-purpose, open-source analog electronic circuit simulator.It is a program used in integrated circuit and board-level design to check the integrity of circuit designs and to predict circuit behavior.
Unlike board-level designs composed of discrete parts, it is not practical to breadboard integrated circuits before manufacture. Further, the high costs of photolithographic masks and other manufacturing prerequisites make it essential to design the circuit to be as close to perfect as possible before the integrated circuit is first built.
Simulating the circuit with SPICE is the industry-standard way to verify circuit operation at the transistor level before committing to manufacturing an integrated circuit. The SPICE simulators help to predict the behavior of the IC under different operating conditions, such as different voltage and current levels, temperature variations, and noise.[3]
Board-level circuit designs can often be breadboarded for testing. Even with a breadboard, some circuit properties may not be accurate compared to the final printed wiring board, such as parasitic resistances and capacitances, whose effects can often be estimated more accurately using simulation. Also, designers may want more information about the circuit than is available from a single mock-up. For instance, circuit performance is affected by component manufacturing tolerances. In these cases it is common to use SPICE to perform Monte Carlo simulations of the effect of component variations on performance, a task which is impractical using calculations by hand for a circuit of any appreciable complexity.
Circuit simulation programs, of which SPICE and derivatives are the most prominent, take a text netlist describing the circuit elements (transistors, resistors, capacitors, etc.) and their connections, and translate[4] this description into equations to be solved. The general equations produced are nonlinear differential algebraic equations which are solved using implicit integration methods, Newton's method and sparse matrix techniques.
c80f0f1006