This posting is a tutorial highlighting the advantages of using QSpice’s multi-dimensional stepping features.

I personally don’t know if other Spice simulators allow for more than one-dimension of stepping. I do know that LTSpice only allows one-dimensional stepping.

**Advantages of the Stepping Feature**

I’ve found the ability to performing stepping to be highly advantageous to my designs. I’ve used it for years. I use it to allow the simulations to “brute-force” calculate the desired data for post-analysis. I can then visually see the results and downstream effects.

For those who have not used this feature, it allows you to take a parameter and perform “what-if” simulations. You can then substitute this stepped parameter in place of a component value (such as the resistance) to run multiple simulations using each step you define.

You can then gather the data generated with each step and determine which step value or values provide the best results for your design.

I believe one of QSpice’s many virtues is that you can define more than one parameter to step through. For example, in an RC tau calculation, varying either component the R and the C can achieve different tau results but also the group delay and output impedances. By stepping both the R and the C values, you can generate multiple simulations under each combination, gather other specifics from the sims and determine which combination of R and C give the best results.

Here’s a simple schematic to try.

As seen by the simulation stepping statements, it is a two-dimensional stepping sim. In this case, each parameter is stepped 4 times. Therefore the combination of steps generated is 4x4 = 16.

The plotting results are shown here with all the steps plotted. If you want to select one or more steps to plot, you can use the “Simulation Step Tool” [F6] on the plot window to select individual steps.

**Disadvantages of the Stepping Feature**

I should highlight the potential disadvantages of the stepping to account out for.

A step executed is a full simulation run. Therefore the data gathered into the .qraw is in essence multiplied by the number of steps.

To give to an extreme example: I ran very complicated simulation that I computed 30,000+ steps. Each sim ran for a .tran of 10 seconds with a MAXSTEP of 1ms. The .qraw generated was 30G+ large. This is quite a bit of data to collect. Most simulations don’t generate that much data.

The second issue is with measurement statements. All .meas calculations are post-processed after collecting the data in the .qraw file. Each separate .meas statement is processed one-at-a-time. If the .qraw file is large (like in my extreme example), it will take longer to parse through this file for each step.

In my extreme example, it took about 20 mins to run all the steps. However it was computed to take over 24 hours to gather the data for the 3 .meas statements I requested.

**Summary**

Wise use of stepping can be very advantageous to validating or debugging a design.

Len