wireless sensor network

97
Wireless Sensor Network: MAC protocol 김대우 1

Upload: deawoo-kim

Post on 16-Jul-2015

338 views

Category:

Engineering


0 download

TRANSCRIPT

Page 1: Wireless sensor network

Wireless Sensor Network:MAC protocol

김대우

1

Page 2: Wireless sensor network

2

Page 3: Wireless sensor network

INTRODUCTION TO WSN01

3

Page 4: Wireless sensor network

Introduction to WSN

Definition:

• A sensor network is composed of a large number of sensor nodes that are densely deployed inside or very close to the phenomenon

– Multi-hop, self-organize

– Wireless communication

– Cooperative sensing, collection, process

– Send to observe.

4

Page 5: Wireless sensor network

Introduction to WSN

WSN communication Architecture

5

Wireless Communicationlink

Sensor fieldInaccessibleEnvironment

Sinkor

Base station (BS)

To Externalnetwork

Sensors

Page 6: Wireless sensor network

• Intel Research Laboratory at Berkeley initiated a collaboration with the College of the Atlantic in Bar Harbor and the University of California at Berkeleyto deploy wireless sensor networks on Great Duck Island, Maine (in 2002)

• Monitor the microclimates in and around nesting burrows used by the Leach's Storm Petrel

• Goal : habitat monitoring kit for researchers worldwide

Habitat Monitoring on Great Duck Island

Introduction to WSN

Page 7: Wireless sensor network

Introduction to WSN

• Wildfire Instrumentation System Using Networked Sensors

• A project by University of California, Berkeley CA.

FireBug

Page 8: Wireless sensor network

Introduction to WSN

Application

8

Page 9: Wireless sensor network

Introduction to WSN

• Differences between WSN and ad-hoc network

– Battery powered nodes Energy efficiency

– Large quantity of densely deployed nodes

– This dense deployment brings high degree of interactions

– Resources constraint

– Auto configuration and auto organization

9

Page 10: Wireless sensor network

Design Considerations

• Level 1 issues

– Energy efficiency • Often difficult recharge batteries or replace them

• Prolonging the life-time is important

– Collision avoidance - a basic task of MAC protocols

– Good scalability

– Hardware Constraints• Clock drift

• Memory Constraints

• Level 2 issues

– Latency, fairness, throughput, bandwidth

10

Page 11: Wireless sensor network

The sensor network protocol stack

11

• Power management• Mobility management

- Sensor node의 움직임

• Localization- Sensor node의 위치

• Synchronization

Page 12: Wireless sensor network

MEDIUM ACCESS CONTROL02

12

Page 13: Wireless sensor network

MAC

• Link

– 통신 경로상의 인접한 노드들을 연결하는 통신 채널을 링크라고 한다.

• Link의 종류

– Point-to-point link

– Broadcast link• multiple access problem

13

Page 14: Wireless sensor network

Challenges for MAC

• Energy Consumption

– Idle listening

– Collisions

– Protocol overhead

– Overhearing

– Transmit vs. receive power

• Event-based Networking

• Correlation

14

Page 15: Wireless sensor network

WSN에서 MAC

• 3 Types of MAC techniques

– Contention Based

– Reservation Based

– Hybrid solution

• CSMA, TDMA가 사용된다.

– FDMA : BW의 한계 때문에 사용하기 힘들다• Narrow band

– OFDMA, CDMA의 경우 cost constraints

15

Page 16: Wireless sensor network

CONTENTION-BASED MAC02-1

16

Page 17: Wireless sensor network

Carrier Sense Multiple Access(CSMA)

• Listen before transmitting

• Stations sense the channel before transmittingdata packets.

17

S R H

X Collision at R

Hidden Terminal Problem

Page 18: Wireless sensor network

CSMA with Collision Avoidance

• Stations carry out a handshake to determine which one can send a data packet

18

S R H

RTSCTS

Data

ACK Backoff due to CTS

Page 19: Wireless sensor network

Contention-Based Medium Access

• 장점

– Flexible

– Robustness

– Scalability

– With out Message exchanges, infrastructure

• 단점

– Density 높아지면 collision probability 높아진다

19

Page 20: Wireless sensor network

Contention-Based Medium Access

