340 likes | 462 Views
ECE 4371, 2009 Class 9. Zhu Han Department of Electrical and Computer Engineering Class 9 Sep. 22 nd , 2009. Quantization. Scalar Quantizer Block Diagram Mid-tread Mid-rise. Equations. Quantization Noise. Quantization Noise Level. Quantization SNR. , 6dB per bit. Example.
E N D
ECE 4371, 2009Class 9 Zhu Han Department of Electrical and Computer Engineering Class 9 Sep. 22nd, 2009
Quantization • Scalar Quantizer Block Diagram • Mid-tread • Mid-rise
Quantization SNR , 6dB per bit
Example • SNR for varying number of representation levels for sinusoidal modulation 1.8+6 X dB, example 3.1
Conditions for Optimality of Scalar Quantizers Let m(t) be a message signal drawn from a stationary process M(t) -A m A m1= -A mL+1=A mk mk+1 for k=1,2,…., L The kth partition cell is defined as Jk: mk< m mk+1 for k=1,2,…., L d(m,vk): distortion measure for using vk to represent values inside Jk.
Vector Quantization image and voice compression, voice recognition statistical pattern recognition volume rendering
Distortion SQ VQ Rate (bps) Rate Distortion Curve • Rate: How many codewords (bits) are used? • Example: 16-bit audio vs. 8-bit PCM speech • Distortion: How much distortion is introduced? • Example: mean absolute difference(L1), mean square error (L2) • Vector Quantizer often performs better than Scalar Quantizer with the cost of complexity
Non-uniform Quantization • Motivation • Speech signals have the characteristic that small-amplitude samples occur more frequently than large-amplitude ones • Human auditory system exhibits a logarithmic sensitivity • More sensitive at small-amplitude range (e.g., 0 might sound different from 0.1) • Less sensitive at large-amplitude range (e.g., 0.7 might not sound different much from 0.8) histogram of typical speech signals
^ ^ x y Non-uniform Quantizer F: nonlinear compressing function F-1: nonlinear expanding function F and F-1: nonlinear compander y Q F F-1 x Example F: y=log(x) F-1: x=exp(x) We will study nonuniform quantization by PCM example next A law and law
Law/A Law The -law algorithm (μ-law) is a companding algorithm, primarily used in the digitaltelecommunication systems of North America and Japan. Its purpose is to reduce the dynamic range of an audio signal. In the analog domain, this can increase the signal to noise ratio achieved during transmission, and in the digital domain, it can reduce the quantization error (hence increasing signal to quantization noise ratio). A-law algorithm used in the rest of worlds. A-law algorithm provides a slightly larger dynamic range than the mu-law at the cost of worse proportional distortion for small signals. By convention, A-law is used for an international connection if at least one country uses it.
Analog to Digital Converter • Main characteristics • Resolution and Dynamic range : how many bits • Conversion time and Bandwidth: sampling rate • Linearity • Integral • Differential • Different types • Successive approximation • Slope integration • Flash ADC • Sigma Delta
Successive approximation • Compare the signal with an n-bit DAC output • Change the code until • DAC output = ADC input • An n-bit conversion requires n steps • Requires a Start and an End signals • Typical conversion time • 1 to 50 ms • Typical resolution • 8 to 12 bits • Cost • 15 to 600 CHF
Vin - + Counting time StartConversion StartConversion Enable S Q R N-bit Output Counter C Clk Oscillator IN Single slope integration • Start to charge a capacitor at constant current • Count clock ticks during this time • Stop when the capacitor voltage reaches the input • Cannot reach high resolution • capacitor • comparator
Flash ADC • Direct measurement with 2n-1 comparators • Typical performance: • 4 to 10-12 bits • 15 to 300 MHz • High power • Half-Flash ADC • 2-step technique • 1st flash conversion with 1/2 the precision • Subtracted with a DAC • New flash conversion • Waveform digitizing applications
Over-sampling ADC • Hence it is possible to increase the resolution by increasing the sampling frequency and filtering • Reason is the noise level reduce by over sampling. • Example : • an 8-bit ADC becomes a 9-bit ADC with an over-sampling factor of 4 • But the 8-bit ADC must meet the linearity requirement of a 9-bit
Digital to Analog conversion DAC V+ref Output voltage = Vout(n) Input code = n 0110001 0100010 0100100 0101011 : : : DAC V-ref
Digital to Analog Converter • Pulse Width Modulator DAC • Delta-Sigma DAC • Binary Weighted DAC • R-2R Ladder DAC • Thermometer coded DAC • Segmented DAC • Hybrid DAC
Pulse Code Modulation (PCM) • Pulse code modulation (PCM) is produced by analog-to-digital conversion process. Quantized PAM • As in the case of other pulse modulation techniques, the rate at which samples are taken and encoded must conform to the Nyquist sampling rate. • The sampling rate must be greater than, twice the highest frequency in the analog signal, fs > 2fA(max) • Telegraph time-division multiplex (TDM) was conveyed as early as 1853, by the American inventor M.B. Farmer. The electrical engineer W.M. Miner, in 1903. • PCM was invented by the British engineer Alec Reeves in 1937 in France. • It was not until about the middle of 1943 that the Bell Labs people became aware of the use of PCM binary coding as already proposed by Alec Reeves.
Pulse Code Modulation Figure The basic elements of a PCM system.
Virtues, Limitations and Modifications of PCM Advantages of PCM 1. Robustness to noise and interference 2. Efficient regeneration 3. Efficient SNR and bandwidth trade-off 4. Uniform format 5. Ease add and drop 6. Secure DS0: a basic digitalsignaling rate of 64 kbit/s. To carry a typical phone call, the audio sound is digitized at an 8 kHz sample rate using 8-bit pulse-code modulation.4K baseband, 8*6+1.8 dB
0111 0110 0100 0101 Resolution= 1 part in 2n 0011 0010 0001 0000 1111 1110 1100 1010 1101 1011 1001 PCM 0000 0110 0111 0011 1100 1001 1011 Numbers passed from ADC to computer to represent analogue voltage