a block diagram of a dsp system - the citadel, the...

12
8/31/2017 1 Quantization Prof. Siripong Potisuk A Block Diagram of a DSP System

Upload: truongdang

Post on 05-Aug-2019

213 views

Category:

Documents


0 download

TRANSCRIPT

8/31/2017

1

Quantization

Prof. Siripong Potisuk

A Block Diagram of a DSP System

8/31/2017

2

Analog-to-Digital Conversion (ADC)

Discretize the independent variable or time of an

analog signal (Sampling)

Discretize the dependent variable or amplitude of

an analog signal by rounding off to the nearest

integer (Quantization)

Each quantization level represented using binary

encoding scheme (Encoding)

Flash, Successive approximation, Sigma-delta

A Typical ADC Process

The process of converting analog

voltage with infinite precision to finite

precision is called the quantization process.

8/31/2017

3

Analog-to-Digital Conversion (ADC)

Quantizer Input-output Characteristics

Similar to passing a discrete-time signal through

a piecewise constant staircase type function

2 types: mid-tread and mid-rise

8/31/2017

4

8/31/2017

5

Quantization Level

• Suppose the value of x[n] ranges over the interval [xmin, xmax]. The spacing between adjacent quantization level or step size (ADC resolution) is

• L = # of quantization levels

• N = # of binary bits used to represent the value of x[n]

• The resulting quantization level, xq , is

• i is an index corresponding to the binary code

N

xx

L

xx

2

minmaxminmax

1,,1,0,min Liixxq

minxx

roundi

Example

A speech signal has a maximum frequency of 4 kHz.

We want to digitize it and send it in a file using 2

bytes (i.e., 16 bits) per sample. What would be the

minimum length of the file occupied by the signal for

each minute of recording? Assume the signal is not

compressed.

8/31/2017

6

Quantization Error

• Also known as quantization noise

• Modeled as a random variable uniformly distributed

over the interval [/2, /2] with probability density

p(eq) = 1/.

• The average power of the quantization noise is

xxe qq

8/31/2017

7

Example 2.9 & 2.10 (text)

Assuming that a 3-bit ADC accepts an analog input

ranging from 0 to 5 volts, determine

(a) the number of quantization levels;

(b) the step size or resolution of the quantizer;

(c) the quantization level corresponding to the

analog value of 3.2 volts;

(d) the binary code produced by the encoder.

(e) the quantization error corresponding to the 3.2-V

analog input.

Problem 2.27 (text)

Assuming that a 3-bit ADC accepts an analog input

ranging from -2.5 to 2.5 volts, determine

(a) the number of quantization levels;

(b) the step size or resolution of the quantizer;

(c) the quantization level corresponding to the

analog value of -1.2 volts;

(d) the binary code produced by the encoder.

(e) the quantization error corresponding to the

analog input.

8/31/2017

8

Example

Suppose the amplitude of a discrete-time signal x[n]

is constrained to lie in the interval [-10, 10]. If the

average power of the quantization noise is to be

less than 0.001, what is the minimum number of bits

that are needed to represent the value of x[n]?

Signal-to-quantization Noise Ratio (SNRq)

A figure of merit expressed in terms of the ratio

between signal power and the quantization noise

power

Usually expressed in decibels (dB)

1

0

2

1

0

2

2

2

][1

][1

)(

)(N

nq

N

n

q

q

neN

nxN

eE

xESNR

rms

dBq

xSNRSNR 1010 log2079.10)(log10

8/31/2017

9

Special Case: The signal has a full-scale dynamic range

maxminmax ||2 xxx

Thus,

max

1010||2

2log2079.10log2079.10

x

xxSNR rms

N

rms

dBq

2log202log20||

log2079.10 1010

max

10

N

x

xrms

dBNx

xrms 02.6||

log2077.4max

10

Increasing 1 bit of the ADC quantizer can improve

SNRq by 6 dB The 6-dB rule

For a full-scale sinusoidal signal with amplitude A,

NNA

ASNR

dBq 02.676.102.6707.0

log2077.4 10

Example

In a DSP system, the output SNRq is to be held to a

minimum of 40 dB. Determine the number of

required quantization levels, and the corresponding

SNRq assuming a full-scale sinusoidal input.

8/31/2017

10

Flash ADC Unit

One of several ways to implement ADC

Consists of a series of reference voltages created

by equal resistors

A set of comparators is used to compare the input

voltage with the reference voltages

An encoding logic unit outputs the binary sequence

Offers high conversion speed

Impractical for high-resolution applications

An Example of a Simple 2-bit Flash ADC

8/31/2017

11

Non-uniform Quantization

Needed for signals whose smaller amplitudes

predominate and larger ones are rare (i.e.,

speech)

Difficult to design

Companding

Pre- and post-processing applied to a uniform quantizer to achieve non-uniform quantization

The combination of compression and expansion

The signal samples first compressed before passing through a uniform quantizer

To restore the signal samples to their correct relative level, an expander with a characteristic complementary to that of the compressor is used in the receiver

8/31/2017

12

Characteristics of a compressor

Compression Law

-law (used in digital telephony in North America

& Japan with = 255)

A-law (used in Europe with A = 87.6)

1),sgn()1ln(

1ln

max

max

x

xx

x

x

y

11

1

),sgn(ln1

ln1

,ln1

max

max

max

max

x

x

A

Ax

x

xA

x

xA

x

x

A

A

y