Presentation on theme: "Present by: Yang Liu AICIP Research Sep. 7, 2004 MAC for Wireless Sensor Networks."— Presentation transcript:
Present by: Yang Liu AICIP Research Sep. 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 speaking Raise your hand if you have a question Don’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?
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
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
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
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 Cons Simple Poor use of the channel capacity: 18% for Pure ALOHA and 36% for 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.
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 BCA D BCA D X A B RTS CTS DATA Hidden TerminalExposed Terminal A B RTS CTS MACA MACAW ACK A B RTS CTS DATA DATA ACKDS
DCF ( Distributed Coordination Function) with Virtual Carrier Sense Backoff Time ( Exponential Backoff Algorithm ) Backoff Time = rand() X SlotTime where rand() = [0,CW] CWmin <= CW <= CWmax SlotTime = The value of the corresponding PHY characteristic CWnew = ( CWold + 1) x PF - 1 where PF =2 IEEE
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
Wireless Medium Access Outline
Polling All data exchanges made through the primary device primary device controls the channel and is initiator of the session polling delay channel becomes inoperative if master device fails Example:
IEEE ( ZigBee ) Industry standard through application profiles running over IEEE radios Target applications are sensors networks, interactive toys, smart badges, remote controls, and home automation.
IEEE ( ZigBee ) ZigBee End Device (RFD or FFD ) ZigBee Router (FFD) ZigBee Coordinator (FFD) Mesh Link Star Link Specify three Devices Network Coordinator Full Function Device (FFD) Powerful and can talk to any device Reduced Function Device (RFD) Can only talk to a FFD.
IEEE ( ZigBee ) Beacon Control information Allocate GTS Synchronization CAP Allows contention via CSMA CFP Time slot allocation specified in the beacon Reserved bandwidth for DEV
Medium Access for Sensor Networks Characteristics of MAC in WSN Energy Efficiency QoS provision Self-Organization Simple and distributed solution
Energy Waste of MAC Idle listening Listening to receive possible traffic that is not sent major source of energy inefficiency Collision Packet retransmission increases energy consumption. Overhearing picking up packets that are destined to other nodes Communication Overhead Required frame header to implement MAC
SMAC Approaches: Contention-based MAC with various energy- conserving features. Periodic listen and sleep Collision avoidance ( IEEE ) 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. sleep listen sleep
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 + T CW : the length of the contention interval R : the length of RTS packet T : the short time between the end of the RTS packet and the beginning of the CTS packet
Motivation Energy 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 Services What is service for sensor node? -- Clearly data transmission Why 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 field Busty traffic: the traffic triggered by sensing event. Multi-hops wireless data communications.
Weighted Queuing Algorithm Parameters: weights for each queue While (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 N flows share a link of rate C, flow i's expectation rate is w i. It is allocated rate r i. Algorithm Outline: 1. Pick the flow i with the smallest requested rate. 2. If w i < C/N, then set r i = w i ; 3. If w i > C/N, then set r i = C/N ; 4. Set N = N -1, C = C - r i ; 5. If N > 0 goto 1
Packetized GPS R(f 1 ) = 0.1 R(f 3 ) = 0.3 R1R1 C R(f 4 ) = 0.3 R(f 2 ) = 0.3 Order of service for the four queues: … f 1, f 2, f 2, f 2, f 3, f 3, f 3, f 4, f 4, f 4, f 1,… Generalized Processor Sharing (GPS) Packetized GPS serve a whole packet at a time Determine 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 large Scale 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 Access LPRA 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 transmit TS; transmit Data and Wait for ACK; else
Loosely Prioritized Random Access LPRA 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 if ( current time > the end of CP of this frame ) && ( no TS received ) sleep to the beginning of next frame; end if ( time > the end of CP of this frame ) && ( nothing happened ) sleep until the beginning of next frame; end
Loosely Prioritized Random Access Collision 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. 1CW collision 1CW without collision
Differentiate Services Application 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 Level Extra three bits at network header to represents the number of hops that a packet has been transmitted. MAC Level Combine both information from Application layer and network layer to form the MAC level priority which is used for real transmitting.
Collision Recovery RTS/CTS control packets collision recovery can been seen in LPRA For 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 Time Talk on related work of Sensor Mac design Presents Comprehensive simulation environment and simulation results. Any Questions?