Wireless networks - Lecture 35: MAC protocols for WSN. The main topics covered in this chapter include: challenges in WSNs; attributes of MAC protocol; overview of MAC protocols; energy efficiency in MAC; proposed routing protocol; QoS framework; network monitoring and management;...
Trang 1Wireless Networks
Lecture 35 MAC Protocols for WSN Part II
Dr Ghalib A Shah
Trang 2Outlines
Challenges in WSNs.
Attributes of MAC Protocol
Overview of MAC protocols
Energy Efficiency in MAC
Proposed Routing Protocol
Trang 3Last Lecture
Introduction to WSN
Applications of WSN
Factors Influencing Performance of WSN
► Power consumption, fault tolerance, scalability, topology,
cost
Architecture and Communication Protocols
Trang 4 Network Monitoring and Management
How to integrate WSNs into NGWI ?
Trang 5Simulation for Sensor Networks
Simulation provides :
Controlled , Reproducible testing environment
Cost – effective alternative
Means to explore and improve design space
Trang 6TinyOS
The role of any operating system (OS) is to promote
development of reliable application software by
providing a convenient and safe abstraction of
hardware resources
Wireless sensor networks (WSNs) are embedded but
general-purpose, supporting a variety of applications, incorporating heterogeneous components, and capable
of rapid deployment in new environments
An open-source development environment
► A programming language and model (NesC)
TOSSIM for simulating TinyOS
TinyDB for Sensor DB in TinyOS
Trang 7► Scalability and adaptivity
• Number of nodes changes overtime
► Latency
► Fairness
► Throughput
► Bandwidth utilization
Trang 8 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
Hidden terminal: A is hidden from C’s CS
Trang 9Overview 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
Trang 10Energy Efficiency in MAC Design
Energy is primary concern in sensor networks
What causes energy waste?
► Collisions
► Control packet overhead
► Overhearing unnecessary traffic
► Overemitting
► Long idle time
• bursty traffic in sensor-net apps
• Idle listening consumes 50—100% of the power for receiving (Stemm97, Kasten)
Dominant in sensor nets
Trang 11Energy 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 all
directions
► TDMA has limited scalability and adaptivity
• Hard to dynamically change frame size or slot assignment when new nodes join
• Restrict direct communication within a cluster
► Contention protocols easily accommodate node
changes and support multi-hop communications
Trang 12► Nodes are free to choose their listen/sleep schedule
► Requirement : neighboring nodes synchronize together
► Exchange schedules periodically (SYNC packet)
Trang 13S-MAC: Coordinated Sleeping (1)
Frame Schedule Maintenance
1 Choosing a schedule
• Listen to the medium for at least SP
• Nothing heard, choose a schedule
• Broadcast a SYNC packet (should contend for medium)
1 Following a schedule
• Receives a schedule before choosing/announcing
• Follows the schedule
• Broadcast a SYNC packet
1 Adopting multiple schedules
• Receives a schedule after choosing/announcing
Trang 14S-MAC: Coordinated Sleeping (2)
Maintaining Synchronization
Clock drifts – not a major concern (listen time = 0.5s
– 105 times longer than typical drift rates)
Need to mitigate long term drifts – schedule updating
using SYNC packet (sender ID, its next scheduled sleep time – relative);
Listen is split into 2 parts – for SYNC and RTS/CTS
Once RTS/CTS is established, data sent in sleep
interval
Receiver
Listen
Sleep for SYNC for RTS for CTS
Trang 15S-MAC: Coordinated Sleeping (3)
Adaptive Lis tening – Lowduty cycle to active
mode
* Overhearing nodes – wakeup at the end of the
current transmission (duration field in RTS/CTS)ListenR ListenON
RTS Sender
Trang 16Drawbacks of S-MAC
Active (Listen) interval – long enough to handle
to highest expected load
► If message rate is less – energy is still wasted in
idle-listening
SMAC fixed duty cycle – is NOT OPTIMAL
High Latency
Normal
S-MAC
Trang 17T-MAC: Preliminaries
Adaptive duty cycle:
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
Active Active Active
Trang 18T-MAC: Choosing TA
Requirement: a node should not sleep while its
neighbors are communicating, potential next receiver
Trang 20Dynamic Sensor-MAC (DSMAC)
TMAC improves the latency in SMAC at cost of complexity.
DSMAC provides simple solution to static duty cycle.
All nodes start with same duty cycle.
If one-hop latency is observed higher by receiver, it doubles its
duty cycle
Nodes share their one-hop latency values with neighbors during
SYNC period.
The transmitter also doubles its duty cycle if the destination
reported higher one-hop latency.
This change will not affect the schedule of other neighbors.
Trang 21DSMAC Schduling
Trang 22Traffic-Adaptive MAC (TRAMA)
Time is divided into random-access and scheduled-access
the node calculates the number of slots for which it will have the
highest priority among two-hop neighbors
The node announces the slots it will use as well as the intended
receivers for these slots with a schedule packet.
the node announces the slots for which it has the highest priority
but it will not use
The schedule packet indicates the intended receivers using a
bitmap whose length is equal to the number of its neighbors
Trang 23 Advantages
► Higher percentage of sleep time and less collision
probability are achieved, as compared to based protocols
CSMA-► Since the intended receivers are indicated by a
bitmap, less communication is performed for the multicast and broadcast types of communication patterns, compared to other protocols
► Transmission slots are set to be seven times longer
than the random-access period This means that
Trang 24DMAC
Supports convergecast communication model,
Data-aggregation tree is formed from sources to sink
node
It is an improved slotted ALOHA algorithm
Slots are allotted according to the level of tree from leaf
to root
It incurs low latency but no collision avoidance for
nodes at same level
Trang 25A minimum period u consists
of one packet tx and rx.
Wakeup period in three is skewed depending on depth d so du is the wakeup time Node at higher layer will be in rx state when lower layer nodes are in
tx state
Trang 26Contention-Free MAC protocols for Wireless
Sensor Networks
Asynchronous Slot Assignment
► Each node locally discretizes its local time.
► The number of slots in a time frame, called the frame size and denoted by
, is set to 2 2.
► Having the same frame size at all nodes ensures that overlapping time
slots remain the same
Trang 27ASAND – Basic Approach
Trang 28ASAND – Conflict Reporting
w v
u
The 2-hop neighbors u and v are unaware that they have selected
conflicting time slots (their transmissions collide on w).
Having observed a collision in its local time t, node w transmits at time t+ , creating a spurious conflict with both u and v.
This is called conflict reporting essentially reduces a conflict
between hidden terminals to a conflict between neighbor nodes.
After t+ , u and v will be forced to select new slots
Trang 29 Challenges in WSNs.
Attributes of MAC Protocol
Overview of MAC protocols
Energy Efficiency in MAC
Proposed Routing Protocol