computer communication and distributed algorithms 202-2-1131 second presentation – the physical...

43
Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer © Computer Communication and Distributed Algorithms (2012-13) 1

Upload: lee-primrose-lamb

Post on 30-Dec-2015

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

Computer Communication and

Distributed Algorithms

202-2-1131

Second presentation – The physical layer

©Computer Communication and Distributed Algorithms (2012-13)

1

Page 2: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 2

The OSI Model (7 layers)

Application

Physical

Link

Network

Transport

Session

Presentation

The 7-layer OSI ModelComputer Communication and Distributed Algorithms (2012-13)

Page 3: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 3

Data transfer. Data transfer. How to we move bits?How to we move bits?

Understanding the basics:Physical aspect

EnergyElectromagnetic waves

Mathematical aspectCode theory

Computer Communication and Distributed Algorithms (2012-13)

Page 4: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 4

Signals In order to send data electro-magnetic

signals are used. The communication channels transfer electromagnetic energy between the source and the destination.

The channel may convert the electro-magnetic energy to analog and digital signals.

Analog signals may have infinite number of values.

Digital signals include only a limited number of values.Computer Communication and

Distributed Algorithms (2012-13)

Page 5: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 5

Analog vs. Digital

•Vertical – Value or strength (e.g. Volts)•Horizontal - Time

Computer Communication and Distributed Algorithms (2012-13)

Page 6: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 6

Analog Signals Simple – Cannot be decomposed to

simpler signals Complex – Composed of many sinus

waves.

Represented by: S(t) = A sin (2ft + )

A – peak amplitude (גודל ההפרעה המקסימלי)

f – frequency (מספר המחזורים ליחידת זמן)

- phase (הפרש מופע הנמדד ברדיאנים )

Computer Communication and Distributed Algorithms (2012-13)

Page 7: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 7

Amplitude

Power – Electric signals (Volts / Watts)

Computer Communication and Distributed Algorithms (2012-13)

Page 8: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 8

Period and frequency

f = 1/T T = 1/f Period – The time it takes to do one cycle. Frequency – The number of periods done per second. The wave

frequency is the change rate in time. A short Period means high frequency. A long period means low

frequency.

Page 9: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 9

Phase The Phase describes the state of the

waveform compared to a waveform starting at zero. Measured in degrees or radians.

Computer Communication and Distributed Algorithms (2012-13)

Page 10: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 10

Example 1

Computer Communication and Distributed Algorithms (2012-13)

Page 11: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 11

Example 2

Computer Communication and Distributed Algorithms (2012-13)

Page 12: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 12

Example3

Computer Communication and Distributed Algorithms (2012-13)

Page 13: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 13

Analog signal

Computer Communication and Distributed Algorithms (2012-13)

Analog signal represented in the frequency domain.

Page 14: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 14

Signals

The frequency of a sinus signal by itself is unusable for data communication. We need to control one or more of its

properties in order to make it usable When we manipulate one or more of the

signal properties it becomes a multiple frequency signal.

According to Fourier analysis, every complex signal may be represented by a composition of simple sinus waves with different frequency, amplitude and phase.

Computer Communication and Distributed Algorithms (2012-13)

Page 15: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 15

Square wave

In order to use an electromagnetic signal for digital communication we need to change it to a square wave.

Computer Communication and Distributed Algorithms (2012-13)

Page 16: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

©

Three harmonics

Description of a harmonic wave

-The waveform, Voltage or currentA -Amplitude - Angular frequency - Phase

tjjtjjtjjdh ee

Aee

AeAetAtAtv o 00

22Recoscos 00

tvh

Computer Communication and Distributed Algorithms (2012-13)

16

Page 17: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 17

Adding first three harmonics By adding the three harmonics we create the square wave.

Computer Communication and Distributed Algorithms (2012-13)

Page 18: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

Modulation of an analog signal In order to transfer information or data over a

communication line different modulation techniques were developed. Three analog techniques:

( אפנון משרעתamplitude modulation .)( אפנון תדירותfrequency modulation.)( אפנון מופעphase modulation.)

In addition, a digital modulation was developed for digital channels.

The analog techniques require a carrier signal and create a complex wave combining the carrier wave and the data.

Every modulation technique requires a matching demodulation technique to be used by the receiver.

18Computer Communication and Distributed Algorithms (2012-13)

Page 19: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

AM – Amplitude Modulation Amplitude modulation is a transmission method over

electromagnetic waves in radio frequency. It changes the amplitude of the wave according to the signal while the frequency of the wave remains unchanged. This method is usually used to transmit sound waves. It may also transmit codes and data. This method is common in the long, medium and short wave radio bands.

An example of AM: The red waveIs the signal to be modulated,and the carrier wave (green).The lower plot shows the result of the modulation.

