mac for wireless sensor networks
DESCRIPTION
MAC for Wireless Sensor Networks. Present by: Yang Liu AICIP Research Sep. 7, 2004. Example: Cocktail party – many people gather together in a large room. broadcast medium – air Human rules: Give everyone a chance to speak. Don’t speak until you are spoken to. - PowerPoint PPT PresentationTRANSCRIPT
Present by: Yang LiuAICIP ResearchSep. 7, 2004
MAC for Wireless Sensor Networks
Multiple Access Problem
Example:Cocktail party – many people gather together in a large room. broadcast medium – air
Human rules: Give everyone a chance to speak.Don’t speak until you are spoken to.Don’t interrupt when someone is speakingRaise your hand if you have a questionDon’t fall asleep when someone else is talking…
Problem Statement
The same thing in Sensor Networks?Multiple sensor nodes want to communicate in a common geographic area using shared communication medium. Such as RF.
Problem: How should we coordinate and schedule the access of multiple sending and receiving nodes to a single shared broadcasting channel?How should we allocate our resources so that as many nodes as possible can communicate simultaneously?
5
7
1
2
4
36
Physical
MAC
Routing
Application
Motivation
What are the design goals?High throughput or good channel utilization;
Low latency or even plus real time support;
Fairness;
Efficient;
Simple and decentralized;
Wireless Medium Access Outline
Wireless Multiple Access Protocols
Scheduled Based Protocols
Contention Based Protocols
Other Protcols
FDMA
TDMA
CDMA
ALOPHA/SLOTTED ALOPHA
CSMA
CSMA/CA
Polling
MACA/MACAW IEEE 802.11
IEEE 802.15.4
TDMA/FDMA
TDMA:Divide time into frames Further divide each frame into N slots (number of competing nodes )Each node will have R/N rate. R is the total bandwidth.
FDMA:Divide the R bps channel into different frequency bands.
Assign each frequency to one of N nodes.
Cons:A node is limited to a bandwidth R/N, even when it is the only node with packets to send
Centralized Scheduling and synchronization is needed
Link Bandwidth
FDMA
SubBandwidth
SubBandwidth
1 2 3 N 1 2 3 N 1 2 3 N
Frame Slot
TDMA
CDMA
CDMA (code Division Multiple Access)
unique “code” assigned to each user.
All users share the same frequency, but each user has own “chipping” sequence (ie, code)
encoded signal = (original signal) X (chipping sequence)
decoding: innerproduct of encoded signal and chipping sequence
chipping sequences must be chosen orthogonal to each other
Wireless Medium Access Outline
Wireless Multiple Access Protocols
Scheduled Based Protocols
Contention Based Protocols
Other Protcols
FDMA
TDMA
CDMA
ALOPHA/SLOTTED ALOPHA
CSMA
CSMA/CA
Polling
MACA/MACAW IEEE 802.11
IEEE 802.15.4
ALOHA/Slotted ALOHA
Pure ALOHA:Transmit a packet when it is generated
If the data transmission succeed, receiver responses with a ACK.
In case of collision, sender retransmit after a random period.
Slotted ALOHA:Time is divided into slots and nodes only transmit at the beginning of slots.
The length of a time slot equals to the length of the packet duration.
No partial overlap between packets.
Pros and ConsSimplePoor use of the channel capacity: 18% for Pure ALOHA and 36% for Slotted ALOHA.
A
B
C
D
E
F
Pure ALOHA
Slotted ALOHA
CSMA
Carrier Sense Multiple Access Key issues: it should not send if someone else is sending.
Strategies: Persistent and non-persistent CSMA
Persistent Strategy: reduces chance of collisions and also reduces the efficiency
Non-persistent Strategy: increases the chance for collisions.
Sense Channel
Free?
Wait
Send out the frame
Yes
No
Sense Channel
Free?
Send out the frame with Probability p
Yes
No
Non-persistant P-Persistant
DATA
CSMA/CA
Carrier Sense Multiple Access/Collision Avoidance Hidden Terminal and Exposed Terminal Problems:
RTS/CTS/DATA: Proposed in MACA
RTS/CTS/DATA/ACK: Proposed in MACAW
B CA D B CA DX
A B
RTS
CTSDATA
Hidden Terminal Exposed Terminal
A B
RTS
CTS
MACA
MACAW
ACK
A B
RTS
CTSDATADATA ACKDS
DCF ( Distributed Coordination Function) with Virtual Carrier Sense
Backoff Time ( Exponential Backoff Algorithm ) Backoff Time = rand() X SlotTimewhere rand() = [0,CW] CWmin <= CW <= CWmaxSlotTime = The value of the corresponding PHY characteristicCWnew = ( CWold + 1) x PF - 1 where PF =2
IEEE 802.11
Sender
Receiver
Other Nodes
RTSDIFS
CTS
SIFS
DATA
SIFS
ACK
SIFS DIFS
NAV(RTS)
NAV(CTS)
Contention Window
DIFS: Distributed Inter Frame Space 802.11 FH PHY 128 microseconds
SIFS: Short Inter Frame Space 28 micorseconds
NAV: Network Allocation Vector
PCF ( Point Coordination Function)a wireless channel has a superframe structure (contention Free Repetition Interval) that consists of a contention free period (CFP) and contention period (CP).
IEEE 802.11
Super Frame (Contention Free Repetition Interval)
Contention Free Period Contention Period
Becon Poll1 Data + Poll2 ACK END RTS DATA Becon
Becon
Becon
Becon
Becon
Poll1
Data + Poll2 ACK
CTS ACK
NAV
NAV
Point Coordinator
Station 1
Station 2
DIFS
SIFS
PIFSSIFSPIFS
SFIS<PIFS<DIFS
Null Frame
Wireless Medium Access Outline
Wireless Multiple Access Protocols
Scheduled Based Protocols
Contention Based Protocols
Other Protcols
FDMA
TDMA
CDMA
ALOPHA/SLOTTED ALOPHA
CSMA
CSMA/CA
Polling
MACA/MACAW IEEE 802.11
IEEE 802.15.4
Polling
All data exchanges made through the primary deviceprimary device controls the channel and is initiator of the session
polling delaychannel becomes inoperative if master device failsExample: 802.15.4
IEEE 802.15.4 ( 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.
IEEE 802.15.4 ( ZigBee )
ZigBee End Device (RFD or FFD)
ZigBee Router (FFD)
ZigBee Coordinator (FFD)
Mesh Link
Star Link
Specify three DevicesNetwork CoordinatorFull Function Device (FFD) Powerful and can talk to any deviceReduced Function Device (RFD) Can only talk to a FFD.
IEEE 802.15.4 ( ZigBee )
CoordinatorNetwork Device
DATA RequestACK
DATAACK
Communication in a non-beacon Enabled Network
CoordinatorNetwork Device
DATA
ACK (Optional)
CoordinatorNetwork Device
DATA Request
ACK
DATA
ACK
Beacon
CoordinatorNetwork Device
DATA
ACK (Optional)
Beacon
Communication in a beacon Enabled Network
BeaconControl information
Allocate GTS
Synchronization
CAPAllows contention via CSMA
CFPTime slot allocation specified in the beacon
Reserved bandwidth for DEV
Medium Access for Sensor Networks
Characteristics of MAC in WSNEnergy Efficiency
QoS provision
Self-Organization
Simple and distributed solution
Energy Waste of MAC
Idle listeningListening to receive possible traffic that is not sent
major source of energy inefficiency
CollisionPacket retransmission increases energy consumption.
Overhearingpicking up packets that are destined to other nodes
Communication OverheadRequired frame header to implement MAC
SMAC
Approaches: Contention-based MAC with various energy-conserving features.
Periodic listen and sleep
Collision avoidance ( IEEE 802.11)
Overhearing avoidance
Put nodes into sleep when neighbors are talking
Massage passing
Long message is fragmented and sent in burst
RTS/CTS reserve time for entire message
Problems:Fix duty cycle while traffic in sensor networks are busty.
Multiple on/sleep schedule on the edge nodes which results in unbalanced energy cost and losing communication coverage
On/sleep synchronization involves much communication overhead.
sleeplisten listen sleep
SMAC
TMAC
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
TA > CW + R + TCW : the length of the contention intervalR : the length of RTS packetT : the short time between the end of the RTS packet and the beginning of the CTS packet
EQ-MAC ROADMAP
MotivationEnergy Efficiency
Why energy efficiency? - Sensor networks consist of a couple of powerful sensor nodes which we call sensor sink and a bunch of battery powered sensor nodes which can not be recharged once running out of power. How? - Communication is the main contributor for energy consumption.
To avoid unnecessary communications ( transmitting, receiving and idle listening)
To balance energy cost among all nodes based on their residual energy.
A simple MAC Layer Protocols is preferred.
Differentiate ServicesWhat is service for sensor node? -- Clearly data transmissionWhy needs to differentiate Services?
Sensing reading from different types of sensors may have different importance for a specified application
Aggregated data is clearly more important the normal sensing data.
A data packet which is already transmitted for several hops maybe need higher transmitting bandwidth compared with new generated data packets or data packets which have been transmitted for less hops.
Any More Reasons?
Assumptions
Energy Constrains
Highly redundancy ( in-network processing are used to reduce the redundancy )
Periodical and busty traffic are both existed
Periodical traffic: periodical sensing the fieldBusty traffic: the traffic triggered by sensing event.
Multi-hops wireless data communications.
Queue Architecture
Weighted Queuing Algorithm
Parameters: weights for each queueWhile (at the starting of a new frame)
if the size of instant queue > 0
next packet = the first packet in the instant queue
else
Calculate rate using MAX-MIN Fairness Algorithm;
Find out which packet needed to be served first by using Packetized Generalized Processor Sharing (GPS) and set it
to next packet;
end
End
MAX-MIN Fairness Algorithm
R
W1
W2
WiR1
N flows share a link of rate C, flow i's expectation rate is wi. It is allocated rate ri.
Algorithm Outline:1. Pick the flow i with the smallest requested rate.
2. If wi < C/N, then set ri = wi ;
3. If wi > C/N, then set ri = C/N ;
4. Set N = N -1, C = C - ri ;
5. If N > 0 goto 1
Packetized GPS
R(f1) = 0.1
R(f3) = 0.3R1
C
R(f4) = 0.3
R(f2) = 0.3
Order of service for the four queues:
… f1, f2, f2, f2, f3, f3, f3, f4, f4, f4, f1,…
Generalized Processor Sharing (GPS)
Packetized GPSserve a whole packet at a timeDetermine what time a packet, p, would complete if we served flows bit-by-bit. Call this the packet’s finishing time, F.Serve packets in the order of increasing finishing time.
The time of each sensor node has been divided into frames and then further divided into time slots.
Each frame consists of Contention Period (CP) and data Transmission Period (TP).RTS/CTS/TS/DATA/ACK are used for packet transmission.Energy saving achieves from the node (except sender and receiver ) sleeping during TP.The starting time of the first frame can be decide through network-wide broadcasting by sensor sink and can be resynchronized by the same way.Only Loosely synchronization is required because of random access nature
Power Saving MACAW
The reasons for framing: Each node contend for channel at the starting time of a frame which ensure the fairness of node transmission. It also provides the fundamental requirement of our next proposed Loosely Prioritized Random Access protocols. Since each node contends the channel at the same time, by assigning them with different waiting time, we can coordinate the data transmission among multiple nodes.
The same frame schedule of all sensor nodes make communication easier since all the nodes can always hear the RTS/CTS
messages. In order to achieve the same thing,
SMAC has extra sacrifice for consuming more
energy for the edge nodes.
Simple and have a very good scalability for largeScale Wireless Sensor Networks.
Power Saving MACAW
Loosely Prioritized Random Access
Provide a mechanism to assign the channel access to high transmission priority sensor nodes.Solution:
Measuring the transmission priority of a sensor node
Divide the Contention Period into N priority levels. Distribute the random access into sub contention period
which is decided by the priority level of sensor node.
Loosely Prioritized Random Access
Solution: (cont)Division of Contention Periods.
LPRA algorithm for random access
Loosely Prioritized Random AccessLPRA Algorithm:If ( next transmitting packet != null ) && ( at the starting time of a frame)
calculate the urgency of the packet
calculate the priority level of the packet
calculate the contention time (CT)
wait for CT;
if ( no packet received during CT )
while ( current time < end of CP of this frame )
transmit RTS and wait for CTS;
listening the channel;
if ( collision happen )
recalculate CT;
retransmit RTS and wait for CTS;
end
if (receive CTS)
break;
end
end
transmit TS;
transmit Data and Wait for ACK;
else
Loosely Prioritized Random AccessLPRA Algorithm: (cont)
else
while ( current time < the end of CP of this frame)
if ( receive packet is RTS or CTS )
stop contend for channel;
wait for TS;
end
if ( receive packet is TS )
stop contend for channel;
sleep to the duration specified in TS;
end
if ( detect collision) && ( collision time < CT )
stop contend for channel;
wait for TS;
end
end
if ( current time > the end of CP of this frame ) && ( no TS received )
sleep to the beginning of next frame;
end
end
if ( time > the end of CP of this frame ) && ( nothing happened )
sleep until the beginning of next frame;
end
Loosely Prioritized Random AccessCollision Reduction:
High priority transmission nodes continue to access the channel when meeting collision during the Contention Period (CP). Low priority nodes constrain accessing the channel when they detection collision from high priority node or successfully receives RTS, CTS, TS.Apply a pseudo random number generator which is based on optimal Probability distribution function which minimizing the happening of
collision.
1 CWcollision
1 CW without collision
Differentiate ServicesApplication Level
Extra four bits in application header to represent the criticality of packets
Sensor Types ( different sensors )
Data Types ( Periodic Sensing data or aggregation data )
Control Messages ( for routing, security usage )
Synchronization packets, reconfiguration packets of sensor networks has the highest priority and needed to be transmit instantly.
Network LevelExtra three bits at network header to represents the number of hops that a packet has been transmitted.
MAC LevelCombine both information from Application layer and network layer to form the MAC level priority which is used for real transmitting.
Collision RecoveryRTS/CTS control packets collision recovery can been seen in LPRAFor data packet collision, it involves two scheme
High priority data packets, generate a CT from [0, CW/2]Low priority data packets, increase the priority level by one which means increasing the CT to average CW.Since most low priority packets are periodic sensor reading, therefore,
it is
Possible that other nodes have already transmitted the sensing data. So we
Can defer the data transmission by increasing priority levels. Furthermore,
If difference of sensing time and current time is beyond certain threshold,
We can delete the sensing data directly.
Next TimeTalk on related work of Sensor Mac designPresents Comprehensive simulation environment and simulation results.
Any Questions?