Analog-to-digital converter
In electronics, an analog-to-digital converter is a system that converts an analog signal, such as from fingers touching a touchscreen, sound entering a microphone, or light entering a digital camera, into a digital signal.
An ADC may also provide an isolated measurement, such as an electronic device that converts an analog input voltage or current to a digital number representing the magnitude of the voltage or current. Typically, the digital output is a two's complement binary number that is proportional to the input, but there are other possibilities.
There are several ADC architectures. Due to the complexity and the need for precisely matched components, all but the most specialized ADCs are implemented as integrated circuits. These typically take the form of metal–oxide–semiconductor mixed-signal integrated circuit chips that integrate both analog and digital circuits.
A digital-to-analog converter performs the reverse function; it converts a digital signal into an analog signal.
Explanation
An ADC converts a continuous-time and continuous-amplitude analog signal to a discrete-time and discrete-amplitude digital signal. The conversion involves quantization of the input, so it necessarily introduces a small amount of quantization error. Furthermore, instead of continuously performing the conversion, an ADC does the conversion periodically, sampling the input, and limiting the allowable bandwidth of the input signal.The performance of an ADC is primarily characterized by its bandwidth, dynamic range and signal-to-noise and distortion ratio. The bandwidth of an ADC is set largely by its sampling rate. The SNDR is influenced by many factors, including the resolution, noise floor, linearity and accuracy. Aliasing and jitter will degrade these specifications. The SNDR of an ADC is often summarized in terms of its effective number of bits, the number of bits of each measure it returns that are, on average, not noise. An ideal ADC has an ENOB equal to its resolution. If an ADC operates at a sampling rate greater than twice the bandwidth of the signal, then per the Nyquist–Shannon sampling theorem, near-perfect reconstruction is possible. The presence of quantization error limits the SNDR of even an ideal ADC. When the SNDR of the ADC exceeds that of the input signal, the effects of quantization error may be neglected, resulting in an essentially perfect digital representation of the bandlimited analog input signal.
Resolution
The resolution of the converter indicates the number of different, i.e., discrete, values it can produce over the allowed range of analog input values. Thus, a particular resolution determines the magnitude of the quantization error and therefore determines the maximum possible signal-to-noise ratio for an ideal ADC without the use of oversampling. The input samples are usually stored electronically in binary form within the ADC, so the resolution is usually expressed in bits.Resolution can also be defined electrically, and expressed in volts. The change in voltage required to guarantee a change in the output code level is called the least significant bit voltage. The resolution Q of the ADC is equal to the LSB voltage. The voltage resolution of an ADC is equal to its overall voltage measurement range divided by the number of intervals:
where M is the ADC's resolution in bits and EFSR is the full-scale voltage range. EFSR is given by
where VRefHi and VRefLow are the upper and lower extremes, respectively, of the voltages that can be coded.
Normally, the number of voltage intervals is given by
where M is the ADC's resolution in bits.
That is, one voltage interval is assigned in between two consecutive code levels.
Example:
- Coding scheme as in figure 1
- Full scale measurement range = 0 to 1 volt
- ADC resolution is 3 bits: 23 = 8 quantization levels
- ADC voltage resolution, Q = 1 V / 8 = 0.125 V.
Quantization error
Quantization error is introduced by the quantization inherent in an ideal ADC. It is a rounding error between the analog input voltage to the ADC and the output digitized value. The error is nonlinear and signal-dependent. In an ideal ADC, where the quantization error is uniformly distributed between − LSB and + LSB, and the signal has a uniform distribution covering all quantization levels, the signal-to-quantization-noise ratio is given bywhere is the number of quantization bits. For example, for a 16-bit ADC, the quantization error is 96.3 dB below the maximum level.
Quantization error is distributed from DC to the Nyquist frequency. Consequently, if part of the ADC's bandwidth is not used, as is the case with oversampling, some of the quantization error will occur out-of-band, effectively improving the SQNR for the bandwidth in use. In an oversampled system, noise shaping can be used to further increase SQNR by forcing more quantization error out of band.
Dither
In ADCs, performance can usually be improved using dither. This is a very small amount of random noise, which is added to the input before conversion. Its effect is to randomize the state of the LSB based on the signal. Rather than the signal simply getting cut off altogether at low levels, it extends the effective range of signals that the ADC can convert, at the expense of a slight increase in noise. Dither can only increase the resolution of a sampler. It cannot improve the linearity, and thus, accuracy does not necessarily improve.Quantization distortion in an audio signal of very low level with respect to the bit depth of the ADC is correlated with the signal and sounds distorted and unpleasant. With dithering, the distortion is transformed into noise. The undistorted signal may be recovered accurately by averaging over time. Dithering is also used in integrating systems such as electricity meters. Since the values are added together, the dithering produces results that are more exact than the LSB of the analog-to-digital converter.
Dither is often applied when quantizing photographic images to a fewer number of bits per pixel—the image becomes noisier but to the eye looks far more realistic than the quantized image, which otherwise becomes banded. This analogous process may help to visualize the effect of dither on an analog audio signal that is converted to digital.
Accuracy
An ADC has several sources of errors. Quantization error and non-linearity are intrinsic to any analog-to-digital conversion. These errors are measured in a unit called the least significant bit. In the above example of an 8-bit ADC, an error of one LSB is of the full signal range, or about 0.4%.Nonlinearity
All ADCs suffer from nonlinearity errors caused by their physical imperfections, causing their output to deviate from a linear function of their input. These errors can sometimes be mitigated by calibration, or prevented by testing. Important parameters for linearity are integral nonlinearity and differential nonlinearity. These nonlinearities introduce distortion that can reduce the signal-to-noise ratio performance of the ADC and thus reduce its effective resolution.Jitter
When digitizing a sine wave, the use of a non-ideal sampling clock will result in some uncertainty in when samples are recorded. Provided that the actual sampling time uncertainty due to clock jitter is, the error caused by this phenomenon can be estimated as. This will result in additional recorded noise that will reduce the effective number of bits below that predicted by quantization error alone. The error is zero for DC, small at low frequencies, but significant with signals of high amplitude and high frequency. The effect of jitter on performance can be compared to quantization error:, where q is the number of ADC bits.Clock jitter is caused by phase noise. The resolution of ADCs with a digitization bandwidth between 1 MHz and 1 GHz is limited by jitter. For lower bandwidth conversions such as when sampling audio signals at 44.1 kHz, clock jitter has a less significant impact on performance.
Sampling rate
An analog signal is continuous in time and it is necessary to convert this to a flow of digital values. It is therefore required to define the rate at which new digital values are sampled from the analog signal. The rate of new values is called the sampling rate or sampling frequency of the converter. A continuously varying bandlimited signal can be sampled and then the original signal can be reproduced from the discrete-time values by a reconstruction filter. The Nyquist–Shannon sampling theorem implies that a faithful reproduction of the original signal is only possible if the sampling rate is higher than twice the highest frequency of the signal.Since a practical ADC cannot make an instantaneous conversion, the input value must necessarily be held constant during the time that the converter performs a conversion. An input circuit called a sample and hold performs this task—in most cases by using a capacitor to store the analog voltage at the input, and using an electronic switch or gate to disconnect the capacitor from the input. Many ADC integrated circuits include the sample and hold subsystem internally.
Aliasing
An ADC works by sampling the value of the input at discrete intervals in time. Provided that the input is sampled above the Nyquist rate, defined as twice the highest frequency of interest, then all frequencies in the signal can be reconstructed. If frequencies above half the Nyquist rate are sampled, they are incorrectly detected as lower frequencies, a process referred to as aliasing. Aliasing occurs because instantaneously sampling a function at two or fewer times per cycle results in missed cycles, and therefore, the appearance of an incorrectly lower frequency. For example, a 2 kHz sine wave being sampled at 1.5 kHz would be reconstructed as a 500 Hz sine wave.To avoid aliasing, the input to an ADC must be low-pass filtered to remove frequencies above half the sampling rate. This filter is called an anti-aliasing filter, and is essential for a practical ADC system that is applied to analog signals with higher frequency content. In applications where protection against aliasing is essential, oversampling may be used to greatly reduce or even eliminate it.
Although aliasing in most systems is unwanted, it can be exploited to provide simultaneous down-mixing of a band-limited high-frequency signal. The alias is effectively the lower heterodyne of the signal frequency and sampling frequency.