Four questions, one virtual bench
By now you can write a netlist — components named, node 0 chosen as the reference everything is measured against. But a netlist on its own is just a description sitting still; it is a wiring diagram, not an experiment. Nothing happens until you add an analysis directive — a line beginning with a dot that hands the virtual bench a specific question to answer. The three you will reach for daily are DC, AC, and transient, and each answers a genuinely different kind of question.
Picture asking the same circuit four ways. *Where does it come to rest when nothing moves?* — that is the DC operating point, a still photograph of the circuit at idle. *How does the output change as I slowly turn one knob?* — that is the DC sweep, tracing a transfer curve. *How does it respond to each frequency of a tiny wiggle?* — that is AC analysis, a frequency-by-frequency X-ray. *What does it actually do, moment by moment, when I poke it?* — that is transient analysis, a movie played on a virtual oscilloscope.
The resting state: operating point and DC sweep
To find the operating point, SPICE freezes time and asks what every voltage and current settles to at DC. It treats each capacitor as an open circuit — a fully charged bucket that passes no steady current — and each inductor as a plain wire — a flywheel spinning at constant speed with no voltage across it. With the reactive parts out of the way, it is left with pure resistor-and-source algebra and solves for every node. This is exactly the bias point, the Q-point, you met when biasing transistors — now handed to you in milliseconds. A 10 k and 5 k divider across 9 V prints out as 9 times 5/(10+5) = 3.000 V at the middle node; for a transistor stage you would read off Vbe, Ic, and Vce to confirm it is sitting in the active region where you intended.
A DC sweep repeats that resting-state solve over and over while you turn one source slowly from a start value to a stop value, recording the output at each step. String the dots together and you get a transfer curve. Sweep the voltage across a diode and plot the current and you have drawn its I-V curve straight from the model; sweep an amplifier's input from rail to rail and you watch its output climb, flatten, and clip. The honest caveat: a DC sweep is still just a sequence of frozen resting states, with capacitors held open the whole time — so it tells you about levels and limits, never about speed or timing.
* RC low-pass: in --[ R 1.6k ]-- out --[ C 100n ]-- 0
V1 in 0 AC 1 SIN(0 1 1k)
R1 in out 1.6k
C1 out 0 100n
.op -> resting voltages (no DC drive here: all nodes 0 V)
.dc V1 0 5 0.1 -> sweep V1 from 0..5 V, out vs in (a straight line)
.ac dec 20 10 1Meg -> Bode: gain & phase vs frequency
.tran 0 5m 0 5u -> time movie: feed in a wave, watch out follow
.ac result: 100 Hz -> ~0 dB (passband, in = out)
1 kHz -> -3 dB (0.707) (cutoff)
10 kHz -> -20 dB (-20 dB per decade roll-off)The frequency X-ray: AC analysis and the Bode plot
AC analysis answers the question every filter and amplifier designer lives by: how do gain and phase change with frequency? SPICE applies a tiny test sine of amplitude 1 at one frequency, reads the output, then repeats across a whole sweep of frequencies — often twenty points per decade from 10 Hz to 1 MHz. Plotting the result as gain in decibels and phase in degrees against a logarithmic frequency axis gives the Bode plot, the single most useful picture in analog design. For our RC low-pass it shows a flat passband up to the cutoff, then a steady -20 dB-per-decade slide — exactly the RC behaviour you predicted by hand, now confirmed in one click.
Put an op-amp in and the Bode plot earns its keep. A non-inverting amplifier with Rf = 90 k and Rin = 10 k has a gain of 1 + 90/10 = 10, or 20 dB — and the AC plot shows a flat 20 dB line at low frequency that eventually bends down and rolls off. That bend is the gain-bandwidth product at work: a part with a 1 MHz gain-bandwidth product, asked for a gain of 10, runs out of bandwidth near 1 MHz / 10 = 100 kHz. The whole reason AC analysis exists is to make limits like this visible before you build.
The movie: transient analysis
Transient analysis is the virtual oscilloscope. SPICE steps forward through time in tiny increments, solving the full nonlinear circuit at each instant and letting capacitors charge and inductors build current just as they would on the bench. This is the only one of the big three that shows the circuit doing its real job in real time: an amplifier clipping a too-large input, an op-amp's output ramping at its slew-rate limit, a power supply's voltage sagging and recovering, a feedback loop ringing or breaking into oscillation at switch-on. Whatever the Bode plot's small-signal world hides, transient reveals.
The catch is the time step. SPICE cannot solve every instant — it samples time at discrete points, drawing straight lines between them, much like the sampling rung's dots on a wave. Steps too coarse and a fast edge or a brief glitch slips between samples unseen; steps too fine and the run crawls. Modern simulators adapt the step automatically, shrinking it where the action is fast and stretching it where things are calm, but you can cap the maximum step when you need to be sure a sharp feature is caught. When a transient run stalls or refuses to finish, the trouble is usually numerical — convergence and step size — which is the whole subject of this rung's final guide.
- Decide the time window: long enough to see what you care about. To watch a 1 kHz wave settle, a few milliseconds (several cycles) is plenty; to catch power-up behaviour, start from t = 0.
- Choose initial conditions: let SPICE solve the operating point first (the default), or force a starting state with .ic when you want to study how the circuit reaches steady state from a known start.
- Run and read: plot node voltages and branch currents over time, just as you would place oscilloscope probes — overlay input and output to see gain, delay, and clipping at a glance.
- Refine: if an edge looks suspiciously smooth or a fast event is missing, tighten the maximum time step and run again; if it crawls, loosen it. Trust the shape only once it stops changing as you refine.
Beyond the big three — and the honest limits
Three more analyses round out the bench, worth knowing by name now and reaching for later. Noise analysis adds up the thermal and other noise each component contributes and reports the total at your output — invaluable for low-level sensor front-ends. A parameter sweep re-runs any analysis while stepping a component value, so you can watch a Bode curve march as you vary a resistor and pick the best one. Monte-Carlo analysis goes further: it runs the circuit hundreds of times with every component randomly jittered within its tolerance, showing the spread of outcomes a real production run would give — the difference between a design that works on your bench and one that works on ten thousand benches.
Finally, the honesty that makes simulation trustworthy: a result is only ever as good as the model behind it, and even a perfect model cannot see your board. A simulation knows nothing of the stray capacitance between two crowded traces, the inductance of a long ground return, the heat that drifts a part's value, or the antenna your wiring quietly became. Those parasitics live in the layout, not the netlist. So treat every analysis here as a cheap, fast way to catch blunders and explore ideas — a transfer curve that clips early, a loop with too little phase margin — and then go build the thing and measure it. The device models that feed all this are the next guide; making a stubborn run actually converge is the last.