You are on page 1of 60

Chapter-3

Routing Protocols and


Architectures in WSN

1
Introduction
• The state-of the-art in sensor technology now
supports extremely small sensors that
– may be highly mobile and power efficient
– are equipped with sufficient computing capabilities to run
distributed algorithms to manage their motion, process
data, and form and manage networks in support of a
common mission.
• As a result, algorithms for managing sensor
networks, and the applications that use them, have
grown increasingly complex.

2
• Networking a large number of low-power mobile
nodes involves routing, addressing, and support for
different classes of service at the network layer.
• Self-configuring wireless sensor networks consist of
several small, cheap, battery-driven, spread-out
nodes bearing a wireless modem to accomplish a
monitoring or control task jointly.
• In this chapter,
– network routing and architectures that are focused on
application specific solutions are discussed while
– Addressing the major limitations of sensor networks (
limited power supply, communication bandwidth and
range, as well as computation ability and memory
capacity).
3
SS-TDMA: A Self-stabilizing MAC Protocol

• Design SS-TDMA considering:


– different communication patterns (broadcast,
convergecast, and local gossip).
– Starting from an arbitrary state, SS-TDMA recovers to
states from which collision-free communication among
sensors is restored.
– first consider deployment in a rectangular grid. Then, we
extend it to any geometric distribution
– slots assignment reduce delay in communication and
manage power
– possible to reclaim the slots assigned to failed sensors and
reassign them to active sensors.
4
Assumptions and definitions
• Base Station
– We assume that there exists a base station that initiates a
diffusing computation to assign initial slots to all sensors.
– assume that the base station is located at the left-top
position [at location {0, 0}].
• Topology
– Initially, we assume that sensors are arranged in a grid
where each sensor knows its location in the network
• Thus, a sensor can determine the position, direction,
and distance (with respect to itself) of the sensors that
send messages to it.
– Initially, no sensors have failed or are in a sleeping state.
– Initially, we assume a rectangular grid topology.
5
• Communication and Interference Ranges
– We assume that each sensor has a communication range
and an interference range.
• Communication range is the distance up to which a sensor can
communicate with certainty/high probability.
• Interference range is the distance up to which a sensor can
communicate, although the probability of such a communication
may be low.
– Initially, we assume communication range = 1, that is, a
sensor can only talk to its neighbors in the grid and
interfere with sensors that are distance y (y=2) away.
• The collision group of sensor j includes the sensors
that are in the communication range of j and the
sensors that interfere with the sensors in the
communication range of j.

6
Broadcast TDMA

• Initial Slot Assignment: Let us assume that the base


station starts a diffusing computation to assign initial
slots at time slot 0.

7
TDMA Slots: Once the initial slot
(slot in which a sensor
forwards the diffusion
message) is determined,
a sensor determines its
future slots using the
TDMA period.

8
Convergecast TDMA

9
Gossip TDMA:
the communication
is in all directions and
combines broadcast
and convergecast.

10
• SS-TDMA: Properties
– Stabilization: Starting from arbitrary initial states, SS-
TDMA recovers to states from where collision-free
communication among sensors is restored.
– Reliability: If p is the probability of a successful
communication over a link, n is the number of diffusion
periods a sensor waits before shutting down, then the
probability that a sensor l hops away from the base station
shuts down incorrectly is at most (1 − pl)n.
– Delay optimal: For communication range and interference
range of 1, SS-TDMA requires 3(n − 1) + 1 slots for
broadcast in a n × n grid ( and is delay optimal).
– Energy Efficiency: In general, if the communication range
is 1, then a sensor needs to be awake for at most 5 slots in
every (y + 1)2 + 1 slots.
11
Assignments
1. SS-TDMA: Larger Communication Ranges

• Given a sensor location (a, b), depending upon whether


a, b are even or odd, split the network into four sub
grids: even–even, even–odd, odd–even, and odd–odd
and use the SSTDMA algorithm for initial and future
(what is the period?) slots of nxn network.

