37
1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Embed Size (px)

Citation preview

Page 1: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

1

CSCD 433Network ProgrammingFall 2011

Lecture 4Physical Layer Transmission

Page 2: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Physical Layer Topics

• Motivation for studying this topic• Definitions of terms• Analog vs Digital• Line encoding• Characteristics of physical media

2

Page 3: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Motivation• Why study the physical layer?• Need to know basic data transmission

concepts • Didn't really cover them in CSCD330

• Should understand physical layer to better understand how various media influence network performance and efficiency• What transmission speed is possible with

various media?• Where and how are errors introduced?

• Need to know current implementations of physical layer and future trends

Page 4: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Physical Layer - Purpose

• To transmit bits, by encoding them onto signals

• To receive the signals, interpreting them as bits

• Signal1. Mechanism used to carry information over

time or distance2. Sign or gesture giving information3. Sequence of electrical or optical impulses

or waves

Page 5: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Signals

• Examples• Physical gesture, wave, hand signal• Flashes of light (eg, Morse code)• Sound: vary tone, loudness or duration• Flags• Smoke• Electical voltages

Page 6: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Transmission

1. Action of conveying electrical or optical signals from 1 point to 1 or more other points in space

2. Process of sending information from 1 point to another

What do you need for a Transmission System ?

• Medium for signal transfer• Transform signal to appropriate form• Way to transmit the signal• Way to remove, receive or detect the signal

Page 7: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Digital vs. Analog Signals

• Digital Signal

1. Limited to finite number of values

2. Has meaning only at discrete points in

time

Examples: Text, bits, integers

Page 8: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Digital vs. Analog Signals

• Analog Signal

1. Signal that is an analog of the quantity being

represented

2. Continuous range of values

3. Also continuous in time, always valued

Examples: Sound, vision, music

Page 9: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Analog vs. Digital

Page 10: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Analog Signals

• An analog signal is continuous has infinite number of values in a range

• Primary shortcomings of analog signals is difficulty to separate noise from original waveform

• An example is a sine wave which can be specified by three characteristics:

tsin (2 f t + p)A: amplitudef : frequency pphase

Page 11: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Sine

Wave

Examples

http://www.indiana.edu/~emusic/acoustics/phase.htm

Page 12: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Modems, Codecs

• Modem (Modulator-Demodulator)

• What does a modem do?

• Translates digital signal (bit) into an analog signal, for transmission as an analog signal

• Receives corresponding analog signal, and translates back into digital (bit)

• Purpose: Use analog medium for digital data/signals

• Example: PC modem, phone lines, TV cable modems

Page 13: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Modems, Codecs, Baud Rates• Codec (codec/decoder)

• Converts analog data into digital form (bits), and the reverse.

• Main technique: PCM

• PCM (pulse code modulation)• Absolute values, based on sampling theory

(nearly) total information

Page 14: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Pulse Code Modulation• Analog signal amplitude is sampled (measured) at

regular time intervals.• Sampling rate, number of samples per second,• Several times maximum frequency of the analog

waveform in cycles per second or hertz• Amplitude of analog signal at each sampling is

rounded off to nearest of several specific, predetermined levels

• Process is called quantization

Page 15: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

A Transmission System

Transmitter• Converts information into signal suitable for

transmission• Injects energy into communications medium or

channel Telephone converts voice into electric current Modem converts bits into tones

Receiver• Receives energy from medium• Converts received signal into form suitable for

delivery to user Telephone converts current into voice Modem converts tones into bits

Receiver

Communication channel

Transmitter

Page 16: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Analog Long-Distance Communications

• Each repeater attempts to restore analog signal to its original form

• Restoration is imperfect• Distortion not completely eliminated• Noise & interference only partially removed

• Signal quality decreases with increased repeaters

• Communications is distance-limited• Still used in analog cable TV systems• Analogy: Copy a song using a cassette

recorder

Source DestinationRepeater

Transmission segment

Repeater. . .

Page 17: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Analog vs. Digital Transmission

Analog transmission: all details must be reproduced accuratelySent

Sent

Received

