mac wireless sensor networks

Upload: ranjith-kumar

Post on 07-Apr-2018

220 views

Category:

Documents


1 download

TRANSCRIPT

  • 8/4/2019 MAC Wireless Sensor Networks

    1/37

    Wireless Sensor Networks

  • 8/4/2019 MAC Wireless Sensor Networks

    2/37

    Wireless Sensor Networks:

    A wireless sensor network is a collection of nodes organized into

    a cooperative network.

    Each node consists of processing capability (one or more

    microcontrollers, CPUs or DSP chips),

    May contain multiple types of memory (program, data and flash

    memories), Have a RF transceiver (usually with a single omni-directional

    antenna),

    Have a power source (e.g., batteries and solar cells), and

    accommodate various sensors and actuators. The nodes communicate wirelessly and often self-organize after

    being deployed in an ad hoc fashion.

  • 8/4/2019 MAC Wireless Sensor Networks

    3/37

  • 8/4/2019 MAC Wireless Sensor Networks

    4/37

    Currently, wireless sensor networks are beginning tobe deployed

    at an accelerated pace. It is not unreasonable toexpect that in

    10-15 years that the world will be covered withwireless sensor

    networks with access to them via the Internet. This new technology is exciting with unlimited

    potential for numerous application areas including

    Environmental, medical, military, transportation,

    entertainment, crisis management, homelanddefense, and smart spaces.

    Since a wireless sensor network is a distributed real-

    time system.

  • 8/4/2019 MAC Wireless Sensor Networks

    5/37

  • 8/4/2019 MAC Wireless Sensor Networks

    6/37

    Todays Discussion:

    MAC layer

    Routing

    Node localization

    Clock synchronization

    Power management

  • 8/4/2019 MAC Wireless Sensor Networks

    7/37

    MAC A medium access control (MAC) protocol

    coordinates actions over a shared channel. Themost commonly used solutions are contention-based.

    Node which has a message to transmit to test the

    channel to see if it is busy, if not busy then ittransmits, else if busy it waits and tries again later.

    If two or more nodes transmit at the same timethere is a collision and all the nodes colliding tryagain later.

    Many wireless MAC protocols also have a dozemode where nodes not involved with sending orreceiving a packet in a given timeframe go intosleep mode to save energy.

    In general, most MAC protocols optimize for the

  • 8/4/2019 MAC Wireless Sensor Networks

    8/37

    However, a wireless sensor network has morefocused requirements that include a local uni-orbroad-cast, traffic is generally from nodes to one

    or a few sinks (most traffic is then in one direction)

    An effective MAC protocol for wireless sensornetworks must consume little power, avoidcollisions,

    Be implemented with a small code size andmemory requirements, be efficient for a singleapplication, and be tolerant to changing radiofrequency and networking conditions.

    B-MAC

  • 8/4/2019 MAC Wireless Sensor Networks

    9/37

    B-MAC

    B-MAC is highly configurable and can be

    implemented with a small code and memory size. It has an interface that allows choosing various

    functionality and only that functionality as neededby a particular application

    B-MAC Consists of 4 main Parts:

    Clear channel assessment (CCA),

    Packet backoff,

    Link layer acks,

    Low power listening.

  • 8/4/2019 MAC Wireless Sensor Networks

    10/37

    For CCA, B-MAC uses a weighted moving average ofsamples when the channel is idle in order to assessthe background noise and better be able to detect

    valid packets and collisions.

    The packet backoff time is configurable and ischosen from a linear range as opposed to an

    exponential backoff scheme typically used in otherdistributed systems.

    This reduces delay and works because of the typicalcommunication patterns found in a wireless sensor

    network.

  • 8/4/2019 MAC Wireless Sensor Networks

    11/37

    Contents

    Basic Concepts

    S-MAC

    T-MAC

    B-MAC

    P-MAC

    Z-MAC

  • 8/4/2019 MAC Wireless Sensor Networks

    12/37

    Basic Concepts

    Problem

    TDMA

    CSMA RTS / CTS

  • 8/4/2019 MAC Wireless Sensor Networks

    13/37

    Hidden Nodes

    A B C

  • 8/4/2019 MAC Wireless Sensor Networks

    14/37

    MAC Challenges

    Traditionally

    Fairness

    Latency

    Throughput

    For Sensor Networks

    Power efficiency

    Scalability

  • 8/4/2019 MAC Wireless Sensor Networks

    15/37

    S-MAC - Sensor MAC

    Nodes periodically sleep

    Trades energy efficiency for lowerthroughput and higher latency

    Sleep during other nodestransmissions

    Listen Sleep tListen Sleep

  • 8/4/2019 MAC Wireless Sensor Networks

    16/37

    S-MAC

    Listen significantly longer than clock drift Neighboring nodes exchange SYNC msgs Exchanged timestamps are relative

    rather than absolute RTS/CTS avoids hidden terminal Message passing provided Packets contain expected duration of

    message

    Every packet must be acknowledged Adaptive listening can be used so that

    potential next hop nodes wake up intime for possible transmissions

  • 8/4/2019 MAC Wireless Sensor Networks

    17/37

    S-MAC Results

    Latency and throughput are problems,but adaptive listening improves itsignificantly

  • 8/4/2019 MAC Wireless Sensor Networks

    18/37

    S-MAC Results

    Energy savings significantcompared to non-sleepingprotocols

  • 8/4/2019 MAC Wireless Sensor Networks

    19/37

    T-MAC - Timeout MAC

    Transmit all messages in bursts ofvariable length and sleep betweenbursts

    RTS / CTS / ACK Scheme

    Synchronization similar to S-MAC

  • 8/4/2019 MAC Wireless Sensor Networks

    20/37

    T-MAC Operation

  • 8/4/2019 MAC Wireless Sensor Networks

    21/37

    T-MAC Results

    T-MAC saves energy compared to S-MAC The early sleeping problem limits the

    maximum throughput Further testing on real sensors needed

  • 8/4/2019 MAC Wireless Sensor Networks

    22/37

    B-MAC - Berkeley MAC

    B-MACs Goals:

    Low power operation

    Effective collision avoidance

    Simple implementation (small code)

    Efficient at both low and high data rates

    Reconfigurable by upper layers

    Tolerant to changes on the network

    Scalable to large number of nodes

  • 8/4/2019 MAC Wireless Sensor Networks

    23/37

    B-MACs Features

    Clear Channel Assessment (CCA)

    Low Power Listening (LPL) usingpreamble sampling

    Hidden terminal and multi-packetmechanisms not provided, should beimplemented, if needed, by higherlayers

    Sleep

    t

    ReceiveReceiver

    Sleep

    t

    PreambleSender Message

    Sleep

  • 8/4/2019 MAC Wireless Sensor Networks

    24/37

    B-MAC Interface

    CCA on/off

    Acknowledgements on/off

    Initial and congestion backoff in a perpacket basis

    Configurable check interval and

    preamble length

  • 8/4/2019 MAC Wireless Sensor Networks

    25/37

    B-MAC Lifetime Model

    E can be calculated if hardware constants, sample

    rate, number of neighboring nodes and checktime/preamble are known

    Better: E can be minimized by varying checktime/preamble if constants, sample rate andneighboring nodes are known

  • 8/4/2019 MAC Wireless Sensor Networks

    26/37

    B-MAC Results

    Performs better than the otherstudied protocols in most cases

    System model can be complicatedfor application and routing protocoldevelopers

    Protocol widely used because hasgood results even with defaultparameters

  • 8/4/2019 MAC Wireless Sensor Networks

    27/37

    P-MAC - Pattern MAC

    Patterns are 0*1 strings with size 1-N Every node starts with 1 as pattern

    Number of 0s grow exponentially up to athreshold and then linearly up to N-1

    TR = CW + RTS + CTS + DATA + ACK N = tradeoff between latency and energy

  • 8/4/2019 MAC Wireless Sensor Networks

    28/37

    Patterns vs Schedules

    Local

    Pattern Bit

    Packet to

    Send

    Receiver

    Pattern Bit

    Local

    Schedule

    1 1 1 1

    1 1 0 1-

    1 0 * 1-

    0 1 1 1

    0 1 0 0

    0 0 * 0

  • 8/4/2019 MAC Wireless Sensor Networks

    29/37

    P-MAC Evaluation

    Simulated results are better thanSMAC

    Good for relatively stable trafficconditions

    Adaptation to changes on trafficmight be slow

    Loose time synchronization required

    Needs more testing and comparisonwith other protocols besides S-MAC

  • 8/4/2019 MAC Wireless Sensor Networks

    30/37

    Z-MAC - Zebra MAC

    Runs on top of B-MAC Combines TDMA and CSMA features

    CSMAPros

    Simple Scalable

    Cons Collisions due to hidden

    terminals RTS/CTS is overhead

    TDMAPros

    Naturally avoidscollisions

    Cons Complexity of scheduling Synchronization needed

  • 8/4/2019 MAC Wireless Sensor Networks

    31/37

    Z-MAC Initialization

    Neighborhood discovery through pingmessages containing known neighbors

    Two-hop neighborhood used as input for ascheduling algorithm (DRAND)

    Running time and message complexity ofDRAND is O(), where is the two-hopneighborhood size

    The idea is to compensate the initialization

    energy consumption during the protocolnormal operation

  • 8/4/2019 MAC Wireless Sensor Networks

    32/37

    Z-MAC Time SlotAssignment

  • 8/4/2019 MAC Wireless Sensor Networks

    33/37

    Z-MAC Transmission Control

    The Transmission Rule:

    If owner of slot

    Take a random backoff within To

    Run CCA and, if channel is clear,transmit

    Else

    Wait for To

    Take a random backoff within [To,Tno]

    Run CCA and, if channel is clear,

    transmit

  • 8/4/2019 MAC Wireless Sensor Networks

    34/37

    Z-MAC HCL Mode

    Nodes can be in High Contention Level(HCL)

    A node is in HCL only if it recently receivedan Explicit Contention Notification (ECN)

    from a two-hop neighbor Nodes in HCL are not allowed to contend

    for the channel on their two-hopneighbors time slots

    A node decides to send an ECN if it islosing too many messages (applicationACKs) or based on noise measuredthrough CCA

  • 8/4/2019 MAC Wireless Sensor Networks

    35/37

    Z-MAC Receiving Schedule

    B-MAC based

    Time slots should be large enoughfor contention, CCA and one B-MACpacket transmission

    Slot size choice, like in B-MAC, left toapplication

  • 8/4/2019 MAC Wireless Sensor Networks

    36/37

    Z-MAC Results

    Z-MAC performs better than B-MAC whenload is high

    As expected, fairness increases with Z-MAC

    Complexity of the protocol can be aproblem

  • 8/4/2019 MAC Wireless Sensor Networks

    37/37

    Conclusions

    Between the protocols studied, B-MAC still seems to be the best onefor applications in general

    Application developers seem not touse B-MACs control interface

    Middleware service could make such

    optimizations according to networkstatus