• No results found

MAC protocols. Naming and Addressing Time Synchronisation. Outline. Wireless Ad Hoc & Sensor Networks (Wireless Sensor Networks Part II) MAC protocols

N/A
N/A
Protected

Academic year: 2021

Share "MAC protocols. Naming and Addressing Time Synchronisation. Outline. Wireless Ad Hoc & Sensor Networks (Wireless Sensor Networks Part II) MAC protocols"

Copied!
11
0
0

Loading.... (view fulltext now)

Full text

(1)

Wireless Ad Hoc & Sensor Networks

(Wireless Sensor Networks – Part II)

WS 2009/2010 WS 2009/2010

Prof. Dr. Dieter Hogrefe/Prof. Dr. Xiaoming Fu Dr. Omar Alfandi

Outline

• MAC protocols

• Naming and Addressing

• Time Synchronisation

Summary

• Summary

2

MAC protocols

• Medium access in WSNs is difficult mainly because of

– Impossible (or very difficult) to send and receive at the same time – Interference situation on the receiver is important, but can be

different from the observed situation by the sender – High error rates for signalling packetsHigh error rates for signalling packets

• Requirements

– High throughput, low overhead, low error ratesg g p , , – Energy efficiency, handle switched off devices

MAC protocols – Energy Problems

• Recall: Transceiver consumes a significant share of

energy

– Sending is costly; Receiving costs are often almost the same – Idling is cheaper, but about as expensive as receiving

Sleeping costs almost nothing but results in a “deaf” node – Sleeping costs almost nothing, but results in a deaf node

• Derived energy problems regarding the MAC protocol

– Collision: Waste of effort when two packets collideCollision: Waste of effort when two packets collide

– Overhearing: Waste of effort when receiving a packet that was directed at another destination

– Protocol overhead: Waste of effort due to MAC-related overhead – Idle listening: Waste of effort when waiting for incoming packets,

but nobody is sending but nobody is sending

(2)

MAC protocols – Main Options

Wireless medium access Centralised Distributed Centralised Distributed Schedule-based Contention-based Schedule-based Contention-based Fixed assignment Demand assignment Fixed assignment Demand assignment g g g g 5

MAC protocols – Centralised Medium Access

• Idea: A central station controls, when a node may

access the medium

– Example: Polling, centralised computation and assignment of time slots (TDMA)

• Simple and efficient, but burden to the central stationp ,

• Not feasible for large WSNs, but if network is divided into

smaller groups, this approach can be useful

– e.g. compare Bluetooth piconets

Î Usually, only distributed medium access is considered!

6

MAC protocols – Distributed Medium Access

• Schedule-based protocols

– TDMA component provides a schedule regulating which

ti i t d hi h t hi h ti

participant may used which resource at which time

• Typical resource : frequency band (with given CDMA-code) • Implicit idle listening avoidance mechanismp g

– Schedule can be fixed or computed on-demand

• Sometimes mixed

C lli i O h i d Idl li t i i

– Collisions, Overhearing and Idle listening are no issues – BUT: time-synchronisation is needed

• Contention based protocols

• Contention-based protocols

– Risk of colliding packet is deliberately taken

– Mechanisms to avoid/reduce collisions required (Î often random)q ( )

7

MAC protocols – Main Options

Wireless medium access Centralised Distributed Centralised Distributed Schedule-based Contention-based Schedule-based Contention-based Fixed assignment Demand assignment Fixed assignment Demand assignment g g g g 8

(3)

Contention-based MAC protocols I

• Basic options

– ALOHA Î not good in most cases – Listen before talk (CSMA)

• BUT: sender is not knowing what is going on at the receiver Î might destroy packets despite listeningg y p p g

• Besides, receiver needs possibility to inform possible

senders in its neighbourhood upcoming transmission

Î “shut them up” for this duration

– Recall:

Hidden Terminal Problem • Hidden Terminal Problem

• Exposed Terminal Problem A B C D

