CS434/534: Topics in Networked (Networking)...

71
CS434/534: Topics in Networked (Networking) Systems Wireless Foundation: OFDM Implementation Wireless MAC Layer Design Yang (Richard) Yang Computer Science Department Yale University 208A Watson Email: [email protected] http://zoo.cs.yale.edu/classes/cs434/

Transcript of CS434/534: Topics in Networked (Networking)...

Page 1: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

CS434/534: Topics in Networked (Networking) Systems

Wireless Foundation: OFDM Implementation

Wireless MAC Layer Design

Yang (Richard) YangComputer Science Department

Yale University208A Watson

Email: [email protected]

http://zoo.cs.yale.edu/classes/cs434/

Page 2: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

Outline❒ Recap❒ Wireless background

❍ Frequency domain❍ Modulation and demodulation❍ Wireless channels❍ Wireless PHY design

• design for flat fading• design for ISI

– what is ISI– band limited ISI

» symbol wave shaping– multi-path ISI

» equalization (Viterbi)» OFDM

❍ Wireless MAC design

Page 3: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

3

Admin.

❒ PS2 on wireless posted

❒ Please see potential projects

Page 4: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

Recap: Inter-Symbol Interference (ISI)

❒ ISI happens when the signaling for one symbol leaks into that of another symbol

❒ Why does ISI happen?❍ Band limit produced ISI❍ Multipath produced ISI

4

1 2

Page 5: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

5

Recap: Band-Limited ISIa g(t)

A design of p(t) has no ISI iff folded spectrum is flatP∑( f ) ≡

1T

P( f + n /T ) = p0n=−∞

Page 6: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

6

Recap: Multipath ISI

❒ The problem: given received y[m], m = 1, …, L+2, where L is frame size and assume 3 delay taps (it is easy to generalize to D taps):

y[1] = x[1] h0 + w[1]y[2] = x[2]h0 + x[1] h1 + w[2]y[3] = x[3]h0 + x[2]h1 + x[3] h2 + w[3]y[4] = x[4]h0 + x[3]h1 + x[2] h2 + w[4]y[5] = x[5]h0 + x[4]h1 + x[3] h2 + w[5]…y[L] = x[L]h0 + x[L-1]h1 + x[L-2]h2 + w[L]y[L+1] = x[L]h1 + x[L-1]h2 + w[L+1]y[L+2] = x[L]h2 + w[L+2]

determine x[1], x[2], … x[L]http://en.wikipedia.org/wiki/Andrew_Viterbi

Page 7: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

7

s[0] s[1] s[2] s[3] s[4]

0

1

00

01

10

11

000

010

100

110

001

011

101

111

000

010

100

110

001

011

101

111

x[1]=0

x[1]=1

x[2]=0

x[2]=1

x[2]=0

x[2]=1

x[3]=0

x[3]=1

x[3]=0

x[3]=1

x[3]=0

x[3]=1

x[3]=0

x[3]=1

observe y[1] observe y[2] observe y[3] observe y[4]

prob. of observing y[4]:w[4] = y[4]-x[4]h0-x[3]h1-x[2]h2

prob. of observing y[1]:w[1] = y[1]-x[1]h0

prob. of observing y[2]:w[2] = y[2]-x[1]h0-x[2]h1

Page 8: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

Recap: Multiple Carrier Modulation and OFDM

8

i j

Despite wave shaping, there can be leak from one subcarrier to another subcarrier

if integer number of cycles in [0, T]

cos[2π ft0

T

∫ +φ]dt = 0

Page 9: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

OFDM Modulation

9

Page 10: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

10

OFDM Implementation

❒ Take N symbols and place one symbol on each subcarrier (freq.)

❒ Q: complexity of the implementation strategy?

Freq0

FreqN-1

d0ej2π 0 fsc 0

dN−1ej2π (N−1) fsc 0

d0ej2π 0 fscTs

dN−1ej2π (N−1) fscTs

d0ej2π 0 fsc 2Ts

dN−1ej2π (N−1) fsc 2Ts

Ts: per sample time

Page 11: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

11

OFDM: Implementation Issue❒ Hardware implementation can be expensive if we use