Received

DistortionAttenuation

Digital transmission: only discrete levels need to be reproduced

DistortionAttenuation

Simple Receiver: Was original pulse

positive or negative?

Page 18: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Digital Long-Distance Communications

• Regenerator recovers original data sequence and retransmits on next segment

• Can design so error probability is very small

• Each regeneration is like the first time!

• Analogy: Copy an MP3 file

• Communications possible over very long distances

• Digital systems vs. analog systems• Less power, longer distances, lower system cost

Source DestinationRegenerator

Transmission segment

Regenerator. . .

Page 19: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Spectra & Bandwidth

• Spectrum of a Signal magnitude of amplitudes as a function of frequency

• x1(t) varies faster in time & has more high frequency content than x2(t)

• Bandwidth Ws is defined as range of frequencies where a signal has non-negligible power, e.g. range of band that contains 99% of total signal power

0 1 2 3 4 5 6 7 8 9 10 111213 1415 1617 181920 2122 2324 2526 272829 3031 3233 3435 363738 3940 4142 43440

0.2

0.4

0.6

0.8

1

1.2

frequency (kHz)

0 1 2 3 4 5 6 7 8 9 10 111213 1415 1617 181920 2122 2324 2526 272829 3031 3233 3435 363738 3940 4142 43440

0.2

0.4

0.6

0.8

1

1.2

frequency (kHz)

Spectrum of x1(t)

Spectrum of x2(t)

Page 20: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Sampling Theorem

• Nyquist–Shannon sampling theorem

• Theorem shows that an analog signal that

has been sampled

• Can be perfectly reconstructed from an

infinite sequence of samples if the sampling

rate exceeds 2W samples/Sec, where W is

the highest frequency of the original signal

Page 21: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Ws = 4KHz, so Nyquist sampling theorem

2W = 8000 samples/second

Suppose 8 bits/sample, m

PCM (“Pulse Code Modulation”) Telephone Speech:

Bit rate= 8000 x 8 bits/sec= 64 kbps

Example: Telephone Speech

Page 22: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Communications Channels

• A physical medium is an inherent part of a communications system• Copper wires, radio medium, or optical fiber

• Communications system include electronic or optical devices that are part of the path followed by a signal• Equalizers, amplifiers, signal conditioners

• By communication channel we refer to the combined end-to-end physical medium and attached devices

• Sometimes we use the term filter to refer to a channel especially in the context of a specific mathematical model for the channel

Page 23: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Digital Binary Signal

For a given communications medium• How do we increase transmission speed?• How do we achieve reliable communications?• Are there limits to speed and reliability?

+A

-A0 T 2T 3T 4T 5T 6T

1 1 1 10 0

Bit rate = 1 bit / T seconds

Page 24: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Pulse Transmission Rate• Objective: Maximize pulse rate through a

channel, that is, make T as small as possible

Channel

t t

Question: How frequently can these pulses be transmitted without interfering with each other?

Answer: 2 x Wc pulses/second where Wc is the bandwidth of the channel

T

Page 25: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Multilevel Signaling• Nyquist pulses achieve the maximum signaling rate with

zero Inter Symbol Interference (ISI)2Wc pulses per second or

2Wc pulses / Wc Hz = 2 pulses / Hz With two signal levels, each pulse carries one bit of

information

Bit rate = 2Wc bits/second

With M = 2m signal levels, each pulse carries m bits

Bit rate = 2Wc pulses/sec. * m bits/pulse = 2Wc m

bps

• Bit rate can be increased by increasing number of levels

• r(t) includes additive noise, that limits number of levels that can be used reliably.

Page 26: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

signal noise signal + noise

signal noise signal + noise

HighSNR

LowSNR

SNR = Average Signal Power

Average Noise Power

SNR (dB) = 10 log10 SNR

virtually error-free

error-prone

Channel Noise affects Reliability

Page 27: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

• If transmitted power is limited, then as M increases spacing between levels decreases

• Presence of noise at receiver causes more frequent errors to occur as M is increased

Shannon Channel Capacity:

