Presentation is loading. Please wait.

Presentation is loading. Please wait.

Medium Access Control in WSNs

Similar presentations


Presentation on theme: "Medium Access Control in WSNs"— Presentation transcript:

1 Medium Access Control in WSNs
Week 8 Lectures MAC Layer in WSNs Medium Access Control in WSNs

2 Medium Access Control in WSNs
Outline Introduction to MAC MAC attributes and trade-offs Scheduled MAC protocols Contention-based MAC protocols Case studies Summary Medium Access Control in WSNs

3 Medium Access Control in WSNs
Introduction to MAC The role of medium access control (MAC) Controls when and how each node can transmit in the wireless channel Why do we need MAC? Wireless channel is a shared medium Radios transmitting in the same frequency band interfere with each other – collisions Other shared medium examples: Ethernet Medium Access Control in WSNs

4 Where Is the MAC? Network model from Internet
A sublayer of the Link layer Directly controls the radio The MAC on each node only cares about its neighborhood Application layer Transport layer Network layer Link/MAC layer Physical layer End-to-end reliability, congestion control Routing Per-hop reliability, flow control, multiple access Packet transmission and reception Medium Access Control in WSNs

5 Media access in wireless
In wired link, Carrier Sense Multiple Access with Collision Detection send as soon as the medium is free, listen into the medium if a collision occurs (original method in IEEE 802.3) In wireless Signal strength decreases in proportional to at least square of the distance Collision detection only at receiver Half-duplex mode Furthermore, CS is not possible after propagation range Low energy availability. Limited transceiver capability: Half duplex No collision detection Few bits of buffering Sporadic bursts of correlated data. Short data packet length. Roughly same cost for transmitting, receiving and listening. Hidden terminal problem between every other pair of levels in network topology. Medium Access Control in WSNs

6 What’s New in Sensor Networks?
A special wireless ad hoc network Large number of nodes Limited computation ability and RAM Battery powered Topology and density change Nodes for a common task In-network data processing Sensor-net applications Sensor-triggered bursty traffic Can often tolerate some delay Speed of a moving object places a bound on network reaction time Most traffic in the sensor network is triggered by sensing events Energy efficiency Difficult recharge or replace batteries The Sources of Energy Inefficiency Idle listening, collision, overhearing, control packet overhead Self-organization and self-maintenance ad hoc fashion No system administrator Scalability and adaptability some nodes may die over time, new nodes may join later Traffic pattern Local gossip Converge-cast Performance Trade-offs for increased power efficiency Medium Access Control in WSNs

7 Characteristics of Sensor Network
A special wireless ad hoc network Large number of nodes Battery powered Topology and density change Nodes for a common task In-network data processing Sensor-net applications Sensor-triggered bursty traffic Can often tolerate some delay Speed of a moving object places a bound on network reaction time Scalability & Self-configuration Energy efficiency Adaptivity Fairness not important Message-level Latency Adaptivity Trade for energy Medium Access Control in WSNs

8 Primary Concerns of MAC Attributes
Collision avoidance Basic task of a MAC protocol Determine when and how to access the medium Energy efficiency One of the most important attributes for sensor networks, since most nodes are battery powered Affect the overall node lifetime On many hardware platforms, the radio is the major energy consumer. The MAC layer directly controls radio activities. MAC protocols: control the access to the shared transmission medium, dealing with the following issues Collision avoidance Fairness Latency Bandwidth utilization Throughput Deadlock, livelock, and other undesirable states Medium Access Control in WSNs

9 Primary Concerns of MAC Attributes
Scalability and adaptivity Network size, node density and topology change Deployed ad-hoc and operate in uncertain environments Nodes die Nodes join later Nodes move Good MAC accommodates changes gracefully Medium Access Control in WSNs

10 Other Concerns of MAC Attributes
Channel utilization How well is the channel used? Also called bandwidth utilization or channel capacity Latency Delay from sender to receiver Its importance depends on application single hop or multi-hop The speed of the sensed object places a bound on how rapidly the network must react. Medium Access Control in WSNs

11 Other Concerns of MAC Attributes
Throughput The amount of data transferred from sender to receiver in unit time Affected by efficiency of collision avoidance, channel utilization, latency, control overhead… Goodput? Fairness Can nodes share the channel equally? All nodes cooperate for a single common task Less important in sensor networks Goodput = data received without errors Fairness is Important in traditional voice or data networks Medium Access Control in WSNs

12 Energy Efficiency in MAC Design
Energy is primary concern in sensor networks What causes energy waste? Collisions Retransmission Long idle time bursty traffic in sensor-net apps Idle listening consumes 50—100% of the power for receiving (Stemm97, Kasten) Dominant factor In Mica2, idle: receiving: transmission = 1:1:1.41 at 433MHZ with RF signal power of 1mw Medium Access Control in WSNs

13 Medium Access Control in WSNs
Energy What causes energy waste? Overhearing unnecessary traffic Can be a dominant factor of energy waste when Heavy traffic load High node density Control packet overhead Reduce effective goodput Computation complexity With Motes, radio and CPU are two major energy consumers Medium Access Control in WSNs

14 Classification of MAC Protocols
Schedule-based protocols Schedule nodes onto different Time slots or sub-channels Examples: TDMA, FDMA, CDMA Contention-based protocols Nodes compete in probabilistic coordination Examples: ALOHA (pure & slotted), CSMA, S-MAC Schedule-based protocols: Frequently used in conventional wireless networks, such as GSM and wireless LAN A central authority is responsible for channel access control Fixed channel assignment, deterministic access to the medium Guaranteed collision avoidance Inflexible in response to changes in networks No direct, peer-to-peer communication between mobile nodes Contention-based protocols Nodes contend among each other for the access to the shared channel A contention mechanism is employed Good flexibility and scalability Peer-to-peer communication is directly supported Inefficient usage of energy Medium Access Control in WSNs

