+ All Categories
Home > Documents > Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

Date post: 22-Dec-2015
Category:
View: 215 times
Download: 0 times
Share this document with a friend
Popular Tags:
30
Joe Polastre <[email protected]> B-MAC Factored MAC protocol exposing control of sub-primitives
Transcript
Page 1: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

Joe Polastre<[email protected]>

B-MACFactored MAC protocol exposing control of sub-primitives

Page 2: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

2

Outline

Factored MAC protocol design Information sharing with higher layersControl and reconfiguration of link protocolTradeoffs in link protocols

Feedback mechanism Link Abstraction for Sensor Networks

Page 3: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

3

B-MAC Design

Principles Reconfigurable MAC

protocol Flexible control Hooks for sub-primitives

Backoff/Timeouts Duty Cycle Acknowledgements

Feedback to higher protocols

Minimal implementation Minimal state

Primary Goals Low Power Operation Effective Collision Avoidance Simple/Predicable Operation Small Code Size Tolerant to Changing

RF/Networking Conditions Scalable to Large Number of

Nodes Our implementation is on

Mica2 motes with CC1000

Page 4: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

4

B-MAC Link Protocol Interaction

Reconfiguration and control of link layer protocol parameters Acknowledgements, Backoff/Timeouts, Power Management,

Hidden Terminal Management Ability to choose tradeoffs – “knobs”

Fairness, Latency, Energy Consumption, Reliability Power consumption estimation through analytical and

empirical models Feedback to network protocols Lifetime estimation

Mechanisms to achieve network protocols’ goals

Page 5: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

5

S-MACYe, Heidemann, and Estrin, INFOCOM 2002 Traditional monolithic protocol

design Synchronized protocol with

periodic listen periods “Black Box” design

Designed for a general set of workloads

User sets radio duty cycle SMAC takes care of the rest so

you don’t have to Integrates higher layer

functionality into link protocol

T-MAC [van Dam and Langendoen, Sensys 2003] Reduces power consumption by

returning to sleep if no traffic is detected at the beginning of a listen period

Schedule 2Schedule 1

Wei Ye, USC/ISI

Node 1

Node 2

sleeplisten listen sleep

sleeplisten listen sleep

sync

sync

sync

sync

Page 6: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

6

Low Power Listening (LPL) Higher level communication scheduling

Energy Cost = RX + TX + Listen Start by minimizing the listen cost

Example of a typical low level protocol mechanism

Periodically wake up, sample channel, sleep

Properties Wakeup time fixed “Check Time” between wakeups variable Preamble length matches wakeup interval

Overhear all data packets in cell Duty cycle depends on number of

neighbors and cell traffic

RX

wak

eu

p

wak

eu

pw

ake

up

wak

eu

p

wak

eu

p

wak

eu

p

wak

eu

p

wak

eu

p

wak

eu

p

TX

sleep sleep sleep

sleepsleepsleep

Node 2

Node 1time

time

Page 7: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

7

0 50 100 150 2000

0.5

1

1.5

2

2.5

3

3.5

4Effect of sample period on node duty cycle

Check Time (ms)

Lif

etim

e (y

ears

)

1-min sample period5-min sample period10-min sample period20-min sample period

Effect of LPL Check Interval

Single hop data reporting application

Higher sampling rate Higher traffic in a cell Higher duty cycle

Optimize the check time to the traffic Application knows

sample rate (packet generation rate)

Page 8: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

8

Effect of Neighborhood Size Neighborhood Size affects amount of

traffic in a cell Network protocols typically keep track

of neighborhood size Bigger Neighborhood More traffic

0 20 40 60 80 1000

20

40

60

80

100

120

140

160

180

200

Neighborhood size

Ch

an

ne

l A

cti

vity

Ch

ec

k I

nte

rva

l (m

s)

Expected Lifetime Contour

0.25

0.5

0.75

11.25

1.522.5

0 20 40 60 80 1000

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.1

Number of neighboring nodes

Eff

ec

tiv

e d

uty

cy

cle

(%

)

200ms check interval100ms check interval50ms check interval25ms check interval10ms check interval

Effect of neighborhood size on node duty cycle

Page 9: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

9

Factored vs Layered Protocols Experimental Setup:

n nodes send as quickly as possible to saturate the channel

Factored link layer never worse than traditional approach

Often much better Flexible configuration yields

efficient: Reliable transport (Acks) Hidden Terminal support

(RTS-CTS)

0 5 10 15 200

2000

4000

6000

8000

10000

12000

14000

16000

0 5 10 15 200

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Throughput of a congested channel

Number of nodes

Pe

rce

nta

ge

of

Ch

an

ne

l C

