1 / 27

Quantization

Quantization. Digital representations of analog signals are in the form of bits. These bits are taken from an analog-to-digital converter, processed and then put to a digital-to-analog converter. . bits. x. y. A/D. Filtering. D/A. bits.

marty
Télécharger la présentation

Quantization

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Quantization

  2. Digital representations of analog signals are in the form of bits. These bits are taken from an analog-to-digital converter, processed and then put to a digital-to-analog converter. bits x y A/D Filtering D/A bits

  3. What is the number of bits needed per sample to accurately represent the analog signal?

  4. WithB bits, we can represent 2B different values. For example, if B=3, we can have eight different values corresponding to 000, 001, 010, 011, 100, 101, 110, 111. The 2B values can correspond to volts, millivolts, multiplies of 0.25 volts, etc.

  5. Example: Suppose we had B=3 bits corresponding to a number which is equal to the voltage of a signal (at some point in time). The 23=8 different voltage levels are 0V, 1V, 2V, 3V, 4V, 5V, 6V and 7V. A digital-to-analog converter would convert 000 to 0V, 001 to 1V, etc. An analog-to-digital converter would convert an input signal at 0V to 000. An input of 1V would be converted to 001; an input of 2V would be converted to 010, etc.

  6. Suppose the input signal to an analog-to-digital converter were 1.5V. Would this voltage be converted to 001 or 010? The answer depends upon the type of quantization used by the analog-to-digital converter. If the type of quantization is truncation, then allvalues from 1.0V up to but not including 2.0V are converted to 001. If the type of quantization is rounding, then allvalues from 0.5V up to but not including 1.5V are converted to 001. Values of from 1.5V up to but not including 2.5V are converted to 010.

  7. ^ Let xbe the quantized version of x. While x can take on any value, x can only take on discrete values corresponding to the output of a digital-to-analog converter such as 1.0, 2.0, 3.0 (volts). ^ If we cascade an analog-to-digital converter with a digital-to-analog converter we will get a quantizer that converts x to x. ^ 000, 001, … ^ x x A/D D/A

  8. ^ The relationships between x and x are shown on the following graphs.

  9. ^ x Truncation 111 7 110 6 101 5 100 4 011 3 010 2 001 1 000 x 1 2 3 4 5 6 7 8

  10. ^ x Rounding 7 6 5 4 3 2 1 x 1 2 3 4 5 6 7 8

  11. Negative values can also be represented digitally. There are two common formats: sign magnitude and two’s complement. In sign magnitude format, the most significant bit is a sign bit:1 is negative,0 is positive. In two’s complement format, positive numbers are like normal positive numbers. Negative numbers are wrapped backwards: -1 is 111, -2 is 110, etc.

  12. Shown on the following graphs are signed quantization levels and values for truncation and rounding quantization, and sign magnitude and two’s complement formats.

  13. ^ x Truncation, Sign Magnitude 011 010 001 x 000 101 110 111

  14. ^ x Truncation, Two’s Complement 011 010 001 x 000 111 110 101 100

  15. ^ x Rounding, Sign Magnitude 011 010 001 x 000 101 110 111

  16. ^ x Rounding, Two’s Complement 011 010 001 x 000 111 110 101 100

  17. In all of the previous quantization examples, the step size was one (1). The step size could be 0.5, 0.25, etc. Let D be the step size, also known as the quantization interval. For truncation quantization, the quantization error is between 0 and D. For rounding quantization, the quantization error is between -D/2 and +D/2.

  18. The ratio of the maximum signal magnitude to the quantization interval is a measure of the fidelity of the digitized sample. Let us see if we can relate this ratio to a more common ratio called the signal-to-noise ratio (SNR). Let A be the maximum magnitude of a signal. The ratio of the maximum magnitude to the quantization interval is A/D. The signal-to-noise ratio is a ratio of powers. The power in a signal is related to its distribution.

  19. If the signal is uniformlydistributed between –A and A, the distribution looks like this: px(x) x -A A

  20. In many cases, we can assume that the distribution of the quantization error, e, is uniform: pe(e) Truncation e D

  21. In many cases, we can assume that the distribution of the quantization error, e, is uniform: pe(e) Rounding e -D/2 D/2

  22. The power may be obtained from a distribution by integrating the product of the distribution with x2 or e2.

  23. For truncation quantization we have

  24. For rounding quantization we have

  25. We can now calculate the signal-to-noise ratio for a uniformly distributed signal with truncation and rounding quantization:

  26. Exercise: If we use B-bit quantization (with 2B quantization levels), express the signal-to-noise ratio in dB [=10 log (power ratio)] in terms of B for both truncation and rounding quantization. (In both cases, 2A/D = 2B.)

More Related