9

Contention-based MAC protocols II

• Receiver informs potential interferers

– While a reception is on-going

• By sending out a signal indicating the reception (Busy tone protocol) • Problem: cannot use the same channel on which the reception

takes place Î used separate channel for signalling

– Before a reception is on-going

• Can use the same channel

• Receiver itself needs to be informed • Receiver itself needs to be informed

10

Contention-based MAC protocols – S-MAC I

• Problem

– In WSNs most of the time nothing happens, i.e. there is only a

l d t t

low data rate

– For low data rates, MACA’s idle listening is unsuitable

• Idea: use ‘rendez-vous’ mechanism

• Idea: use rendez-vous mechanism

– turn off nodes and ensure that neighbouring nodes turn on simultaneously to allow packet exchange

• Proposal of this approach: S-MAC

– S-MAC = Sensor-MAC

– S-MAC is energy efficient and provides collision avoidance and overhearing

Contention-based MAC protocols – S-MAC II

Listen Listen Sleep Listen period SYNCH RTS CTS Listen period

• Only in the ‘listen periods’

data will be exchanged

S di & i i

Wake-up period

Period – Sending & receiving

• SYNCH

• Synchronisation of the sleep schedule by

Duty-Cyle = Listen period length/

• Synchronisation of the sleep schedule by exchanging schedule tables with neighbours • Forming of virtual clusters

Listen period length/ Wakeup period length

Î “synchronised islands”

• Data transfer

P f RTS/CTS

• Perform RTS/CTS • Transfer data, ACK

• Not affected nodes change to sleep mode

Virtual clusters

• Not affected nodes change to sleep mode

(4)

Contention-based MAC protocols – T-MAC

• In S-MAC the ‘listen period’ is of fixed length

• Problem

– What happens when there is no traffic? Î nodes have to stay awake unnecessarily

Idea

• Idea

– Prematurely go back to sleep mode when there is no traffic for a certain time (timeout)( ) Î adaptive duty cycle

• Implementation of this idea: T-MAC

– Timeout-MAC

As S MAC but uses timeout to reduce listen period – As S-MAC, but uses timeout to reduce listen period

13

Contention-based MAC protocols – Preamble Sampling

• Until now, periodic sleep was used to synchronise the

sleep and wake up phases of the nodes

• Alternative: Don’t try to explicitly synchronise nodes

– Regularly sample the medium to check for activity, rest of the

time change to sleep mode time change to sleep mode

• Use long preambles to ensure that receiver stays awake

to catch the actual packet

to catch the actual packet

– e.g. WiseMAC

Sender WUP Data

Wake-Up Preamble Sender Receiver ACK Rx Tx Sleep Period Wake Up Wake Up 14

Contention-based MAC protocols – B-MAC I

• B-MAC combines several of the mentioned approaches

– Tries to provide practically relevant solutions

• Clear Channel Assessment

– Adapts to noise floor by sampling channel when it assumed to be free

be free

– Samples are exponentially averaged Î result used in gain control

– For actual assessment when sending a packet, look at five channel samples Î channel is assumed as free, when even a single sample is significantly below noise

single sample is significantly below noise

– Optional: Random back-off, if channel is found busy

• Optional: Immediate link layer ACKs for received packets

p

y

p

15

Contention-based MAC protocols – B-MAC II

• Low Power Listening

– Preamble sampling

– Uses the clear channel assessment techniques to decide whether there is packet arriving when node wakes up – Timeout puts node back to sleep if no packet arrivedTimeout puts node back to sleep if no packet arrived

• B-MAC does not have

– Synchronisationy – RTS/CTS

• BUT:

– This results in simpler and slimmer implementation – Clean and simple interface

• Currently, B-MAC is considered as default MAC protocol

(5)

Contention-based MAC protocols – PAMAS I

• Idea: Combine busy tone with RTS/CTS

– Results in detailed overhearing avoidance, but does not address idle listening

