290 likes | 462 Views
Z-MAC: a Hybrid MAC for Wireless Sensor Networks. Injong Rhee, Ajit Warrier, Mahesh Aia and Jeongki Min Dept. of Computer Science, North Carolina State University Presenter: Tim. Outline. Introduction Design of Z-MAC Performance Evaluation Conclusion. What is Z-MAC?. A Hybrid MAC
E N D
Z-MAC: a Hybrid MAC for Wireless Sensor Networks Injong Rhee, Ajit Warrier, Mahesh Aia and Jeongki Min Dept. of Computer Science, North Carolina State University Presenter: Tim
Outline • Introduction • Design of Z-MAC • Performance Evaluation • Conclusion
What is Z-MAC? • A Hybrid MAC • Combine the strengths of CSMA and TDMA while offsetting their weakness • CSMA (Carrier Sense Multiple Access) • High channel utilization and low latency under low contention • Hidden terminal problem • TDMA (Time Division Multiple Access) • No hidden terminal problem and high channel utilization under high contention • Not practical due to too many problems
Basic Idea of Z-MAC • Each node owns a time slot. A node may transmit at any time slot. However, the owner has the higher priority to transmit data than the non-owners. When a slot is not in use by its owner, non-owners can steal the slot. • Z-MAC behaves like CSMA under low contention and like TDMA under high contention.
Design of Z-MAC • Setup phase • Transmission Control • Explicit Contention Notification • Receiving Schedule of Z-MAC • Local Time Synchronization
Setup Phase • Including • neighbor discovery • slot assignment • local frame exchange • global time synchronization • High overhead? • It runs only once during the setup phase and does not run until a significant change in the network topology
Setup Phase:Neighbor Discovery • Steps • Every node periodically broadcasts a ping to its one-hop neighbors. • A ping message contains the current list of its one-hop neighbors. • Through the process, each node gathers the information of its two-hop neighbors. • Implementation • Every node sends one ping at a random time in each second for 30 seconds. C A B D
Setup Phase:Slot Assignment • Using DRAND to assign time slots to every node. • DRAND is a distributed implementation of RAND, used for TDMA scheduling or channel assignment for wireless networks. • Ensuring no two nodes within a two-hop communication neighborhood are assigned to the same slot. • The slot number assigned to a node does not exceed the size of its local two-hop neighborhood (δ). • The running time and message complexity are also bounded by O(δ). 3 0 1 2 0
Setup Phase:Local Framing • Each node needs to decide on the period in which it can use the time slot for transmission. The period is called the time frame of the node. • Time frame rule • Si: the slot number assigned to node i • Fi: the maximum slot number within node i’s two-hop neighborhood • Set node i’s time frame to be 2a, where a satisfies 2a-1≤ Fi ≤ 2a – 1. That is, node i uses the Si-th slot in every 2a time slots.
Example 2a-1≤ Fi ≤ 2a – 1 Node A a = 2 Node C a = 3
Transmission Control • Two modes: low contention level (LCL) and high contention level (HCL). • Under LCL, non-owners are allowed to compete in any slot with low priority. • Under HCL, a node does not compete in a slot owned by its two-hop neighbors. • To avoid being hidden terminal to the owners. • A node is in HCL only when it receives an explicit contention notification (ECN) messages within the lasttECNperiod.
Transmission Rule Node i acquires data to transmit Is node i the owner? Take a random backoff within period To Wait until the channel is not busy YES NO Is the channel clear? Is node i in LCL? Wait for To and performs a random backoff within a contention window [To, Tno] YES NO YES NO Is the current slot owned by its two-hop neighbor? NO • Postpone its transmission • until the time slot is • not owned by • a two-hop neighbor • or (2) owned by itself Transmit data!!! YES
Explicit Contention Notification • ECN messages notify neighbors not to act as hidden terminals to the owner of each slot when contention is high. • How to estimate two-hop contention? • According to noise level of the channel • Low noise indicates low contention.
Explicit Contention Notification • Steps: • As a transmitting node detects high contention, the node sends a unicast message, one-hop ECN, to the destination which is experiencing contention. If there are multiple destinations, it broadcasts a message with information about the multiple destinations. • Assume node j receives one-hop ECN. If node j is the destination, it then broadcasts the ECN, two-hop ECN, to its one-hop neighbors. If not, it simply discards the one-hop ECN. • When a node receives a two-hop ECN, it sets the HCL flags. • ECN suppressing
Local Time Synchronization • Z-MAC adopts a technique from RTP/RTCP (real-time transport protocol). • The control message transmission rate is limited to a small fraction of session bandwidth. • In Z-MAC, a node sends one synchronization packet per every 100 data packets.
Local Time Synchronization • Trust factor(βt): • Rdrift : the max clock drift rate of each node • εclock: the max acceptable clock error • Isynch = εclock / Rdrift : the min synchronization interval required to achieve the max clock error • αsynch: the max weight applying to the new clock value received • S : the avg. rate at which a node receives or sends synchronization messages • How to get new clock value? • Cavg: weighted moving avg. clock value • Cnew: newly received clock value • Cavg = (1- βt)Cavg + βt Cnew
Performance Evaluation • Implementing Z-MAC in both ns-2 and Mica2/TinyOS. • Comparing the performance of Z-MAC with that of PTDMA(ns-2), Sift(ns-2) and B-MAC(ns-2 and TinyOS). • Three benchmarks • One-hop benchmark • Two-hop benchmark • Two clusters, 7 and 8 sending nodes. • Multi-hop benchmark
Conclusion • Z-MAC has advantage over B-MAC under medium to high contention. It is good for application where expected data rates and two-contention are medium to high. • Robust to topology changes and clock synchronization errors.