Top Banner
1 15-441 Computer Networking Lecture 3 – Physical Layer
51

1 15-441 Computer Networking Lecture 3 – Physical Layer.

Jan 17, 2018

Download

Documents

Amice Watson

Lecture 3: Physical Layer3 Outline RF introduction Modulation Antennas and signal propagation Equalization, diversity, channel coding Multiple access techniques Wireless systems and standards
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 15-441 Computer Networking Lecture 3 – Physical Layer.

1

15-441 Computer Networking

Lecture 3 – Physical Layer

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

1-23-06 Lecture 3: Physical Layer 2

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 3: 1 15-441 Computer Networking Lecture 3 – Physical Layer.

1-23-06 Lecture 3: Physical Layer 3

Outline

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

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

1-23-06 Lecture 3: Physical Layer 4

Outline

• RF introduction• Modulation• Antennas and signal propagation• Equalization, diversity, channel coding

• Dynamic equalization• Diversity in space, frequency, and time

• Multiple access techniques• Wireless systems and standards

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

1-23-06 Lecture 3: Physical Layer 5

Diversity Techniques

• Distribute signal over multiple “channels”.• Channels experience independent fading • Reduces the error, i.e. only part of the signal is affected

• Time diversity: spread data out over time.• Useful for bursty errors, e.g. slow fading

• Space diversity: use multiple nearby antennas and combine signals.

• Can be directional• Frequency diversity: spread signal over a multiple

frequencies.• For example, spread spectrum

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

1-23-06 Lecture 3: Physical Layer 6

Time Diversity

• Spread blocks out over time.• Can use FEC or other error recovery

techniques to deal with burst errors.

A1 A2 A4A3 B1 B2 B4B3 C1 C2 C4C3

A1 A2D1 A3B1 B2 D2 B3C1 C2 D3C3

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

1-23-06 Lecture 3: Physical Layer 8

Space Diversity

• Use multiple antennas that pick up the signal in slightly different locations.

• If there is no direct path (Raleigh), chances are that the signals are mostly uncorrelated

• Antennas should be separated by ½ wavelength or more• If one antenna experiences deep fading, chances are that the

other antenna has a strong signal• Can use more than two antennas!

• Multiple space diversity reception methods:• Selection diversity: pick antenna with best SNR• Feedback/scanning: only switch is signals becomes weak• Maximal ratio combining: combine signals with a weight that is

based on their SNR• MIMO: multiple in multiple out.

• Also have multiple transmitting antennas

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

1-23-06 Lecture 3: Physical Layer 9

Spread Spectrum and CDMA

• Basic idea: Use a wider bandwidth than needed to transmit the signal.

• Why??• Don’t put all your eggs in one basket!• Resistance to jamming and interference

• If one sub-channel is blocked, you still have the others• Good for military• Minimize impact of a “bad” frequency

• Pseudo-encryption• Have to know what frequencies it will use

• Two techniques for spread spectrum…

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

1-23-06 Lecture 3: Physical Layer 10

Frequency Hopping SS

• Pick a set of frequencies within a band• At each time slot, pick a new frequency

• Ex: original 1Mbit 802.11 used 300ms time slots• Each frequency has the bandwidth of the original signal

• Dwell time is the time spent using one frequency• Spreading code determines the hopping sequence

• Must be shared by sender and receiver (e.g. standardized)• Usually frequency determined by a pseudorandom generator

function with a shared seed

Time

Frequency

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

1-23-06 Lecture 3: Physical Layer 11

Example: Original 802.11 Standard

• Used frequency hopping.• 96 channels of 1 MHz (only 78 used in US).

• Each channel carries only ~1% of the bandwidth• The dwell time is 390 msec.

• transmitter/receiver must be synchronized!• Standard defined 26 orthogonal hop sequences.• Transmitter used a beacon on fixed frequency to

inform the receiver of the hop sequence that will be used.

• Can support multiple simultaneous transmissions – use different hop sequences.

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

1-23-06 Lecture 3: Physical Layer 14

Direct Sequence Spread Spectrum

• Each bit is encoded as multiple bits, called chips.• Each chip is XORed with a “random” bit sequence

called a spreading or chipping code.• The resulting bit sequence is used to modulate

the signal.

1

0 0 1

1 1 0

0

0 1 1

0 1 1

1

0 0 1

1 1 0

0

1 1 0

1 1 0

0

1 0 1

1 0 1

1

0 1 0

1 0 1

Original Signal

Spreading Code

Transmitted Chips

XOR

Modulated Signal

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

1-23-06 Lecture 3: Physical Layer 15

Properties

• Since each bit it sent as multiple chips, you need more bps bandwidth to send the signal.