12
2. SS-TDMA: Hexagonal Grids:
• Consider a hexagonal grid network where a sensor
can communicate with its distance 1 neighbors and
interfere with its distance 2 neighbors. We assume
that the base station is located at the leftmost corner
on the left-top hexagon in the network. Determine
the slot assignment of the network grid.

13
Energy aware routing (EAR) protocols

• EAR is a reactive and destination initiated protocol.


• The consumer of data initiates the route request and
maintains the route subsequently.
• Multiple paths are maintained from source to
destination.
• EAR uses only one path at all times whereas diffusion
sends data along all the paths at regular intervals.
• Due to the probabilistic choice of routes, EAR can
continuously evaluate different routes and choose
the probabilities accordingly.
14
15
16
17
18
Assignments
1. Re design the EAR protocol that result in balanced
power in the WSN ( what is the implication of “2” in
the EAR protocol procedure?)
2. Design an EAR protocol for pipelining of a message
in multiple routs.
3. Design an EAR protocol without the forwarding
table in the nodes ( possible suggestion node
degree and distance metric to set a delay before
rebroadcasting a message).

19
Routing Protocol with Unavailable Nodes
• In WSNs some unavailable areas often are formed
because some sensor nodes become unavailable due
to energy exhausted, congestion, or disaster.
• Multi-path routing protocol is one of the mechanisms
to solve the above problems.
• Data delivery over multiple paths can also help balance
network load and extend the life time of entire
network
• The method discussed here uses a neighbor node table
exchanging mechanism that can help build an alternate
route around the unavailable areas and try to avoid the
multiple paths intersect.
20
• Micro Sensor Routing Protocol(MSRP) based on
IEEE802.15.4 and custom protocol stack of IPv6
sensor node.

21
• Routing Protocol Packet Format of MSRP
– Three routing packet formats including routing request
(RREQ), routing reply (RREP) and routing error (RERR) are
used.

22
23
24
where m is the
number of nodes
with insufficient
energy from source to
destination, h is the
number of hops from
source to destination,
n is the number of
links with weak LQI
between source to
destination.

25
In the RERR process, when a node
is notified by the neighbor
unavailable node or knows some
neighbor node becomes
unavailable if its HELLO message
dose not been received during a
period, it
o first searches routing entries
with that node address as the
next-hop address in its table.
o Then get their precursor node
address and encapsulate a RERR
message, unicast the precursor
nodes with RERR,
o Finally delete the routing table
entries with that node as the
next-hop address from the
routing table.
26
Assignment
• Design a routing protocol with unavailable
nodes without using IPv4/6.

