CS434/534: Topics in Networked (Networking) Systems Wireless Foundation: Diversity Design for Flat fading Yang (Richard) Yang Computer Science Department Yale University 208A Watson Email: yry@cs.yale.edu http://zoo.cs.yale.edu/classes/cs434/
Admin Start to schedule meetings w/ me on potential projects. 2
Recap: Digital Signal Modulation Modulation of digital signals also known as Shift Keying Amplitude Shift Keying (ASK): vary carrier amp. according to data 1 0 1 t Frequency Shift Keying (FSK) o vary carrier freq. according to bit value 1 0 1 t 1 0 1 Phase Shift Keying (PSK) o vary carrier freq. according to data t 3
Recap: QAM as an Example Quadrature Amplitude Modulation (QAM): combines amplitude and phase modulation, e.g., 16- QAM (4 bits = 1 symbol) Q 0010 0001 0011 0000 φ a I 1000 4
Reality Check Transmitter: Receiver: Bits @2Mbps From MAC Samples @1.4Gbps From RF Scramble Bits @2Mbps Decimation DQPSK Mod Samples @352Mbps Samples @32Mbps Despreading Direct Sequence Spread Spectrum Samples @32Mbps Samples @352Mbps DQPSK Demod Symbol Wave Shaping Bits @2Mbps Samples @1.4Gbps Descramble To RF Bits @2Mbps To MAC (a) IEEE 802.11b 2Mbps 5
Recap:: How does the Receiver Detect Which g i () is Sent? Assume synchronized (i.e., the receiver knows the symbol boundary). 6
Recap: General Matched Filter Detection: Implementation for Multiple Sig Func. Basic idea consider each g m [0,T] as a point (with coordinates) in a space compute the coordinate of the received signal x[0,t] check the distance between g m [0,T] and the received signal x[0,t] pick m* that gives the lowest distance value 7
Recap: Wireless Channels Channel characteristics change over location, time, and frequency Received Signal Power (db) path loss power Large-scale fading log (distance) small-scale fading time
Recap: Wireless Channel: Multipath Effect (A Simple Example) Assume transmitter sends out signal cos(2p f c t) cos( 2pft) phase difference: d 1 d 2 a d ( 1 2pf [ t- ) 1 cos ] c d 1 d - - 1 d d1 d2 d1 d2 p ( f c - f c ) + p = 2pf + p = 2p + p c l 2 2 - d ( 2 2pf [ t- ) 2 cos ] c receiver moves to the right by l/4, phase diff changes by pi. a d 2 9
Recap: Wireless Channel: Multipath Effect (Mover) example cos( 2pft) d Suppose d 1 =r 0 +vt d 2 =2d-r 0 -vt d1»d2 d 1 d 2 a d ( 1 2pf [ t- ) 1 cos ] c d 1 - a d ( 2 2pf [ t- ) 2 cos ] c d 2 10
Waveform d 2pvf d-r0 2sin(2p f [ t - ])sin( [ t - c c cv ]) v = 65 miles/h, f c = 1 GHz: f c v/c = 10 9 * 30 / 3x10 8 = 100 Hz 10 ms deep fade 11
Multipath with Mobility 12
Outline Recap Wireless background Frequency domain Modulation and demodulation Basic concepts Amplitude modulation/demodulation Digital modulation of additive noise channel Wireless channels intro shadowing multipath» space, frequency, time deep fade» delay spread 13
Multipath Can Disperse Signal signal at sender Time dispersion: signal is dispersed over time LOS pulse multipath pulses signal at receiver LOS: Line Of Sight 14
JTC Model: Delay Spread Residential Buildings 15
Dispersed Signal -> ISI Dispersed signal can cause interference between neighbor symbols, Inter Symbol Interference (ISI) signal at sender Assume 300 meters delay spread, the arrival time difference is 300/3x10 8 = 1 us è if symbol rate > 1 Ms/sec, we will have ISI LOS pulse multipath pulses In practice, fractional ISI can already substantially increase loss rate signal at receiver LOS: Line Of Sight 16
Summary of Progress: Wireless Channels Channel characteristics change over location, time, and frequency Received Signal Power (db) path loss power Large-scale fading log (distance) small-scale fading time frequency LOS pulse multipath pulses 17
Roadmap: Challenges and Techniques of Wireless Design Shadow fading (large-scale fading) Fast fading (small-scale, flat fading) Delay spread (small-scale fading) Performance affected received signal strength bit/packet error rate at deep fade ISI Mitigation techniques use fade margin increase power or reduce distance diversity equalization; spreadspectrum; OFDM; directional antenna 18
Outline Recap Wireless background Frequency domain Modulation and demodulation Wireless channels Wireless design design for flat fading how bad is flat fading diversity to handle flat fading 19
Offline Slides (Begin) 20
Background For standard Gaussian white noise N(0, 1), Prob. density function: f ( w) = 1 2 p Q(x) = Pr{w > x} = e 1 2π - w 2 2 x e u2 /2 dw 1 2p (1-1 x ) e - x 2 / 2 Q( x) e -x 2 / 2 21
Background Q(x) = Pr{w > x} = 1 2π x e u2 /2 dw f (w') = (w' E ) 1 2 2πσ e 2σ 2 Pr{w' > x} = 1 2πσ x e (w' E ) 2 2σ 2 dw' define w = w' E σ 1 Pr{w' > x} = 2πσ = 1 2π x E σ (w' E ) 2 e 2σ 2 dw' = x 2 e w 2 dw 1 2πσ $ = Q x E ' & ) % σ ( x E σ 2 e w 2 dw' 22
Baseline: Additive Gaussian Noise N(0, N 0 /2) = T 0 T 0 y(t ) = x(t)g(t)dt = T 0 T 0 = g 2 (t)dt + w(t)g(t) dt = E + w [g(t) + w(t)]g(t)dt 23
Baseline: Additive Gaussian Noise y(t ) = g2 (t)dt + w(t)g(t) dt T 0 T 0 " E[w] = E$ # T 0 " σ 2 w = E[w 2 ] = E$ # % w(t)g(t) dt' = & T 0 T E[w(t)]g(t) dt = 0 0 T T % w(a)g(a) da w(b)g(b) db' & 0 T 0 = E[w(a)w(b)]g(a)g(b)da db = N 0 2 T 0 0 g 2 ( t)dt = N E 0 2 24
Baseline: y(t ) = g 2 (t)dt + w(t)g(t) dt Additive Gaussian Noise 0 0 Conditional probability density of y(t), given sender sends 1: 1 (y E)2 exp{ } 2 2πσ w 2σ σ 2 w = N 0E w 2 Conditional probability density of y(t), given sender sends 0: T 1 2πσ w exp{ (y + E)2 2σ w 2 } T 25
Baseline: Additive Gaussian Noise σ w 2 = N 0E 2 Demodulation error probability: P{e 0}P{sends 0}+ P{e 1}P{sends 1} = P{y > 0 0}P{sends 0}+ P{y < 0 1}P{sends 1}! = Q# 2E $ assume equal 0 or 1 " N & 0 % 26
1 2p (1 - Baseline: Error Probability 1 x ) e - x 2 / 2 Q( x) e -x 2 / 2 P e = Q( 2E N 0 ) = Q( 2SNR) e SNR Error probability decays exponentially with signal-noise-ratio (SNR). See A.2.1: http://www.eecs.berkeley.edu/~dtse/chapters_pdf/fundamentals_wireless_communication_appendixa.pdf 27
Flat Fading Channel Assume h is Gaussian random: BPSK: For fixed h, Averaged out over h, at high SNR. 28
Offline Slides (End) 29
Outline Recap Wireless background Frequency domain Modulation and demodulation Wireless channels Wireless PHY design design for flat fading 30
Flat Fading Effects flat fading channel static channel 31
Main Storyline Today Communication over a flat fading channel has poor performance due to significant probability that channel is in a deep fade Reliability is increased by providing more resolvable signal paths that fade independently Name of the game is how to find and efficiently exploit the paths 32
Where to Find Diversity? Time: when signal is bad at time t, it may not be bad at t+dt Space: when one position is in deep fade, another position may be not Frequency: when one frequency is in deep fade (or has large interference), another frequency may be in good shape d p - 1 d2 d1 - d 2 f + p = 2p 2 + p c l 33
Outline Recap Wireless background Frequency domain Modulation and demodulation Wireless channels Wireless PHY design design for flat fading how bad is flat fading? diversity to handle flat fading» time 34
Time Diversity Time diversity can be obtained by interleaving and coding over symbols across different coherent time periods coherence time interleave 35
Example: GSM Time Structure 935-960 MHz 124 channels (200 khz) downlink 890-915 MHz 124 channels (200 khz) uplink time GSM TDMA frame 1 2 3 4 5 6 7 8 4.615 ms GSM time-slot (normal burst) guard space tail user data S Training S user data tail 3 bits 57 bits 1 26 bits 1 57 bits 3 S: indicates data or control guard space 546.5 µs 577 µs 36
Example: GSM Bit Assignments Amount of time diversity limited by delay constraint and how fast channel varies In GSM, delay constraint is 40 ms (voice) To get better diversity, needs faster moving vehicles! 37
Simplest Code: Repetition After interleaving over L coherence time periods, 1 P e µ SNR L 38
Performance P e µ 1 SNR L 39
Beyond Repetition Coding Repetition coding gets full diversity, but sends only one symbol every L symbol times We can use other codes, e.g. Reed-Solomon code 40
Outline Recap Wireless background Frequency domain Modulation and demodulation Wireless channels Wireless PHY design design for flat fading how bad is flat fading? diversity to handle flat fading» Time» space 41
Space Diversity: Antenna Receive Transmit Both 42
User Diversity: Cooperative Diversity Different users can form a distributed antenna array to help each other in increasing diversity Interesting characteristics: users have to exchange information and this consumes bandwidth broadcast nature of the wireless medium can be exploited we will revisit the issue later in the course 43
Outline Recap Wireless background Frequency domain Modulation and demodulation Wireless channels Wireless PHY design design for flat fading how bad is flat fading? diversity to handle flat fading» Time» Space» frequency f ' = f + 1 2 d 1 c - d 2 44
Sequential Frequency Diversity: FHSS (Frequency Hopping Spread Spectrum) Discrete changes of carrier frequency sequence of frequency changes determined via pseudo random number sequence used in 802.11, GSM, etc Co-inventor: Hedy Lamarr patent# 2,292,387 issued on August 11, 1942 intended to make radio-guided torpedoes harder for enemies to detect or jam used a piano roll to change between 88 frequencies http://en.wikipedia.org/wiki/hedy_lamarr 45
Sequential Frequency Diversity: FHSS (Frequency Hopping Spread Spectrum) Two versions slow hopping: several user bits per frequency fast hopping: several frequencies per user bit t b user data 0 1 0 1 1 t f t d f 3 f 2 f 1 slow hopping (3 bits/hop) f t d t f 3 f 2 f 1 fast hopping (3 hops/bit) t b : bit period t d : dwell time t 46
FHSS: Advantages Frequency selective fading and interference limited to short period Simple implementation what is a major issue in design? Uses only small portion of spectrum at any time explores frequency sequentially used in simple devices such Bluetooth 47
Bluetooth Design Objective Design objective: a cable replacement technology 1 Mb/s range 10+ meters single chip radio + baseband (means digital part) low power low price point (target price $5 or lower) 48
Bluetooth Architecture 49
Bluetooth Radio Link Bluetooth shares the same freq. range as 802.11 Radio link is the most expensive part of a communication chip and hence chose simpler FHSS 2.402 GHz + k MHz, k=0,, 78 1,600 hops per second A type of FSK modulation 1 Mb/s symbol rate transmit power: 1mW 50
Bluetooth Physical Layer Nodes form piconet: one master and upto 7 slaves Each radio can function as a master or a slave The slaves follow the pseudorandom jumping sequence of the master A piconet 51
Piconet Formation Master hopes at a universal frequency hopping sequence (32 frequencies) announce the master and sends Inquiry msg Joining slave: jump at a much lower speed after receiving an Inquiry message, wait for a random time, then send a request to the master The master sends a paging message to the slave to join it 52
Outline Recap Wireless background Frequency domain Modulation and demodulation Wireless channels Wireless PHY design design for flat fading how bad is flat fading? diversity to handle flat fading» Time» Space» Frequency sequential parallel 53
Direct Sequence Spread Spectrum (DSSS) Basic idea: increase signaling function alternating rate to expand frequency spectrum (explores frequency in parallel) f c : carrier freq. R b : freq. of data 10dB = 10; 20dB =100 54
Direct Sequence Spread Spectrum (DSSS) Approach: One symbol is spread to multiple chips the number of chips is called the expansion factor t b user data d(t) 1-1 X t c chipping sequence c(t) -1 1 1-1 1-1 1-1 1 1-1 1-1 1 = resulting signal -1 1 1-1 1-1 1 1-1 -1 1-1 1-1 t b : bit period t c : chip period 55
DSSS Encoding chip: -1 1 1-1 1-1 Data: [1-1 ] -1 1 1-1 1-1 1-1 -1 1-1 1 56
DSSS in Real Life 802.11: 11 Mcps; 1 Msps how may chips per symbol? WCDMA: 3.84 Mcps; suppose 7,500 sps how many chips per symbol? 57
Effects of Spreading sender dp/df dp/df f f un-spread signal spread signal B s B b B b B s B s : num. of bits in the chip * B b 58
DSSS Encoding/Decoding: An Operating View user data X spread spectrum signal modulator transmit signal chipping sequence radio carrier transmitter correlator received signal demodulator X products low pass sampled sums decision data radio carrier chipping sequence receiver 59
DSSS Decoding chip: -1 1 1-1 1-1 Data: [1-1] Trans chips decoded chips Chip seq: -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 inner product: 6 decision: 1-6 -1 60
DSSS Decoding with noise chip: -1 1 1-1 1-1 Data: [1-1] Trans chips decoded chips Chip seq: -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 inner product: 4 decision: 1-2 -1 61
Assume no DSSS Consider narrowband interference Consider BPSK with carrier frequency fc A worst-case scenario data to be sent x(t) = 1 channel fades completely at fc (or a jam signal at fc) then no data can be recovered 62
Why Does DSSS Work: A Decoding Perspective Assume BPSK modulation using carrier frequency f : A: amplitude of signal f : carrier frequency x(t): data [+1, -1] c(t): chipping [+1, -1] y(t) = A x(t)c(t) cos(2p ft) 63
Add Noise/Jamming/Channel Loss Assume noise at carrier frequency f: w(t) = a(t)cos(2π ft) Received signal: y(t) + w(t) = Ax(t)c(t)cos(2π ft)+ acos(2π ft) 64
DSSS Decoding (BPSK): Matched Filter compute correlation for each bit time take N samples of a bit time sum = 0; for i =0; { sum += y[i] * c[i] * s[i] } if sum >= 0 return 1; else return -1; bit time y: received signal c: chipping seq. s: modulating sinoid t b 0 y(t)c(t)cos( 2π ft)dt 65
DSSS/BPSK Decoding T sym 0 [Ax(t)c(t)cos(2π ft) + a cos(2π ft)]c(t)cos( 2π ft)dt T sym 0 = Ax(t)cos(2π ft)cos( 2π ft)dt T sym 0 + ac(t)cos(2π ft)cos( 2π ft)dt Properties of chipping sequence to help? 66
Why Does DSSS Work: A Spectrum Perspective sender i) dp/df ii) dp/df user signal broadband interference narrowband interference receiver dp/df f dp/df f dp/df iii) iv) f f f i) ii): multiply data x(t) by chipping sequence c(t) spreads the spectrum ii) iii): received signal: x(t) c(t) + w(t), where w(t) is noise iii) iv): (x(t) c(t) + w(t)) c(t) = x(t) + w(t) c(t) iv) v) : low pass filtering v) 67
Reality Check Transmitter: Receiver: Bits @2Mbps From MAC Samples @1.4Gbps From RF Scramble Bits @2Mbps Decimation DQPSK Mod Samples @352Mbps Samples @32Mbps Despreading Direct Sequence Spread Spectrum Samples @32Mbps Samples @352Mbps DQPSK Demod Symbol Wave Shaping Bits @2Mbps Samples @1.4Gbps Descramble To RF Bits @2Mbps To MAC (a) IEEE 802.11b 2Mbps 68
Backup Slides
Inquiry Hopping 70
The Bluetooth Link Establishment Protocol FS: Frequency Synchronization DAC: Device Access Code IAC: Inquiry Access Code 71
Bluetooth Links 72
Bluetooth Packet Format Header 73
Multiple-Slot Packet 74