Presentation is loading. Please wait.

Presentation is loading. Please wait.

Quantization and Encoding

Similar presentations


Presentation on theme: "Quantization and Encoding"— Presentation transcript:

1 Quantization and Encoding
Soutenance de thèse vendredi 24 novembre 2006, Lorient Lecture 5 Quantization and Encoding

2 Analog-Digital Converter (ADC)
An electronic integrated circuit which converts a signal from analog (continuous) to digital (discrete) form Provides a link between the analog world of transducers and the digital world of signal processing and data handling t

3 Analog-Digital Converter (ADC)
An electronic integrated circuit which converts a signal from analog (continuous) to digital (discrete) form Provides a link between the analog world of transducers and the digital world of signal processing and data handling t

4 ADC Conversion Process
Two main steps of process Sampling and Holding Quantization and Encoding Analog-to-Digital Converter t Input: Analog Signal Sampling and Hold Quantizing and Encoding

5 ADC Process Sampling & Hold
Measuring analog signals at uniform time intervals Ideally twice as fast as what we are sampling Digital system works with discrete states Taking samples from each location Reflects sampled and hold signal Digital approximation t

6 Measuring analog signals at uniform time intervals
ADC Process Sampling & Hold Measuring analog signals at uniform time intervals Ideally twice as fast as what we are sampling Digital system works with discrete states Taking a sample from each location Reflects sampled and hold signal Digital approximation t

7 ADC Process Sampling & Hold
Measuring analog signals at uniform time intervals Ideally twice as fast as what we are sampling Digital system works with discrete states Taking samples from each location Reflects sampled and hold signal Digital approximation t

8 Analog quantization size Encoding
ADC Process Quantizing Separating the input signal into a discrete states with L increments L=2N N is the number of bits of the ADC Analog quantization size ∆=(xmax - xmin)/2N ∆ is the Resolution Encoding Assigning a unique digital code to each state for input into the microprocessor

9 Quantization Level Suppose the value of x[n] (sampled values) 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

10 ADC Process Quantization & Coding Use original analog signal

11 Use original analog signal Apply 2 bit coding
ADC Process Quantization & Coding Use original analog signal Apply 2 bit coding 11 10 01 00 K= 10 11

12 Use original analog signal Apply 2 bit coding
ADC Process Quantization & Coding Use original analog signal Apply 2 bit coding 11 10 01 00 K= 10 11

13 Use original analog signal Apply 3 bit coding
ADC Process Quantization & Coding Use original analog signal Apply 3 bit coding K= 010 011 100 101 110 111

14 Use original analog signal Apply 3 bit coding
ADC Process Quantization & Coding Use original analog signal Apply 3 bit coding Better representation of input information with additional bits MCS12 has max of 10 bits K= 010 011 100 101 110 111 K= K=… . . . 1111

15 Quantization Error When a signal is quantized, we introduce an error - the coded signal is an approximation of the actual amplitude value. The difference between actual and coded value (midpoint) is referred to as the quantization error. The more zones, the smaller  which results in smaller errors. BUT, the more zones the more bits required to encode the samples -> higher bit rate

16 Quantization Error The difference between actual and coded value (midpoint) is referred to as the quantization error. Also known as quantization noise Modeled as a random variable uniformly distributed over the interval [-D/2, D/2] with probability density p(eq) = 1/D. The average power of the quantization noise is

17 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)

18 Example Quantization and encoding of a sampled signal

19 Pulse Code Modulation (PCM)
x(t) 3 2 1 t Consider the analog Signal x(t).

20 Pulse Code Modulation (PCM)
x[n] 3 2 1 n The signal is first sampled

21 Pulse Code Modulation (PCM)
3 2 1 n

22 Pulse Code Modulation (PCM)
3 2 1 n

23 Pulse Code Modulation (PCM)
3 2 1 n Sample

24 Pulse Code Modulation (PCM)
3 2 1 n And Hold

25 Pulse Code Modulation (PCM)
3 2 1 n

26 Pulse Code Modulation (PCM)
Assign Closest Level 3 2 1 n

27 Pulse Code Modulation (PCM)
3 2 1 n

28 Pulse Code Modulation (PCM)
3 2 1 n

29 Pulse Code Modulation (PCM)
3 2 1 n

30 Pulse Code Modulation (PCM)
3 2 1 n

31 Each quantization level corresponds to a unique combination of bits
Each quantization level corresponds to a unique combination of bits. The analog signal is transmitted/ stored as a stream of bits and reconstructed when required. 3 2 1 n

32 Each quantization level corresponds to a unique combination of bits
Each quantization level corresponds to a unique combination of bits. The analog signal is transmitted/ stored as a stream of bits and reconstructed when required. 3 2 1 n 0 0 0 1 1 0 1 1 1 0 0 1 0 0

33 Pulse Code Modulation (PCM)
Original Signal x(t) 3 2 1 t

34 Pulse Code Modulation (PCM)
x~(t) Quantized Signal 3 2 1 t It is quite apparent that the quantized signal is not exactly the same as the original analog signal. There is a fair degree of quantization error here. However; as the number of quantization levels is increased the quantization error is reduced and the quantized signal gets closer and closer to the original signal

35 Pulse Code Modulation (PCM)
x~(t) Quantized Signal t It is quite apparent that the quantized signal is not exactly the same as the original analog signal. There is a fair degree of quantization error here. However; as the number of quantization levels is increased the quantization error is reduced and the quantized signal gets closer and closer to the original signal

36 Problem 1 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. 37

37 Problem 2 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. 38


Download ppt "Quantization and Encoding"

Similar presentations


Ads by Google