27
Multi-Sink IPv6 Soft Hand-off Protocol
• Many WSN applications require sensor mobility,
– Some examples include vehicle monitoring and control, or
health parameters monitoring of ambulatory patients.
• In terms of WSN reachability, there is clear movement
towards the adoption of IPv6.
• The use of IP in sensor nodes has considerable
benefits in terms of connectivity, and IPv6 has several
advantages when compared to IPv4,
– the much larger address space.
– support for mobility, anycast addressing, security and self-
configuration.
28
29
30
31
32
33
34
35
Cooperative Clustering Algorithms
for WSN
• Clustering algorithm
– provides network scalability and energy efficient
communications by reducing transmission overhead and
enhancing transmission reliability.
– localize the route set up within the cluster & thus reduce
size of stored routing table at the individual sensor node.
– can also conserve communication bandwidth since it limits
the scope of inter-cluster interactions to cluster heads and
avoids redundant exchange of messages among sensor
nodes
– can stabilize the network topology at the level of sensor
nodes and thus cuts on topology maintenance overhead
36
37
38
39
40
41
42
43
Time Synchronization in WSN
• Typically the synchronization problems in wireless
sensor networks need to be addressed for the
following reasons.
– First, sensor nodes need to coordinate their operations
and collaborate each other in order to achieve a complex
sensing task.
• That is, data fusion is made through aggregating data
collected from different nodes for a meaningful result.
– Second, power saving function requires synchronization for
increasing network lifetime.
– For power saving, sensors may sleep by turning off their
sensors and/or transceivers at appropriate times, and
wake up at coordinated times.
44
– However, the radio receiver of a sensor node is not turned
off in the case that there are some data directed to it.
– This requires a precise timing between sensor nodes.
• Third, scheduling algorithms in WSNs are used to
share the transmission medium in the time domain
to eliminate transmission collisions and conserve
energy.
• However, non-determinism in transmission time
caused by the Media Access Channel (MAC) layer of
the radio stack can introduce several hundreds of
milliseconds delay at each hop.
• Thus, synchronization is an essential part of
transmission scheduling.
45
• In general, the synchronization problem can be
classified into three basic types.
– First form of synchronization deals only with ordering of
events or messages.
• The aim of such an algorithm is to be able to tell whether an
event E1 has occurred before or after another event E2, i.e.
just to compare the local clocks for order rather than having
them synchronized.
– Second type of synchronization algorithms targets
maintaining relative clocks.
• In this scheme, nodes run their local clocks independently,
but they keep information about the relative drift and offset
of their clock to other clocks in the network, so that at any
instant, the local time of the node can be converted to some
other node's local time and vice versa.
• Most of the synchronization schemes proposed for sensor
networks use this model. 46
– The third form of synchronization is the “always on” model
where all nodes maintain a clock that is synchronized to a
reference clock in the network.
• The goal of this type of synchronization algorithms is to preserve a global
timescale throughout the network.
• Design Factors for Time Synchronization
• Some of the factors influencing time synchronization in
wireless sensor networks are:
– Temperature: Since sensor nodes are deployed in various
places, the temperature variations throughout the day
may cause the clock to speed up or slow down.
– Phase noise: Some of the causes of phase noise are access
fluctuations at the hardware interface, response variation
of the operating system to interrupts, and jitter in the
network delay. The jitter in the network delay may be due
to medium access and queueing delays.
– Frequency noise: The frequency noise is due to the
instability of the clock crystal.

47
– Asymmetric delay: Since sensor nodes
communicate with each other through the
wireless medium, the delay of the path from one
node to another may be different than the return
path. As a result, an asymmetric delay may cause
an offset to the clock
– Clock glitches: Clock glitches are sudden jumps in
time. This may be caused by hardware or software
anomalies such as frequency and time steps.

48
• Uncertainties and Errors in Time Synchronization
– Send Time: The time spent at the sender to construct the
message. This includes kernel protocol processing and
variable delays introduced by the operating system and the
time to transfer the message from the host to its network
interface for transmission.
– Access Time: Each packet faces some delay at the MAC
layer before actual transmission. This delay is specific to
the MAC protocol in use, but some typical reasons for
delay are waiting for the channel to be idle or waiting for
the TDMA slot for transmission.
– Propagation Time: Time spent in propagation of the
message between the network interfaces of the sender
and the receiver. When the sender and receiver share
access to the same physical media this delay is very small
as it is simply the physical propagation time of the
message through the media.
– Receive Time: This is the processing time required for the
receiver’s network interface to receive the message from
the channel and notify the host of its arrival. 49
– Transmission Time: The time it takes for the sender to
transmit the message. This time is in the order of tens of
milliseconds depending on the length of the message and
the speed of the radio.
– Reception Time: The time it takes for the receiver to
receive the message. It is the same as the transmission
time.
– Interrupt Handling Time: The delay between the radio
chip raising and the microcontroller responding to an
interrupt.
– Decoding Time (Encoding Time): The time it takes for the
radio chip on the receiver side to transform and decode
the message from electromagnetic waves to binary data.
– Byte Alignment Time: The delay incurred because of the
different byte alignment of the sender and receiver.
50
51
Time Synchronization Methods
• RBS(Reference Broadcast Synchronization)
– RBS scheme use a third party for synchronization instead
of synchronizing the sender with a receiver.
– This scheme synchronizes a set of receivers with one
another.
– Nodes send reference beacons to their neighbors. A
reference beacon does not include a timestamp, but
instead, its time of arrival is used by receiving nodes as a
reference point for comparing clocks.
– By removing the sender's non-determinism from the
critical path, RBS scheme achieves much better precision
compared to traditional synchronization methods that use
two-way message exchanges between synchronizing
nodes.
52
– As the sender's non determinism has no effect on RBS
precision, the only sources of error can be the non
determinism in propagation time and receive time.
– In this scheme, a single broadcast will propagate to all
receivers at essentially the same time, and hence the
propagation error is negligible.

