Circuit Simulation with SPICE

SPICE simulation

/ SPICE rhymes with nice /

Imagine testing a new car design in a driving simulator before you ever bend a single piece of metal. SPICE does the same thing for an electronic circuit: you describe the circuit to the computer, and it predicts what every voltage and current will do, so you can catch mistakes and try ideas cheaply before you pick up a soldering iron.

SPICE stands for Simulation Program with Integrated Circuit Emphasis, and it was born at the University of California, Berkeley in the early 1970s. You hand it a description of the circuit (a netlist) listing every component and how they connect. The program then writes the circuit equations automatically, using the same laws a student would use by hand: Ohm's law (V = I times R) and Kirchhoff's laws (the currents into a node sum to zero). It solves those equations numerically and reports the answer. Modern free tools like LTspice and ngspice, and the simulators built into EDA suites, are all descendants of that original program.

The single most important thing to remember is that a simulation is only as honest as the models and assumptions you give it. SPICE happily computes a perfect answer to the circuit you described, which may not be the circuit you will actually build. It cannot see your breadboard's stray capacitance, your PCB's layout, or a resistor that runs hot. Use it to reveal design intent and catch blunders, then build and measure to confirm.

In LTspice you draw a 9 V battery, a 10 kilohm and a 5 kilohm resistor in series, press Run, and the simulator reports 3 V at the junction, exactly matching 9 times 5/(10+5) computed by hand.

A simulator reproduces the textbook voltage-divider answer, then lets you sweep, animate, and stress the same circuit far faster than on the bench.

Simulation complements building and measuring; it never replaces them. A circuit that works perfectly in SPICE can still fail on the bench because of effects the model never knew about.

Also called
circuit simulation電路模擬