The maximum reliable transmission rate over an ideal channel with bandwidth W Hz, with Gaussian distributed noise, and with SNR S/N is

C = W log2 ( 1 + S/N ) bits per second

Reliable means error rate can be made arbitrarily

small by proper coding

Shannon Channel Capacity

Page 28: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

What is Line Coding?

• Mapping of binary information sequence into the digital signal that enters the channel• Ex. “1” maps to +A square pulse; “0” to –A pulse

• Line code selected to meet system requirements:• Transmitted power: Power consumption = $ • Bit timing: Transitions in signal help timing recovery• Bandwidth efficiency: Excessive transitions wastes bw• Low frequency content: Some channels block low

frequencies• Long periods of +A or of –A causes signal to “droop”• Waveform should not have low-frequency content

• Error detection: Ability to detect errors helps• Complexity/cost: Is code implementable in chip at high

speed?

Page 29: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Desirable Properties Line

CodeClock Signal Synchronization betweentransmitter and receiver is of criticalimportance in digital communicationssystems

• Ideally, spectrum of line code shouldcontain a frequency component at the clockfrequency to permit clock extraction

• This avoids having to transmit a separateclock signal between the transmitter andreceiver

Page 30: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Desirable Properties Line

CodeSignal Interference and Noise Immunity• Ideally, line code should be rugged interms of exhibiting an immunity tointerference and noise

• In more technical terms, line code shouldhave a low probability of error for a givenlevel of transmitted power

• Certain line codes are more rugged thanothers, e.g. polar codes have a better errorperformance compared to unipolar codes.

Page 31: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Line coding examples

NRZ-inverted(differential

encoding)

1 0 1 0 1 1 0 01

UnipolarNRZ

Bipolarencoding

Manchesterencoding

DifferentialManchester

encoding

Polar NRZ

Page 32: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

NRZ vs RZ

• In telecommunication, a non-return-to-zero

(NRZ) line code is a binary code in which

• 1's are represented by one significant condition

(usually a positive voltage)

• 0's are represented by some other significant

condition (usually a negative voltage), with no

other neutral or rest condition

• Pulses have more energy than a RZ code

• Unlike RZ, NRZ does not have a rest state.

RZ

NRZ

Page 33: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Unipolar & Polar Non-Return-to-Zero (NRZ)

Unipolar NRZ

• “1” maps to +A pulse• “0” maps to no pulse• Long strings of A or 0

• Poor timing• Low-frequency

content• Simple

Polar NRZ

• “1” maps to +A/2 pulse• “0” maps to –A/2 pulse• Long strings of +A/2 or –

A/2• Poor timing • Low-frequency

content• Simple

1 0 1 0 1 1 0 01Unipolar NRZ

Polar NRZ

Page 34: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Bipolar Code

• Three signal levels: {-A, 0, +A}• “1” maps to +A or –A in alternation• “0” maps to no pulse

• Every +pulse matched by –pulse so little content at low frequencies

• String of 1s produces a square wave• Long string of 0s receiver loses synchronization

1 0 1 0 1 1 0 01

Bipolar Encoding

Page 35: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Manchester code & mBnB codes

• “1” maps into A/2 first T/2, -A/2 last T/2

• “0” maps into -A/2 first T/2, A/2 last T/2

• Every interval has transition in middle• Timing recovery easy• Uses double the

minimum bandwidth• Simple to implement• Used in 10-Mbps Ethernet

& other LAN standards

• mBnB line code• Maps block of m bits into

n bits• Manchester code is 1B2B

code• 4B5B code used in FDDI

LAN• 8B10b code used in

Gigabit Ethernet• 64B66B code used in

10G Ethernet

1 0 1 0 1 1 0 01Manchester

Encoding

Page 36: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

Summary

• Looked at Physical layer• Analog vs. Digital• Line encoding

• Next, we will map this knowledge to Ethernet• Choice of physical media in relation to

performance and/or efficiency

Page 37: 1 CSCD 433 Network Programming Fall 2011 Lecture 4 Physical Layer Transmission

37

• New Assignment up• Some problems from the Book