ap

ac

ity

B-MACB-MAC w/ ACKB-MAC w/ RTS-CTSS-MAC unicastS-MAC broadcastChannel Capacity

Th

rou

gh

pu

t (b

ps

)

Protocol ROM RAM

B-MAC 3046 166

B-MAC w/ ACK 3340 168

B-MAC w/ Duty Cycling 4092 170

B-MAC w/ DC & ACK 4386 172

S-MAC 6274 516

7

8

9

10

1

6

5

4

3

2

0

7

8

9

10

1

6

5

4

3

2

0

topology

Page 10: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

10

Fragmentation SupportFactored vs Layered Protocol

S-MAC RTS-CTS Fragmentation Support

B-MAC Network protocol sends initial data packet

with number of fragments pending Disable backoff & LPL for rest of fragments

Measure energy consumption at C(bottleneck node)

Minimizing power relieson controlling link layer primitives

0 50 100 150 200 2500

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

Fragment size (bytes)

En

erg

y p

er

by

te (

mJ

/by

te)

Mean energy consumption per byte (100 second sample period)

B-MAC w/ no app controlB-MAC w/ app controlS-MACT-MAC (simulated)Optimal Schedule

0 50 100 150 200 2500

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

Fragment size (bytes)

En

erg

y p

er

by

te (

mJ

/by

te)

Mean energy consumption per byte (10 second sample period)

B-MAC w/ no app controlB-MAC w/ app controlS-MACT-MAC (simulated)Optimal Schedule

A

B

C

E

D

Sometimes the black boxis worse than the naïve approach

Page 11: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

11

0 2000 4000 6000 8000 100000

50

100

150

200

250

300

350

400

450

500

550

Latency (ms)

En

erg

y (m

J)

Effect of latency on mean energy consumption

B-MACS-MACAlways On

Tradeoffs: Latency for EnergyFactored vs Traditional Protocol

Assume a multihop packet is generated every 10 sec No queuing delay

allowed

Delay the packet S-MAC sleeps longer

between listen period B-MAC increases the

check interval and preamble length

S-MAC Default Configuration

B-MAC Default Configuration

11 10 9 3 2 111 10 9 3 2 1

Page 12: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

12

Tradeoffs: Throughput for EnergyFactored vs Layered Protocol

10 node single hop network Increase transmission rate Deliver each packet within

10 sec Measure average power

consumption per node As throughput increases

B-MAC reduces check interval as traffic increases

S-MAC uses optimal duty cycle

Protocol overhead causes energy to increase linearly

0 50 100 150 200 2500

5

10

15

20

25

30

35

40

45

50

Throughput (bits/second)

Po

wer

co

nsu

med

(m

W =

mJ/

seco

nd

)

Effect of constant throughput on power consumption

B-MACS-MACAlways On

7

8

9

10

1

6

5

4

3

2

7

8

9

10

1

6

5

4

3

2

topology

Page 13: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

13

Surge Application Run B-MAC in a real world application

8 days/40000 data readings in deployment

Surge Multihop Data Collection includes: Data reporting every 3 minutes B-MAC check:sleep ratio: 1:100 Jason Hill’s ReliableRoute

Reliability improvements to MintRoute Turn on link layer acks in B-MAC Add retransmissions

Power metering in the link protocol

Simple routing protocol optimization Turn off long preambles when sending to the

base station (one hop away) Base station always on

Network configuration images from Jason Hill

Page 14: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

14

Surge ApplicationNetwork power consumption of a factored link protocol

Duty cycle dependant on position in network

Leaf nodes have least amount of traffic Middle nodes forward leaf node traffic Nodes 1 hop from base station benefit

from reconfiguration

2.35% worst case node duty cycle

0 0.5 1 1.5 2 2.5 3 3.5

x 104

0

0.5

1

1.5

2

2.5

3

Number of packets forwarded or sent

Du

ty C

yc

le (

%)

Effect of number of transmissions on duty cycle

0 1 2 3 4 50

0.5

1

1.5

2

2.5

3Effect of node depth on duty cycle

Number of hops

Du

ty C

ycle

(%

)

Average Duty Cycle

Leaf Nodes

1 hop frombase station

• Forwarded ~35,000 (85%) packets• Duty cycle 75% higher without optimization

Forwarded <10,000 packets

Page 15: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

15

Tradeoffs: Latency vs ReliabilitySurge Application

Reliability 98.5% of all packets delivered Some nodes achieved an

astounding 100% delivery …but communication links are

volatile Retransmissions required After n retries, give up and

pick a new parent Actual latency

Follows expected latency from microbenchmark

Retransmission delay Contention delay (infrequent)