• CSMA/CA

– Energy efficiency가 낮다• Idle listening

• Sleeping mode

20

Page 21: Wireless sensor network

AsynchronousSynchronous

Contention-Based Medium Access

21

Contention-

based MAC

S-MAC B-MAC CC-MAC

Page 22: Wireless sensor network

Synchronous MAC

• Nodes define common active/sleep periods

Active period

– Used for communication

Sleep period

– Saving energy

• Nodes maintain a certain level of synchronization

22

Page 23: Wireless sensor network

S-MAC

• Design

– Goal• Reduce energy consumption

• Support good scalability and collision avoidance

– Solutions to energy inefficiency issues• Collision avoidance - using RTS and CTS

• Overhearing avoidance - switching the radio off when the transmission is not meant for that node

• Control overhead - Message Passing

• Idle listening - Periodic listen and sleep

23

Page 24: Wireless sensor network

S-MAC (Sleep MAC)

• Goal: Reduce idle listening -> power save

• Trade off : throughput, latency

– Virtual Cluster 구성

24

Page 25: Wireless sensor network

Network Assumption

• Composed of many small nodes

– Short-range, multi-hop communication

• Most communication will be between nodes as peers, rather than to a single base station

• In-network processing is critical to network life time

25

Page 26: Wireless sensor network

• Periodic listen and Sleep

– Duty Cycle

– MAC scheme

Periodic Listen and Sleep

26

Page 27: Wireless sensor network

Choosing Schedule (Virtual cluster)

27

Listen first

Set its own

schedule

(Synchronizer)

Broadcast SYNC

Listen SYNC

w/o neighbor

discard schedule

Follow the

schedule

(Follower)

Announce its

schedule

Both schedules

(Border Node)

No signal SYNC

Page 28: Wireless sensor network

Border Node

• Not all neighboring nodes can synchronize together

• Border node follow both schedule

28

Schedule 2

Schedule 1

Page 29: Wireless sensor network

Maintaining Schedule

• Synchronization error

– Clock Drift

• Solution

– Relative timestamp

– Listen period is significantly longer than clock drift rates

29

Page 30: Wireless sensor network

Collision Avoidance

• Problem: Multiple senders want to talk

• Solution: Following IEEE 802.11 ad hoc procedures

– Carrier sense

– Randomized backoff time

– RTS/CTS for hidden terminal problem

– RTS/CTS/DATA/ACK sequence

30

Page 31: Wireless sensor network

Overhearing Avoidance

• Problem: Receive packets destined to others

• Solution: Letting other nodes sleep after they hear an RTS or CTS packet

– Which nodes should sleep?• All neighbors except sender and receiver

– How long?• The duration field in each packet informs other nodes the

sleep interval

• Sleep until the NAV becomes zero

31

Page 32: Wireless sensor network

Adaptive Listening

• Problem : There is potential Delay on each hop

• Solution : Transmit two hop in one duty cycle

– RTS, CTS -> both the neighbors of the sender and receiver will learn about transmission

32

Page 33: Wireless sensor network

Message passing• Problem: Sensor net in-network processing

requires entire message

• Solution: Don’t interleave different messages

– Advantages• Reduces latency of the message

• Reduces control overhead

– Disadvantage• Node-to-node fairness is reduced, as nodes with small

packets to send has to wait till the message burst is transmitted

33

Page 34: Wireless sensor network

S-MAC 평가

• 장점

– 기존 CSMA/CA에 비해 Energy를 적게 사용

– Lightly loaded networks에 강하다

– Cluster-based protocol에 적용하기 쉽다

• 단점

– Heavy loaded에선 Energy 이득이 적다

– High-density, Heavy loaded의 경우Short listen interval 동안의 contention으로 충돌 가능성이 높아질 수 있다.

– Sync를 위한 Energy 소비

34

Page 35: Wireless sensor network

T-MAC

• Static schedules is the waste of energy

• When traffic is low, reduce the Listen Interval

– 𝑇𝐴 > 𝐶 𝑐𝑜𝑛𝑡𝑒𝑛𝑡𝑖𝑜𝑛𝑎𝑙 𝑖𝑛𝑡𝑒𝑟𝑣𝑎𝑙 + 𝑅(𝑅𝑇𝑆) + 𝐶(𝐶𝑇𝑆)