one oscillator for each subcarrier❒ Software implementation requires N multiplications

per time output => N2 multi. per N outputs

Freq0

FreqN-1

d0ej2π 0 fsc 0

dN−1ej2π (N−1) fsc 0

d0ej2π 0 fscTs

dN−1ej2π (N−1) fscTs

d0ej2π 0 fsc 2Ts

dN−1ej2π (N−1) fsc 2Ts

Page 12: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

12

OFDM: Key Idea 2

❒ Consider data as coefficients in the frequency domain, use inverse Fourier transform to generate time-domain sequence

outk = dnej2π (nfsc )kTs

n=0

N−1

❒ Assume N outputs per symbol time T, fsc=1/T

outk = dnej2π (nfsc )kTs

n=0

N−1

∑ = dnej2π (nfsc )k

TN

n=0

N−1

∑ = dnej2π 1

NnkfscT

n=0

N−1

= dnej2π 1

Nnk

n=0

N−1

Page 13: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

13

OFDM Implementation: FFT

channel

Page 14: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

14

OFDM Implementation

❒ Parallel data streams are used as inputs to an IFFT

❒ IFFT does multiplexing and modulation in one step !

Page 15: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

15

Guard Interval: Removing ISI

❒ Orthogonal subcarriers remove inter-carrier interference

❒ Slow symbol rate reduces inter-symbol interference, but may still have ISI

❒ Basic idea of GI: skip the first part “damaged” signal

1 2

1 2

More details: Chap. 13.1.4 Gast

Page 16: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

16

OFDM Guard Interval

Page 17: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

17

OFDM Implementation

http://proquest.safaribooksonline.com/0596100523?tocview=true

Page 18: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

OFDM in 802.11a: Channels+Subcarriers❒ Symbol time T = 1/312.5KHz = 3.2us❒ Each physical channel is 20 MHz

