quantizational process and noise shaping

Post on 26-Dec-2015

21 Views

Category:

Documents

18 Downloads

Preview:

Click to see full reader

TRANSCRIPT

DIGITAL SIGNAL PROCESSING

Lectured by Assoc. Prof. Thuong Le-Tien

Tel: 0903 787 989

Email: Thuongle@hcmut.edu.vn

September 2011

1

Quantization process and noise shaping

Quantization process and noise shaping

1. Quantization process.

2. Over sampling and Noise Shaping.

3. Digital to Analog conversion DAC.

4. Analog to Digital Conversion ADC.

2

1. Quantization Process

Analog to digital converter - ADC.

3

Analog

signal

x(t)

Sample & hole

Sampler & quantizer

x(nT)

Sampled

signal

A/D

converter

Quantized

signal x (nT)Q

To DSP

B bits/sample

Quantized sample xQ(nT) represented by B bits take

only one of 2B possible value.

Quantization width or quantizer resolution Q

4

R is the full-scale rangeB

RQ

2

B

Q

R2

R is in the symmetrical range:

Quantization error:

e(nT) = xQ(nT) – x(nT)

In general case: e = xQ – xwhere, xQ is the quantized value

5

22

Qe

Q

2)(

2

RnTx

RQ

Root Mean Square error:

Quantization error e can be assumed as a random variable which is distributed uniformly over the range [-Q/2, Q/2] then having probability density:

6

Mean: 01

2/

2/

Q

Q

edeQ

e

12

1 22/

2/

22 Qdee

Qe

Q

Q

12

2 Qeerms

7

2/

2/

)(][Q

Q

deeepeE

SNR (Signal-to-noise ratio): 20log10(R/Q) = 20log10(2B) = 20Blog10(2)

1)(2/

2/

Q

Q

deep

2/

2/

22 )(][Q

Q

deepeeE

-Q/2 Q/20

p(e)

e

other

Qe

Q

Qep

,0

22,

1

)(

Normalization 1/Q needed to guarantee

The statistical expectation

BQ

RSNR 6log20 10

8

)(2 ke

Assumed e(n) is white noise then the autocorrelation function is the delta function

12

)(2

22 QneEe

The average power or variance of e(n)

Example: in digital audio application, signal sampled at 44kHz and each sample quantized using a ADC having full scale of 10volts. Determine number of bits B if the rms quantization error must be kept below 50 microvolts. Then determine the actual rms error and bit rate

Sol:

Which is rounded to B=16

Then bit rate:

The dynamic range of the quantizer is 6B = 96 dB

10

2. Oversampling and noise shaping

Power spectrum of white quantization noise

Power spectrum density of e(n)

The noise power within at Nyquist sub-interval [fa, fb] with f = fb – fa :

The noise power over the entire interval f = fs

Noise shaping quantizers reshape the spectrum of the quantization noise into more convenient shape. This accomplished by filtering the white noise sequence e(n) by a noise shaping filter HNS(f).

xQ(n) = x(n) + (n)

11

22

es

s

e ff

12

Over Sampling ratio

Noise power within a given interval

Power spectral density2

22

)()()()( fHf

fSfHfS NS

s

eeeNS

b

a

b

a

f

f

NS

s

e

f

f

dffHf

dffS2

2

)()(

s

s

f

fL

'

Quantization noise powers12

22 Qe

To maintain the same quality required the power spectral density remain the same '

'22

s

e

s

e

ff

13

12

''

22 Qe

Lff e

s

ese

222 '

'

'

BBB

e

eL 2)'(2

2

2

22'

B = B-B’, or B = 0.5 log2 L

14

The total noise power in the Nyquist interval:

12

2B2- 1

122

p

p

Lp

15

p

s

NSf

ffH

2

2

'

2)(

2/'sff

12

22

122

2

2/

2/

122

2

22

2

1

12'

'12'

'12'

'

2

'

'

p

p

e

p

s

sp

e

f

f

p

s

sp

e

p

ss

ee

Lpf

f

p

f

f

pdf

f

f

f

s

s

22 '/ ee

= 2 -2(B-B’) = 2 -2B

12

22

122

2

2/

2/

122

2

222

1

12'

'12'

'12'

'

2

'

'

p

p

e

p

s

sp

e

f

f

p

s

sp

e

p

ss

ee

Lpf

f

p

f

f

pdf

f

f

f

s

s

12

22

122

2

2/

2/

122

2

22

2

1

12'

'12'

'12'

'

2

'

'

p

p

e

p

s

sp

e

f

f

p

s

sp

e

p

ss

ee

Lpf

f

p

f

f

pdf

f

f

f

s

s

22 '/ ee

12log5.0log)5.0(

2

22p

LpBp

16

Oversampling and noise shaping system

3. Digital to Analog Converter DAC

B bit 0 and 1 at input, b = [b1, b2,…, bB],

(a) unipolar natural binary,

(b) bipolar offset binary,

(c) bipolar 2’s complement.

17

Unipolar natural binary

xQ = R(b12-1 + b22-2 + … + bB2

-B)

xQ = R2-B(b12B-1 + b22

B-2 + … + bB-121 + bB)

Bipolar offset binary

xQ = R(b12-1 + b22

-2 + … + bB2-B – 0.5)

Two’s complement

xQ = R(b12-1 + b22

-2 + … + bB2-B – 0.5)

18

19

Converter code for B=4bits, R=10volts

20

4. Analog to Digital Converter (ADC)

Example: A sampled sinusoid x(n)=Acos(2pfn), A=3voltsAnd f=0.04 cycles/sample. The sinusoid is evaluated at the tenSampling times n=0,1,2…9 and x(n) is quantized using a 4-bit ADC with R=10volts. The following table shows the sampled and quantized values and its codes

22

5. Analog and Digital DitherDither is a low-level white noise signal added to the input before quantization for eliminating granulation or quantization distortion and making the total quantization error behave like white noise

Analog dither

23

Digital dither can be added to a digital prior to a requantization operation that reduces the number of bits representing the signal.

Nonsubtractive dither process and quantization(Analog and digital dithers)

v(n) is dither noise

24

y(n) = x(n) + v(n)Quantization error: e(n) = yQ(n) – y(n)Total error resulting from dithering and quantization:

(n) = yQ(n) – x(n)(n) = (y(n) + e(n)) – x(n) = x(n) + v(n) + e(n) – x(n)or

(n) = yQ(n) – x(n) = e(n) + v(n) Total error noise power

22222

12

1vve Q

The two common Rectangular and triangular dither probability densities

25

10log2 = 3 dB10log3 = 4.8 dB10log4 = 6 dB

Total error variance (the noise penalty in using dither)

Subtractive dither

Total error (n) = yout(n) – x(n) = (yQ(n) – v(n)) – x(n) = yQ(n) – (x(n) + v(n))

(n) = yQ(n) – y(n) = e(n)

26

0 20 40 60 80 100 120-1,5

-1,0

-0.5

0

0.5

1,0

1,5

0 0,1 0,2 0,3 0,4 0,5

60

120

180

240Undilhered Quantization Undilhered Spectrum

Ma

gn

itu

de

(Un

its o

f Q

)

Quantized

Original

Dithered Quantization Dithered Spectrum

-1,5

-1,0

-0.5

0

0.5

1,0

1,5

(Un

its o

f Q

)

60

120

180

240

Ma

gn

itu

de

0 20 40 60 80 100 120 0 0,1 0,2 0,3 0,4

Quantized

Dithered original

0,5

top related