• Number of chips per bit is called the spreading ratio• Given the Nyquist and Shannon results, you need

more spectral bandwidth to do this.• Spreading the signal over the spectrum

• Advantage is that is transmission is more resilient.• DSSS signal will look like noise in a narrow band• Can lose some chips in a word and recover easily

• Multiple users can share bandwidth (easily).• Follows directly from Shannon (capacity is there)• Use a different chipping sequence

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

1-23-06 Lecture 3: Physical Layer 16

Spectrogram: Original FSK Signal

Tim

e

Frequency

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

1-23-06 Lecture 3: Physical Layer 17

Spectrogram: DSSS-encoded Signal

Tim

e

Frequency

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

1-23-06 Lecture 3: Physical Layer 18

Example: Original 802.11

• The DS PHY used an 11-to-1 spreading ratio and a Barker chipping sequence.

• Barker sequence has low autocorrelation properties – why?

• Receiver decodes by counting the number of “1” bits in each word

• 6 “1” bits correspond to a 0 data bit• Chips were transmitted using B-PSK modulation.

• Data rate was 1 Mbps (i.e. 11 Mchips/sec)• Extended to 2 Mbps by using a Q-PSK modulation

• Requires the detection of a ¼ phase shift

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

1-23-06 Lecture 3: Physical Layer 19

Example: Current 802.11b

• (Maximum) data rate is 11 Mbs.• Uses Complementary Code Keying (CCK).

• Complementary means that the code has good auto-correlation properties

• Want nice properties to ease recovery in the presence of noise, multipath interference

• Each word is mapped onto an 8 bit chip sequence• The CCK chip stream is transmitted using Q-PSK

modulation.• I.e. 4 values

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

1-23-06 Lecture 3: Physical Layer 20

Discussion

• Spread spectrum is very widely used.• Effective against noise and multipath• Multiple transmitters can use the same frequency range

• FCC requires the use of spread spectrum in ISM band.

• If signal is above a certain power level• Is also used in higher speed 802.11 versions.

• No surprise!

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

1-23-06 Lecture 3: Physical Layer 22

Outline

• RF introduction• Modulation• Antennas and signal propagation• Equalization, diversity, channel coding• Multiple access techniques

• Dividing capacity: FDMA, TDMA, CDMA• Bursty traffic: carrier sense techniques• Capture effect and hidden terminal problem

• Wireless systems and standards

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

1-23-06 Lecture 3: Physical Layer 23

MAC Layer

• Coordinate access to a shared medium

• Requirements• Efficiency• Reliability• Fairness• Support priority• Support group communication

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

1-23-06 Lecture 3: Physical Layer 24

MAC Layer (Cont.)

Base technologies• Frequency division multiple access (FDMA)• Time division multiple access (TDMA)• Code division multiple access (CDMA)

Access schemes• Centralized

• GSM• IS-95

• Distributed• CSMA/CD (Ethernet)• CSMA/CA (wireless LAN)

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

1-23-06 Lecture 3: Physical Layer 25

Supporting Multiple Channels

• Multiple channels can coexist if they transmit at a different frequency, or at a different time, or in a different part of the space.

• Three dimensional space: frequency, space, time• Space can be limited (using wires or) using transmit power

of wireless transmitters.• Frequency multiplexing means that different users use a

different part of the spectrum.• Again, similar to radio: 95.5 versus 102.5 station

• Time division multiplexing means that users send at different times.

• Static partitioning of time• Duplexing: splitting the time/frequencies between the up

and down link.

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

1-23-06 Lecture 3: Physical Layer 26

Frequency Division Multiplexing

Different users use Different carrier frequencies

Frequency

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

1-23-06 Lecture 3: Physical Layer 27

FDM Example: AMPS

• US analog cellular system in early 80’s.• Each call uses an up and down link channel.

• Channels are 30 KHz• About 12.5 + 12.5 MHz available for up and down

link channels per operator.• Supports 416 channels in each direction• 21 of the channels are used for data/control• Total capacity (across operators) is double of this

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

1-23-06 Lecture 3: Physical Layer 28

Time Division Multiplexing

• Different users use the wire at different points in time.

• Aggregate bandwidth also requires more spectrum.

Frequency

Frequency

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

1-23-06 Lecture 3: Physical Layer 29

Frequency versus Time-division Multiplexing• With frequency-division multiplexing

different users use different parts of the frequency spectrum.

• I.e. each user can send all the time at reduced rate

• Example: roommates • Hardware is slightly more expensive

and is less efficient use of spectrum

• With time-division multiplexing different users send at different times.

• I.e. each user can sent at full speed some of the time

• Example: a time-share condo• Drawback is that there is some