15 Schedule-based protocols
Medium Access Control in WSNs

16 Scheduled Protocols: TDMA
Time division multiple access Divide time into subchannels Advantages No collisions Energy efficient — easily support low duty cycles Disadvantages Difficult to accommodate node changes Requires strict time synchronization Could limit available throughput using the entire frequency spectrum TDMA frequently used in cellular wireless comm. Sys such as GSM (Global System for Mobile Communications ) Normally requires nodes to form clusters. Join or leave a cluster trigger timeslot adjustments Avoid overlapping of signals in adjacent time slots. There is always channel interference between transmission in two adjacent slots because transmissions tend to overlap in time. This interference limits the number of users that can share the channel Medium Access Control in WSNs

17 Frequency Division Multiple Access (FDMA)
Available frequency subdivided into a number of subchannels FDMA is used in nearly all first generation mobile communication systems, like AMPS (30 KHz channels) Require frequency synchronization, narrowband filters, tunable receiver Transceiver more complex Channels are assigned to the user for the duration of a call. No other user can access the channel during that time. When call terminates, the same channel can be re-assigned to another user FDMA is used in nearly all first generation mobile communication systems, like AMPS (30 KHz channels) Number of channels required to support a user population depends on the average number of calls generated, average duration of a call and the required quality of service (e.g. percentage of blocked calls) subChannel 1 subChannel 2 subChannel 3 subChannel 4 Bandwidth Time Medium Access Control in WSNs

18 Code Division Multiple Access (CDMA)
Use different codes to separate the transmissions Users encoded by different codes (keys) coexist in time and frequency domains All parallel transmissions using other codes appears as noise English vs. French Code management is complex and critical CDMA, a type of a spread-spectrum technique, allows multiple users to share the same channel by multiplexing their transmissions in code space. Different signals from different users are encoded by different codes (keys) and coexist both in time and frequency domains A code is represented by a wideband pseudo noise (PN) signal When decoding a transmitted signal at the receiver, because of low cross-correlation of different codes, other transmissions appear as noise. This property enables the multiplexing of a number of transmissions on the same channel with minimal interference The maximum allowable interference (from other transmissions) limits the number of simultaneous transmissions on the same channel Spreading of the signal bandwidth can be performed using - Direct Sequence (DS): the narrow band signal representing digital data is multiplied by a wideband pseudo noise (PN) signal representing the code. Multiplication in the time domain translates to convolution in the spectral domain. Thus the resulting signal is wideband - Frequency Hopping (FH): carrier frequency rapidly hops among a large set of possible frequencies according to some pseudo random sequence (the code). The set of frequencies spans a large bandwidth. Thus the bandwidth of the transmitted signal appears as largely spread Medium Access Control in WSNs

19 Scheduled Protocols: Polling
Master-slave configuration The master node decides which slave can send by polling the corresponding slave Only direct communication between the master and a slave A special TDMA without pre-assigned slots Examples IEEE infrastructure mode (CPF) Bluetooth piconets Medium Access Control in WSNs

20 Scheduled Protocols: Bluetooth
Wireless personal area network (WPAN) Short range, moderate bandwidth, low latency IEEE (MAC + PHY) is based on Bluetooth Nodes are clustered into piconet Each piconet has a master and up to 7 active slaves – scalability problem The master polls each slave for transmission CDMA among piconets Multiple connected piconets form a scatternet Difficult to handle inter-cluster communications Medium Access Control in WSNs

21 Scheduled Protocols: Bluetooth
Bluetooth (Cont.) How about Bluetooth radio with sensor networks? Scalability is a big problem Lack of multi-hop support No commercial Bluetooth radio supports scatternet so far Use two radios – expensive and energy inefficient A node temporarily leave one piconet and joins another – high overhead and long delay Connection maintenance is expensive even with a low-duty-cycle mode ([Leopold ]) Medium Access Control in WSNs

22 Scheduled Protocols: Self-Organization
By Sohrabi and Pottie [Sohrabi+ 2000] Have a pool of independent channels Frequency band or spreading code Potential interfering links select different channels Talk to neighbors in different time slots Sleep in unscheduled time slots Looks like TDMA, but actual multiple access is accomplished by FDMA or CDMA Any pair of two nodes can talk at the same time Low bandwidth utilization Medium Access Control in WSNs

23 Scheduled Protocols: LEACH
Low-Energy Adaptive Clustering Hierarchy — by Heinzelman, et al. [Heinzelman+ 2000] Similar to Bluetooth CDMA between clusters TDMA within each cluster Static TDMA frame Cluster head rotation Node only talks to cluster head Only cluster head talks to base station (long dist.) The same scalability problem Medium Access Control in WSNs

24 Contention-based protocols
Medium Access Control in WSNs

25 Contention Protocols: Classics
ALOHA Pure ALOHA: send when there is data Slotted ALOHA: send on next available slot Both rely on retransmission when there’s collision CSMA — Carrier Sense Multiple Access Listening (carrier sense) before transmitting Send immediately if channel is idle Backoff if channel is busy non-persistent, 1-persistent and p-persistent Node transmits a packet whenever it is generated ALOHA Receiver responds with an ACK upon the receipt of the packet In the case of a collision, no ACK will be generated, and the sender retries after a random period Low throughput: pure ALOHA 18%; slotted ALOHA 35%. In non-persistent CSMA, if a node detects an idle medium, it transmits immediately. If the medium is busy, it waits a random amount of time and start carrier sense again. In 1-persistent CSMA, a node transmit if the medium is idle. Otherwise it continues to listen until the medium becomes idle, and then transmits immediately. In p-persistent CSMA, a node transmits with probability p if the medium is idle, and with probability (1-p) to back-off and restart carrier sense. Medium Access Control in WSNs

