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/
71
Embed
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
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
CS434/534: Topics in Networked (Networking) Systems
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
PHY considers only a sender sends a seq. of bits to a receiver
Outline❒ Recap❒ Wireless background
❍ Frequency domain❍ Modulation and demodulation❍ Wireless channels❍ Wireless PHY design❍ Wireless MAC design
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
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
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)
28
Properties of Ideal MAC Protocol
q Efficient
q Fair/rate allocation
q Simple
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
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
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
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
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
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
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
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,
❒ 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?
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
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
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
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)
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
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!
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
52
Modeln backlogged
each transmits with prob. p
m-n: unbackloggedeach transmits with prob. pa
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
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
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
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
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
Rake Receiver
58
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
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
61
Rake Receiver Blocks
Correlator
Finger 1
Finger 2
Finger 3
Combiner
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
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
64
Comparison [PAH95]
MCM is OFDM
Backup Slides: Error Corrections Codes
65
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
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
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”
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
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
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