Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack...

72
1 Wireless Sensor Networks http://duda.imag.fr Prof. Andrzej Duda [email protected]

Transcript of Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack...

Page 1: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

1

Wireless Sensor Networks

http://duda.imag.fr

Prof. Andrzej Duda [email protected]

Page 2: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

2

Contents

§  Wireless Sensor Networks and Internet of Things §  Main issue - saving energy §  MAC access methods

§  Preamble Sampling §  IEEE 802.15.4

§  TCP/IP protocol stack for Internet of Things

Page 3: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

3

Wireless Sensor Networks

Page 4: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

A World of Sensors

Enable New Knowledge

Improve Productivity

Healthcare

Improve Food and H2O

Energy Saving Smart Grid

Enhanced Safety & Security

Smart Home

High-Confidence Transport and Asset Tracking

Intelligent Buildings

Predictive Maintenance

§  Mostly wired actuators/sensors §  Proprietary architectures for specific applications

Page 5: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

What is a WSN or Low Power Lossy Network (LLN)?

§  Sensor node – a highly constrained small device §  sensor that can measure physical data (e.g., temperature,

humidity, light, vibration, CO2) §  actuator capable of performing a task (e.g., switch on,

change traffic lights, rotate a mirror) §  radio device to receive commands, send measured data or

control information §  energy supply – battery or energy harvesting §  processor – run protocols and applications §  memory (RAM, flash) – usually limited

§  Low cost, low energy

Page 6: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

6

GreenNet node – STM32 Duty Cycles to largely reduce consumption

Typical Consumption :150uAh/J (5min OFF, 100ms ON)

OFF-mode Deep SleepON-mode

25mAh

VB

OFF-mode ~ 2µA(the whole TAG)

150 Lux ==> ~20uA ~ 12k Lux ==> ~ 2mA~ 30K Lux ==> ~5mA > 50K Lux ==> >10mA Battery

MEMS

5Company Confidential

5

> 50K Lux ==> >10mA

Solar PanelsBattery Charger

and protection

Can remain ~ 1 week in the dark TAG STM32L+BeeIP

STM32L

BeeIP v1

Battery protection

Lux

Volts

15

3.6 V

1000

3 V

Page 7: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Network of sensors

§  Connect nodes to a controller §  star topology §  all nodes within the radio range

7

Controller Star

Page 8: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Network of sensors

§  Connect nodes to a controller §  mesh network §  larger coverage

8

Controller Mesh network

Page 9: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Requirements

§  Desired properties §  unrestricted placement (get rid of wires) §  reliable collection of data (over variable quality radio

channel, possible multi-hop) §  low latency (for some applications) §  long lifetime (no battery change)

§  Traffic types §  small data sent to the sink (measurements) §  some data sent to nodes (control, update) §  possibly large number of nodes

Page 10: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Radio technologies

§  Licensed bands, cellular networks §  GSM, GPRS, EDGE §  UMTS, LTE, LTE-A M2M (Machine-to-Machine,

future)

§  Long range, low rate, cellular, proprietary §  SigFox (169, 868 MHz, 1kb/s, 30km)

§  Public bands, standards §  Low Power 802.11 (2.4 GHz, ~20 Mb/s) §  802.11ah (future, 868 MHz, > 100kb/s, < 1km) §  Bluetooth 4.0, BLE (2.4 GHz, 1Mb/s) §  IEEE 802.15.4 (868/915 MHz, 2.4 GHz, 256 kb/s)

§  Public bands, proprietary §  Wavenis, EnOcean, Z-Wave, ANTS

Security, coverage, but live days

Mainly upload

Mesh

Star

Page 11: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Challenges §  Saving energy

§  nodes will mostly sleep, but need to communicate §  energy harvesting

§  Standardization §  interoperable devices §  connected to the Internet – Internet of Things

§  Reliable communication in a mesh network §  plug-in operation §  discover, join, operate §  adapt to changes (nodes with no energy, failed)

§  Programming support §  popular platforms: TinyOS, Contiki §  no isolation between applications and system §  tricky development

§  Security §  key management

Page 12: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

12

Saving Energy

Page 13: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

13

Energy Efficiency

§  Energy consumption §  usual operations (sensing, transmitting, forwarding

results, routing maintenance)

§  Energy waste §  idle listening (wait for a reception)

§  bursty traffic in sensor-net apps §  idle listening consumes 50—100% of the power for receiving

§  collisions and retransmissions §  overhearing unnecessary traffic (not sent to me) §  protocol overhead (e.g. headers, beacons, RTS/CTS)

Page 14: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

“Idle Listening” Problem

§  The power consumption is roughly the same whether the radio is transmitting, receiving, or simply ON, “listening” for potential reception

§  Radio must be ON (listening) in order receive anything §  transmission is infrequent §  listening (potentially) happens all the time

§  Total energy consumption dominated by idle listening

14

Page 15: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

PHY Layer

n Energy consumption n  most energy spent for radio transmission and

reception, but the proportions change

15

Page 16: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Current consumption

§  Coronis §  10µA average

operating current §  17mA RX §  45mA TX (25mW

output power) §  2µA STANDBY

16

29

TABLE II

MEASURED CURRENT CONSUMPTION OF CC2500

Radio (sleep) 900 nA

Radio (idle) 1.5 mA

Radio (transmit) 22 mA

Radio (receive) 14 mA

Microcontroller (active) 8 mA

Microcontroller (idle) 2 mA

Fig. 14. Details of a data frame reception. Measurements are performed only on the radio.

Fig. 13 presents the current consumption during frame forwarding: the node receives a frame

to be flooded and forwards it to its neighbors. Initially, the node periodically samples the channel.

When the node wakes up to sample the channel at time 0.55s, it receives a microframe from

which it learns about the arrival time of the data frame. As the node uses MFP, it switches its

radio off until instant 0.74s to save energy. It then wakes up at 0.74 to receive the data frame.

Because of potential clock drift, the node actually wakes up slightly ahead of the time for the

data frame. During this wakeup, the node receives a second microframe and then the data frame.

Fig. 14 shows some details: the reception of two microframes and the data frame. Note that time

March 28, 2008 DRAFT

Page 17: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Current consumption

17

IEEE IOT JOURNAL 13

TABLE VICOMPARISON WITH COMMERCIALLY AVAILABLE MOTES

Mote #bits RAM[kB]

CPUON[mA/MHz]

CPUsleep[µA]

TX0dBm[mA]

RX[mA]

Har-vested

Batt.size/type[mAh]

GreenNet 32 32 0.185 0.44 4.9 4.5 Y 25Hikob [54] 32 16 0.180 0.6 13.8 11.8 Y 2000SmartMeshIP [52] 32 72 0.176 0.8 5.4 4.5 OPT 2AAM3OpenNode [55] 32 64 1.138 25 11.6 10.3 N 650OpenMote [56] 32 32 0.438 0.4 24 20 N 2AAAWisMote [57] 16 16 0.312 1.69 25.8 18.5 N 2AAATelosB [58] 16 10 1.8 5.1 19.5 21.8 N 2AAWaspmote15.4 [59] 8 8 1.07 7.5 45 50 OPT N/AMICAz [60] 8 4 1.0 <15 17.4 19.7 N 2AA

ability among connected products and software applicationsto create dynamic proximal networks [63]. Open InterconnectConsortium defines an open specification for interoperabilityacross connected devices [64]. It considers that secure andreliable device discovery and connectivity are a foundationalcapability to enable IoT.

With respect to the issue of adaptation to harvested energy,several authors proposed duty cycle adaptation protocols basedon the prediction of light variability and the battery level.Kansal et al. [22] proposed an energy prediction model basedon an Exponentially Weighted Moving-Average filter. Theyassumed that the energy available at a given time of a dayis similar to that available during the previous days, which isonly partially true for outdoor conditions. GreenNet aims ata different environment, namely indoor under artificial lightswith variations that depend on the outdoor light conditions andalso on how artificial lights are switched on indoor. Vigoritoet al. [65] proposed a model-free approach to adapt the dutycycle. Their solution uses an objective function based on thebattery level. We have not adopted this approach, becausethe exact value of the battery level is really hard to obtainon the GreenNet platform and also on many other platforms.Nevertheless, the battery level, even if it is an approximativevalue, can serve as complementary information [66].

X. CONCLUSIONS AND FUTURE WORK

We have presented GREENNET, an energy efficient andfully operational protocol stack for IP-enabled Wireless SensorNetworks based on the IEEE 802.15.4 beacon-enabled mode.The stack runs on a hardware platform with photovoltaic cellenergy harvesting developed by STMicroelectronics that canoperate autonomously for long periods of time. GREENNETintegrates several standard mechanisms and enhancement toexisting protocols, which results in an operational platformwith the performance beyond the current state of the art.In particular, it includes the IEEE 802.15.4 beacon-enabledMAC integrated with lightweight IP routing for achieving verylow duty cycles. It offers an advanced discovery scheme thataccelerates the process of joining the network and proposesan adaptation scheme for adjusting the duty cycle of harvestednodes to the available energy for increased performance.Finally, it supports security at two levels: a basic standard

secure operation at the link layer and advanced scalable datapayload security.

With a growing number of IEEE 802.15.4 devices, we plan toaddress in the future the issue of taking advantage of multiplechannels to increase network capacity. This approach will alsoimprove robustness with respect to other types of networkssuch as Wi-Fi and Bluetooth that may coexist in the sameISM band. Possible other future work will include the supportfor multiple sinks and node mobility.

REFERENCES

[1] A. Dunkels, T. Voigt, and J. Alonso, “Making TCP/IP Viable forWireless Sensor Networks,” in Proceedings of EWSN, Berlin, Germany,Jan. 2004.

[2] A. Dunkels, “Full TCP/IP for 8-Bit Architectures,” in Proceedings ofACM MobiSys, San Francisco, CA, USA, May 2003.

[3] N. Tsiftes, J. Eriksson, and A. Dunkels, “Low-Power Wireless IPv6Routing with ContikiRPL,” in Proceedings of ACM/IEEE IPSN, Stock-holm, Sweden, Apr. 2010.

[4] M. Kovatsch, M. Lanter, and Z. Shelby, “Californium: Scalable CloudServices for the Internet of Things with CoAP,” in Proceedings of IoT2014, Cambridge, MA, USA, Oct. 2014.

[5] Z. Shelby, K. Hartke, and C. Bormann, “Constrained ApplicationProtocol (CoAP),” IETF RFC 7252, 2014.

[6] IEEE 802.15.4-2006 standard, http://www.ieee802.org/15/pub/TG4.html.

[7] A. Dunkels, “The ContikiMAC Radio Duty Cycling Protocol,” SwedishInstitute of Computer Science (SICS), Tech. Rep., 2011.

[8] M. Buettner et al., “X-MAC: A Short Preamble MAC Protocol ForDuty-Cycled Wireless Networks,” In Proceedings of ACM SenSys,Boulder, CO, November 2006.

[9] C-A. La, M. Heusse, and A. Duda, “Link Reversal and Reactive Routingin Low Power and Lossy Networks,” in Proceedings of PIMRC’13.London, UK: IEEE, Jun. 2013.

[10] T. Winter, P. Thubert, A. Brandt, J. Hui, R. Kelsey, P. Levis, K. Pister,R. Struik, J-P. Vasseur, and R. Alexander, “RPL: IPv6 RoutingProtocol for Low-Power and Lossy Networks,” RFC 6550 (ProposedStandard), Internet Engineering Task Force, Mar. 2012. [Online].Available: http://www.ietf.org/rfc/rfc6550.txt

[11] U. Herberg and T. Clausen, “A Comparative Performance Study ofthe Routing Protocols LOAD and RPL with Bi-directional Traffic inLow-Power and Lossy Networks (LLN),” in Proceedings of ACM PE-WASUN, 2011.

[12] G. Romaniello, E. Potetsianakis, O. Alphand, R. Guizzetti, and A. Duda,“Fast and Energy-Efficient Topology Construction in Multi-Hop Multi-Channel 802.15.4 Networks,” in Proc. of IEEE WIMOB. Lyon, France:IEEE, Oct. 2013.

[13] M. Vucinic, B. Tourancheau, F. Rousseau, A. Duda, L. Damon, andR. Guizzetti, “OSCAR: Object Security Architecture for the Internet ofThings,” in Proc. of IEEE WoWMoM, Sydney, Australia, 2014.

[14] Zigbee-Alliance, "ZigBee Specification", http://www.zigbee.org.[15] F. Todeschini, C. Planat, P. Milazzo, S. Tricomi, P. Urard, and P. Ben-

abes, “A Nano Quiescent Current Power Management for AutonomousWireless Sensor Network,” Proc. of IEEE ICECS, 2013.

[16] A. Dunkels, B. Gronvall, and T. Voigt, “Contiki - a Lightweight andFlexible Operating System for Tiny Networked Sensors,” in Proc. ofIEEE LCN, nov. 2004.

[17] A. Cunha, A. Koubaa, R. Severino, and M. Alves, “Open-ZB: an Open-Source Implementation of the IEEE 802.15.4/ZigBee Protocol Stack onTinyOS,” Proc. of IEEE MASS, pp. 1–12, 2007.

[18] P. Levis, A. Tavakolli, and S. Dawson-Haggerty, “Overview of ExistingRouting Protocols for Low Power and Lossy Networks,” IETF, InternetDraft, 2009.

Page 18: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Energy Efficient Techniques §  Reduce idle listening

§  sleep most of the time

§  But avoid deafness §  detect/know about transmissions of other nodes

§  Two main approaches §  send a long preamble §  synchronize on a common schedule (wake up schedules or

TDMA slots)

18

Page 19: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

19

MAC access methods

Page 20: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Communicating Sleeping Devices

§  Preamble Sampling (e.g. ContikiMAC)

20

§  Scheduled Listening (e.g. 802.15.4)

sender

receiver

preamble frame

sample

sender

receiver

clock drift frame

listen interval

time

time

receive

Page 21: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

21

§  Preamble Sampling §  LPL (1984, 1999), B-MAC (2004), Wise-MAC (2004),

CSMA-MPS (2004), MFP (2006), X-MAC (2006) §  Scheduled Listening

§  S-MAC (2002), T-MAC (2004) §  Hybrid methods

§  SCP-MAC (2006), ContikiMAC §  TDMA-based

§  802.15.4

Introduction

MAC proposals

Page 22: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Receive data

Carrier sense

Receiver

Long Preamble Data Tx Sender

Check Interval

LPL - Low Power Listening

§  Long preamble sampling §  wake up every Check-Interval §  sample channel using CCA (Clear Channel Assess.) §  if no activity, go back to sleep for Check-Interval §  Else start receiving packet

§  If long Check-Intervals §  message delays and collision rate may increase

22

Page 23: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

LPL - Low Power Listening §  Shifts cost of coping with Idle Listening from receiver

to transmitter §  Highly beneficial for infrequent transmissions §  Unsuitable for higher load due to collisions and

retransmissions

23

Page 24: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

LPL - Low Power Listening §  Optimal Check-Interval

24

2 Channel Access Protocols

Check Interval

Life

tim

e

High Traffic Load

Medium Traffic Load

Low Traffic Load

Figure 2.5: Lifetime of nodes according to different check intervals and traffic loads.

The outlier detection technique depends upon the accuracy of the noise floor estima-tion. BMAC uses software automatic gain control for estimating the noise floor toadapt to ambient noise changes. Each node takes signal strength samples at timeswhen the channel is supposed to be clear, such as immediately after transmitting aframe. From these values, each node calculates an average value and uses it as a simplelow pass filter for the noise floor estimate.

Apart from collision avoidance and good channel utilization, accurate CCA has addi-tional benefits. It makes it possible for a node, listening to the preamble while waitingto receive the data frame, to determine whether the channel is still busy. In the casethe node detects that the channel is back to idle before it receives the data, it stopslistening and goes back sleeping. By avoiding this reception, an accurate CCA furtherimproves preamble sampling performance.

Adapting Duty Cycle:

Determining the optimal check interval in preamble sampling protocols requires know-ing applications’ traffic load a priori because nodes have no means for adapting theircheck interval to traffic load changes. This constraint makes preamble sampling in-flexible for applications with highly fluctuating traffic loads. BMAC [41] proposes toalleviate such rigidity through the use of a versatile low power listening in which eachnode has an interface for dynamically configuring several MAC layer parameters, suchas the check interval. BMAC proposes eight standard listening modes correspondingto eight different check intervals. A node can dynamically switch from one listeningmode to another to meet applications’ new and changing demands.

20

Page 25: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

WiseMAC – Shorter Preambles

25

Page 26: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Preamble duration §  Know neighbor wake up times

§  piggybacked onto ACK frames

§  Problem – clock drift §  Tp must compensate for drift between the clock at the AP

and the sensor node §  Preamble duration must be 4θL if both quartz have a

frequency tolerance of ±θ and L is the interval between communications (θL is clock difference)

26

Page 27: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Drift Compensation

§  AP may be late, while node may be early, start the preamble 2θL in advance

§  Because the sensor node may be late while the AP is early the duration of preamble must be 4θL

27

Page 28: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

WiseMAC

28

Page 29: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

CSMA-MPS Minimum Preamble Sampling

§  Preamble - alternating short Transmit (wake up message) and Receive slots

§  Receiver sends an ACK during a Receive slot §  Requires sampling longer than Recv. slot

29

!"#$ !%&#$ '($ !"#$ )*+!$ +,-."/'-%0*!%'-$ %+$ *)/#*1,$ 2-'3-$

4!"#$ 1/%(!$ '($ !"#$ .)'.2$ %+$ 2-'3-$ *+$ 3#))56$ !"#$ +'7/.#$

3*%!+$ ('/$ !"#$+*&8)%-9$+."#17)#$*-1$+#-1+$*$8/#*&:)#$

;7+!$ *!$ !"#$ /%9"!$ !%&#$ 3%!"$ *$ 3*2#<78$ 8/#*&:)#$ '($

&%-%&7&$ +%0#$ 4=>/#*&:)#5$ !'$ &*2#$ +7/#$ !'$ "%!$ !"#$

1#+!%-*!%'-+$/#.#%?#/$3%-1'3@$

A!$"*+$:##-$+"'3-$%-$BCD6$!"*!$%($:'!"$E7*/!0#+$"*?#$

*-$*..7/*.,$'($F!6$=>/#*&:)#$G$&%-$4H!I6$=356$3"#/#$I$

%+$ !"#$ !%&#$ :#!3##-$ .'&&7-%.*!%'-+$ *-1$ =3$ !"#$

+*&8)%-9$8#/%'1@$A($!"#$-#!3'/2$%+$-'!$+,-."/'-%0#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!%&#$'($!"#$)*+!$+,-."/'-%0*!%'-$*/#$*)/#*1,$2-'3-$

4!"#$ 1/%(!$ '($ !"#$ .)'.2$ %+$ 2-'3-$ *+$ 3#))56$ !"#$ +'7/.#$

3*%!+$ ('/$ !"#$ +*&8)%-9$+."#17)#$*-1$+#-1+$*$+#E7#-.#$

'($3*2#<78<1*!*$&#++*9#+$;7+!$*!$!"#$/%9"!$!%&#$3%!"$*$

3*2#<78$+#E7#-.#$'($&%-%&7&$+%0#@$A!$"*+$!'$:#$+!*!#1$

!"*!$-'$-#!3'/2$3%1#$+,-."/'-%0*!%'-$'/$8#/%'1%.$)'.*)$

+,-."/'-%+*!%'-$ &#++*9#+$ */#$ /#E7%/#1@$ ^-),$ 3"#-$

&#++*9#+$ */#$ #W."*-9#1$ 3*2#<78$ +."#17)#+$ */#$

%-.)71#1$ %-$ !"#$ 1*!*$ (/*&#$ *+$ 3#))$ *+$ %-$ !"#$

*.2-'3)#19#&#-!$(/*&#@$$

L+$ +"'3-$ %-$ T%97/#$ U<]6$ %($ :'!"$ E7*/!0#+$ "*?#$ *-$

*..7/*.,$'($F!6$ !"#$-'1#$"*+$ !'$+!*/!$+#-1%-9$!"#$(%/+!$

3*2#<78$&#++*9#$%-$*1?*-.#$!'$!"#$#+!%&*!#1$+."#17)#$

('/$ !"#$ !%&#$'($*!$ )#*+!$=*1?*-.#$G$]!I6$3"#/#$I$ %+$ !"#$

!%&#$:#!3##-$.'&&7-%.*!%'-+@$

Sept. 2004

Page 30: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Micro Frame Preamble

§  Preamble is a sequence of microframes §  Microframe contains

§  instant of the start of the transmission §  destination address

§  Avoid overhearing §  of the preamble §  of data frames

§  ICC, June 2006

30

Page 31: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Micro Frame Preamble

31

!"#$%&'#

( (

(

)$*$

+#,-#"

.#/#01#"

23!($140-5(*605("#/#7*04,

(

(

•  Short samples •  Avoids idle listening during a part of the

preamble and when receiving a frame not sent to our address

Page 32: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Microframe structure

32

Avoid reception of preamble

Avoid reception of unneeded frames

Avoid reception of unneeded broadcast frames

Preamble (4o) Sync.(4o) Frame size (1o) Content desc CRC (2o)

type (1o) dest_addr (2o) seq_num (2o) data_hash (2o)

Page 33: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Performance – 1 neighbor

Gain

33

Page 34: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Performance – 10 neighbors

Gain

34

Page 35: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

X-MAC

§  Same as CSMA-MPS

§  SenSys Oct. 2006

35

Page 36: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

ContikiMAC – X-MAC

pression is provided by the 6lowpan adaptation layer. Rout-ing for low-power and lossy networks is provided by the RPLprotocol.

The headers of IPv6 packets tend to be large comparedto the typical amount of data in low-power wireless net-works. The header size adds to the energy required to trans-mit and receive packets and also increases the probability ofbit-errors in transit. To reduce the size of the headers, IP net-works traditionally use a technique called header compres-sion. For low-power wireless networks, the IETF 6lowpangroup has specified a header compression mechanism forlow-power wireless networks based on the IEEE 802.15.4standard [9]. Because the IEEE 802.15.4 maximum framesize is small (127 bytes), the group also devised a link-layerfragmentation and reassembly mechanism.

Low-power wireless networks tend to be multi-hop sincethe physical range of each device is small. To reach de-vices in a multi-hop network, a routing protocol is needed.In the IP architecture, routing occurs at the IP level. Forlow-power wireless networks, the IETF ROLL group havedesigned a routing protocol called RPL [12, 13]. RPL is op-timized for the many-to-one traffic pattern that is commonin many low-power wireless applications but also supportsany-to-any routing. In RPL, a root node builds a directedacyclic graph through which IPv6 packets are routed. Sincedifferent low-power wireless applications have different de-mands on the network traffic, RPL supports different metricsby which the graph can be constructed. Likewise, after thegraph has been constructed, different parent selection strate-gies are supported. In RPL, these are called objective func-tions.

At the MAC, radio duty cycling, and link layers, theIETF does not specify what mechanisms that should beused. These layers are typically defined by other organiza-tions such as the IEEE. For low-power wireless IPv6, themost common is to use CSMA at the MAC layer and IEEE802.15.4 at the link layer. At the radio duty cycling layer, nostandard or default mechanisms have yet been defined.3 Low-Power Implies Duty Cycling

Radio duty cycling is essential to attaining low powerconsumption. Without duty cycling, network lifetime iscounted in days. To reach a network lifetime of years, dutycycling is needed.

The radio transceiver is the most power-consuming com-ponent of many low-power wireless devices. To reducepower consumption and to extend system lifetime, the ra-dio transceiver must be efficiently managed. But the radiotransceiver consumes as much power when it is in idle lis-tening mode as it is when actively transmitting messages.Therefore, it is not enough to reduce transmissions: to savepower, the radio transceiver must be completely switched offfor most of the time. But when the transceiver is switchedoff, the device cannot receive messages from neighbors,making it difficult to participate in the network.

DD D A

AD

D

A

Send data packets until ack received

Reception window

Data packet

Acknowledgement packet

Transmission detected

Receiver

Sender D

Figure 2. ContikiMAC, from Dunkels et al. [2].

Figure 3. ContikiMAC sender phase-lock.

Figure 4. ContikiMAC broadcast.

To allow low-power wireless devices to actively partici-pate in a low-power wireless network while maintaining alow power consumption, the radio transceiver must be dutycycled. With radio duty cycling, the radio is switched offmost of the time, but switched on often enough to allow thedevice to receive transmissions from other nodes. Over theyears, many different duty cycling schemes have been de-signed [1, 2, 5, 10].

To illustrate the concept of duty cycling, we look at Con-tikiMAC, the default duty cycling mechanism in Contiki [2].The principles of ContikiMAC is illustrated in Figure 2,Figure 3, and Figure 4. In ContikiMAC, nodes periodi-cally wake up to check for a transmission from a neigh-bor. To transmit a message, the sender repeatedly trans-mits the packet until an acknowledgment is received fromthe receiver. After a successful transmission, the sender haslearned the wake-up phase of the receiver, and subsequentlyneeds to send fewer transmissions. A broadcast transmissionmust wake up all neighbors. The sender therefore extendsthe packet train for a full wake-up period.

Radio duty cycling gives a low power consumption butboth brings costs in terms of reduced bandwidth and intro-duces new network dynamics [2, 7]. Different types of trans-missions have different implications in terms of power con-sumption and radio interference. Broadcast transmissionstypically cost more than unicast transmissions, as shown inFigure 4. Existing protocols such as RPL do not take thesedynamics into account. How radio duty cycling affects thebehavior and performance of protocols such as RPL is stillan area of open research.

pression is provided by the 6lowpan adaptation layer. Rout-ing for low-power and lossy networks is provided by the RPLprotocol.

The headers of IPv6 packets tend to be large comparedto the typical amount of data in low-power wireless net-works. The header size adds to the energy required to trans-mit and receive packets and also increases the probability ofbit-errors in transit. To reduce the size of the headers, IP net-works traditionally use a technique called header compres-sion. For low-power wireless networks, the IETF 6lowpangroup has specified a header compression mechanism forlow-power wireless networks based on the IEEE 802.15.4standard [9]. Because the IEEE 802.15.4 maximum framesize is small (127 bytes), the group also devised a link-layerfragmentation and reassembly mechanism.

Low-power wireless networks tend to be multi-hop sincethe physical range of each device is small. To reach de-vices in a multi-hop network, a routing protocol is needed.In the IP architecture, routing occurs at the IP level. Forlow-power wireless networks, the IETF ROLL group havedesigned a routing protocol called RPL [12, 13]. RPL is op-timized for the many-to-one traffic pattern that is commonin many low-power wireless applications but also supportsany-to-any routing. In RPL, a root node builds a directedacyclic graph through which IPv6 packets are routed. Sincedifferent low-power wireless applications have different de-mands on the network traffic, RPL supports different metricsby which the graph can be constructed. Likewise, after thegraph has been constructed, different parent selection strate-gies are supported. In RPL, these are called objective func-tions.

At the MAC, radio duty cycling, and link layers, theIETF does not specify what mechanisms that should beused. These layers are typically defined by other organiza-tions such as the IEEE. For low-power wireless IPv6, themost common is to use CSMA at the MAC layer and IEEE802.15.4 at the link layer. At the radio duty cycling layer, nostandard or default mechanisms have yet been defined.3 Low-Power Implies Duty Cycling

Radio duty cycling is essential to attaining low powerconsumption. Without duty cycling, network lifetime iscounted in days. To reach a network lifetime of years, dutycycling is needed.

The radio transceiver is the most power-consuming com-ponent of many low-power wireless devices. To reducepower consumption and to extend system lifetime, the ra-dio transceiver must be efficiently managed. But the radiotransceiver consumes as much power when it is in idle lis-tening mode as it is when actively transmitting messages.Therefore, it is not enough to reduce transmissions: to savepower, the radio transceiver must be completely switched offfor most of the time. But when the transceiver is switchedoff, the device cannot receive messages from neighbors,making it difficult to participate in the network.

Figure 2. ContikiMAC, from Dunkels et al. [2].

D A

AD

D

A

Transmission detected

Acknowledgement packet

Data packet

Reception window

Receiver

Sender

Send first data packet when receiver is known to listen

D

Figure 3. ContikiMAC sender phase-lock.

Figure 4. ContikiMAC broadcast.

To allow low-power wireless devices to actively partici-pate in a low-power wireless network while maintaining alow power consumption, the radio transceiver must be dutycycled. With radio duty cycling, the radio is switched offmost of the time, but switched on often enough to allow thedevice to receive transmissions from other nodes. Over theyears, many different duty cycling schemes have been de-signed [1, 2, 5, 10].

To illustrate the concept of duty cycling, we look at Con-tikiMAC, the default duty cycling mechanism in Contiki [2].The principles of ContikiMAC is illustrated in Figure 2,Figure 3, and Figure 4. In ContikiMAC, nodes periodi-cally wake up to check for a transmission from a neigh-bor. To transmit a message, the sender repeatedly trans-mits the packet until an acknowledgment is received fromthe receiver. After a successful transmission, the sender haslearned the wake-up phase of the receiver, and subsequentlyneeds to send fewer transmissions. A broadcast transmissionmust wake up all neighbors. The sender therefore extendsthe packet train for a full wake-up period.

Radio duty cycling gives a low power consumption butboth brings costs in terms of reduced bandwidth and intro-duces new network dynamics [2, 7]. Different types of trans-missions have different implications in terms of power con-sumption and radio interference. Broadcast transmissionstypically cost more than unicast transmissions, as shown inFigure 4. Existing protocols such as RPL do not take thesedynamics into account. How radio duty cycling affects thebehavior and performance of protocols such as RPL is stillan area of open research.

36

Page 37: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

ContikiMAC - broadcast

pression is provided by the 6lowpan adaptation layer. Rout-ing for low-power and lossy networks is provided by the RPLprotocol.

The headers of IPv6 packets tend to be large comparedto the typical amount of data in low-power wireless net-works. The header size adds to the energy required to trans-mit and receive packets and also increases the probability ofbit-errors in transit. To reduce the size of the headers, IP net-works traditionally use a technique called header compres-sion. For low-power wireless networks, the IETF 6lowpangroup has specified a header compression mechanism forlow-power wireless networks based on the IEEE 802.15.4standard [9]. Because the IEEE 802.15.4 maximum framesize is small (127 bytes), the group also devised a link-layerfragmentation and reassembly mechanism.

Low-power wireless networks tend to be multi-hop sincethe physical range of each device is small. To reach de-vices in a multi-hop network, a routing protocol is needed.In the IP architecture, routing occurs at the IP level. Forlow-power wireless networks, the IETF ROLL group havedesigned a routing protocol called RPL [12, 13]. RPL is op-timized for the many-to-one traffic pattern that is commonin many low-power wireless applications but also supportsany-to-any routing. In RPL, a root node builds a directedacyclic graph through which IPv6 packets are routed. Sincedifferent low-power wireless applications have different de-mands on the network traffic, RPL supports different metricsby which the graph can be constructed. Likewise, after thegraph has been constructed, different parent selection strate-gies are supported. In RPL, these are called objective func-tions.

At the MAC, radio duty cycling, and link layers, theIETF does not specify what mechanisms that should beused. These layers are typically defined by other organiza-tions such as the IEEE. For low-power wireless IPv6, themost common is to use CSMA at the MAC layer and IEEE802.15.4 at the link layer. At the radio duty cycling layer, nostandard or default mechanisms have yet been defined.3 Low-Power Implies Duty Cycling

Radio duty cycling is essential to attaining low powerconsumption. Without duty cycling, network lifetime iscounted in days. To reach a network lifetime of years, dutycycling is needed.

The radio transceiver is the most power-consuming com-ponent of many low-power wireless devices. To reducepower consumption and to extend system lifetime, the ra-dio transceiver must be efficiently managed. But the radiotransceiver consumes as much power when it is in idle lis-tening mode as it is when actively transmitting messages.Therefore, it is not enough to reduce transmissions: to savepower, the radio transceiver must be completely switched offfor most of the time. But when the transceiver is switchedoff, the device cannot receive messages from neighbors,making it difficult to participate in the network.

Figure 2. ContikiMAC, from Dunkels et al. [2].

Figure 3. ContikiMAC sender phase-lock.

Sender

Send data packets during entire period

Reception window

Data packet

Transmission detected

Receiver

D

D

D DD D

D

D

Figure 4. ContikiMAC broadcast.

To allow low-power wireless devices to actively partici-pate in a low-power wireless network while maintaining alow power consumption, the radio transceiver must be dutycycled. With radio duty cycling, the radio is switched offmost of the time, but switched on often enough to allow thedevice to receive transmissions from other nodes. Over theyears, many different duty cycling schemes have been de-signed [1, 2, 5, 10].

To illustrate the concept of duty cycling, we look at Con-tikiMAC, the default duty cycling mechanism in Contiki [2].The principles of ContikiMAC is illustrated in Figure 2,Figure 3, and Figure 4. In ContikiMAC, nodes periodi-cally wake up to check for a transmission from a neigh-bor. To transmit a message, the sender repeatedly trans-mits the packet until an acknowledgment is received fromthe receiver. After a successful transmission, the sender haslearned the wake-up phase of the receiver, and subsequentlyneeds to send fewer transmissions. A broadcast transmissionmust wake up all neighbors. The sender therefore extendsthe packet train for a full wake-up period.

Radio duty cycling gives a low power consumption butboth brings costs in terms of reduced bandwidth and intro-duces new network dynamics [2, 7]. Different types of trans-missions have different implications in terms of power con-sumption and radio interference. Broadcast transmissionstypically cost more than unicast transmissions, as shown inFigure 4. Existing protocols such as RPL do not take thesedynamics into account. How radio duty cycling affects thebehavior and performance of protocols such as RPL is stillan area of open research.

37

Page 38: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

ContikiMAC - broadcast Figure 13: Synchronized unicast transmission (with sub-sequent wake-up at 110 ms)

0

500

1000

1500

2000

Ener

gyv

(uJ)

Wake-up

Fastsleep

Broadcastreception

Unicastreception

Broadcasttransmission

Firstunicast

Subsequentunicast

Figure 14: The energy consumption of the individualContikiMAC operations.

now be optimized to start at the expected wake-up timeof the neighbor, as seen in Figure 13, which shows howthe number of transmissions are reduced because of thephase-lock optimization.

By computing the areas under the graphs in Figure 7through Figure 13, we can compute the energy consump-tion of each operation. The result is shown in Figure 14.We see that the cost of a broadcast transmission is manyorders of magnitude higher than the cost of the wake-up.This is good: the wake-up is the most common operationin ContikiMAC—executed many times per second—andtherefore should be significantly less expensive than theother operations.

Armed with the information in Figure 14, we can now

Table 1: Comparison of the energy consumption of thewake-up operation.

Protocol Energy (uJ)

X-MAC [1] 132Hui and Culler [14] 54ContikiMAC 12

Figure 15: The radio duty cycle in a data collection net-work with path loss, with X-MAC and ContikiMAC, asa function of the wake-up frequency (in the graph calledchannel check rate).

compare the cost of the ContikiMAC wake-up operationwith the wake-up operation of other duty cycling mech-anisms. Table 1 shows the cost of a wake-up in Contiki-MAC, in the Contiki X-MAC implementation [1], and theduty cycling mechanism by Hui and Culler [14].

4.2 Network Power Consumption

To evaluate the network power consumption of Contiki-MAC and the efficiency of its optimizations, we runa set of simulations in the Contiki simulation environ-ment. The Contiki simulation environment consists of theCooja network simulator and the MSPsim device emula-tor. MSPsim provides a cycle-accurate Tmote Sky emu-lation, with a symbol-accurate emulation of the CC2420

7

38

Page 39: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

S-MAC - Sensor MAC

§  Nodes periodically sleep §  Turn off radio when sleeping §  Reduce duty cycle to ~ 10%

§  Trades energy efficiency for lower throughput and higher latency

§  S-MAC = lite-802.11 + scheduling

Node 1

Node 2

sleep listen listen sleep

sleep listen listen sleep

39

Page 40: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

S-MAC - Common Schedules

§  Deafness §  common active periods, low duty cycle

§  Active periods §  SYNC exchange – accept a schedule, no schedule

received, create a new one §  data exchange •  802.11 DCF alike contention in each sub-period §  strong contention in active periods

40

Page 41: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Scheduled Channel Polling (SCP-MAC) When WiseMAC meets S-MAC

§  By synchronizing channel polling times of all neighbors, long preambles are eliminated and ultra-low duty cycles (below the LPL 1-2% limits) are possible

§  Know my neighbors’ schedule §  broadcast SYNC messages §  piggyback schedule info on data frames

41

Page 42: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

SCP-MAC

42

Page 43: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

SCP – Energy consumption

43

0 50 100 150 200 250 300 3500

0.05

0.1

0.15

0.2

0.25

0.3

0.35

Data generation interval on each node (s)

Ener

gy c

onsu

mpt

ion

per n

ode

(J)

SCPLPL

Figure 8. Mean energy consumption (J) for each node astraffic rate varies (assuming optimal configuration andperiodic traffic).

multiple times to make up a long preamble. This approacheliminates the buffer loading time of each wakeup packet,and effectively reduces the gap between two wakeup packetsto about 30µs. Since the radio generates RSSI samples byaveraging over a few recent symbols (128µs), the gap willnot cause the radio to miss the preamble directly. In addi-tion, our carrier sense algorithm automatically extends sam-ples in case the first sample fails to give a clear answer. Ourapproach effectively allows arbitrarily long “preambles” andwakeup tones for LPL and SCP.Our MicaZ implementation is still very preliminary. Al-

though all layers of the stack work (PHY, CSMA, LPL, andSCP from Section 4.1), additional work is needed to makeall layers fully functional. The LPL and SCP layers are suf-ficient to demonstrate the concepts and collect initial data,but significant work remains to tune the implementation andimprove robustness.5 Experimental EvaluationThe main contributions of this paper are to highlight the

relative benefits of LPL and scheduling in energy conserva-tion, and to propose a new MAC protocol, SCP-MAC, thatoptimally combines their strengths. We have implementedSCP-MAC to validate these contributions.All actual MAC implementations have hundreds of spe-

cific design choices, many of which have effects on perfor-mance. Those details could distract us from the main ques-tion of comparing the advantages of scheduling on top ofLPL. To control these details in comparing LPL and SCP,we use our own implementations of these protocols. Thisapproach ensures that both LPL and SCP use the same ba-sic components such as CSMA, physical-layer carrier sense,back-off, and other important parameters. In addition, itgives us the flexibility to compare SCP and LPL at a rangeof duty cycles and on both Mica2 and MicaZ hardware. (Thecurrent B-MAC implementation, as of March 31, 2006, doesnot support LPL on MicaZ.) We did validate that our ba-sic channel polling is comparable to that in B-MAC (Sec-tion 4.2). Detailed comparison to complete implementationsof other MACs such as B-MAC and WiseMAC is an area offuture work. We do not compare to pure schedule-based pro-tocols, such as S-MAC and T-MAC, since prior work [17]has shown that B-MAC outperforms these protocols.

0 50 100 150 200 250 300 3500

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Data generation interval on each node (s)

Ener

gy c

onsu

mpt

ion

rate

per

nod

e (m

W)

CC1000 radioCC2420 radio

LPL

SCP

Figure 9. Mean energy consumption rate (J/s or W) foreach node as traffic rate varies (assuming optimal config-uration and periodic traffic). The radios are the CC1000(solid lines) and CC2420 (dashed).

5.1 Optimal Setup with Periodic TrafficWe first compare the energy performance of SCP and

LPL under optimal configuration with completely periodic,known traffic. With static traffic loads we can optimize eachfor maximum energy conservation. We use our implementa-tion to validate the analysis leading to Figure 6. To focus onthis goal, we disabled advanced features in SCP-MAC, suchas adaptive channel polling and overhearing avoidance.MAC parameters vary based on network size and data

rate. For this test we place 10 nodes in a single hop net-work. Each node periodically generates a 40B message (notincluding preamble) and broadcasts it to the network. Forthis test we consider very light traffic loads typical for verylong-lived sensor networks: we vary each node’s messagegeneration interval from 50–300s. (Thus the aggregate datarate in the network is 1 message every 5–30s.)For each static traffic load, we find out the optimal polling

period of LPL and SCP from Equations (10) and (17). Werun each experiment for 5 message periods, generating 50total messages over each experiment. We report mean valuesof energy consumption per node. In this section we do notreport standard deviations because they were small.A control node begins and ends the experiment by broad-

casting control packets to all nodes. We measure the energyconsumption at each node by recording (in software) the timespent by the radio at different states. (We do not explicitlymodel CPU energy, but when the radio is off, the CPU is alsoin sleep mode except for timer maintenance, and we previ-ously demonstrated that timer costs are negligible.) At theend of the experiment we collect this information from allnodes to a central measurement point and compute energyconsumed by the radio.Figure 8 shows the mean energy consumption of each

node to send and receive all the messages. The energy con-sumption for SCP is almost constant at all rates, as the cost ofsending each packet is about same. With broadcast traffic, allexplicit SYNC packets are suppressed due to piggybacking.For LPL, the energy consumption increases at slower rates,since the optimal polling interval is longer (see Figure 4),therefore the cost on longer preambles is larger. In addition,the absolute cost of SCP is much lower than LPL: we can see

Page 44: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

802.15.4

§  TDMA controlled by a PAN Coordinator §  Beacons – common time base §  define Superframe structure

§  Devices may sleep for extended periods over multiple beacons

§  Slotted CSMA in beaconed PANs §  Unslotted CSMA in non-beaconed PANs §  Low duty cycle requires beaconed enabled

mode and slotted CSMA

44

Page 45: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Overview of IEEE 802.15.4

§  MAC: two modes §  Beacon-Enabled mode

§  Star & Cluster-Tree

§  Non Beacon-Enabled mode §  Peer-to-Peer

CAPGTS

GTS

GTS

GTS

GTS

GTS

GTS

SDBI

beacon beacon

sleeping

45

A

E

D

J

K

L

B

QI

C

P

G

F

Coordinators

leaf node

tree link

Page 46: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Superframe

46

Slot min duration 960µs

320µs 20symb

320µs 20symb

320µs 20symb

960µs

Slot0

960µs

Slot1 960µs

Slot2

1 Symbol = 4bits = 16 µs

2 BO-SO = SD that can be scheduled in BI=2 BO

0 <= SO <= BO <= 14 BI = (960µs * 16) 2 BO SD = (960µs * 16) 2 SO

BO Beacon Order BI Beacon Interval SO Superframe Order SD Superframe Duration

Backoff Period

Page 47: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Size of Super Frame

SO Size of Slot

(symbols)

SD duration 2,4/2,485 GHz

SD duration 902/928 MHz

SD duration 868/868,6 MHz

0 60 15,36 ms 24 ms 48 ms 1 120 30,72 ms 48 ms 96 ms 2 240 61,44 ms 96 ms 192 ms 3 480 122.88 ms 192 ms 384 ms 4 960 245.76 ms 384 ms 768 ms

14 983040 251,6 s 393,2 s 786,4 s

47

Page 48: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Superframe

§  CAP – Contention Access Period §  Slotted CSMA/CA

§  CFP – Contention Free Period §  GTS – Guaranteed Time Slot (may span several slots)

§  In a beacon sent in the first slot of the superframe: §  Beacon Order (BO) - describes the interval at which the

coordinator shall transmit its beacon frames §  if BO = 15, superframe is ignored §  Superframe Order (SO) - describes the length of the active

portion of the superframe §  if SO = 15, superframe should not remain active after the

beacon

48

Page 49: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

CSMA/CA

§  Backoff period: time unit=20 symbols §  BE: Backoff Exponent (size of Contention Window) §  Backoff: random interval in [0, 2 -1]* Backoff period §  CW

§  the number of units to perform CCA (Clear Channel Assessment) after random backoff (default CW=2)

§  NB: Number of Backoffs (initial 0) §  A node drops a frame either

§  when there is no ACK received after MaxFrameRetries or §  when the node performed MaxCSMABackoffs without finding the

channel free

§  Default values: §  minBE=3, maxBE=5, MaxFrameRetries=4, MaxCSMABackoffs=4

BE

49

Page 50: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Slotted CSMA/CA

50

NB=0, CW=2, BE=3

Locate Backoff Boundary

Rand [0, 2BE -1]

Perform CCA on Backoff Boundary

CW=2, NB++, BE=min(BE++, MaxBE) CW=CW-1

SuccessFailure

ChannelIdle ?

NB > macMaxCSMABackoffs

YesNo

Yes Yes

NoCW=0

No

Page 51: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Slotted CSMA/CA

§  Initialization: NB=0, CW=2, Backoff=[0 , 2 -1] §  Busy: NB=NB+1, CW=2, BE=min[BE+1, MaxBE]

A

C

B

DATA

BE

CW

Busy

Busy

DATA

CW

DATA

CWBusy

BEACON

Backoff Period

51

Page 52: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Contention in 802.15.4

0

0.2

0.4

0.6

0.8

1

5 10 15 20 25 30 35 40 45 50

PD

R

Number of nodes

Without hidden node

With hidden node

52

Page 53: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Slotted CSMA/CA Max. number of retransmissions

53

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8

0 1 2 3 4 5 6 7

Pack

et D

eliv

ery

Rat

io

macMaxFrameRetries

4 nodes8 nodes

16 nodes32 nodes

64 nodes

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0 1 2 3 4 5 6 7

Pack

et D

eliv

ery

Rat

io

macMaxFrameRetries

(no ACK received)

Page 54: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Slotted CSMA/CA Max. clear channel assessments

54

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0 1 2 3 4 5

Pack

et D

eliv

ery

Rat

io

macMaxCSMABackoffs

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8

0 1 2 3 4 5 6 7

Pack

et D

eliv

ery

Rat

io

macMaxFrameRetries

4 nodes8 nodes

16 nodes32 nodes

64 nodes

Page 55: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Slotted CSMA/CA Initial random backoff window size

55

0

200

400

600

800

1000

1200

3 4 5 6 7 8

Thro

ughp

ut [B

it/s]

macMinBE

10 nodes20 nodes

30 nodes40 nodes

50 nodes60 nodes

0

200

400

600

800

1000

1200

3 4 5 6 7 8

Thro

ughp

ut [B

it/s]

macMinBE

Page 56: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

56

ABE – parameter adaptation

0 2000 4000 6000 8000

10000 12000 14000 16000 18000

80402014108765432

Thro

ughp

ut [B

it/s]

Packet Generation Rate [pps]

ABEmacMinBE 3macMinBE 4macMinBE 5

macMinBE 6macMinBE 7macMinBE 8

4000

6000

8000

10000

12000

14000

16000

18000

20000

0 5 10 15 20 25 30 35

Thro

ughp

ut [B

it/s]

Number of nodes

Page 57: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Topology in 802.15.4

§  Cluster Tree §  nodes associate with a

coordinator §  coordinator sends

beacons

§  Multi-hop forwarding §  Complex topology at L2

required for synchronized operation

57

Page 58: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Data pull in 802.15.4

ST/LIG — 3

CSMA/CA slotted

• A coordinator sends periodical beacons• Any node can be:

✓ Coordinator for a group of sensors✓ Simple device associated to another

coordinator

• Low energy consumption for devices✓ They can even skip some beacons!

• Devices always pull their frames from theircoordinator

• Channel access always happens in slots

IEEEStd 802.15.4-2003 IEEE STANDARD FOR LOCAL AND METROPOLITAN AREA NETWORKS:

20 Copyright © 2003 IEEE. All rights reserved.

When a coordinator wishes to transfer data to a device in a nonbeacon-enabled network, it stores the data forthe appropriate device to make contact and request the data. A device may make contact by transmitting aMAC command requesting the data, using unslotted CSMA-CA, to its coordinator at an application-definedrate. The coordinator acknowledges the successful reception of the data request by transmitting anacknowledgment frame. If data are pending, the coordinator transmits the data frame, using unslottedCSMA-CA, to the device. If data are not pending, the coordinator transmits a data frame with a zero-lengthpayload to indicate that no data were pending. The device acknowledges the successful reception of the databy transmitting an acknowledgment frame. The transaction is complete. This sequence is summarized inFigure 9.

5.4.2.3 Peer-to-peer data transfers

In a peer-to-peer PAN, every device may communicate with every other device in its radio sphere ofinfluence. In order to do this effectively, the devices wishing to communicate will need to either receiveconstantly or synchronize with each other. In the former case, the device can simply transmit its data usingunslotted CSMA-CA. In the latter case, other measures need to be taken in order to achieve synchronization.Such measures are beyond the scope of this standard.

Figure 8—Communication from a coordinator a beacon-enabled network

Coordinator Network Device

Beacon

Data

Acknowledgment

Data Request

Acknowledgment

Figure 9—Communication from a coordinator in a nonbeacon-enabled network

Coordinator Network Device

Data

Acknowledgment

Data Request

Acknowledgment

§  Data pending flag in a beacon

§  Broadcast flag §  coordinator to

devices

§  No broadcast from devices

58

Page 59: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Beacon Scheduling in 802.15.4

Incoming Active Period(received)

Received Beacon

Outgoing Active Period(transmitted)Inactive Inactive

Transmitted Beacon

StartTimeSD SD

BI

59

Page 60: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

No optimization for Upward and Downward Traffic!

§  Previous slide: §  One BO for all nodes (standard) §  Upward Latency : BI (1 Superframe)

§  Downward Latency : N-hops * BI

60

Page 61: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

61

Standardization and Internet of Things

Page 62: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

A World of Proprietary Protocols

62

© 2007 Cisco Systems, Inc. All rights reserved. 4

Internet

L2N

L2N

TrueMesh

Wireless

HART

ISA

SP100.11a

Xmesh

Znet

MintRoute

MultiHop LQI

CENS Route

Smart

mesh

TinyAODV

Honeywell

So far … WAS (Wait And See) - A trend that we can reverse … Slide presented at Routing Plenary IETF-69 – July 2009 - Chicago

Most promoters of non-IP solutions have understood that IP was a MUST: they call this “IP convergence”: A protocol translation gateway ! Or Tunneling …

courtesy of JP Vasseur

Page 63: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

WSN connected to Internet

§  IP connectivity to nodes §  use the Internet protocol stack end-to-end

63

Gateway Mesh network

Internet

IP packets

Page 64: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Internet of Things

§  Application (HTTP like) §  CoAP (Constrained Application

Protocol) §  Transport

§  lightweight, chosen functions §  Network – Routing

§  adaptation (header compression) §  MAC

§  Low Radio Duty Cycle §  PHY

§  802.15.4, others

802.15.4 MAC/PHY

6LoWPAN

IPv6 - RPL

TCP/UDP

CoAP

64

Page 65: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

65

Key IPv6 Contributions §  Large simple address (128 bits, 16 bytes)

§  Network ID + Interface ID §  Plenty of addresses, good for Things! §  subnetwork has to carry at least 1280 bytes

§  Autoconfiguration and Management §  ICMPv6:

§  Neighbor Solicitation (NS) §  Neighbor Advertisement (NA)

§  Protocol options framework §  Header extensions

Prefix IID

ICMPv6

IPv6 Base HbH Opt Routing Fragment Dst Opt

128 bits

headers:

Page 66: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

66

IPv6 over 802.15.4?

§  Large IP Address & Header => 16 bit short address / 64 bit EUID §  Minimum Transfer Unit => Fragmentation §  Short range & Embedded => Multiple Hops

802.15.4 frame ctrl src UID len chk dst UID link payload

IPv6 packet

UDP datagram or TCP segment

transport header application payload

128 Bytes MAX

40 B + options

1280 Bytes MIN

cls flow len hops src IP dst IP net payload 16 B 16 B

NH

Page 67: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

6LoWPAN

§  IPv6 packets over 802.15.4 networks §  802.15.4 frame - 127 bytes, IPv6 - 1280 bytes ->

fragmentation §  compress headers (derive addresses from

802/15.4)

33/77Mischa Dohler & Thomas Watteyne @ ICC 2009

IETF 6LoWPAN – Header

MAC hdr FCS

127 B Frame7 B 4 B

lowpan cIP cUDP3 B 1 B 3 B

108 B Payload

6LoWPAN UDP/IPv6

� Orthogonal header format for efficiency and stateless header compression:

67

Page 68: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

RPL (IPv6 Routing Protocol for Low power and Lossy Networks)

DODAG Example

I Each node has a set of parent nodes

I A node has no knowledge about children ! ONLY upwardroutes

1

B

A

C

H

G

I

1

3D

1

11

E

1

2

F

7 11

311

1

4

K

2G

2 K

edge in DODAG

unused link

R=0

R=1R=2

R=1

R=3

R=4

R=3R=4

R=5 R=6

n  Distance vector

n  Metrics: hops, ETX (number of retransmissions) 68

Page 69: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

coap://sky3/  

coap://sky2/  

coap://sky1/  

Constrained Application Protocol (CoAP)

§  RESTful Web services for networked embedded devices §  Idealized architectural style of the Web §  HTTP for the Internet of Things

69

GET /sensors/temperature

Page 70: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

REST - Representational State Transfer

b) Asynchronous transaction

a) Synchronous transaction

c) Orphaned transaction

Page 71: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

CoAP

§  Example exchanges

Sensor node CoAP server CoAP client

GET /.well-known/core

2.05 Content <s/t>; rt="TemperatureC"

GET /s/t

2.05 Content 21.5 C

71

Sensor node CoAP server CoAP client

OBSERVE /s/t

Notification 1 21.5 C

Notification 1 22 C

Notification 1 22.5 C

Page 72: Wireless Sensor Networkslig-membres.imag.fr/duda/3at/wsn1-1.pdf · fully operational protocol stack for IP-enabled Wireless Sensor Networks based on the IEEE 802.15.4 beacon-enabled

Facts to remember

§  Future Internet of Things §  relies on IP networking §  promising approach to unifying sensor networks

§  Still many issues to address §  low power MAC methods – reduce all sources of

energy waste §  topology construction: how to choose a parent and

associate at L2? Topology at L2 vs. L3

§  Upper layer issues §  transport (TCP) over duty cycled networks

72