© 19Computer Communication and Distributed Algorithms (2012-13)

Carrier wave

Signal

Power

Page 20: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

FM – Frequency modulation Frequency modulation is a method used by controlling the

frequency of the carrier wave. The frequency of the carrier changes according to the power of the data signal.

Two major advantages over AM: Bigger bandwidth (allows stereo broadcast) Durability of noise. Noise usually destroys the amplitude, and not

the frequency. The amplitude of the data signal (red)

is sent. The carrier (green) is a high frequency wave. The modulation addsThe data signal to the frequency of thecarrier. The modulated signal (blue) is not periodic. The momentary frequencychanges according to the data signal amplitude.

20

Page 21: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

PM – Phase modulation

Phase modulation requires two waves, a carrier and a modulating signal with a constant amplitude.

© 21Computer Communication and Distributed Algorithms (2012-13)

הגל הנושא

תוצאת אפנון המשרעת בין שני הגלים

האות המידע

Page 22: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 22

Digital Signals

Computer Communication and Distributed Algorithms (2012-13)

Page 23: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

Digital modulation Modulation techniques above do not apply on

digital data. A digital wave holds a constant bit value 0 or 1

until an abrupt change occurs. The modulation should hold a high amplitude wave

to allow weak digital signal. The modulation do not amplify noise and therefore efficiently enlarge the broadcast distance.

Common modulation techniques:Amplitude shift key modulation (ASK) Frequency shift key modulation (FSK)Binary-phase shift key modulation (BPSK) Quadrature-phase shift key modulation (QPSK) Quadrature amplitude modulation (QAM)

© 23Computer Communication and Distributed Algorithms (2012-13)

Page 24: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

Digital modulation methods ASK Amplitude-shift keying – just like AM, this method controls the amplitude of the

signal. The data bit “1” is represented as the wave, while the data “0” is a break in the transmission. More complex implementations are represented by different combinations of different amplitudes.

FSKFrequency-shift keying – Bits are represented by controlling the frequency

of the wave. Every frequency represents a bit or a set of bits.

24

©

ASKFSK

Computer Communication and Distributed Algorithms (2012-13)

Page 25: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 25

ModulationsA binary signal

Amplitude Modulation

Frequency Modulation

Phase Modulation

Computer Communication and Distributed Algorithms (2012-13)

Page 26: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

Digital channel capacity

A digital communication channel has limits to the amount of state changes for a given time. These set the maximum data capacity.

Every given time the channel has a capacity that allows it to send a constant number of bits for a given time.

A digital system switch the signal between two energy or voltage states.

The data has a sudden and sharp voltage changes. It is different than analog system where the voltage changes gradually and continously.

© 26Computer Communication and Distributed Algorithms (2012-13)

Page 27: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 27

Bit rate and bit interval

Bit interval – The time needed to send one bit Bit rate – the number of bits sent in one second

(bps – Bit per second).

Computer Communication and Distributed Algorithms (2012-13)

Page 28: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 28

Bandwidth The bandwidth is a property of the medium: it is

the difference between the highest and the lowest frequency that the medium can transmit.

We use the term bandwidth referring the medium.

Bandwidth: The highest rate that the hardware may change the

signal. Measured in cycles per second (Hz) Bit rate and Bandwidth are proportional. Computer Communication and

Distributed Algorithms (2012-13)

Page 29: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 29

Standard Transmission Rates

Low Rates – 300 bps and multiplies – 1200, 2400, 9600, 19200, 54K

LANs – 2, 4, 10, 16, 100, 1000 Mbps Wireless LANS – 11 Mbps, 54 Mbps Wireless MAN – 32 Mbps

Computer Communication and Distributed Algorithms (2012-13)

Page 30: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 30

Propagation delay and transmission time Propagation delay:

The time needed for a signal to move through the medium. For example: A speed of electric signal in vacuum C=3x108 m/s

In copper wires the speed of the signal V=2x108

Transmission time The time needed to transmit N bits in a given transmission rate.

Transmission time = Message length / Transmission rateComputer Communication and Distributed Algorithms (2012-13)

Page 31: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 31

Calculating delay and transmission times

Example Message length: 500 Bytes Bit transmission Rate: 4 Mb/s Optical fiber length: 2 Km Speed of information in the fiber: 66% C ~ 2*108 m/s

Transmission time=(Message length)/(Bit transmission Rate)= (500*8bits) / (4*106 b/s) = 10-3 s = 1 ms

Propagation delay=d/(propagation speed)= (2000 m) / (2*108 m/s) = 0.01 ms

Computer Communication and Distributed Algorithms (2012-13)

Page 32: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 32

Throughput The data transmission rate for a given channel

Units: bits/second. Considering the bandwidth Data transfer rate = 1000 bits/second = 6 bits/6ms

