You are on page 1of 11

Quantization: Error and Noise

The purpose of this course is to become familiar with quantization and the error and noise that results from it, as well as its implication for ADC performance. Some of this information will not be new, but it is important enough to repeat it to be sure it is understood.

Course Map/Table of Contents


1. Course Navigation 1. 1.1 Course Navigation 2. Quantization and Quantization Error 1. 2. 3. 4. 5. 6. 2.1 Quantization Defined 2.2 The ADC Transfer Function 2.3 Quantization Error 2.4 Adding LSB Offset to the ADC input 2.5 ADC Quantization Error with LSB Offset 2.6 DAC Transfer Function

3. Quantization Noise 1. 3.1 Quantization Noise 2. 3.2 Performance Implication 3. 3.3 Summary

Course Navigation
1.1 Course Navigation

Course Navigation
This course is organized like a book with multiple chapters. Each chapter may have one or more pages. The previous and next arrows move you forward and back through the course page by page.

The left navigation bar takes you to any chapter. It also contains the bookmarking buttons, 'save' and 'go to.' To save your place in a course, press the 'save' button. The next time you open the course, clicking on 'go to' will take you to the page you saved or bookmarked. The 'Go to Final Test' button on the left navigation bar takes you back to the Analog University course listing, where you started. Take the course final test by clicking on 'Test Yourself.' The top services bar contains additional information such as glossary of terms, who to go to for help with this subject and an FAQ. Clicking home on this bar will take you back to the course beginning. Don't miss the hints, references, exercises and quizzes which appear at the bottom of some pages.

Quantization and Quantization Error


The discussion here is around Quantization and Quantization Error; what they are. 2.1 Quantization Defined 2.2 The ADC Transfer Function 2.3 Quantization Error 2.4 Adding LSB Offset to the ADC input 2.5 ADC Quantization Error with LSB Offset 2.6 DAC Transfer Function

2.5 ADC Quantization Error with LSB Offset 2.6 DAC Transfer Function

Quantization Defined
What is "Quantization"? Quantization is the process of assigning output codes to various input ranges. A device which does this is called a "Quantizer". An Analog-to-Digital Converter is a Quantizer. Whenever we digitize an analog quantity (voltage, current, temperature, pressure, etc.) we assign a range of analog values (a "quanta") to a single digital code. That is, whatever analog values that fall between some values x and x will all be assigned
m n

the same digital code at the output of the quantizer, the ADC (also termed A/D Converter or Analog-to-Digital Converter). All analog input values between other values of x and x will all be assigned a different digital code. This gives rise to the stair
m1 n1

step transfer function of the ADC that we will see on the next page.

Quantization 1 A Quantizer is also known as


1. Analog-to-Digital Converter 2. Digital to Position Converter 3. Both of these are correct 4. Neither of these is correct 1 Answer: 1 - Analog-to-Digital Converter

2 A range of analog values that is assigned a single digital code is known as a


1. Groupie 2. Quanta 3. Both of these are correct 4. Neither of these is correct 2 Answer: 2 - Quanta

The ADC Transfer Function


The ADC Transfer Function, while typically described as a stair step, is really discontinuous. The familiar rising lines of the stair step are actually not present in the ADC transfer function. This is as it should be as the ADC output code jumps from code to code rather than slewing from one code to another.

Each digital output values corresponds to a range if analog input values. This range is called a quanta and is equivalent to an LSB, which is what a quanta is typically called. A quanta, or LSB, has a value of V on ADC gain factors).
REF

