EEE358S Fundamentals of Communications Engineering Pulse Code Modulation Emmanuel O Bejide [email_address] http://www.uct.ac.za/depts/staff/rebejide/ Department of Electrical Engineering University of Cape Town
Analogue to Digital After sampling, the analogue amplitude value of each sampled (PAM) signal is  quantized  into one of a number of L discrete levels. The result is a quantized PAM signal. A codeword can then be used to designate each level at each sample time. This procedure is referred to as  “Pulse Code Modulation” .  Low-pass  Filter Encoder;  Pulse modulate Sampler Quantizer Continuous-time message signal PCM wave Quantized PAM signal Updated 9/2004
Encoding After quantization, a digit is assigned to each of the quantized signal levels in such a way that each level has a one-to-one correspondence with the set of real integers. This is called  digitization of the waveform . Each integer is then expressed as an  x-bit  binary number, called codeword, or PCM word. The number of codewords, L , is related to x by :  2 x  =  L Updated 9/2004 Quantized PAM signal A real integer PCM codeword (bit stream) digitization To binary
Codeword Quantization followed by digitization maps input amplitudes into PCM words. A cell is the set of input amplitudes mapped to a codeword. There are L integers, PCM words, or codewords to correspond to the L allowed output amplitudes of the quantizer. Codebook is the set of all these L codewords. Updated 9/2004
Analogue to Digital time Analogue waveform voltage 0000 0011 0101 0111 1001 1011 1101 1111 0010 0100 0110 1000 1010 1100 1110 0 1 1110 1000 0100 0010 0000 0011 0101 1011 Bit stream Sign bit PCM Codeword 3. Digitize into real integers 1. Sample analogue waveform at discrete times 2. Quantize into discrete levels Updated 9/2004 0 1 2 3 4 5 6 7 -1 -2 -3 -4 -5 -6 -7 -7 -4 -2 -1 0 1 2 5 4. To binary 1 1 1 0 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 1 0 1 0 1 1 1
Types of Encoding (to PCM Waveforms) Unipolar RZ NRZ Bipolar  AMI Biphase  Polar M L S Updated 9/2004 Polar Bipolar Unipolar
Encoder Attributes RZ (return to zero), NRZ (non-return to zero) Unipolar, Polar, Bipolar L (level), M (mark), S (space) Biphase AMI (alternate mark inversion) Updated 9/2004
NRZ – Unipolar/Polar – L/M/S Coding Unipolar RZ NRZ Bipolar  AMI Biphase  Polar M L S Updated 9/2004 Polar Bipolar Uniolar
NRZ coding may be unipolar or polar 1 0 1 1 0 1 1 0 0 1 Unipolar NRZ-L Polar NRZ-L
NRZ-L Coding NRZ-L (level): 1 higher level; 0 lower level Used in SONET XOR bit sequence, and in early magnetic tape recording Long sequence of same bit causes difficulty in clock recovery; also in detecting the average DC level
(Polar) NRZ Coding 1 0 1 1 0 1 1 0 0 1 NRZ-L NRZ-M NRZ-S
NRZ – Unipolar/Polar – L/M/S Coding NRZ-L (level): 1 higher level; 0 lower level NRZ-M (mark): 1 (mark): change level 0 (space): no change in level  (clock recovery problem with successive 0’s) used primarily in magnetic tape recording  used in Synchronous data link control (SDLC) NRZ-S (space): 0 (space): change in level  1 (mark): no change level  (clock recovery problem with successive 1’s) Updated 9/2004
RZ – Bipolar/Unipolar Coding Unipolar RZ NRZ Bipolar  AMI Biphase  Polar M L S Updated 9/2004 Polar Bipolar Unipolar
RZ Coding may be unipolar or bipolar 1 0 1 1 0 1 1 0 0 1 Unipolar RZ Bipolar RZ RZ-AMI Include RZ-AMI here for completeness, defer discussion Updated 9/2004
RZ Coding may be unipolar or bipolar Unipolar-RZ: 1 is represented by positive for the first half of T and zero for the second half. 0 is represented by 0 Bipolar-RZ: 1 is represented by positive for the first half of T and zero for the second half. 0 is represented by negative for the first half of T and zero for the second half. Used in baseband data transmission, magnetic recording. The transitions at T/2 may be used for synchronization.
Biphase Coding Unipolar RZ NRZ Bipolar  AMI Biphase  Polar M L S Updated 9/2004 Polar Bipolar Unipolar
Biphase Coding 1 0 1 1 0 1 1 0 0 1 biphase-L biphase-M biphase-S
Biphase Coding may be L, M, or S Biphase-L (level) / Manchester: 0 is represented by +ve for first half and –ve for 2nd half 1 is represented by -ve for first half and +ve for 2nd half used in digital logic circuits including IEEE 802.4 standard, Ethernet. An alternate scheme adopted by some authors has the above coding for 0’s and 1’s in reversed manner.
Biphase Coding may be L, M, or S biphase-M (mark) / Differential Manchester: Always transition at beginning of bit 1 (mark) is represented by second transition at T/2 0 (space) is represented by no second transition at T/2 Alternately: always transition at center 1 is represented by additional transition at start of T. biphase-S (space): Always transition at beginning of bit 0 (space) is represented by second transition at T/2 1 (mark) is represented by no second transition at T/2
AMI Coding Unipolar RZ NRZ Bipolar  AMI Biphase  Polar M L S Updated 9/2004 Polar Bipolar Unipolar
(Bipolar) AMI Coding may be NRZ or RZ 1 0 1 1 0 1 1 0 0 1 NRZ-AMI RZ-AMI
AMI Coding may be NRZ or RZ AMI (Alternate Mark Inversion) coding: 0 is represented by 0 NRZ-AMI: The 1’s are alternately positive and negative. RZ-AMI: The 1’s are represented by equal amplitude opposite polarity RZ pulses Used in the signaling scheme in telephone systems.
B8ZS coding B8ZS (bipolar with eight-zero substitution) coding: With AMI coding, user data containing too many successive 0’s are difficult to find bit boundaries. Bipolar violations are deliberately inserted if user data contains a string of 8 or more consecutive zeros. A violation bit has the same polarity as that for the previous non-zero bit. Is used in the T1 rate.
B8ZS coding versus bipolar NRZ-AMI 0 0 0 0 0 1 0 0 0 1 NRZ-AMI B8ZS V V
HDB3 coding HDB3 (High density bipolar order 3) code modifies AMI to prevent long runs of 0’s by introducing violation (V) and balance (B) bits. It is used in E1. 4 0’s are replaced by 000V if the number of 1’s from the previous V is odd. Receiver turns back to 0 all V preceded by 000 4 0’s are replaced by B00V if the number of 1’s from the previous V is even. B is such at V is of opposite polarity to the previous V. Its purpose is to prevent DC introduced by the V’s Receiver turns back to 0 all V preceded by 00, together the bit (B) before the 00.
HDB3 coding versus bipolar NRZ-AMI 0 0 1 1 0 1 0 0 0 0 NRZ-AMI HDB3 V B 0 V 0 V