idle listening

– Uses separate data and control channels

• Approach of this idea: PAMAS

P A M lti A ith Si lli

– Power Aware Multi-Access with Signalling

• Procedure

– Node A transmits RTS on control channel; no channel sensing; g – Node B receives RTS, sends CTS on control channel if it can

receive; Node B does not know about ongoing transmissions – B sends busy tone as it starts to receive dataB sends busy tone as it starts to receive data

Control Channel AÎ BRTS Data Channel CTS BÎ A Busy tone sent by B D t

Data Channel Data

A Î B

17

Contention-based MAC protocols – PAMAS II

• Already ongoing transmission

– Suppose Node C is in A’s neighbourhood is receiving a packet h A i iti t RTS

when A initiates RTS – Procedure

• A sends RTS to B

B

• C is sending busy tone (while receiving data) • B sends CTS to A

? C

A

• B sends CTS to A • CTS and busy tone collide

Î A does not receive CTS and thus, does not send any data

A

Control Channel AÎ BRTS Data Channel

CTS BÎ A Busy tone sent by C

Data Channel

No data!

18

MAC protocols – Main Options

Wireless medium access Centralised Distributed Centralised Distributed Schedule-based Contention-based Schedule-based Contention-based Fixed assignment Demand assignment Fixed assignment Demand assignment g g g g

Schedule-based MAC protocols – LEACH I

• LEACH: Low-Energy Adaptive Clustering Hierarchy

• Given:

– Dense network of sensor nodes reporting to a central sink – Each node can reach the sink directly

• Idea: Group nodes into “clusters”, each controlled by a

clusterhead (CH)

About 5% of nodes become CH (scenario dependent) – About 5% of nodes become CH (scenario dependent) – Role of CH rotates to share the burden

– Clusterhead organisesg

• CDMA code for all members of the cluster • TDMA schedule that is used within the cluster

(6)

Schedule-based MAC protocols – LEACH II

Fixed length round

Setup Phase Steady-state Phase

Fixed-length round Advertisement phase Cluster setup phase Broadcast schedule Timeslot 1 Timeslot 2 Timeslot n Self-election of clusterheads CH compete with CSMA Members compete with CSMA

• Setup phase

– CHs advertise themselves Î other nodes join the CH with the strongest signal; broadcast schedule is distributed by the CH

of clusterheads

strongest signal; broadcast schedule is distributed by the CH

• Steady-state phase

– CH collects and aggregates data from all cluster members – CH reports aggregated data to sink using CDMA

21

IEEE 802.15.4 I

• IEEE Standard for low-rate WPAN applications

• Goals

– Low-to-medium bit ratesLow to medium bit rates

– moderate delays without too strict guarantee requirements – low energy consumption

• Physical layer

Physical layer

– 20 kbps over 1 channel @ 868-868.6 MHz – 40 kbps over 10 channels @ 905 – 928 MHz

250 kbps over 16 channels @ 2 4 GHz – 250 kbps over 16 channels @ 2.4 GHz

• MAC protocol

– Single channel at any time

C bi t ti b d d h d l b d h

– Combines contention-based and schedule-based schemes

– Slotted CSMA-CA protocol is used for the contention access period Î random delays

Different roles: PAN coordinator coordinator device – Different roles: PAN coordinator, coordinator, device

22

IEEE 802.15.4 II

• Star networks

– Devices are associated with coordinators forming a PAN, identified by a PAN identifier

by a PAN identifier

• Coordinator

– Management of the devices, address assignments, generation of beacons (PAN id outstanding frames etc )

beacons (PAN id, outstanding frames, etc.) – Talks to devices and peer coordinators

• Beacon-mode super frame structure

Coordinator Device Beacon

– Guaranteed time slots (GTS) assigned to devices upon request

Active period Inactive period ACK

Data request Active period Inactive period

Data ACK

Beacon Contention access period

Guaranteed

time slots (GTS) ACK

