Uploaded by santhu.hegde

MID SEM COMINED

advertisement
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Network Embedded
Applications - Introduction
Networked Embedded Systems
BITS Pilani
• Collection of spatially & functionally embedded nodes connected via
wireline/wireless communication infrastructure/protocols
interacting with the environment
– Sensors, Actuators
• Interact with each other
• Master node - overall coordination – working towards a single goal
Networks of Embedded Systems (NES)
Automotive
Networks
Intelligent
Highways
Collaborative
Robots
Wildlife
Monitoring
• Large scale, ad hoc networks
• Heterogeneous node functionality: sensors, intelligent
cameras, smart appliances
• Limited resources: CPU, memory, bandwidth, energy
• Wired/ Wireless Communication
• Volatile, possibly mobile
BITS Pilani
Networked Embedded Systems
•
Deeply Embedded Systems
•
Sensor networks
•
Distributed control applications
•
Industrial Automation – Industry 4.0
•
Automotive Electronics + ITS
•
Ubiquitous computing environments
•
IoT
BITS Pilani
NES - Characteristics
• Involve many energy-constrained, resource-limited devices
operating in concert
• Largely self-organizing and self-maintaining
• Must be robust despite significant noise, loss, and failure
• Real-Time Applns
BITS Pilani
NES
BITS Pilani
IoT
BITS Pilani
IoT
BITS Pilani
In this Course
• Wireless Sensor Networks
• Industrial automation / Home Automation
• Automotive Networked Embedded Systems
BITS Pilani
Course Involves
• Reading Assignments at end of class
• Goal of covering the area is substantial depth
• It will require substantial reading and class participation
• Sequence of individual Network System Design
• Project
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Multi- processor Vs Distributed
Systems
System
• H/w
• Control
• Data
BITS Pilani
Attributes of a Distributed System
BITS Pilani
• Arbitrary No. of system and appln process (logical resources)
• Modular Physical Architecture
• Communication by message passing using shared commn. systems
• System wide control
Schroeder’s Definition
• A list of symptoms of a distributed system
• Multiple processing elements (PEs)
• Interconnection hardware
• PEs fail independently
• Shared states
BITS Pilani
Enslow’s Definition
BITS Pilani
• Distributed system = distributed hardware + distributed control +
distributed data
Hardware
BITS Pilani
• A single CPU with one control unit
• A single CPU – multiple ALUs – single control unit
• Separate Specialized functional units, such as one CPU with one
floating pt. co-processor
• Multi-processors with multiple CPUs but only one single I/O system
and on global memory
• Multiple computers with multiple CPUs, multiple I/O systems and
local memories
Control
BITS Pilani
• A Single Fixed Control pt. – Physically the system may or may not
have multiple CPUs
• Single Dynamic Control point
• A fixed master - slave structure
• Dynamic master – slave structure
• Multiple Homogeneous control points – copies of the same
controller are used
• Multiple Heterogeneous control points – different controllers are
used
Data
BITS Pilani
• Centralized Data bases with a single copy of both files and dir
• Distributed files with a single centralized dir and no local dir
• Replicated database with a copy of files and dir at each site
• Partitioned data base with a master that keeps a complete duplicate
copy of all files
• Partitioned database with a master that keeps only a complete dir
• Partitioned database with no master file/dir
Allowed area
for DS
BITS Pilani
Fully
Distributed
Processors
Data
Control
Enslow’s Model
Multi-processor Architectures
M1
M2
….
Interconnection Ntk
P1
P2
….
Shared memory Architecture
Interconnection Ntk
Mk
Pn
P1
P2
M1
M2
…….
M1
Pn
Mn
BITS Pilani
M2
Mk
Interconnection Ntk
P1
P2
M1
M2
UMA
Distributed memory Arch
…….
…….
Pn
Mn
NUMA
P12
P22
P21
P11
P13
P24
Network
P31
P32
P23
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network
WSN
BITS Pilani
WSN
BITS Pilani
WSN ???
BITS Pilani
• A world in which computing is so pervasive that everyday devices
can sense their relationship to us and to each other
• They could respond so appropriately to our actions that the
computing aspects would fade into the background
• Underlying assumption is that sensing a broad set of physical
phenomena rather than just data input will become a common
aspect of small embedded computers and that these devices will
communicate with each other as well as to some more powerful
infrastructure to organize and coordinate their actions
User Unaware of Presence –
Calm Technology that recedes
to the back of our lives
WSN
BITS Pilani
Network devices
to coordinate and perform
higher-level tasks
Embed numerous distributed
devices to monitor and
interact with physical world
Exploit spatially /temporally
dense, in-situ/remote sensing/
actuation
The Macroscope
• This concept as - “macroscope” -- a scientific
instrument that observes entire systems
BITS Pilani
Applications
• Monitoring Space
• Monitoring Objects
• Monitoring Interaction between Space & Objects
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network –
Monitoring Space
Monitoring Space
• Environmental and Habitat Monitoring
•
Precision Agriculture
•
Indoor Climate Control
•
Military Surveillance
•
Intelligent Alarms
BITS Pilani
Redwood Climate Monitoring
BITS Pilani
Redwood Climate Monitoring
BITS Pilani
70 m
2m
15m
Parameters Monitored
• Temperature
• Humidity
• Solar Radiation
Ever 5 Minutes
• Light Levels
• Photosynthetically active radiation
BITS Pilani
BITS Pilani
Cluster
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network –
Monitoring Objects
Monitoring Objects
• Structural Monitoring
• Condition-based Maintenance
• Medical Diagnostics
BITS Pilani
Sniper Monitoring
BITS Pilani
Sniper Monitoring ???
BITS Pilani
Sniper Monitoring ???
BITS Pilani
Sniper Monitoring ???
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network –
Monitoring Interactions between
Space & Objects
Monitoring Interactions
between Space & Objects
• Wildlife Habitats
• Disaster Management
• Asset Tracking
• Health Care
• Manufacturing Process Flows
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network – Basic
Building Blocks
WSN – Building Blocks ??
• Motes
• Simplest Intelligent Device
• Small Form Factor
• Michigan Micro Mote –(M3) – 2 x 4 x 4 mm3
BITS Pilani
WSN – Motes ??
Energy
Supply
BITS Pilani
Microcontroller
+
Memory
Ext Commn
Interface
Sensor /
Actuator
Suite
Motes ??
• Not Simple - Mote should have Individual Chars
that satisfy a Distributed Environment
• Map overall design requirement to Individual
Device Capability
BITS Pilani
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network –
Design Challenges
WSN - Classification
• Intelligent “Warehouses”
• Environmental Monitoring
• Very Large Scale Sensor Ntk Applns
BITS Pilani
Requirements
• Long Life
• Small Size
• Less cost
BITS Pilani
Locally Available Resources
• Limited Energy
• Limited Processing power
• Limited Memory
• Limited Bandwidth
BITS Pilani
Diversity & Dynamics
• Motes
• Sensors
• Nodes Deployed Randomly – Mobile
• Motes are subject to energy budget
• Motes may die
• Wireless Communication Media – dynamic
BITS Pilani
Dependability
• Harsh Environments
• Wireless Commn Media
• Security
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network –
Deployment
Deployment Objectives
• Coverage
• Connectivity
• Topology
BITS Pilani
Deployment - Issues
• Structured Vs Random Deployment
• Over Deployment Vs Incremental Deployment
• Network Topology
• Homogeneous Vs Heterogeneous Deployment
BITS Pilani
Ideal Deployment
BITS Pilani
Random Deployment
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network –
Deployment Pattern
Deployment Patterns
BITS Pilani
Deployment Patterns - Star
Energy Consumption
BITS Pilani
Deployment Patterns –
Multi Hop
BITS Pilani
Deployment Patterns Cluster
BITS Pilani
Deployment Patterns Cluster
BITS Pilani
Deployment Patterns Cluster
BITS Pilani
Deployment Patterns Cluster
Scalability
BITS Pilani
Deployment Patterns –
Data Mule
BITS Pilani
Deployment Patterns –
Data Mule
BITS Pilani
Deployment Patterns –
Data Mule
BITS Pilani
Deployment Patterns –
Data Mule
BITS Pilani
Deployment Patterns –
Data Mule
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network Protocol Stack
Protocol Stack
Appln
Transport
Network
Data Link
Physical
•
•
•
•
BITS Pilani
ISM – 2.4GHz
ZigBee
LoRa, UWB
Simple Modulation
Technique
• Energy Aware - Short Range
Protocol Stack
Appln
Transport
Network
Data Link
Physical
• Energy Aware
• Collisions
• Idle Listening
• Overhearing
• Sleep state
• Over- emitting
• Multi Channel
BITS Pilani
Protocol Stack
Appln
Transport
Network
Data Link
Physical
• Data Centric
• Energy Aware
• Data Aggregation
• Query- Response
BITS Pilani
Protocol Stack
BITS Pilani
Appln
Transport
Network
Data Link
Physical
• Appears only when WSN
connects to standard
infrastructure
• Nodes – Gateway
• Gateway needs Transport
Protocol Stack
Appln
•
•
Transport
•
•
Network
Data Link
Physical
•
•
BITS Pilani
One single application
Whole protocol stack designed for a
special appln
Whole network is seen as an instrument
Application layer distributed along the
whole protocol stack
Not appear explicitly
Explicit application
• Sensor management
• Task management
• Data advertisement
• sensor query & data extraction
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network Cross Layer Protocol Stack
Protocol Stack - Issues
• Dynamic environment
• Power control - Longetivity
• Protocol place in the sensor node architecture
• Protocol availability
BITS Pilani
Dynamic Environment
BITS Pilani
• Sensor nodes address a dynamic environment
• Nodes have to reconfigure themselves –
• to adapt to the changes.
• resources are very limited
• Network - adapts its functionality to a new situation
-lower the use of the scarce energy & memory maintain the integrity of its operation
Error Control
• Normally resides in all protocol layers – worst case
scenarios are handled
• WSN this redundancy- too expensive
• Adopting a central view on how error control is
performed and cross-layer design reduces the
resources spent for error control
BITS Pilani
Power Control
• Traditionally done only at the physical layer,
• Energy consumption- is a major design constraint found in all
BITS Pilani
Protocol Place
Habitat Monitoring
BITS Pilani
Protocol Place
BITS Pilani
• Time synchronization, localization, calibration.
• Shift their place in the protocol stack - transient
phase is over
• Data produced by some of these algorithms might
make a different protocol stack more suited for the
sensor node
• Localization algorithm for static sensor networks
might enable a better routing algorithm
Protocol Availability
• New protocols might become available after
network deployment
• In specific conditions- some of the sensor nodes
might use a different protocol stack that better
suits their goal & the environment
• Changing or Updating at run time parts of the
software on the nodes is important
BITS Pilani
Cross Layer Protocol
BITS Pilani
Appln
Transport
Network
Data Link
Physical
Cross Layer
3D Protocol Stack
Application Layer
Transport Layer
Network Layer
Data Link Layer
Physical Layer
BITS Pilani
M
a
n
a
g
e
m
e
n
t
P
o
w
e
r
M
a
n
a
g
e
m
e
n
t
M
M a
o n
b a
i g
l e
i m
t e
y n
t
T
a
s
k
Protocol Placement
BITS Pilani
Appln
Link
Physical
Localization
Network
Routi
ng
Clust
ering
Timi
ng
Security
Transport
Addressing
Aggr
egati
on
Node – Modes of Operation
• Initialization
• Post – Deployment Operation
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network –
Time Sync
Time Sync ??
• All nodes in the network have a common view of
time
BITS Pilani
Why Time Sync ??
• Target Tracking
• Speed estimation
• Event Detection
• Voice & Video Sync
• Security
• MAC-TDMA
• Local Clocks with crystal instability tend to drift
BITS Pilani
Reasons for drift
• Temperature – few ppm in PC
• Frequency noise (10-4 - 10-6 )
• Clock Glitches
• Phase Noise
• Asymmetric Delay
BITS Pilani
14
Detected Interval – 1 units
13
12
BITS Pilani
Actual Interval – 4 units
11
10
9
8
7
6
5
4
3
2
1
1
2
3
4
5
6
7
8
9
10 11 12 13 14
Time Sync Protocol Requirements
• Robust
• Precision
• Energy Aware
• Server-Less
• Light Weight
• Tunable
• Immediacy
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network –
Time Sync Protocols
Time Sync Types
• Sender – Receiver synchronization
• Receiver – Receiver synchronization
BITS Pilani
Sender – Receiver Synch
Time Sync Protocol for Sensor Networks
(TPSN)
• Level Discovery
• Sync
BITS Pilani
TPSN – Level discovery
BITS Pilani
Level 2
Level 5
Level 1
Level 4
Level 3
Level 0
level_discovery
TPSN - Sync
• Root node initiates – time sync
• Level 1 nodes – each wait for random time
• Reduce probability of collision at MAC
BITS Pilani
TPSN – Sync
T2
BITS Pilani
T3
T2 = T1 + ∆ + d
∆ - clock drift
d – propagation delay
synch_pulse
ack
∆ = (T2 – T1) – (T4 – T3)
T1
T4
2
d = (T2 – T1) + (T4 – T3)
2
TPSN - Sync
• Nodes at Level 2 will be able to hear sync pulses
of nodes at Level 1
• Wait for a random time
• Attempt to sync with nodes at Level1
BITS Pilani
TPSN - Issues
• Unable to hear level_discovery from higher level
nodes – then wait and send level request
• Hear from different nodes – different levels – pick
smallest level
• No response to sync pulse as node at higher level
dead – send level request at higher energy levels
BITS Pilani
TPSN - Inaccuracies
S1
M1
BITS Pilani
T1
P12
R2
T3
S4
R4
P34
M3
S2
S3
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network –
Time Sync Protocols
Time Sync Types
• Sender – Receiver synchronization
• Receiver – Receiver synchronization
BITS Pilani
Receiver – Receiver Synch
Receiver Broadcasting Service (RBS)
• Three stages
• Transmitter broadcasts clock time
• Each rx records the time that the ref was rxedlocal clock
• Receivers exchange observations
BITS Pilani
BITS Pilani
RBS
1
2
A
3
4
TPSN - Inaccuracies
S1
M1
BITS Pilani
T1
P12
R2
T3
S4
R4
P34
M3
S2
S3
Inaccuracies Removed ??
BITS Pilani
p1
r1 = T + p1
r2 = T + p2
p2
Propagation delay - negligible
T2 = T 1 + ∆ + d
Is RBS extremely accurate ?
• No as both skew and offset contribute to lack of
sync
• Offset – as each node may start at different time
• Works well in single – hop
• Requires Time Translation in case of multi-hop
BITS Pilani
Time Translation
1
A
2
6
3
B
4
5
7
BITS Pilani
PA sent
E1 occurs 2 units later
E2 occurs
PB sent 4 units later
PB sent 10 units before PA
E1 = PA + 2
E2 = PB - 4
PA = PB + 10
E1 – E2 = PB + 10 + 2 – PB +4
E1 – E2 = 16
Time Sync Protocols
• Type1 : Time servers
• Type2 : Translate time thro’ ntk
• Type3 : Self-organize to sync clock
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network Localization
Habitat Monitoring
BITS Pilani
Localization??
• All nodes in the network have an idea about their
absolute/relative position
BITS Pilani
Localization
BITS Pilani
•
Dynamic environment
•
Hundreds of sensors are placed randomly – over a large area
•
Initial location of the nodes may been unknown
•
Estimation of a nodes position used
• Measurement without position is useless
• Allows energy efficient geographic routing
• Self-organization and Self- healing is easier
• Obstacles can be found and by-passed
• Tracking – Measurement itself
Position Estimation
• Not possible to equip every node with GPS
• Anchors, beacons, landmark nodes
• Triangulation
• Tri-Lateration
• Multi-Lateration
BITS Pilani
Method to estimate distances based
on
Time Period
Signal Attenuation
Neighborhood
Information
• ToA
• RSS
• Connectivity
• TDoA
• MTP
• Hop Count
BITS Pilani
Localization– Modes of Operation
• Initialization
• Post – Deployment Operation - Mobile
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network Localization – Distance Estimation
Time of Arrival (ToA)
Position
S2
S1
BITS Pilani
∆t2
∆t1
d = cAIR ∆t
B1
Time
Issues with ToA??
• CAIR - 297,702 km/s ≈ 3x106 m/s
• d = 30cm btwn B1 & S1
• ∆t = 1ns
BITS Pilani
Time of Arrival (ToA)
BITS Pilani
∆t1
Position
S2
S1
d = cS * (∆t1-te)
B1
te
Time
Improvement??
• CS - 340 m/s
• All time measurements will not be affected by
lack of time sync
• Sound unpredictable medium
• Additional hardware
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network Localization – Distance Estimation
Time Difference of Arrival (TDoA)
1 = √ (x – x1 ) 2 + (y – y1 ) 2
y
_ √ (x – x2 ) 2 + (y – y 2) 2
∆d
∆d
d3
h'(B1 ; B2 )
B3
h(B1 ; B3 )
S1
d1
B1
d1 – d2 = ∆t.c = ∆d
BITS Pilani
h(B1 ; B2 )
d2
B2
∆t = tend - tstart
x
Issues with TDoA??
• No. of Beacons required
• Localized nodes can act as beacons themselves
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network Localization – Distance Estimation
Received Signal Strength (RSSI)
TX
PRX =
PTX
RX
BITS Pilani
Received Signal Strength (RSSI)
λ0
L
TX
GTX
PRX =
PTX
d
GRX
RX
BITS Pilani
Received Signal Strength (RSSI)
λ0
L
TX
PRX =
PTX
d
GTX
GRX
RX
BITS Pilani
Received Signal Strength (RSSI)
λ0
L
TX
PRX =
PTX
d
GTX GRX
RX
BITS Pilani
Received Signal Strength (RSSI)
λ0
TX
PRX =
PTX
d
GTX GRX
L
RX
BITS Pilani
Received Signal Strength (RSSI)
TX
PRX =
PTX
RX
d
GTX GRX
L
λ0
BITS Pilani
Received Signal Strength (RSSI)
TX
PRX =
PTX
RX
GTX GRX
L
λ0
d
BITS Pilani
Received Signal Strength (RSSI)
TX
PRX =
PTX
RX
GTX GRX
L
λ0
4πd
2
BITS Pilani
Received Signal Strength (RSSI)
PRX =
PTX
GTX GRX
λ0
4πd
L
PL = 10 log GTX GRX
L
dmax =
λ0
4π10 –PLmax/20
2
λ0
4πd
FRIIS Equation
2
BITS Pilani
Issues with RSSI??
• Ideal Gain & No Loss Assumption
• Loss is unpredictable
• Need for measurement technique
BITS Pilani
Minimum Transmission Power (MTP)
• Motes allow multiple power levels
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network Localization – Algorithms
Issues with Localization
• Resource Constraints
• Node Density
• Non-Convex Topology – Border Node Problems
• Environmental Obstacles & Terrain Irregularities
BITS Pilani
Requirements of LA
• High Precision
• Minimal cost
• Fully distributed – robust & reliable
• Adaptive to environmental changes
• Mobility must be accommodated
• Resource- Efficient
BITS Pilani
Types of LA
• Approximate Vs Precise
• Central Vs Distributed
• Range based Vs Range Free
• Relative Vs Absolute
• Indoor Vs Outdoor
• Beacon-Free Vs Beacon based
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Classical Localization Techniques
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Triangulation & Trilateration
BITS Pilani
S
α3
B1S = B1B2 (sinα2 /sinα3)
B2S = B1B2 (sinα1 /sinα3)
α1
B1
α2
B2
BITS Pilani
(BiS ) 2 = (Bi(xi ) - S(x) )2 + (Bi(yi) – S(y) )2
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network Localization – Centroid Localization
Centroid Localization - Assumptions
• Perfect Spherical Radio Propagation
• Identical Tx range for all radios
• The neighbouring signal points can be sync so
that they do not overlap in time
BITS Pilani
BITS Pilani
Position Estimation
S (x,y) = 1/n Σn B(xi,yi)
BITS Pilani
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Weighted Centroid
BITS Pilani
Weighted Centroid
Position Estimation
S (x,y) = [1/Σnwi]*Σn wi B(xi,yi)
BITS Pilani
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Wireless Sensor Network Localization – APIT
APIT
• Approximate Point in Triangulation
• APIT employs area based approach to perform
location estimation by isolating the environment
into triangular regions between beaconing nodes
BITS Pilani
Assumptions
• Heterogeneous networks
• Few nodes with high power tx & GPS
• Beacon signal degrade monotonically
BITS Pilani
BITS Pilani
APIT
Phases
• Beacon Exchange
• PIT Testing
• APIT Aggregation
• COG calculation
BITS Pilani
BITS Pilani
A
A
M
M
B
C
B
PIT
C
BITS Pilani
A
A
M
M
B
C
B
PIT
C
BITS Pilani
A
A
M
M
B
C
B
PIT
C
BITS Pilani
A
A
M
M
B
C
B
PIT
C
BITS Pilani
A
A
M
M
B
C
B
PIT
C
BITS Pilani
M
A
N
Departure Test
BITS Pilani
A
A
M
M
B
C
B
APIT
C
BITS Pilani
A
A
M
M
B
C
B
APIT
C
BITS Pilani
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
1
0
1
0
1
0
0
0
0
0
0
1
0
1
0
1
0
1
0
`1
1
0
0
0
0
0
0
1
2
3
0
1
2
0
1
1
0
1
0
0
0
-1
0
0
1
0
1
0
2
0
1
2
0
1
1
0
1
0
0
0
-1
0
-1
0
0
0
2
0
1
2
0
1
2
0
1
1
0
0
0
-1
0
-1
0
-1
0
0
1
0
1
0
1
0
0
0
0
-1
0
-1
0
-1
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Routing- Optimization based
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
MCF
Routing
• Scalable solution to Minimum Cost Forwarding –
Cost field - based approach
• Minimum Cost Path to sink from any node
• Each message has minimum cost from source to
sink
• As a message travels from source to intermediate
• Each intermediate node forwards the packet
only if
• Minimum cost < Cost so far + Cost from IN to
sink
BITS Pilani
190
200
X
150
110
A
180
180,40
B
Y
130
C
180,110
180,80
E
D
80
90
F
Routing
• No forwarding path states needed- each node
only needs to maintain the minimum cost from
this node to the sink
• Once the cost field is set up- any sensor can
deliver the data to the sink
• user has interests in observations from multiple
sensors
• From the forwarding perspective- each
intermediate sensor does not need an ID or an
address
BITS Pilani
C
B
∞
4
2.5
∞
1.5
ADV -1.5
A
0
ADV -0
γ = 10
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Routing-Data Centric
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
SPIN
SPIN (Sensor Protocols for
Information via Negotiation)
SPIN Focus on efficient dissemination of individual sensor observations
to all the sensors in a ntk- treat all sensors as potential sink nodes
SPIN family of protocols incorporates two key innovations
 negotiation
 resource-adaptation
 Implosion
 Overlap
 Resource Blindness
Resources for SPIN
 Meta data
– used to describe the message
 Resource Manager
– keeps track of energy
C
B
A
E
REQ
G
DATA
D
ADV
ADV
F
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Directed Diffusion
Directed Diffusion
Data generated by sensor nodes is named by attribute-value pair
Sink request data by sending interests for named data
Every node has an interest cache
Data matching the interest is drawn towards the sink
Intermediate nodes – may fuse data with their own or cache it
A sensing task is disseminated through the network as interests
Dissemination sets up gradients within the ntk designed to draw data
Query & Response Format
Type
four-legged animal
Interval
20ms
Duration
10s
Rect
100,100,200,400
Type
four-legged animal
Instance
elephant
Location
125,250
Confidence
0.85
Timestamp
01:20:40
Type
four-legged animal
Instance
elephant
Location
125,250
Confidence 0.85
Timestamp
01:20:40 Data cache
Type
four-legged animal
Interval
10ms
Rect
100,100,200,400
Time stamp 01:22:35
Expiry
01:30:40
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Rumor
Rumour Routing
 A logical compromise between flooding queries and flooding event
notifications
 In the event that there is small data then data flooding may be better
than event query flooding
 Each node maintains – event table, neighbour table
 Event may create an agent
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Routing – Location based
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
GEAR
What to Do ????
Answer is LOCATION !!!!!
Why Geographical Routing
???
Geographic routing allows nodes to be
nearly stateless and requires propagation
of topology information for only a single hop
The position of a packet’s destination and next-hop
neighbor positions are sufficient for making
packet forwarding decisions
Goals
Reduce size of topology information stored (state) in the nodes
Provide geography-based forwarding
Minimize the mobility overhead traffic
Extend life-time of the network
GEAR
Assumptions
Query pkt - target region specified
Node knows own loc & remaining energy level
Node knows its neighbours' locs & remaining energy
Link is bi-directional
Working
Two Phases
Phase 1- Forwarding the packets towards the target region:
◦ Geographical & energy aware neighbour selection heuristic
◦ When a closer neighbour to dstn exists
◦ When all neighbours are further away
Phase 2- Disseminating the packet within the region
◦ Recursive Geographic forwarding/Restricted Flooding
R
N
h (Ni, R)
P
D
h (Ni, R) = c (Ni , R)
c (Ni, R) = α d(Ni, R)+(1- α) e(Ni)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
R
N
P
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Routing –QoS based
BITS Pilani
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Energy Aware QoS Routing
Protocol for WSN
AIM
Find an optimal path to the gateway in terms –
◦ energy consumption
◦ error rate
◦ meeting end-to-end delay requirements
Find least - cost path - - meets end-to-end delay path constraint - extra goal - maximize the throughput of non-real-time traffic
Working
k – least cost path
Apply end-to-end delay constraint –M
From M – select path that has maximum throughput
Tasks Type
Real Time
Non-Real Time
r of BW given to RT
(1-r) of BW to NRT
Cost Factor
Link Cost
Distance between i & j
Energy at j
Time at which energy at j will be depleted
Making a node a relay
Node is sensing
No. of paths that go thro’ j
Buffer size at j
Calculate cost ij ∀ i, j ∈ V
Find the least cost path for each node using Dijkstra’s shortest path
algorithm
Compute r from Tend-end (pi) = T required
If yes choose path
Else
Find K least cost paths
recompute r
If r is btwn 0-1
break
If no appropriate r is found
reject connection
End
Find max r
WSN
MAC – SMAC & Variants
SMAC
• Reduce energy consumption
• Supporting good scalability
• Supporting collision avoidance
Main goal
of SMAC
• Protocol tries to reduce energy
consumption from
– Idle listening
– Collision
– Overhearing
– Control overhead
• SMAC consists of three major components
– Periodic listen and sleep
– Collision and overhearing avoidance
– Message passing
• Sensor ntks will be composed of many small nodes
• Large no. of nodes can also take adv of short-range,
multi-hop commn - to conserve energy
• Most commn will be btwn nodes as peers- rather
than to a single base-station.
• Nodes will be deployed casually in an ad hoc fashion
• Nodes therefore self-configure
Network
Characteristics
• Sensor ntks are dedicated to a single appln /few
collaborative applns- rather than node-level fairness
(like in the Internet)- focus is on maximizing systemwide appln performance
• In-network processing is critical to sensor network
lifetime
• Applns will have long idle periods & can tolerate
some latency
Periodic
Listen &
Sleep
• If in each second a nodes sleeps for a half a
second and remains awake for half a
second – 50% Energy consumption
reduced
Basic
Scheme
• Each node goes to sleep for some time
• During sleep the node turns off its radio
• Sets a timer to awaken itself
• Wakes up and listens to see if any other node
wants to talk to it
• The duration of time for listening & sleeping
can be selected according to diff appln
scenarios
•
For simplicity these values are the same for
all the node
Working
• Scheme requires periodic synchronization among neighbouring nodes to
remedy their clock drift
• Two techniques are used to make it robust to synch errors
– Timestamps that are exchanged are relative rather than absolute
– Listen period is significantly longer than clock error or drift
• Nodes exchange schedules by broadcasting it to all its immediate
neighbours
• This ensures that all neighbouring nodes can talk to each other even if they
have different schedules
Working
• If multiple neighbours want to talk to a node- contend for the medium when
the node is listening
• The contention mechanism is the same as that in IEEE 802.11
– RTS (Request To Send)
– CTS (Clear To Send)
• Node who first sends out the RTS packet wins the medium- Rx will reply with
a CTS packet.
• After they start data tx they do not follow their sleep schedules until they
finish tx
• Latency is increased due to the periodic
sleep of each node
Disadvantages
• Delay can accumulate on each hop
• The latency requirement of the appln
places a limit on the sleep time
Choosing and Maintaining Schedules
• Before each node starts its periodic listen and sleep, it needs to
choose a schedule and exchange it with its neighbours
• Each node maintains a schedule table
• The node first listens for a certain amount of time- If it does not hear
a schedule from another node- it randomly chooses a time to go to
sleep and immediately broadcasts its schedule in a SYNC messageindicating that it will go to sleep after t seconds
• Node – Synchronizer
• If node receives a schedule from a neighbour before choosing its own
schedule- it follows that schedule by setting its schedule to be the
same
• Node- Follower
C
F
A
B
E
D
G
H
Choosing &
Maintaining Schedules
• Follower then waits for a random delay td and rebroadcasts this
schedule-indicating that it will sleep in t-td sec
• If a node receives a different schedule after it selects & broadcasts its
own schedule - it adopts both schedules
• It schedules itself to wake up at times of both is neighbor & itself
• It broadcasts it own schedule before going to sleep
• Generally happens in case of border nodes
• Updating schedules is accomplished by
sending a SYNC pkt
• SYNC pkt is very short
– Address of the sender
– Time of its next sleep
• Next-sleep time is relative to the
moment that the sender finishes
transmitting the SYNC pkt - which is
approximately when receivers get the
pkt
• Receivers will adjust their timers
immediately after they receive the
SYNC
• A node will go to sleep when the timer
fires
Maintaining
Synchronization
• In order for a node to receive both SYNC
packets and data packets
• Listen interval is divided into two parts
• The first part is for receiving SYNC packets
• Second part is for receiving RTS packets
• Each part is further divided into many time
slots for senders to perform carrier sense
• If a sender wants to send a SYNC packet- it
starts carrier sense when the receiver begins
listening
•
It randomly selects a time slot to finish its
carrier sense
•
If it has not detected any transmission by the
end of the time slot- it wins the medium and
starts sending its SYNC packet at that time
•
The same procedure is followed when sending
data packets
Maintaining
Synchronization
Rx
For sync
N1
CS
N2
CS
N3
CS
For RTS
Sleep
Send data if CTS received
CS
Send data if CTS received
Source
Destination
RTS
CTS
Network Allocation
Vector
Data
ACK
CSMA/CA
Overhearing Avoidance
• Protocol tries to avoid overhearing by letting interfering nodes go to
sleep after they hear an RTS or CTS packet
• Since DATA packets are normally much longer than control packetsthe approach prevents neighbouring nodes from overhearing long
DATA packets and the following ACK
E
C
A
B
D
F
• Message is a collection of meaningfulinterrelated units of data
• It can be a long series of pkt or a short pkt usually the rx needs to obtain all the data
units before it can perform in-network data
processing /aggregation
• Disadvs of transmitting a long message as a
single packet - high cost of re-transmitting
the long pkt if only a few bits have been
corrupted in the first tx
Message
Passing
• If pkt fragmented - have to pay the penalty
of large control overhead & longer delay
•
RTS /CTS - contention for each independent
pkt
• Fragment the long message into many
small fragments, and transmit them in
burst
• Only one RTS/CTS used- they reserve the
medium for transmitting all the fragments
• Every time a data fragment is
transmitted- sender waits for an ACK from
the rx.
Message
Passing
• If it fails to receive the ACK- it will extend
the reserved tx time for one more
fragment- re-transmit the current
fragment immediately
For a pkt moving thro’ a multi-hop ntk it
experiences the foll delays at each hop
Carrier sense delay
Backoff delay
Transmission delay
Propagation delay
Processing delay.
Queuing delay
Sleep Delay
D = Tframe /2
Tframe = Tlisten + Tsleep
WSN
MAC – SMAC & Variants
TMAC & DMAC
THE VARIANTS
T-MAC
Time period for which it waits – ta
Drawback of TMAC –early sleeping problem
n
s
r
SOLUTIONS TO
THIS
PROBLEM
FUTURE RTS
FULL BUFFER
PRIORITY
WSN
MAC – SMAC & Variants
DMAC
3
DMAC –
Three
types of
data
• Broadcast from sink
• Local Data Gathering
• Data to be sent to sink
3/8/2023
SSG656 - Networked Embedded Applications
DMAC
Reduces Sleep Latency
R T
R T
R T
R T
R T
R T
R T
R T
R T
R T
4
3/8/2023
SSG656 - Networked Embedded Applications
ADVANTAGES
• Nodes on the path wake up sequentially to forward a packet to
next hop - sleep delay is reduced
• A request for longer active period can be propagated all the way
down to the sink
• Active periods are now separated - contention is reduced.
• Only nodes on the multi-hop path need to increase duty cycle
µ = 𝐵𝐵𝐵𝐵 + 𝐶𝐶𝐶𝐶 + 𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷 + 𝐴𝐴𝐴𝐴𝐴𝐴 + 𝑆𝑆𝑆𝑆 + 𝐴𝐴𝐴𝐴𝐴𝐴
SIZE OF SLOT
WSN
MAC
TDMA Based
2
EMAC
CR TC
Data
CR TC Data
CR TC Data
CR TC Data
Disadvantage
Scalability
3/8/2023
SSG656 - Networked Embedded Applications
3
LMAC
C
3/8/2023
Data
C
Data
SSG656 - Networked Embedded Applications
C
Data
4
Download