CloudAlls Academy

Parameters, steps and measurements

Automate design exploration with .param, .step and .meas.

Instead of editing values by hand and re-running, let LTspice sweep them and report results. Three directives do the job.

  1. .param name=value defines a variable you can use in braces, such as {Rval}.
  2. .step param name start stop increment (or list values) re-runs the whole simulation for each value.
  3. .meas computes numbers such as maximum, rise time or the value at a given time, and prints them in the log.
  1. Set the resistor value to {Rval} (with braces).
  2. Run: you get four overlaid curves, one for each resistance.
  3. Open View > SPICE Error Log. It lists vmax and t63 for every step.
  4. Use right-click in the log > Plot .step'ed .meas data to graph a measurement against the stepped value.

Combine .step with .ac to see how component values move the cutoff frequency of a filter.

Next lesson: Capstone: design a filter to a spec