Tutorial: Multi-dimensional Stepping

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.

image

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

Not sure that I understand the subject as LTSpice allows for 3 steppings and I believe that Qspice does the same. Normally, it’s even possible to proceed to interdependent steppings. Could you explain the particular interest of the method exposed here? Thanks.

Microcap Quote:
Multivariate Analysis (Stepping)
All three types of Transient, AC and DC analysis provide the ability to perform multivariate analysis of circuit characteristics. The Stepping dialog box, which has 20 tabs and allows you to set variations from one to twenty circuit parameters, can be called either from the Simulation Parameters window or by clicking on the icon

@bordodynov ,

As I indicated, I was not aware of any other tool providing multi-dimensional step sims.

You have made me aware of “MicroCap”. Thank you.

Len

@astas ,

When I tried to simulation a three parameter step in LTSpice, it returned an error indicating that a single stepped parameter was allowed.

If this is not true, it might be a setting within LTSpice that was not set.

Blockquote Normally, it’s even possible to proceed to interdependent steppings.

How does one create ‘interdependent’ steppings?

Blockquote Could you explain the particular interest of the method exposed here?

The goal of this tutorial is to show others the value of multi-dimensional (parameter) stepping to perform efficient “what-if” design experiments quickly. I’ve have found this to be a great help in my designs to prove and improve existing designs. It also helps to validate designs where there may be significant tolerances in the components.

Len

@astas ,

I’ve tried a 2-dimensional step sim in LTSpice. It worked. Hummm … I wonder why I received the error message previously?

Len

@lpoma
With the 3 sweeps, you can change a lot of other parameters values: example
.step param R1 1 10 1
.step param R2 1 10 1
.step Param R3 list 10 100
.param VAR1 = R1*R2
.param VAR2= exp(R1/R2) etc etc
Please read the book dedicated to LTspice by GILLES BROCARD (there are french/english/german editions)

@astas ,

I am aware of the method you shown in your example.

Len