23

Further Protocols

• MAC protocols for WSNs are one of the most active

research areas

• A plenty of other additional protocols exist in literature:

• Examples

– STEM

– Mediation device protocol Many CSMA variants – Many CSMA variants

– Protocols for multi-hop reservations – …

• This section has barely scratched the surface

(7)

Outline

• MAC protocols

• Naming and Addressing

• Naming and Addressing

• Time Synchronisation

Summary

• Summary

25

Names vs. Addresses

• Name: denote/refer to “things”

– Nodes, networks, data, transactions – Often, but not always, unique

• Addresses: Information needed to find these things

St t dd IP dd MAC dd

– Street address, IP address, MAC address – Often, but not always, unique

– Addresses are often hierarchical organised e g routingAddresses are often hierarchical organised, e.g. routing

• Services to map between names and addresses

– e.g. DNSg

• Sometimes, same data serves as name and address

– e.g. IP addresses

26

Address management issues

• Address allocation

– Assignment of an address to an entity from a given address pool

• Address deallocation

• Address deallocation

– Once an address is no longer in use, return it to the address pool

• Because of limited pool size

G f l b t d ll ti

• Graceful vs. abrupt deallocation

• Address representation

– Address format

• Conflict detection and resolution

– Due to merge of two networks or multiple assignment of the same address

assignment of the same address

• Binding

– Mapping between addresses used by different protocol layers

• e.g. IP addresses to MAC addresses by the ARP protocol

Distributed address assignment

Option 1: Assignment of networkwide addresses

– Let every node randomly pick an address Î risk of duplicate addresses

Option 2: Assignment of locally unique addresses

– Node communicate only in the local neighbourhood with unique address – Same address can be reused in different neighbourhoodsg

Î fewer bits for address representation required Î save energy • Option 3: Repair any observed conflicts

– Temporarily pick random address from a dedicated pool and a proposed p y p p p p fixed address

– Send an address request to the proposed address using temporary address – If address reply arrives, proposed address exists

– Collisions in temporary address unlikely because it just exists briefly

Option 4: Similar to Option 3, but use a neighbour that already has a fixed address to perform requests

(8)

Content-based address assignment

• Recall: Paradigm change from id-centric to data-centric

– Describe content itself, not the involved nodes

• Example: Low level naming mechanism

• Example: Low-level-naming mechanism

– A sink indicates interest for a certain data/event by disseminating an ‘Interest message’ EQ = equal NE = not equal LT = lower than Interest message

• Interest message consists of a set of attributes to describe desired data

– Format: <attribute, value, operation>

GT = greater than LE = lower than or equal GE = greater than or equal EQ_ANY = matches anything Format: attribute, value, operation

e.g. <temperature, 20°C, GT>

– Source nodes that receive the ‘interest message’ check whether the interest matches the locally available data

IS = literal attribute

– Interest cache is built by intermediate nodes to forward request more quickly to the corresponding nodes

– Used in Direct Diffusion routing protocol (see routing section)g p ( g )

29

Geographic addressing

• Often users do not only want to express queries by the type or

modality of the data, but rather by region or location

– Specify a region and let the network figure outSpecify a region and let the network figure out which sensors are appropriate

– Can be regarded as special case of content-based addresses of content based addresses

• There are many ways to specify a region

– Single point

Ci l h b i i i d di

– Circle or sphere by giving centre point and radius – Rectangle by given two corner points

– Polygon by given a list of pointsyg y g – etc.

• If location of a sensor is known, geographic routing schemes

can be applied

can be applied

30

Outline

• MAC protocols

• Naming and Addressing

• Naming and Addressing

• Time Synchronisation

Summary

• Summary

31

Time Synchronisation – why is it needed?

• Time plays an important role in the operation of WSNs, since

these are supposed to observe and interact with physical

phenomena

phenomena

• Also for applications and protocols an exact time is required

– e.g. TDMA Î coordination of wakeup phases

• Example

– An acoustic wave front is generated by a sound source in a distance, hitting an array of acoustic sensor nodes

– d is known a priory; x must be estimated from the time differences of the arrival of the signal – Angle Θ can be calculated as followsg x

• Θ = arcsin x/d

ÎSmall errors in time

synchronisation leads to y Θ significant biased estimates !!! d

(9)

Time Synchronisation – how to improve?

• Two options two improve the reliability of the estimate

– Option 1: Keep sensor clocks as tightly synchronised as possible using dedicated ‘time synchronisation algorithms’

using dedicated time synchronisation algorithms Î This option is focused in this section

– Option 2: Combine readings of multiple sensors to “average out” ti ti

estimation errors

• Because WSNs have a direct coupling to the physical world,

their notion of time should be related to the ‘physical time’

their notion of time should be related to the physical time

– One second on the sensor’s clock should be close to one second in real time Î often Coordinated Universal Time (UTC) is used as time scale

time scale

• Other concept: logical time (Lamport) in which only the

relative ordering of events count, not their relation in real time

g

,

33

Time Synchronisation – node’s clock

• Often a ‘hardware clock’ is present

– An oscillator generates pulses at a fixed nominal frequency – A counter register is incremented after a fixed number of

pulses

• Only the register content is available to the node’s softwarey g • Time resolution is defined by the time between to increments

– Node i’s counter register at real time t is denoted as Hi(t)

• A local ‘software clock‘ can be derived as follows

– Li(t) := ΘiHi(t) + φi with Θias drift rate and φias phase shift

Ti h i ti l ith d l k dj t t

– Time synchronisation algorithms can do clock adjustment by modifying Θiand φi, but not the counter register

34

Time Synchronisation – clocks precision

• Types of time synchronisation

– External synchronisation

• Synchronisation with external real time scale like UTC

– Internal synchronisation

• No external timescale, nodes must agree on common timeNo external timescale, nodes must agree on common time

• Sources of inaccuracies

– Nodes are switched on at random times Î drift rate (Θi) is random

– Oscillators have random deviations from nominal frequency (drift/ skew)Î cheaper oscillators have larger deviation (drift/ skew) Î cheaper oscillators have larger deviation – Oscillator frequency depends on time (oscillator aging) and

environment (temperature, pressure, supply voltage, etc.)

Time Synchronisation – protocol classification

• Time synchronisation protocols can be classified as

– Physical vs. logical time

– External vs. internal synchronisation – Global vs. local algorithms

Absolute vs relative time – Absolute vs. relative time

– Hardware vs. software-based mechanisms – A priori vs. a posteriori synchronisationp p y

• Post-facto synchronisation allows time-synchronisation on demand

– Deterministic vs. stochastic precision bounds

L l l k d t di i li Î id b k d j ?

(10)

Time Synchronisation – performance metrics

• Metrics

– Precision

• Maximum synchronisation error for deterministic algorithms

• Mean error/error variance for stochastic algorithms

– Energy costs

• Number of packets amount of computation requiredNumber of packets, amount of computation, required synchronisation frequency

– Memory requirements

Hi t f h i ti k t

• History of synchronisation packets Î longer history, more accuracy

– Fault tolerance

• What happens when a node dies?

37

Time Synchronisation – building blocks

• Time synchronisation protocols can be decomposed in

four fundamental building blocks:

– Resynchronisation event detection block

• When to trigger a time synchronisation round? Periodically? After external event?y

– Remote clock estimation block

• Acquire clock values from remote nodes/ remote clocks

Cl k ti bl k

– Clock correction block

• Compute adjustments for own local clock based on estimated clocks of the other nodes

– Synchronisation mesh setup block

• Determine which nodes synchronise with each other in a multihop network

network

38

Time Synchronisation – WSN constraints

• Scalability

– Algorithms must scale to large networks of unreliable nodes

• Precision

Precision

