Parameter Sweep

Old Content - visit altium.com/documentation

Description

The Parameter Sweep feature allows you to sweep the value of a device in defined increments, over a specified range. The Simulator performs multiple passes of any of the standard analyses that are enabled (AC, DC Sweep, Operating Point, Transient, Transfer Function, Noise).

The Parameter Sweep can vary basic components and models - subcircuit data is not varied during the analysis. You can also define a Secondary parameter to be swept. When a Secondary parameter is defined the Primary parameter is swept for each value of the Secondary parameter.

Setup

Parameter Sweep is set up on the Parameter Sweep Setup page of the Analyses Setup dialog (after the dialog appears, click the Parameter Sweep entry in the Analyses/Options list). An example setup for this feature is shown in the image below:

Parameters

  • Primary Sweep Variable - the device or parameter in the circuit whose value you wish to have swept. All possible variables that can be swept in the circuit are automatically loaded into a convenient drop-down list, from which to choose.
  • Primary Start Value - the initial value for the Primary Sweep Variable.
  • Primary Stop Value - the final value in the required sweep range for the Primary Sweep Variable.
  • Primary Step Value - the incremental step to be used in determining the sweep values across the defined sweep range.
  • Primary Sweep Type - set to Absolute Values to step through the defined sweep range exactly as entered (from Primary Start Value to Primary Stop Value) and thereby obtain a set of progressive, absolute values for the parameter. Set to Relative Values to add the values of the sweep range to the default value of the device or parameter, thereby creating a relative set of values for the parameter. For example, consider a parameter sweep defined as follows:

Primary Sweep Variable = 10k resistor
Primary Start, Stop and Step values are 5k, 15k an 5k respectively

  • With the Primary Sweep Type set to Absolute Values, the resulting resistor values would be used in the simulation passes:

5k, 10k, 15k

If Relative Values is chosen instead, the resulting values used would be:

15k, 20k, 25k

  • Enable Secondary - enables the use of a secondary parameter variable in the sweep. In this case, the Primary Sweep Variable is swept for each value of the secondary.
  • Secondary Sweep Variable - the device or parameter in the circuit whose value you wish to have swept and used as a control to sweeping the Primary Sweep Variable. All possible variables that can be swept in the circuit are automatically loaded into a convenient drop-down list, from which to choose.
  • Secondary Start Value - the initial value for the Secondary Sweep Variable.
  • Secondary Stop Value - the final value in the required sweep range for the Secondary Sweep Variable.
  • Secondary Step Value - the incremental step to be used in determining the sweep values across the defined sweep range.
  • Secondary Sweep Type - as per Primary Sweep Type above, but applied to the generation of values to be used for the Secondary Sweep Variable.

Notes

At least one of the standard analysis types (AC, DC Sweep, Operating Point, Transient, Transfer Function, Noise) must be enabled in order to perform a Parameter Sweep analysis.

The parameter to be swept can be a single designation or a designation with a device parameter in brackets. The following are some valid examples:

  • RF - Resistor with designation RF
  • Q3[bf] - Beta forward on transistor Q3
  • R3[r] - Resistance of potentiometer R3
  • option[temp] - Temperature
  • U5[tp_val] - Propagation delays of digital device U5

Data is saved for all signals in the Available Signals list, on the General Setup page of the Analyses Setup dialog.

Running a Parameter Sweep can result in a large amount of data being calculated. To limit the amount of data calculated, you can set the Collect Data For option on the General Setup page of the Analyses Setup dialog to Active Signals. With this option, data is only calculated for variables currently listed in the Active Signals list.

Normally you would use a Temperature Sweep to vary the temperature for simulation. However, temperature can also be varied in the Parameter Sweep. This is useful if you want to vary the temperature as either the primary or secondary parameter in a two-parameter sweep.

As running a Parameter Sweep actually performs multiple passes of the analysis (varying one or more circuit parameters with each pass), there is a special identifier used when displaying the waveforms in the Sim Data Editor's Waveform Analysis window. Each pass is identified by adding a letter and number as a suffix to the waveform name. For a Parameter Sweep, the letter used is p and the number used identifies which pass the waveform relates to (e.g. Output_p1, Output_p2, etc). When you click on a waveform name in the Waveform Analysis window, the values used for the parameters in that pass of the sweep are displayed - both next to the wave plot and in the Status bar.

Examples

Consider the circuit in the image above, where AC Small Signal and Transient analyses are to be performed in conjunction with the use of the Parameter Sweep feature.

The Transient analysis is defined with the following parameter values:

  • Transient Start Time = 0.000
  • Transient Stop Time = 500.0u
  • Transient Step Time = 2.000u
  • Transient Max Step Time = 2.000u

The AC Small Signal analysis is defined with the following parameter values:

  • Start Frequency = 1.000
  • Stop Frequency = 1.000meg
  • Sweep Type = Decade
  • Test Points = 100
  • Total Test Points = 601

The Parameter Sweep is defined with the following parameter values:

  • Primary Sweep Variable = RF[resistance]
  • Primary Start Value = 50.00k
  • Primary Stop Value = 150.0k
  • Primary Step Value = 50.00k
  • Primary Sweep Type = Absolute Values
  • Secondary Sweep Variable = RI[resistance]
  • Secondary Start Value = 5.000k
  • Secondary Stop Value = 15.00k
  • Secondary Step Value = 5.000k
  • Secondary Sweep Type = Absolute Values

The entry in the SPICE netlist will be:

*Selected Circuit Analyses:
.AC DEC 100 1 1E6
.TRAN 2E-6 0.0005 0 2E-6
.CONTROL
SWEEP RF[resistance] 5E4 1.5E5 5E4 RI[resistance] 5000 1.5E4 5000
.ENDC

There are three values of the primary parameter that will be swept for each of the three values of the secondary. Therefore there will be nine waveforms in all generated by the sweep:

  • output_p1
  • output_p2
  • output_p3
  • output_p4
  • output_p5
  • output_p6
  • output_p7
  • output_p8
  • output_p9

The default value waveform (out) will also be generated for comparison. Hence, running the simulation will yield the output waveforms shown in the following images:

AC Small Signal Analysis

Transient Analysis

 

You are reporting an issue with the following selected text and/or image within the active document: