pcm dpcm dm
play

PCM & DPCM & DM 1 Pulse-Code Modulation (PCM) : In PCM - PowerPoint PPT Presentation

PCM & DPCM & DM 1 Pulse-Code Modulation (PCM) : In PCM each sample of the signal is B 2 quantized to one of the amplitude levels, where B is the number of bits used to represent each sample. The rate from the source is


  1. PCM & DPCM & DM 1

  2. Pulse-Code Modulation (PCM) :  In PCM each sample of the signal is B 2 quantized to one of the amplitude levels, where B is the number of bits used to represent each sample.  The rate from the source is bps. BF s  The quantized waveform is modeled as : ~   ( ) ( ) ( ) s n s n q n  q(n) represent the quantization error, Which we treat as an additive noise. 2

  3. Pulse-Code Modulation (PCM) :  The quantization noise is characterized as a realization of a stationary random process q in which each of the random variables q(n) has   uniform pdf .    q 2 2    B 2  Where the step size of the quantizer is  1 /    2 2 3

  4. Pulse-Code Modulation (PCM) : A  If :maximum amplitude of signal, max A   max B 2  The mean square value of the quantization 1 Δ/2     2 2 error is : q (n) q (n)dq Δ  Δ/2 Δ 2 2 A 1    Δ/2 3 max q (n) |  Δ/2  3 Δ 2B 12 2 12  Measure in dB, The mean square value of the noise is :   2 2 B 2     10 log 10 log 6 10 . 8 dB . B 10 10 12 12 4

  5. Pulse-Code Modulation (PCM) :  The quantization noise decreases by 6 dB/bit.  If the headroom factor is h , then  B 2 A   max X rms h h  The signal to noise (S/N) ratio is given by 2 2 B X 2 S    SNR 12 rms  2 2 / 12 N h  2 B 12 2  In dB, this is     SNR 10 log 6 10 . 8 20 log B h dB 10 10 2 h 5

  6. Pulse-Code Modulation (PCM) :  Example :  We require an S/N ratio of 60 dB and that a headroom factor of 4 is acceptable. Then the required word length is :  60=10.8 + 6B – 20 log 10 4     10 . 2 11 bit B  If we sample at 8 kHz, then PCM require   8 11 88000 bit/s. k 6

  7. Pulse-Code Modulation (PCM) :  A nonuniform quantizer characteristic is usually obtained by passing the signal through a nonlinear device that compress the signal amplitude, follow by a uniform quantizer. Compressor A/D D/A Expander Compander (Compressor-Expander) 7

  8. Companding: Compression and Expanding Original Signal After Compressing, Before Expanding 8

  9. Companding  A logarithmic compressor employed in North American telecommunications systems has input-output magnitude characteristic of the form   log( 1 | |) s  | | y   log( 1 )  is a parameter that is selected to give the  desired compression characteristic. 9

  10. Companding 10

  11. Companding  The logarithmic compressor used in European telecommunications system is called A-law and is defined as  log( 1 | |) A s  | | y  1 log A 11

  12. Companding 12

  13. DPCM :  A Sampled sequence u(m), m=0 to m=n-1. ~ ~   ( 1 ), ( 2 ),...  Let u n u n be the value of the reproduced (decoded) sequence . 13

  14. DPCM: ~ n ( ) u  At m=n, when u(n) arrives, a quantify , an estimate of u(n), is predicted from the ~ ~   previously decoded samples ( 1 ), ( 2 ),... u n u n i.e., ~ ~ ~     ( ) ( ( 1 ), ( 2 ),...); u n u n u n  ” prediction rule ” (.) :   Prediction error: ~   ( ) ( ) ( ) e n u n u n 14

  15. DPCM : ~ n  If is the quantized value of e(n), then ( ) e the reproduced value of u(n) is: ~ ~ ~   ( ) ( ) ( ) u n u n e n  Note: ~   ( ) ( ) ( ) u n u n e n ~ ~ ~ ~      ( ) ( ) ( ( ) ( )) ( ( ) ( )) u n u n u n e n u n e n ~   ( ) ( ) e n e n  ( ) : The Quantizati on error in ( ) q n e n 15

  16. DPCM CODEC: ~ n ~ n ~ n ( ) u ( n ) ( n ) e ( ) ( ) u e e Communication Σ Σ Quantizer Channel ~ n ~ n ( ) ( ) u u ~ n ( ) u Σ Predictor Predictor Coder Decoder 16

  17. DPCM:  Remarks:  The pointwise coding error in the input sequence is exactly equal to q(n), the quantization error in e(n).  With a reasonable predictor the mean sequare value of the differential signal e(n) is much smaller than that of u(n). 17

  18. DPCM:  Conclusion:  For the same mean square quantization error, e(n) requires fewer quantization bits than u(n).  The number of bits required for transmission has been reduced while the quantization error is kept the same. 18

  19. DPCM modified by the addition of linearly filtered error sequence ~ n ~ n ~ n ( ) ( ) e ( n ) u ( n ) e u ( ) e Communication Σ Σ Quantizer Channel ~ n ~ n ( ) u ( ) u Linear filter Linear ˆ Linear { b (i)} Σ filter filter ˆ ˆ { b (i)} { a (i)} Σ Linear filter Σ ~ n ( ) u ˆ { a (i)} Coder Decoder 19

  20. Adaptive PCM and Adaptive DPCM  Speech signals are quasi-stationary in nature  The variance and the autocorrelation function of the source output vary slowly with time.  PCM and DPCM assume that the source output is stationary.  The efficiency and performance of these encoders can be improved by adaptation to the slowly time-variant statistics of the speech signal.  Adaptive quantizer  feedforward  feedbackward 20

  21. Example of quantizer with an adaptive step size 111 Previous Output 7 ∆ /2 M (4) Multiplier 110 5 ∆ /2 M (3) 101 3 ∆ /2 M (2) 100 ∆ /2 M (1) -3 ∆ -2 ∆ - ∆ ∆ 2 ∆ 3 ∆ 0 011 - ∆ /2 M (1) 010 -3 ∆ /2 M (2) 001 -5 ∆ /2 M (3) 000 -7 ∆ /2 M (4) 21

  22. ADPCM with adaptation of the predictor Step-size adaptation ~ n ( ) u ~ n ( n ) ( n ) e ( ) u e Communication Σ Σ Quantizer Encoder Decoder ~ n Channel ( ) e ~ n ( ) u ~ n ( ) u Σ Predictor Predictor Predictor adaptation Coder Decoder 22

  23. Delta Modulation : (DM)  Predictor : one-step delay function  Quantizer : 1-bit quantizer ~ ~   ( ) ( 1 ) u n u n ~    ( ) ( ) ( 1 ) e n u n u n 23

  24. Delta Modulation : (DM)  Primary Limitation of DM  Slope overload : large jump region  Max. slope = (step size) X (sampling freq.)  Granularity Noise : almost constant region  Instability to channel noise 24

  25. DM: ~ n ( n ) ( ) u ( n ) e e ~ n ~ n ( ) u ( ) u Unit Delay Integrator Coder ~ n ~ n ( ) e ( ) u Unit Delay ~ n ( ) u Decoder 25

  26. DM: Step size effect : Step Size (i) slope overload (sampling frequency ) (ii) granular Noise 26

  27. Adaptive DM: s E   1 1 k k   , E k , min k Adaptive Stored Function  k X X  1  1 k k Unit Delay   sgn [ ] E S X   1 1 k K k   E        | | [ k ] if | | E      k k 1 k min 2  1 k        if | |  E  min 1 min k k    X X   1 1 k k k  This adaptive approach simultaneously minimizes the effects of both slope overload and granular noise 27

  28. Vector Quantization (VQ) 28

  29. Vector Quantization :  Quantization is the process of approximating continuous amplitude signals by discrete symbols.  Partitioning of two-dimensional Space into 16 cells. 29

  30. Vector Quantization :  The LBG algorithm first computes a 1- vector codebook, then uses a splitting algorithm on the codeword to obtain the initial 2-vector codebook, and continue the splitting process until the desired M-vector codebook is obtained.  This algorithm is known as the LBG algorithm proposed by Linde, Buzo and Gray. 30

  31. Vector Quantization :  The LBG Algorithm :  Step 1: Set M (number of partitions or cells)=1.Find the centroid of all the training data.  Step 2: Split M into 2M partitions by splitting each current codeword by finding two points that are far apart in each partition using a heuristic method, and use these two points as the new centroids for the new 2M codebook. Now set M=2M.  Step 3: Now use a iterative algorithm to reach the best set of centroids for the new codebook.  Step 4: if M equals the VQ codebook size require, STOP; otherwise go to Step 2. 31

More recommend