– Precision requirements can be diverse: from ms to seconds

• Extra hardware

– Use of extra hardware such as GPS receivers is mostly not an – Use of extra hardware, such as GPS receivers, is mostly not an

option due to extra costs and additional energy consumption

• Mobility

– Degree of mobility is low – Degree of mobility is low

• Packet delivery delay

– Mostly there are no fixed upper bound for packet delivery delay

P

ti

d l

• Propagation delay

– Propagation delay between neighbouring nodes is neglect able

• Configuration

– Manual configuration of single nodes is not an option

39

Sender/receiver time synchronisation

• Receiver synchronises to the sender’s clock by

exchanging packets with the sender

Classical protocol: network time protocol (NTP) – Classical protocol: network time protocol (NTP)

• Example: Lightweight time synchronisation protocol (LTP)

– Synchronise clocks of a WSN to the clocks held by a subset of y y

certain reference nodes (e.g. equipped with GPS receiver) – Considers only phase shifts, but drift rate correction

Two components – Two components

• Pair-wise synchronisation: synchronises two neighbouring nodes • Networkwide synchronisation: construction of a spanning tree

from the reference node to all nodes from the reference node to all nodes

• There are similar protocols like LTP which differ in

– Method of spanning tree construction; how and when to make p g

timestamps; How to achieve post-facto synchronisation

(11)

Receiver/receiver time synchronisation

• Receiver of a time-stamped packets synchronise among

each other, but not with the sender

• Example: Reference broadcast synchronisation (RBS)

– RBS consists of two components

S h i ti f i ithi i l b d t d i

• Synchronisation of receivers within a single broadcast domain • A scheme for relating timestamps between different nodes in

different domains

– RBS does not adjust the nodes’ local clocks, instead a conversion table is constructed including parameters to convert the clock values for each peer in a broadcast domainp

41

Time Synchronisation – summary

• Time synchronisation is important in WSN for protocols as

well as applications

• Using GPS receivers is typically not an option, thus

time-synchronisation protocols are required

• Post-facto synchronisation allows time-synchronisation on

demand, hence permanent updating is not required

Î save energy

Î save energy

ÎBUT: Just a very brief introduction to time synchronisation

ÎBUT: Just a very brief introduction to time-synchronisation

ÎLot of other protocols, optimisation opportunities and issues to solve

42

Outline

• MAC protocols

• Naming and Addressing

• Naming and Addressing

• Time Synchronisation

• Summary

Summary

• There were several MAC protocols proposed that can be

used in WSNs Î however, still a huge research area

• For the naming and addressing, there is a paradigm shift

from address-centric to data-centric approaches in

WSNs

WSNs

• Time Synchronisation in WSN is crucial because they

interact with physical phenomena; also sleeping phases

interact with physical phenomena; also sleeping-phases

needs to be synchronised

References

Related documents

Within the context of the NIATx200 study setting, the present study adapted the Grasha-Riechmann Student Learning Style Survey (GRSLSS) and the Teaching Style Inventory (TSI)

until the onset of cirrhosis, resulting in changes in interpersonal relationships. Social Support for transplant candidates is an important variable, providing them with

We detected high expression of all genes in CD11b + GAMs isolated from GBM samples, however only the gene expression of IL1RN, ISG20 (both M1-specific), and TGFBI (M2b-spe- cific)

The distribution of true long-term SBP is estimated using the empirical phase function (EPF) and weighted empirical phase function (WEPF) density deconvolution estimator..

Through path ISI, for example, a mother with obesity and lower insulin sensitivity (i.e. insulin resistance) would probably have an associated lower fetal HRV and therefore

Prevalence of Sarcocystis calchasi in free-ranging host species: Accipiter hawks and Common Woodpigeon in Germany.. Sylvia L. calchasi ) triggers pigeon protozoal encephalitis, a

These results provoked considerable controversy, with some maintaining that the improvements were caused by a participation effect tied to the extra attention and care offered to