transition time between slots; becomes more of an issue with longer propagation times

• The two solutions can be combined.

Freq

uenc

y

Time

FrequencyBands

Slot Frame

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

1-23-06 Lecture 3: Physical Layer 30

TDM Example: GSM

• Global System for Mobile communication.• First introduced in Europe in early 90s

• Uses a combination of TDM and FDM.• 25 MHz each for up and down links.• Broken up in 200 KHz channels

• 125 channels in each direction• Each channel can carry about 270 kbs

• Each channel is broken up in 8 time slots• Slots are 0.577 msec long• Results in 1000 channels, each with about 25 kbs of useful data;

can be used for voice, data, control• General Packet Radio Service (GPRS).

• Data service for GSM, e.g. 4 down and 1 up channel

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

1-23-06 Lecture 3: Physical Layer 31

Code Division Multiple Access

• Users share spectrum and time, but use different codes to spread their data over frequencies.

• DSSS where users use different spreading sequences• Use spreading sequences that are orthogonal, i.e. they

have minimal overlap• The idea is that users will only rarely overlap and

the inherent robustness of DSSS will allow users to recover if there is a conflict.

• Overlap = use the same the frequency at the same time• The signal of other users will appear as noise

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

1-23-06 Lecture 3: Physical Layer 32

CDMA

• DSS with orthogonal codes• If receiver is using code ‘A’:

• Data xor A = signal• Output = sum(signal xor A)

• Let’s say someone else transmits with code ‘B’ at the same time:• Signal = Data xor A + other xor B• Output: sum((signal xor A + other xor B) xor A)

• = Data if A and B or orthogonal (dot product is zero)• Ex: A: 1 -1 -1 1 -1 1• B: 1 1 -1 -1 1 1 • Decode function: sum (bitwise received)• Rx A1: 1*1 + -1*-1 + -1*-1 + 1*1 + -1*-1 + 1*1 = 6• A1 + B1 signal: 2 0 -2 0 0 2• Decode at A: 2*1 + 0 + -2*-1 + 0 + 0 + 2*1 = 6 (!)

• In practice: use pseudorandom numbers, depend on balance and uniform distribution to make other transmissions look like noise

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

1-23-06 Lecture 3: Physical Layer 33

CDMA Discussion

• CDMA does not assign a fixed bandwidth to each user but a user’s bandwidth depends on the load.

• More users results more “noise” and less throughput for each user, e.g. more information lost due to errors

• How graceful the degradation is depends on how orthogonal the codes are

• TDMA and FDMA have a fixed channel capacity• Weaker signals may be lost in the clutter.

• This will systematically put the same node pairs at a disadvantage – not acceptable

• The solution is to add power control, i.e. nearby nodes use a lower transmission power than remote nodes

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

1-23-06 Lecture 3: Physical Layer 34

CDMA Example

• CDMA cellular standard.• Used in the US, e.g. Spring

• Allocates 1.228 MHz for basestation to mobile communication.

• Shared by 64 “code channels”• Used for voice (55), paging service (8), and control (1)

• Provides a lot error coding to recover from errors.• Voice data is 8550 bps• Coding and FEC increase this to 19.2 kbps• Then spread out over 1.228 MHz using DSSS; uses

QPSK

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

1-23-06 Lecture 3: Physical Layer 35

Supporting Bursty Data Traffic

• FDMA, TDMA, and CDMA carve up bandwidth in fixed-bandwidth channels – not efficient for bursty traffic.

• Alternative is to do “dynamic time sharing” of a single channel, i.e. users send packets as they become available.

• Called “multiple access” protocols• Challenge: users need contend for access to the channel.

• Class of “contention-based” MAC protocols• When two users transmit at the same time, we have a collision, i.e.

data is lost due to heavy interference

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

1-23-06 Lecture 3: Physical Layer 36

Medium Access Control

• Think back to Ethernet MAC:• Wireless is a shared medium• Transmitters interfere• Need a way to ensure that (usually) only one person

talks at a time.• Goals: Efficiency, possibly fairness

• But wireless is harder!• Can’t really do collision detection:

• Can’t listen while you’re transmitting. You overwhelm your antenna…

• Carrier sense is a bit weaker:• Takes a while to switch between Tx/Rx.

• Wireless is not perfectly broadcast

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

1-23-06 Lecture 3: Physical Layer 37

Example MAC Protocols

• Pure ALOHA• Transmit whenever a message is ready• Retransmit when ACK is not received

• Slotted ALOHA• Time is divided into equal time slots• Transmit only at the beginning of a time slot• Avoid partial collisions• Increase delay, and require synchronization

• Carrier Sense Multiple Access (CSMA)• Listen before transmit• Transmit only when no carrier is detected

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

