digital transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · bipolar encoding...

32
Digital Transmission Chaiporn Jaikaeo Department of Computer Engineering Kasetsart University 01204325 Data Communications and Computer Networks Based on lecture materials from Data Communications and Networking, 5 th ed., Behrouz A. Forouzan, McGraw Hill, 2012. Revised 2021-05-07

Upload: others

Post on 13-Mar-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

Digital Transmission

Chaiporn Jaikaeo

Department of Computer EngineeringKasetsart University

01204325 Data Communications and Computer Networks

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

Revised 2021-05-07

Page 2: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

2

Outline• Line coding• Encoding considerations•DC components in signals

• Synchronization•Various line coding methods•Analog to digital conversion

Page 3: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

3

Line Coding•Process of converting binary data to digital signal

Page 4: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

4

Signal vs. Data Elements1 data element = 1 symbol

Page 5: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

5

Encoding Considerations• Signal spectrum

◦ Lack of DC components◦ Lack of high frequency components

•Clocking/synchronization• Error detection•Noise immunity•Cost and complexity

Page 6: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

6

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

tSignal with DC component

v

tSignal without DC component

v

Page 7: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

7

t

0 1 0 0 0 1 1 0 1 1

Synchronization• To correctly decode a signal, receiver and sender must

agree on bit interval

t

0 1 0 0 1 1 0 1 Sender sends:01001101

Receiver sees:0100011011

v

v

Page 8: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

8

Providing Synchronization• Separate clock wire

• Self-synchronization

Sender Receiverdata

clock

t

0 1 0 0 1 1 0 1v

Page 9: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

9

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

Page 10: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

10

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

t

0 1 0 0 1 1 0 05V

Page 11: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

11

Polar Encoding• Two voltage levels (+,-) represent data bits•Most popular four

◦ Nonreturn-to-Zero (NRZ)◦ Return-to-Zero (RZ)◦ Manchester◦ Differential Manchester

Page 12: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

12

NRZ Encoding• Nonreturn to Zero

◦ NRZ-L (NRZ-Level): Signal level depends on bit value

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

t

0 1 0 0 1 1 1 0

t

? 1 0 0 1 1 1 0

Page 13: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

13

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

t

0 1 0 0 1 1 0 0

Page 14: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

14

Manchester Encoding•Uses an inversion at the middle of each bit

◦ For bit representation◦ For synchronization

t

0 1 0 0 1 1 0 1 = 0

= 1

Page 15: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

15

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

t

0 1 0 0 1 1 0 1

Page 16: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

16

Bipolar Encoding•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 -

t

0 1 0 0 1 1 0 1

Page 17: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

17

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

t

1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0

Bipolar AMI

B8ZS

V B 0 V000 B

V – Bipolar violationB – Valid bipolar signal

t

Page 18: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

18

mBnL Schemes•m data elements are substituted with n signal elements

• 2B1Q (two binary, 1 quaternary)

• 8B6T (eight binary, six ternary)

t

00 11 01 10 01 10 11 00

-3

-1

+1

+3

Bit sequence Voltage level

00 -3

01 -1

10 +3

11 +1

Page 19: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

19

Block Coding• Improves the performance of line coding•Provides

◦ Synchronization◦ Error detection

Division Substitution LineCoding

:001011010001

:

…01011010001… :101100101101010

:

t

Page 20: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

20

Data Code Data Code0000 11110 1000 100100001 01001 1001 100110010 10100 1010 101100011 10101 1011 101110100 01010 1100 110100101 01011 1101 110110110 01110 1110 111000111 01111 1111 11101

Data CodeQ (Quiet) 00000I (Idle) 11111H (Halt) 00100J (start delimiter) 11000K (start delimiter) 10001T (end delimiter) 01101S (Set) 11001R (Reset) 00111

4B/5B Encoding Table

Page 21: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

21

Analog to Digital Conversion•Pulse Amplitude Modulation (PAM)

◦ Converts an analog signal into a series of pulses by sampling

PAM

Analog signal PAM signal(Sampled analog data)

Page 22: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

22

Pulse Code Modulation (PCM)•Converts an analog signal into a digital signal

◦ PAM◦ Quantization◦ Binary encoding◦ Line coding

Page 23: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

23

PCM: Quantization

1 2 3 4 5 6 70Input

2

4

6

Output

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

Page 24: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

24

PCM: Quantization

Quantization

Page 25: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

25

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

Page 26: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

26

SolutionWe can calculate the number of bits as

Telephone companies usually assign 7 or 8 bits per sample.

Example: Quantization Error•A telephone subscriber line must have an SNRdB above 40.

What is the minimum number of bits per sample?

Page 27: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

27

PCM: Binary Encoding•Maps discrete values to binary digits

Page 28: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

28

PCM: The Whole Process

Page 29: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

29

Minimum Sampling Rate

Sampling rate must be greater thantwice the highest frequency

•Nyquist Theorem:

t

sampling interval

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

Page 30: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

30

Nyquist’s Sampling Theorem

See also: Wagon-wheel effect

Sampling demonstration

Page 31: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

31

Example: Sampling and Bit Rate•Calculate the minimum bit rate for recording human voice,

if each sample requires 60 levels of precision

Page 32: Digital Transmissioncpj/204325/slides/05-digital.pdf · 2019. 8. 12. · Bipolar Encoding •Bipolar encoding uses three voltage levels: +, -and 0 •Each of all three levels represents

32

Summary• Line coding and block coding•Digital signal consideration

◦ Bit rate◦ Symbol rate◦ DC component◦ Synchronization

•Analog-to-digital conversion◦ Pulse-Code Modulation◦ Minimum sampling frequency