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_curve_fit.py
, an example distributed on our public GitHub repository.Precompensation Advisor Module Work-Flow
Precompensation Advisor usage via the LabOne APIs closely follows the work-flow used in the LabOne User Interface.
-
Create an instance of the Precompensation Advisor module (one instance is required for each AWG waveform output in use).
-
Decide which filters to use.
-
Set the coefficients/time constants of the filters.
-
Read and analyze the results of the simulation via the
wave/output
,wave/output/forwardwave
andwave/output/backwardwave
parameters. -
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 Node Tree
The following section contains reference documentation for the settings and measurement data available on the precompensation advisor module.
Since these settings and data streams may be written and read using the LabOne APIs (Application Programming Interfaces) this section is of particular interest to users who would like to perform measurements programmatically via LabVIEW, Python, MATLAB, .NET or C.
BOUNCES
Read, Write Double None Amplitude of the bounce compensation filter.
/BOUNCES/n/AMPLITUDE
Properties:
Type:
Unit:
Read, Write Double None Delay between original signal and the bounce echo.
/BOUNCES/n/DELAY
Properties:
Type:
Unit:
Read, Write Integer (64 bit) None Enable the bounce compensation filter.
/BOUNCES/n/ENABLE
Properties:
Type:
Unit:
DEVICE
Read, Write String None Device string defining the device on which the compensation is performed.
/DEVICE
Properties:
Type:
Unit:
EXPONENTIALS
Read, Write Double None Amplitude of the exponential filter.
/EXPONENTIALS/n/AMPLITUDE
Properties:
Type:
Unit:
Read, Write Integer (64 bit) None Enable the exponential filter.
/EXPONENTIALS/n/ENABLE
Properties:
Type:
Unit:
Read, Write Double Seconds Time constant (tau) of the exponential filter.
/EXPONENTIALS/n/TIMECONSTANT
Properties:
Type:
Unit:
Read, Write Double None Amplitude of the exponential filter.
/EXPONENTIALS/1/AMPLITUDE
Properties:
Type:
Unit:
Read, Write Integer (64 bit) None Enable the exponential filter.
/EXPONENTIALS/1/ENABLE
Properties:
Type:
Unit:
Read, Write Double Seconds Time constant (tau) of the exponential filter.
/EXPONENTIALS/1/TIMECONSTANT
Properties:
Type:
Unit:
Read, Write Double None Amplitude of the exponential filter.
/EXPONENTIALS/2/AMPLITUDE
Properties:
Type:
Unit:
Read, Write Integer (64 bit) None Enable the exponential filter.
/EXPONENTIALS/2/ENABLE
Properties:
Type:
Unit:
Read, Write Double Seconds Time constant (tau) of the exponential filter.
/EXPONENTIALS/2/TIMECONSTANT
Properties:
Type:
Unit:
Read, Write Double None Amplitude of the exponential filter.
/EXPONENTIALS/3/AMPLITUDE
Properties:
Type:
Unit:
Read, Write Integer (64 bit) None Enable the exponential filter.
/EXPONENTIALS/3/ENABLE
Properties:
Type:
Unit:
Read, Write Double Seconds Time constant (tau) of the exponential filter.
/EXPONENTIALS/3/TIMECONSTANT
Properties:
Type:
Unit:
Read, Write Double None Amplitude of the exponential filter.
/EXPONENTIALS/4/AMPLITUDE
Properties:
Type:
Unit:
Read, Write Integer (64 bit) None Enable the exponential filter.
/EXPONENTIALS/4/ENABLE
Properties:
Type:
Unit:
Read, Write Double Seconds Time constant (tau) of the exponential filter.
/EXPONENTIALS/4/TIMECONSTANT
Properties:
Type:
Unit:
Read, Write Double None Amplitude of the exponential filter.
/EXPONENTIALS/5/AMPLITUDE
Properties:
Type:
Unit:
Read, Write Integer (64 bit) None Enable the exponential filter.
/EXPONENTIALS/5/ENABLE
Properties:
Type:
Unit:
Read, Write Double Seconds Time constant (tau) of the exponential filter.
/EXPONENTIALS/5/TIMECONSTANT
Properties:
Type:
Unit:
Read, Write Double None Amplitude of the exponential filter.
/EXPONENTIALS/6/AMPLITUDE
Properties:
Type:
Unit:
Read, Write Integer (64 bit) None Enable the exponential filter.
/EXPONENTIALS/6/ENABLE
Properties:
Type:
Unit:
Read, Write Double Seconds Time constant (tau) of the exponential filter.
/EXPONENTIALS/6/TIMECONSTANT
Properties:
Type:
Unit:
Read, Write Double None Amplitude of the exponential filter.
/EXPONENTIALS/7/AMPLITUDE
Properties:
Type:
Unit:
Read, Write Integer (64 bit) None Enable the exponential filter.
/EXPONENTIALS/7/ENABLE
Properties:
Type:
Unit:
Read, Write Double Seconds Time constant (tau) of the exponential filter.
/EXPONENTIALS/7/TIMECONSTANT
Properties:
Type:
Unit:
FIR
Read, Write ZIVectorData None 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.
/FIR/COEFFICIENTS
Properties:
Type:
Unit:
Read, Write Integer (64 bit) None Enable the FIR filter.
/FIR/ENABLE
Properties:
Type:
Unit:
HIGHPASS
Read, Write Integer (64 bit) None Enable the high-pass compensation filter.
/HIGHPASS/n/ENABLE
Properties:
Type:
Unit:
Read, Write Double Seconds Time constant (tau) of the high-pass compensation filter.
/HIGHPASS/n/TIMECONSTANT
Properties:
Type:
Unit:
LATENCY
Read, Write Integer (64 bit) None Enable latency simulation for the calculated waves.
/LATENCY/ENABLE
Properties:
Type:
Unit:
Read Double None Total delay of the output signal accumulated by all filter stages (read-only).
/LATENCY/VALUE
Properties:
Type:
Unit:
SAMPLINGFREQ
Read 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.
/SAMPLINGFREQ
Properties:
Type:
Unit:
WAVE
Read, Write Integer (64 bit) None Defines with which AWG output the module is associated. This is used for loading an AWG wave as the source.
/WAVE/INPUT/AWGINDEX
Properties:
Type:
Unit:
Read, Write Double Seconds Artificial time delay of the simulation input.
/WAVE/INPUT/DELAY
Properties:
Type:
Unit:
Read, Write Double None Artificial gain with which to scale the samples of the simulation input.
/WAVE/INPUT/GAIN
Properties:
Type:
Unit:
Read, Write ZIVectorData None 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.
/WAVE/INPUT/INPUTVECTOR
Properties:
Type:
Unit:
Read, Write Integer (64 bit) None Number of points in the simulated wave.
/WAVE/INPUT/LENGTH
Properties:
Type:
Unit:
Read, Write Double V Artificial vertical offset added to the simulation input.
/WAVE/INPUT/OFFSET
Properties:
Type:
Unit:
Read, Write Double Hz The sampling frequency determined by the timestamps from the CSV file.
/WAVE/INPUT/SAMPLINGFREQ
Properties:
Type:
Unit:
Read, Write Integer (enumerated) None Type of wave used for the simulation. 0 Step function 1 Pulse 2 Load AWG with the wave specified by the "waveindex" and "awgindex" nodes. 3 Manually loaded wave through the /inputvector node.
/WAVE/INPUT/SOURCE
Properties:
Type:
Unit:
step
impulse
nodes
manual
Read String None The status of loading the CSV file.
/WAVE/INPUT/STATUSSTRING
Properties:
Type:
Unit:
Read, Write Integer (64 bit) None 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/WAVEINDEX
Properties:
Type:
Unit:
Read ZIAdvisorWave None 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.
/WAVE/OUTPUT/BACKWARDWAVE
Properties:
Type:
Unit:
Read ZIAdvisorWave None 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/FORWARDWAVE
Properties:
Type:
Unit:
Read ZIAdvisorWave None Wave onto which the filters are applied.
/WAVE/OUTPUT/INITIALWAVE
Properties:
Type:
Unit: