1 15-441 computer networking lecture 2 – physical layer

49
1 15-441 Computer Networking Lecture 2 – Physical Layer

Upload: shon-bryant

Post on 30-Dec-2015

221 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1

15-441 Computer Networking

Lecture 2 – Physical Layer

Page 2: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 2

Network Protocols

• Protocol• A set of rules and formats that govern the

communication between communicating peers

• Protocol layering• Decompose a complex problem into smaller

manageable pieces (e.g., Web server)• Abstraction of implementation details• Reuse functionality• Ease maintenance• Cons?

Page 3: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 3

Network Protocol Stack

• Application: supporting network applications• FTP, SMTP, HTTP

• Transport: host-host data transfer• TCP, UDP

• Network: routing of datagrams from source to destination

• IP, routing protocols

• Link: data transfer between neighboring network elements

• WiFi, Ethernet

• Physical: bits “on the wire”• Radios, coaxial cable, optical fibers

application

transport

network

link

physical

Page 4: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 4

From Signals to Packets

Analog Signal

“Digital” Signal

Bit Stream 0 0 1 0 1 1 1 0 0 0 1

Packets0100010101011100101010101011101110000001111010101110101010101101011010111001

Header/Body Header/Body Header/Body

ReceiverSenderPacket

Transmission

Page 5: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 5

Outline

• RF introduction

• Modulation

• Antennas and signal propagation

• Equalization, diversity, channel coding

• Multiple access techniques

• Wireless systems and standards

Page 6: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 6

Outline

• RF introduction• What is “RF”• Digital versus analog contents

• Modulation

• Antennas and signal propagation

• Equalization, diversity, channel coding

• Multiple access techniques

• Wireless systems and standards

Page 7: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 7

RF Introduction

• RF = Radio Frequency.• Electromagnetic signal that propagates through “ether”• Ranges 3 KHz .. 300 GHz• Or 10 km .. 0.1 cm (wavelength)

• Has been used for communication for a long time, but improvements in technology have made it possible to use higher frequencies.

Page 8: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 8

Wireless Communication

• 300 GHz is huge amount of spectrum!• Spectrum can also be reused in space

• Not quite that easy:• Most of it is hard or expensive to use!• Noise and interference limits efficiency• Most of the spectrum is allocated by FCC

• FCC controls who can use the spectrum and how it can be used.

• Need a license for most of the spectrum• Limits on power, placement of transmitters, coding, ..• Need rules to optimize benefit: guarantee emergency services,

simplify communication, return on capital investment, …

Page 9: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 9

Spectrum Allocation

See: http://www.ntia.doc.gov/osmhome/allochrt.html

Most bands are allocated.• Industrial, Scientific, and Medical (ISM) bands are

“unlicensed”.• But still subject to various constraints on the operator, e.g. 1 W

output• 433-868 MHz (Europe)• 902-928 MHz (US)• 2.4000-2.4835 GHz• Unlicensed National Information Infrastructure (UNII) band is

5.725-5.875 GHz

Page 10: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 10

What Is an Electromagnetic Signal

• We will be vague about this and we will use two “cartoon” views:

• Think of it as energy that radiates from an antenna and is picked up by another antenna.

• Can easily explain properties such as attenuation

• Can also view it as a “wave” that propagates between two points.

• Can easily explain properties

Space and Time

Page 11: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 11

Decibels

• A ratio between signal powers is expressed in decibels

decibels (db) = 10log10(P1 / P2)• Is used in many contexts:

• The loss of a wireless channel• The gain of an amplifier

• Note that dB is a relative value.• Can be made absolute by picking a reference

point.• Decibel-Watt – power relative to 1W• Decibel-milliwatt – power relative to 1 milliwatt

• 4.5 mW = (10*log10 4.5) dBm

Page 12: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 12

Analog and Digital Information

• Initial RF use was for analog information.• Radio and TV stations• The information that is sent is of a continuous nature

• In digital transmission, the signal consists of discrete units (e.g. bits).

• Data networks, cell phones• Focus of this course

• We can also send analog information as digital data.• Sample the signal, i.e. analog digital analog

• E.g., Cell phones, …• Also digital analog digital (e.g. modem)

Page 13: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 13

Outline

• RF introduction• Modulation

• Baseband versus carrier modulation• Forms of modulation• Channel capacity

• Antennas and signal propagation• Equalization, diversity, channel coding• Multiple access techniques• Wireless systems and standards

Page 14: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 14

The Frequency Domain

• A (periodic) signal can be viewed as a sum of sine waves of different strengths.

• Corresponds to energy at a certain frequency• Every signal has an equivalent representation in the

frequency domain.• What frequencies are present and what is their strength (energy)

• Again: Similar to radio and TV signals.

TimeFrequency

Am

plit

ude

Page 15: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 15

Signal = Sum of Sine Waves

=

+ 1.3 X

+ 0.56 X

+ 1.15 X

Page 16: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 16

Modulation

• Sender changes the nature of the signal in a way that the receiver can recognize.

• Assume a continuous information signal for now

• Amplitude modulation (AM): change the strength of the carrier according to the information.

• High values stronger signal

• Frequency (FM) and phase modulation (PM): change the frequency or phase of the signal.

• Frequency or Phase shift keying

• Digital versions are sometimes called “shift keying”.• Amplitude (ASK), Frequency (FSK) and Phase (PSK) Shift Keying

Page 17: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 17

Amplitude and FrequencyModulation

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

0 1 1 0 1 1 0 0 0 1

Page 18: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 18

Baseband versus Carrier Modulation

• Baseband modulation: send the “bare” signal.• Use the lower part of the spectrum• Everybody competes – not attractive for wireless

• Carrier modulation: use the (information) signal to modulate a higher frequency (carrier) signal.

• Can be viewed as the product of the two signals• Corresponds to a shift in the frequency domain

Page 19: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 19

Amplitude Carrier Modulation

Signal CarrierFrequency

ModulatedCarrier

Page 20: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 20

Frequency Division Multiplexing:Multiple Channels

Am

plitu

de

Different CarrierFrequencies

DeterminesBandwidthof Channel

Determines Bandwidth of Link

Page 21: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 21

Signal Bandwidth Considerations

• The more frequencies are present in a signal, the more detail can be represented in the signal.

• The signal can look “cleaner”

• Energy is distributed over a larger part of the spectrum, i.e. it consumes more (spectrum) bandwidth

• Signals with more detail can represent more bits, so in general, higher (spectrum) bandwidth translates into a higher (information) bandwidth.

Page 22: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 22

Transmission Channel Considerations• Every medium supports

transmission in a certain frequency range.

• Outside this range, effects such as attenuation, .. degrade the signal too much

• Transmission and receive hardware will try to maximize the useful bandwidth in this frequency band.

• Tradeoffs between cost, distance, bit rate

• As technology improves, these parameters change, even for the same wire.

• Thanks to our EE friends

Frequency

Good Bad

Signal

Page 23: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 23

The Nyquist Limit

• A noiseless channel of width H can at most transmit a binary signal at a rate 2 x H.

• E.g. a 3000 Hz channel can transmit data at a rate of at most 6000 bits/second

• Assumes binary amplitude encoding

Page 24: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 24

Past the Nyquist Limit

• More aggressive encoding can increase the channel bandwidth.

• Example: modems• Same frequency - number of symbols per second• Symbols have more possible values

pskPsk+ AM

Page 25: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 25

Capacity of a Noisy Channel

• Can’t add infinite symbols - you have to be able to tell them apart. This is where noise comes in.

• Shannon’s theorem:• C = B x log(1 + S/N)• C: maximum capacity (bps)• B: channel bandwidth (Hz)• S/N: signal to noise ratio of the channel

• Often expressed in decibels (db). 10 log(S/N).

• Example:• Local loop bandwidth: 3200 Hz• Typical S/N: 1000 (30db)• What is the upper limit on capacity?

• Modems: Teleco internally converts to 56kbit/s digital signal, which sets a limit on B and the S/N.

Page 26: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 26

Example: Modem Rates

100

1000

10000

100000

1975 1980 1985 1990 1995 2000

Year

Mod

em r

ate

Page 27: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 28

Some Examples

• Differential quadrature phase shift keying• Four different phases representing a pair of bits• Used in 802.11b networks