26 Medium Access Control in WSNs
ALOHA, Slotted-ALOHA Mechanism random, distributed (no central arbiter), time-multiplex Slotted Aloha additionally uses time-slots, sending must always start at slot boundaries Aloha Slotted Aloha collision sender A sender B sender C t collision sender A sender B sender C Medium Access Control in WSNs t

27 Contention Protocols: CSMA/CA
Hidden terminal problem CSMA is not enough for multi-hop networks (collision at receiver) CSMA/CA (CSMA with Collision Avoidance) RTS/CTS handshake before send data Node c will backoff when it hears b’s CTS a b c Node a is hidden from c’s carrier sense Where there is no CD: collision detection Carrier Sense Multiple Access With Collision Detection (CSMA/CD) is a network control protocol in which (a) a carrier sensing scheme is used and (b) a transmitting data station that detects another signal while transmitting a frame, stops transmitting that frame, transmits a jam signal, and then waits for a random time interval (known as "backoff delay" and determined using the truncated binary exponential backoff algorithm) before trying to send that frame again. In wired medium, low attenuation, similar SNRs at transmitter and receiver. High attenuation, Simple wireless transceivers work only in a half-duplex mode -> CD is usually not applicable to wireless media. Medium Access Control in WSNs

28 Hidden terminal problem
Hidden terminals A sends to B, C cannot receive A C wants to send to B, C senses a “free” medium (CS fails) collision at B, A cannot receive the collision (CD fails) A is “hidden” for C A B C Medium Access Control in WSNs

29 Exposed terminal problem
Exposed terminals B sends to A, C wants to send to D C has to wait, CS signals a medium in use but A is outside the radio range of C, thus waiting is not necessary C is “exposed” to B A B C D Medium Access Control in WSNs

30 Contention Protocols: MACA and MACAW
MACA — Multiple Access w/ Collision Avoidance [Karn 1990] Based on CSMA/CA Add duration field in RTS/CTS informing other node about their backoff time MACAW [Bharghavan+ 1994] Improved over MACA RTS/CTS/DATA/ACK Fast error recovery at link layer MACA (Multiple Access with Collision Avoidance) uses short signaling packets for collision avoidance RTS (request to send): a sender request the right to send from a receiver with a short RTS packet before it sends a data packet CTS (clear to send): the receiver grants the right to send as soon as it is ready to receive aka, virtual carrier sense Medium Access Control in WSNs

31 Contention Protocols: IEEE 802.11
IEEE ad hoc mode (DCF) 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 (fragment + ACK) First (fragment + ACK) reserve time for second… Give up transmission when error happens IEEE Distributed Coordination Function (DCF) Largely based on MACAW Medium Access Control in WSNs