Koding

  • 1.
    EEE358S Fundamentals ofCommunications Engineering Pulse Code Modulation Emmanuel O Bejide [email_address] http://www.uct.ac.za/depts/staff/rebejide/ Department of Electrical Engineering University of Cape Town
  • 2.
    Analogue to DigitalAfter sampling, the analogue amplitude value of each sampled (PAM) signal is quantized into one of a number of L discrete levels. The result is a quantized PAM signal. A codeword can then be used to designate each level at each sample time. This procedure is referred to as “Pulse Code Modulation” . Low-pass Filter Encoder; Pulse modulate Sampler Quantizer Continuous-time message signal PCM wave Quantized PAM signal Updated 9/2004
  • 3.
    Encoding After quantization,a digit is assigned to each of the quantized signal levels in such a way that each level has a one-to-one correspondence with the set of real integers. This is called digitization of the waveform . Each integer is then expressed as an x-bit binary number, called codeword, or PCM word. The number of codewords, L , is related to x by : 2 x = L Updated 9/2004 Quantized PAM signal A real integer PCM codeword (bit stream) digitization To binary
  • 4.
    Codeword Quantization followedby digitization maps input amplitudes into PCM words. A cell is the set of input amplitudes mapped to a codeword. There are L integers, PCM words, or codewords to correspond to the L allowed output amplitudes of the quantizer. Codebook is the set of all these L codewords. Updated 9/2004
  • 5.
    Analogue to Digitaltime Analogue waveform voltage 0000 0011 0101 0111 1001 1011 1101 1111 0010 0100 0110 1000 1010 1100 1110 0 1 1110 1000 0100 0010 0000 0011 0101 1011 Bit stream Sign bit PCM Codeword 3. Digitize into real integers 1. Sample analogue waveform at discrete times 2. Quantize into discrete levels Updated 9/2004 0 1 2 3 4 5 6 7 -1 -2 -3 -4 -5 -6 -7 -7 -4 -2 -1 0 1 2 5 4. To binary 1 1 1 0 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 1 0 1 0 1 1 1
  • 6.
    Types of Encoding(to PCM Waveforms) Unipolar RZ NRZ Bipolar AMI Biphase Polar M L S Updated 9/2004 Polar Bipolar Unipolar
  • 7.
    Encoder Attributes RZ(return to zero), NRZ (non-return to zero) Unipolar, Polar, Bipolar L (level), M (mark), S (space) Biphase AMI (alternate mark inversion) Updated 9/2004
  • 8.
    NRZ – Unipolar/Polar– L/M/S Coding Unipolar RZ NRZ Bipolar AMI Biphase Polar M L S Updated 9/2004 Polar Bipolar Uniolar
  • 9.
    NRZ coding maybe unipolar or polar 1 0 1 1 0 1 1 0 0 1 Unipolar NRZ-L Polar NRZ-L
  • 10.
    NRZ-L Coding NRZ-L(level): 1 higher level; 0 lower level Used in SONET XOR bit sequence, and in early magnetic tape recording Long sequence of same bit causes difficulty in clock recovery; also in detecting the average DC level
  • 11.
    (Polar) NRZ Coding1 0 1 1 0 1 1 0 0 1 NRZ-L NRZ-M NRZ-S
  • 12.
    NRZ – Unipolar/Polar– L/M/S Coding NRZ-L (level): 1 higher level; 0 lower level NRZ-M (mark): 1 (mark): change level 0 (space): no change in level (clock recovery problem with successive 0’s) used primarily in magnetic tape recording used in Synchronous data link control (SDLC) NRZ-S (space): 0 (space): change in level 1 (mark): no change level (clock recovery problem with successive 1’s) Updated 9/2004
  • 13.
    RZ – Bipolar/UnipolarCoding Unipolar RZ NRZ Bipolar AMI Biphase Polar M L S Updated 9/2004 Polar Bipolar Unipolar
  • 14.
    RZ Coding maybe unipolar or bipolar 1 0 1 1 0 1 1 0 0 1 Unipolar RZ Bipolar RZ RZ-AMI Include RZ-AMI here for completeness, defer discussion Updated 9/2004
  • 15.
    RZ Coding maybe unipolar or bipolar Unipolar-RZ: 1 is represented by positive for the first half of T and zero for the second half. 0 is represented by 0 Bipolar-RZ: 1 is represented by positive for the first half of T and zero for the second half. 0 is represented by negative for the first half of T and zero for the second half. Used in baseband data transmission, magnetic recording. The transitions at T/2 may be used for synchronization.
  • 16.
    Biphase Coding UnipolarRZ NRZ Bipolar AMI Biphase Polar M L S Updated 9/2004 Polar Bipolar Unipolar
  • 17.
    Biphase Coding 10 1 1 0 1 1 0 0 1 biphase-L biphase-M biphase-S
  • 18.
    Biphase Coding maybe L, M, or S Biphase-L (level) / Manchester: 0 is represented by +ve for first half and –ve for 2nd half 1 is represented by -ve for first half and +ve for 2nd half used in digital logic circuits including IEEE 802.4 standard, Ethernet. An alternate scheme adopted by some authors has the above coding for 0’s and 1’s in reversed manner.
  • 19.
    Biphase Coding maybe L, M, or S biphase-M (mark) / Differential Manchester: Always transition at beginning of bit 1 (mark) is represented by second transition at T/2 0 (space) is represented by no second transition at T/2 Alternately: always transition at center 1 is represented by additional transition at start of T. biphase-S (space): Always transition at beginning of bit 0 (space) is represented by second transition at T/2 1 (mark) is represented by no second transition at T/2
  • 20.
    AMI Coding UnipolarRZ NRZ Bipolar AMI Biphase Polar M L S Updated 9/2004 Polar Bipolar Unipolar
  • 21.
    (Bipolar) AMI Codingmay be NRZ or RZ 1 0 1 1 0 1 1 0 0 1 NRZ-AMI RZ-AMI
  • 22.
    AMI Coding maybe NRZ or RZ AMI (Alternate Mark Inversion) coding: 0 is represented by 0 NRZ-AMI: The 1’s are alternately positive and negative. RZ-AMI: The 1’s are represented by equal amplitude opposite polarity RZ pulses Used in the signaling scheme in telephone systems.
  • 23.
    B8ZS coding B8ZS(bipolar with eight-zero substitution) coding: With AMI coding, user data containing too many successive 0’s are difficult to find bit boundaries. Bipolar violations are deliberately inserted if user data contains a string of 8 or more consecutive zeros. A violation bit has the same polarity as that for the previous non-zero bit. Is used in the T1 rate.
  • 24.
    B8ZS coding versusbipolar NRZ-AMI 0 0 0 0 0 1 0 0 0 1 NRZ-AMI B8ZS V V
  • 25.
    HDB3 coding HDB3(High density bipolar order 3) code modifies AMI to prevent long runs of 0’s by introducing violation (V) and balance (B) bits. It is used in E1. 4 0’s are replaced by 000V if the number of 1’s from the previous V is odd. Receiver turns back to 0 all V preceded by 000 4 0’s are replaced by B00V if the number of 1’s from the previous V is even. B is such at V is of opposite polarity to the previous V. Its purpose is to prevent DC introduced by the V’s Receiver turns back to 0 all V preceded by 00, together the bit (B) before the 00.
  • 26.
    HDB3 coding versusbipolar NRZ-AMI 0 0 1 1 0 1 0 0 0 0 NRZ-AMI HDB3 V B 0 V 0 V