Вы находитесь на странице: 1из 6 Quantization
Spring 2009
University Gaza
1

Quantization

Sampling converts the analogue signal into discrete value of samples.

The values of theses samples depends on the sampling instants.

We need to encode each sample value in order to store it in b bits memory location.

But as b is limited, we have to consider a finite values of samples.

For example If b = 2 , we can have 2 b =4 different possible sample values.

If b = 4, we can have 2 b =16 different possible sample values.

.

.

Digital Signal Processing

Slide 2

Quantization

Example: let x(t) = 0.9 n .

If we sample at every 1 s, X(n) = {1, 0.9, 0.81, 0.229, 0.6561, 0.59049,….}

The sample values are infinite set of numbers between 0 and 1

If b = 4, then we have 16 possible codeword's {0000, 0001,

,1111}

Each code word can be assigned to one sample value. So we can have maximum 16 possible values of the samples.

Digital Signal Processing

Slide 3

Quantization

 X(n)=x(nT) Xq(n) Eq(n)= xq(n)-x(n) 0 1 1.0 0.0 1 0.9 0.9 0.0 2 0.81 0.8 -0.01 3 0.729 0.7 -0.029 4 0.6561 0.7 0.0439 5 0.59049 0.6 0.00951 6 0.531441 0.5 -0.031441 7 0.4782969 0.5 0.0217031 8 0.43046721 0.4 -0.03046721 9 0.387420489 0.4 0.012579511

Digital Signal Processing

Slide 4

 Before quantization  The value of x(n) = x(nTs) can take any value from 0  1 (continuous values) 11 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 1 2 3 4 5 6 7 8 9 Digital Signal Processing Slide 5 After quantization  The value of xq(n) can take only discrete values from the set  {0, 0.1, 0.2, …, 1} 11 0000 0.9 0001 0.8 0010 ∆ 0.7 0011 0.6 0100 0.5 0101 0.4 0110 0111 0.3 0.2 1000 0.1 1001 0 0 1 2 3 4 5 6 7 8 9 1010 Digital Signal Processing Slide 6

Quantization error

The quantization error e q (n) is limited to the range -/2 to /2 that is - /2 e q (n) /2

If x min and x max represent the maximum and the minimum values of x(n) and L is the number of quantization levels, then =(x max - x min )/(L-1)

Quantization noise can be reduced by increasing L.

Quantization is an irreversible process

Digital Signal Processing

Slide 7

Quantization of sinusoidal signal

Consider the following sinusoidal signal Digital Signal Processing

Slide 8

Quantization of sinusoidal signal

The mean-square error power pq is

But as e q (t)= ∆t/(2) -t  If the quantizer has b bits accuracy and covers the entire range 2A. Then the quantization step is =2A/2 b

P q = A 2 /(3*2 2b )

Digital Signal Processing

Slide 9

P q

1

2

e

2

q



t dt

P

q

1

2

2

t

2

2

dt  2

12

Quantization of sinusoidal signal

The average power of the sinusoidal signal is

P s = A 2 /2

Then the signal to quantization noise ratio is SQNR = P s /P q = (3/2)2 2b

Expressed in dB

SQNR = 1.76 + 6.02b dB

Digital Signal Processing

Slide 10

Homework

Students are encouraged to solve the following questions from the textbook

1.13, 1.14

Digital Signal Processing

Slide 11