10/8/2015© 2012 raymond p. jefferis iiilect 03 - 1 the physical layer

Post on 12-Jan-2016

215 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 1

The Physical Layer

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 2

Functions• Communication of information by the

transfer of physical energy– transmission line conduction– electromagnetic radiation– photon transmission

• Signal processing– modulation/demodulation– device interface control

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 3

Signaling Modes• Baseband

– voltage or current pulses on wire– photons in fiber– Examples: serial computer interface, OC-3

• Modulated carrier– modulated/demodulated high frequency energy– can propagate as electromagnetic radiation– Examples: modem, wireless, radio, satellite

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 4

Communication Sequences• Simplex

– unidirectional transmission

• Half-duplex– alternating bilateral transmission– changeover switch with delay

• Full-duplex– independent data flow in two directions– requires two channels

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 5

Variables/Issues

• Data transmission rate

• Bandwidth

• Transmitted power

• Signal/Noise Ratio (SNR)

• Error rate

• These are all interrelated!

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 6

Data Transmission Rate

Information transmitted [Mb /sec]

Telephone modem 0.05ISDN line 0.13DSL line 0.640 to 6.10 T1 1.54T3 44.74Fiber OC-3 155.52Fiber OC-12 622.08Fiber OC-48 2,488.32Fiber OC-192 9,952.28

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 7

Bandwidth

• Bandwidth is the frequency spectrum over which the principal energy of the transmission is distributed.

• It is roughly double the frequency of the first zero-crossing of the Fourier transform of a 1-bit pulse at the maximum data rate. [Translation to follow!]

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 8

Fourier Transform

The Fourier transform calculates the frequency spectrum of a time function according to the equation

F(ω) = f (t)e−jωtdt

−∞

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 9

One-bit Pulse

Time

Amplitude

Pulse

The Fourier transform asserts an equivalence between a pulse of a given amplitude and a frequency spectrum and calculates this spectrum. Thus a single pulse generates an entire spectrum of frequencies!

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 10

Unit-width Pulse

• Assume a single pulse of one-volt amplitude lasting for one second.

• Fourier transformation can calculate the frequency spectrum of this pulse, giving its amplitude F(f) at each frequency f.

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 11

Fourier Transform - 1-bit pulse

Bandwidth: B 2 / T [Hz] ( T = 1 in example )

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 12

Greater Pulse Width

• If the pulse width is greater, say 2 seconds, then the corresponding frequency spectrum becomes half as wide.

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 13

Effect of Greater Pulse Width

Doubling pulse width cuts bandwidth in half

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 14

Smaller Pulse Width

• If the pulse width is narrower, say 1/2 sec., then the corresponding frequency spectrum becomes twice as wide.

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 15

Effect of Smaller Pulse Width

Cutting pulse width in half doubles bandwidth

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 16

Mathematica® Notebook

Mathematica ® notebook for the Fourier transform of the single-bit pulse example

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 17

Examples

• Hold a portable AM radio near a lamp controlled by a light dimmer - you will hear buzzing due to the spectrum generated by the dimmer power pulses.

• Hold a portable radio near the back of an operating computer - you will hear tones due to the spectrum generated by the clock pulses of the computer.

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 18

Network Communications

• Information transmitted as binary data - pulses - at high rates.

• Fourier equivalence means that the shorter these pulses are (the more information we try to transmit per unit time), the higher are the frequencies that must be transmitted by the computer cables.

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 19

How much bandwidth is needed?

• All signal transmission is band-limited

• Lower limit is given by Nyquist formula

• Higher bandwidth allows more accurate reproduction of transmitted signal and higher data rates

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 20

Nyquist Limit

For N quantization levels and bandwidth W,

Data Rate 2 W log2 N

Meaning: The maximum data rate depends linearly upon the bandwidth and logarithmically upon the resolution (number of levels).

This maximum rate applies only under noise-free conditions

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 21

Nyquist Limit Example

W = 3,500 [Hz]

N = 256 [levels]

Max. data rate = 2 x 3500 x 8 = 56000 [b/s]

Note 1: Due to noise, this rate cannot be reached in practice.

Note 2: Telephony bandwidth is typically less than 3500 Hz.

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 22

Question!

How does a bandwidth limitation in a communications channel affect its ability to convey data?

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 23

Answer!

• Data pulses have a frequency equivalent, and limitation of the bandwidth limits the number of frequency components that can represent the data pulse.

• Loss of the high frequency components, due to bandwidth limitations, makes the pulses rounded.

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 24

Fourier Reasoning

• Periodic data pulses can be represented as a weighted sum of frequency components

• This is called a Fourier Series - the calculation of this series gives the amplitudes of these component waveforms.

• These amplitudes are reduced by bandwidth limitations, negatively affecting the quality of the pulse conveyed.

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 25

Fourier SeriesThe Fourier series expands a periodic function in a series of sines and cosines,

