3.15. Parameter Sweeping

Note

Parameter sweeping is a beta feature and is subject to change.

The M81-SSM provides the ability to configure a high-speed parameter sweep on either AC or DC source amplitude, AC frequency, or AC offset. The source must be set to the appropriate shape for the configured parameter sweep. All source modules configured to sweep will do so synchronously. To set up a source module to sweep, change the source mode from fixed to sweep. Any attached source module can be changed between fixed and sweep mode via the SOURce#:VOLTage:MODE, SOURce#:CURRent:MODE, SOURce#:OFFSet:MODE, or SOURce#:FREQuency:MODE commands.

Sweep Set Up

To set up a parameter sweep, define the span, duration, and number of points.

../_images/sweeping_setup.png

Figure 3.36 Sweeping settings

Span

The span is the difference between the start and stop values. Configure the span by setting both the start and stop voltage or the start and stop current of the sweep. When setting the span, it is possible to set the stop value lower than the start value. This will result in a sweep that decreases in value.

Note

The term “span” may be used elsewhere for the sake of explaining calculations.

Duration

Duration is the length of the parameter sweep. The duration of the parameter sweep can be set in two separate ways. Setting the dwell time will directly affect the overall run time of the sweep by setting the duration of each step in the sweep.

Note

Dwell times are restricted to multiples of 200 µs per step, and must be a minimum of 200 µs.

When a dwell time is set to a value that is invalid the instrument will adjust to the nearest valid value. For example, 0.0006 s is a valid dwell time. However, 0.0005 s is invalid, and the instrument will apply the dwell time of 0.0006 s, which can be seen with the relevant query.

It is also possible to set the overall duration of the parameter sweep, allowing the instrument to calculate the closest dwell time to achieve the desired duration.

Note

The overall time is bound by the same rules as dwell time.

Dwell time is calculated using the following formula: \(DWELl=TIME/POINts\)

Points

The number of points defined in the stepped sweep. A higher value will create higher granularity in the span of the sweep, but will increase the total duration of the parameter sweep. Setting the number of points also directly affects the step size.

Setting the step size of the sweep will set the number of points according to the following formula: \(STEP=SPAN/(POINts-1)\)

Note

The number of points specified should include the ending value.

For example, if the desired sweep is 0 V to 10 V with a step size of 1 V, the number of points should be 12.

The number of points can be set up to a maximum of 100,001 points, with a minimum of 2 points.

Note

Step cannot be set when using logarithmic spacing.

Direction

The direction of the sweep controls whether the instrument sweeps up or down. While sweeping up, the sweep will begin at the start value and end at the stop value. When sweeping down, the sweep will begin at the stop value and end at the start value.

When round-trip sweeping is enabled the instrument will begin and end at the same value. The instrument will repeat the middle value and double the number of points. For example, a sweep with a start value of 1, a stop value of 5, and 5 points would have output values such as:

Direction: UP

Direction: DOWN

1

5

2

4

3

3

4

2

5

1

5

1

4

2

3

3

2

4

1

5

Linear and logarithmic sweeps

The sweep steps may be linearly or logarithmically spaced. For example, a sweep with a start value of 1, a stop value of 10, and 10 points would have output values like so:

Linear spacing

Logarithmic spacing

1

1

2

1.291549665

3

1.668100537

4

2.15443469

5

2.782559402

6

3.593813664

7

4.641588834

8

5.994842503

9

7.742636827

10

10

Logarithmic sweeps are useful when sweeping values over multiple orders of magnitude.

Note

Logarithmic sweeps cannot include zero.

Interface Commands:

Initiating the Sweep

By default, data sweeping is closely tied to data stream to allow for easy collection of data during parameter sweeps. To disable this behavior, use the SWEep:INITiate:TRACe[:STATe] command. After all of the sweep parameters have been configured, configure a data stream to capture relevant data. Once the data stream has been configured, calling TRACe:STARt will start data streaming collection and simultaneously initiate any configured parameter sweeps.

To initiate a sweep without a data stream, use the SWEep:INITiate command. Any configured sweeps will be initiated immediately. This command initiates the sweep regardless of the state set by SWEep:INITiate:TRACe[:STATe]. Initiating a sweep without a data stream is useful when ramping the output from one value to another to minimize discontinuities.

Parameter Sweep Status

To determine whether a parameter sweep is in progress, use the following query: SOURce#:SWEep[:STATus]?

Aborting a Sweep

To abort all sweeps in progress use the command SWEep:ABORt. Aborting leaves the output enabled and applied at the last sweep point. The following actions will also cause a sweep in progress to abort:

  • Changing any setting on a source module while it is sweeping.

  • Resetting a data stream in progress

Example Parameter Sweep and Data Stream

The following example illustrates how to configure a current parameter sweep on the first source channel and read the resulting measured voltage on the first measure channel.

Set the source module to a linear sweep.

SOURce1:SWEep:SPACing LINear
SOURce1:CURRent:MODE SWEep

Set the span of the sweep to start at 25 mA and end at 100 mA.

SOURce1:CURRent:STARt 0.025
SOURce1:CURRent:STOP 0.100

Set the dwell time to 5 ms per step.

SOURce1:SWEep:DWELl 0.005

Set the number of points to 100, which is equivalent to step size of 75 µA.

SOURce1:SWEep:POINts 100

Configure and start the data stream and to begin the sweep and collect the data. Set the data stream to provide information in a comma-separated format. Set the data stream to provide the source channel 1 amplitude, measure channel 1 DC measurement, and measure channel 1 settling status. Set the data stream rate to 200 points per second to match the 5 ms dwell time.

TRACe:RESet
TRACe:FORMat:ENCOding CSV
TRACe:FORMat:ELEMents SAMP,1,MDC,1,MSET,1
TRACe:RATE 200
TRACe:STARt 100