Precompensation Advisor Module

The Precompensation Advisor Module provides the functionality available in the LabOne User Interface’s Precompensation Tab. In essence the precompensation allows a pre-distortion or pre-emphasis to be applied to a signal before it leaves the instrument, to compensate for undesired distortions caused by the device under test (DUT). The Precompensation Advisor module simulates the precompensation filters in the device, allowing the user to experiment with different filter settings and filter combinations to obtain an optimal output signal, before using the setup in the actual device.

example precompensation
Figure 1. Plot generated by the LabOne Python API Precompensation Advisor example. See the Section Running the Examples in the Python Chapter for help getting started with the Python examples.

Precompensation Advisor Module Work-Flow

Precompensation Advisor usage via the LabOne APIs closely follows the work-flow used in the LabOne User Interface.

  1. Create an instance of the Precompensation Advisor module (one instance is required for each AWG waveform output in use).

  2. Decide which filters to use.

  3. Set the coefficients/time constants of the filters.

  4. Read and analyze the results of the simulation via the wave/output, wave/output/forwardwave and wave/output/backwardwave parameters.

  5. Adjust filter coefficients and repeat the previous two steps until an optimal output waveform is achieved.

Refer to the appropriate user manual for a comprehensive description of the Precompensation Advisor.

Note that with the Precompensation Advisor module, the execute(), finish(), finished() read(), progress(), subscribe() and unsubscribe() commands serve no purpose. Indeed some APIs do not provide all of these commands. Each time one or more filter parameters are changed, the module re-runs the simulation and the results can be read via the wave/output, wave/output/forwardwave and wave/output/backwardwave parameters.

Precompensation Advisor Module Parameters

The following tables provide a comprehensive list of the module’s parameters, see:

Table 1. Precompensation Advisor Input/Output Parameters.
Path Type Unit Description

device

string

-

Device string defining the device on which the compensation is performed.

bounces/0/enable

bool

-

Enable the bounce compensation filter.

bounces/0/amplitude

double

-

Amplitude of the bounce compensation filter.

bounces/0/delay

double

-

Enable the exponential filter.

exponentials/([0-7])/enable

bool

-

Enable the exponential filter.

exponentials/[0-7]/amplitude

double

-

Amplitude of the exponential filter.

exponentials/[0-7]/timeconstant

double

s

Time constant (tau) of the exponential filter.

highpass/0/enable

bool

-

Enable the high-pass compensation filter.

highpass/0/timeconstant

double

s

Time constant (tau) of the high-pass compensation filter.

Table 2. Precompensation Advisor Input Parameters.
Path Type Unit Description

advancedmode

bool

-

Disable automatic calculation of the start and stop value.

fir/enable

bool

-

Enable the FIR filter.

fir/coefficients

double

-

Vector of FIR filter coefficients. Maximum length 40 elements. The first 8 coefficients are applied to 8 individual samples, whereas the following 32 Coefficients are applied to two consecutive samples each.

latency/enable

bool

-

Enable latency simulation for the calculated waves.

wave/input/length

int

-

Number of points in the simulated wave.

wave/input/source

int

-

Type of wave used for the simulation.

0:

Step function

1:

Pulse

2:

Load AWG with the wave specified by the wave/input/waveindex`and `wave/input/awgindex nodes

3:

Manually loaded wave through the `inputvector`node

wave/input/awgindex

int

-

Defines with which AWG output the module is associated. This is used for loading an AWG wave as the source.

wave/input/waveindex

int

-

Determines which AWG wave is loaded from the the AWG output. Internally, all AWG sequencer waves are indexed and stored. With this specifier, the respective AWG wave is loaded into the Simulation.

wave/input/inputvector

double

-

Node to upload a vector of amplitude data used as a signal source. It is assumed the data are equidistantly spaced in time with the sampling rate as defined in the samplingfreq node.

Table 3. Precompensation Advisor Output (read-only) Parameters.
Path Type Unit Description

samplingfreq

double

Hz

Sampling frequency for the simulation (read-only). The value comes from the /device/system/clocks/sampleclock/freq node if available. Default is 2.4 GHz.

latency/value

double

-

Total delay of the output signal accumulated by all filter stages (read-only).

wave/output

double

-

Wave onto which the filters are applied.

wave/output/forwardwave

double

-

Initial wave upon which the filters have been applied. This wave is a representation of the AWG output when precompensation is enabled with the filter settings specified in the respective nodes.

wave/output/backwardwave

double

-

Initial wave upon which the filters have been applied in the reverse direction. This wave is a simulation of signal path response which can be compensated with the filter settings specified in the respective nodes.