E303: Communication Systems Professor A. Manikas Chair of Communications and Array Processing Imperial College London Principles of PCM Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 1 / 49
Table of Contents 1 Introduction 2 PCM: Bandwidth & Bandwidth Expansion Factor 3 The Quantization Process (output point-a2) Uniform Quantizers Comments on Uniform Quantiser Non-Uniform Quantizers max(snr) Non-Uniform Quantisers Companders (non-uniform Quantizers) Compression Rules (A and mu) The 6dB Law Differential Quantizers 4 Noise Effects in a Binary PCM Threshold Effects in a Binary PCM Comments on Threshold Effects 5 CCITT Standards: Differential PCM (DPCM) 6 Core and Access Networks Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 2 / 49
Introduction Introduction Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 3 / 49
Introduction PCM = sampled quantized values of an analogue signal are transmitted via a sequence of codewords. i.e. after sampling & quantization, a Source Encoder is used to map the quantized levels (i.e. o/p of quantizer) to codewords of γ bits i.e. quantized level codeword of γ bits and, then a digital modulator is used to transmit the bits, i.e. PCM system There are three popular PCM source encoders (or, in other words, Quantization-levels Encoders). Binary Coded Decimal (BCD) source encoder Folded BCD source encoder Gray Code (GC) source encoder Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 4 / 49
Introduction g(input) g q (output) g q : occurs at a rate F s (N.B: F s 2 F g ) Q = quantizer levels; γ = log 2 (Q) bits level samples sec Note: codeword rate (point B) γ bit codewords sec = quant. levels rate levels sec = sampling rate samples sec = F s = 2F g (1) Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 5 / 49
Introduction bit rate: r b = bits sec γ bits level F s levels sec e.g. for Q = 16 levels then r b = γ=4 γ=4 {}}{{}}{ (e.g. transmitted sequ. = 10101100 }{{} 1101...) γ=4 4 γ F s versions of PCM: Differential PCM (DPCM) PCM with differential Quant. Delta Modulation (DM): PCM with diff. quants having 2 levels i.e. + or are encoded using a single binary digit Note: DM DPCM Others Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 6 / 49
PCM: Bandwidth & Bandwidth Expansion Factor PCM: Bandwidth & Bandwidth Expansion Factor we transmit several digits for each quantizer s o/p level B PCM > F g { BPCM denotes the channel bandwidth where represents the message bandwidth F g PCM Bandwidth baseband bandwidth: bandpass bandwidth: B PCM B PCM channel symbol rate 2 Hz (2) channel symbol rate 2 2 Hz (3) Note that, by default, the Lower bound of the baseband bandwidth is assumed and used in this course Bandwidth expansion factor β : β channel bandwidth message bandwidth Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 7 / 49 (4)
PCM: Bandwidth & Bandwidth Expansion Factor Example - Binary PCM Bandwidth: B PCM = channel symbol rate 2 = bit rate 2 = γf s 2 = γ log 2 Q F g Hz B PCM = γf g (5) Bandwidth Expansion Factor: B PCM = γf g B PCM F g = γ β = γ (6) Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 8 / 49
The Quantization Process (output point-a2) at point A2 : a signal discrete in amplitude and discrete in time. The blocks up to the point A2, combined, can be considered as a discrete information source where a discrete message at its output is a level selected from the output levels of the quantizer. Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 9 / 49
analogue samples finite set of levels where the symbol denotes a map In our case this mapping is called quantizing i.e. Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 10 / 49
quantizer parameters: Q : number of levels b i : input levels of the quantizer, with i = 0, 1,..., Q (b 0 = lowest level): known as quantizer s end-points m i : outputs levels of the quantizer (sampled values after quantization) with i = 1,..., Q; known as output-levels rule: connects the input of the quantizer to m i RULE: the sampled values g(kt s ) of an analogue signal g(t) are converted to one of Q allowable output-levels m 1, m 2,..., m Q according to the rule: g(kt s ) m i (or equivalently g q (kt s ) = m i ) iff b i 1 g(kt s ) b i with b 0 =, b Q = + Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 11 / 49
quantization noise at each sample instance: n q (kt s ) = g q (kt s ) g s (kt s ) (7) If the power of the quantization noise is small, i.e. P nq = E { nq(kt 2 s ) } = small, then the quantized signal (i.e. signal at the output of the quantizer) is a good approximation of the original signal. quality of approximation may be improved by the careful choice of b i s and m i s and such as a measure of performance is optimized. e.g. measure of performance: Signal to quantization Noise power Ratio (SNR q ) signal power SNR q = quant. noise power = P g P nq Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 12 / 49
Types of quantization: Transfer Function: uniform quantizer uniform non-uniform { differential = uniform, or non-uniform plus a differential circuit non-uniform quantizer for signals with CF = small for signals with CF = large Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 13 / 49
The following figure illustrates the main characteristics of different types of quantizers Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 14 / 49
Uniform Quantizers Uniform Quantizers Uniform quantizers are appropriate for uncorrelated samples let us change our notation: g q (kt s ) to g q and g(kt s ) to g the range of the continuous random variable g is divided into Q intervals of equal length (value of g) (midpoint of the quantizing interval in which the value of g falls) or equivalently m i = b i 1 + b i 2 for i = 1, 2,..., Q (8) Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 15 / 49
Uniform Quantizers step size : rule: = b Q b 0 Q { bi = b 0 + i rule: g q = m i iff b i 1 < g b i where m i = b i 1+b i 2 for i = 1, 2,..., Q (9) (10) Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 16 / 49
Comments on Uniform Quantiser Comments on Uniform Quantiser Since, in general, Q = large P gq P g E { g 2} Furthermore, large Q implies that Fidelity of Quantizer = g q q Q = 8 16 are just suffi cient for good intelligibility of speech; (but quantizing noise can be easily heard at the background) voice telephony: minimum 128 levels; (i.e. SNR q 42dB) N.B.: 128 levels 7-bits to represent each level transmission bandwidth = Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 17 / 49
Comments on Uniform Quantiser { Quantizer = UNIFORM if pdf of the input signal = UNIFORM then SNR q = Q 2 = 2 2γ (11) Quantisation Noise Power P nq : rms value of Quant. Noise: Quantization Noise Power: P nq = 2 12 rms value of Quant. Noise = fixed = (12) 12 = f {g} (13) if g(t) = small for extended period of time SNR q < the design value this phenomenon is obvious if the signal waveform has a large CREST FACTOR (14) Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 18 / 49
Comments on Uniform Quantiser SNRq as a function of the Crest Factor Remember: CREST FACTOR peak rms (15) By using variable spacing }{{} small spacing near 0 and large spacing at the extremes CREST FACTOR effects = = this leads to NON-UNIFORM QUANTIZERS Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 19 / 49
Non-Uniform Quantizers Non-Uniform Quantizers Non-Uniform quantizers are (like unif. quants) appropriate for uncorrelated samples step size = variable = i if pdf i/p = uniform then non-uniform quants yield higher SNR q than uniform quants rms value of n q is not constant but depends on the sampled value g(kt s ) of g(t) Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 20 / 49
Non-Uniform Quantizers rule: g q = m i iff b i 1 < g b i where b 0 =, b Q = + i = b i b i 1 = variable example: Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 21 / 49
max(snr) Non-Uniform Quantisers max(snr) Non-Uniform Quantisers b i, m i are chosen to maximize SNR q as follows: since Q = large P gq P g E { g 2} SNR q = max if P nq = min where Q bi P nq = (g m i ) 2 pdf g dg (16) i =1 b i 1 Therefore: min P nq m i,b i (17) dp nq db (17) j = 0 dp nq dm j = 0 (18) { (bj m j ) 2 pdf g (b j ) (b j m j+1 ) 2 pdf g (b j ) = 0 for j = 1, 2,..., Q 2 b j b j 1 (g m j ) pdf g (g) dg = 0 for j = 1, 2,..., Q (19) Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 22 / 49
max(snr) Non-Uniform Quantisers Note: the above set of equations (i.e. (19)) cannot be solved in closed form for a general pdf. Therefore for a specific pdf an appropriate method is given below in a step-form: METHOD: 1. choose a m 1 2. calculate b i s, m i s 3. check if m Q is the mean of the interval [b Q 1, b Q = ] if yes STOP else choose a new m 1 and then goto step-2 Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 23 / 49
max(snr) Non-Uniform Quantisers A SPECIAL CASE max(snr) Non-Uniform Quantizer of a Gaussian Input Signal if the input signal has a Gaussian amplitude pdf, that is pdf q = N(0, σ g ) then it can be proved that: P nq = 2.2σ 2 g Q 1.96 not easy to derive (12) In this case the Signal-to-quantization Noise Ratio becomes: SNR q = P gq P nq = σ 2 g 2.2σ 2 g Q 1.96 = 0.45Q 1.96 (13) Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 24 / 49
Companders (non-uniform Quantizers) Companders (non-uniform Quantizers) Their performance independent of CF Non-unif. Quant = SAMPLE COMPRESSION Compressor + Expander Compander g f g c i.e. g c =f{g} + : means such that" UNIFORM QUANTIZER + SAMPLE EXPANDER pdf gc = uniform f 1 g c Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 25 / 49
Companders (non-uniform Quantizers) Popular companders: use log compression Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 26 / 49
Companders (non-uniform Quantizers) Two compression rules (A-law and µ-law) which are used in PSTN and provide a SNR q independent of signal statistics are given below: µ-law (USA) A-law (Europe) In practice { A 87.6 µ 100 Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 27 / 49
Companders (non-uniform Quantizers) Compression-Rules (PCM systems) The µ and A laws µ-law g c = ln(1+µ g gmax ) g ln(1+µ) max g c = A-law g A gmax 1+ln(A) g max 0 g g max < 1 A g 1+ln(A gmax ) 1 g 1+ln(A) max A g g max < 1 where g c = compressor s output signal (i.e. input to uniform quantiser) g = compressor s input signal g max = maximum value of the signal g Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 28 / 49
Companders (non-uniform Quantizers) The 6dB LAW uniform quantizer: µ-law: A-law: SNR q = 4.77 + 6γ 20 log(cf) db (20) remember CF = peak rms SNR q = 4.77 + 6γ 20 log(ln(1 + µ)) db (21) SNR q = 4.77 + 6γ 20 log(1 + ln A) db (22) Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 29 / 49
Companders (non-uniform Quantizers) REMEMBER the following figure (illustrates the main characteristics of different types of quantizers) Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 30 / 49
Companders (non-uniform Quantizers) COMMENTS uniform & non-uniform quantizers: use them when samples are uncorrelated with each other (i.e. the sequence is quantized independently of the values of the preceding samples) practical situation: the sequence {g(kt s )} consists of samples which are correlated with each other. In such a case use differential quantizer. Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 31 / 49
Companders (non-uniform Quantizers) Examples PSTN F s = 8kHz, Q = 2 8 (A = 87.6 or µ = 100), γ = 8 bits/level i.e. bit rate: r b = F s γ = 8k 8 = 64 kbits/sec Mobile-GSM F s = 8kHz, Q = 2 13 uniform γ = 13 bits/level, i.e. bit rate: r b = F s γ = 8k 13 = 104 kbits/sec which, with a differential circuit, is reduced to r b = 13 kbits/sec Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 32 / 49
Differential Quantizers Differential Quantizers Differential quantizers are appropriate for correlated samples namely they take into account the sample to sample correlation in the quantizing process; e.g. Transmitter (Tx) Receiver (Rx) input current message symbol The weights w are estimated based on autocorr. function of the input The Tx & Rx predictors should be identical. Therefore, the Tx transmits also its weights to the Rx (i.e. weights w are transmitted together with the data) Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 33 / 49
Differential Quantizers In practice, the variable being quantized is not g(kt s ) but the variable d(kt s ) i.e. where d(kt s ) = g(kt s ) ĝ(kt s ) (14) Because d(kt s ) has small variations, to achieve a certain level of performance, fewer bits are required. This implies that DPCM can achieve PCM performance levels with lower bit rates. 6dB law: SNR q = 4.77 + 6γ a in db (15) where 10dB < a < 7.77dB Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 34 / 49
Differential Quantizers A Better Differential Quantiser: mse Diff. Quant. the largest error reduction occurs when the differential quantizer operates on the differences between g(kt s ) and the minimum mean square error (min-mse) estimator ĝ(kt s ) of g(kt s ) - (N.B.: but more hardware) Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 35 / 49
Differential Quantizers ĝ(kt s ) = w T g where { g = [ g((k 1)T s ), g((k 2)T s ),..., g((k L)T s )] T w = [w 1, w 2,..., w L ] T rule: { choose w to minimize E { (g(kts ) ĝ(kt s )) 2}... for the Transmitter choose w to minimize E { (d q (kt s ) + ĝ(kt s )) 2}... for the Receiver Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 36 / 49
Differential Quantizers Differential Quantisers: Examples The power of d(kt s ) can be found as follows: σ 2 d = E { d 2} = E { g 2 (kt s ) } + E { g 2 ((k 1)T s ) } 2E {g(kt s )g((k 1)T s )} }{{}}{{}}{{} =σ 2 g =σ 2 g 2 R gg (T s ) σ 2 d = 2 σ 2 g 2 R gg (T s ) = 2 σ 2 g (1 R gg (T s ) ) (23) σ 2 g Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 37 / 49
Differential Quantizers e.g. disadvantages : unrecoverable degradation is introduced by the quantization process. (Designer s task is to keep this to a subjective acceptable level) Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 38 / 49
Differential Quantizers Remember 1 σ 2 g = R gg (0) 2 R gg (τ) σ 2 g = is known as the normalized autocorrelation function 3 DPCM with the same No of bits/sample generally gives better results than PCM with the same number of bits. Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 39 / 49
Differential Quantizers Example of mse DPCM assume a 4-level quantizer: I/P O/P +5 input +255 +7 0 input +4 +1 4 input 1 1 255 input 5 7 Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 40 / 49
Differential Quantizers Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 41 / 49
Differential Quantizers From the last 2 figures we can see that small variation to the i/p signal (25V 26V) large variations to o/p waveforms Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 42 / 49
Noise Effects in a Binary PCM Noise Effects in a Binary PCM It can be proved that the Signal-to-Noise Ratio at the output of a binary Pulse Code Modulation (PCM) system, which employs a BCD encoder/decoder and operates in the presence of noise, is given by the following expression SNR out = E { g 0 (t) 2} E {n 0 (t) 2 } + E {n q0 (t) 2 } = 2 2γ 1 + 4 p e 2 2γ (24) where p e = f(type of digital modulator) { } p e = T (1 ρ) EUE e.g. if the digital modulator is a PSK-mod. then { } p e = T 2 EUE Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 43 / 49
Noise Effects in a Binary PCM Threshold Effects in a Binary PCM Threshold Effects in a Binary PCM We have seen that: SNR out = 2 2γ 1+4 p e 2 2γ Let us examine the following two cases: SNR in = high and SNR in = low i) SNR in = HIGH ii) SNR in = LOW SNR in = high p e = small SNR in = low p e = large 1 + 4 p e 2 2γ 1 SNR out = 2 2γ 1 + 4 p e 2 2γ 4 p e 2 2γ SNR out 6γ db SNR out 1 4 p e Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 44 / 49
Noise Effects in a Binary PCM Threshold Effects in a Binary PCM Threshold Point - Definition Threshold point is arbitrarily defined as the SNR in at which the SNR out, i.e. 2 SNR out = 2γ 1 + 4 p e 2 2γ falls 1dB below the maximum SNR out (i.e. 1dB below the value 2 2γ ). By using the above definition it can be shown (... for you... ) that the threshold point occurs when p e = 1 16 2 2γ where γ is the number of bits per level. Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 45 / 49
Noise Effects in a Binary PCM Comments on Threshold Effects The onset of threshold in PCM will result in a sudden in the output noise power. P signal = SNR in = SNR out reaches 6γ db and becomes independent of P signal above threshold: increasing signal power no further improvement in SNR out The limiting value of SNR out depends only on the number of bits γ per quantization levels Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 46 / 49 Threshold Effects Comments
CCITT Standards: Differential PCM (DPCM) CCITT Standards: Differential PCM (DPCM) DPCM = PCM which employs a differential quantizer i.e. DPCM reduces the correlation that often exists between successive PCM samples The CCITT standards 32 kbits DPCM The CCITT standards 64 kbits sec sec speech signal - F g = 3.2kHz audio signal - F g = 7kHz F s = 8 ksamples sec Q = 16 levels (i.e. γ = 4 bits ) level F s = 16 ksamples sec bits Q = 16 levels (i.e. γ = 4 level ) DPCM Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 47 / 49
CCITT Standards: Differential PCM (DPCM) Problems of DPCM: 1 slope overload noise: occurs when outer quantization level is too small for large input transitions and has to be used repeatedly 2 Oscillation or granular noise: occurs when the smallest Q-level is not zero. Then, for constant input, the coder output oscillates with amplitude equal to the smallest Q-level. 3 Edge Busyness noise: occurs when repetitive edge waveform is contaminated by noise which causes it to be coded by different sequences of Q-levels. Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 48 / 49
Core and Access Networks Core and Access Networks Prof. A. Manikas (Imperial College) E303: Principles of PCM v.17 49 / 49