Skip to content

Sweeper Module

The Sweeper Module allows the user to perform sweeps as in the Sweeper Tab of the LabOne User Interface. In general, the Sweeper can be used to obtain data when measuring a DUT's response to varying (or sweeping) one instrument setting while other instrument settings are kept constant.

Configuring the Sweeper

In this section we briefly describe how to configure the Sweeper Module. See the node documentation for a full list of the Sweeper's parameters and description of the Sweeper's outputs.

Specifying the Instrument Setting to Sweep

The Sweeper's gridnode parameter, the so-called sweep parameter, specifies the instrument's setting to be swept, specified as a path to an instrument's node.

This is typically an oscillator frequency in a Frequency Response Analyzer, e.g., /DEV2345/OSCS/0/FREQ, but a wide range of instrument settings can be chosen, such as a signal output amplitude or a PID controller's setpoint.

Specifying the Range of Values for the Sweep Parameter

The Sweeper will change the sweep parameter's value samplecount times within the range of values specified by start and stop. The xmapping parameter specifies whether the spacing between two sequential values in the range is linear (=0) or logarithmic (=1).

Controlling the Scan mode: The Selection of Range Values

The scan parameter defines the order that the values in the specified range are written to the sweep parameter. In sequential scan mode (=0), the sweep parameter's values change incrementally from smaller to larger values. In order to scan the sweep parameter's in the opposite direction, i.e., from larger to smaller values, reverse scan mode (=3) can be used.

In binary scan mode (=1) the first sweep parameter's value is taken as the value in the middle of the range, then the range is split into two halves and the next two values for the sweeper parameter are the values in the middle of those halves. This process continues until all the values in the range were assigned to the sweeper parameter. Binary scan mode ensures that the sweep parameter uses values from the entire range near the beginning of a measurement, which allows the user to get feedback quickly about the measurement's entire range.

In bidirectional scan mode (=2) the sweeper parameter's values are first set from smaller to larger values as in sequential mode, but are then set in reverse order from larger to smaller values. This allows for effects in the sweep parameter to be observed that depend on the order of changes in the sweep parameter's values.

Controlling how the Sweeper sets the Demodulator's Time Constant

The bandwidthcontrol parameter specifies which demodulator filter bandwidth (equivalently time constant) the Sweeper should set for the current measurement point. The user can either specify the bandwidth manually (=0), in which case the value of the current demodulator filter's bandwidth is simply used for all measurement points; specify a fixed bandwidth (=1), specified by bandwidth, for all measurement points; or specify that the Sweeper sets the demodulator's bandwidth automatically (=2). Note, to use either Fixed or Manual mode, bandwidth must be set to a value > 0 (even though in manual mode it is ignored).

Specifying the Sweeper's Settling Time

For each change in the sweep parameter that takes effect on the instrument the Sweeper waits before recording measurement data in order to allow the measured signal to settle. This behavior is configured by two parameters in the settling/ branch: settling/time and settling/inaccuracy.

The settling/time parameter specifies the minimum time in seconds to wait before recording measurement data for that sweep point. This can be used to specify to the settling time required by the user's experimental setup before measuring the response in their system.

The settling/inaccuracy parameter is used to derive the settling time to allow for the lock-in amplifier's demodulator filter response to settle following a change of value in the sweep parameter. More precisely, the settling/inaccuracy parameter specifies the amount of settling time as the time required to attain the specified remaining proportion [1e-13, 0.1] of an incoming step function. Based upon the value of settling/inaccuracy and the demodulator filter order, the number of demodulator filter time constants to wait is calculated and written to settling/tc (upon calling the module's execute() command) which can then be read back by the user. See <> for recommended values of settling/inaccuracy. The relationship between settling/inaccuracy and settling/tc is the following:

settling/inaccuracy - settling/tc relationship
Figure 1: settling/inaccuracy - settling/tc relationship

The actual amount of time the Sweeper Module will wait after setting a new sweep parameter value before recording measurement data is defined in Equation 1. For a frequency sweep, the settling/inaccuracy parameter will tend to influence the settling time at lower frequencies, whereas settling/time will tend to influence the settling time at higher frequencies.