53
• TPSN (Timing-Sync Protocol for Sensor Network)
– The TPSN algorithm first creates a spanning tree of the
network and then performs pairwise synchronization along
the edges.
– Each node gets synchronized by exchanging two
synchronization messages with its reference node one
level higher in the hierarchy.
– The TPSN achieves two times better performance than RBS
by time-stamping the radio messages in the MAC layer of
the radio stack and by relying on a two-way message
exchange.
– The shortcoming of TPSN is that it does not estimate the
clock drift of nodes, which limits its accuracy, and does not
handle dynamic topology changes.
54
• Level Discovery Phase
– This phase of the algorithm occurs at the onset, when the
network is deployed.
– The root node is assigned a level 0 and it initiates this
phase by broadcasting a level discovery packet.
– The level discovery packet contains the identity and the
level of the sender. The immediate neighbors of the root
node receive this packet and assign themselves a level,
one greater than the level they have received i.e., level 1.
– After establishing their own level, they broadcast a new
level discovery packet containing their own level.
– This process is continued and eventually every node in the
network is assigned a level.
– On being assigned a level, a node neglects any such future
packets to avoid flooding congestion in this phase
55
56
• Synchronization Phase
– In this phase, pair wise synchronization is performed along
the edges of the hierarchical structure established in the
earlier phase.
– The classical approach of sender-receiver synchronization
is used for doing this handshake between a pair of nodes.
– The Figure shows this message-exchange between nodes
‘A’ and ‘B’. Here, T1, T4 represent the time measured by
local clock of ‘A’. Similarly T2, T3 represent the time
measured by local clock of ‘B’.

57
– At time T1, ‘A’ sends a synchronization pulse packet to ‘B’.
The synchronization pulse packet contains the level number
of ‘A’ and the value of T1. Node B receives this packet at T2,
where T2 is equal to T1 + D + d. Here D and d represents
the clock drift between the two nodes and propagation
delay respectively.
– At time T3, ‘B’ sends back an acknowledgement packet to
‘A’. This contains the level number of ‘B’ and the values of
T1, T2 and T3. Node A receives the packet at T4.
– Assuming that the clock drift and the propagation delay do
not change in this small span of time, ‘A’ can calculate the
clock drift and propagation delay as

– Knowing the drift, node A can correct its clock accordingly,


so that it synchronizes to node B. 58
• FTSP(Flooding Time Synchronization Protocol)
– The goal of the FTSP is to achieve a network wide
synchronization of the local clocks of the participating
nodes.
– In this protocol, each node has a local clock exhibiting the
typical timing errors of crystals and can communicate over
an unreliable but error corrected wireless link to its
neighbors.
– The FTSP synchronizes the time of a sender to possibly
multiple receivers utilizing a single radio message time-
stamped at both the sender and the receiver sides.
– MAC layer time-stamping can eliminate many of the errors,
as observed in many previous protocols.
– However, accurate time-synchronization at discrete points
in time is a partial solution only.
59
• FTSP achieves the required accuracy by utilizing a
customized MAC layer time stamping and by using
calibration to eliminate unknown delays.
• FTSP is robust to network failures, as it uses flooding
both for pair-wise and global synchronization.
– Linear regression from multiple timestamps is used to
estimate the clock drift and offset.
• The main drawback of FTSP is that it requires
calibration on the hardware actually used in the
deployment (thus is not a software solution purely
independent of the hardware).
• FTSP also requires intimate access to the MAC layer
for multiple timestamps.
60

You might also like