❒ Each channel is divided into subcarriers (48 data, 4 pilot (requirement on subcarrier freq?)

18

5150 [MHz]5180 53505200

36 44

center frequency = 5000 + 5*channel number [MHz]

channel#40 48 52 56 60 64

149 153 157 1615220 5240 5260 5280 5300 5320

5725 [MHz]5745 58255765

channel#

5785 5805

Page 19: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

OFDM in 802.11a:FFT + GI❒ 64 samples FFT + 16 GI❒ Office: delay spread 40-70 ns (up to 200 ns)

19

http://standards.ieee.org/getieee802/download/802.11a-1999.pdf

Page 20: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

20

Other Multipath Techniques

❒ There are other techniques to handle multipath such as Rake Receiver

❒ See backup slides for somedetails

Page 21: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

21

Summary of Wireless PHY

InterleavingConvolutional

encoderQAM Mod IFFT GI Addition

Symbol WaveShaping

ScrambleTo RF

Direct SequenceSpread Spectrum

DQPSK ModSymbol Wave

ShapingScramble

(a) IEEE 802.11b 2Mbps

To RF

(b) IEEE 802.11a/g 24Mbps

Demod +Interleaving

FFTViterbi

decodingRemove GI

From RF

Descramble

DQPSK DemodDespreading Descramble

Transmitter:

Receiver:

Transmitter:

Receiver:

Samples@32Mbps

Samples@352Mbps

[email protected]

From RF

[email protected]

Decimation

Samples@352Mbps

Samples@32Mbps

Bits@2Mbps

Bits@48Mbps

Bits@48Mbps

Samples@512Mbps

[email protected]

Samples@640Mbps

Decimation

Samples@384Mbps

Bits@24Mbps

Bits@2Mbps

[email protected]

Samples@640Mbps

Samples@512Mbps

Samples@384Mbps

Bits@48Mbps

Bits@24Mbps

Bits@24Mbps

To MAC

From MAC

To MAC

Bits@2Mbps

Bits@2Mbps

Bits@24Mbps

From MAC

Figure 1: PHY operations of IEEE 802.11a/b/g transceiver.

functional blocks in their PHY components. Thesefunctional blocks are pipelined with one another. Dataare streamed through these blocks sequentially, but withdifferent data types and sizes. As illustrated in Figure 1,different blocks may consume or produce different typesof data in different rates arranged in small data blocks.For example, in 802.11b, the scrambler may consumeand produce one bit, while DQPSK modulation mapseach two-bit data block onto a complex symbol whichuses two 16-bit numbers to represent the in-phase andquadrature (I/Q) components.

Each PHY block performs a fixed amount of compu-tation on every transmitted or received bit. When thedata rate is high, e.g., 11Mbps for 802.11b and 54Mbpsfor 802.11a/g, PHY processing blocks consume a sig-nificant amount of computational power. Based on themodel in [19], we estimate that a direct implementationof 802.11b may require 10Gops while 802.11a/g needsat least 40Gops. These requirements are very demand-ing for software processing in GPPs.

PHY processing blocks directly operate on the dig-ital waveforms after modulation on the transmitter sideand before demodulation on the receiver side. Therefore,high-throughput interfaces are needed to connect theseprocessing blocks as well as to connect the PHY andradio front-end. The required throughput linearly scaleswith the bandwidth of the baseband signal. For example,the channel bandwidth is 20MHz in 802.11a. It requiresa data rate of at least 20M complex samples per secondto represent the waveform [14]. These complex samplesnormally require 16-bit quantization for both I and Qcomponents to provide sufficient fidelity, translating into32 bits per sample, or 640Mbps for the full 20MHz chan-nel. Over-sampling, a technique widely used for betterperformance [12], doubles the requirement to 1.28Gbps

to move data between the RF frond-end and PHY blocksfor one 802.11a channel.

2.2 Wireless MACThe wireless channel is a resource shared by alltransceivers operating on the same spectrum. As si-multaneously transmitting neighbors may interfere witheach other, various MAC protocols have been developedto coordinate their transmissions in wireless networks toavoid collisions.

Most modern MAC protocols, such as 802.11, requiretimely responses to critical events. For example, 802.11adopts a CSMA (Carrier-Sense Multiple Access) MACprotocol to coordinate transmissions [7]. Transmittersare required to sense the channel before starting theirtransmission, and channel access is only allowed whenno energy is sensed, i.e., the channel is free. The latencybetween sense and access should be as small as possible.Otherwise, the sensing result could be outdated and inac-curate. Another example is the link-layer retransmissionmechanisms in wireless protocols, which may require animmediate acknowledgement (ACK) to be returned in alimited time window.

Commercial standards like IEEE 802.11 mandate aresponse latency within tens of microseconds, which ischallenging to achieve in software on a general purposePC with a general purpose OS.

2.3 Software Radio RequirementsGiven the above discussion, we summarize the require-ments for implementing a software radio system on ageneral PC platform:High system throughput. The interfaces between theradio front-end and PHY as well as between somePHY processing blocks must possess sufficiently high

Page 22: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

22

Wireless PHY

http://setemagali.com/2009/10/12/climbing-the-mountain-everyday/

WirelessPHY

Page 23: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

23

Physical Communication in Context

applicationtransportnetworklinkphysical

applicationtransportnetworklinkphysical

applicationtransportnetworklinkphysical

applicationtransportnetworklinkphysical

networklinkphysical

data

data

PHY considers only a sender sends a seq. of bits to a receiver

Page 24: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

Outline❒ Recap❒ Wireless background

❍ Frequency domain❍ Modulation and demodulation❍ Wireless channels❍ Wireless PHY design❍ Wireless MAC design

Page 25: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

25

Link Layer Servicesq Framing

o separate bits into frames; each frame has header, trailer and error detection/correction

q Multiplexing/demultiplexingo use frame headers to identify src, dest

q Media access controlq Reliable delivery between adjacent nodes

o seldom used on low bit error link (fiber, some twisted pair)o common for wireless links: high error rates

Page 26: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

26

Wireless Access Problem

❒ Single shared broadcast channel ❍ thus, if two or more simultaneous

transmissions by nodes, due to interference, only one node can send successfully at a time

Page 27: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

27

Multiple Access Control (MAC) Protocol❒ Protocol that determines how nodes share channel, i.e.,

determines when nodes can transmit❒ MAC is hard because communication about channel

sharing must use channel itself ! ❒ We start with the simplest scenario (e.g., 802.11 or

cellular up links) in this class:❍ a single receiver (the Access Point)

Page 28: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

28

Properties of Ideal MAC Protocol

q Efficient

q Fair/rate allocation

q Simple

Page 29: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

29

MAC Protocols: a Taxonomy

Goals❒ efficient, fair, simple

Three broad classes:❒ channel partitioning

❍ divide channel into smaller “pieces” (time slot, frequency, code)

❒ non-partitioning❍ random access

• allow collisions❍ “taking-turns”

• a token coordinates shared access to avoid collisions

Page 30: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

Outline❒ Recap❒ Wireless background

❍ Frequency domain❍ Modulation and demodulation❍ Wireless channels❍ Wireless PHY design❍ Wireless MAC design

• wireless access problem and taxonomy• resource partitioning MAC

Page 31: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

31

Example Partitioning: FDMA

FDMA: frequency division multiple access❒ Channel divided into frequency bands❒ A transmission uses a frequency band

freq

uenc

y ba

nds

5

1

432

6

Page 32: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

32

Example Partitioning: TDMA

TDMA: time division multiple access❒ Time divides into frames; frame divides into slots❒ A transmission uses a slot in a frame

Page 33: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

33

Recall: GSM

❒ A GSM operator uses TDMA and FDMA to divide its allocated frequency❍ divide allocated spectrum into different physical

channels; each physical channel has a frequency band of 200 kHz

❍ partition the time of each physical channel into frames; each frame has a duration of 4.615 ms

❍ divides each frame into 8 time slots (also called a burst)❍ each slot is a logical channel❍ user data is transmitted through a logical channel

Page 34: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

34

Example Partitioning: CDMA

CDMA (Code Division Multiple Access)❒ Unique “code” assigned to each user; i.e.,

code set partitioning

❒ All transmissions share the same frequency and time; each transmission uses DSSS, and has its own “chipping” sequence (i.e., code) to encode data❍ e.g. code = -1 1 1 -1 1 -1 1

Examples: Sprint and Verizon, WCDMA

Page 35: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

35

DSSS Revisited

user data d(t)

code c(t)

resultingsignal

1 -1

-1 1 1 -1 1 -1 1 -11 -1 -1 1 11

X

=

tb

tc

tb: bit periodtc: chip period

-1 1 1 -1 -1 1 -1 11 -1 1 -1 -11

Page 36: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

36

Illustration: CDMA/DSSS Using BPSK

❒ Assume BPSK modulation using carrier frequency f :yi(t) = A xi(t)ci(t) sin(2p ft)

• A: amplitude of signal• f: carrier frequency• xi(t): data of user i in [+1, -1]• ci(t): code of i (a chipping sequence in [+1, -1])

❒ Suppose only i transmitsy(t) = yi(t)

❒ Decode at receiver i❍ incoming signal multiplied by ci(t) sin(2p ft)❍ since, ci(t) ci(t) = 1,

yi(t)ci(t) sin(2p ft) = A xi(t) sin2(2pft)

Page 37: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

37

Illustration: Multiple User CDMA

❒ Assume M users simultaneously transmit:y(t) = y1(t) + y2(t) … + yM(t)

❒ At receiver i, incoming signal y(t) multiplied by ci(t) sin(2p ft)

❍ consider the effect of j’s transmissionyj(t)ci(t) sin(2p ft) = A cj(t)ci(t)xj(t) sin2(2p fct)

Condition for signal from j on effect on i?

Page 38: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

38

CDMA: Deal with Multiple-User Interference

❒ Two codes Ci and Cj are orthogonal, if❍ , where we use “.” to denote inner product,

e.g.

❒ If codes are orthogonal, multiple users can “coexist” and transmit simultaneously with minimal interference

•0=• ij cc

C1: 1 1 1 -1 1 -1 -1 -1C2: 1 -1 1 1 1 -1 1 1

--------------------------------------------------C1 . C2 = 1 +(-1) + 1 + (-1) +1 + 1+ (-1)+(-1)=0 •

Analogy: Speak in different languages!

Page 39: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

39

Capacity of CDMA

❒ In realistic setup, cancellation of others’ transmission is incomplete

❒ Assume the received power at base station from all nodes is the same P (how?)

❒ The power of the transmission with known code is increased to N P, where N is chipping expansion factor

❒ The others remain on the order of P❒ Assume a total of M users❒ Then 1)1( 0 -

»+-

=MN

NPMNPSNR For IS-95 CDMA,

N = 1.25M/4800 = 260

B

Page 40: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

40

Generating Orthogonal Codes

❒ The most commonly used orthogonal codes in current CDMA implementation are the Walsh Codes

÷÷ø

öççè

æ=

=

nn

nnn WW

WWW

W

2

0 )1(

Page 41: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

41

Walsh Codes

1

1,1

1,-1

1,1,1,1

1,1,-1,-1

X

X,X

X,-X 1,-1,1,-1

1,-1,-1,11,-1,-1,1,1,-1,-1,1

1,-1,-1,1,-1,1,1,-1

1,-1,1,-1,1,-1,1,-1

1,-1,1,-1,-1,1,-1,1

1,1,-1,-1,1,1,-1,-1

1,1,-1,-1,-1,-1,1,1

1,1,1,1,1,1,1,1

1,1,1,1,-1,-1,-1,-1

1 2 4 8

n 2n

...

...

...

...

Page 42: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

42

Orthogonal Variable Spreading Factor (OSVF)❒ Variable codes: Different users use different

lengths spreading codes❒ Orthogonal: diff. users’ codes

are orthogonal

1

1,1

1,-1

1,1,1,1

1,1,-1,-1

X

X,X

X,-X 1,-1,1,-1

1,-1,-1,11,-1,-1,1,1,-1,-1,1

1,-1,-1,1,-1,1,1,-1

1,-1,1,-1,1,-1,1,-1

1,-1,1,-1,-1,1,-1,1

1,1,-1,-1,1,1,-1,-1

1,1,-1,-1,-1,-1,1,1

1,1,1,1,1,1,1,1

1,1,1,1,-1,-1,-1,-1

SF=1 SF=2 SF=4 SF=8

SF=n SF=2n

...

...

...

...

If user 1 is given code [1,1], what orthogonal codes can we give to other users?

Page 43: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

43

WCDMA Orthognal Variable Spreading Factor (OSVF)❒ Flexible code (spreading factor) allocation

❍ up link SF: 4 – 256❍ down link SF: 4 - 512

WCDMA downlink

Page 44: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

44

Summary

❒ SDMA, TDMA, FDMA and CDMA are basic media partitioning techniques❍ divide media into smaller “pieces” (space, time

slots, frequencies, codes) for multiple transmissions to share

❒ A remaining question is: how does a network allocate space/time/freq/code?

Page 45: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

Outline❒ Recap❒ Wireless background

❍ Frequency domain❍ Modulation and demodulation❍ Wireless channels❍ Wireless PHY design❍ Wireless MAC design

• wireless access problem and taxonomy• resource partitioning MAC• media access protocols

Page 46: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

46

GSM Logical Channels and Request

❒ Control channels❍ Broadcast control channel

(BCCH)• from base station, announces

cell identifier, synchronization❍ Common control channels

(CCCH)• paging channel (PCH): base

transceiver station (BTS) pages a mobile host (MS)

• random access channel (RACH): MSs for initial access, slotted Aloha

• access grant channel (AGCH): BTS informs an MS its allocation

❍ Dedicated control channels• standalone dedicated control channel

(SDCCH): signaling and short message between MS and an MS

❒ Traffic channels (TCH)

❒ call setup from an MSBTSMS

RACH (request signaling channel)

AGCH (assign signaling channel)

SDCCH (request call setup)

SDCCH (assign TCH)

SDCCH message exchange

Communication

Page 47: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

47

Slotted Aloha [Norm Abramson]

❒ Time is divided into equal size slots (= pkt trans. time)

❒ Node with new arriving pkt: transmit at beginning of next slot

❒ If collision: retransmit pkt in future slots with probability p, until successful.

Success (S), Collision (C), Empty (E) slots

A

B

Page 48: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

48

Slotted Aloha EfficiencyQ: What is the fraction of successful

slots?suppose n stations have packets to sendsuppose each transmits in a slot with probability p

- prob. of succ. by a specific node: p (1-p)(n-1)

- prob. of succ. by any one of the N nodesS(p) = n * Prob (only one transmits) = n p (1-p)(n-1)

Page 49: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

49

Goodput vs. Offered Load Curve

Define G = offered load = np0.5 1.0 1.5 2.0

Slotted Aloha

❒ when G (=p*n) < 1, as p (or n) increases❍ probability of empty slots reduces❍ probability of collision is still low, thus goodput increases

❒ when G (=p*n) > 1, as p (or n) increases, ❍ probability of empty slots does not reduce much, but❍ probability of collision increases, thus goodput decreases

❒ goodput is optimal when G (=p*n) = 1

Page 50: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

50

Maximum Efficiency vs. n

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

2 7 12 17 n

max

imum

effi

cien

cy1/e = 0.37

At best: channeluse for useful transmissions 37%of time!

Page 51: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

51

Dynamics of (Slotted) Aloha

❒ In reality, the number of stations backlogged is changing❍ we need to study the dynamics when using a fixed

transmission probability p

❒ Assume we have a total of m stations (the machines on a LAN):❍ n of them are currently backlogged, each tries

with a (fixed) probability p❍ the remaining m-n stations are not backlogged.

They may start to generate packets with a probability pa, where pa is much smaller than p

Page 52: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

52

Modeln backlogged

each transmits with prob. p

m-n: unbackloggedeach transmits with prob. pa

Page 53: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

53

Dynamics of Aloha: Effects of FixedProbability

n: number of backlogged stations

0 m

successful transmission rate at

offered load np + (m-n)pa

new arrival rate:(m-n) pa

desirable stable point

undesirable stable point

Lesson: if we fix p, but n varies, we may have an undesirable stable point

offered load = 1

- assume a total ofm stations- pa << p- success rate is thedeparture rate, the rate the backlog is reducing

dep.andarrivalrateofbackloggedstations

Page 54: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

54

Summary of Problems of Slotted Aloha❒ Advantages

o Simple, decentralized random access protocol

q Issueso Low efficiency

o Only ~37% at optimal transmission rateo Even lower efficiency at non-optimal (fixed p)

o No rate allocation/fairness

Page 55: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

Outline❒ Recap❒ Wireless background

❍ Frequency domain❍ Modulation and demodulation❍ Wireless channels❍ Wireless PHY design❍ Wireless MAC design

• wireless access problem and taxonomy• wireless resource partitioning dimensions• media access protocols

– ALOHA protocol– The Ethernet protocol

Page 56: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

56

Ethernet Fix for Efficiency

❒ Introduce collision detection: instead of wasting the whole frame transmission time (a slot), we waste only the time needed to detect collision.

❒ Introduce adaptive probability: reduce probability of trans. as # of collisions increases❍ If more collisions => p is high => should reduce p

P

P: packet size, C: contention window

C C C

Page 57: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

57

Ethernet Fix: Carrier-Sense Multiple Access /Collision Detection/Exponential Backoff

get a frame from upper layer;K := 0; n := 0; // K: control wait time; n: no. of collisionsrepeat:

wait for K * 512 bit-time;while (network busy) wait;wait for 96 bit-time after detecting no signal;transmit and detect collision;if detect collision

stop and transmit a 48-bit jam signal;n ++;m:= min(n, 10), where n is the number of collisionschoose K randomly from {0, 1, 2, …, 2m-1}.if n < 16 goto repeatelse give up

elsedeclare success

The Ethernet algorithm

Q: Does Ethernet alg work well in wireless?

Carrier sense

DetectCollision

AdaptProbability

Page 58: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

Rake Receiver

58

Page 59: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

59

Multipath Diversity: Rake Receiver

❒ Instead of considering delay spread as an issue, use multipath signals to recover the original signal

❒ Used in IS-95 CDMA, 3G CDMA, and 802.11

❒ Invented by Price and Green in 1958❍ R. Price and P. E. Green, "A

communication technique for multipath channels," Proc. of the IRE, pp. 555--570, 1958

Page 60: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

60

Multipath Diversity: Rake Receiver

❒ Use several "sub-receivers" each delayed slightly to tune in to the individual multipath components

❒ Each component is decoded independently, but at a later stage combined❍ this could very well result in

higher SNR in a multipath environment than in a "clean" environment

LOS pulsemultipathpulses

Page 61: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

61

Rake Receiver Blocks

Correlator

Finger 1

Finger 2

Finger 3

Combiner

Page 62: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

62

Rake Receiver: Matched Filter

❒ Impulse response measurement❒ Tracks and monitors peaks with a

measurement rate depending on speeds of mobile station and on propagation environment

❒ Allocate fingers: largest peaks to RAKE fingers

Page 63: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

63

Rake Receiver: Combiner

❒ The weighting coefficients are based on the power or the SNR from each correlator output

❒ If the power or SNR is small out of a particular finger, it will be assigned a smaller weight:

å=

= M

ii

mm

Z

Z

1

2

2

a

Page 64: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

64

Comparison [PAH95]

MCM is OFDM

Page 65: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

Backup Slides: Error Corrections Codes

65

Page 66: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

66

Reed-Solomon Codes

❒ Very commonly used, send nsymbols for k data symbols❍ e.g., n = 255, k = 223

❒ We will discuss the original version (1960)❍ modern versions are slightly different; they use generator

polynomial, but the idea is essentially the same

❒ If the data we want to send is (x0, x1,…, xk-1), where xi are data symbols, define polynomial

P(t) = x0 + x1t + x2t + …xk-1tk-1

❒ Assume b is a generator of the symbol field (i.e., bi not equal to bj if i not equal to j)

❒ Then for the data sequence, send P(0), P(b), P(b2), P(bn-1) to receiver

Page 67: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

67

Reed-Solomon Codes

❒ Receive the message P(0), P(b), P(b2), P(bn-1)❒ If no error, can recover data from any k

equations:

)1)(1(1

2)1(2

110

1

)1(21

42

210

2

11

2210

0

...)(...

...)(

...)(

)0(

---

---

--

--

++++=

++++=

++++=

=

knk

nnn

kk

kk

xxxxP

xxxxPxxxxP

xP

bbbb

bbbb

bbbb

since any k equations are independent, they have a unique solution

Page 68: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

68

Reed-Solomon Codes: Handling Errors

❒ But, what if s errors occur during transmission?

❒ Keep a counter (vote) for each solution

❒ Enumerate all combinations of k equations, for each combination, solve it, and increase the counter of the solution

❒ Identify the solution which gets the largest # of “votes”

Page 69: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

69

Reed-Solomon Codes

❒ The transmitted data is the correct solution for n-s equations, and thus gets

votes (i.e., combinations of k equations)

❒ An incorrect solution can satisfy at most k-1+s equations, and the # of votes it can get is at most:

÷÷ø

öççè

æ -ksn

÷÷ø

öççè

æ +-ksk 1

Page 70: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

70

Reed-Solomon Codes

❒ If

or (n-s > k – 1 + s) or (n-k > 2s – 1) or (n-k ³ s), it can correct any s errors

÷÷ø

öççè

æ +->÷÷

ø

öççè

æ -ksk

ksn 1

Page 71: CS434/534: Topics in Networked (Networking) Systemszoo.cs.yale.edu/classes/cs434/cs434-2017-spring/... · A GSM operator uses TDMA and FDMA to divide its allocated frequency divide

71

Reed-Solomon Codes❒ The voting-based decoding algorithm proposed in 1960 is

inefficient❒ 1967 - Berlekamp introduced first truly efficient algorithm

for both binary and nonbinary codes. Complexity increases linearly with number of errors

❒ 1975 - Sugiyama, et al. Showed that Euclid’s algorithm can be used to decode R-S codes

❒ Below is a typical current decoder