/ 2 , assuming an ADC gain factor of unity. (Refer to the first course in this series for information

The ADC Transfer Function 1 The ADC transfer function is a


1. Straight, continuous line 2. Series of discontinuous horizontal lines 3. Series of discrete points 4. None of these is correct 1 Answer: 2 - Series of discontinuous horizontal lines

2 The ADC has how many different output codes?


1. 256 2. 4096 3. 2n, where "n" is the number of bits 4. n2 2 Answer: 3 - 2 , where "n" is the number of bits
n

3 The size of a quanta is


1. An LSB 2. V
REF

/ 2 , assuming a gain of unity

3. Both of these are correct 4. Neither of these area correct. 3 Answer: 3 - Both of these are correct

Quantization Error
The Quantization process produces an error because of the assignment of a single digital code to a range of analog input values. Using a 3-bit ADC, if the input of zero, the output code is zero (000) and there is no error. As the input voltage increases towards V
REF 3

/8 (V

REF

/2 ), the error increases because the input is no longer zero, but the output code remains at zero. This is because an

input voltage range is represented by a single output code, as is necessary when interfacing between the analog and digital worlds. When the input reaches V /8, the output code changes from 000 to 001, where the output exactly represents the input voltage and
REF

the error reduces to zero. As the input voltage increases past V

REF

/8, the error again increases until the input voltage reaches V

REF

/4,

where the error again drops to zero. This process continues through the entire input range and the error plot is a saw tooth.

The fact that a range of input voltages, or quanta, is represented by and converted to a single code is what we call quantization. The maximum error we see above is 1 LSB. This 0 to 1 LSB range or errors is known as "Quantization Uncertainty" range because there is a range of analog input values that could have caused any given code and when we look at the digital word we are uncertain as to exactly what was the input voltage (or current) that was converted to that code. Since this error results from the quantization process, another name for this maximum error due to quantization is "Quantization Error". Since the ADC can only resolve the input into 2 discrete values. The converter resolution, then, is 1 in 2 . So, for an 2 Volt reference (with a unity gain factor), a 3-bit converter resolves the input into V /8 = 2V / 8 = 0.25 Volt steps. We can say that the
REF n n

converter "resolution" is 8 bits, or we can say, in this example, that it is 0.25 Volt. Quantization error is a "round off" error. But an error of 0 to 1 LSB is not as desirable as would be an error of LSB because an error range of 0 to 1 LSB means that the converter word has a maximum error of 1 LSB from the actual input value, whereas an error of LSB means that the converted word has a maximum error is just LSB from the actual input value. To get the LSB error rather than the 0 to 1 LSB error, we introduce an offset into the A/D converter to force the error range to be LSB.

Quantization Error
Quantization produces Noise and Uncertainty

1 The range of ADC input values that produces a single output code
1. Is called a quanta 2. Is the size of the LSB 3. Is equal to the Quantization Error range 4. All of these are correct 1 Answer: 4 - All of these are correct

2 The fact that a range of input voltages, or quanta, is represented by and converted to a single code is what we call
1. Converting 2. Quantization 3. Minimization 4. None of these is correct 2 Answer: 2 - Quantization

3 The error range due to quantization is called


1. Quantization Noise 2. Quantization Uncertainty 3. A quanta 4. ER 3 Answer: 2 - Quantization Uncertainty

4 In an ideal ADC with unity gain, the maximum conversion error is

4. ER 3 Answer: 2 - Quantization Uncertainty

4 In an ideal ADC with unity gain, the maximum conversion error is


1. VREF / 2 2. V 3. V 4. V 4 Answer: 2 - V
REF
REF REF REF

/2 /2 /2

(n) (n/2) (n/4)

/2

(n)

Adding LSB Offset to the ADC input


Building in a LSB offset at the ADC input will cause the output error to vary from - LSB to + LSB, rather than from 0 LSB to + 1 LSB. The error range, then, is LSB and the ADC is more accurate than it would be with an error range of 0 to 1 LSB. Rather than the transition from the code of zero to the next code being at 1 LSB, we add an offset of LSB and the first code transition point is at an input level of LSB, causing the output code to change when the input level is LSB less than it would if there were no added offset. The output changes from 000 to 001 with an input value of LSB rather than 1 LSB and all subsequent codes change at a point LSB below where they would have changed if there were no offset.

Note that each code transition point decreased by LSB compared with no offset, so that the first code transition (from 000 to 001) is at + LSB and the last code transition (from 110 to 111) is at 1 LSB below V .
REF

Note also that the maximum output code corresponds to an input of one LSB less than the reference voltage. The implication here is that a higher resolution ADC will have a maximum output code that corresponds to an input level that is closer to the reference than would a lower resolution ADC.

Adding LSB Offset to the ADC input


An error range of LSB is better than a range of 0 to 1 LSB and is accomplished by building in an offset.

1 To change the ADC error from a range of 0 to 1 LSB to a range of LSB


1. The user must offset his input 2. We build in a LSB offset at the ADC input 3. We slightly decrease the reference voltage 4. None of these is correct 1 Answer: 2 - We build in a LSB offset at the ADC input

2 As a result of the correction to get a "balanced" error around zero

4. None of these is correct 1 Answer: 2 - We build in a LSB offset at the ADC input

2 As a result of the correction to get a "balanced" error around zero


1. The first code transition point is at LSB 2. The full-scale transition occurs at 1 LSB below the reference 3. Both of these are correct 4. None of these is correct 2 Answer: 3 - Both of these are correct

3
A higher resolution ADC will have a maximum output code that corresponds to an input level that is closer to the reference than would a lower resolution ADC. 1. True 2. False 3 Answer: 1 - True

ADC Quantization Error with LSB Offset


The Quantization Error is smaller when an offset is built into the ADC. With an input voltage of zero, the output code is zero (000), as before. As the input voltage increases towards the LSB level, the error increases because the input is no longer zero, but the output code remains at zero. When the input reaches LSB, the output code changes from 000 to 001. The input is not yet at the 1 LSB level, but only at LSB, so the error is now - LSB. As the input increases past LSB, the error becomes less negative, until the input reaches 1 LSB, where the error is zero. As the input increases beyond 1 LSB, the error increases until the input reaches 1 LSB, where the output code is incremented by one and the sign of the error again becomes negative. This process continues through the entire input range.

The maximum Quantization Error is reduced to half of what it would be without the built in offset.

Quantization Error with LSB Offset


A half LSB built in offset reduces quantization error by The maximimum quantization error of an ADC with build in offset is half of what it would be without that built in offset. 1. True 2. False

The maximimum quantization error of an ADC with build in offset is half of what it would be without that built in offset. 1. True 2. False 1 Answer: 1 - True

DAC Transfer Function


The DAC transfer function is NOT the same as that of the ADC. It is a series of discrete points and there is no built in offset. The DAC transfer function has differences with that of the ADC. While the ADC input is analog and can be continuous, the DAC input is digital and discrete, causing its output to be discrete (at least in theory). The continuous analog input and discrete output of the ADC means that its transfer function is a series of straight lines, as we have seen. The discrete nature of both input and output of the DAC, however, means that both the input and the output are discrete, leading to a series of points on a plot of input vs. output, as seen in the 3-bit DAC transfer plot here.

As in the case of the ADC, it is common to show this plot as a staircase. If we looked at a DAC output with an oscilloscope, we would see the common staircase. The horizontal lines of the staircase are caused by the time between loading of successive codes to the DAC and the vertical lines of the staircase are caused by the finite rise time of the both the DAC output and the oscilloscope. The above output voltages are shown, of course, for a voltage output DAC with a voltage reference. Similar to the case with the ADC, a DAC can have either voltage or current reference and either voltage or current analog output. As a matter of fact, it is more common for DACs to have a current reference and/or a current output than it is for an ADC to have these. Unlike the ADC, the DAC does not have a built-in offset, but a DAC does have a Quantization Error and can suffer from DNL and INL errors.

DAC Transfer Function


The DAC transfer function is NOT the same as that of the ADC. It is a series of discrete points and there is no built in offset.

1 The DAC transfer function is identical to that of the ADC.


1. True 2. False 1 Answer: 2 - False

2 The DAC transfer function


1. Is a series of short, horizontal lines 2. Is a series of discrete points 3. Shows a LSB offset like the ADC 4. None of these is correct 2 Answer: 2 - Is a series of discrete points

3. Shows a LSB offset like the ADC 4. None of these is correct 2 Answer: 2 - Is a series of discrete points

3 Like an ADC, a DAC can have a current for a reference and/or a current output.
1. True 2. False 3 Answer: 1 - True

4 It is more common for a DAC to have a current for a reference and/or a current output than it is for an ADC.
1. True 2. False 4 Answer: 1 -True

5 The DAC
1. Does NOT have a built in offset 2. Can suffer from DNL and INL errors 3. Both of these are true 4. Neither of these is correct 5 Answer: 3 - Both of these are true

Quantization Noise
Quantization Noise, its cause and implications. 3.1 Quantization Noise 3.2 Performance Implication 3.3 Summary

Quantization Noise
What is Quantization Noise? Quantization produces Noise. Quantization Noise is inversely proportional to ADC resolution. The fact that the input signal is quantized means that noise is added to it. Quantization does not affect distortion, but does affect SNR and SINAD. This Quantization Noise is less with higher resolution converters because the input range is divided into a greater number of smaller ranges, so the error is lower than with lower resolution converters. Looking again at the ADC error vs. input code, we see that the error curve is a saw tooth wave.

Quantization Noise

Quantization Noise
What is Quantization Noise?

1 The fact that the input signal is quantized means that what is added to it?
1. Distortion 2. Noise 3. Both of these 4. Neither of these 1 Answer: 2. Noise

2 Quantization Noise is
1. Not present in DACs 2. Is proportional to resolution 3. Unique to DACs 4. None of these is correct 2 Answer: 4 - None of these is correct

Performance Implication
Increasing resolution will decrease quantization error and noise As the area under this saw tooth wave indreases, more noise (quantization noise) is added to the signal due to the quantization process. Since more bits means that the ADC analog input is divided into more pieces and smaller pieces, the error is less for higher resolution converters, leading to a higher maximum theoretical SNR at higher resolutions. In the case of DACs also, the smallest possible output steps are smaller with higher resolutions, so the output errors are smaller, again leading to better theoretical SNR at higher resolutions. Adding more bits makes each step size (quanta) smaller, so the maximum error is smaller. Looking at the error plots for 3-bit and 5-bit ADCs illustrates this fact. Since the amount of quantization noise depends upon the area under the error curve, higher resolution converters will offer better noise performance.

All of this equally true of DACs and ADCs.

Performance Implication
Increasing resolution will decrease quantization error and noise

1 Adding more bits makes each step size smaller


1. True 2. False

Increasing resolution will decrease quantization error and noise

1 Adding more bits makes each step size smaller


1. True 2. False 1 Answer: 1. True

2 A 10-bit ADC
1. Will have less quantization noise than will a 12-bit ADC 2. Will have the same quantization noise as an 11-bit ADC 3. Neither of these is correct 4. Both of these is correct 2 Answer: 3. Neither of these is correct

3 The same relationship between ADC resolution and quantization noise holds true for DACs.
1. True 2. False 3 Answer: 1. True

Summary
Course Summary We have discussed all of the following subjects, leaving you with a basic understanding of quantization and how it affects data converter performance. Data Converter Transfer Functions What is "Quantization"? Quantization Error Quantization Noise Performance Implications

Coding Schemes
In an ADC, the method used to determine the which Input and Reference values become which Output Code. The simplest is Straight Binary, where the output code starts with zero for minimum linear input and increases to the full-scale value of all ones at the maximum linear input value. In a DAC, the method used to determine which Input Code and Reference value becomes what analog output. The simplest coding scheme is Straight Binary.

LSB
The Least Significant Bit, this is the digital bit that has the smallest weight. With a single-ended ADC input or DAC output, it has a weight of VREF * G / 2^n, where VREF is the ADC reference voltage and "G" is the converter gain. In a differential input ADC \, it is 2 * VREF * G / 2^n.

Mixed-Signal Device
A device that has both Analog and Digital functions on a single die.

MSB
The Most Significant Bit, this is the digital bit that has the greatest weight. In a single-ended ADC or DAC it has the weight of VREF * G / 2, where VREF is the converter reference voltage and "G" is the converter gain. In a differential input ADC, the MSB value is 2 * V * G / 2.
REF

Quanta
The range of input values to a Quantizer (ADC) that is assiged a single digital output code.

REF

Quanta
The range of input values to a Quantizer (ADC) that is assiged a single digital output code.

Quantization Noise
The noise produced as a result of the discontinuous output of an ADC or DAC.

Quantizer
A Device that "quantizes", or assigns a single digital code to a range of analog values; an A/D Converter.

Quantizing
The process of assigning a single digital code to a range of analog values.

Resolution
There are two definitions of resolution: (1) the number of bits at the ADC output or DAC output and (2) the size (in Volts, millivolts, microvolts, etc.) of the average analog quantity representing one LSB.

TUE VREF
The converter Reference Voltage, V
REF

establishes the range of ADC input voltages or currents that can be digitized without going over range

or under range, or the range of DAC output voltages or currents.

Frequently Asked Questions


Do you have a question? We may have already answered it. Check below to see if you can find the answer to your question.

Questions Answers Contact/Help Information


For additional information on getting started go to http://www.national.com/analog/training/getting_started To contact us, and send feedback go to http://wwwd.national.com/feedback/newfeed.nsf/newfeedback?openform&category=pwdesignuniv For Frequently Asked Questions go to http://www.national.com/analog/training/faqs Thank you, PowerWise Design University Team

Quantization: Error and Noise Copyright 2010 by National Semiconductor Corporation All rights reserved

You might also like