Blog Discrete Signals

DAC: non-linearity, non-monotonicity and midpoint glitches

Digital-to-analog converters (DACs) turn bits back into sound, images, or positions. Chipmakers work very hard to create reliable and accurate DACs. Still, sometimes there is a hiccup, putting a ripple in output waveforms. Non-linearity errors can add up, while its cousin non-monotonicity can present a bigger problem. DAC midpoint glitches also can launch sizable spikes into otherwise smooth signals.

Here’s the short version of DAC anomalies makers should look for, and what can be done about them.

No missed codes, but missing the line

In theory, a DAC doesn’t miss codes—there’s an analog output for every bit combination of inputs. Ideally, the output should produce a straight line in response to incremental bit value increases. There’s always a small bit of quantization uncertainty, usually much less than the step width. Non-linearity shows up in two forms.

Figure 1 Non-linearity shows up in the form of integral non-linearity (INL) and differential non-linearity (DNL). Source: Texas Instruments

Integral non-linearity (INL) measures how far the output strays off the ideal straight line. Differential non-linearity (DNL) measures the stability of the step width at each step across the range. In an imperfect world, DNL causes steps bigger or smaller than the desired width, and in extreme cases, contributes to non-monotonicity we’ll discuss shortly.

In lower resolution converters, INL may be significant, as much as an entire bit off. If positional accuracy is important, moving up in DAC resolution is a good choice. As resolution increases, DNL usually becomes the dominant factor, showing up as unwanted noise in the output. Parts designed for audio or video usually optimize DNL along with distortion to keep cleaner outputs.

Non-monotonicity can rub the wrong way

Monotonicity is a bad thing in a speaking voice, but a good thing in an analog output from a DAC. One would expect the output to track the input. If the digital input increases, the analog output should increase. Sometimes, depending on how the DAC does its magic and where the signal is on its transfer curve, a bit increase results in a dip in the output before resuming an increase at the next higher bit input.

Figure 2 DNL is often used to infer DAC monotonicity and to determine if the DAC has any missing codes. Source: Texas Instruments

If it shows up, non-monotonicity can be bad. Suppose the DAC output drives a motor—pushing it briefly in the wrong direction at a critical transition. It’s the scenario that drives analog control engineers slightly crazy. In some cases, a small transient error might not break through mechanical inertia and friction. Some applications may need precision DACs with more careful design and thorough calibration for guaranteed monotonic behavior.

Midpoints switch a lot of current all at once

DACs are susceptible to problems at the midpoint, where the code switches between mostly ones (say, 01111111 for an eight-bit word) and mostly zeroes (10000000 for an eight-bit word). Everything is switching inside the part with all the bits in motion, and the resulting current surge can show up as a glitch in conversion. In fact, chipmakers often test for and specify “glitch energy” describing how big and how long the effect lasts. Note this is a different effect from the DAC settling time or DNL; it’s an output change much bigger than it should be for a one-bit step.

Figure 3 Here is a conceptual time-domain view of a 16-bit DAC midpoint glitch. Source: Texas Instruments

For a DAC, low pass filtering the analog output can take out some of the glitch energy, or a more complex external sample-and-hold circuit may be needed to deglitch the output. Another tactic for mitigating glitches in DACs is avoiding the midpoint altogether, scaling and offsetting signals to use only half of the converter’s range in operation. That may need some pre-processing of the digital data before sending it to the DAC.

Oscilloscope can help makers deal with DACs

If you’re hearing popping in audio or seeing imperfections in video coming off a DAC, hunting the problem down will take more than a digital multimeter. Working with a DAC is a good reason to invest in an oscilloscope. Triggering may be a fun exercise and using a scope with deep digital storage may help in capturing the anomaly.

Where most analog-to-digital converters (ADCs) don’t need as much analog expertise to use them, DACs are easy to hook up but may require some analog care and feeding to perform well. Again, we’re at the point where chip designers have seen a lot of the potential problems and are optimizing DACs for specific applications, which helps makers choose the right parts.

After spending a decade in missile guidance systems at General Dynamics, Don Dingee became an evangelist for VMEbus and single-board computer technology at Motorola. He writes about sensors, ADCs/DACs, and signal processing for Planet Analog.

Related Content

13 comments on “DAC: non-linearity, non-monotonicity and midpoint glitches

  1. Mary Solero
    January 6, 2022

    If positional accuracy is important, moving up in DAC resolution is a good choice
    Allentown Pest Pros

  2. Brett M
    January 10, 2022

    Thanks for sharing here an informative article.

  3. Janwil
    March 4, 2022

    Awesome post! This would be big help information in future reference.

  4. KenSanders
    March 8, 2022

    Thanks for sharing such an informative and helpful post. Keep sharing the great work.

  5. Jennifer05
    March 16, 2022

    Such an informative site, glad to find this one.

  6. Rivahlore
    March 17, 2022

    Thanks for sharing this informative post and we want to learn more. We really appreciate your efforts.

  7. Horea Kaii
    April 22, 2022

    Happens all the time but thank goodness a lot of troubleshooting has been done for this. Thank you so much!

    see best SEO Tampa services

  8. Ginny Miller
    April 25, 2022

    I’m very glad to see this very helpful and detailed article. I now understand the value and the deeper meaning/purpose of monotonicity.

  9. Kelly Peters
    June 21, 2022

    Thanks for discussing this smoothly.

  10. Jennifer05
    June 23, 2022

    Amazing! Thanks for sharing this one.

  11. JuliaB
    August 8, 2022

    Great Job! This post is worth reading and sharing at Amazing garage floor company in Tempe

  12. Joana Davidson
    August 24, 2022

    In some cases, a small transient error might not break through mechanical inertia and friction. while looking for a drywall contractor near me, your post and intrigued me. You have a great sense of demonstrating your point of view. Cheers!

  13. normantaten
    September 3, 2022

    One would expect the output to track the input. If the digital input increases, the analog output should increase, more info

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.