32 Contention Protocols: IEEE 802.11 (cont.)
Power save (PS) mode in IEEE DCF Assumption: all nodes are synchronized and can hear each other (single hop) Nodes in PS mode periodically listen for beacons & ATIMs (ad hoc traffic 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 Medium Access Control in WSNs

33 Contention Protocols: IEEE 802.11 (cont.)
Unicast example of PS mode in DCF Medium Access Control in WSNs

34 Contention Protocols: Tx Rate Control
By Woo and Culler [woo+ 2003] Based on a special network setup A base station tries to collect data equally from all sensors in the network CSMA + adaptive rate control Promote fair bandwidth allocation to all sensors Nodes close to the base station forward more traffic, and have less chances to send their own data Helps in congestion avoidance Medium Access Control in WSNs

35 Medium Access Control in WSNs
Self-Organizing Medium Access Control for Sensor network (SMACS) [Sohrabi+ 2000] Note: this is SMACS, not S-MAC (which will be discussed later) Trades bandwidth for increased energy efficiency Superframe, Tframe Channel: a pair of time intervals Four types of message: TYPE1: a short invitation containing a node’s ID and number of attached neighbors. TYPE2: a response to TYPE1, containing a node’s address and attached state. TYPE3: response to TYPE2, including the sender’s decision about communication peer, timing information, schedule of sender’s existing link. TYPE4: response to TYPE3. It identifies the time slots available to both sender and receiver, determines the channel for the new communication link. Medium Access Control in WSNs

36 Medium Access Control in WSNs
SMACS Operation Medium Access Control in WSNs

37 Eavesdrop-And-Register (EAR) protocol
EAR extends SMACS for use with mobile devices. Stationary nodes periodically broadcast a Broadcast Invitation (BI) message to invite other nodes to join. A mobile node selects a BI from many BIs that it got, then reply with a Mobile Invite (MI) message If the stationary node accepts MI request, it selects slots for communication and replies with a Mobile Response (MR) message. As the received SNR along the channel improves or degrades, mobile nodes request a connection or disconnection (with an MD) based on predetermined threshold Medium Access Control in WSNs

38 Scheduled vs. Contention Protocols
Scheduled Protocols Contention Protocols Collisions No Yes Energy efficiency Good Need improvement Scalability and adaptivity Bad Multi-hop communication Difficult Easy Time synchronization Strict Loose or not required Medium Access Control in WSNs

39 Energy Efficiency in Contention Protocols
Medium Access Control in WSNs

40 Energy Efficiency in Contention Protocols
Contention-based protocols need to work hard in all directions for energy savings Reduce idle listening – support low duty cycle Better collision avoidance Reduce control overhead Avoid unnecessary overhearing Medium Access Control in WSNs

41 Energy-Efficient MAC Design
Piconet scheme — [Bennett+ 1997] This scheme is not the same piconet in Bluetooth Low duty-cycle operation — energy efficient Sleep for 30s, beacon, and listen for a while Sending node needs to listen for receiver’s beacon first, then CSMA before sending data May wait for long time before sending Medium Access Control in WSNs

42 Energy-Efficient MAC Design
PAMAS: Power Aware Multi-Access with Signalling — [Singh+ 1998] Improve energy efficiency from MACA Avoid overhearing by putting node into sleep Use separate control and data channels RTS, CTS, busy tone to avoid collision Probe packets to find neighbors transmission time Increased hardware complexity Two channels need to work simultaneously, meaning two radio systems. Medium Access Control in WSNs

43 Power Aware Multi-Access protocol with Signaling (PAMAS)
Using a separate signaling channel. Avoids the overhearing among neighboring nodes Nodes shut themselves off when overhear transmissions. If a node has nothing to transmit, and one of its neighbors begins transmitting If at least one neighbor of a node is transmitting or receiving A is sending data packets to B, C and D power off E C A B D F Medium Access Control in WSNs

44 Medium Access Control in WSNs
PAMAS Every node makes the decision to power off independently Node sends RTS on the signal channel before transmitting data If no other transmission going on, target node replies a CTS If any neighboring node is receiving a transmission, it responds with a busy tone; if a CTS is sent, it collides with the busy tone. Then the sender will backoff and retry later. A node only powers off its data channel. The signaling interface stays on all the time Powering off radios does not have any effect on the message latency Medium Access Control in WSNs

45 Energy-Efficient MAC Design
Asynchronous sleeping – by Tseng, et al. Extend PS mode to Multi-hops 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 Medium Access Control in WSNs

46 Energy-Efficient MAC Design
ZigBee Industry standard through application profiles running over IEEE radios Target applications are sensors networks, interactive toys, smart badges, remote controls, and home automation Medium Access Control in WSNs

47 Contention Protocols: ZigBee
Based on IEEE MAC and PHY Three types devices Network Coordinator Full Function Device (FFD) Can talk to any device, more computing power Reduced Function Device (RFD) Can only talk to a FFD, simple for energy conservation CSMA/CA with optional ACKs on data packets Optional beacons with superframes Optional guaranteed time slots (GTS), which supports contention-free access Industry standard through application profiles running over IEEE radios Target applications are sensors networks, interactive toys, smart badges, remote controls, and home automation Medium Access Control in WSNs

48 Contention Protocols: ZigBee (cont.)
Low power, low rate (250kbps) radio MAC layer supports low duty cycle operation Target node life time > 1 year Medium Access Control in WSNs

49 Sensor Mac: Case Studies
Medium Access Control in WSNs

50 Medium Access Control in WSNs
Case Study 1: S-MAC By Ye, Heidemann and Estrin Tradeoffs Major components in S-MAC Periodic listen and sleep Collision avoidance Overhearing avoidance Message passing Latency Fairness Energy An Energy-Efficient MAC Protocol for Wireless Sensor Networks (S-MAC) We call protocol Sensor-MAC or S-MAC. These are the major tradeoffs in S-MAC. We sacrifice the latency and fairness to gain better energy efficiency. S-MAC includes the following major components : periodic listen and sleep, collision avoidance, overhearing avoidance, and message passing. Medium Access Control in WSNs

51 Medium Access Control in WSNs
Coordinated Sleeping Problem: Idle listening consumes significant energy Solution: Periodic listen and sleep sleep listen Turn off radio when sleeping Reduce duty cycle to ~ 10% (120ms on/1.2s off) idle listening is a big problem. Listening consumes significant amount of energy. Our solution is to put nodes into periodic sleep state. After sleeping for some time, each node wakes up and listens to see if anyone wants to talk to it. If yes, it will stay awake. If no, it will go to sleep again. During the sleep time, the node turns off its radio. In our implementation , we have reduced the node duty cycle to about 10%, which is listening for 200 milliseconds and sleeping for 2 seconds. The major tradeoff here is the latency vs. energy savings. Latency is increased due to the periodic sleep. Latency Energy Medium Access Control in WSNs

52 Medium Access Control in WSNs
Coordinated Sleeping Schedules can differ Node 1 Node 2 sleep listen Prefer neighboring nodes have same schedule — easy broadcast & low control overhead Schedule 2 Schedule 1 Before nodes perform periodic listen and sleep, they need to choose a schedule about when to listen and when to sleep. This figure shows that even if two nodes have different schedules, they can still talk to each other as long as they know each others’ schedules. For example, if node 1 wants to talk to node 2, it just wait until node 2 is listening. However, we prefer neighboring nodes to have the same schedule, so that it’s easy to do broadcast and the control overhead is low. But in a large network, we cannot guarantee that all nodes follow the same schedule. For example, in this figure, there are two different schedules on each side. The node on the border will follow both schedules. When it broadcasts a packet, it needs to do it twice, first for nodes on schedule 1 and then for those on schedule 2. Border nodes: two schedules or broadcast twice Medium Access Control in WSNs

53 Medium Access Control in WSNs
Coordinated Sleeping 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 few periods of sleeping and listening Re-sync when receiving a schedule update Periodic neighbor discovery Keep awake in a full sync interval over long periods Here are some procedures for synchronization on schedules. Nodes need to remember their neighbors’ schedules so that they know when to send to each other. Each node periodically broadcasts its schedule and re-synchronizes on a neighbor’s schedule when receiving an update. This prevents long-term clock drift. The schedule packets also serve as beacons for new nodes to join a neighborhood. Medium Access Control in WSNs

54 Medium Access Control in WSNs
Coordinated Sleeping Adaptive listening Reduce multi-hop latency due to periodic sleep Wake up for a short period of time at end of each transmission 1 2 3 4 RTS CTS CTS t1 t2 listen listen Reduce latency by at least half Medium Access Control in WSNs

55 Periodic Listen and Sleep
Choosing schedules The node randomly choose time to go to sleep. The node receives and follows its neighbor’s schedule by setting its schedule to be the same. If the nodes receives a different schedule after it selects its own schedule, it adopts its own schedule. Medium Access Control in WSNs

56 Periodic Listen and Sleep
Maintaining synchronization Update schedule by sending a SYNC packet periodically. SYNC packet contains address of the sender and the time of its next sleep. The new node follows the same procedure to choose schedule. The initial listen period should be long enough. Medium Access Control in WSNs

57 S-MAC: Coordinated Sleeping
Frame Schedule Maintenance Choosing a schedule Listen to the medium for at least SP Nothing heard, choose a schedule Broadcast a SYNC packet (should contend for medium) Following a schedule Receives a schedule before choosing/announcing Follows the schedule Broadcast a SYNC packet Adopting multiple schedules Receives a schedule after choosing/announcing Can discard the new schedule; or Follow both the schedules – suffer more energy loss Medium Access Control in WSNs

58 S-MAC: Coordinated Sleeping
Neighbor Discovery chance of failing to discover an existing neighbor corrupted SYNC packet, collisions, interference sensor – border of two schedules; discovers only the first schedule, if schedules do not overlap Periodically, listen for the complete SP frequency?  - if a sensor has no neighbors S-MAC experimental values: SP = 10 seconds Neighbor discovery period = 2 minutes, if at least 1 nbr Medium Access Control in WSNs

59 S-MAC: Coordinated Sleeping
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 Medium Access Control in WSNs

60 S-MAC: Coordinated Sleeping
Example Scenarios Listen for SYNC for RTS for CTS Sleep Receiver Tx SYNC CS Sender 1 Tx RTS Got CTS Send data CS Sender 2 Tx SYNC Tx RTS Got CTS Send data CS CS Sender 3 Medium Access Control in WSNs

61 S-MAC: Coordinated Sleeping
Adaptive Listening – Low-duty cycle to active mode * Overhearing nodes – wakeup at the end of the current transmission (duration field in RTS/CTS) ListenR ListenON RTS Sender Receiver CTS Overhearing nodes (ON) DATA ACK Sleep (based on RTS) Sleep (based on CTS) Wakes up even though it is not the correct listen-interval Not all receiver’s next-hop nodes can hear the transmission, if adaptive Medium Access Control in WSNs

62 S-MAC: Collision Avoidance
S-MAC is based on contention Similar to IEEE ad hoc mode (DCF) Physical and virtual carrier sense Randomized backoff time RTS/CTS for hidden terminal problem RTS/CTS/DATA/ACK sequence The second component in S-MAC is collision avoidance. If multiple senders want to talk to the same receiver, they need to avoid collisions. We argue that contention-based protocols have better scalability in node density than TDMA protocols, and S-MAC is contention based. The collision avoidance procedure is similar to that in ad hoc mode. That is, RTS/CTS/DATA/ACK sequence. Medium Access Control in WSNs

63 S-MAC: Collision Avoidance
The same procedure as To adopt RTS/CTS exchange and physical/virtual carrier sense. Randomized carrier sense time. Medium Access Control in WSNs

64 S-MAC: Collision-Avoidance
Collision-Avoidance Strategy ~= RTS/CTS Physical carrier sense Virtual carrier sense: network allocation vector (NAV) RTS Sender Receiver CTS Other Sensors DATA ACK NAV (based on RTS) NAV (based on CTS) Contend for medium access defer access Medium Access Control in WSNs

65 Overhearing Avoidance
Problem: Receive packets destined to others Solution: 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 and receiver How long to sleep? The duration field in each packet informs other nodes the sleep interval The third component in S-MAC is overhearing avoidance. Receiving packets destined to other nodes is a waste of energy. The basic solution is to put a node into sleep when its neighbors are talking. This idea is from PAMAS. PAMAS uses a second control channel to achieve the goal. In our solution, we only use in-channel signaling. To appropriately put nodes into sleep, we need to answer two questions. The first is, who should sleep. The short answer is, all immediate neighbors of the sender and receiver should go to sleep. The second question is, how long for them to sleep. In S-MAC, each packet has a duration field, which is the remaining time that is needed for current transmission. If a node receives any packet from its neighbor, it will learn from the duration field about how long it should sleep. Medium Access Control in WSNs

66 Overhearing Avoidance
To avoid overhearing by letting interfering nodes go to sleep after they hear a RTS or CTS packet. Who must go to sleep? All immediate neighbors of both the sender and receiver should sleep. Sleep until NAV becomes zero. E C A B D F Who should sleep when a node is transmitting? All immediate neighbors of both sender and receiver should sleep after hearing a RTS or CTS signal Use NAV to schedule the sleep timer Medium Access Control in WSNs

67 Medium Access Control in WSNs
Message Passing Problem: Sensor net in-network processing requires entire message Solution: Don’t 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 The last component in S-MAC is message passing. It is motivated by the in-network data processing, which requires efficient transmission of a meaningful unit of message, which can be quite long. Our approach is to fragment a long message into short ones, and transmit them in burst. The key is that do not interleave the transmission of different messages, since the receiver cannot start data processing if only partial of a message is received. The RTS and CTS reserve medium for the entire message. The receiver will send ACK for each received fragment. If an ACK is not received, the sender will extend transmission time and immediately re-transmit current fragment. Other nodes will sleep for long time until the whole message transmission is done. The major tradeoff here is, the fairness vs. energy and message-level latency. It’s unfair for a node with a short message to wait for a long transmission even if there are errors in the middle. Energy savings is obtained by putting nodes into sleep for long time. Message-level latency can be reduced by not interleaving different messages and by the fast retransmission of erroneous fragments. Fairness Energy Msg-level latency Medium Access Control in WSNs

68 Medium Access Control in WSNs
Message Passing Only one RTS and CTS packet are used to send the fragmented long packet. To avoid control overhead. To do overhearing avoidance.. Each RTS/CTS/DATA/ACK packet has its duration field. The duration field include expected transmission time of all fragment. Sleep until NAV becomes zero. Medium Access Control in WSNs

69 S-MAC: Efficient Message Passing
Sending a long message? As a single packet:  cost of re-transmission for message corruption RTS FRAG1 FRAG-N Sender CTS ACK ACK Receiver NAV (based on RTS) Other Sensors defer access NAV (based on CTS) Medium Access Control in WSNs

70 S-MAC: Efficient Message Passing
RTS/CTS/ACK – has duration fields in it If ACK is not received, increase the transmission time, retransmit. ACK will be also be updated. Difference between & S-MAC Medium is reserved upfront for the whole transmission in S-MAC Medium Access Control in WSNs

71 Msg Passing vs. 802.11 fragmentation
S-MAC message passing RTS 21 ... Data 19 ACK 18 CTS 20 Data 17 ACK 16 Data 1 ACK 0 Fragmentation in IEEE No indication of entire time — other nodes keep listening If ACK is not received, give up Tx — fairness Here is an example of message passing. The RTS reserves time for CTS and all subsequent data and ACK packets. The CTS reserves time for all subsequent data and ACK packets, and so as each data and ACK packet. This way, if a neighbor receives any of these packets, it knows how long it should sleep. As a comparison, we also look at the fragmentation scheme in The RTS reserves time for CTS and the first data and ACK. The first data and ACK reserves time for the second data and ACK, and so on so forth. If an ACK is not received, the sender has to give up transmission and a new contention will start to give other nodes a chance to send. Clearly, this is the promotion of fairness. But other nodes need to keep monitoring the channel, which means no sleep for them. In comparison, message passing is more energy efficient. RTS 3 ... Data 3 ACK 2 CTS 2 Data 1 ACK 0 Medium Access Control in WSNs

72 Implementation and Experiments
Platform: Mica Motes Topology: 10-hop linear network S-MAC saved a lot of energy compared with a MAC without sleep 2 4 6 8 10 5 15 20 25 30 Message inter-arrival period (S) Energy consumption (J) 10% duty cycle without adaptive listen No sleep cycles 10% duty cycle with adaptive listen Energy consumption at different traffic load Platform Mica Motes (UC Berkeley) 8-bit CPU at 4MHz, 128KB flash, 4KB RAM 20Kbps radio at 433MHz TinyOS: event-driven Medium Access Control in WSNs

73 S-MAC: An Energy-Efficient MAC Protocol
S- MAC protocol designed specifically for sensor networks to reduce energy consumption while achieving good scalability and collision avoidance by utilizing a combined scheduling and contention scheme The major sources of energy waste are: collision overhearing control packet overhead idle listening S-MAC reduce the waste of energy from all the sources mentioned in exchange of some reduction in both per-hop fairness and latency Medium Access Control in WSNs

74 Case Study 2: B-MAC [Polastre+ 2004]
Another low-power MAC for sensor networks B-MAC design considerations Simplicity: based on simple CSMA Configurable options Minimize idle listening Based on model of periodic sensor data transfer B-MAC components CSMA without RTS/CTS Optional Low-power listening (LPL) Optional ACK Medium Access Control in WSNs

75 Low-Power Listening Determine channel status by quick sampling
Very low overhead on wake-up Joe Polastre, et al., SenSys’04 Medium Access Control in WSNs

76 Medium Access Control in WSNs
Low Duty Cycle with LPL Nodes periodically sleep and perform LPL Nodes do not synchronized on listen time Sender uses a long preamble before each packet to wake up the receiver Shift most burden to the sender Medium Access Control in WSNs

77 Comparison of S-MAC and B-MAC
Collision avoidance CSMA/CA CSMA ACK Yes Optional Message passing No Overhearing avoidance Listen period Pre-defined + adaptive listen Pre-defined Listen interval Long Very short Schedule synchronization Required Not required Packet transmission Short preamble Long preamble Code size 6.3KB 4.4KB (LPL & ACK) Medium Access Control in WSNs

78 Medium Access Control in WSNs
Drawbacks 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 S-MAC fixed duty cycle – is NOT OPTIMAL Medium Access Control in WSNs

79 Case Study 3: T-MAC [Van Dam+ 2003]
Fixed duty cycle like S-MAC, is not optimal. The nodes must be deployed with an active time that can handle the highest expected load. Whenever the load is lower than that, the active time is not optimally used and energy will be wasted on idle listening An active period ends when no activation event has occurred for a time TA An Adaptive Energy-Efficient MAC Protocol for Wireless Sensor Networks [Van dam+, 2003] Medium Access Control in WSNs

80 Medium Access Control in WSNs
T-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 Communication ~= S-MAC/802.11 Frame schedule maintenance ~= S-MAC Active Sleep TA Medium Access Control in WSNs

81 Medium Access Control in WSNs
T-MAC: RTS Operation Contention Interval waiting/listening for a random time within a fixed contention interval (unlike exponential back-off in ) Tuned for max. load assumptions: load is always high, does not vary Medium Access Control in WSNs

82 Medium Access Control in WSNs
T-MAC: RTS Operation RTS Retries No CTS reply for RTS? collision receiver should not reply due to another transmission in progress (overhearing RTS/CTS of others) receiver is sleeping Solutions: wait for TA, go to sleep – receiver might be awake,and start transmission! retransmit RTS if no answer, max of 2 retries Medium Access Control in WSNs

83 Medium Access Control in WSNs
T-MAC: Choosing TA Requirement: a node should not sleep while its neighbors are communicating, potential next receiver TA > C+R+T C – contention interval length; R – RTS packet length; T – turn-around time, time bet. end of RTS and start of CTS; TA = 1.5 * (C+R+T); Medium Access Control in WSNs

84 T-MAC: Overhearing Avoidance
~= S-MAC But implemented as an option in T-MAC Node – goes to sleep after overhearing RTS/CTS of other nodes communication miss other RTS/CTS transmissions disturb the medium while waking up throughput decreases Overhearing avoidance should not used when maximum throughput is required Medium Access Control in WSNs

85 T-MAC: Asymmetric Communication
Early-Sleeping Problem – in convergecast (A to D) C – may lose medium to B (RTS) or A (B’s CTS) C loses to B; D will hear CTS from C; C loses to A; D will hear nothing, since C is silent; A B C D contend RTS CTS DATA ACK RTS? active sleep TA In order to communicate with node D, node C has to contend for the transmission channel. Node C may lose the contention of the transmission channel to node A or node B. If node C loses the contention due to a RTS packet from node B, node C shall send a CTS reply to B, which will be overheard by node D. Accordingly node D can anticipate itself as the subsequent receiver and wake up when the communication between C and B is over. However, C must remain silent if node C loses the contention due to overhearing the CTS packet from B to A. In this case node D, who is totally blind to the communication between A and B, will go to sleep after the expiration of the TA timer. Hence, even in next contention round, node C wins the contention, node C cannot talk with node D who is in sleep state. This observed behavior is called early sleeping problem since a node moves to sleep state even though a neighbor intends to communicate with it. There are two possible solutions for early sleeping problem: future request-to-send and taking priority on full buffers. Medium Access Control in WSNs

86 T-MAC: Asymmetric Communication
Future RTS (FRTS) Let others know that it cannot access the medium; C – sends FRTS – has duration field; receiver of FRTS – schedule timer; FRTS might affect data; so, DATA postponed until FRTS is over; Prevent others from taking medium, send dummy DS packet; A B C D contend RTS CTS DATA ACK active TA DS FRTS TA = C+R+T+CTS_length Future request-to-send The basic idea of future request-to-send is to inform another node there will be a message for it even though at the current time the transmission medium is not available. The operation of FRTS is shown in the Figure Once node C overhears the CTS packet from node B to node A, node C can immediately transmit a special packet called future request-to-send (FRTS) packet to node D if node C has data for node D. The FRTS packet contains the destination of FRTS packet as well as the information of the length of the ongoing data transmission which prevents node C sending data to node D. A node should not send FRTS packet if it is prohibited from data transmission. The destination node of FRTS packet must be in active state or wake up to receive data from the sender of the FRTS packet when the ongoing communication is done. The destination node gets this information from FRTS packet. To prevent another node from occupying the transmission medium, the winner of previous contention (i.e., node A) sends a small dummy Data-Send (DS) packet prior to sending a burst of data. The DS packet contains no useful information. Hence, the collision between the DS packet and the FRTS packet does not affect the following data transmission. Medium Access Control in WSNs

87 T-MAC: Asymmetric Communication
Full-Buffer Priority – suitable for unidirectional flows Buffer – almost full – prefer sending than receiving Receive RTS, send its own RTS back instead of CTS Higher chance of transmitting its own message, lesser probability of early-sleeping, limited form of flow control contend A Taking priority on full buffers The second solution is based on the observation that a node may prefer sending to receiving when the node’s transmit/routing buffers are almost full. As shown in Figure 3.12, assume that node B sends the RTS packet to node C, whose buffers are almost full. Instead of sending CTS reply to node B, node C initiates a data transfer with node D by sending RTS packet to node D. However, with this scheme, the node who is the intended receiver of prior contention winner has a higher probability to control the transmission medium. In this example, node C loses the contention with node B. But luckily, node C is the winner’s receiver and node C (not node B) actually owns the transmission medium now. Obviously, node D will not have the early sleeping problem in this case. In addition, the full-buffer priority scheme introduces a limited form of flow control into the network, which actually is useful for many nodes-to-sink communication scenarios contend B contend C RTS active D RTS CTS DATA ACK TA Medium Access Control in WSNs

88 Homogeneous Local Unicast
Send one packet to a random nbr. T-MAC: OA, no FRTS or priority over full-buffers. Medium Access Control in WSNs

89 Nodes to Sink Communication ~= Convergecast
Send message to corner node; Shortest path routing; No data aggregation; T-MAC: OA, FRTS & Full-buffer priority Medium Access Control in WSNs

90 Early-Sleeping Problem & Solutions Performance
Send message to corner node; Shortest path routing; No data aggregation; T-MAC: FRTS Vs. Priority Vs. FRTS + Priority Vs. No measures Medium Access Control in WSNs

91 Event-Based Local Unicast
Event frequency 10s; Event duration 5s; Affect 9 nodes; Send local unicast to their neighbors. Nbrs. reply with 20% probability; T-MAC: OA, no FRTS & Full-buffer priority Medium Access Control in WSNs

92 Event-Based Local Unicast, Convergecast
No event, xchg local msgs. (10bytes) every 20s; report sink every 100s; Event frequency 10s; Event duration 5s; Local unicast (30bytes) 4ps; To sink (50bytes) 1ps; Shortest path routing; Data aggregation; T-MAC: OA, no FRTS & Full-buffer priority Medium Access Control in WSNs

93 Medium Access Control in WSNs
T-MAC: An Adaptive Energy-Efficient MAC Protocol T-MAC is a contention based Medium Access Control Protocol Energy consumption is reduced by introducing an active/sleep duty cycle Handles the load variations in time and location by introducing an adaptive duty cycle It reduces the amount of energy wasted on idle listening by dynamically ending the active part of it In T-MAC, nodes communicate using RTS, CTS, Data and ACK pkts which provides collision avoidance and reliable transmission When a node senses the medium idle for TA amount of time it immediately switches to sleep TA determines the minimal amount of idle listening time per frame The incoming messages between two active states are buffered Medium Access Control in WSNs

94 Medium Access Control in WSNs
T-MAC: An Adaptive Energy-Efficient MAC Protocol The buffer capacity determines an upper bound on the maximum frame time Frame synchronization in T-MAC follows the scheme of virtual clustering as in S-MAC The RTS transmission in T-MAC starts by waiting and listening for a random time within a fixed contention interval at the beginning of the each active state The TA time is obtained using TA > C + R + T T-MAC suffers from early sleeping problem Its overcome by sending Future request to send or taking priority on full buffers Medium Access Control in WSNs

95 Medium Access Control in WSNs
T-MAC: An Adaptive Energy-Efficient MAC Protocol Advantages: The T-MAC protocol is designed particularly for wireless sensor networks and hence energy consumption constraints are taken into account The T-MAC protocol tries to reduce idle listening by transmitting all messages in bursts of variable lengths and sleeping between burst T-MAC facilitates collision avoidance and overhearing -- nodes transmit their data in a single burst and thus do not require additional RTS/CTS control packets. By stressing on RTS retries, T-MAC gives the receiving nodes enough chance to listen and reply before it actually goes to sleep -- this increases the throughput in the long run Medium Access Control in WSNs

96 Medium Access Control in WSNs
T-MAC: An Adaptive Energy-Efficient MAC Protocol Disadvantages: The authors do not outline how a sender node would sense a FRTS packet and enable it to send a DS packet Also sending a DS packet increases the overhead. The network topology in the simulation considers that the locations of the nodes are known T-MAC has been observed to have a high message loss phenomenon T-MAC suffers from early sleeping problem for event based local unicast Medium Access Control in WSNs

97 Medium Access Control in WSNs
T-MAC: An Adaptive Energy-Efficient MAC Protocol Suggestions/Improvements/Future Work: If a buffer is full there would be a lot of dropped packets decreasing the throughput. A method to overcome this drawback is that we could have the node with its buffer 75% full broadcast a special packet Buffer Full Packet MAC Virtual Clustering technique needs to be further investigated An adaptive election algorithm can be incorporated where the schedule and neighborhood information is used to select the transmitter and receivers for the current time slot, hence avoiding collision and increasing energy conservation Medium Access Control in WSNs

98 MAC Design for Sensor Networks
MAC protocols can be classified as scheduled and contention-based Major considerations Energy efficiency Scalability and adaptivity to number of nodes Major ways to conserve energy Low duty cycle to reduce idle listening Effective collision avoidance Overhearing avoidance Reducing control overhead Trade-offs for sensor network MAC performance <--> energy efficiency Schedule-based MAC avoid collision , idle listening, as well as overhearing Contention-based MAC has to deal with all the sources of energy waste SMACS addresses collision issue; PAMAS addresses overhearing issue; S-MAC reduce wastage of energy from all four sources of energy inefficiency. Medium Access Control in WSNs

99 Medium Access Control in WSNs
References [Ye+ 2002] W. Yei, et al., Energy-Efficient MAC Protocol for Wireless Sensor Networks, Proceedings of the Twenty First International Annual Joint Conference of the IEEE Computer and Communications Societies (INFOCOM 2002), New York, NY, USA, June [Woo+ 2003] A. Woo et al., A Transmission Control Scheme for Media Access in Sensor Networks, Proceedings of the ACM/IEEE International Conference on Mobile Computing and Networking, Rome, Italy, July 2001, pp [Van Dam+ 2003] T. V. Dam et al., An Adaptive Energy-Efficient MAC Protocol for Wireless Sensor Networks, ACM SenSys, Los Angeles, CA, November, 2003. [Polastre+ 2004] J. Polastre et al., Versatile Low Power Media Access for Wireless Sensor Networks, In Proceedings of the Second ACM Conference on Embedded Networked Sensor Systems (SenSys), November 3-5, 2004 [Leopold ] M Leopold, M. B. Dydensborg, and P. Bonnet, Bluetooth and Sensor Networks: A Reality Check, ACM SenSys, Los Angeles, CA, November, 2003. [Heinzelman+ 2000]W. R. Heinzelman, A. Chandrakasan, and H. Balakrishnan, Energy-efficient communication protocols for wireless microsensor networks, in Proc. of the Hawaii International Conference on Systems Sciences, Jan [Karn 1990] P. Karn, MACA: A new channel access method for packet radio, in Proc. of the 9th ARRL Computer Networking Conference, London, Ontario, Canada, Sept. 1990, pp. 134–140. [Bharghavan+ 1994] V. Bharghavan, A. Demers, S. Shenker, and L. Zhang, MACAW: A media access protocol for wireless lans,” in Proc. of the ACM SIGCOMM, London, UK, Sept. 1994, pp. 212–225. [Sohrabi+ 2000] K. Sohrabi et al., Protocols for Self-Organization of a Wireless Sensor Network,” IEEE Pers. Commun., Oct. 2000, pp. 16–27. [Bennett+ 1997] F. Bennett et al., Piconet: Embedded mobile networking,” IEEE Personal Communications Magazine, vol. 4, no. 5, pp. 8–15, Oct [Tseng+ 2002] Yu-Chee Tseng et al., Power-saving protocols for IEEE based multi-hop ad hoc networks,” in Proc. of the IEEE Infocom, New York, NY, June 2002, pp. 200–209. [Singh+ 1998] S. Singh et al., PAMAS: Power aware multi-access protocol with signalling for ad hoc networks,” ACM Computer Communication Review, vol. 28, no. 3, pp. 5–26, July 1998. Medium Access Control in WSNs

100 Medium Access Control in WSNs
Questions? Medium Access Control in WSNs


Download ppt "Medium Access Control in WSNs"

Similar presentations


Ads by Google