Top Banner

of 17

DSP-Lec 02-Quantization.pdf

Jun 02, 2018

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/10/2019 DSP-Lec 02-Quantization.pdf

    1/17

    Click to edit Master subtitle style

    Quantization

    Chapter 2

    Department of Telecommunications Engineering

    Ho Chi Minh City University of Technology

  • 8/10/2019 DSP-Lec 02-Quantization.pdf

    2/17

    Digital Signal Processing

    1. Quantization process

    2 Quantization

    The quantized sample xQ(nT)is represented by Bbit, which can take

    2Bpossible values.

    Fig: Analog to digital conversion

    An A/D is characterized by a full-scale range Rwhich is dividedinto 2Bquantization levels. Typical values of R in practice are

    between 1-10 volts.

  • 8/10/2019 DSP-Lec 02-Quantization.pdf

    3/17

    Digital Signal Processing

    1. Quantization process

    3

    Fig: Signal quantization

    Quantization

    Quantizer resolution or quantization width2B

    RQ

    A bipolarADC ( )2 2

    Q

    R Rx nT

    A unipolarADC 0 ( )Qx nT R

  • 8/10/2019 DSP-Lec 02-Quantization.pdf

    4/17

    Digital Signal Processing

    1. Quantization process Quantization error

    4 Quantization

    Quantization by rounding: replace each value x(nT) by the nearest

    quantization level.

    ( ) ( ) ( )Qe nT x nT x nT

    Quantization by truncation: replace each value x(nT) by its below

    quantization level.

    Quantization error:

    Consider rounding quantization:2 2

    Q Qe

    Fig: Uniform probability density of quantization error

  • 8/10/2019 DSP-Lec 02-Quantization.pdf

    5/17

    Digital Signal Processing

    1. Quantization process Quantization error

    5 Quantization

    The mean value of quantization error

    The mean-square error (power)

    /2 / 2

    /2 /2

    1

    ( ) 0

    Q Q

    Q Qe ep e de e deQ

    /2 /2 2

    2 2 2 2

    / 2 /2

    1( )

    12

    Q Q

    Q Q

    Qe e p e de e de

    Q

    Root-mean-square (rms) error: 212

    rmsQe e

    R and Q are the ranges of the signal and quantization noise, then the

    signal to noise ratio (SNR) or dynamic range of the quantizer is

    defined as

    10 10 1020 log 20 log (2 ) log (2) 6B

    dB

    RSNR B B dB

    Q

    which is referred to as 6 dB bit rule.

  • 8/10/2019 DSP-Lec 02-Quantization.pdf

    6/17

    Digital Signal Processing

    1. Quantization process Example

    6 Quantization

    In a digital audio application, the signal is sampled at a rate of 44KHz and each sample quantized using an A/D converter having a

    full-scale range of 10 volts. Determine the number of bits B if the

    rms quantinzation error mush be kept below 50 microvolts. Then,

    determine the actual rms error and the bit rate in bits per second.

  • 8/10/2019 DSP-Lec 02-Quantization.pdf

    7/17

    Digital Signal Processing

    2. Digital to Analog Converters (DACs)

    7 Quantization

    We begin with A/D converters, because they are used as the building

    blocks of successive approximation ADCs.

    Fig: B-bit D/A converter

    Vector B input bits : b=[b1, b2,,bB]. Note that bBis the leastsignificant bit (LSB)while b1is the most significant bit (MSB).

    For unipolar signal, xQ[0, R); for bipolar xQ[-R/2, R/2).

  • 8/10/2019 DSP-Lec 02-Quantization.pdf

    8/17

    Digital Signal Processing

    2. DAC-Example DAC Circuit

    8 Quantization

    Fig: DAC using binary weighted resistor

    Rf

    31 2 4

    2 4 8 16REF f f f f

    bb b bI V

    R R R R

    31 2 4

    2 4 8 16Q OUT f REF

    bb b bx V I R V

    16Rf8Rf4Rf2RfxQ=Vout

    -VREF

    iI

    LSB

    MSB

    b1bB

    4 3 2 1 0 3 2 1 01 2 3 4 1 2 3 42 2 2 2 2 2 2 2 2Qx R b b b b Q b b b b

    Full scale R=VREF, B=4 bit

  • 8/10/2019 DSP-Lec 02-Quantization.pdf

    9/17

    Digital Signal Processing

    2. D/A Converters

    9 Quantization

    Unipolar natural binary

    where m is the integer whose binary representation is b=[b1, b2,,bB].

    1 2 0

    1 22 2 ... 2B B

    Bm b b b

    Bipolar offset binary: obtained by shifting the xQof unipolar naturalbinary converter by half-scale R/2:

    1 2

    1 2( 2 2 ... 2 )B

    Q Bx R b b b Qm

    1 2

    1 2( 2 2 ... 2 )2 2

    B

    Q B

    R Rx R b b b Qm

    Twos complement code: obtained from the offset binary code bycomplementing the most significant bit, i.e., replacing b1by .

    1 2

    1 2( 2 2 ... 2 )2

    B

    Q B

    Rx R b b b

    1 11b b

  • 8/10/2019 DSP-Lec 02-Quantization.pdf

    10/17

    Digital Signal Processing

    2. D/A Converters-Example

    10 Quantization

    A 4-bit D/A converter has a full-scale R=10 volts. Find the quantizedanalog values for the following cases ?

    a) Natural binary with the input bits b=[1001] ?

    b) Offset binary with the input bits b=[1011] ?

    c) Twos complement binary with the input bits b=[1101] ?

  • 8/10/2019 DSP-Lec 02-Quantization.pdf

    11/17

    Digital Signal Processing

    3. A/D converter

    11 Quantization

    A/D converters quantize an analog value x so that is is represented

    by B bits b=[b1, b2,,bB].

    Fig: B-bit A/D converter

  • 8/10/2019 DSP-Lec 02-Quantization.pdf

    12/17

    Digital Signal Processing

    3. A/D converter

    12 Quantization

    One of the most popular converters is the successive approximation

    A/D converter

    Fig: Successive approximation A/D converter

    After B tests, the successive approximation register (SAR) will hold

    the correct bit vector b.

  • 8/10/2019 DSP-Lec 02-Quantization.pdf

    13/17

    Digital Signal Processing

    3. A/D converter

    13 Quantization

    This algorithm is applied for the natural and offset binary with

    truncation quantization.

    where the unit-step function is defined by

    1 0

    ( ) 0 0

    if x

    u x if x

    Successive approximation algorithm

  • 8/10/2019 DSP-Lec 02-Quantization.pdf

    14/17

    Digital Signal Processing

    3. A/D converter-Example

    14 Quantization

    Consider a 4-bit ADC with the full-scale R=10 volts. Using the

    successive approximation algorithm to find offset binary oftruncation quantization for the analog values x=3.5 volts and x=-1.5

    volts.

  • 8/10/2019 DSP-Lec 02-Quantization.pdf

    15/17

    Digital Signal Processing

    3. A/D converter

    15 Quantization

    For rounding quantization, we

    shift x by Q/2:

    For the twos complement

    code, the sign bit b1is treatedseparately.

  • 8/10/2019 DSP-Lec 02-Quantization.pdf

    16/17

    Digital Signal Processing

    3. A/D converter-Example

    16 Quantization

    Consider a 4-bit ADC with the full-scale R=10 volts. Using the

    successive approximation algorithm to find offset and twos

    complement of rounding quantization for the analog values x=3.5

    volts .

  • 8/10/2019 DSP-Lec 02-Quantization.pdf

    17/17

    Digital Signal Processing

    Homework

    17 Quantization

    Problems 2.1, 2.2, 2.3, 2.5, 2.6