0 1 2 3 4 5 60

100

200

300

400

500

600

700

800

900

1000

1100

Number of hops

Lat

ency

(m

s)

Latency of B-MAC in a monitoring application

B-MAC Average Latency Std DevB-MAC Average LatencyB-MAC Minimum Expected Latency

Page 16: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

16

Lifetime Model

B-MAC Analytical Model Worst case analysis Calculate

Optimum LPL parameters Preamble length

Evaluate Neighborhood size Sample rate

Minimize Power consumption

Verify Experimental operation

matches analytical calculations

Runtime Feedback mechanism

Effect of turning knobs ti: LPL check interval r: Sample rate (packet

generation rate) Knowledge from network

protocols n: Neighborhood size

Determine t: Fraction of each second

spent on each operation E: Energy consumed by each

operation per second

Page 17: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

17

Lifetime Model

Transmit

Receive

VctE

tLLrt

txbtxtx

txbpacketpreambletx

)(

VctE

tLLnrt

rxbrxrx

rxbpacketpreamblerx

)(

sleeplistentxrx EEEEE )min( Notation Parameter

r Sample Rate (packets/sec)

n Neighborhood size

Lpreamble Preamble length (bytes)

Lpacket Packet length (bytes)

csleep Current : Sleep (mA)

crxb Current : Rx one byte

ctxb Current : Tx one byte

Cbatt Capacity : Battery (mAh)

V Voltage

ti Time : Radio sampling interval (s)

tstartup Time : Radio startup

trxb Time : Rx one byte

trx Time : Rx per second

ttxb Time : Tx one byte

ttx Time : Tx per second

tl Time : Lifetime (s)

Page 18: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

18

Lifetime Model

LPL Sampling

Sleep

sleepsleepsleep

listentxrxsleep

istartuplisten

ctE

tttt

ttt

1

1i

samplelisten

sample

tEE

JE

1

3.17

Notation Parameter

r Sample Rate (packets/sec)

n Neighborhood size

Lpreamble Preamble length (bytes)

Lpacket Packet length (bytes)

csleep Current : Sleep (mA)

crxb Current : Rx one byte

ctxb Current : Tx one byte

Cbatt Capacity : Battery (mAh)

V Voltage

ti Time : Radio sampling interval (s)

tstartup Time : Radio startup

trxb Time : Rx one byte

trx Time : Rx per second

ttxb Time : Tx one byte

ttx Time : Tx per second

tl Time : Lifetime (s)

sleeplistentxrx EEEEE )min(

Page 19: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

19

Lifetime Model

The total energy, E, can be used to calculate the expected lifetime of the system

6060

E

VCt battl

Notation Parameter

r Sample Rate (packets/sec)

n Neighborhood size

Lpreamble Preamble length (bytes)

Lpacket Packet length (bytes)

csleep Current : Sleep (mA)

crxb Current : Rx one byte

ctxb Current : Tx one byte

Cbatt Capacity : Battery (mAh)

V Voltage

ti Time : Radio sampling interval (s)

tstartup Time : Radio startup

trxb Time : Rx one byte

trx Time : Rx per second

ttxb Time : Tx one byte

ttx Time : Tx per second

tl Time : Lifetime (s)

sleeplistentxrx EEEEE )min(

Page 20: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

20

Link Abstraction inWireless Sensor Networks

What have we learned from factored protocols? Integration of routing and organization protocols with link

protocols not necessary Why do current WSN protocols integrate?

IP Nets: Transport protocols set fragmenting, addressing type of

service, retransmission etc WSNs: Network protocols setting these parameters

Each hop has lots of volatility – keep state at every hop Local per-link decisions to save power

IP model forces policy and mechanism to be integrated Negates nice properties of IP abstraction:

No protocol interchangeability, inefficient large implementations A new abstraction must describe what the system is

doing at each link Dynamically change link protocol mechanism Meeting point between link and routing layers Separates link mechanisms from routing/network

policies

AggregationRoutingServices“policy”

Link Abstraction

MAC ProtocolsPhysical Layers

“mechanism”

Physical Medium

Applications

Page 21: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

21

Link Abstraction B-MAC shows the need for bidirectional

information flow with network protocols Exposing control is critical for long lived operation Enable link protocol interchangeability

underneath optimized network protocols (routing, aggregation, organization, etc)

Smallest, most powerful primitives to execute higher level protocols efficiently

Proposed abstraction includes 3 things: Control of link layer protocol parameters Ability to choose tradeoffs – “knobs” Power consumption feedback model

Next steps: An RFC describing the abstraction in detail

(this summer) Implementation and use of abstraction in TinyOS

with B-MAC/802.15.4

AggregationRoutingServices“policy”

Link Abstraction

MAC ProtocolsPhysical Layers

“mechanism”

Physical Medium

Applications

Page 22: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

22

Conclusions

Coordination with higher protocols is essential for long lived operation

Feedback allows protocols to make informed decisions

Monolithic protocols can benefit from factoring—but reconfiguration may prove costly

Traditional abstraction at the network layer doesn’t fit sensor networks—need a new abstraction at the link layer

Page 23: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

Backup Slides

Page 24: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

24

WooMACWoo and Culler, Mobicom 2001

Move protocol knowledge into the MAC implementation

ARC Protocol Change the rate of originating

traffic Allows route-through traffic to

reach its destination Tradeoff everything else for

fairness (very effective) Adaptive Backoff

Change CSMA backoff depending on type of traffic

Broadcast Multihop

Page 25: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

25

UNPFDing, Silvalingam, Kashyapa, and Chuan, Vehicular Technology Conference, 2003

Unified Network Protocol Framework (UNPF) Network organization protocol, Medium access control (MAC)

protocol, and Routing protocol.

Integrated network and link layers Write new UNPF implementations

for each application-or-

Trust the larger “black box”

Routing Organization

Link Protocol

Application

PHY

AbstractionUNPFRouting, Organization, and MAC

Page 26: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

26

Other “Black Box” Protocols Energy-Aware TDMA-Based MAC

Arisha, Youssef, Younis, IMPACCT 2002 Gateway node centrally manages sensor network clusters integrate organization protocol

TRAMA: Collision Free Protocol Rajendran, Obraczka, Garcia-Luna-Aceves, SenSys 2003 Keep track of 2-hop neighbors, schedule traffic, eliminate collisions Adaptively change schedule as “inter-arrival” message time changes integrate organization protocol, assume traffic pattern

Sift: Event Driven MAC Protocol Jamieson, Balakrishnan, Tay, MIT TR 2003 Small and fixed contention window to save energy Probabilistically pick an empty slot

Moral: encourage protocol designers to expose configuration and tradeoffs (Sift even has a power consumption model)

Page 27: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

27

Tradeoffs: Latency vs ReliabilityFactored vs Traditional Protocol

Additional protocol overhead adds latency Choose applicable overhead ACK RTS-CTS (S-MAC) Synchronization

B-MAC If multihop packet

Wait >= 2 packet times to send next message

Implicit reservation and hidden terminal support

S-MAC Reserves channel at each hop 1 2 3 4 5 6 7 8 9 10

0

500

1000

1500

2000

2500

3000Mean message latency from each hop to the sink

Number of Hops

La

ten

cy (

ms

)

B-MAC no sleepB-MAC 100ms checkB-MAC 100ms check /w ACKS-MAC no sleepS-MAC 10% adaptive

11 10 9 3 2 1

Page 28: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

28

Duty Cycle Calculation Check time is 2.5ms If check interval is 250ms,

duty cycle is 1% right? Wrong! Duty cycle is amortized

cost of waking up energy consumption to sleep energy consumption

Breakdown: Full power (e)

250ms Half power (b,d,f)

600ms Low power (c)

1500ms Equivalent to being at full

power for 800ms

Page 29: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

29

IEEE 802.2“Logical Link Control”IEEE Standard, 1998

Data transfer interface Establishes connections “Control” path ends at 802.2

Doesn’t pass down to underlying link protocols

Doesn’t expose underlying capabilities of 802.3, 802.11, etc

Instance specific code above 802.2

Linux 2.6.6 implementation Used as a programming interface,

not an abstraction Heavyweight: 9008 lines of

source, 28kB compiled Not an effective abstraction and

not flexible

802.3

802.11

802.15

802.16

802.1 Bridging / Convergence

802.2 Logical Link Control

ServiceProvider

(802.2 LLC)

Request

Indication

Response

Confirm

ServiceUser

ServiceUser

Page 30: Joe Polastre B-MAC Factored MAC protocol exposing control of sub-primitives.

30

IEEE 802.15.4“Low Rate Wireless Personal Area Networks”IEEE Standard, 2003

Designed for low power, low data, high density rate wireless networks

Services may interface with either 802.2 or directly with the MAC protocol

802.15.4 has lots of extra functionality that may never be used: Enable the development of a

“lightweight 802.15.4 MAC” Use 15.4 hardware without

using the 15.4 MAC protocol (eg: B-MAC, S-MAC, etc)

802.2

802.1

802.15.4 MAC

802.15.4 PHY

“Upper Layers”

“Upper Layers”

WSN Data Link Layer Abstraction

Other MAC

802.15.4 PHY

x


Recommended