1 / 51

15-441 Computer Networking

15-441 Computer Networking. Lecture 3 – Physical Layer. Analog Signal. “Digital” Signal. 0 0 1 0 1 1 1 0 0 0 1. Bit Stream. Packet Transmission. 0100010101011100101010101011101110000001111010101110101010101101011010111001. Packets. Sender. Receiver. Header/Body.

Download Presentation

15-441 Computer Networking

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Analog Signal “Digital” Signal 0 0 1 0 1 1 1 0 0 0 1 Bit Stream Packet Transmission 0100010101011100101010101011101110000001111010101110101010101101011010111001 Packets Sender Receiver Header/Body Header/Body Header/Body From Signals to Packets Lecture 3: Physical Layer

  3. Outline • RF introduction • Modulation • Antennas and signal propagation • Equalization, diversity, channel coding • Multiple access techniques • Wireless systems and standards 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 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 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 A3 A4 B1 B2 B3 B4 C1 C2 C3 C4 A1 B1 C1 D1 A2 B2 C2 D2 A3 B3 C3 D3 Lecture 3: Physical Layer

  7. 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 Lecture 3: Physical Layer

  8. 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… Lecture 3: Physical Layer

  9. 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 Frequency Time Lecture 3: Physical Layer

  10. 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. Lecture 3: Physical Layer

  11. 0 0 1 1 1 0 1 1 0 0 0 0 1 1 0 0 1 0 1 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1 1 0 1 0 1 0 1 0 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. Original Signal Spreading Code XOR Transmitted Chips Modulated Signal Lecture 3: Physical Layer

  12. 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 Lecture 3: Physical Layer

  13. Spectrogram: Original FSK Signal Frequency Time Lecture 3: Physical Layer

  14. Spectrogram: DSSS-encoded Signal Frequency Time Lecture 3: Physical Layer

  15. 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 Lecture 3: Physical Layer

  16. 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 Lecture 3: Physical Layer

  17. 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! Lecture 3: Physical Layer

  18. 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 Lecture 3: Physical Layer

  19. MAC Layer • Coordinate access to a shared medium • Requirements • Efficiency • Reliability • Fairness • Support priority • Support group communication Lecture 3: Physical Layer

  20. 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) Lecture 3: Physical Layer

  21. 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. Lecture 3: Physical Layer

  22. Frequency Division Multiplexing Frequency Different users use Different carrier frequencies Lecture 3: Physical Layer

  23. 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 Lecture 3: Physical Layer

  24. Time Division Multiplexing • Different users use the wire at different points in time. • Aggregate bandwidth also requires more spectrum. Frequency Frequency Lecture 3: Physical Layer

  25. 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. Frequency Frequency Bands Slot Frame Time Lecture 3: Physical Layer

  26. 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 Lecture 3: Physical Layer

  27. 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 Lecture 3: Physical Layer

  28. 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 Lecture 3: Physical Layer

  29. 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 Lecture 3: Physical Layer

  30. 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 Lecture 3: Physical Layer

  31. 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 Lecture 3: Physical Layer

  32. 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 Lecture 3: Physical Layer

  33. 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 Lecture 3: Physical Layer

  34. “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 Lecture 3: Physical Layer

  35. 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 Lecture 3: Physical Layer

  36. 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 Lecture 3: Physical Layer

  37. 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 Lecture 3: Physical Layer

  38. A B C 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 Lecture 3: Physical Layer

  39. 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 DIFS contentwindow Frame transmission Busy SIFS Time Lecture 3: Physical Layer

  40. SIFS/DIFS SIFS makes RTS/CTS/Data/ACK atomic RTS Data Sender1 Time CTS ACK SIFS SIFS SIFS DIFS Time Receiver1 RTS DIFS Sender2 Time Lecture 3: Physical Layer

  41. 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 Lecture 3: Physical Layer

  42. IEEE 802.11 RTS = Request-to-Send RTS A B C D E F assuming a circular range Lecture 3: Physical Layer

  43. IEEE 802.11 RTS = Request-to-Send RTS A B C D E F NAV = 10 NAV = remaining duration to keep quiet Lecture 3: Physical Layer

  44. IEEE 802.11 CTS = Clear-to-Send CTS A B C D E F Lecture 3: Physical Layer

  45. IEEE 802.11 CTS = Clear-to-Send CTS A B C D E F NAV = 8 Lecture 3: Physical Layer

  46. IEEE 802.11 • DATA packet follows CTS. Successful data reception acknowledged using ACK. DATA A B C D E F Lecture 3: Physical Layer

  47. IEEE 802.11 ACK A B C D E F Lecture 3: Physical Layer

  48. IEEE 802.11 Reserved area ACK A B C D E F Lecture 3: Physical Layer

  49. Interference “range” Carrier sense range A F Transmit “range” IEEE 802.11 DATA A B C D E F Lecture 3: Physical Layer

  50. Outline • RF introduction • Modulation • Antennas and signal propagation • Equalization, diversity, channel coding • Multiple access techniques • Wireless systems and standards • 802.11 Lecture 3: Physical Layer

More Related