You are on page 1of 47

Internet of Things Rekayasa Internet

MAC of WSN Susmini I. Lestariningati, M.T


Internet Engineering @lestariningati

Introduction to Internet of Things

• The Internet

• A network of networks

• Using a physical cable or wireless media for connection

• Transitioning to the IoT

Sistem Komputer 2
Internet Engineering @lestariningati

Outline

• Introduction to MAC

• MAC attributes and trade-offs

• Scheduled MAC protocols

• Contention-based MAC protocols

• Case studies

• Summary

Sistem Komputer 3
Internet Engineering @lestariningati

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

Sistem Komputer 4
Internet Engineering @lestariningati

Where Is the MAC?

• Network model from Internet

Application layer
Transport layer End-to-end reliability, congestion control

Network layer Routing

Link/MAC layer Per-hop reliability, flow control, multiple access

Physical layer Packet transmission and reception

• A sublayer of the Link layer

– Directly controls the radio

– The MAC on each node only cares about its neighborhood

Sistem Komputer 5
Internet Engineering @lestariningati

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

Sistem Komputer 6
Internet Engineering @lestariningati

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

Sistem Komputer 7
Internet Engineering @lestariningati

Characteristics of Sensor Network

• A special wireless ad hoc network

– Large number of nodes


Scalability & Self-configuration
– Battery powered
Energy efficiency
– Topology and density change
Adaptivity
– Nodes for a common task
Fairness not important
– In-network data processing
Message-level Latency
• Sensor-net applications

– Sensor-triggered bursty traffic


Adaptivity
– Can often tolerate some delay
Trade for energy
• Speed of a moving object places a bound on network reaction time

Sistem Komputer 8
Internet Engineering @lestariningati

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

Sistem Komputer 9
Internet Engineering @lestariningati

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

Sistem Komputer 10
Internet Engineering @lestariningati

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

Sistem Komputer Medium Access Control in WSNs 11


Internet Engineering @lestariningati

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

Sistem Komputer Medium Access Control in WSNs 12


Internet Engineering @lestariningati

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


Dominant factor
• Idle listening consumes 50—100% of the power for receiving (Stemm97, Kasten)

Sistem Komputer Medium Access Control in WSNs 13


Internet Engineering @lestariningati

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

Sistem Komputer Medium Access Control in WSNs 14


Internet Engineering @lestariningati

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

Sistem Komputer Medium Access Control in WSNs 15


Internet Engineering @lestariningati

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

Sistem Komputer 16
Medium Access Control in WSNs
Internet Engineering @lestariningati

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

subChannel 1
Bandwidth

subChannel 2

subChannel 3

subChannel 4

Time

Sistem Komputer 17
Internet Engineering @lestariningati

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

Sistem Komputer Medium Access Control in WSNs 18


Internet Engineering @lestariningati

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 802.11 infrastructure mode (CPF)

• Bluetooth piconets

Sistem Komputer Medium Access Control in WSNs 19


Internet Engineering @lestariningati

Scheduled Protocols: Bluetooth

• Wireless personal area network (WPAN)

– Short range, moderate bandwidth, low latency

– IEEE 802.15.1 (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

Sistem Komputer Medium Access Control in WSNs 20


Internet Engineering @lestariningati

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 + 2003])

Sistem Komputer Medium Access Control in WSNs 21


Internet Engineering @lestariningati

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

Sistem Komputer Medium Access Control in WSNs 22


Internet Engineering @lestariningati

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

Sistem Komputer Medium Access Control in WSNs 23


Internet Engineering @lestariningati

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

Sistem Komputer Medium Access Control in WSNs 24


Internet Engineering @lestariningati

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

collision

sender A

sender B

sender C
t
• Slotted Aloha collision

sender A

sender B

sender C
t

Sistem Komputer Medium Access Control in WSNs 25


Internet Engineering @lestariningati

Contention Protocols: CSMA/CA

• Hidden terminal problem

a b c
Node a is hidden from c’s carrier sense

– 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

Sistem Komputer Medium Access Control in WSNs 26


Internet Engineering @lestariningati

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

Sistem Komputer 27
Internet Engineering @lestariningati

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

Sistem Komputer 28
Internet Engineering @lestariningati

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

Sistem Komputer Medium Access Control in WSNs 29


Internet Engineering @lestariningati

Contention Protocols: IEEE 802.11

• IEEE 802.11 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

Sistem Komputer Medium Access Control in WSNs 30


Internet Engineering @lestariningati

Contention Protocols: IEEE 802.11 (cont.)


• 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 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

Sistem Komputer 31
Internet Engineering @lestariningati

Contention Protocols: IEEE 802.11 (cont.)

• Unicast example of PS mode in 802.11 DCF

Sistem Komputer 32
Internet Engineering @lestariningati

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

Sistem Komputer Medium Access Control in WSNs 33


Internet Engineering @lestariningati

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.

Sistem Komputer Medium Access Control in WSNs 34


Internet Engineering @lestariningati

SMACS Operation

Sistem Komputer Medium Access Control in WSNs 35


Internet Engineering @lestariningati

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

Sistem Komputer Medium Access Control in WSNs 36


Internet Engineering @lestariningati

Scheduled vs. Contention Protocols

Scheduled Protocols Contention Protocols

Collisions No Yes

Energy efficiency Good Need improvement

Scalability and adaptivity Bad Good

Multi-hop communication Difficult Easy

Time synchronization Strict Loose or not required

Sistem Komputer 37
Medium Access Control in WSNs
Internet Engineering @lestariningati

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

Sistem Komputer Medium Access Control in WSNs 38


Internet Engineering @lestariningati

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

Sistem Komputer 39
Internet Engineering @lestariningati

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.

Sistem Komputer Medium Access Control in WSNs 40


Internet Engineering @lestariningati

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

Sistem Komputer 41
Internet Engineering @lestariningati

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

Sistem Komputer Medium Access Control in WSNs 42


Internet Engineering @lestariningati

Energy-Efficient MAC Design

• Asynchronous sleeping – by Tseng, et al.

– Extend 802.11 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

Sistem Komputer Medium Access Control in WSNs 43


Internet Engineering @lestariningati

Energy-Efficient MAC Design

• ZigBee

– Industry standard through application profiles running over IEEE 802.15.4 radios

– Target applications are sensors networks, interactive toys, smart badges, remote controls, and
home automation

Sistem Komputer 44
Medium Access Control in WSNs
Internet Engineering @lestariningati

Contention Protocols: ZigBee

• Based on IEEE 802.15.4 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

Sistem Komputer Medium Access Control in WSNs 45


Internet Engineering @lestariningati

Contention Protocols: ZigBee (cont.)


• Low power, low rate (250kbps) radio

• MAC layer supports low duty cycle operation

– Target node life time > 1 year

Sistem Komputer Medium Access Control in WSNs 46


Internet Engineering @lestariningati

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 23-27 2002.

• [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. 221-235.

• [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 + 2003] 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. 2000.

• [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. 1997.

• [Tseng+ 2002] Yu-Chee Tseng et al., Power-saving protocols for IEEE 802.11-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.

Sistem Komputer 47

You might also like