Multi-step Analyses

The analysis modes, Transient, AC, DC, Noise and Transfer Function can be setup to automatically repeat while varying any number of circuit conditions or parameters.

Multi-step analyses can be setup with one or more levels. In each level a single item is stepped such as a parameter, temperature or Monte Carlo trial. In the full analysis all combinations of every level are presented so the number of steps executed in total is the product of the number of steps in each level.

For example, a three-level analysis could conduct a 100 step Monte Carlo analysis at the lowest level with five values of a parameter at the next level. Finally at the top level three different temperatures are listed. In total 100 x 5 x 3 = 1500 steps are run. With Pro or Elite these can be split across multiple cores.

Multi-step analyses are defined using the sweep modes shown below. Note that Monte Carlo analysis is the subject of a whole chapter see Monte Carlo Analysis.

  • Device. Steps the principal value of a device. E.g. the resistance of a resistor, voltage of a voltage source etc. The part reference of the device must be specified.
  • Model parameter. Steps the value of a single model parameter. The name of the model and the parameter name must be specified.
  • Temperature. Steps global circuit temperature.
  • Parameter. Steps a parameter that may be referenced in an expression.
  • Frequency. Steps global frequency for AC, Noise and Transfer Function analyses.
  • Monte Carlo. Repeats run a specified number of times with tolerances enabled.

The above modes may be used for multiple levels, but note that each of Temperature, Frequency and Monte Carlo may only be used once.

In addition to the above modes, the following modes may be specified alone:

In this topic:

Setting up a Multi-step Analysis

Define Transient, AC, DC, Noise or Transfer Function as required then check Enable Multi-step and press Define... button. This will show the following dialog box:

The analysis is defined by entries in the Definitions table with each row in the table representing a single level. So, with two rows there are two levels, three rows three levels etc.

The above shows a single level defining a Monte Carlo analysis. To add more levels, click on the Add button. New levels will be added at the top of the list but the up and down arrow buttons can be used re-order the levels.

To setup the analysis select the entries for each column in the table where applicable. Only the entries required will be enabled. The following describes each column.

Mode

Choice of mode as described above. Frequency mode will not be available in transient analysis. Monte Carlo and Sensitivity/Worst-case are described in Monte Carlo, Sensitivity and Worst-case.

Device/Model

Used for Model Parameter and Device modes. For Device mode enter the component reference for the device being stepped. For example, V1 or R2. The principle value of the device will be varied, i.e. the voltage of a voltage source or the resistance of a resistor. For Model Parameter mode, enter the name of the model. This is the name immediately after .MODEL in the .MODEL statement. Note that models defined by subcircuits may not be stepped using this mode.

Parameter

Used for Parameter and Model Parameter modes. For Parameter mode enter the name of the parameter being stepped. The parameter may be used anywhere where a .PARAM defined parameter may be used. For Model Parameter mode enter the name of the parameter within the .MODEL statement that is being stepped.

Step Type

Applicable to Parameter, Device, Model Parameter, Temperature and Frequency modes. Three step types are available:

Linear Varies stepped value in a linear fashion with start, stop and number of steps defined
Decade Varies stepped value in a logarithmic fashion with start, stop and number of steps per decade defined
List Varies stepped value following a defined list of values

Start Value/Stop Value

Defines the first and last values for a linear or decade step type.

Num. Steps

For Linear step type, defines the total number of steps to be executed. For Decade step type, defines the number of steps per decade. Also used to define the number of steps in a Monte Carlo analysis

List

For List step type, enter the values to be stepped separated by commas.

Plot Options

This setting controls how fixed probes and optionally, random probes, organise graphs and curves. With multiple parameters being stepped, there is a possibility of hundreds, even thousands of curves being plotted as a result of a multi-step analysis. The Plot Options define whether they are grouped together on a single graph sheet, plotted singly on a single graph, plotted on multiple graph sheets, or some combination of these options.

There are three options that can be set for each level in the multi-step analysis.

Single curve group assembles all curves into a single group
Multi curve group curves are independent in a single graph sheet
Multi graph curves placed on their own graph sheet

The different options interact with lower levels in the multi-step hierarchy and not all combinations are legal. To explain, consider this two level example:

  • The top level sweeps a parameter with 5 steps
  • The second level sweeps a device with 50 steps

In all there are 250 separate steps which would create 250 curves for a normal fixed probe.

With three options for each level there would be 9 different combinations although three of those combinations are not allowed. The following table describes the behaviour of each of the combinations:

Top level Second level Action

Single curve group
Single curve group All 250 curves assembled into a single group in one graph sheet
Single curve group Multi curve group Not permitted
Single curve group Multi graph Not permitted