Computer Communication and Distributed Algorithms (2012-13)

Page 33: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 33

Communication methods

A multilevel signal using one channel Data transfer over a channel must not be confined to

a binary format- a number of voltage levels may be used. For example, 4 voltage levels allows to code 2 bits into the levels (level A=00, level B=01, level C=10, level D=11). A symbol state change sends two bits of data as opposed to one bit in binary systems. Twice the throughput for a given bandwidth.

A multilevel signal using parallel channels. We may use multilevel signals with many channels.

This enlarges the throughput.

Computer Communication and Distributed Algorithms (2012-13)

Page 34: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 34

Multilevel representations

We may use any number of symbols to transmit digital data. For example 1024 voltage levels sends:

log21024 = 10 bits. The limit depends on our technical

ability to identify the individual state accurately by the receiver. It depends on the noise and distortion levels.

Computer Communication and Distributed Algorithms (2012-13)

Page 35: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 35

Multilevel representation

The relation between bits and symbols:

The number of symbols need to singularly represent every pattern of n bits given by:

M = 2n symbol states

3 bits may be represented by: M = 23 = 8 symbol states

4 bits by M = 24 = 16 symbol states 5 bits by M = 25 = 32 symbol states

Computer Communication and Distributed Algorithms (2012-13)

Page 36: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 36

Maximum Data Rate of a Channel

Simple Nyquist ruleThe relation between a bandwidth to the throughput:

D = 2*B*log2K

Where:D: Maximal data transfer rate (b/s).B: Bandwidth.K: Possible voltage values.

Computer Communication and Distributed Algorithms (2012-13)

Page 37: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 37

Examples

For RS-232: K = 2 because RS-232 uses only 2 values +15V

or -15V to code data bits. log22=1. D = 2*B

For phase-shift encoding Assume K is 8. log28=log223 =3. D = 6*B

Computer Communication and Distributed Algorithms (2012-13)

Page 38: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 38

Noise

An unwanted noise combined with the data transmission may fault the data.

Noise levels: Signal to Noise ratio (SNR) S: A signal intensity level N: A noise intensity level Measured in decibels : 10log10S/N.

Computer Communication and Distributed Algorithms (2012-13)

Page 39: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 39

Noise effects

Shannon rule:The capacity of a noisy channel

C = B*log2(1 + S/N)

Where:C: a limit for the capacityB: The bandwidth of the channelS/N: Signal to noise ratio

Computer Communication and Distributed Algorithms (2012-13)

Page 40: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 40

Summary Shannon and Nyquist rules:

Engineering cannot overcome the basic and physical limits of a real transmission system.

We refer the data throughput as the bandwidth.

We encourage engineers to complex the signal coding.

Enlarging K.

Look for ways to encode more bits per cycle to enhance the throughput

Lowering noise Detailing the limits of a real transmission systems.

Computer Communication and Distributed Algorithms (2012-13)

Page 41: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 41

Example 1

Question: We can calculate the theoretic capacity of a standard phone line. A standard phone line has a bandwidth of (300 Hz to 3300 Hz) 3000 Hz and the signal to noise ratio is about 1000.

Solution: According to Shannon the capacity is,

C = B logC = B log22 (1 + SNR) = 3000 log (1 + SNR) = 3000 log22 (1 + (1 + 101033) )

C = C = 29.90129.901 kkbpsbps

Computer Communication and Distributed Algorithms (2012-13)

Page 42: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

© 42

Example 2 Question: We have a communication channel

with a bandwidth of 1MHz, and signal to noise ratio of 63. What is the bit rate and how many levels are used.

First we use Shannon to find the maximum capacity the transmission channel.

We use Nyquist to find the number of level used.

C = B logC = B log22 (1 + SNR) = 10 (1 + SNR) = 1066 log log22 (1 + 63) = 10 (1 + 63) = 1066 log log22 (64) = (64) =

6 Mbps6 Mbps

66 Mbps = 2 Mbps = 2 1 MHz 1 MHz log log22 LL L = 8 L = 8

D = 2*B*log2K

Computer Communication and Distributed Algorithms (2012-13)

Page 43: Computer Communication and Distributed Algorithms 202-2-1131 Second presentation – The physical layer ©Computer Communication and Distributed Algorithms

©

43

Coding Schemes RZ & NRZ

RZ(Return to Zero) A signal returns to zero after

every coded bit 0 / 1: positive / negative pulse

NRZ(Non-return to Zero) The voltage level during a bit

interval.

NRZ-L(NRZ Level) positive voltage :0 negative voltage :1

NRZ-I(NRZ Inverted) Differential coding scheme 0: no transition 1: transition

NRZ - simple and efficient.

Computer Communication and Distributed Algorithms (2012-13)