• Quadrature Amplitude Modulation• Combines amplitude and phase modulation• Uses two amplitudes and 4 phases to represent

the value of a 3 bit sequence

Page 28: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 29

Modulation vs. BER

• More symbols =• Higher data rate: More information per baud• Higher bit error rate: Harder to distinguish symbols

• Why useful?• 802.11b uses DBPSK (differential binary phase shift keying) for

1Mbps, and DQPSK (quadriture) for 2, 5.5, and 11. • 802.11a uses four schemes - BPSK, PSK, 16-QAM, and 64-AM,

as its rates go higher.

• Effect: If your BER / packet loss rate is too high, drop down the speed: more noise resistance.

• We’ll see in some papers later in the semester that this means noise resistance isn’t always linear with speed.

Page 29: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 30

Outline

• RF introduction

• Modulation

• Antennas and signal propagation• How do antennas work• Propagation properties of RF signals

• Equalization, diversity, channel coding

• Multiple access techniques

• Wireless systems and standards

Page 30: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 31

What is an Antenna?

• Conductor that carries an electrical signal and radiates an RF signal.

• The RF signal “is a copy of” the electrical signal in the conductor

• Also the inverse process: RF signals are “captured” by the antenna and create an electrical signal in the conductor.

• This signal can be interpreted (i.e. decoded)

• Efficiency of the antenna depends on its size, relative to the wavelength of the signal.

• E.g. half a wavelength

Page 31: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 32

Types of Antennas

• Abstract view: antenna is a point source that radiates with the same power level in all directions – omni-directional or isotropic.

• Not common – shape of the conductor tends to create a specific radiation pattern

• Note that isotropic antennas are not very efficient!!• Unless you have a very large number of receivers

• Shaped antennas can be used to direct the energy in a certain direction.

• Well-known case: a parabolic antenna• Pringles boxes are cheaper

Page 32: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 33

Antennas and Attenuation

• Isotropic Radiator: A theoretical antenna• Perfectly spherical radiation.• Used for reference and FCC regulations.

• Dipole antenna (vertical wire)• Radiation pattern like a doughnut

• Parabolic antenna• Radiation pattern like a long balloon

• Yagi antenna (common in 802.11)• Looks like |--|--|--|--|--|--|• Directional, pretty much like a parabolic reflector

Page 33: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 34

Multi-element Antennas

• Multi-element antennas have multiple, independently controlled conductors.

• Signal is the sum of the individual signals transmitted (or received) by each element

• Can electronically direct the RF signal by sending different versions of the signal to each element.

• For example, change the phase in two-element array.

• Covers a lot of different types of antennas.

• Number of elements, relative position of the elements, control over the signals, …

Page 34: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 35

Directional Antenna Properties

• dBi: antenna gain in dB relative to an isotropic antenna with the same power.

• Example: an 8 dBi Yagi antenna has a gain of a factor of 6.3 (8 db = 10 log 6.3)

Page 35: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 36

Antennas

• Spatial reuse:• Directional antennas allow more communication in same 3D space

• Gain:• Focus RF energy in a certain direction• Works for both transmission and reception

• Frequency specific• Frequency range dependant on length / design of antenna, relative

to wavelength.

• FCC bit: Effective Isotropic Radiated Power. (EIRP).• Favors directionality. E.g., you can use an 8dB gain

antenna b/c of spatial characteristics, but not always an 8dB amplifier.

Page 36: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 37

Propagation Modes

• Line-of-sight (LOS) propagation.• Most common form of propagation• Happens above ~ 30 MHz• Subject to many forms of degradation (next set of

slides)• Ground-wave propagation.

• More or less follows the contour of the earth• For frequencies up to about 2 MHz, e.g. AM radio

• Sky wave propagation.• Signal “bounces” off the ionosphere back to earth – can

go multiple hops• Used for amateur radio and international broadcasts

Page 37: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 38

Limits to Speed and Distance

• Noise: “random” energy is added to the signal

• Attenuation: some of the energy in the signal leaks away

• Dispersion: attenuation and propagation speed are frequency dependent.

• Changes the shape of the signal

Page 38: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 39

Propagation Degrades RF Signals

