1. Performing Lineraity Tests on a Digital-to-Analog Converter (DAC)
In selecting a digital-to-analog converter (DAC) one of the most common criteria you look at is linearity. Two tests have evolved as the most popular linearity tests: differential nonlinearity (DNL) and integral nonlinearity (INL.) If a DAC were ideal, each output step would be exactly the same size; meaning when supplied with equally increasing increments of supply voltage, the output would ramp up in equal increments. DNL is the degree to which each output step (or code width) varies from the ideal step. DNL is generally more critical when outputting small signals. INL measures the deviation of the entire transfer function from the ideal function and is generally more critical for outputting large signals.
To test the linearity of a DAC, you need to generate the digital stimulus and capture the analog response. Usually you would sweep the DAC from 0 to its maximum output step, and compare the response to what it should be at every output step. When most manufacturers specify DNL and INL on a data sheet, they specify the worst cases - the maximum and minimum over the entire transfer functions. You might only be interested in the minimum and maximum, or you might be interested in the measurements for all code widths. LabVIEW provides native array functions to search the data array for the max and min or other points of interest, and you can graph the overall transfer functions for trending information.
To generate the digital stimulus and capture the analog response, you need a high-speed digital source and high-speed digitizer. In hardware, you need to control the timing between the acquisition and generation modules, so you know which acquisition sample should correspond to which generation sample. Platforms such as PXI and VXI are ideal for such applications These platforms are designed with timing and synchronization resources built-in, so modules can share reference clocks, sample clocks, triggers, and events.
Figure 1. Differential Nonlinearity of RGB Video DAC
2. Performing THD Measurements on a DAC
All DACs add some harmonic distortion to the analog output signal. Essentially, when converting a finite number of digital samples to an analog signal, there will be some distortion. Generating a tone at a given frequency causes the electronics to resonate (or hum) at integer multiples of the tone. The total harmonic distortion sums together the power in each of these harmonic multiples and divides this by the power of the fundamental.
The device used in this example is a 12 bit, 125 MSPS high-performance DAC. An example test system configuration is displayed in figure 2, which includes digital board driving a sine sweep to the 12 bits of the DAC while the digitizer acquires the analog output. NI LabVIEW then analyzes the acquired sine wave and measures the THD, as shown in figure 3.
Figure 2. Example Configuration for Calculating THD on a DAC.
Figure 3. Example of a Digitizer Acquisition and THD analysis
3. Relevant NI products
Customers interested in this topic were also interested in the following NI products:
- LabVIEW Graphical Programming Environment
- SignalExpress Interactive Software Environment
- High-speed Digital I/O
For the complete list of tutorials, return to the NI Analog Resource Center.