1-23-06 Lecture 3: Physical Layer 38

“Wireless Ethernet”

• Collision detection is not practical.• Signal power is too high at the transmitter• So how do you detect collisions?

• Signals attenuate significantly with distance.• Strong signal from nearby node will overwhelm the weaker signal

from a remote transmitter• Capture effect: nearby node will always win in case of collision -

receiver may not even detect remote node• Hidden transmitter

• Two transmitters may not hear each other, which can cause collisions at a common receiver.

• Hidden terminal problem• RTS/CTS is designed to avoid this

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

1-23-06 Lecture 3: Physical Layer 39

A B C

Hidden Terminal Problem

• B can communicate with both A and C• A and C cannot hear each other• Problem

• When A transmits to B, C cannot detect the transmission using the carrier sense mechanism

• If C transmits, collision will occur at node B• Solution

• Hidden sender C needs to defer

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

1-23-06 Lecture 3: Physical Layer 40

A B C

Possible Solution: RTS/CTS

• When A wants to send a packet to B, A first sends a Request-to-Send (RTS) to B

• On receiving RTS, B responds by sending Clear-to-Send (CTS), provided that A is able to receive the packet

• When C overhears a CTS, it keeps quiet for the duration of the transfer

• Transfer duration is included in both RTS and CTS

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

1-23-06 Lecture 3: Physical Layer 41

Collision Detection & Reliability

• Impossible to detect collision using half-duplex radios

• Wireless links are prone to errors. High packet loss rate detrimental to transport-layer performance.

• Mechanisms needed to reduce packet loss rate experienced by upper layers

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

1-23-06 Lecture 3: Physical Layer 42

Simple Solution

• When B receives a data packet from A, B sends an Acknowledgement (ACK) to A.

• If node A fails to receive an ACK, it will retransmit the packet

A B C

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

1-23-06 Lecture 3: Physical Layer 43

802.11 Frame Priorities

• Short interframe space (SIFS)• For highest priority frames (e.g., RTS/CTS,

ACK)• DCF interframe space (DIFS)

• Minimum medium idle time for contention-based services

Time

Busy SIFS

DIFS

contentwindow

Frame transmission

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

1-23-06 Lecture 3: Physical Layer 44

SIFS/DIFS

SIFS makes RTS/CTS/Data/ACK atomic

RTS

CTS

Data

ACKSIFS SIFS SIFS DIFS

Time

Time

Sender1

Receiver1

RTS

TimeSender2

DIFS

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

1-23-06 Lecture 3: Physical Layer 45

802.11 RTS/CTS

• RTS sets “duration” field in header to• CTS time + SIFS + CTS time + SIFS + data pkt

time• Receiver responds with a CTS

• Field also known as the “NAV” - network allocation vector

• Duration set to RTS dur - CTS/SIFS time• This reserves the medium for people who hear

the CTS

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

1-23-06 Lecture 3: Physical Layer 46

C FA B EDRTS

RTS = Request-to-Send

IEEE 802.11

assuming a circular range

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

1-23-06 Lecture 3: Physical Layer 47

C FA B EDRTS

RTS = Request-to-Send

IEEE 802.11

NAV = 10

NAV = remaining duration to keep quiet

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

1-23-06 Lecture 3: Physical Layer 48

C FA B EDCTS

CTS = Clear-to-Send

IEEE 802.11

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

1-23-06 Lecture 3: Physical Layer 49

C FA B EDCTS

CTS = Clear-to-Send

IEEE 802.11

NAV = 8

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

1-23-06 Lecture 3: Physical Layer 50

C FA B EDDATA

•DATA packet follows CTS. Successful data reception acknowledged using ACK.

IEEE 802.11

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

1-23-06 Lecture 3: Physical Layer 51

IEEE 802.11

C FA B EDACK

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

1-23-06 Lecture 3: Physical Layer 52

C FA B EDACK

IEEE 802.11

Reserved area

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

1-23-06 Lecture 3: Physical Layer 53

IEEE 802.11

C FA B EDDATA

Transmit “range”

Interference“range”

Carrier senserange

FA

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

1-23-06 Lecture 3: Physical Layer 54

Outline

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

• 802.11

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

1-23-06 Lecture 3: Physical Layer 55

Readings

• Performance analysis of the IEEE 802.11 distributed coordination function, JSAC, Mar 2000

• Ultra-Wideband Technology for Short- and Medium-range Wireless Communication, Foerster, Green, Somayazulu, Leeper, Intel Technology Journal, Q2 2001.

• "The Bluetooth radio system," J. C. Haartsen, IEEE Pers. Commun. Mag., pp. 28--36, Feb. 2000.