where,

f (t) =

a0

2+ ansin(2πnft) +bncos(2πnft)⎡⎣ ⎤⎦

n=1

an=

2T

f (t)sin(2πnft)dt0

T

bn =2T

f (t)cos(2πnft)dt0

T

a0 =2T

f (t)dt0

T

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 26

Fourier Series Analysis

• The more terms of the series (harmonics of the fundamental frequency) one takes, the closer is the approximation to the function

• Each such term increases the bandwidth

• By comparing various numbers of terms, one can determine the effect of bandwidth limitations on the signal

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 27

Repetitive Pulse

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 28

1-Term Fourier Series

• Represents pulses by a single sinusoid at the fundamental pulse frequency

• This would happen if poor cable (not CAT-5) were used to transmit 100 Mb/s pulses.

• Not enough to accurately represent pulses

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 29

Fourier Series Approximation (n=1)

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 30

Fundamental Frequency Component

• Fundamental component only

• Poor edge conformity at pulse transition

• Rounded peak - rather than flat

• Pulse width not correctly represented

• Cannot use to reproduce the pulse

• More bandwidth needed

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 31

Increasing Frequency Content

• The following three slides show the improvement in waveform approximation obtained by increasing the number of harmonics used in the Fourier series approximation (using better cable).

• Pulse takes on square shape, but top not flat

• Width becomes approximately correct

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 32

Fourier Series Approximation (n=3)

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 33

First and Third Harmonics Only

• Pulse width approximately correct

• Minimum acceptable quality

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 34

Fourier Series Approximation (n=5)

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 35

Fourier Series Approximation (n=17)

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 36

Fourier Series of Bandlimited Pulse

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 37

Many Harmonics

• Even with a large number of harmonics, there are problems with the approximation

• Corner effects– Overshoot– Oscillations

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 38

Fourier Series Approximation (n=101)

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 39

Conclusion!

• You can NEVER have too much bandwidth!

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 40

Another Fourier Example

• For repetitive pulse stream 00111000, the Fourier coefficients are found to be,

an=

1nπ

cosnπ2

⎝⎜⎞

⎠⎟−cos

5nπ4

⎝⎜⎞

⎠⎟⎡

⎣⎢

⎦⎥

bn =1nπ

−sinnπ2

⎝⎜⎞

⎠⎟+ sin

5nπ4

⎝⎜⎞

⎠⎟⎡

⎣⎢

⎦⎥

a0 =3 / 4

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 41

Fourier Series Approximation (n=3)

3-term Fourier series approximation of repeating 00111000 bit pattern

0.20.40.60.81t0.20.40.60.81cHtL

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 42

Fourier Series Approximation (n=20)

20-term Fourier series approximation of repeating 00111000 bit pattern

0.20.40.60.81t0.20.40.60.81cHtL

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 43

Summary

• There is a time-frequency duality that means shorter pulses require greater bandwidth for transmission

• Bandwidth limitations negatively impact the sharpness of pulses, rounding off the edges and introducing other inaccuracies

• All this is true even under noise-free conditions

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 44

Transmission with Noise

• All communication channels have noise– Johnson noise (temperature dependent)– atmospheric noise– man-made noise

• Noise reduces the ability to transmit data in a communications channel

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 45

Channel Capacity

Channel capacity (ability to transmit data)– reduced logarithmically by random noise– increased linearly by bandwidth– increased logarithmically by transmitted power

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 46

Shannon Formula

Relates bandwidth and Signal-to-Noise Ratio to maximum data rate (channel capacity)

R = W log2(1+S/N)

where,

R = data rate [b/s]

W = bandwidth [Hz]

Note: 20 log10(S/N) = S/N [dB]

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 47

Example

W = 3500 Hz

S/N [dB] = 92 [dB]

S/N = 40000:1

R = 3500 log2 (1 + 40000) = 53506 [b/s]

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 48

Summary

• Channel capacity increases with bandwidth, and is reduced by bandwidth limitations

• Channel capacity reduced by noise

• Channel capacity increased by increasing signal strength

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 49

Transmission Media

• Two-wire lines– open lines– twisted pair– shielded twisted pair

• Coaxial cable (cable TV)

• Optical fiber (SONET)

• Microwave links (satellite)

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 50

Open Wire Lines

• Distance: 1 - 50 m

• Rate: 300 - 19,000 b/s

• Modulation: voltage or current levels

• Problems:– crosstalk between adjacent lines– high noise susceptibility – common-mode noise (use differential mode)

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 51

Twisted Pair

• Distance: 1 - 100 m

• Rate: 1 - 100 Mb/s (Cat 5 cable)

• Modulation: voltage or current levels

• Problems:– some crosstalk (use shielding)– some noise susceptibility (use shielding)

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 52

UTP Data Cable

• Category 3– 100 Ohm impedance– twist length: 7.5 to 10 cm– date rate to 16 Mb/s