35

Page 36: Wireless sensor network

Asynchronous MAC

• B-MAC

– Adaptive preamble sampling scheme

• CC-MAC

– Using spatial correlation information

36

Page 37: Wireless sensor network

B-MAC

• Design goal

– Low power operation

– Effective collision

– Simple implementation, small code & RAM size

– Flexible Interface

– Efficient channel utilization at low & high data rates

– Reconfigurable by network protocols

– Tolerant to changing RF/Networking conditions

– Scalable to large numbers of nodes

Page 38: Wireless sensor network

B-MAC Design

• Simple

– Low power listening via Preamble

– CSMA via CCA (Clear Channel Assessment) & back-off

– Acknowledgment

• Export control to higher services to support wide variety of WSN workloads

– WSNs are supposed to support various applications

39

Page 39: Wireless sensor network

B-MAC: motivation

• Drawback of Synchronous Operation

1. Periodic messages; SYNC packet

2. All nodes are active during the listen period

3. S-MAC의 경우 virtual cluster 구성해야 한다.

40

Page 40: Wireless sensor network

B-MAC: motivation

• S-MAC is not only a link protocol, but also network and organization protocol

• Application must rely on S-MAC’s internal policies

• B-MAC

– Particular lower policy

– Easy to use

41

Page 41: Wireless sensor network

• Sender Sends a preamble before each packet to wake up the intended receiver

Preamble period = 𝑇𝑝

• Sender node broadcast Preamble

– Intended node : Start listening

– Other node : Sleeping mode

B-MAC: Low power Listening

42

Page 42: Wireless sensor network

B-MAC: Low power Listening

• Sleep and wake schedule w/o synchronization

• Each node determines its own schedule

• Only Transmitter and receiver synchronize each

other

• Longer Preamble

• Length of Check Interval configurable by

higher layers

43

Page 43: Wireless sensor network

B-MAC: Clear Channel Assessment

• Ambient noise change by environment

• Sensing the activity channel 중요

• Failure of detecting Preamble

– Detection failure

– Collision

• CCA

– Noise floor estimation

– Signal detection

44

Page 44: Wireless sensor network

Noise floor estimation

• Each node calculate noise floor

• Signal strength samples are taken while channel is idle

– Right after transmission packet

– No valid data is received

• Weighted moving average with decay𝐴𝑡 = 𝑎𝑆𝑡 + 1 − 𝑎 𝑆𝑡−1

45

Page 45: Wireless sensor network

Signal Detection

• Traditional approach: threshold approach

• Detecting failure

– Channel noise depends on the environment

– Fluctuation

• Outlier detection

– Valid packet could never have an outlier significantly below the noise floor

– If outlier exists, channel is clear

– If 5 samples are taken and no outlier is found, the channel is busy

46

Page 46: Wireless sensor network

Signal Detection

• Outlier detection

47

Page 47: Wireless sensor network

B-MAC: 평가

• 장점

– Efficiency carrier sensing(CCA)

– Noise floor estimation -> 주위 환경 변화에 강하다

– Simple light weight -> memory 적게 사용

– Can be controlled by higher layer easily• High layer가 turn on/off 가능 -> 다양한 적용 가능

• 단점

– Simple CSMA – hidden terminal problem 해결X• High traffic 에서 나쁘다

– LPL mechanism• High-traffic 에서 preamble 계속 쏴줘야 함 비효율적

48

Page 48: Wireless sensor network

STEM

B-MAC의 단점

• Sender가 Preamble를 긴 시간 동안 보낸다.

• 목적 노드를 발견해도 Preamble 주기가 끝난 후data 전송 시작한다.

– Energy 낭비

– Latency 증가

49

Page 49: Wireless sensor network

STEM

• Preamble 보내는 중간에 목적노드 발견하면 바로data 전송 시작

• 각 노드에서는 listen interval 이 조금 늘어나는 단점

50

Page 50: Wireless sensor network

Wise MAC

• Sender node에서 목적 노드의 sleep schedule를알고 있다면?

– Preamble을 많이 줄일 수 있다.

51

Page 51: Wireless sensor network

Wise MAC