• Attenuation in free space: signal gets weaker as it travels over longer distances.

• Radio signal spreads out – free space loss• Absorption

• Obstacles can weaken signal through absorption or reflection.

• Part of the signal is redirected• Multi-path effects: multiple copies of the signal interfere

with each other.• Similar to an unplanned directional antenna

• Mobility: moving receiver causes another form of self interference.

• Receiver moves ½ wavelength -> big change in wavelength

Page 39: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 40

Refraction

• Speed of EM signals depends on the density of the material.

• Vacuum: 3 x 108 m/sec• Denser: slower

• Density is captured by refractive index.

• Explains “bending” of signals in some environments.

• E.g. sky wave propagation• But also local, small scale

differences in the air

denser

Page 40: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 41

Free Space Loss

Loss = Pt / Pr = (4 d)2 / (Gr Gt 2)

• Loss increases quickly with distance (d2).• Need to consider the gain of the antennas at

transmitter and receiver.• Loss depends on frequency: higher loss with

higher frequency.• But careful: antenna gain depends on frequency too

• For fixed antenna area, loss decreases with frequency• Can cause distortion of signal for wide-band signals

Page 41: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 42

Other LOS Factors

• There are many noise sources.• Thermal noise: caused by agitation of the electrons• Intermodulation noise: result of mixing signals;

appears at f1 + f2 and f1 – f2

• Cross talk: picking up other signals (i.e. from other source-destination pairs)

• Impulse noise: irregular pulses of high amplitude and short duration – harder to deal with

• Absorption of energy in the atmosphere.• Very serious at specific frequencies, e.g. water vapor

(22 GHz) and oxygen (60 GHz)• Obviously objects also absorb

FairlyPredictableCan be planned foror avoided

Page 42: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 43

Propagation Mechanisms

• Besides line of sight, signal can reach receiver in three other “indirect” ways.

• Reflection: signal is reflected from a large object.

• Diffraction: signal is scattered by the edge of a large object – “bends”.

• Scattering: signal is scattered by an object that is small relative to the wavelength.

Page 43: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 44

Multipath Effects

• Receiver receives multiple copies of the signal, each following a different path

• Copies can either strengthen or weaken each other.

• Depends on whether they are in our out of phase

• Small changes in location can result in big changes in signal strength.

• Short wavelengths, e.g. 2.4 GHz 12 cm

• Difference in path length can cause inter-symbol interference (ISI).

Page 44: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 45

Example

Page 45: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 47

Fading in the Mobile Environment

• Fading: time variation of the received signal strength caused by changes in the transmission medium or paths.

• Rain, moving objects, moving sender/receiver, …

• Fast versus slow fading.• Fast: changes in distance of about half a wavelength – result in big

fluctuations in the instantaneous power• Slow: changes in larger distances affects the paths – result in a

change in the average power levels around which the fast fading takes place

• Selective versus non-selective (flat) fading.• Does the fading affect all frequency components equally• Region of interest is the spectrum used by the channel

Page 46: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 48

Fading - Example

• Frequency of 910 MHz or wavelength of about 33 cm

Page 47: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 49

Fading Channel Models

• Statistical distribution that captures the properties of classes of fading channels.

• Raleigh distribution: multiple indirect paths but no dominating, direct LOS path.

• E.g. urban environment with large cells, in buildings

• Ricean distribution: LOS path plus indirect paths.

• Open space or small cells

Page 48: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 50

Wireless Technologies

• Great technology: no wires to install, convenient mobility, ..• High attenuation limits distances.

• Wave propagates out as a sphere• Signal strength reduces quickly (1/distance)3

• High noise due to interference from other transmitters.• Use MAC and other rules to limit interference• Aggressive encoding techniques to make signal less sensitive to

noise• Other effects: multipath fading, security, ..• Ether has limited bandwidth.

• Try to maximize its use• Government oversight to control use

Page 49: 1 15-441 Computer Networking Lecture 2 – Physical Layer

1-18-06 Lecture 2: Physical Layer 51

Next Lecture

• RF introduction

• Modulation

• Antennas and signal propagation

• Equalization, diversity, channel coding

• Multiple access techniques

• Wireless systems and standards