• Category 5– 100 Ohm impedance– twist length: 0.6 to 0.85 cm– date rate to 100 Mb/s

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 53

Coaxial Cable

• Distance: 1 km

• Rate: 10 Mb/s

• Modulation: usually carrier

• Problems:– cost (expensive cable & fittings)– reflections due to length and short wavelength

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 54

Optical Fiber• Distance: 10 - 100 km or more• Rate: to 27 Tbps (27,000 Gb/s)• Modulation: photon transmission

Wave Division Multiplexingincreases total data rate

• Problems– signal attenuation over distance

– expensive installation

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 55

Microwave/Satellite

• Distance: 100 - 1000 km

• Rate: 10 Gb/s

• Modulation: carrier

• Problems:– line-of-sight only– susceptibility to atmospheric effects– expensive

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 56

Physical Layer Specifications

• Define mechanical parameters

• Define electrical signals

• Define data structures (frames)

• Define communication sequences

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 57

EIA RS-232-C(1)

• Defines physical layer serial communication format widely used to interconnect Data Terminal Equipment (DTE) and Data Circuit-terminating Equipment (DCE).

• Short distances

• Point-to-Point

(1) Electronic Industries Association, Recommended Standard 232-C [ http://www.eia.org ]

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 58

Components of EIA RS-232-C

• Signaling

• Connections

• Data framing

• Error detection and correction

• Communications protocol

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 59

RS-232C Signaling

• Lines used – Transmitted Data (TD) to Signal Ground (SG)– Received Data (RD) to Signal Ground (SG)

• Line-line voltage ranges– -5 to -15 volts logical “1”– +5 to +15 volts logical “0”

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 60

RS-232-C Connectors

• 25-pin “D” connector (DB25)– DTE (computer/terminal) uses male connector– DCE (modem) uses female connector

• 9-pin “D” connector (DB9) is more common today (cheaper)

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 61

Brief RS-232-C Connections

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 62

RS-232-C Interface Design

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 63

RS-232-C Data Framing

• Usually 10 bits in length– 1 start bit (rising transition clocks frame timer)– 8 data bits (8th bit may be parity for error

control)• even parity: logical XOR of first 7 bits

• odd parity: negation of even parity result

– 1 stop bit (can be 2 stop bits) at logical “0” the line is left in this state until the next frame

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 64

RS-232-C Error Detection

• Error detection is by means of parity

• Parity detects only odd numbers of errors– for error rate of 10-5/bit, 3+ errors/gigabyte– too many undetected errors for large file

transfers over telephone connections

• Error correction, in data link layer, by retransmission of data

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 65

RS-232-C Parity Computation• Parity is the bitwise Exclusive-OR of the bits to be transmitted.

• The result is then transmitted with the data.

• The same computation is performed at the receiving end

• If the transmitted and computed parities don’t match, there was an error

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 66

RS-232-C Communications Protocol1. After power-up, the DTE asserts (set to logical “1”) Data

Terminal Ready (Pin 20) This indicates that the computer (DTE) is ready to receive a call.

2. When the DCE (modem in this case) powers up, then it asserts Data Set Ready (Pin 6).

3. When the modem detects a carrier on the line, the modem asserts Carrier Detect (Pin 8).

4. When Request To Send (Pin 4) is asserted, it indicates that the terminal wants to send data.

5. Assertion of Clear To Send (Pin 5) means that the modem is prepared to accept data.

6. Data is transmitted on the Transmit circuit (Pin 2).7. Data is received on the Receive circuit (Pin 3).

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 67

IEEE 802.3 (Ethernet)• Used for Local Area Network (LAN)

interconnection

• Carrier Sense Multiple Access with Collision Detection (CSMA/CD) type

• Transmitters broadcast, all receivers listen

• Collisions cause retransmission after random wait time

• Physical & Data Link functions combined

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 68

IEEE 802.3 Signaling (Physical)

• Baseband transmission (no carrier)

• Manchester encoding– Non-Return to Zero (NRZ) pulses

• can be transformer coupled to lines

– 0/+5 volt levels• logical “0” 0 -> 0.85 volt transition

• logical “1” 0.85 -> 0 volt transition

– synchronous clock generated from data stream

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 69

Manchester Encoding Logic

• Encoding by Exclusive-OR (XOR) of bit stream and synchronous double-speed clock

• Clock is recovered from received data

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 70

Manchester Encoding Example

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 71

Advantages & Disadvantages

• Advantages– Can be transformer coupled to line– Easily generated - no carrier required

• Disadvantages– Line must have twice the bandwidth– Requires synchronization bits as preamble

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 72

IEEE 802.3 Connections

04/21/23 © 2012 Raymond P. Jefferis III Lect 03 - 73

Components of IEEE 802.3

• Signaling

• Connections

• Data framing

• Error detection and correction

• Communications protocol

Physical

Layer

Data

Link

Layer

top related