LTspice: Using the .STEP Command to Perform Repeated Analysis

There are two ways to examine a circuit in LTspice by changing the value for a particular parameter: you can either manually enter each value and then simulate the circuit to view the response, or use the .step command to sweep across a range of values in a single simulation run.

The .step command causes an analysis to be repeatedly performed while stepping through a model parameter, global parameter or independent source. Here is an example waveform response of an RC circuit, for which the capacitance is stepped through three values.

To implement this in LTspice, perform the following steps:

  1. Define the component parameter with a variable by editing the component attribute (Ctrl–right-click on the component) and entering “{X}” for the Value, where “X” is a user defined variable name. The addition of the curly braces around the variable is important as it tells LTspice IV that “X” is a parameter.
  2. Add a .step command via a SPICE directive that specifies the steps for the parameter by a linear, logarithmic or list of values.
    Example A: “.step param X list .1u .2u .3u” steps the parameter X through each value listed.
    Example B: “.step param X .1u .3u .1u” steps the parameter X from 0.1u to 0.3u in 0.1u increments.

Figure 1. LTspice IV: Using the .STEP Command to Perform Repeated Analysis.

Once you run and view your simulation results in the waveform pane you can review the step information of a particular trace by attaching a cursor (click onto the trace label), using the up and down arrow keys to navigate the steps and then right-clicking onto the cursor to view the step information.

For more information on how to use the .step command to improve your understanding of a schematic, review the Help Topics in LTspice IV.



Gabino Alonso

Gabino Alonso is currently the director of strategic marketing for the Power by Linear™ Group. Prior to joining ADI, Gabino held various positions in marketing, engineering, operations, and education at Linear Technology, Texas Instruments, and California Polytechnic State University. He holds a Master of Science degree in electrical and computer engineering from University of California, Santa Barbara.