Multi curve group
Single curve group 5 curve group of 50 curves each on a single graph
Multi curve group Multi curve group 250 individual curves in a single graph
Multi curve group Multi graph Not permitted
Multi graph Single curve group 5 graphs each with a single 50 curve group
Multi graph Multi curve group 5 graphs each with 50 separate curves
Multi graph Multi graph 250 graphs each with a single curve. In practice this option is likely to be blocked depending on the the Maximum graph count setting. This defaults to 20. The setting is a safety setting to prevent inadvertently creating hundreds of graph sheets which would take a long time to create

Using Multiple Cores for Multi-step Analyses

The work for multi-step analyses can be split between multiple processor cores to speed up the simulation. The maximum number cores that may be used is dependent on your license and on the number of processor cores that your system is equipped with. The speed improvement that can achieved by this method can vary due to a number of factors but is typically of the order of 75% of the core count. E.g. if you have 4 cores, the speedup may be about 3 fold.

Setting up a Multi-core Multi-step Simulation

Set up a multi-step simulation in the normal way but set the Number of Cores edit box to the number of cores you wish to use. You will not be able to set the number of cores to larger than a certain value depending on your system and your license. These values are shown below the number of cores selector.

Running a Multi-core Multi-step Simulation

Run the simulation in the normal way. The simulator status box will show a single entry for each core being used. See below

The above shows the status box showing for a 3-level multi-step analysis using 16 cores. Each line shows the status for each of the 16 processes. The Step column shows the step currently being run for each process with the three levels separated by commas. The first item is the lowest level which in this analysis is a 30 run Monte Carlo. The middle level sweeps a voltage source Vsupply with three listed values of 150, 160 1nd 175V. The top step steps a load resistor R2 with five values from 3 to 20 ohms.

Apart from sending back status information, each of the 16 processes runs completely independently and writes to its own data file. When the run is complete the data from each processes will be linked to the main data file. Subsequently you can plot and analyse the results in exactly the same way as you would a single core run.

Using Fixed Probes with Multi-core Multi-step Simulation

Fixed probes usually plot the simulation results incrementally, that is the plots are updated as the simulation proceeds. With Multi-core Multi-step runs, only the curves created by the primary process are plotted during the run. The remaining curves will be plotted automatically once the run is complete.

Data Handling with Multi-core Multi-step

With multiple processes running in parallel all writing data to a single disk, it is possible in some cases for a disk write bottleneck to develop whereby the simulation appears to hang temporarily. This problem is particularly acute with large circuits where a large number of signals are being saved. Each signal being saved is allocated a buffer in main memory and that buffer is written to disk when it is full. This works well if the buffers are large enough but with large circuits and many cores the buffers will be smaller and the time taken to write them out will become dominated by disk seek times.

It is not easy to predict in a given situation whether the problem will arise. If you are running a medium to large circuit (over 2000 nodes) and are using 8 or more cores you should consider restricting the data saved. See Data Handling and Keeps.

Example 1

Refer to circuit in Plotting Results of Noise Analysis, Example 2. In the previous example we swept the tail current to find the optimum value to minimise noise for a 1K source resistance. Here we extend the example further so that the run is repeated for a range of source resistances. The source resistance is varied by performing a parameter step on sourceR. This example can be found at Examples/SIMetrix/Sweep/Noise_Param_param.sxsch. Here is what the dialog settings are for the multi-step run:

This does a decade sweep varying sourceR from 1K to 100k with 2 steps per decade. This is the result we get:

Example 1 - Performance Analysis

In the above we plotted 5 curves for each run. But we are interested in is the minimum noise so instead of plotting the whole curve we can plot just the minimum value vs the swept parameter. This will give us a plot of minimum noise vs source resistance. This is known as a performance analysis which we can set up using an arbitrary probe:

  1. Select Probe > Create and Place Arbitrary Probe then enter the settings as shown:
  2. Change the analysis settings to start at 100 ohms and 10 steps per decade
  3. This is the result:

In the above, we setup a fixed probe to plot the performance analysis which is usually the most convenient. You can also create a performance analysis plot after the run is complete. For more information see Performance Analysis and Histograms.

Example 1 - Two Levels

We can add a new level to repeat the multi-step run for a range of temperatures:

  1. In the Multi-Step Analysis dialog box click on the Add button. This will add a new row to the table at the top. That is a new level will be created and this will become the outermost level of the multi-level multi-step analysis.
  2. Set the following
    1. Mode to Temperature
    2. Step Type to List
    3. List to -40,0,70,125
  3. Ok both boxes then run simulation

Example 2

The following circuit is a simple model of a full bridge switching amplifier used to deliver a controlled current into an inductance.

Sources V2 and V3 have been defined to be dependent on a parameter named duty which specifies the duty cycle of the switching waveform. See EXAMPLES/BRIDGE/BRIDGE.sxsch.

This was setup to perform a multi step analysis with the parameter duty stepped from 0.1 to 0.9. This is the result: