Copyright © 2006 EEM202B/CSM213B - Spring 2006 Mani Srivastava UCLA - NESL mbs@ucla.edu Lecture...

Preview:

Citation preview

Copyright © 2006

EEM202B/CSM213B - Spring 2006

Mani Srivastava

UCLA - NESL

mbs@ucla.edu

http://nesl.ee.ucla.edu

Lecture #2: Wireless Comm. for ENS - Part IThe Lower Layers

2

Reading List for this Lecture

• Curt Schurgers, Vlasios Tsiatsis, Saurabh Ganeriwal, and Mani Srivastava, “Optimizing Sensor Networks in the Energy-Density-Latency Design Space,” IEEE Transactions on Mobile Computing, January-March 2002.

– http://nesl.ee.ucla.edu/courses/ee202b/2006s/papers/L02/Schurgers02_TMC.pdf

• Wei Ye, John Heidemann, and Deborah Estrin, “Medium Access Control with Coordinated Adaptive Sleeping for Wireless Sensor Networks,” IEEE/ACM Transactions of Networking, Vol. 12, No. 3, pp. 493-506, June 2004.

– http://nesl.ee.ucla.edu/courses/ee202b/2006s/papers/L02/Ye04_ToN.pdf

• Joseph Polastre, Jason Hill, and David Culler, “Versatile Low Power Media Access for Wireless Sensor Networks,” Proceedings of ACM SenSys, November 2004.

– http://nesl.ee.ucla.edu/courses/ee202b/2006s/papers/L02/Polastre04_SenSys.pdf

• Saurabh Ganeriwal, Deepak Ganesan, Hohyun Shim, Vlasios Tsiatsis, and Mani Srivastava, "Estimating clock uncertainty for efficient duty-cycling in sensor networks," The Third ACM Conference on Sensor Networking Systems (SenSys 2005) , November 2005.

– http://nesl.ee.ucla.edu/courses/ee202b/2006s/papers/L02/Ganeriwal05_SenSys.pdf

3

Traditional Communication Stack

Application layer

Transport layer

Network layer

Link/MAC layer

Physical layer

End-to-end reliability, congestion control

RoutingPer-hop reliability, flow control, multiple access, topology managementPacket transmission and reception

4

Radios and Radio Channels

5

Digital Radio Communications

MultipleAccessMultiplex

SourceCoder

SourceCoder

ChannelCoder Modulator Power

Amplifier

Radio

Channel

MultipleAccessDemultiplex

SourceDecoder

SourceDecoder

ChannelDecoder

Demodulator& Equalizer

RFFilter

So

urc

eD

esti

nat

ion

Carrier fc

Carrier fc

transmittedsymbol stream

received (corrupted)symbol stream

antenna

antenna

6

Options for Physical Layer

• Less common– Infrared

– Acoustic

– Magnetic, capacitive or inductive coupling (“near field”)

• Far field radios– 802.11

– Bluetooth

– Proprietary: RFM, Chipcon, Nordic Semiconductor

– 802.15.4/Zigbee

– …

7

Communication vs. {Computation, Storage}

Transmit 2950 nJ/bit Processor 4 nJ/op

Receive 2600 nJ/bit ~ 1400 ops/bit

Mote-class802.15.4 Node

Microserver-classNode

Transmit 6600 nJ/bit Processor 1.6 nJ/op

Receive 3300 nJ/bit ~ 6000 ops/bit

Write470 nJ/bit to120750 nJ/bitAtmel AVR

Flash(256b/page) Read

30 nJ/bit to7600 nJ/bit

Write1 nJ/bit to550 nJ/bit1GB NAND

Flash Chip(512b/page) Read

0.4 nJ/bit to220 nJ/bit

• Energy/bit sent > Energy/bit stored > Energy/op– True even for short ranges

– Gap even larger in actuality, due to protocol and filesystem overheads

8Radio Rx Dominates at Short Ranges due to

Electronics

Tx: Sender Rx: Receiver

ChannelIncominginformation

Outgoinginformation

TxelecE Rx

elecERFETransmit

electronicsReceive

electronicsPower

amplifier

0

2000

4000

6000

8000

0

100

200

300

0

200

400

600

TxelecE Rx

elecERFE TxelecE Rx

elecERFE TxelecE Rx

elecERFE

nJ/bit nJ/bit nJ/bit

~ 1 km (GSM) ~ 50 m (WLAN) ~ 10 m (Mote)

9

Domination of Electronics at Short Range

d

Static Power,Digital

Processing

Power amp,Receiver

Sensitivity

Radio Maximum dn

2.4 KHz OOK(RFM TR1000 @ 916 MHz)

14 J 3.1 J

115.2 KHz ASK(RFM TR1000 @ 916 MHz)

372 nJ 65 nJ

1 Mbps Custom(MIT AMPS-1 @ 2.4 GHz) 570 nJ 740 nJ

11 Mbps 802.11b(Cisco Aironet 350 @ 2.4

GHz)236 nJ 91 nJ

54 Mbps 802.11a(Atheros, ISSCC2002)

14.8 nJ 11 nJ

Ebit = α + βdn

Re: Min et. al., Mobicom 2002 (Poster)

Sender Side Power Consumption

10

Radio Electronics Trends

Analog electronics240 mW

Digital electronics170 mW

Power amplifier 600 mW

(~11% efficiency)

Intersil PRISM II (Nokia C021 wireless LAN)

Radiated power63 mW (18 dBm)

Trends: Move functionality from the analog to the digital electronics Digital electronics benefit most from technology improvements Analog a bottleneck Digital complexity still increasing (robustness)

11Example: Rx and Tx Power Consumption

in Mica 1 Mote

Note: higher numbers represent lower RF power

12

Assumptions Underlying Traditional Wireless Protocols

• Transmission is costlier than reception• Idle listening is cheap• Energy scales as distance^n so that

– Multihop

– Coding (lowers Eb/No) always good for J/bit

– Modulation (lowers Eb/No)

}

13

Assumptions Underlying Traditional Wireless Protocols

• Transmission is costlier than reception

• Idle listening is cheap

• Energy scales as d^n so that– Multihop– Coding (lowers Eb/No) always good for J/bit– Modulation (lowers Eb/No)

But these assumptionsbreakdown in sensor nets

}

14

• Ignoring Idle listening when no sensing events leads to misleading conclusions

Example: Energy-aware MAC[Intanago et. al. 2000]

0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0 50 100 150 200 250 300

Ave

rage

Dis

sipa

ted

Ene

rgy

(Jou

les/

Nod

e/R

ecei

ved

Eve

nt)

Network Size

DiffusionDiffusion

Omniscient MulticastOmniscient MulticastFloodingFlooding

00.0020.0040.0060.0080.01

0.0120.0140.0160.018

0 50 100 150 200 250 300

Ave

rage

Dis

sipa

ted

Ene

rgy

(Jou

les/

Nod

e/R

ecei

ved

Eve

nt)

Network Size

DiffusionDiffusion

Omniscient MulticastOmniscient Multicast

FloodingFlooding

Over 802.11-like MAC Over energy-aware MAC

15

Example: Multihop & Characteristic Distance[Ref: Min & Chandrakasan, 2002]

16

Radio Energy Management: Reducing Energy/Bit

• During operation, the required performance is often less than the peak performance the radio is designed for

• How do we take advantage of this observation, in both the sender and the receiver?

??

time

Tx Rx

17

Energy Consumption of the Sender

• Parameter of interest:– energy consumption per bit

Tx: Sender

Incominginformation

TxelecP

RFP

Transmission timeTransmission time

Ene

rgy

Ene

rgy

bitbit T

PE =

Ene

rgy

Transmission time

RFDominates

Electronics Dominates

TotalP

Modulation scaling

fewer bits per symbol

Code scaling

more heavily coded

18

Dependence on Transmission Range

Short-range

Medium-range

Long-rangeE

ner

gy

Transmission time

• Long range: scale coding or modulation to use all the available time• Short range: transmit rapidly and shutdown

19

Scaling vs. Shutdown

Power

time

allowed time

transmission time = t*

Power

time

allowed time

transmission time = t*

Power

time

allowed timetransmission time

En

erg

y Region of scaling

Region of shutdown

Emin

t*

• Use scaling while it reduces the energy

• If more time is allowed, scale down to the minimum energy point and subsequently use shutdown

time

20

Long Range Case: Scaling for Energy

RFE

Power

time

available time

transmission time

Modulation scaling

fewer bits per symbol

Code scaling

more heavily coded

Ene

rgy

transmission time

TxelecE Rx

elecE

Ene

rgy

transmission time

Principle

– Vary radio ‘control knobs’ such as modulation and error coding

– Trade off energy versus transmission time

21

Energy-aware Medium Access Control

• Radios with scalable modulation and coding• MAC protocol that decides

– Which node transmits– What packet– At what time– On what channel– With what RF power– What modulation and coding setting

bC

bCE E

b

Sbit

112×+⎟⎟

⎞⎜⎜⎝

⎛ −×=

Sbit Rb

=1

[For a QAM system]

Dynamic Modulation Scaling (DMS)

22

Energy Aware Packet Scheduling

• E.g. enhancement of fair queuing schedulers

• Normally, distribute excess bandwidth is distributed

• But, we can use it to reduce energy at the cost of increased latency

• Input queue sizes monitored and output radio rate set accordingly

23

Short Range Case: Shutdown

• Principle– Operate at a fixed speed and

power level– Shut down the radio after the

transmission– No superfluous energy

consumption• Gotcha

– When and how to wake up?– More later …

Power

time

available time

transmission time

Energy

allowed time

transmission time shutdown

no shutdown

24

Radio Energy Management Summary

Long-range links

• Scaling based

• Slow down transmissions

• Energy-aware packet schedulers exploit thise.g. Raghunathan et. al. @ ACM ISLPED ‘02

Short-range links

• Shutdown based

• Turn off sender and receiver

• Topology management schemes exploit thise.g. Schurgers et. al. @ ACM MobiHoc ‘02

Ene

rgy

transmission time

Ene

rgy

transmission time

25

Shutdown and Radio Startup Time

• Radio modes: active, idle, shutdown, transient

• Transient period– Active/idle to sleep is short and can be ignored– Sleep to active/idle period, TON, is not

• PLL in the frequency synthesizer takes time to settle• Ptr = 2*Psyn

• TON is O(10)-O(100) uS• mixer & power amp startup can be ignored

• Problem: TON is significant fraction of packet duration– Packet sizes small in sensor nets (reporting events)

• Leads to high energy per bit!

• Radios with fast start-up and acquisition

26Radio Energy Efficiency vs. Power

Management Efficiency

Technology Data Rate Tx Current Energy per bit Idle Current Startup cost

Chipcon CC1000

76.8 Kbps 10 mA 430 nJ/bit 7 mA Low (~ 10 ms)

Bluetooth 1 Mbps 45 mA 149 nJ/bit 22 mA Medium (~ 1 s)

802.11 11 Mbps 300 mA 90 nJ/bit 160 mA High (~ 10 s)

IEEE 802.11

Bluetooth

Chipcon CC1000

Energy per bit

Startup cost

Idle current

27

Multi-radio Wireless Systems

• Wireless devices equipped with multiple radios– Heterogeneity enables ubiquitous connectivity

• E.g., Stargate wireless platform from Intel Research– 802.11 through CF slot, on-board Bluetooth, plug in connector for

Berkeley motes

• 400 MHz PXA-255 XScale

• 64 MB SDRAM

• PCMCIA, Ethernet, USB, RS-232

• Runs ARM Linux

Exploit radio heterogeneity for power management

28

Hierarchical Radio Performance on Stargate

Discovery schemeDiscovery

latency (ms)Power gating

overhead (ms)Connection latency (ms)

Discovery power (mW)

Chipcon CC1000 457 ms (2) - 8.3 mW

Bluetooth (BT) 2935 ms (453) 714 ms 58 mw

802.11b (WF) 1298 ms (1103) 222 ms 398 mW

CC1000 BT 457 ms 1698 1293 ms 9.3 mW

CC1000 WF 457 ms 1205 222 ms 9.3 mW

BT WF 2935 ms 1205 1763 ms 61 mW

(TDK Bluetooth module running BlueZ stack, Netgear MA-701 802.11b card using HostAP drivers, MICA2 mote duty cycled)

[In collaboration with Ubiquity SRP, Intel]

29

IEEE 802.15.4/Zigbee

• Target space– Low power consumption and low cost– Low offered message throughput– Large networks (<= 65k nodes)– Low to no QoS guarantees– Selectable levels of security (using AES-128)

• Privacy (encryption), Sender authentication, Message integrity

• 802.15.4 characteristics– Data rates of 250 kb/s (2.4 GHz) and 20/40 kb/s (868/915

MHz).– 16 channels in the 2.4 GHz ISM band, 10 channels in the 915

MHz ISM band and one channel in the European 868 MHz band.– CSMA-CA channel access.– Fully handshaked protocol for transfer reliability.– Extremely low duty-cycle (< 10 ppm) capability.– Beaconless operation available.– Support for low latency devices (Guaranteed Time Slots in

star networks).– Star or Peer-to-Peer network topologies supported.From Callaway @ ACM Sensys 2003

30

The Two 802.15.4 PHY layers

From Callaway @ ACM Sensys 2003

31802.15.4 PHY Issues: Orthogonal Multilevel

Signaling

• Low Pavg is achieved with a low overall system duty cycle, consistent with low peak currents

• At the physical layer, this encourages the use of a high data rate, but low symbol rate

– Peak currents tend to track symbol rate, rather than data rate

• This implies the use of multilevel signaling

• However, simple multilevel signaling results in sensitivity loss that may defeat the low power goal

• Solution is the use of orthogonal signaling—trading bandwidth to recover sensitivity with coding gain

• Standard

– 250 kbps (4 bits/symbol, 62.5 kBaud)

– 16-ary orthogonal modulation

– 16 symbols are pseudo-orthgonal set of 32-chip PN codes

– Chip modulation is O-QPSK at 2.0 Mchip/s (1 Mchip/s in I and Q each)

From Callaway @ ACM Sensys 2003

32802.15.4 PHY Issues: Warmup Power Loss

Reduction

• Since the active periods of IEEE 802.15.4 nodes can be very short, significant power can be lost if the transceiver warmup time is long

• Warmup time can be dominated by the settling of transients in the signal path, especially the (integrated active) channel filters

• Wideband techniques, such as Direct Sequence Spread Spectrum (DSSS), have an advantage in that their wide channel filters have inherently short settling times

• With their greater channel spacing, DSSS frequency synthesizers may also employ higher frequency references, reducing lock time

From Callaway @ ACM Sensys 2003

33

Additional Features of 802.15.4 PHY

• Constant-envelope modulation– Use of half-sine shaped O-QPSK simplifies Tx PA design

and reduces active current

• No duplex operation– Reduces peak current

• Rx blocking spec reduced– Allows lower active power consumption of Rx front-end

• Appropriate carrier frequency:– Avoids use of 60GHz ISM band for now due to cost,

power consumption reasons

• Low power output acceptable– Must be “capable” of -3 dBm Pout, but can reduced as

desired in operationFrom Callaway @ ACM Sensys 2003

34

Tx v.s Rx Power Drain

• There is little point to reduce Tx Pout below 0 dBm (1 mW) or so to reduce power consumption– since practical implementations will require ~10 mW fixed

power just to run frequency synthesizers, etc., regardless of power output

• In these low-power systems, Rx active power is often greater than Tx active power– due to the larger number of signal processing circuits that

must be active in receivers

• This can have a significant effect on power consumption strategies– It’s more power-efficient to blindly transmit than to blindly

receive—for the same amount of time

From Callaway @ ACM Sensys 2003

35Radio Irregularities in Sensor Networks

(Zhou et. al. @ MobiSys 2004)

• Close to ground: high path loss (~1/d^4)• Multipath, radio calibration, antenna position: highly

asymmetric and irregular behavior• Two major causes of asymmetry and irregularity:

– Non-isotropic path losses • Caused by reflection, diffraction and scattering during signal

propagation• Different antenna gains along different propagation

directions because of manufacturing issues

– Non-isotropic sending power• Different battery status due to different environment and

usage, sending power could be different from mote to mote• Slight differences in sensor devices can also result in

variable sending power

36

Example: Signal Strength vs. Direction

• One mote periodically transmits beacons while the others receive and measure the power of the received signal at the same time

Setup

• Received signal strength is stable in each direction over time• Signal strength fluctuates as direction varies

37Example: Communication Range vs.

Direction

• Communication range varies as direction varies under fixed receiver sensitivity

38

Example: Varying Hardware Equipment

• Different batteries and different motes give different sending power

Figure 1

Figure 2

• Figure 1– One mote with different

battery status

• Figure 2– Different motes with same

battery status

39

Radio Irregularity Model

• RIM takes interferences, such as energy loss, background noise and multi-signal interferences, into account

• Degree of irregularity (DOI): The maximum received signal strength percentage variation per unit degree change in the direction of propagation

• Traditional Model– Received Signal Strength = Sending Power – Path Loss + Fading

• New Model– Received Signal = VSP Adjusted Sending Power – DOI Adjusted

Path Loss + Fading– VSP Adjusted Sending Power = Sending Power x (1 + Rand x VSP)

• Random Variable based on Normal distribution

– DOI Adjusted Path Loss = Path Loss x Ki

– Ki = Ki-1 ± Rand x DOI for 0 < i < 360 with K0 = 1• Random Variable based on Weibull distribution

40

Impact on MAC Layer

• Hidden Node Problems• Carrier Sensing

– B can reach C but cannot hear A, but A can reach C. When A and B transmit to C at the same time, packets collide

• Handshaking– A sends RTS and B sends CTS in response, but C cannot hear

either. Possible collision when C starts a transmission• However, DOI and VSP has more significant impact on routing

algorithms

Carrier Sensing Handshaking

41

Impact on Routing Algorithms

• Path-Reversal– Routing is based on the assumption that if there is path from A

to B, there is one in the reversed direction– Not true when dealing with asymmetrical links

• Multi-Round Discovery– Similar to path-reversal, but requires the destination to send a

reply to the source in order to establish a connection – Examples - AODV (Ad-hoc On-demand Distance Vector) and

DSR (Dynamic Source Routing)

• Neighborhood Discovery– Nodes discover neighbors by receiving beacon from neighbors– Prone to failure when links are asymmetric– Example - GF (Geographic Forwarding)– GF takes a big hit in case of asymmetric link because of its

greedy forwarding rule which tends to choose a node near the border

42

Why New Protocols for Sensor Networks?

• Not just MANETs with static nodes!• Several issues

– Severe energy and bandwidth constraints– Large scale– Environmental variance– Different traffic patterns in space and time– Latency constraints– Disruptions– Close coupling of processing and networking– Node identity not relevant– Correlation of data sources

43

MAC

44

Medium Access Control

• Wireless channel is a time-shared medium• Radios transmitting in the same frequency band interfere with

each other – collisions – Other time-shared medium examples: Ethernet

• MAC controls when and how each node can transmit in the wireless channel

• Separation in other dimensions too: frequency, code, space• Important attributes:

– Collision avoidance– Energy efficiency– Scalability and adaptivity (size, density, topology, traffic)– Latency– Fairness– Throughput– Bandwidth utilization

45

Sharing the Link

46

Taxonomy of MAC Protocols

• Random-access vs. Scheduled • Time Slotted vs. Non-slotted• Peer-to-peer vs. Master-slave• MAC level retransmission

47

Scheduled vs. Random Access

Scheduled Protocols Contention Protocols

Collisions No Yes

Energy efficiency Good Need improvement

Scalability and adaptivity Bad Good

Multi-hop communication Difficult Easy

Time synchronization Strict Loose or not required

48

Some Examples

• ALOHA– Random, slot-less or slotted, peer-to-peer

• Send when there is data (pure)• Send in next slot when there is data (slotted)

• CSMA– Random, slot-less, peer-to-peer

• Listen before transmit, send if idle, back-off if busy

• 802.11 infrastructure DCF and ad hoc (CSMA/CA)– Random, slot-less, peer-to-peer

• Listen and reserve before transmit, send if idle, back-off if busy

• 802.11 infrastructure PCF– Scheduled (polling), slot-less, master

• Bluetooth piconets– Scheduled (polling), time-slot (with frequency hopping), master

• TinyOS B-MAC– Random, slot-less, peer-to-peer

49

802.11 MAC

50

802.11 DCF

51

802.11 DCF (contd.)

52

802.11 DCF - Fragmentation

53

802.11 PCF

54

802.11 PCF Burst

55

MAC Impact on Sensor Networks

• Major sources of energy waste• Idle listening when no sensing events, Collisions,

Control overhead, Overhearing

0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0 50 100 150 200 250 300

Ave

rage

Dis

sipa

ted

Ene

rgy

(Jou

les/

Nod

e/R

ecei

ved

Eve

nt)

Network Size

DiffusionDiffusion

Omniscient MulticastOmniscient MulticastFloodingFlooding

00.0020.0040.0060.0080.01

0.0120.0140.0160.018

0 50 100 150 200 250 300

Ave

rage

Dis

sipa

ted

Ene

rgy

(Jou

les/

Nod

e/R

ecei

ved

Eve

nt)

Network Size

DiffusionDiffusion

Omniscient MulticastOmniscient Multicast

FloodingFlooding

Over 802.11-like MAC Over energy-aware MAC

56

Identifying the Energy Consumers

• • Idle listening consumes bulk of the energy in sensor networks• Need to shutdown the radio

SENSORS

Power consumption of node subsystems

0

5

10

15

20

Power (mW)

CPU TX RX IDLE SLEEP

RADIO

SLEEPIDLERXTX EEEE >>≈≈

57

Ways to Conserve Energy in MAC

• Low duty cycle to reduce idle listening• Effective collision avoidance• Overhearing avoidance• Reducing control overhead

58

Power Management in 802.11 - Basic Idea

59

Power Management in 802.11 - PCF Mode

60

Power Management in 802.11 - DCF Mode

61

WASN Application Characteristics

Sensor CPU Radio

Sensor Node

Sensor

Processor

Radio Tx

Sample rate determined by signal b/w

Sensor duty cycle period determined by latency and dynamics

# of samples determined by sensor characteristics

Rare EVENT

Periodic tasksTriggered EventsLong LifetimeKey design principles

Sleep: majority of the time (>99%)

Wakeup: quickly start processing

Active: minimize work & return to sleep

62

Sensor-MAC (S-MAC) Design(Wei Ye et al. 2002)

• Tradeoffs

• Major components of S-MAC• Periodic listen and sleep• Collision avoidance• Overhearing avoidance• Message passing

Latency

Fairnes

s

Energy

63

Periodic Listen and Sleep

• Problem: Idle listening consumes significant energy– Nodes do not sleep in IEEE 802.11 ad hoc mode

• Solution: Periodic listen and sleep– Turn off radio when sleeping– Reduce duty cycle to ~10% (200 ms on/2s off)– Increased latency for reduced energy

sleeplisten listen sleep

64

Periodic Listen and Sleep

• Schedules can differ

• Preferable if neighboring nodes have same schedule— easy broadcast & low control overhead

Border nodes: two schedules

broadcast twice

Node 1

Node 2

sleeplisten listen sleep

sleeplisten listen sleep

Schedule 2

Schedule 1

65

Coordinating Periodic Listen and Sleep

• Schedule Synchronization – New node tries to follow an existing schedule

– Remember neighbors’ schedules — to know when to send to them

– Each node broadcasts its schedule every few periods of sleeping and listening

– Re-sync when receiving a schedule update

• Periodic neighbor discovery– Keep awake in a full sync interval over long periods

• Listen split in two parts: for SYNC and for RTS/CTS– Data sent in sleep interval once RTS/CTS established

Receiver

Listen

Sleepfor SYNC for RTS for CTS

66

Adaptive Listening

• Reduce multi-hop latency due to periodic sleep• Wake up for a short period of time at end of each

transmission– Reduces latency by at least half

ListenR ListenON

RTSSender

Receiver CTS

Overhearing nodes (ON)

DATA

ACK

Sleep (based on RTS)

Sleep (based on CTS)

Wakes up even though it is not the correct listen-interval

Not all receiver’s next-hop nodes can hear the transmission, if adaptive

67

Collision Avoidance

• Problem: Multiple senders want to talk• Options: Contention vs. TDMA• Solution: Similar to IEEE 802.11 ad hoc mode (DCF)

– Physical and virtual carrier sense

– Randomized backoff time

– RTS/CTS for hidden terminal problem

– RTS/CTS/DATA/ACK sequence

RTSSender

Receiver CTS

Other Sensors

DATA

ACK

NAV (based on RTS)

NAV (based on CTS)

Contend for medium access

defer access

68

Overhearing Avoidance

• Problem: Receive packets destined to others• Solution: Sleep when neighbors talk

– Basic idea from PAMAS (Singh et. al. @ Mobicom 1998)

– But S-MAC only uses in-channel signaling• Who should sleep?

• All immediate neighbors of sender and receiver

• How long to sleep?• The duration field in each packet informs other nodes the sleep interval

69

Message Passing

• Problem: In-network processing requires entire message• Solution: Don’t interleave different messages

– Long message is fragmented & sent in burst– RTS/CTS reserve medium for entire message– Fragment-level error recovery

— extend Tx time and re-transmit immediately• Other nodes sleep for whole message time

Fairnes

s

Energy

Msg-level

latency

70

Message Passing vs. 802.11 fragmentation

Upfront time reservation by duration field

If ACK is not received, give up Tx — fairness

No indication of entire time — other nodes keep listening

RTS 21 ...

...Data 19

ACK 18CTS 20

Data 17

ACK 16

Data 1

ACK 0

• MP

RTS 3 ...

...Data 3

ACK 2CTS 2

Data 3

ACK 2

Data 1

ACK 0

• 802.11

71

TinyOS/Mote Implementation

• Platform: Mica Motes• Topology: 10-hop linear

network

• S-MAC saves a lot of energy compared with a MAC without sleep

0 2 4 6 8 100

5

10

15

20

25

30

Message inter-arrival period (S)

Energy consumption (J)

10% duty cycle without adaptive listen

No sleep cycles

10% duty cycle with adaptive listen

Energy consumption at different traffic load

72

S-MAC Experimental results(implemented on UCB Mica1 Motes)

• Topology and measured energy consumption on source nodes

Source 1

Source 2

Sink 1

Sink 2

• Each source node sends 10 messages — Each message

has 10 fragments x 40B

• Measure total energy— Data + control

+ idle

0 2 4 6 8 10

200

400

600

800

1000

1200

1400

1600

1800Average energy consumption in the source nodes

Message inter-arrival period (second)

Energy consumption (mJ)

802.11-like protocol Overhearing avoidanceS-MAC

Message Inter-arrival period

Energy consumed

73

T-MAC: Timeout MAC

• Drawback of S-MAC: fixed duty cycle– Active (Listen) interval – long enough to handle to highest expected

load

– If message rate is less – energy is still wasted in idle-listening

– Not optimal!

• T-MAC: Adaptive Duty Cyle– A node is in active mode until no activation event occurs for time TA

• Periodic frame timer event, receive, carrier sense, send-done, knowledge of other transmissions being ended

– Communication ~= S-MAC/802.11

– Frame schedule maintenance ~= S-MAC

Active Active Active

Sleep Sleep

TA TATA

74

B-MAC - Low-power Listen Mode

• S-MAC, T-MAC– Significant overhead in synchronizing nodes

• B-MAC design considerations– Simplicity: based on simple CSMA

– Configurable options

– Minimize idle listening

– Based on model of periodic sensor data transfer

• B-MAC components– CSMA without RTS/CTS

– Optional Low-power listening (LPL)

– Optional ACK

75

Low-power Listen

• Determine channel status by quick sampling– Very low overhead on wake-up

Joe Polastre, et al., SenSys’04

76

Low Duty Cycle with LPL

• Nodes periodically sleep and perform LPL• Nodes do not synchronized on listen time• Sender uses a long preamble before each packet to wake up the

receiver

• Shift most burden to the sender• Every transmission wakes up all neighbors

– Presence of chatty neighbor leads to energy drain in dense networks• Preambles can be really long!

≤Constraint: Preamble length

77

S-MAC vs. B-MAC

S-MAC B-MAC

Collision avoidance CSMA/CA CSMA

ACK Yes Optional

Message passing Yes No

Overhearing avoidance Yes No

Listen period Pre-defined + adaptive listen Pre-defined

Listen interval Long Very short

Schedule synchronization Required Not required

Packet transmission Short preamble Long preamble

Code size 6.3KB 4.4KB (LPL & ACK)

78

Time Uncertainty Problem

• Scenario: A and B need to communicate

• Clocks at A and B can drift arbitrarily

• If sleep-listen schedule of these nodes do not intersect, there will be a packet loss

Packet ready@ Tx

B

A

Rx ready

79

Asynchronous Approaches: BMAC, STEM

• Choose preamble such that Rx guaranteed to wake up during preamble– 1B for every 416 s

• For 29B payload– 11.5% duty cycle 250 bytes of preamble– 2.2% duty cycle 1212 bytes of preamble

Packet ready@ Tx

Payload

Rx ready

Preamble

B

A

A

Multiplepackets

80

Synchronous Approaches: {S,T}-MAC

Time-synchronized duty-cycling of nodes.

Guard Band

Packet ready@ Tx

Payload

Rx ready

Preamble

B

A

Periodic time synchronization

• Overhead of periodic synchronization packets– SMAC uses a period of around 15 seconds

81

Coping with Time Uncertainty

Packet ready@ Tx

B

A

{Can we predict and control the drift

to minimize the energy overhead?

82

Key to Energy is Time!

• The greater the time uncertainty between Tx and Rx at the time of packet transmission, the longer the preamble

– Worst case is asynchronous– E.g. BMAC with 29B payload

• 4B for perfect sync• 250B for 11.5%• 1212B for 2.2%• 1B for every 416us

• Reducing time uncertainty– Stable, high quality clock source

• Size, power, cost issues• Even NIST’s chip-scale atomic clock is 75

mW– Time synchronization

• Require additional message exchange to periodically resync

• This overhead can negate energy benefits of uncertainty reduction

Time Uncertainty

Pre

am

ble

Len

gth

4B

1212B

0 0.1s 0.5s

250B11.5% duty cycle

2.22% duty cycle

83

Challenge: Long Term Time Synchronization

• Conventional schemes quite good for instantaneous synchronization

– Few s on motes with simple linear regression

• But different clock drifts cause them to go out of sync

– Need to resynchronize periodically– E.g. 40 s/s, need to resynchronize every 2.5s for

a 100 s uncertainty bound• Hardware time synch too costly

– E.g. 75 mW for NIST chip-scale atomic clock• Need protocol that predicts drift to achieve desired

precision with minimum energy under changing ambient conditions

System Re-synchronization period

Shooter localization system 1 minute

James reserve 5 minute

Great Duck island 10 minutes

SMAC, MAC Sleep time of 100ms to maximum of 2 minutes

FTSP 30s, 5 minutes

84

Rate Adaptive Time Sync (RATS)• Key ideas:

– Focus on long term time sync as opposed to instantaneous time sync– Achieve desired level of uncertainty– Decide maximum possible resynchronization interval– Adapt to ambient conditions

SampleRepository

ModelEstimation

ErrorPrediction

Sampler

Synchronize a pair of nodes A and B.

(TA , TB) ∑=

=K

k

kAkB TT

0

β

Window (W)

FB

FBp TTE −= ˆ Decide new

beaconing time of A

Error Bound (Emax)

Sampling period (S)

Current state of art

85

Implementation on Motes/TinyOS

• 100 B of RAM, 10KB of ROM

• Floating point library 300B of RAM, 5KB of ROM

86

Performance Comparison

Hardware specs FTSP (Vanderbilt) RATS

Drift Estimate Periodic Resync period

Drift Estimate Periodic Resync Period

Average Resync period

5µs/s 18s 2µs/s 45s 20 – 60 min

For an error bound of 90µs

87Performance Comparison: Against an

Oracle Strategy

Better Energy Performance

All existing synchronization schemes will be points on the oracle strategy curve

Better Error Performance

In no scenario does RATS perform worseEnergy gains ~ 1.1x – 12.5xError gains ~ 1.25x – 13.5x

Sampling Period (minutes)

FaultyRatio (%)

88Uncertainty-driven Duty Cycling MAC

(Ganeriwal et. al. @ SenSys 2005)

• Background– Minimum preamble length 4– Extra bytes added for taking care of time uncertainty.

• Fixed Preamble mode– BMAC chooses to use a preamble of x bytes irrespective of

duty-cycle.– Maximum time uncertainty allowed -> (x-4)*byte time.– RATS objective is to achieve this error bound

• Variable Preamble mode– When transmitting packet BMAC ask RATS to estimate the time

uncertainty between the nodes.– Based on this, the preamble size is chosen on the fly!

RATS + BMAC UBMAC

89

Uncertainty-driven B-MAC for Motes

• 35.5% duty cycle, application level packet every 30s• Asynchronous BMAC uses 94B preamble• UBMAC (BMAC+RATS) set to use 6B and RATS tries to keep error bound within 2B = 832us• 24 hour experiment

– BMAC: 2800 packets with 94B preamble– UBMAC: 2800 packets with 6B preamble + 28 RATS packets– Total energy improvement at Tx: 3X– Similar gains at Rx, as it too is on for shorted duration

• RATS is equivalent to having a stable clock source of < 300 nW

90Packet Loss Performance

(24 hr, 35.5% duty cyle)

Packet loss rates

Outdoors

Indoors First Child Second Child Always-on

2.2% 1.95% 1.92%

First Child Second Child Third Child Always-on

2.45% 3.1% 3.45% 2.95%

91

Energy Gains at Tx

• Energy gain increases with lower duty cycle– Uncertainty-based Functionality remains unchanged– Asynchronous Need to use a longer preamble for the worst-case

Event Period (Minutes)

Rel

ativ

e E

nerg

yG

ains

(R

atio

)

Energy gains with uncertainty based approach can be as much as 60x

Similar gains at Rx

92

What about Chip-scale Atomic Clocks?

• Time uncertainty can also be removed by using stable clock sources such as atomic clocks and GPS

• Unfortunately, their power consumption is too high– Although they are more accurate than needed

• RATS is equivalent to a 300nW stable clock source– By comparison, NIST’s chip-scale atomic clock is 75mW– Most GPSs are far inferior

93

802.15.4 MAC

• Three types devices – Network Coordinator

– Full Function Device (FFD)• Can talk to any device, more computing power

– Reduced Function Device (RFD)• Can only talk to a FFD, simple for energy conservation

• CSMA/CA with optional ACKs on data packets• Optional beacons with superframes• Optional guaranteed time slots (GTS), which supports

contention-free access

94802.15.4 MAC Power Reduction Feature:

Optional Superframe

From Callaway @ ACM Sensys 2003

95

802.15.4 Beaconless Mode

• Asymmetrical channel access mode of asymmetrically powered devices

• E.g. wireless light switch operating a lamp– Lamp can be in near-constant receive mode

– Switch stays in standby until pressed by the user

From Callaway @ ACM Sensys 2003

96

CSMA vs. Polling

• For low offered traffic applications, activity associated with polling can create a lower bound on attainable duty cycle and, therefore, power consumption

• In “conventional” CSMA-CA, most power consumption is due to the receiver, due to the long monitoring periods required to support operation during high offered traffic periods

• IEEE 802.15.4 supports a “Battery Life Extension” (BLE) mode, in which the CSMA-CA backoff exponent is limited to the range 0-2

• This greatly reduces receiver duty cycle in low offered traffic applications

From Callaway @ ACM Sensys 2003

97

802.15.4 BLE Mode

From Callaway @ ACM Sensys 2003

98

Topology Management

99

Adaptive Topology

• Can we do more than shut down radio in between transmissions/receptions?

• Can we put nodes to sleep for longer periods of time?

• Goal: – Exploit high density (over) deployment to extend system

lifetime

– Provide topology that adapts to the application needs

– Self-configuring system that adapts to environment without manual configuration

• Recall: STEM, GAF

100Adaptive Topology: First Cut Problem

Description

• Simple Formulation (Geometric Disk Covering)– Given a distribution of N nodes in a plane.– Place a minimum number of disks of radius r (centered on the

nodes) to cover them.– Disk represents the radio connectivity (simple circle model).

• The problem is NP-hard.• Remember: can’t determine connectivity from locations (or vice versa)

101

Trade-off

• How many nodes to activate? – few active nodes:

• distance between neighboring nodes high -> increase packet loss and higher transmit power and reduced spatial reuse;

• need to maintain sensing coverage (see earlier session on coverage/exposure)

– too many active nodes:• at best, expending unnecessary energy;• at worst nodes may interfere with one another by congesting the

channel.

102

Adaptive Topology Schemes

• Basic Problem: Deciding on

- which nodes turn on- when they turn on, and- at what Tx power

…. So that desired network connectivity is maintained.

• Approaches– Location driven

• E.g. GAF

– Connectivity driven• E.g. ASCENT, SPAN

– Data or traffic driven• E.g. STEM

– Asynchronous• E.g. Zheng et. al. (UIUC)

Energy node density Energy latency Energy Tx power

103Location Driven: Geographic Adaptive

Fidelity (GAF) for Energy Density

• Conserve traffic forwarding capacity

• Divide network in virtual grids of size r <= radio_range/sqrt(5)

• Each node in a grid is equivalent from a traffic forwarding perspective

• Keep 1 node awake in each grid at each time

104Connectivity Driven: ASCENT

Energy Density

• The nodes can be in active or passive state.

– Active nodes are part of the topology (or stay awake) and forward data packets (using an orthogonal routing mechanism).

– Nodes in passive state can be sleeping or collecting network measurements. They do not forward any packets.

• Each node measures the number of neighbors and packet loss locally.

• Each node then makes an informed decision to join the network topology or to sleep by turning its radio off.

Test

Passive Sleep

Active

after Tt

after Tp

after Ts

neighbors < NTand• loss > LT• loss < LT & help

neighbors > NT (high ID for ties); orloss > loss T0

NT: neighbor threshold

LT: loss threshold

T?: state timer values (p: passive, s: sleep, t: test)

105Data Driven: STEM Energy Latency

• Nodes put to sleep instead of idle or Rx– Since Rx or idle power ~ Tx power

• Question: how do we wake up a sleeping node?– Low-power Listen!

Sensor-triggered node wakeupWake up the nodes along the path

event

sensor network

user

Zzz

Path nodes need to be woken up

Zzz ZzzZzz

106

How can a Sleeping Node be reached?

Listenf2

Sleep Active

Sleep

time

time

f1

Active mode

Polling mode

Sleep mode

Interference

A B

C

D

• Approach: Each node wakes up occasionally to listen for wake up• Problem: Wake up messages can collide with ongoing data Tx• Solution: Use separate channel (time or frequency) for wake up

Wakeup plane: f1

Data plane: f2

zzzzzzz

107

TxPow

erP

ower

Time

f1

f2Tx /RxSleep

Initiator node

Sleep

Rx

Pow

erP

ower

Time

f1

f2Tx /RxSleep

Target node

STEM: Sparse Topology & Energy Management

108

STEM: Sparse Topology & Energy Management

f1

f1

Target node

Initiator node

Train of beacon packetsTRx

B1B2 1. beacon received

2. beacon acknowledge

109

STEM Performance Analysis

• Setup latency

• Energy savings

232

RxS

TTT

+≈

T

T

E

E Rx≈0

Appropriate choice of interval sizes

Mostly monitoring state: << 1

f1

f2

Wakeup plane

Data plane

Fraction of time in the forwarding state:

Forwarding state Monitoring state

110

0E

E 5.0=

1.0=

01.0=

001.0=

T (s)

STEM-B

Energy versus period for STEM-B

0E

E 5.0=

1.0=

01.0=

001.0=

T (s)

STEM-T

Energy versus period for STEM-T

STEM-T

STEM-B(no

collisions)

T (s)

ST STEM-B(collisions)

Average setup latency per hop versus Wake up period

Energy-Latency Trade-off

Can extend STEM to exploit Latency AND Density

111

Exploiting Density

• Conserve traffic forwarding capacity

• Divide network in virtual grids

• Each node in a grid is equivalent from a traffic forwarding perspective

• Keep 1 node awake in each grid at each time

GAF: Geographic Adaptive Fidelity [Xu2001]

M’ M 1.0 0 0

1.5 0.87 13.7

2.0 1.59 25.0

2.5 2.22 35.0

3.0 2.82 44.3

• GAF reduces the energy by a factor M’

• This factor is a function of the average number of nodes in a grid: M

Me

MM −−

=′1

Average num

ber of neighbors of a nodefor uniformly random

node deployment

112

GAF Energy Savings

1

0

⎥⎦

⎤⎢⎣

⎡EE

ππ

5

1

0 1

1

5 −

⋅≤⎥⎦

⎤⎢⎣

eE

E

2RA

N

field

π ⋅=

Uniformly random node distribution

x

P(#neighbors = x)

= 10

113

STEM vs. GAF

Rx

S

T

T

STEM

GAF

Leverage latency

Leverage density

Curve of comparable energy savings

114Combined Data and Location/Connectivity

Driven: STEM+GAF

• As in GAF, 1 node is active in each grid

the grid can be considered a virtual node

• Observe: In GAF, the leader has to keep its radio on all the time

• Absence of traffic in the monitoring state not exploited

• This virtual node runs the STEM protocol

• Requires changes in leader election scheme

0E

E

= 4 = 6 = 8

= 92

GAF

STEM-T + GAF

5=GAFT hours

STEM-B/T + GAF

Relative energy saving versus density for TGAF = 5

hours

115Asynchronous Approach for

Energy Latency

• Nodes follow an a listen/sleep cycle

• Problem:– Each node follows a listen/sleep schedule of T slots

– Objective: Minimize ku, kv (energy minimization)– Given: T = schedule duration– Constraint: m = number overlapping slots (delay constraint)– Symmetric design (ku=kv)– Asymmetric design ((kukv)

Sleep time Energy BUT Neighbor Discovery Latency

0 T-1node U

node V

ku=4

activeslots

kv=3

116

Solutions

• Symmetric Design– Every node chooses the same number of active slots AND circular shifts of the same

schedule:

• Asymmetric design– The asynchronous wakeup schedules should be generated every time there is a

topology change inefficient (depends on the topology)– Could be used for heterogeneous networks (powerful/constrained nodes)

124

235

346

457

561

672

713

slot 1 2 3 4 5 6 7

Examples of schedules:(T, k, m)=(7,3,1) (T, k, m)=(73,9,1)

T: schedule lengthk: active slotsm: overlap slots

Tmk ⋅≥

Necessary condition: TmkK ⋅≥⋅

Necessary condition:

117

Implementation Issues

• Slot alignment needs time-sync and slots may shift• Introduce a protocol that allows a node to:

– Discover the state of the neighbor nodes (listen/sleep)– Keep track of the neighbor schedules so that a link can be formed

• Nodes learn other nodes’ schedules and transmit only when recipient is active

Frame structure

I

T

Node U

Node V

V can hear U’s beaconU can hear V’s beacon

Slot duration

Schedule duration

118Power Management with Asynchronous

Wakeup

• Problem: If nodes use the listen periods for packet transmissions then bandwidth is reduced

• Solutions:

– Slot-based power management • Slot-by-slot link reservation when buffer exceeds threshold

– On-demand power management• PS Mode -> Active : communication events• Active -> PS mode : soft state timers

awake sleep Tx/Rx idle

Power Management Policy

PS Mode Active Mode

Wakeup Schedule

119

Higher layers in the next lecture…

Recommended