DAC AC Measurement
Measure AC performance metrics of DAC output
Libraries:
Mixed-Signal Blockset /
DAC /
Measurements & Testbenches
Description
The DAC AC Measurement block measures DAC AC performance metrics such as signal-to-noise ratio (SNR), signal to noise and distortion radio (SINAD), spurious-free dynamic range (SFDR), effective number of bits (ENOB), and noise floor. You can use DAC AC Measurement block to validate the DAC architecture models provided in Mixed-Signal Blockset™, or you can use a DAC of your own implementation
Examples
This example shows how to find the AC performance metrics such as SNR, SINAD, SFDR, ENOB, and noise floor using a DAC AC Measurement block.
Open the model dac_ac_measure
. The model consists of a Signal Generator, a Flash ADC, a Binary Weighted DAC block, and a DAC AC Measurement block.
model = 'dac_ac_measure';
open_system(model)
The Flash ADC acts as the input to the Binary Weighted DAC. The ADC uses an internal start clock whose Conversion start frequency (Hz) is 1e6
and RMS aperture jitter (s) is 1e-12
. The input analog frequency to the Flash ADC from the Signal Generator is 250.98
kHz.
The Number of bits of the Binary Weighted DAC is set to 10
. All other parameters are kept at their default values.
The Digital signal frequency (Hz) of the DAC AC Measurement block is 2.5098e5
and the Start conversion frequency (Hz) is 1e6
.
Run the simulation for 0.0003586
s.
sim(model);
The measured AC performance metrics are displayed on the DAC AC Measurement block.
Ports
Input
Digital input 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
External clock to start conversion, specified as a scalar. This port determines when digital-to-analog conversion process starts.
Data Types: double
Parameters
Frequency of the digital input signal to the DAC block, specified as a positive real scalar in hertz. Digital signal frequency (Hz) must match the input frequency of the DAC device under test.
Digital input frequency (Hz) needs to satisfy two requirements:
All the output codes of the DAC must be activated.
The Digital signal frequency (Hz) must not share any common multiples other than 1 with the Conversion start frequency (Hz).
Programmatic Use
Block parameter:
InputFrequency |
Type: character vector |
Values: positive real scalar |
Default:
1e3 |
Data Types: double
Frequency of the internal start conversion clock, specified as a real scalar in Hz. The Start conversion frequency parameter determines the conversion rate at the start of conversion.
Programmatic Use
Block parameter:
StartFreq |
Type: character vector |
Values: positive real scalar |
Default:
1e6 |
Data Types: double
The tolerance allowed for calculating settling time, specified as a positive real scalar in LSB. The output of the DAC must settle within the Settling time tolerance (LSB) by Settling time (s).
Programmatic Use
Block parameter:
SettlingTimeTolerance |
Type: character vector |
Values: positive real scalar |
Default:
0.5 |
Data Types: double
Delay before measurement analysis to avoid corruption by transients, specified as a nonnegative real scalar in seconds.
Programmatic Use
Block parameter:
HoldOffTime |
Type: character vector |
Values: nonnegative real scalar |
Default:
0 |
Minimum time the simulation must run to obtain meaningful results, specified as a positive real scalar in seconds.
To measure AC performance, the simulation must run so that the DAC can generate six spectral updates of the DAC output. So, the Recommended simulation stop time (s) T is given by [1]:
,
where RBW is the resolution bandwidth of the spectrum estimator inside the DAC Testbench block and is given by the equation: .
This parameter is only reported by the block and is not editable.
Data Types: double
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
Block parameter:
VariableName |
Type: character vector |
Values: character string |
Default:
dac_ac_out |
Select this parameter to display the Spectrum Analyzer window during simulation. By default, this parameter is selected.
More About
Signal-to-noise ratio or SNR is the ratio of the RMS (root-mean-square) signal amplitude to the mean value of the root-sum-squares (RSS) of all other spectral components, excluding the DC and first five harmonics.
Signal to noise and distortion ratio or SINAD is the ratio of the RMS signal amplitude to the mean value of the root-sum-squares of all other spectral components and harmonics, excluding DC.
Spurious free dynamic range or SFDR is the ratio of the RMS signal amplitude to the RMS value of the peak spurious content, measured over the entire first Nyquist zone (DC to half of sampling frequency).
Effective number of bits or ENOB represents the actual resolution of a DAC after considering internal noise and errors. It is given by .
References
Version History
Introduced in R2020a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)