Quantization and Encoding Soutenance de thèse vendredi 24 novembre 2006, Lorient Lecture 5 Quantization and Encoding
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
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
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
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
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
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
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
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
ADC Process Quantization & Coding Use original analog signal
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=22 00 01 10 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=22 00 01 10 11
Use original analog signal Apply 3 bit coding ADC Process Quantization & Coding Use original analog signal Apply 3 bit coding K=23 000 001 010 011 100 101 110 111
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=23 000 001 010 011 100 101 110 111 K=16 0000 K=… . . . 1111
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
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
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)
Example Quantization and encoding of a sampled signal
Pulse Code Modulation (PCM) x(t) 3 2 1 t Consider the analog Signal x(t).
Pulse Code Modulation (PCM) x[n] 3 2 1 n The signal is first sampled
Pulse Code Modulation (PCM) 3 2 1 n
Pulse Code Modulation (PCM) 3 2 1 n
Pulse Code Modulation (PCM) 3 2 1 n Sample
Pulse Code Modulation (PCM) 3 2 1 n And Hold
Pulse Code Modulation (PCM) 3 2 1 n
Pulse Code Modulation (PCM) Assign Closest Level 3 2 1 n
Pulse Code Modulation (PCM) 3 2 1 n
Pulse Code Modulation (PCM) 3 2 1 n
Pulse Code Modulation (PCM) 3 2 1 n
Pulse Code Modulation (PCM) 3 2 1 n
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
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
Pulse Code Modulation (PCM) Original Signal x(t) 3 2 1 t
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
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
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
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