Skip to content

Simulation Types

LTspice supports six simulation types. Each one solves a different question about your circuit --- time-domain behavior, frequency response, DC characteristics, bias conditions, noise performance, or small-signal transfer function. This page covers what each type computes, its SPICE directive syntax, when to reach for it, and which mcltspice tools process its output.

TypeDirectiveIndependent variablePrimary mcltspice tools
.tran.tran 0 10m 0 1uTimeget_waveform, analyze_waveform, analyze_power
.ac.ac dec 100 1 1megFrequencyget_waveform, measure_bandwidth, analyze_stability
.dc.dc V1 0 5 0.1Swept source valueget_waveform
.op.opNone (single point)get_operating_point
.tf.tf V(out) V1None (single point)get_transfer_function
.noise.noise V(out) V1 dec 100 1 1megFrequencyanalyze_noise, get_spot_noise, get_total_noise

What it computes: The circuit’s behavior over time, solving the full nonlinear differential equations at each time step. Voltages and currents are recorded as functions of time.

Directive syntax:

.tran <Tstep> <Tstop> [Tstart] [Tmaxstep] [options]
  • Tstep — Suggested output time step (LTspice may use smaller internal steps)
  • Tstop — End time of the simulation
  • Tstart — When to start saving data (default: 0)
  • Tmaxstep — Maximum internal time step (controls accuracy)

Examples:

.tran 10m ; Run for 10ms, auto timestep
.tran 0 10m 0 1u ; 10ms, max 1us steps
.tran 0 1 0 10u startup ; 1 second, include startup transients

When to use it:

  • Oscillator startup and steady-state waveforms
  • Step response and settling time
  • Switching converter operation (duty cycle, ripple)
  • Any circuit where time-domain behavior matters

mcltspice tools for .tran data:

  • get_waveform — Extract voltage/current traces vs. time
  • analyze_waveform — Compute RMS, peak-to-peak, rise time, settling time, FFT, THD
  • analyze_power — Power dissipation and efficiency from V(t) and I(t) products
  • plot_waveform — Generate time-domain SVG plots

What it computes: The small-signal frequency response. LTspice linearizes the circuit around its DC operating point, then sweeps frequency and computes the complex transfer function. Results are complex-valued: magnitude and phase at each frequency point.

Directive syntax:

.ac <variation> <Npoints> <Fstart> <Fstop>
  • variationdec (points per decade), oct (per octave), or lin (linear)
  • Npoints — Number of points per decade/octave, or total for linear
  • Fstart — Starting frequency (Hz)
  • Fstop — Ending frequency (Hz)

Examples:

.ac dec 100 1 1meg ; 100 pts/decade, 1 Hz to 1 MHz
.ac dec 50 10 10G ; 50 pts/decade, 10 Hz to 10 GHz
.ac lin 1000 1k 100k ; 1000 linear points, 1 kHz to 100 kHz

When to use it:

  • Filter design (frequency response, cutoff, rolloff)
  • Amplifier bandwidth and gain
  • Stability analysis (loop gain, gain and phase margins)
  • Impedance vs. frequency

mcltspice tools for .ac data:

  • get_waveform — Returns magnitude (dB) and phase (degrees) vs. frequency
  • measure_bandwidth — Finds the -3dB cutoff frequency
  • analyze_stability — Computes gain margin and phase margin from loop gain
  • plot_waveform — Generates Bode plots (magnitude + phase)

What it computes: The DC operating point of the circuit at each value of a swept source. The independent variable is the source value (voltage or current), and the dependent variables are node voltages and branch currents at each sweep step.

Directive syntax:

.dc <Source1> <Start1> <Stop1> <Step1> [Source2 Start2 Stop2 Step2]

A second source can be swept as a nested loop for 2D parameter exploration.

Examples:

.dc V1 0 5 0.1 ; Sweep V1 from 0 to 5V in 0.1V steps
.dc I1 0 10m 100u ; Sweep I1 from 0 to 10mA in 100uA steps
.dc V1 0 5 0.1 V2 0 3 1 ; 2D sweep: V1 and V2

When to use it:

  • Transfer characteristics (Vout vs. Vin)
  • I-V curves of transistors and diodes
  • Voltage regulator load/line regulation
  • Finding threshold voltages

mcltspice tools for .dc data:

  • get_waveform — Extract output voltage/current vs. swept source value

What it computes: A single DC operating point. LTspice solves the circuit with all capacitors open and all inductors shorted, finding the steady-state DC voltages and currents. No sweep, no time variation --- just one set of numbers.

Directive syntax:

.op

No parameters. The result is a single snapshot of every node voltage and branch current.

When to use it:

  • Verifying bias conditions before running .ac or .tran
  • Checking quiescent power dissipation
  • Debugging: confirming that DC voltages are where you expect

mcltspice tools for .op data:

  • get_operating_point — Returns all node voltages and branch currents as a flat dictionary

What it computes: The small-signal DC transfer function: voltage gain (or transconductance), input resistance, and output resistance. This is a single-point linearization at DC --- no frequency sweep.

Directive syntax:

.tf <output> <input_source>
  • output — An output voltage expression, e.g. V(out) or V(out, in)
  • input_source — The input source name, e.g. V1 or I1

Examples:

.tf V(out) V1 ; Voltage gain from V1 to V(out)
.tf I(R_load) V1 ; Transconductance

When to use it:

  • Quick gain check without running a full AC sweep
  • Input and output impedance measurement
  • Verifying amplifier topology before detailed analysis

mcltspice tools for .tf data:

  • get_transfer_function — Returns gain, input resistance, and output resistance

What it computes: The noise spectral density at an output node, referred to an input source. LTspice computes the noise contribution of every component (resistor thermal noise, transistor shot noise, 1/f noise) and sums them. The result is noise voltage (or current) spectral density in V/sqrt(Hz) at each frequency point.

Directive syntax:

.noise V(<output>) <input_source> <variation> <Npoints> <Fstart> <Fstop>

The frequency sweep parameters follow the same format as .ac.

Examples:

.noise V(out) V1 dec 100 1 1meg ; Noise at V(out), referred to V1
.noise V(out,inn) V1 dec 50 10 100k ; Differential output noise

When to use it:

  • Amplifier noise floor characterization
  • Noise figure calculation
  • Identifying dominant noise sources (1/f corner frequency)
  • Signal-to-noise ratio estimation

mcltspice tools for .noise data:

  • analyze_noise — Full noise analysis: spectral density, RMS, noise figure, 1/f corner, per-component breakdown
  • get_spot_noise — Noise spectral density at a single frequency
  • get_total_noise — Integrated RMS noise over a frequency band

A practical decision tree:

  • “What does the output look like over time?” --- Use .tran
  • “What is the frequency response?” --- Use .ac
  • “How does the output change as I vary an input?” --- Use .dc
  • “Are the DC bias voltages correct?” --- Use .op
  • “What is the gain and impedance at DC?” --- Use .tf
  • “What is the noise floor?” --- Use .noise

For a thorough characterization, run them in this order: .op first (verify bias), then .tf (quick gain check), then .ac (full frequency response), then .tran (time-domain behavior), and .noise if noise matters. Each analysis builds confidence that the circuit is behaving correctly before moving to the next.