High efficiency MAC protocols for IoT: iqueue-mac and implementation on RIOT OS Ye-Qiong SONG LORIA INRIA Université de Lorraine as part of ADT RIOT RIOT Siminar, Inria Paris, April 13 th 2017 1
Outline Duty-cycled MAC protocols iqueue-mac: a traffic adaptive hybrid CSMA/TDMA RIOT eases the way to implement high efficient MAC Implementation of extended iqueue-mac over RIOT OS Conclusion 2
Media Access Control protocol 1. Provide reliable and low latency transmission 2. Should be energy efficient for IoT systems 3. Require low complexity for implementation 3
Duty- cycled MAC protocols: problems Duty- cycling, a common way for saving energy (WSN, BLE, LoRa, WiFi low- power mode, and other IoT protocols, ) Low duty- cycle è long sleep period è low throughput In IoT, we observe two operaoonal periods: Light traffic period: no or only periodic data tx, so only short periodic wakeup listening (LPL) or wakeup signaling (LPP) è save energy Burst traffic period: event- triggered burst traffic è need high throughput (low delay) for Omely reporong events So we need traffic self- adapove MAC protocol for varying duty- cycles IEEE802.15.4 only supports fixed duty- cycle X- MAC, ConOkiMAC, RI- MAC provide traffic adapove duty- cycling, but soll suffer from low throughput and high delay [Fig. from F. Osterlind et al., Strawman, IPSN2012] Received data (kbit/s) 10 1 Receiver-initiated (RI-MAC) Sender-initiated (X-MAC) 1 10 100 Transmitted data (kbit/s) Throughput 100% 100% 4 load
iqueue- MAC: a traffic- adap:ve Hybrid CMSA/TDMA TDMA or Ome- slot based MAC protocols (e.g. 802.15.4e TSCH) are efficient for providing high throughput, but introduce overheads (synchronizaoon) and rigidity for Ome slot assignment (hardly scalable and not support bursts, except addioonal efforts, e.g. Orchestra) CSMA is interesong at low traffic load where collision probability is low iqueue- MAC is a hybrid CSMA/TDMA: Using CSMA during low traffic period Switching to TDMA during high traffic period Key design: when and how to switch between the two modes? Online monitoring sender s tx queue length (and pyggybacking to receiver/router) Dynamic Ome slot allocaoon according to the tx queue length 5
iqueue-mac design [SECON 2013, IEEE TMC 2016] CSMA + TDMA + Sender s queue length Piggybacking + multi-channel Queue indicator MAC HEAD Packet load Beacon Contention"Period Other"MAC Prolonged"CP" B """""Inactive"Period CP Superframe"cycle Traffic"increase (2) (1) B Inactive"Period CP B vtdma CP variable" TDMA"period iqueue@mac Slots"allocated"to"specific"senders Receiver collects queue-length information of their associated sender nodes during CP (CSMA) and dynamically allocates time slots to them (during vtdma). Allow to avoiding the inherent low throughput problem of CSMA 6
iqueue- MAC example Beacon structure: Header Slots# Nodes# ID/list Slot/Allocation/list Figure 4: Beacon structure Example: N1 has 4 and N2 has 5 packets Beacon Sub<Frame/Period Contention/Period/(CP) Beacon/containing/a/TDMA/slots/ scheduling/list R B D A D A TP B D D D D D D D N/1 B D A B D D D N/2 B Data/packet D A ACK B D D D D 7
Averag 4 iqueue- MAC highly self- adapts 2 to traffic bursts Two burst periods of 50 s: at 100 s and 500 s 0 0 100 200 300 400 500 600 700 800 900 iqueue-mac Time - s RI-MAC-MC CoSenS Figure 11: Average delay comparison of second experiment Average delay - ms 12 x 104 10 8 6 4 iqueue-mac RI-MAC-MC CoSenS Average queue length 180 160 140 120 100 80 60 40 Online throughput iqueue-mac RI-MAC-MC CoSenS Time - s 2 20 0 0 100 200 300 400 500 600 700 800 900 Time - s igure 11: A verage delay comparison of second experime 0 0 100 70200 300 400 500 600 700 800 900 Figure 12: Average 60 queue length comparison of second e-mac Time - s iqueue-mac experiment 8
= Real-time kernel for Internet Of Things GNRC communication Stack (lacking low duty-cycled MAC) From: hgps://riot- os.org/ iqueue-mac X-MAC ContikiMAC 9
RIOT paves the way to implemen:ng high efficient MAC protocols Tickless MulOthread Pre- empove high resoluoon scheduler (32 µs vs. 8ms (128Hz) of ConOkiOS over MSP430) Hardware Omers (vs. only one romer of ConOkiOS) InterrupOons GNRC (Generic) IoT networking stack and APIs Packet formaing Generic MAC module (TX and RX queues, neighbor management, ) Priority queue for supporong QoS Needed for high efficient MAC implementa6on 10
l Implementation of extended iqueue-mac on RIOT OS Extended iqueue-mac s main features: l Low duty-cycle listening scheme; l Phase-lock scheme; l Packet management based on priority queue; l Dynamic slots allocation (vtdma) scheme for providing high throughput; l Multi-channel operation for tackling external interference;. l High generality for supporting upper layer protocols (e.g., RPL and UDP). 11
l iqueue-mac vs. X-MAC: impact of wireless interference Tree test scenario A jamming signal is introduced onto the default communication channel-26 of X-MAC and iqueue-mac on 2.4 GHz. iqueue-mac is robust against wireless interference. 12
l Evaluation of iqueue-mac: high generality for upper layers iqueue-mac: Supports RPL routing + UDP transmissions The network topology automatically built by RPL. (The 11 node devices were deployed over one layer of our office building) RPL / iqueue-mac All senders use UDP to send data packets to the sink. Results: nearly 100% packet reception ratio (PRR) and <1% radio duty-cycle (1s cycle) for node devices. 13
l Modularization of iqueue-mac and X-MAC Ø Break down and modularize the codes of X-MAC and iqueue- MAC; Ø We provide a more general MAC (gnrc_mac) module for developers to create new MAC protocols on RIOT. 14
l Conclusion Final goal of ADT RIOT: Pushing out an universal, efficient and off-the-shelf MAC protocol (iqueue-mac) for IoT applications Current state and future: a) GNRC_MAC module included into RIOT b) X-MAC fully implemented, waiting for being merged to master branch c) Beta version of iqueue-mac finished, achieving 100% PRR in most tests d) Future work relying on RIOT open platform: Compare RPL/iQueue-MAC with Orchestra (RPL/TSCH) Implement Contiki-MAC Deploy in real (IoT for safe smart home applications, Smart grid, ) 15
l IoT for Ambient Assisted Living environment 16