Adhoc
Adhoc
Adhoc
(Autonomous)
Dundigal, Hyderabad - 500 043
MH2
MH2
MH4
MH3 Asymmetric link
MH5
2
Issues
The main issues need to be addressed while designing a
MAC protocol for ad hoc wireless networks:
Bandwidth efficiency is defined at the ratio of the
bandwidth used for actual data transmission to the total
available bandwidth. The MAC protocol for ad-hoc
networks should maximize it.
Quality of service support is essential for time-
critical applications. The MAC protocol for ad-hoc
networks should consider the constraint of ad-hoc
networks.
Synchronization can be achieved by exchange of
control packets.
2
7
Issues
The main issues need to be addressed while designing a MAC protocol for ad
hoc wireless networks:
Hidden and exposed terminal problems:Hidden nodes:Hidden stations:
Carrier sensing may fail to detect another station. For example, A and
D.Fading: The strength of radio signals diminished rapidly with thedistance
from the transmitter. For example, A and C.Exposed nodes:Exposed stations:
B is sending to A. C can detect it. C might want to send to E but conclude it
cannot transmit because C hears B.Collision masking:
The local signal might drown out the remote
transmission.Error-Prone Shared Broadcast ChannelDistributed
Nature/Lack of Central CoordinationMobility of Nodes: Nodes are mobile
most of the time.
2
8
Hidden & exposed terminal problem
2
9
The Hidden Terminal Problem
3
0
The Exposed Station Problem
3
1
Wireless LAN configuration
A B C
Lapt ops
LAN
32
Design goals of a MAC Protocol
Design goals of a MAC protocol for ad hoc wireless
networks
The operation of the protocol should be distributed.
The protocol should provide QoS support for real-
time traffic.
The access delay, which refers to the average delay
experienced by any packet to get transmitted, must be kept
low.
The available bandwidth must be utilized efficiently.
The protocol should ensure fair allocation of
bandwidth to nodes.
33
Design goals of a MAC Protocol
Control overhead must be kept as low aspossible.
The protocol should minimize the effects of hidden
and exposed terminal problems.
The protocol must be scalable to largenetworks.
It should have power control mechanisms.
The protocol should have mechanisms for adaptive
data rate control.
It should try to use directional antennas.
The protocol should provide synchronization among
nodes.
34
Classifications of MAC protocols
35
Classifications of MAC protocols
36
Classifications of MAC Protocols
Contention-based protocols
Sender-initiated protocols:
Packet transmissions are initiated by the sender node.
Single-channel sender-initiated protocols: A node that
wins the contention to the channel can make use of the
entire bandwidth.
Multichannel sender-initiated protocols: The available
bandwidth is divided into multiple channels.
Receiver-initiated protocols:
The receiver node initiates the contention resolution
protocol.
37
Classifications of MAC Protocols
38
Classifications of MAC Protocols
39
Contention-based protocols
40
Contention-based protocols
Once the sender receives the CTS packet
without any error, it starts transmitting the data
packet.
If a packet transmitted by a node is lost, the
node uses the binary exponential back-off
(BEB) algorithm to back off a random interval
of time before retrying.
The binary exponential back-off mechanism
used in MACA might starves flows sometimes.
The problem is solved by MACAW.
41
MACA Protocol
42
MACA examples
RTS
CTS CTS
A B C
43
MACA examples
RTS RTS
CTS
A B C
44
Contention-based protocols
45
Contention-based protocols
46
Contention-based protocols
Busy Tone Multiple Access Protocols (BTMA)
The transmission channel is split into two:
a data channel for data packet transmissions
a control channel used to transmit the busy tone signal
When a node is ready for transmission, it senses the channel to
check whether the busy tone is active.
If not, it turns on the busy tone signal and starts data
transmissions
Otherwise, it reschedules the packet for transmission after
some random rescheduling delay.
Any other node which senses the carrier on the incoming
data channel also transmits the busy tone signal on the
control channel, thus, prevent two neighboring nodes from
transmitting at the same time.
47
Contention-based protocols
48
Contention-based protocols
Receiver-Initiated Busy Tone Multiple Access Protocol
(RI-BTMA)
The transmission channel is split into two:
a data channel for data packet transmissions
a control channel used for transmitting the busy
tone signal
A node can transmit on the data channel only if it
finds the busy tone to be absent on the control
channel.
The data packet is divided into two portions: a
preamble and the actual data packet.
49
Contention-based protocols
50
Contention-based Protocols with
Reservation Mechanisms
51
Contention-based Protocols with
Reservation Mechanisms
Distributed packet reservation multiple access protocol
(D-PRMA)
It extends the centralized packet reservation multiple
access (PRMA) scheme into a distributed scheme that
can be used in ad hoc wireless networks.
PRMA was designed in a wireless LAN with a base
station.
D-PRMA extends PRMA protocol in a wireless
LAN.
D-PRMA is a TDMA-based scheme. The channel is
divided into fixed- and equal-sized frames along the
time axis.
52
Access method DAMA: Reservation- TDMA
53
Distributed Packet Reservation Multiple
Access Protocol (D-PRMA)
1 2 3 4 5 6 7 8 time-slot
reservation
ACDABA-F frame1 A C D A B A F
ACDABA-F frame2 A C A B A
AC-ABAF- frame3 A B A F collision at
reservation
A---BAFD frame4 A B A F D attempts
ACEEBAFD frame5 A C E E B 33A F D t
54
Distributed Packet Reservation Multiple
Access Protocol (D-PRMA)
55
Contention-based protocols with
Reservation Mechanisms
56
Contention-based protocols with
Reservation Mechanisms
57
Contention-based protocols with
Reservation Mechanisms
Hop reservation multiple access protocol (HRMA)
a multichannel MAC protocol which is based on
half-duplex, very slow frequency-hopping spread
spectrum (FHSS) radios
uses a reservation and handshake mechanism to
enable a pair of communicating nodes to reserve a
frequency hop, thereby guaranteeing collision-free
data transmission.
can be viewed as a time slot reservation protocol
where each time slot is assigned a separate frequency
channel.
58
Contention-based protocols with
Reservation Mechanisms
Soft reservation multiple access with priority
assignment (SRMA/PA)
Developed with the main objective of
supporting integrated services of real-time and
non-real-time application in ad hoc networks,
at the same time maximizing the statistical
multiplexing gain.
Nodes use a collision-avoidance handshake
mechanism and a soft reservation mechanism.
59
Contention-based protocols with
Reservation Mechanisms
Five-Phase Reservation Protocol (FPRP)
a single-channel time division multiple access
(TDMA)-based broadcast scheduling protocol.
Nodes uses a contention mechanism in order to
acquire time slots.
The protocol assumes the availability of global time
at all nodes.
The reservation takes five phases: reservation,
collision report, reservation confirmation, reservation
acknowledgement, and packing and elimination
phase.
60
Contention-based protocols with
Reservation Mechanisms
61
Contention-based protocols with
Reservation Mechanisms
Real-Time Medium Access Control Protocol (RTMAC)
Provides a bandwidth reservation mechanism for
supporting real-time traffic in ad hoc wireless networks
RTMAC has two components
A MAC layer protocol is a real-time extension of the
IEEE 802.11 DCF.
A medium-access protocol for best-effort traffic
A reservation protocol for real-time traffic
A QoS routing protocol is responsible for end-to-end
reservation and release of bandwidth resources.
62
Contention-based protocols with
Scheduling Mechanisms
Protocols in this category focus on packet
scheduling at the nodes and transmission
scheduling of the nodes.
The factors that affects scheduling decisions
Delay targets of packets
Traffic load at nodes
Battery power
63
Contention-based protocols with
Scheduling Mechanisms
Distributed priority scheduling and medium
access in Ad Hoc Networks present two
mechanisms for providing quality of service
(QoS)
Distributed priority scheduling (DPS) – piggy-backs
the priority tag of a node’s current and head-of-line
packets o the control and data packets
Multi-hop coordination – extends the DPS scheme to
carry out scheduling over multi-hop paths.
64
Contention-based protocols with
Scheduling Mechanisms
65
Contention-based protocols with
Scheduling Mechanisms
67
MAC Protocols that use directional Antennas
68
Other MAC Protocols
Multi-channel MAC Protocol (MMAC)
Multiple channels for data transmission
There is no dedicated control channel.
Based on channel usage channels can be classified into three types: high
preference channel (HIGH), medium preference channel (MID), low
preference channel (LOW)
Multi-channel CSMA MAC Protocol (MCSMA)
The available bandwidth is divided into several channels
Power Control MAC Protocol (PCM) for Ad Hoc Networks
Allows nodes to vary their transmission power levels on a per-packet basis
Receiver-based Autorate Protocol (RBAR)
Use a rate adaptation approach
Interleaved Carrier-Sense Multiple Access Protocol (ICSMA)
The available bandwidth is split into tow equal channels
The handshaking process is interleaved between the two channels.
69
Network Setup
MT MT MT
AP AP AP
Ethernet
Standard also supports ad-hoc networking where MT’s talk directly to MT’s
70
Media Access Control - Ethernet
Ethernet
Scenario:
72
HIPERLAN/2 MAC
73
Performance Comparison
74
Illustration of Multi-hop MANET
Each color represents range of
transmission of a device
S A
S B
B
D
Z
[S] E
F [S,E,F]
B
C M L
J
A G
H [D]
K
[S,C,G]
I N
Z
[S] E
F [S,E,F,J]
B
C M L
J
A G
H [D]
K
I [S,C,G,K] N
Z
[S] E
[S,E,F,J,M]
F
B
C M L
J
A G
H [D]
K
I N
C
B
4
5 3
S
MH D sends its updates to node 6, which might then select quorum A with nodes
1, 2, and 6 to host the information
For example, MH 4 might, choose quorum B, consisting of MHs 4, 5, and 6
for the query
Larger the quorum set is, higher the cost for position updates and queries
are
Can be configured to operate as all-for-all, all-for-some, or some-for-some
approach
Expected Zone Routing
„ Request zone can be defined based on the expected zone
„ Node S defines a request zone for the route request
„ A node forwards a route request only if it belongs to the request zone
„ To increase the probability to reach node D, the request zone should include
the expected zone
„ Additionally, the request zone may also include other regions around
R
Q(Xd+R, Yd)
D(Xd, Yd)
J(Xj, Yj) Expected zone
I(Xi, Yi)
S(XS, YS)
C(Xd+R, YS)
Request zone
UNIT –III
Basics Of Wireless Sensors And Applications:
Introduction
Wireless Sensor Networks can be considered as a special case of ad hoc
networks with reduced or no mobility
These networks are “data centric”, i.e., unlike traditional ad hoc networks
where data is requested from a specific node, data is requested based on
certain attributes such as, “which area has temperature over 35ºC or
95ºF”
Transceiver
10Kbps-1Mbps 50-125m range
Memory
(3K-1Mb) Embedded
Processor
(8 bit 4-8Mhz)
Sensor
Transducer
Battery
The Mica Mote
• The Mica Mote is a comprehensive sensor node developed by University
of California at Berkeley and marketed by Crossbow
• Mica Board is stacked to the processor board via the 51 pin extension
connector to provide temperature, photo resistor, barometer, humidity,
and thermopile sensors
rs
Desired
Sensing Area
Coverage
Area
Sensing and Communication Range
Sensing and Communication Range
rs
rs
SN1 SN2
Sensing area
Sensing area rc for SN2
for SN1
Sensing and Communication Range
Fault tolerant - With wireless sensors, failure of one node does not affect the
network operation
Mobility - Since these wireless sensors are equipped with battery, they can
possess limited mobility (e.g., if placed on robots)
Traditional routing protocols defined for MANETs are not well suited
for wireless sensor networks due to the following reasons:
Adjacent nodes may have similar data and rather than sending data
separately from each sensor node, it is desirable to aggregate similar
data before sending it
• Scalability - The number of sensor nodes deployed in the sensing area may be
in the order of hundreds, thousands, or more and routing scheme must be
scalable enough to respond to events
• Communication range - The bandwidth of the wireless links connecting
sensor nodes is often limited, hence constraining inter- sensor communication
• Fault tolerance - Some sensor nodes may fail or be blocked due to
• lack of power, physical damage, or environmental interference
• Connectivity - High node density in sensor networks precludes
them from being completely isolated from each other
Design Issues : Challenges
Transmission media -Communicating nodes are linked by a
wireless medium and traditional problems associated with a
wireless channel
(e.g., fading, high error rate) also affect the operation
Clustering of SNs not only allows aggregation of sensed data, but limits data
transmission primarily within the cluster
So, the real question is how to group adjacent SNs, and how many groups
should be there that could optimize some performance parameter
One approach is to partition the WSN into clusters such that all members of the
clusters are directly connected to the CH
This can not only reduce the global data to be transferred and localized most
traffic to within each individual cluster
If each cluster is covered by more than one subset of SNs all the time, then some of
the SNs can be put into sleep mode so as to conserve energy while keeping full
coverage
The use of a second smaller radio has been suggested for waking up the sleeping
sensor, thereby conserving the power of main wireless transmitter
Clustering of Sensors: Predetermined Grid
v/s Random Placement
For simplicity of calculation, the sensing area covered by rectangular placement is taken
rectangular, while sensing are by the two configurations are assumed hexagonal and
triangular respectively
Radio transmission distance between adjacent SNs need to be such that the sensors can
receive data from adjacent sensors using wireless radio
Clustering can be done for these configurations and the size of each cluster can be fixed as per
application requirements
If the sensing and radio transmission ranges are set to the minimum value, then all the SNs
need to be active all the time to cover the area and function properly
If these ranges are increased, then each sub-region can be covered by more than one
sensor node and selected SNs can be allowed to go to sleep mode
Triangular Placed Sensors
3 r2
4
Hexagonal Placed Sensors
33
r2
4
Regularly Placed Sensors
33 2
r
4
3 r2
4
Placement of Sensors and Covered Sensing Area
Rectangular r r2 N.r 2
r 3r
2
N. r3 2
Triangular
4 4
3 3 2 33
Hexagon r r N r2
4 4
Randomly distributed sensors
SNs have to find themselves who their communicating neighbors are and how
many of them are present
The communication range of associated wireless radio should be such that the
SNs could be connected together to form a WSN
Distribution of the SNs and their sensing range would also determine if the
physical parameter in the complete deployed area can be sensed by at least one SN
Randomly Distributed
Sensors: Voronoi diagram
Heterogeneous WSNs
With constant sensing and transmission range for all SNs, WSNs are also
known as homogeneous WSNs
In some situations, when a new version of SNs are deployed to cover additional
area, or some of the existing SNs are replaced by new ones for extended life or
precision, then sensing and/or communication range and/or computing power
may also depend on the sensor type or version
Thus, as sensor networks are the primary choice for environmental sensing,
combining sensor networks with mobile robots is a natural and very
promising application
Robots could play a major role of high-speed resource carriers in defense and
military applications where human time and life is very precious
Thus, we see that there are a number of future applications where sensors and
robots could work together through some form of cooperation
Mobile Sensors
Sensors detect events autonomously and the mobile robots could take appropriate
actions based on the nature of the event
Mobile sensor Networks have been suggested to cover the area not reachable by static
sensors
Coordination between multiple robots for resource transportation has been explored for
quite some time now
In these schemes, time taken to detect an event depends entirely on the trail followed by the
robots
Though the path progressively gets better with the use of an ant-like type of algorithm, the
whole process has to be started anew when the position of the event changes
Mobile Sensors
In terrains where human ingress is difficult, mobile robots can be used to imitate
the human’s chore
Typical resource-carrying robots are depicted in Figure 8.12 which depicts a possible
means of a robot transferring its resources to anothers
Once depleted of their resource, they may get themselves refilled from the sink
The resource in demand could be water or sand (to extinguish fire), oxygen supply,
medicines, bullets, clothes or chemicals to neutralize hazardous wastes, and so on
The target region that is in need of these resources is sometimes called an event location
Thousands of sensors over strategic locations are used in a structure such as an automobile or an
airplane, so that conditions can be constantly monitored
both from the inside and the outside and a real-time warning can be issued whenever a major
problem is forthcoming in the monitored entity
These wired sensors are large (and expensive) to cover as much area is desirable
Each of these need a continuous power supply and communicates their data to the end-user using a
wired network
The organization of such a network should be pre-planned to find strategic position to place
these nodes and then should be installed appropriately
The failure of a single node might bring down the whole network or leave that region completely
un-monitored
Applications
Habitat Monitoring
A prototype test bed consisting of iPAQs (i.e., a type of handheld device) has
been built to evaluate the performance of these target classification and
localization methods
As expected, energy efficiency is one of the design goals at every level: hardware, local
processing (compressing, filtering, etc.), MAC and topology control, data aggregation,
data-centric routing and storage
The proposed 2-tier network architecture consists of micro nodes and macro nodes,
wherein the micro nodes perform local filtering and data to significantly
reduce the amount of data transmitted to macro nodes
The Grand Duck Island Monitoring Network
Gateway
Transit Network
Internet
Data Service
Environmental Monitoring Application
Sensors to monitor landfill and the air quality
This causes harmful gases like methane, carbon dioxide, nitrogen, sulfide compounds and
ammonia to be produced and migration of gases in the landfill causes physical reactions
which eventually lead to ozone gases, a primary air pollutant and an irritant to our
respiratory systems
Place a large number of sensors throughout the area of interest and appropriate type
of sensors can be placed according to the type of pollutant anticipated in a given area
A large volume of raw data from sensors, can be collected, processed and
efficiently retrieval
A generic set up of a WSN, has been covered and various associated issues have
been clearly pointed out
Drinking Water Quality
This also helps in controlling addition of chlorine to the treated water before
releasing to the distribution system
Query
Tank
Introduction
What is a Sensor Network?
BS or Sink (far
away)
Query from BS to Sensors
Event
Application of Wireless Sensor Networks
in Defense Applications
Data Collection
Center (BS or Sink)
There is an optimal distance between two sensors that would maximize the
sensor lifetime
So, if the density of sensors is high, then some of the sensors can be put into
sleep mode to have close to optimal distance between the sensors
Very little work has been done on protocols that suits well to the needs of WSNs
With respect to the radio transmission, the main question is how to transmit as
energy efficiently as possible, taking into account all related costs (possible
retransmissions, overhead, and so on)
MAC Protocols
WSNs are designed to operate for long time as it is rather impractical to replenish
the batteries
However, nodes are in idle state for most time when no sensing occurs
Measurements have shown that a typical radio consumes the similar level of
energy in idle mode as in receiving mode
Therefore, it is important that nodes are able to operate in low duty cycles
The Sensor-MAC
Time
1. Broadcast Invite (BI) - This is used by the stationary node to invite other
nodes to join and if multiple BIs are received, the mobile node continues to
register every stationary node encountered, until its registry becomes full
2. Mobile Invite (MI) - This message is sent by the mobile node in response to
the BI message from the stationary node for establishing connection
4. Mobile Disconnect (MD) - With this message, the mobile node informs the
stationary node of a disconnection and for energy saving purposes, no response
is needed from the stationary node
The STEM
The idea behind STEM is to turn on only a node’s sensors and some
preprocessing circuitry during monitoring states
Whenever a possible event is detected, the main processor is woken up
to analyze the sensed data in detail and forward it to the data sink
However, the radio of the next hop in the path to the data sink is still
turned off, if it did not detect the same event
STEM solves this problem by having each node to periodically turn on
its radio for a short time to listen if someone else wants to communicate
with it
The node that wants to communicate, i.e. , the initiator SN, sends out a
beacon with the ID of the node it is trying to wake up, i.e. , the target SN
This can be viewed as a procedure by which the initiator SN attempts to
activate the link between itself and the target SN
As soon as the target SN receives this beacon, it responds back to the
initiator node and both keep their radio on at this point
The STEM
If the packet needs to be relayed further, the target SN will become the
initiator node for the next hop and the process is repeated
Once both the nodes that make up a link have their radio on, the link is
active and can be used for subsequent packets
However, the actual data transmissions may still interfere with the
wakeup protocol
To overcome this problem, STEM proposes the wakeup protocol and the
data transfer to employ different frequency bands as depicted in
In addition, separate radios would be needed in each of these bands
In Figure 9.7 we see that the wakeup messages are transmitted by the
radio operating in frequency band f1
STEM refers to these communications as occurring in the wakeup plane
Once the initiator SN has successfully notified the target SN, both SNs
turn on their radio that operates in frequency band f2
The actual data packets are transmitted in this band, called the data plane
The Stem
Wakeup plane = f1
Data plane = f2
Routing Layer
Routing in sensor networks is usually multi-hop
The goal is to send the data from source node(s) to a known destination node
The destination node or the sink node is known and addressed by means of its
location
A BS may be fixed or mobile, and is capable of connecting the sensor network to an
existing infrastructure where the user can have access to the collected data
The task of finding and maintaining routes in WSNs is nontrivial since energy
restrictions and sudden changes in node status (e.g., failure) cause frequent
unpredictable topological changes
Thus, the main objective of routing techniques is to minimize the energy
consumption in order to prolong WSN lifetime
To achieve this objective, routing protocols proposed in the literature employ some
well-known routing techniques as well as tactics special to WSNs
To preserve energy, strategies like data aggregation and in-network processing,
clustering, different node role assignment, and data-centric methods are employed
Routing Layer
Flat Routing
In flat routing based protocols, all nodes play the same role and we present the most
prominent protocols falling in this category
Directed Diffusion
Directed Diffusion is a data aggregation and dissemination paradigm for sensor networks
It is a data-centric (DC) and application-aware approach in the sense that all data generated by
sensor nodes is named by attribute-value pairs
Directed Diffusion is very useful for applications requiring dissemination and processing of
queries
The main idea of the DC paradigm is to combine the data coming from different sources en-
route(in-network aggregation) by eliminating redundancy, minimizing the number of
transmissions; thus saving network energy and prolonging its lifetime
Data Centric Routing and Directed
Diffusion
Unlike traditional end-to-end routing, DC routing finds routes from multiple
sources to a single destination (BS) that allows in-network consolidation of
redundant data
In Directed Diffusion, sensors measure events and create gradients of
information in their respective neighborhoods
The BS requests data by broadcasting interests, which describes a task to be
done by the network
Interest diffuses through the network hop-by-hop, and is broadcast by each
node to its neighbors
As the interest is propagated throughout the network, gradients are setup to
draw data satisfying the query towards the requesting node
Each SN that receives the interest setup a gradient toward the SNs from
which it receives the interest
This process continues until gradients are setup from the sources back to the
Data Centric Routing and
Directed Diffusion
or sink
Cluster Based Routing Protocol (CBRP)
A simple cluster based routing protocol (CBRP) divides the network nodes into
a number of overlapping or disjoint two-hop-diameter clusters in a distributed
manner
The cluster members just send the data to the CH, and the CH is responsible for
routing the data to the destination
The major drawback with CBRP is that it requires a lot of hello messages to
form and maintain the clusters, and thus may not be suitable for WSN
Given that sensor nodes are stationary in most of the applications this is a
considerable and unnecessary overhead
Scalable Coordination
Features
Suited for time critical sensing applications
Time critical data reaches the user almost
instantaneously
At every cluster change time, the parameters are
broadcast afresh and so, the user can change them as
required
Energy consumption can be controlled by changing the
threshold values
Hybrid Protocol (APTEEN)
To take advantage of both the networks, it is preferable to have both the
features in the system (UC)
Functioning
CLUSTER FORMATIONolds (HT , ST), CoCluster-Head Receives Messaget to all
cluster members
Cluster Change Time Periodic Intervals
Modified TDMA for APTEEN
Time-critical queries and historical queries are answered
by the BS
Based on the assumption that adjacent nodes sense similar
data, we can make only one of them handle the query
This might reduces the accuracy of data for non-critical queries
This is acceptable since it almost doubles the life of the network
Original TDMA
a Modified TDMA
r is the distance of
packet transmission
by each sensor
Overhead of cluster formation throughout Routes formed only in regions that have data for
the network transmission
Lower latency as multi-hop network Latency in waking up intermediate nodes and
formed by cluster heads is always available setting up the multi-hop path
Energy dissipation is uniform Energy dissipation depends on traffic patterns
Energy dissipation cannot be controlled Energy dissipation adapts to traffic pattern
Negotiation-based Routing
In query-based routing, the destination nodes propagate a query for data (sensing
task) from a node throughout the network
A node having the data matching the query sends it back to the node which
requested it
Usually, these queries are described in natural language or in high-level query
languages
For example, a BS B1 may submit a query to node N1 inquiring: “Are there moving
vehicles in battlefield region 1?”
In query-based routing, all the nodes have tables consisting of the sensing tasks
queries that they received, and send back data matching these tasks whenever they
receive it
Directed diffusion (discussed earlier in this chapter) is an example of this type of
routing
Here, the sink node sends out messages of interest to SNs
As the interest is propagated throughout the WSN, the gradients from the source
back to the sink (BS) are set up
Location-based Routing
In location-based routing, SNs are addressed by means of their locations
Here, the distance between neighboring SNs can be estimated on the basis
of incoming signal strengths, and relative coordinates of neighboring SNs
can be obtained by exchanging such information
Alternatively, the location of nodes may be available directly through GPS
if we consider nodes are equipped with a small low power GPS receiver
In order to conserve energy, some location-based schemes demand that
SNs should go to sleep if there is no activity
Clearly, the more sleeping SNs in the network the more energy can be
saved
However, the active SNs should be connected, should cover the entire
sensing region, and should provide basic routing and broadcasting
functionalities
High-Level Application Layer Support
The protocols we have presented so far are also found, albeit in some different
form in traditional wired, cellular, or ad hoc networks
For specific applications, a higher level of abstraction specifically tailored to
WSN appears to be useful
Sensor Databases
WSNs are not only concerned with merely sensing the environment but also with
interacting with the environment
Once actuators like valves are added to WSNs, the question of distributed
algorithms becomes inevitable
One showcase is the question of distributed consensus, where several actuators
have to reach a joint decision(a functionality which is also required for
distributed software update, for example)
In-Network Processing
The research in WSNs is flourishing at a rapid pace and is being considered as the
revolutionary concept of this century
But, there are many challenges that need to be addressed such as, how to
miniaturize the power source, how to have a self-power generating technology to
provide indefinite power source and how to provide secured communication
without exceeding the resource requirements
Another area that needs serious investigation is to come up with a killer non-
defense civilian application so as to enhance its usefulness and general acceptance
The challenges are many and we have partial answers or roadmaps to some of the
above questions, there is still much to be done
UNIT –IV
Security in Ad Hoc Wireless Networks
Introduction
Wireless Sensor Network?
It’s a collection of devices “ sensor nodes”
Heavily deployment
Memory.
RF Radio.
Power Source.
Sensor.
GPS
1
7
Introduction
Goal of Wireless Sensor Network
Collect data at regular intervals.
Light sensor.
Sound sensor.
Vibration Sensor.
1
Introduction
Communication pattern
Broadcast : Base station transmits message to all its immediate
neighbors.
sensor
7
WSN Communication Architecture
182
Components of Sensor Node
183
Protocol Stack
Protocols should be
Power aware
Location aware
Application aware
184
WSN Characteristics
185
WSN Design Factors
Fault Tolerance
Scalability
Production Costs
Hardware Constraints
Sensor Network Topology
Environment
Transmission Media
Power Consumption
186
Design Factors : Fault Tolerance
187
Design Factors:Production Costs
188
Design Factors:Hardware Constraint
All these units combined together must
Extremely low power
Extremely small volume
189
Design Factors : Topology
190
Design Factors : Environment
May be inaccessible
either because of hostile environment
o r because they are embedded in a structure
Impact of environment condition
Temperature
Humidity
Movement
Underwater
Underground
191
Design Factors: Environment
Busy intersections
Interior of a large machinery
Bottom of an ocean
Surface of an ocean during a tornado
Biologically or chemically contaminated field
Battlefield beyond the enemy lines
Home or a large building
Large warehouse
Animals
Fast moving vehicles
Drain or river moving with current
192
Design Factors : Transmission Media
RF
Infrared
Optical
Acoustic
193
Design Factors: Power Consumption
Power conservation
Sensing
Communication
Data processing
194
Applications of WSN
Global scale
Battle field
Factories
Buildings
Homes
bodies
195
Applications of Sensor Networks
Using in military
Battlefield surveillance and monitoring, guidance systems of
intelligent missiles, detection of attack by weapons of mass
destruction such as chemical, biological, or nuclear
Using in nature
Forest fire, flood detection, habitat exploration of animals
Using in health
Monitor the patient’s heart rate or blood pressure, and sent regularly
to alert the concerned doctor, provide patients a greater freedom of
movement
196
Comparison with Ad Hoc Wireless
Networks
Different from Ad Hoc wireless networks
The number of nodes in sensor network can be several orders of magnitude
large than the number of nodes in an ad hoc network.
Sensor nodes are more easy to failure and energy drain, and their battery
sources are usually not replaceable or rechargeable.
Sensor nodes may not have unique global identifiers (ID), so unique
addressing is not always feasible in sensor networks.
Sensor networks are data-centric, the queries in sensor networks are
addressed to nodes which have data satisfying some conditions. Ad Hoc
networks are address-centric, with queries addressed to particular nodes
specified by their unique address.
Data fusion/aggregation: the sensor nodes aggregate the local information
before relaying. The goals are reduce bandwidth consumption, media
access delay, and power consumption for communication.
197
Classification ofsensor network protocol
198
Layered Architecture
A layered architecture has a single
powerful base station, and the layers of
sensor nodes around it correspond to
the nodes that have the same hop-count
to the BS.
In the in-building scenario, the BS acts
an access point to a wired network, and
small nodes form a wireless backbone
to provide wireless connectivity.
The advantage of a layered architecture
is that each node is involved only in
short-distance, low-power
transmissions to nodes of the
neighboring layers.
199
Network initialization and
maintenance
The BS broadcasts its ID using a known CDMA code on the
common control channel.
All node which hear this broadcast then record the BS ID. They
send a beacon signal with their own IDs at their low default
power levels.
Those nodes which the BS can hear form layer one
B S broadcasts a control packet with all layer one node IDs. All
nodes send a beacon signal again.
The layer one nodes record the IDs which they hear (form layer
two) and inform the BS of the layer two nodes IDs.
Periodic beaconing updates neighbor information and change the
layer structure if nodes die out or move out of range.
200
Routing protocol
201
UNPF-R
Optimize the network performance by make the sensor nodes adaptively vary their
transmission range.
Because while a very small transmission range cause network partitioning, a very
large transmission range reduce the spatial reuse of frequencies.
The optimal range (R) is determined by simulated annealing
Objective function :
202
UNPF-R
I f no packet is received by the BS from any sensor node for
some interval of time, the transmission range increase
by . Otherwise, the transmission range is either d ecrease
by with probability 0.5 x ( n / N ), or increas e b y with
probability [ 1 – 0.5 x ( n / N ) ].
If , then the transmission range R’ is adopt.
Otherwise, R is modified to R’ with probability
205
Low-Energy Adaptive Clustering
Hierarchy (LEACH)
206
Data Dissemination
Data dissemination is the process by which queries or data are
routed in the sensor network. The data collected by sensor nodes
has to be communicated to the node which interested in the data.
The node that generates data is call source and the information to be
reported is called an event. A node which interested in an event is
called sink.
Data dissemination consist of a two-step process : interest
propagation and data propagation.
Interest propagation : for every event that a sink is interested in, it broadcasts
its interest to is neighbor, and across the network.
Data dissemination : When an event is detected, it reported to the interested
nodes (sink).
207
Flooding
Each node which receives a packet (queries/data) broadcasts it if the
maximum hop-count of the packet is not reached and the node itself
is not the destination of the packet.
Disadvantages :
Implosion : this is the situation when duplicate messages are send to
the same node. This occurs when a node receives copies of the
same messages from many of its neighbors.
Overlap : the same event may be sensed by more than one node due
to overlapping regions of coverage. This results in their neighbors
receiving duplicate reports of the same event.
Resource blindness : the flooding protocol does not consider the
available energy at the nodes and results in many redundant
transmissions. Hence, it reduces the network lifetime.
208
Gossiping
209
Rumor Routing
Agent-based path creation algorithm
Agent is a long-lived packet created at random
by nodes, and it will die after visit k hops.
I t circulated in the network to establish shortest
paths to events that they encounter.
When an agent finds a node whose path to an
event is longer than its own, it updates the
node’s routing table.
210
Rumor routing
After selection, the cluster-heads advertise their selection to all nodes. All nodes choose their
nearest cluster-head by signal strength (RSSI). The cluster-heads then assign a TDMA
schedule for their cluster members
211
Sequential Assignment Routing
(SAR)
The sequential assignment routing (SAR) algorithm creates
multiple trees, where the root of each tree is a one-hop neighbor
of the sink.
To avoid nodes with low throughput or high delay.
Each sensor node records two parameters about each path though
it : available energy resources on the path and an additive QoS
metric such as delay
SAR minimizes the average weighted QoS metric over the
lifetime of the network.
212
Directed Diffusion
T h e directed diffusion protocol is useful in scenarios where the sensor
nodes themselves generate requests/queries for data sensed by other
nodes.
Each sensor node names its data with one or more attributes.
Each sensor node express their interest depending on these attributes.
Each path is associated with a interest gradient, while positive gradient
make the data flow along the path, negative gradient inhibit the
distribution data along a particular path.
Example : two path formed with gradient 0.4 and 0.8, the source may
twice as much data along the higher one
Suppose the sink wants more frequent update from the sensor which have
detected an event => send a higher data-rate requirement for increasing
the gradient of that path.
213
Directed Diffusion
Query
Type = vehicle /* detect vehicle location
interval = 1 s /* report every 1 second
rect = [0,0,600,800] /* query addressed to sensors within the rectangle
timestamp = 02:30:00 /* when the interest was originated
expiresAt = 03:00:00 /* till when the sink retain interest in this data
Report
Type = vehicle /* type of intrusion seen
instance = car /* particular instance of the type
location = [200,250] /* location of node
confidence = 0.80 /* confidence of match
timestamp = 02:45:20 /* time of detection
214
Sensor Protocols for Information via
Negotiation
SPIN use negotiation and resource
adaptation to address the
disadvantage of flooding.
Reduce overlap and implosion, and
prolong network lifetime.
Use meta-data instead of raw data.
SPIN has three types of
messages:ADV, REQ, and DATA.
SPIN-2 using an energy threshold to
reduce participation. A node may join
in the ADV-REQ-DATA handshake
only if it has sufficient resource
above a threshold.
215
Cost-Field Approach
T h e cost-field approach considers the problem of setting up paths to a
sink. The first phase being to set up the cost field, based on metrics
such as delay. The second phase being data dissemination using the
costs.
A sink broadcasts an ADV packet with its own cost as 0.
When a node N hears an ADV message from node M, it sets its own
path cost to min (LN,LM+CNM), where LNis the total path cost from node
N to the sink, LMis the cost of node M to the sink, CNMis the cost from
N to M.
I f LNupdated, the new cost is broadcast though anotherADV.
T h e back-off time make a node defer its ADV instead of immediately
broadcast it. The back-off time is r x CMN, where r is a parameter of
algorithm.
216
Cost-Field Approach
217
Geographic Hash Table (GHT)
218
Small Minimum Energy
Communication Network
I f the entire sensor network is represented by G, the subgraph G’ is
constructed such that the energy usage of the network is minimized.
The number of edges in G’is less than G, and the connectivity
between any two nodes is not disrupted by G’.
The power required to transmit data between u and v is modeled as
t : constant
n : loss exponent indicating the loss of power with distance from
transmitter
d(u,v) : the distance between u and v
I t would be more economical to transmit data by smaller hops
219
Small Minimum Energy
Communication Network
Suppose the path between u (i.e. u0) and v (i.e. uk) is represented by
r = (u0, u1, … uk), each (ui, ui+1) is edge in G’
The total power consumed for the transmission is
220
Data Gathering
57
PEGASIS
A t every node, data fusion
or aggregation is carried
out.
A node which is
designated as the leader
finally transmits one
message to the BS.
Leadership is transferred
in sequential order.
The delay involved in
messages reaching the BS
is O(N)
224
Binary Scheme
This is a chain-based scheme like PEGASIS, which classifies
nodes into different levels.
This scheme is possible when nodes communicate using CDMA,
so that transmissions of each level can take place simultaneously.
The delay is O(logN)
225
Chain-Based Three-Level Scheme
For non-CDMA sensor nodes
The chain is divided into a number of groups to space out
simultaneous transmissions in order to minimize
interference.
Within a group, nodes transmit data to the group leader,
and the leader fusion the data, and become the member
to the next level.
I n the second level, all nodes are divided into two groups.
I n the third level, consists of a message exchange
between one node from each group of the second level.
Finally, the leader transmit a single message to the BS.
226
Chain-Based Three-Level Scheme
227
MAC Protocols for Sensor Networks
228
MAC Protocols for Sensor Networks
229
MAC Protocols for Sensor Networks
230
Self-Organizing MAC for Sensor
Networks and Eavesdrop and Register
Self-Organizing MAC for sensor (SMACS) networks and eavesdrop
and register (EAR) are two protocols which handle network
initialization and mobility support, respectively.
I n SMACS
neighbor discovery and channel assignment take place
simultaneously in a completely distributed manner.
A communication link between two nodes consists of a pair of time
slots, at fixed frequency.
This scheme requires synchronization only between
communicating neighbors, in order to define the slots to be used
for their communication.
Power is conserved by turning off the transceiver during idle slots.
Hybrid TDMA/FDMA
TDMA scheme minimize the time for which a node has to
be kept on, but the associated time synchronization cost
are very high.
A pure FDMA scheme allots the minimum required
bandwidth for each connection
I f the transmitter consumes more power, a TDMA
scheme is favored, since it can be switch off in idle slots
to save power.
I f the receiver consumes greater power, a FDMA scheme
is favored, because the receiver need not expend power
for time synchronization.
232
CSMA-Base MAC Protocols
CSMA-based schemes are suitable for point-to-point randomly
distributed traffic flows.
The sensing periods of CSMA are constant for energy efficiency,
while the back-off is random to avoid repeated collisions.
Binary exponential back-off is used to maintain fairness in the
network.
Use an adaptive transmission rate control (ARC) to balance
originating traffic and route-through traffic in nodes. This ensures
that nodes closer to the BS are not favored over farther nodes.
CSMA-based MAC protocol are contention-based and are
designed mainly to increase energy efficiency and maintain
fairness.
233
IEEE 802.15.4 MAC
Architecture Channel acquisition
Contention Window
Applications
ZigBee Network
IEEE 802.15.4
PHY
IEEE 802.15.4 MAC
Architecture Device join and leave
Frame routing
Applications
ZigBee Network
IEEE 802.15.4
PHY
General characteristics
Approaches for low power
I n order to achieve the low power and low cost goals
established by IEEE 802.15.4 the following approaches
are taken
Reduce the amount of data transmitted
Reduce the transceiver duty cycle and frequency of data
transmissions
Reduce the frame overhead
Reduce complexity
Reduce range
Implement strict power management mechanisms (power-
down and sleep modes)
Network layer
The services which network layer provides are more
challenging to implement because of low power
consumption requirement.
Network layer over this standard are expected to be self
configuring and self maintaining to minimize total cost of
user.
IEEE 802.15.4 draft standard supports multiple network
topologies including star and peer to peer topology.
topology selection is application dependent. PC peripherals
may require low latency connection of star topology while
perimeter security which needs large coverage area may
require peer to peer networking.
Star and Peer to Peer topologies
239
MAC
MAC provides data and management services to upper
layers
The MAC management service has 26 primitives
whereas 802.15.1 has about 131 primitives and 32
events,
802.15.4 MAC is of very low complexity, making it very
suitable for its intended low-end applications, albeit at
the cost of a smaller feature set than 802.15.1 (e.g.,
802.15.4 does not support synchronous voice links).
MAC frame format
Superframe structure
242
Other MAC features
I n a beacon-enabled network with superframes, a slotted carrier
sense multiple access with collision avoidance (CSMA- CA)
mechanism is used.
I n others standard CSMA-CA is used I.e it first checks if
another device is transmitting in the same channel if so backs
off for certain time.
MAC confirms successful reception of data with an
acknowledgement.
The IEEE 802.15.4 draft standard provides for three levels of
security: no security of any type ,access control lists (non
cryptographic security) and symmetric key security, employing
AES-128.
PHY layer
This standard provides 2 PHY options with
frequency band as fundamental difference.
2.4 GHz band has worldwide availability and
provides a transmission rate of 250 kb/s.
The 868/915 MHz PHY specifies operation in the 868
MHz band in Europe and 915 MHz ISM band in the
United States and offer data rates 20 kb/s and 40 kb/s
respectively.
Different transmission rates can be exploited to
achieve a variety of different goals.
Channel structure
245
Channelization
247
Modulation
Interference
IDS
IDS
IDS
IDS
Summing up Wireless & Mobile
Technology……
ANYANY
ONEDEVICE
No limit. It ‘s
ANY TIME beyond
the sky?
ANY WHERE
Software Development Infrastructure for 1
Sensor Networks
+
Code propagation protocol
+
Sensor data delivery Application
3
Challenges in programming sensors
• WSN usually has severe power, memory, and
bandwidth limitations
• WSN must respond to multiple,
concurrent stimuli
- At the speed of changes in monitored phenomena
• WSN are large-scale distributed systems
Traditional embedded systems 4
Task queue
Task B
Event 3
Event 1
Event 2
Hardware interrupts
A more complex example
module SenseAndSend {
}
provides interface StdControl;
uses { interface ADC; interface Timer01; interface Send; Timer01.Timer0Fire() }
implementation {
bool busy; triggers data
norace unit16_t sensorReading;
…
command result_t StdControl.init() { busy = FALSE; }
acquisition (through
event result_t Timer01.Timer0Fire() {
bool localBusy;
atomic { localBusy = busy; busy = TRUE; }
ADC) and
if (!localBusy) { call ADC.getData(); return SUCCESS;}
else { return FAILED; } transmission to base
}
task void sendData() {
…
station (through
adcPacket.data = sensorReading;
…
call Send.send(&adcPacket, sizeof(adcPacket.data));
Send)
return SUCCESS;
}
event result_t ADC.dataReady(uint16_t data) {
sensorReading = data;
post sendData();
atomic { busy = FALSE; }
return SUCCESS;
}
…
}
Split-phase operation
event result_t Timer01.Timer0Fire() {
bool localBusy;
atomic { localBusy = busy; busy = TRUE; }
if (!localBusy) { call ADC.getData(); return SUCCESS; }
else { return FAILED; }
}
event result_t ADC.dataReady(uint16_t data) {
sensorReading = data;
post sendData();
atomic { busy = FALSE; }
return SUCCESS;
}
• Data acquisition doesn’t take place immediately (why?)
• How does a traditional OS accomplish this?
- OS puts thread to sleep when it blocks
Why isn’t this approach good enough here?
Posting task in interrupt handler
task void sendData() {
…
adcPacket.data = sensorReading;
…
call Send.send(&adcPacket, sizeof(adcPacket.data));
return SUCCESS;
}
event result_t ADC.dataReady(uint16_t data) {
sensorReading = data;
post sendData();
atomic { busy = FALSE; }
return SUCCESS;
}
Why?
- Make asynchronous code as short as possible
Race conditions
bool busy;
• Because of preemption, norace unit16_t sensorReading;
…
race conditions may event result_t Timer01.Timer0Fire() {
arise on shared data bool localBusy;
atomic { localBusy = busy; busy = TRUE; }
- nesC compiler can if (!localBusy) { call ADC.getData(); return SUCCES
detect them, but with else { return FAILED; }
}
false positives task void sendData() {
• In case of false positive, …
adcPacket.data = sensorReading;
declare shared variable …
with norace keyword call Send.send(&adcPacket, sizeof(adcPacket.data
return SUCCESS;
• In case of real race }
event result_t ADC.dataReady(uint16_t data) {
conditions, use atomic sensorReading = data;
post sendData();
to make code blocks atomic { busy = FALSE; }
non-preemptible return SUCCESS;
}
Discussion
•Provides framework for concurrency and
modularity
•Interleaves flows, events, energy management
•Never poll, never block
•Trade off flexibility for more optimization
opportunities
Still a node-level platform