• ACK에서 자신의 schedule을 알려준다

– 그 schedule에 맞춰서 preamble을 broadcast한다.

• 단점

– Memory 사용

– Clock drift 오차 생각해서 preamble 시간 정해줘야함

52

Page 52: Wireless sensor network

CC-MAC

53

Page 53: Wireless sensor network

CC-MAC

• Spatial Correlation-Based Collaborative MAC

• Spatially dense sensor deployment

• Sensor records may be spatially correlated subject to an event

• Iterative Node Selection– At Sink Node

• CC-MAC protocol– E-MAC

– N-MAC• At Sensor Nodes

54

Page 54: Wireless sensor network

Architecture & Spatial Correlation Model

55

• Correlation model and architecture

Page 55: Wireless sensor network

Spatial Correlation Model

• Distortion𝐷𝐸 = 𝐸 𝑑𝐸 𝑆, 𝑆

• Observations of each sensor node can be modeled as joint Gaussian random variables

𝐸 𝑆𝑖 = 0, 𝑖 = 1, … , 𝑁

𝑣𝑎𝑟 𝑆𝑖 = 𝜎𝑆2, 𝑖 = 1, … , 𝑁

𝑐𝑜𝑣 𝑆𝑖 = 𝜎𝑆2𝑐𝑜𝑟𝑟 𝑆𝑖 , 𝑆𝑗

𝑐𝑜𝑟𝑟 𝑆𝑖 , 𝑆𝑗 = 𝜌𝑖,𝑗 = 𝐾𝜗 𝑑𝑖,𝑗 =𝐸[𝑆𝑖 , 𝑆𝑗]

𝜎𝑆2

56

Page 56: Wireless sensor network

Spatial Correlation Model 𝑋𝑖 = 𝑆𝑖+ 𝑁𝑖

𝑌𝑖 =𝑃𝐸

𝜎𝑆2+𝜎𝑁

2 𝑋𝑖 , (𝑃𝐸:encoding power constraint)

𝑍𝑖 =𝐸[𝑆𝑖𝑌𝑖]

𝐸[𝑌𝑖2]

𝑌𝑖

𝑆 𝑀 =1

𝑀

𝑖=1

𝑀

𝑍𝑖

𝐷 𝑀 = 𝐸 𝑆 − 𝑆 𝑀2

= 𝜎𝑆2 −

𝜎𝑆4

𝑀 𝜎𝑆2 + 𝜎𝑁

2 2

𝑖=1

𝑀

𝜌 𝑠,𝑖 − 1 +𝜎𝑆

6

𝑀2 𝜎𝑆2 + 𝜎𝑁

2 2

𝑖=1

𝑀

𝑖≠𝑗

𝑀

𝜌 𝑖,𝑗

57

Page 57: Wireless sensor network

Spatial Correlation Model 결론

• Located close to the event source S

• Located as far apart from each other as possible

58

Page 58: Wireless sensor network

Iterative Node Selection Algorithm

• Goal– Find the ideal locations of representative nodes

such that the required distortion can be maintained at the sink

• Input– Statistical properties of the node distribution

• Output– Correlation radius value for distributed operation

Assumption• Statistical properties of the WSN topology is known by the

INS algorithm; density and node distribution

59

Page 59: Wireless sensor network

Iterative Node Selection Algorithm

Vector Quantization method in coding theory

• Form a sample topology

• Start with selecting all the nodes in the event region as representative node

• Iteratively, decreases the number of representative nodes until the distortion constraint 𝐷𝑚𝑎𝑥 is met

60

Page 60: Wireless sensor network

Iterative Node Selection Algorithm

• 결과

– Correlation Radius

– Correlation Neighbor

• correlation radius,𝑟𝑐𝑜𝑟𝑟,is informed to the individual nodes

61

Page 61: Wireless sensor network

CC-MAC Protocol at node

• 𝑟𝑐𝑜𝑟𝑟 is broadcast to each sensor node during the network setup

• E-MAC

– To prevent the transmission of redundant information

• N-MAC

– To prioritize the forwarding of filtered data to sink

62

Page 62: Wireless sensor network

Packet Structure

63

• First Hop(FH)

–Differentiate the type of packet

• Newly generated packet

• Route-thru packet

–처음에는 set 한번 거치는 순간clear

Page 63: Wireless sensor network

Event MAC

• Forming correlation regions based on the correlation radius

• In each correlation region, single representative sensor node transmits data for a specific duration

• All other node stop transmission attempts

64

Page 64: Wireless sensor network

Event MAC

• First Contention phase(FCP)

– All node with event contend for the medium

– Each node sets FH field of RTS and tries to capture the medium

– Some of sensor nodes access the channel: Representative Sensor Node

• 𝑛𝑗 listen to RTS packet of 𝑛𝑖 with set FH𝒅(𝒊,𝒋) < 𝒓𝒄𝒐𝒐𝒓

– Stop its transmission𝒅(𝒊,𝒋) > 𝒓𝒄𝒐𝒐𝒓

– Contend for the medium if it has a packet to send

65

Page 65: Wireless sensor network

Network MAC

• Route-thru packet must be given priority

– correlation has already been filtered out using E-MAC

66

Page 66: Wireless sensor network

RESERVATION-BASED MAC

67

02-2

Page 67: Wireless sensor network

Reservation-Based Medium Access

• Collision-free communication

• TDMA가 사용된다.

– FDMA : BW의 한계 때문에 사용하기 힘들다• Narrow band

– OFDMA, CDMA의 경우 cost constraints

68

Page 68: Wireless sensor network

TRAMA

• Traffic-adaptive Medium Access Protocol

• Energy Efficiency

– No collision

– Sleeping node

• Based on time-slot structure

• Distributed election scheme

– No central entity

– Using priority information, allocate transmission slot

69

Page 69: Wireless sensor network

TRAMA

4 Main Phase

• Neighborhood discovery

• Traffic information exchange

• Schedule establishment

• Data transmission

70

Page 70: Wireless sensor network

TRAMA

3 Mechanism

• Neighbor Protocol

• Schedule Exchange Protocol

• Adaptive Election Algorithm

71

Page 71: Wireless sensor network

Neighbor Protocol

• Main Function: – Gather two-hop neighborhood information by

using signaling packets.

• TRAMA start in random access mode

• Random access period– Periodically operates

– New node join the network

– Time synchronization

– Send out their neighborhood updates and receive update from neighbors

– Collision 발생 가능• 충분한 시간 할당

72

Page 72: Wireless sensor network

Neighbor Protocol

• Signal packet 교환

– Neighborhood update

– “Keep alive” beacon when no update

73

• Because a node knows the one-hop neighbors of its one-hop neighbors, eventually consistent two-hop neighborhood information makes its way across the network

Page 73: Wireless sensor network

74

Schedule Exchange Protocol (SEP)

• Schedule consists of list of intended receivers for future transmission slots.

• Schedules are established based on the current traffic information at the node.

• Propagated to the neighbors periodically.

• SEP maintains consistent schedules for the one-hop neighbors.

Page 74: Wireless sensor network

76

Adaptive Election Algorithm (AEA)

• Decides the node state as either Transmit, Receive or Sleep.

• Uses the schedule information obtained by SEP.

• Nodes without any data to send are removed from the election process, thereby improving the channel utilization.

Page 75: Wireless sensor network

Adaptive Election Algorithm (AEA)

• Adaptive election algorithm

– Priority정보를 이용하여 time slot을 할당

– Globally known hash function𝑝 𝑢, 𝑡 = ℎ 𝑢 + 𝑡

– After each node determines the slot to transmit, informs its intended receivers

77

Page 76: Wireless sensor network

TRAMA: 평가

• 장점

– Energy efficiency: increasing sleeping

– Decrease the collision rate

• 단점

– Delay

– Frequent message exchange

– High density network -> overhead

78

Page 77: Wireless sensor network

PMAC (Pattern MAC)

Pattern 교환을 통해 서로의 스케쥴 정한다.

• Each node makes own patern

• A sleep-wakeup pattern is a stream of bits

• Pattern is tentative plan, it can change

• The schedule for a node is derived from its own pattern

• The schedules are decided based on a node’s own traffic and neighbors

79

Page 78: Wireless sensor network

PMAC (Pattern MAC)

Pattern Generation

• 𝑃𝑗: binary string representing the pattern of node j

