lecture 2 analog digital

5
Lecture 2 Analog Digital Conversion: The analog digital conversion is divided into two parts. I- Quantification II- Coding Quantification: It consists into mapping the samples of a signal to a finite discrete set of amplitudes. So each amplitude interval at the input of the qunatizer is mapped to 1 value which is the middle of the interval. See figure below 0 q -q First interval second interval third interval Input signal amplitude ( between 2 dashed line) Quantized value  Example of a quantizer with 3 levels (-q,0,q) Another representation of the quantization is given in the following figure. Uniform Qunatification q q 2q 2q 3q 3q -q -2q -3q -q -2q -3q 0 Input value  The quantization process introduces a noise which is the difference between the real amplitude value and the quantified value. The quantization noise power= 12  / 2 q  The Quatization error has the following distribution.

Upload: firas-abdel-nour

Post on 02-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

7/27/2019 Lecture 2 Analog Digital

http://slidepdf.com/reader/full/lecture-2-analog-digital 1/5

Lecture 2 Analog Digital Conversion:

The analog digital conversion is divided into two parts.

I-  Quantification

II- Coding

Quantification:It consists into mapping the samples of a signal to a finite discrete set of amplitudes.

So each amplitude interval at the input of the qunatizer is mapped to 1 value which

is the middle of the interval. See figure below

0

q

-q

First interval

second interval

third interval

Input signal amplitude

( between 2 dashed line)Quantized value

 Example of a quantizer with 3 levels (-q,0,q)

Another representation of the quantization is given in the following figure.

Uniform Qunatification

q

q

2q

2q

3q

3q

-q-2q-3q

-q

-2q

-3q

0Input value

 

The quantization process introduces a noise which is the difference between the real

amplitude value and the quantified value.

The quantization noise power= 12 / 2q  

The Quatization error has the following distribution.

7/27/2019 Lecture 2 Analog Digital

http://slidepdf.com/reader/full/lecture-2-analog-digital 2/5

x

e(x)

q/2

q/2

-q/2

-q/2

 So the errors are equally distributed between –q/2 and +q/2 with e(x)=x. probability of 

each error=1/q.

The quantization error= the variance of the quantization error 

Noise power=

12)

2424(

1

3

3.

1)().(

1.)().()(

2332 / 

2 / 

2 / 

2 / 

22 / 

2 / 

22 qqq

q

e

q xd  xe

qdx x p xe x E 

q

q

q

q

q

q

=+====

−−−

∫∫  

The input signal full scale voltage (peak to peak) = L*q where L= the number of levels. For the previous example L=3.

The input signal power =8

.

2

][

2

max22

22 q L2

)q*(L

V ==  

So the signal to noise ratio is given by :

)log(.2076,1)2

3log(.10)

2 / )

2  L L /12q

Vmax10log(

Pnoise

Ps10log(SNR

2

2

+==== dB.

So it’s obvious that by increasing the number of quantification levels we can reducethe noise power and increase the signal to noise ratio.

II –Coding:The coding operation consists in attributing a digital code for each of the quantized levels.

For representing L levels we need n=Log2(L) bits or L=2n. For example we need 3 bits to

generate 8 different codes for 8 different quantization levels 3 bits =log2(8 levels ) or 23

=8.

The signal to noise ratio could be expressed in term of bits of the analog digital converter by

simply replacing L in the previous equation by 2n.

n LSNR n02,676,1)2log(.2076,1)log(.2076,1 +=+=+= dB.

 Remark:

- Each additional bit used for coding    6 dB increase in the SNR.- Each additional bit means that the number of quantification levels will be multiplied by a

 factor of 2.

 Example: Human voice is situated in the frequency band 80 Hz-3400 Hz. The voice is

 digitized using n bits ADC, the sampling frequency is 8000 samples/s. We require an SNR

 of 40 dB for good reproduction of the voice

Calculate n and the bit rate of the resulting digital signal.

Solution:

7/27/2019 Lecture 2 Analog Digital

http://slidepdf.com/reader/full/lecture-2-analog-digital 3/5

SNR=40    n=7 bits because 6 bits will give an SNR<40 dB.

 Bit rate= 8000 samples/s * 7 bits/sample = 56 Kbps.

 Remark: the SNR calculated corresponds to a full scale input signal.

What will be the SNR in the case of a signal with a smaller amplitude.

==== )

.12

.2log(.10)

12 / 

2 / log(.10)

max2

2

max2

2

2

2

a

q

a

a

q

a

Pnoise

Ps10log(SNR  

Where a is the amplitude of the input signal and amax=L.q/2 is the max amplitude of 

the input signal.

72,102,6)log(.20

72,102,6)log(.10).2

.12log(.10)log(.10)

.12

.2log(.10

max

max2

2

2

max2

max2

2

max2

2

max2

2

++

=++=+==

 N a

a

 N a

a

q

a

a

a

a

q

a

a

 

So the SNR will decreases if a < amax.For example for a amax/2  or Pmax -6 dB The SNR = SNR) full scale- 6dB.

So the SNR decreases dramatically for small signals which is not good.

For a signal with max amplitude= 4 q for example and n=8 bits.

2

.q2 L.q/2amax

n

== a=4q  a/amax=5

8

2

22 / .2

2 −=

q

SNR decreases by

dBa

a 30)2log(.100)2log(.20)log(.20 5

max

−=−== −  

The problem is that that human ear is sensitive to small signals and they have higher

probability of existence so they should be quantified with low quantization error .

This is due to the fact that the error is situated in an interval of [-q/2,q/2]

Whatever the amplitude of the signal , So for smaller input values error becomes even higher

than the signal

Solution:

In order to improve the SNR for small signals we should make the error small when the signal

is small .This could achieved by modifying the signal (compressing it) with a function which

compress the Signal when the amplitude is high and stretch the signal when the amplitude is

small.

The most known compression LAW is called µ law.

It has the following expression:

 µ 

 µ 

+

+=

1

|).|1ln(  x y x: is the normalised input value. Maximum=1

7/27/2019 Lecture 2 Analog Digital

http://slidepdf.com/reader/full/lecture-2-analog-digital 4/5

x/xmax

µµµµ law compression

1

1

 µ 

 µ 

+

+=

1

|).|1ln(  x y

 The compressed signal is quantified with uniform quantizer as shown in the following figure.

1

3q

0

x/xmax

Uniform quantification

Without compression

µµµµ law compression

2q

q

 X ∆  Non uniform quantification

As we can see the quanization intervals on the x axis are not the same.

Smaller amplitudes are quantified with smaller intervals smaller errors

The maximum error amplitude for each interval=  X ∆  /2.

Remark:

The compressed signal is quantified with the same quantizer (uniform on the y axis).

The American and Japanese standards uses this compression LAW with a 255= µ  (high

compression)

We need for decoding to use the inverse of the function used for compression . Otherwise wewill obtain a different signal This operation is called expanding.The whole operation of compression, quantization, expansion is called compounding.

The max error amplitude = the value of interval /2. ( before it was –q/2 q/2, the interval

value =q).

The full scale of a such quantizer is given by the following expression:

7/27/2019 Lecture 2 Analog Digital

http://slidepdf.com/reader/full/lecture-2-analog-digital 5/5

)2.log(.102n

dB C SNR = where2)]1[ln(

3

 µ +=C   

nnC SNRdB 66)log(.10 +=+= α   

The following figure shows a comparison of the uniform and non uniform quantization for

different input amplitudes.

The SNR of non uniform quantizer is less than that of the uniform quantizer but it’s advantage

is that, the SNR does not decrease for small amplitude like in the case of uniform quantizer