The settling time t~s~ used by the Sweeper for each measurement point; the amount of time between setting the sweep parameter and recording measurement data is determined by the settling/tc and settling/time (see Equation 1).

$$ \begin{equation}\tag{1} t_s = \text{max}{\text{tc} \times (\text{settling/tc}), (\text{settling/time})} \end{equation} $$

Note

Note, although it is recommended to use settling/inaccuracy, it is still possible to set the settling time via settling/tc instead of settling/inaccuracy (the parameter applied will be simply the last one that is set by the user).

Specifying which Data to Measure

Which measurement data is actually returned by the Sweeper's read command is configured by subscribing to node paths using the Sweeper Module's subscribe command.

Specifying how the Measurement Data is Averaged

One Sweeper measurement point is obtained by averaging recorded data which is configured via the parameters in the averaging/ branch.

The averaging/tc parameter specifies the minimum time window in factors of demodulator filter time constants during which samples will be recorded in order to average for one returned sweeper measurement point. The averaging/sample parameter specifies the minimum number of data samples that should be recorded and used for the average. The Sweeper takes both these settings into account for the measurement point's average according to Equation 2.

The number of samples N used to average one sweeper measurement point is determined by the parameters averaging/time, averaging/tc, and averaging/sample as well as the rate of data transfer from the instrument to the data server (see Equation 2).

$$ \begin{equation}\tag{2} N = \text{max}{\text{tc} \times \text{(averaging/tc)} \times \text{rate}, \text{(averaging/time)} \times \text{rate}, (\text{averaging/sample})} \end{equation} $$

Note

Note, the value of the demodulator filter's time constant may be controlled by the Sweeper depending on the value of bandwidthcontrol and bandwidth, see the respective section above. For a frequency sweep, the averaging/tc parameter will tend to influence the number of samples recorded at lower frequencies, whereas averaging/sample will influence averaging behavior at higher frequencies.

An Explanation of Settling and Averaging Times in a Frequency Sweep

The image shows which demodulator samples are used in order to calculate an averaged measurement point in a frequency sweep. This explanation of the Sweeper's parameters is specific to the following commonly-used Sweeper settings:

  • gridnode is set to an oscillator frequency, e.g., /dev123/oscs/0/freq.
  • bandwidthcontrol is set to 2, corresponding to automatic bandwidth control, i.e., the Sweeper will set the demodulator's filter bandwidth settings optimally for each frequency used.
  • scan is set to 0, corresponding to sequential scan mode for the range of frequency values swept, i.e, the frequency is increasing for each measurement point made.

Each one of the three red segments in the demodulator data correspond to the data used to calculate one single Sweeper measurement point. The light blue bars correspond to the time the sweeper should wait as indicated by settling/tc (this is calculated by the Sweeper Module from the specified settling/inaccuracy parameter). The purple bars correspond to the time specified by the settling/time parameter. The sweeper will wait for the maximum of these two times according to Equation 1. When measuring at lower frequencies the Sweeper sets a smaller demodulator filter bandwidth (due to automatic bandwidthcontrol) corresponding to a larger demodulator filter time constant. Therefore, the settling/tc parameter dominates the settling time used by the Sweeper at low frequencies and at high frequencies the settling/time parameter takes effect. Note, that the light blue bars corresponding to the value of settling/tc get shorter for each measurement point (larger frequency used -> shorter time constant required), whereas the purple bars corresponding to settling/time stay a constant length for each measurement point. Similarly, the averaging/tc parameter (yellow bars) dominates the Sweeper's averaging behavior at low frequencies, whereas averaging/samples (green bars) specifies the behavior at higher frequencies, see also Equation 2.

Average Power and Standard Deviation of the Measured Data

The Sweeper returns measurement data upon calling the Sweeper's read() function. This returns not only the averaged measured samples (e.g. r) but also their average power (rpwr) and standard deviation (rstddev). In order to obtain reliable values from this statistical data, please ensure that the averaging branch parameters are configured correctly. It's recommended to use at least a value of 12 for averaging/sample to ensure enough values are used to calculate the standard deviation and 5 for averaging/tc in order to prevent aliasing effects from influencing the result.