• 𝑃𝑗 is restricted a pattern to be 0𝑚1(𝑤ℎ𝑒𝑟𝑒 𝑚 = 0,1, … , 𝑁 − 1)

• Example

1, 01, 001, 0001, … , 0𝑁−11

– Bit 1: the node intends to stay awake

– Bit 0: the node intends to sleep

80

Page 79: Wireless sensor network

PMAC (Pattern MAC)

Pattern Exchange

• Pattern repeat time frame

– Each node repeats its current pattern

• Pattern exchange time frame

– New patterns are exchanged between neighbors

81

Page 80: Wireless sensor network

PMAC (Pattern MAC)

• Schedule Generation

82

Pattern bit at node j

Packet to sendPattern bit at receiving node

Schedule at node j

1 1 1 1

1 1 0 1-

1 0 * 1-

0 1 1 1

0 1 0 0

0 0 * 0

Page 81: Wireless sensor network

HYBRID MAC

84

02-3

Page 82: Wireless sensor network

Hybrid Medium Access

장점 단점

Contention-based

Overhead 낮다Low contention

High traffic

Reservation-based

Schedule-> collision 낮다

CapacityEnergy efficiency

85

• Combine best of both

• Eliminate worst of both

Page 83: Wireless sensor network

Z-MAC (Zebra-MAC)

• Use a base TDMA schedule – Rely on time slot

• Each slot can be stolen– Provided owners are not transmitting

– Stealing done through competition (CSMA)

• CSMA in low contention

• TDMA in high contention

86

Page 84: Wireless sensor network

Z-MAC

• 4 main components

– Neighbor discovery• 2-hop의 정보를 알고 있음

– Local frame exchange• Neighbor 수에 따라서 Frame 크기 조절

– Transmit control• Steal time slot

– Time synchronization

87

Page 85: Wireless sensor network

Z-MAC: Local frame exchange

Time Frame Rule (TF Rule)

• Let node i be assigned to slot 𝑆𝑖, and let number of nodes within two hop neighborhood be 𝐹𝑖

• then node i's time frame is set to be 2𝑎, where positive integer a is chosen to satisfy condition

2𝑎−1 ≤ 𝐹𝑖 < 2𝑎 − 1

88

Page 86: Wireless sensor network

Z-MAC: Transmission Control

89

Time Slots

A(0)

B(1)

0 021

Ready to Send, Start Random(To) Backoff

Ready to Send, Start To + Random(Tno) Backoff

After Backoff, CCA Idle

After Backoff, CCA Busy

Non-Owner Backoffs

Owner Backoffs

Page 87: Wireless sensor network

Z-MAC: Time synchronization

• Local clock synchronization among senders

• Each data sender transmits a synchronization message containing its current clock value periodically

• Update clock value by taking a weighted moving average

90

Page 88: Wireless sensor network

결론

• Energy efficiency

• Purpose of Application

91

Page 89: Wireless sensor network

92

Page 90: Wireless sensor network

93

Page 91: Wireless sensor network

WSN communication Architecture

95

Page 92: Wireless sensor network

96

Physical Layer

• Use available Wireless Protocols:

• Radio Frequency : ISM Band 433MHz to 2.4GHz

• Modulation : Phase-Shift Keying

• BPSK or MPSK

• Data Rate : 0.25 Mbps to 54 Mbps

Source [2]

Page 93: Wireless sensor network

97

Data Link Layer

Medium Access Control (MAC) Protocols:

- Sensor-MAC (SMAC):

- periodic listen & sleep

- collision avoidance

- Timeout-MAC (TMAC):

- enhance the energy savings in SMAC

Source [1]

Page 94: Wireless sensor network

98

Network Layer

Two Types of Routing Algorithms:

1) Hirarchical Routing Protocols:Low-Energy Adaptive Clustering Hierarchy (LEACH)

2) Location-Based Routing Protocols:Geographical Adaptive Fidelity (GAF)

Source [2]

Page 95: Wireless sensor network

CSMA protocol

99

Page 96: Wireless sensor network

CSMA/CA

100

Page 97: Wireless sensor network

NAV mechanism in IEEE 802.11.

• Network Allocation Vector(NAV)

101