Main Content

DAC DC Measurement

Measure DC performance metrics of DAC output

  • Library:
  • Mixed-Signal Blockset / DAC / Measurements & Testbenches

  • DAC DC Measurement block

Description

The DAC DC Measurement block measures DAC DC performance metrics such as offset error, gain error, integral nonlinearity (INL), and differential nonlinearity (DNL) errors. You can use the DAC DC Measurement block to validate the DAC architecture models provided in Mixed-Signal Blockset™, or you can use a DAC of your own implementation.

Ports

Input

expand all

Digital signal from a DAC, specified as a scalar.

Data Types: fixed point | single | double | int8 | int16 | int32 | uint8 | uint16 | uint32

Converted analog signal from a DAC, specified as a scalar.

Data Types: double

Parameters

expand all

Polarity of the input signal to the DAC.

Programmatic Use

  • Use get_param(gcb,'Polarity') to view the current Input polarity.

  • Use set_param(gcb,'Polarity',value) to set Input polarity to a specific value.

Reference voltage of the DAC, specified as a real scalar in volts. Reference (V) helps determine the output from the input digital code, Number of bits, and Bias (V) using the equation:

DAC output = ((Digital input code2Number of bits)Reference)+Bias.

Programmatic Use

  • Use get_param(gcb,'Ref') to view the current value of Reference (V).

  • Use set_param(gcb,'Ref',value) to set Reference (V) to a specific value.

Data Types: double

Bias voltage added to the output of the DAC, specified as a real scalar in volts. Bias (V) helps determine the output from the input digital code, Number of bits, and Reference (V) using the equation:

DAC output = ((Digital input code2Number of bits)Reference)+Bias.

Programmatic Use

  • Use get_param(gcb,'Bias') to view the current value of Bias (V).

  • Use set_param(gcb,'Bias',value) to set Bias (V) to a specific value.

Data Types: double

Delay before measurement analysis to avoid corruption by transients, specified as a nonnegative real scalar in seconds.

Programmatic Use

  • Use get_param(gcb,'HoldOffTime') to view the current value of Hold off time (s).

  • Use set_param(gcb,'HoldOffTime',value) to set Hold off time (s) to a specific value.

Data Types: double

Number of bits in the input word, specified as a unitless positive real integer. Number of bits determines the resolution of the DAC.

Programmatic Use

  • Use get_param(gcb,'NBits') to view the current Number of bits.

  • Use set_param(gcb,'NBits',value) to set Number of bits to a specific value.

Data Types: double

Frequency of internal start-conversion clock, specified as a positive real scalar in Hz. Start conversion frequency (Hz) determines the rate of the DAC.

Programmatic Use

  • Use get_param(gcb,'StartFreq') to view the current value of Start conversion frequency (Hz).

  • Use set_param(gcb,'StartFreq',value) to set Start conversion frequency (Hz) to a specific value.

Data Types: double

Minimum time the simulation must run to obtain meaningful results, specified as a positive real scalar in seconds.

To measure DC performance, the simulation must run so that the DAC can sample each digital code 20 times. Based on this assumption, the Recommended simulation stop time (s) T is given by:

T=Samples per bit(StartFreq/2Nbits+1)+Hold off time,

where StartFreq is the frequency of the conversion start clock and Nbits is the resolution of the DAC.

The number of samples per bit is calculated using the equation:

Samples per bit = max(1Error tolerance,10).

This parameter is only reported by the block and is not editable.

Data Types: double

Measure the differential nonlinearity (DNL) error and integral nonlinearity (INL) error using the endpoint method. This method uses the endpoints of the actual transfer function to measure the DNL and INL errors.

Measure the differential nonlinearity (DNL) error and integral nonlinearity (INL) error using the best fit method. This method uses a standard curve-fitting technique to find the best fit to measure the DNL and INL errors.

Select to store detailed test results to a struct in the base workspace for further processing at the end of simulation. By default, this parameter is deselected.

Name of the variable that stores detailed test results, specified as a character string.

Dependencies

To enable this parameter, select Output result to base workspace parameter.

Programmatic Use

  • Use get_param(gcb,'VariableName') to view the current value of Workspace variable name.

  • Use set_param(gcb,'VariableName',value) to set Workspace variable name to a specific value.

Click to plot measurement result for further analysis.

More About

expand all

Introduced in R2020a