quantization prof. siripong potisuk. a block diagram of a dsp system

24
Quantization Prof. Siripong Potisuk

Upload: irma-bailey

Post on 17-Dec-2015

221 views

Category:

Documents


0 download

TRANSCRIPT

Quantization

Prof. Siripong Potisuk

A Block Diagram of a DSP System

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 analogvoltage with infinite precision to finiteprecision is called the quantization process.

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

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

2minmaxminmax

1,,1,0,min Liixxq

minxxroundi

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.

Quantization Error• Also known as quantization noise

• Modeled as a random variable uniformly distributed over the interval with probability density p(eq) = 1/

• The average power of the quantization noise is

xxe qq

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.

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

qq

neN

nxN

eE

xESNR

rms

dBq

xSNRSNR 1010 log2079.10)(log10

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

maxminmax ||2 xxx

Thus,

max1010 ||2

2log2079.10log2079.10

x

xxSNR rms

Nrms

dBq

2log202log20||

log2079.10 1010max

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.

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

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

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