Solution
In order to understand glitching and how it occurs, we need to understand some fundamentals of the Digital to Analog Converter (DAC).
The settling time of a (DAC) is the time from a change of digital code to when the output comes within and remains within some error band. Ideally, when a DAC output changes it should move from one value to its new one monotonically. In practice, the output is likely to overshoot and/or undershoot as shown in figure 1:
Figure 1: DAQ Output Overshoot, Undershoot.
A glitch is the transient that occurs on an analog output as the DAC changes from one value to another. A common cause of glitches is some analog output switches on the DAC operate faster than others, which produces temporary, spurious effects on the output until all switches have settled. Another common cause of glitches is the capacitive coupling between digital and analog outputs.
Any high-speed Digital to Analog Converter (DAC) will produce a glitch when it switches from one voltage to another. These glitches are very small voltage spikes that occur when the DAC outputs a new voltage level. In order to reach the new steady-state output level, the DAQ first produces a step response, which contains the glitch. As the output settles and the signal completely latches, the glitch will subside and the final level is achieved.
The biggest glitches tend to occur at major code transitions. The major code transition is the point where the most significant bit (MSB) changes from low to high and all other bits change from high to low, and vice versa. When the new code signal value appears before or after the signal value of the previous code disappears, a glitch is seen.
If you were to plot voltage versus time for the step response, the area under the glitch curve would be referred to as the glitch energy. The glitch energy is given on the Datasheet for NI DAQ cards in units of magnitude and duration.
The integral with respect to time of the signal where the glitch transition occurs is called the glitch area. The worst case of glitches is usually referred to as the worst case of code change. The glitch energy is the time integral of the power of this worst-case glitch. The IEEE STD 181 defines a glitch as a “transient that leaves an initial state, enters the boundaries of another state for duration less than duration for state occurrence and returning to the initial state."
Unfortunately, it is not possible to prevent the glitch energy of a DAC. However, we can make these glitches more uniform in size by using a process called reglitching, resulting in a more uniform frequency spectrum. Additionally, deglitching filters and other custom-built circuitry can be built to reduce the effects of glitches. For more information on these techniques, see the KnowledgeBase below on reducing glitches on the analog output channels of NI's multifunction DAQ boards.