<<

Digital Transmission 01204325 Data Communications and Computer Networks

Chaiporn Jaikaeo Department of Computer Engineering Kasetsart University

Based on lecture materials from Data Communications and Networking, 5th ed., Behrouz A. Forouzan, McGraw Hill, 2012.

Revised 2021-05-07 Outline • Line coding • Encoding considerations • DC components in signals • Synchronization • Various line coding methods • Analog to digital conversion

2 Line Coding

• Process of converting binary data to

3 Signal vs. Data Elements

1 data element = 1 symbol

4 Encoding Considerations

• Signal spectrum ◦ Lack of DC components ◦ Lack of high frequency components • Clocking/synchronization • Error detection • Noise immunity • Cost and complexity

5 DC Components

• DC components in signals are not desirable ◦ Cannot pass thru certain devices ◦ Leave extra (useless) energy on the line ◦ Voltage built up due to stray capacitance in long cables

v Signal with t DC component

v Signal without t DC component

6 Synchronization

• To correctly decode a signal, receiver and sender must agree on bit interval

0 1 0 0 1 1 0 1 Sender sends: v 01001101 t

0 1 0 0 0 1 1 0 1 1 Receiver sees: v 0100011011 t

7 Providing Synchronization

• Separate clock wire

Sender data Receiver

clock

• Self-synchronization

0 1 0 0 1 1 0 1 v t

8 Line Coding Methods

• Unipolar ◦ Uses only one voltage level (one side of time axis) • Polar ◦ Uses two voltage levels (negative and positive) ◦ E.g., NRZ, RZ, Manchester, Differential Manchester • Bipolar ◦ Uses three voltage levels (+, 0, and –) for data bits • Multilevel

9 Unipolar

• Simplest form of line coding • Only one polarity of voltage is used • E.g., polarity assigned to 1 (TTL)

0 1 0 0 1 1 0 0 5V

t

10 Polar Encoding

• Two voltage levels (+,-) represent data bits • Most popular four ◦ Nonreturn-to-Zero (NRZ) ◦ Return-to-Zero (RZ) ◦ Manchester ◦ Differential Manchester

11 NRZ Encoding • Nonreturn to Zero ◦ NRZ-L (NRZ-Level): Signal level depends on bit value

0 1 0 0 1 1 1 0

t

◦ NRZ-I (NRZ-Invert): Signal is inverted if 1 is encountered

? 1 0 0 1 1 1 0

t

12 RZ Encoding

• Return to Zero ◦ Uses three voltage levels: +, - and 0, but only + and - represent data bits ◦ Half way thru each bit, signal returns to zero

0 1 0 0 1 1 0 0

t

13 Manchester Encoding

• Uses an inversion at the middle of each bit ◦ For bit representation ◦ For synchronization

0 1 0 0 1 1 0 1 = 0

t = 1

14 Differential Manchester Encoding

• The inversion on the middle of each bit is only for synchronization • Transition at the beginning of each bit tells the value

0 1 0 0 1 1 0 1

t

15

• Bipolar encoding uses three voltage levels: +, - and 0 • Each of all three levels represents a bit • E.g., Bipolar AMI (Alternate Mark Inversion) ◦ 0V always represents binary 0 ◦ Binary 1s are represented by alternating + and -

0 1 0 0 1 1 0 1

t

16 BnZS Schemes

• BnZS – Bipolar n-zero substitution ◦ Based on Bipolar AMI ◦ n consecutive zeros are substituted with some +/- levels ◦ provides synchronization during long sequence of 0s ◦ E.g., B8ZS 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0

Bipolar AMI t

0 0 0 V B 0 V B

B8ZS t

V – Bipolar violation B – Valid bipolar signal

17 mBnL Schemes

• m data elements are substituted with n signal elements • (two binary, 1 quaternary)

Bit sequence Voltage level 00 11 01 10 01 10 11 00 +3 00 -3 +1 01 -1 t 10 +3 -1 -3 11 +1

• 8B6T (eight binary, six ternary)

18 Block Coding

• Improves the performance of line coding • Provides ◦ Synchronization ◦ Error detection

Line Division Substitution Coding t …01011010001… : : 0010 10110 1101 01011 0001 01010 : :

19 4B/5B Encoding Table

Data Code Data Code Data Code 0000 11110 1000 10010 Q (Quiet) 00000 0001 01001 1001 10011 I (Idle) 11111 0010 10100 1010 10110 H (Halt) 00100 0011 10101 1011 10111 J (start delimiter) 11000 0100 01010 1100 11010 K (start delimiter) 10001 0101 01011 1101 11011 T (end delimiter) 01101 0110 01110 1110 11100 S (Set) 11001 0111 01111 1111 11101 R (Reset) 00111

20 Analog to Digital Conversion

• Pulse Amplitude (PAM) ◦ Converts an analog signal into a series of pulses by sampling

PAM

Analog signal PAM signal (Sampled analog data)

21 Pulse Code Modulation (PCM)

• Converts an analog signal into a digital signal ◦ PAM ◦ Quantization ◦ Binary encoding ◦ Line coding

22 PCM: Quantization

• Converts continuous values of data to a finite number of discrete values

6

4 Output 2

0 1 2 3 4 5 6 7 Input

23 PCM: Quantization

Quantization

24 Quantization Error • Assume sine-wave input and uniform quantization

◦ nb is the number of bits per sample • Known as the 6 dB/bit approximation

See also: http://en.wikipedia.org/wiki/Quantization_error#Quantization_noise_model 25 Example: Quantization Error

• A telephone subscriber line must have an SNRdB above 40. What is the minimum number of bits per sample?

Solution We can calculate the number of bits as

Telephone companies usually assign 7 or 8 bits per sample.

26 PCM: Binary Encoding

• Maps discrete values to binary digits

27 PCM: The Whole Process

28 Minimum Sampling Rate

• Nyquist Theorem: Sampling rate must be greater than twice the highest frequency

Ex. Find the maximum sampling interval for recording human voice (freq. range 300Hz – 3000Hz)

t

sampling interval

29 Nyquist’s Sampling Theorem

Sampling demonstration

See also: Wagon-wheel effect 30 Example: Sampling and

• Calculate the minimum bit rate for recording human voice, if each sample requires 60 levels of precision

31 Summary • Line coding and block coding • Digital signal consideration ◦ Bit rate ◦ ◦ DC component ◦ Synchronization • Analog-to-digital conversion ◦ Pulse-Code Modulation ◦ Minimum sampling frequency

32