mac layer design

Upload: ijaved88

Post on 10-Apr-2018

229 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Mac Layer Design

    1/31

    1

    MAC Layer Design for Wireless

    Sensor Networks

    Wei Ye

    USC Information Sciences Institute

  • 8/8/2019 Mac Layer Design

    2/31

    2

    Introduction

    Wireless sensor network Large number of densely distributed nodes

    Battery powered

    Multi-hop ad hoc wireless network Node positions and topology dynamically

    change

    Self-organization

    Sensor-net applications Nodes cooperate for a common task

    In-network data processing

  • 8/8/2019 Mac Layer Design

    3/31

    3

    Introduction

    Important attributes of MAC protocols Collision avoidance

    Basic task medium access control

    Energy efficiency Scalability and adaptivity

    Number of nodes changes overtime

    Latency

    Fairness

    Throughput

    Bandwidth utilization

  • 8/8/2019 Mac Layer Design

    4/31

    4

    Contention-based protocols CSMA Carrier Sense Multiple Access

    Ethernet

    Not enough for wireless (collision at receiver)

    MACA Multiple Access w/ Collision Avoidance

    RTS/CTS for hidden terminal problem

    RTS/CTS/DATA

    Overview of MAC protocols

    A B C

    Hidden terminal: A is hidden from Cs CS

  • 8/8/2019 Mac Layer Design

    5/31

    5

    Overview of MAC Protocols

    Contention-based protocols (contd.) MACAW improved over MACA

    RTS/CTS/DATA/ACK

    Fast error recovery at link layer

    IEEE 802.11 Distributed Coordination Function

    Largely based on MACAW

    Protocols from voice communication area

    TDMA low duty cycle, energy efficient

    FDMA each channel has different frequency

    CDMA frequency hopping or direct sequence

  • 8/8/2019 Mac Layer Design

    6/31

    6

    Example: IEEE 802.11 DCF

    Distributed coordinate function: ad hoc mode Virtual and physical carrier sense (CS)

    Network allocation vector (NAV), duration field

    Binary exponential backoff

    RTS/CTS/DATA/ACK for unicast packets Broadcast packets are directly sent after CS

    Fragmentation support

    RTS/CTS reserve time for first (frag + ACK)

    First (frag + ACK) reserve time for second

    Give up tx when error happens

  • 8/8/2019 Mac Layer Design

    7/31

    7

    Example: IEEE 802.11 DCF

    Timing relationship

  • 8/8/2019 Mac Layer Design

    8/31

    8

    Energy Efficiency in MAC Design

    Energy is primary concern in sensornetworks

    What causes energy waste?

    Collisions Control packet overhead

    Overhearing unnecessary traffic

    Long idle time

    bursty traffic in sensor-net apps

    Idle listening consumes 50100% of thepower for receiving (Stemm97, Kasten)

    Dominant in sensor nets

  • 8/8/2019 Mac Layer Design

    9/31

    9

    Energy Efficiency in MAC Design

    TDMA vs. contention-based protocols TDMA can easily avoid or reduce energy waste

    from all above sources

    Contention protocols needs to work hard in alldirections

    TDMA has limited scalability and adaptivity

    Hard to dynamically change frame size or slotassignment when new nodes join

    Restrict direct communication within a cluster

    Contention protocols easily accommodate nodechanges and support multi-hop communications

  • 8/8/2019 Mac Layer Design

    10/31

    10

    TDMA Protocols

    Bluetooth Clustering (piconet)

    FH-CDMA between clusters

    TDMA within each clusterCentralized control by cluster head

    Only master-slave communication

    Master polling slave and schedule tx

    At most 8 active nodes can be in a cluster scalability problem

  • 8/8/2019 Mac Layer Design

    11/31

    11

    TDMA Protocols

    LEACH: Low-Energy Adaptive ClusteringHierarchy by Heinzelman, et al.

    Similar to Bluetooth

    CDMA between clusters

    TDMA within each cluster

    Static TDMA frame

    Cluster head rotation

    Node only talks to cluster headOnly cluster head talks to base station (long

    dist.)

    The same scalability problem

  • 8/8/2019 Mac Layer Design

    12/31

  • 8/8/2019 Mac Layer Design

    13/31

    13

    TDMA Protocols

    Self-Organaiztion (Contd.) Result (if a node has n neighbors)

    Uses n different channels to talk to each ofthem

    Schedules n time slots to send to each of themand n time slots to receive from each of them

    Looks like TDMA, but actually FDMA or CDMA

    Any pair of two nodes can talk at the same time

    Low bandwidth utilization

  • 8/8/2019 Mac Layer Design

    14/31

    14

    Contention-Based Protocols

    PAMAS: Power Aware Multi-Access withSignalling by Singh and Raghavendra

    Improve energy efficiency from MACA

    Avoid overhearing by putting node into sleep

    Control channel separates from data channelRTS, CTS, busy tone to avoid collision

    Probe packets to find neighbors transmission time

    Increased hardware complexity

    Two channels need to work simultaneously, meaningtwo radio systems.

  • 8/8/2019 Mac Layer Design

    15/31

    15

    Contention-Based Protocols

    Piconet by Bennett, Clarke, et al. Low duty-cycle operation energy efficientSleep for 30s, beacon, and listen for a while

    Sending node needs to listen for receivers

    beacon first, thenCarrier sense before sending data

    May wait for long time before sending

    Tx rate control by Woo and Culler

    Carrier sense + adaptive rate control Promote fair bandwidth allocation

    Helps for congestion avoidance

  • 8/8/2019 Mac Layer Design

    16/31

    16

    Contention-Based Protocols

    Power save (PS) mode in IEEE 802.11 DCF Assumption: all nodes are synchronized and can hear each other

    (single hop)

    Nodes in PS mode periodically listen for beacons & ATIMs (ad hoctraffic indication messages)

    Beacon: timing and physical layer parameters

    All nodes participate in periodic beacon generation

    ATIM: tell nodes in PS mode to stay awake for Rx

    ATIM follows a beacon sent/received

    Unicast ATIM needs acknowledgement

    Broadcast ATIM wakes up all nodes no ACK

  • 8/8/2019 Mac Layer Design

    17/31

    17

    Contention-Based Protocols

    Example of PS mode in IEEE 802.11DCF

  • 8/8/2019 Mac Layer Design

    18/31

    18

    Energy Efficiency: Contention

    Extend 802.11 PS mode for Multi-hops By Tseng, et al. at IEEE Infocom 2002 Nodes do not synchronize with each other

    Designed 3 sleep patterns ensure nodes

    listen intervals overlap, example:Periodically fully-awake interval: similar to S-MAC

    Problem on broadcast wake up each neighbor

  • 8/8/2019 Mac Layer Design

    19/31

    19

    S-MAC: Introduction

    S-MAC by Ye, Heidemann and EstrinTradeoffs

    Major components in S-MAC

    Periodic listen and sleep

    Collision avoidance Overhearing avoidance

    Massage passing

    Latency

    FairnessEnergy

  • 8/8/2019 Mac Layer Design

    20/31

    20

    Periodic Listen and Sleep

    Problem: Idle listening consumessignificant energy

    Solution: Periodic listen and sleep

    Turn off radio when sleeping

    Reduce duty cycle to ~ 10% (150mson/1.5s off)

    sleeplisten listen sleep

    Latency Energy

  • 8/8/2019 Mac Layer Design

    21/31

    21

    Periodic Listen and Sleep

    Schedules can differ

    Preferneighboring nodes have sameschedule

    easy broadcast & low control overheadBorder nodes:

    two schedulesbroadcast twice

    Node 1

    Node 2

    sleeplisten listen sleep

    sleeplisten listensleep

    Schedule 2

    Schedule 1

  • 8/8/2019 Mac Layer Design

    22/31

    22

    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 fewperiods of sleeping and listening

    Re-sync when receiving a schedule update

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

    periods

  • 8/8/2019 Mac Layer Design

    23/31

    23

    Collision Avoidance

    Problem: Multiple senders want to talkOptions: 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

  • 8/8/2019 Mac Layer Design

    24/31

    24

    Overhearing Avoidance

    Problem: Receive packets destined to othersSolution: Sleep when neighbors talk

    Basic idea from PAMAS (Singh, Raghavendra 1998)

    But we only use in-channel signaling

    Who should sleep?

    All immediate neighbors of sender andreceiver

    How long to sleep?

    The duration field in each packet informsother nodes the sleep interval

  • 8/8/2019 Mac Layer Design

    25/31

    25

    Message Passing

    Problem: Sensor net in-network processing requires entiremessage

    Solution: Dont interleave different messages

    Long message is fragmented & sent in burst

    RTS/CTS reserve medium for entire message

    Fragment-level error recovery ACK

    extend Tx time and re-transmit immediately

    Other nodes sleep for whole message time

    Fairness Energy

    Msg-level latency

  • 8/8/2019 Mac Layer Design

    26/31

    26

    Msg Passing vs. 802.11 fragmentation

    S-MAC message passing

    RTS 21 ...

    ...

    Data 19

    ACK 18CTS 20

    Data 17

    ACK 16

    Data 1

    ACK 0

    RTS 3 ...

    ...

    Data 3

    ACK 2CTS 2

    Data 3

    ACK 2

    Data 1

    ACK 0

    Fragmentation in IEEE 802.11 No indication of entire time other nodes keep

    listening

    If ACK is not received, give up Tx fairness

  • 8/8/2019 Mac Layer Design

    27/31

  • 8/8/2019 Mac Layer Design

    28/31

    28

    Experiments: two-hop network

    Topology and measured energyconsumption on source nodes

    Source 1

    Source 2

    Sink 1

    Sink 2

    Each source nodesends 10 messages

    Each message has400B in 10 fragments

    Measure total energyover time to send allmessages

    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)

    En

    ergyco

    nsumption

    (mJ

    )

    802.11-like protocol w/o sleepOverhearing avoidanceS-MAC

  • 8/8/2019 Mac Layer Design

    29/31

    29

    Recent Progress: Adaptive Listen

    Reduces latency due to periodic sleepAt end of each transmission, nodes wake

    up for a short time

    Next transmission can start right away

    Example: data flow A BC

    A sends RTS, B replies CTS, C overhears CTS C will wake up when A B is done BC can start right away

    A B C

  • 8/8/2019 Mac Layer Design

    30/31

    30

    Recent Progress: 10-hop Experiments

    Compare S-MAC in 3 different modes10-hop linear network with 11 nodes

    0 2 4 6 8 100

    5

    10

    15

    20

    25

    30

    Energy consumption on radios in the entire network

    Message inter-arrival period (S)

    Energyconsumption(J)

    10% duty cycle without adaptive listen10% duty cycle with adaptive listenNo periodic sleep

    0 2 4 6 8 100

    2

    4

    6

    8

    10

    12

    Average message latency under the lowest traffic load

    Number of hops

    Latency(S)

    10% duty cycle without adaptive listen10% duty cycle with adaptive listenNo periodic sleep

  • 8/8/2019 Mac Layer Design

    31/31

    31

    S-MAC Information

    URL: http://www.isi.edu/scadds/Released S-MAC source code (forTinyOS 0.6.1)

    Currently porting to nesC environment(TinyOS 1.0)