Circuit Simulation with SPICE

the DC sweep

Suppose you want to know not just one resting state but how a circuit's output changes as you slowly turn a knob, say sweeping an input from 0 V up to 5 V. The DC sweep does exactly that: it solves the operating point again and again, once for each value of the swept input, and plots output versus input.

The command names a source and a range, for example '.dc Vin 0 5 0.01' sweeps Vin from 0 to 5 volts in 0.01 volt steps, recomputing the whole circuit at each step. The classic result is the transfer curve: feed a diode's voltage and plot its current to draw the diode I-V curve; sweep an amplifier's input to find where it goes flat (clips) against the supply rails; sweep a logic gate's input to see the sharp switching threshold. Everything is steady-state DC, time plays no role, you are mapping out a static input-to-output relationship.

A DC sweep is the natural tool for finding a circuit's useful range and its limits, the input window where an amplifier stays linear, or the exact trip point of a comparator. Because each point is a full operating-point solve, a circuit that has convergence trouble at one bias may stall partway through a sweep, a useful hint about where the design is marginal.

Sweeping the input of a common-emitter amplifier from 0 to 5 V draws an S-shaped curve: flat near 0 V (transistor off), a steep nearly straight middle region (the useful gain), and flat again near the top rail (saturated). The straight part is the only place the amplifier works as intended.

Output versus a slowly varied DC input: the transfer curve that reveals range, gain, and clipping.

A DC sweep ignores time entirely, so it cannot show charging delays or oscillation. It answers what is the steady output for each input, not how fast does it get there.

Also called
DC transfer analysis.dc直流轉移分析