An Experimental Study of Network Performance Impact of Increased Latency in SDR Thomas Schmid Oussama Sekkat Mani B. Srivastava - Wintech workshop was started with the Keynote from Eric Blossom on GNU Radio - And this last talk is on research using GNU Radio 1
Outline Short Introduction Delay Measurements of the USRP Receive Latency Transmit Latency Round Trip Time measurements with modulation, demodulation Implication on the MAC Layer and Possible Solutions Conclusion 2
Throughput vs. Latency SDR pushes PHY into Software Software is flexible Processing often done on general purpose computers and OS Block signal processing of samples to sustain throughput Throughput Latency Many modern MAC protocols rely on deadlines Example 802.11 s DIFS Even QoS is done with different deadlines in 802.11e SIFS PIFS DIFS DIFS Backoff Window Busy - SDR pushes some or all PHY into Software - block signal processing of samples to sustain throughput => doesn t help latency - DIFS: Distributed Inter Frame Space - SIFS: 28 us PIFS: 78 us DIFS: 128 us 3
- You might ask: Why is the latency of that hardware important NESL UCLA GNU Radio GNU Radio is Open Source and easy accessible Universal Software Radio Peripheral (USRP) developed and sold by Ettus Research LLC (~$500 + ~$300 for RF frontends) Currently, no time stamping of incoming or outgoing samples possible, though in development We investigated the latency of GNU Radio s USRP We implemented two modulation schemes plus MAC layer framing for two commercial radios (CC1000 and CC2420) and measured the resulting latencies Open Source Software Defined Radio solution - GR was introduced this morning by Eric Blossom 4 - GR is perfect for researchers. that s why we took it to investigate the latency issue - We use these radio chips sensor network research in our lab
Delay Measurements Non-real time OS and USB bus system introduce delays Ideal case: preload the radio frontend with all samples, and trigger send when necessary still a blind spot Conventional Radio Blind Spot SDR System Air Packet TX Packet Air RF Frontend Packet TX Packet TX Packet Radio Chip TX Packet Channel Sensing Negligible Latency Bus System CPU Negligible Latency Bus Latency Channel Sensing - explain the two figures 5
Delay Measurements (2) Precomputation is not always possible, e.g., RTS/CTS exchange in 802.11 Conventional Radio Blind Spot SDR System Air Radio Chip Packet Packet Packet2 Packet2 Short IFS Negligible Latency Packet Air Packet RF Frontend Packet Bus System Packet CPU Bus & Demod Latency IFS Packet2 Packet2 Packet2 Packet2 RTS: source, destination, duration (NAV: Network Allocation Vector) for following transmission CTS: contains same duration 6
Delay Measurements (3) Delay depends on buffering between ADC and processing blocks GNU Radio is temporally decoupled from the USRP and processes samples as fast as possible. Buffers are either full, or empty. Because of buffers, the sampling rate influences the latency (how long it takes for a sample to travel through a buffer if it is full) 7
USRP Receive Latency Receive latency: = USRP Hardware + USB + GNU Radio USB = f(512, fusb nblocks fusb block size) sample size f s sample size = 4 byte 8
USRP Receive Latency (2) 0.1 0.01 USRP RX Latency Theoretic max USB latency Theoretic min USB latency Median measured latency Minimum measured latency Maximum measured latency Latency [s] 0.001 1e-04 1e-05 100000 1e+06 1e+07 Sample Rate [Hz] - fusb_nblock=8, fusb_block_size=2048 - square wave fed into USRP and Oscope. GR toggles parallel pin -> Oscope - 1ms for 8MS/s, 30ms for 250kS/s 9
USRP Transmit Latency 0.0008 0.0007 USRP TX Latency Median measured latency Minimum measured latency Maximum measured latency 0.0006 Latency [s] 0.0005 0.0004 0.0003 0.0002 0.0001 100000 1e+06 1e+07 Sample Rate [Hz] - 32k buffer between GR and USRP - explain bursts and thus prevent 32k buffer traversal which you need to do in continuous transmit mode - in continuous: avg 32.9ms at 320 ks/s - burst: max: 240us @ 8MS/s, 730us @ 250kS/s - no preprocessing, modulation, etc! 10
802.15.4 and FSK for CC1000 Implemented the physical layer and MAC framing for 802.15.4 and an FSK scheme for the CC1000 radio chip Both standards are widely used in sensor network research Fairly easy modulation / demodulation implementation 11
802.15.4 and FSK for CC1000 (2) 0.018 RTT in IEEE 802.15.4 SDR implementation 0.35 RTT in Conventional IEEE 802.15.4 % of measurements 0.016 0.014 0.012 0.01 0.008 0.006 0.004 0.002 % of measurements 0.3 0.25 0.2 0.15 0.1 0.05 0 0 0.05 0.1 0.15 0.2 Delay [s] 0 0 0.05 0.1 0.15 0.2 Delay [s] 0.009 RTT in FSK SDR implementation 0.06 RTT in Conventional FSK % of measurements 0.008 0.007 0.006 0.005 0.004 0.003 0.002 % of measurements 0.05 0.04 0.03 0.02 0.01 0.001 0 0.05 0.1 0.15 0.2 Delay [s] 0 0 0.05 0.1 0.15 0.2 Delay [s] - from rx/tx latency measurements, would need about 3ms - our implementation takes 26.5ms on average - even though latency of USRP is not enough to handle 802.11 DIFS, it is still much faster then the processing itself 12
Possible Solutions An increase in latency means less throughput in packed based protocols Increasing deadlines is not enough Solutions are Hardware / Software architecture changes Smart protocols changes 13
Hardware / Software Changes Optimizing via precomputation Store precomputed messages in the radio frontend Extension: store partial precomputed messages RSSI gating and m-block Annotate samples with meta information Let the radio frontend trigger the packet sending when RSSI measurements have certain characteristics SIFS PIFS DIFS Air DIFS Busy Send Frontend Preload 14
Hardware / Software Changes (2) Different bus system PCI / PCI Express (National Instruments PCI-5640R) Gigabit Ethernet (USRP2) Offload often used code into hardware Do filtering, modulation, and demodulation on FPGA s National Instruments LabView s FPGA tools for PCI-5640R 15
Protocol Changes Use TDMA TDMA solves most of the latency problems since predictive Introduces new problems, like synchronization Universal Header Coding Universal encoding across protocols for ACKs and headers Implementation in hardware would guarantee latencies 802.11 uses something similar. Only after the header, modulations switches to appropriate speed. 16
Protocol Changes (2) Delayed ACKs Allow ACKs to be sent later than one DIFS, even after other intermittent messages Air Message 1 Message 2 ACK 1 ACK 2 Node A Conventional Radio send msg 1 recv msg 2 send Node B SDR System recv msg 1 prep ack send Node C SDR System send msg 2 17
Conclusion Minimum Receive Latency: 600 μs Minimum Transmit Latency: 200 μs Both too long for IFS requirements of modern MAC protocols 802.15.4 SRD implementation: 25 ms avg RTT, 50 ms max GNU Radio is good and easy to use. Fortunately for us researchers, it doesn t do everything yet, and there is still something to do for us. Source Code: http://acert.ir.bbn.com/projects/gr-ucla/ Thank you very much for listening 18