0% found this document useful (0 votes)
88 views90 pages

Wireless Sensor Networks Course Overview

Uploaded by

kalyani.pappuru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views90 pages

Wireless Sensor Networks Course Overview

Uploaded by

kalyani.pappuru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Wireless Sensor Network (23EC806)

L – T – P : 3– 0– 0

Course Objectives:
• To acquire the knowledge about various architectures and applications of
Sensor Networks
• To understand issues, challenges and emerging technologies for wireless
sensor networks
• To learn about various routing protocols and MAC Protocols
• To understand various data gathering and data dissemination methods
• To Study about design principals, node architectures, hardware and
software required for implementation of wireless sensor networks.
Course Outcomes: Upon completion of the course, the student will be able
to:
• Analyze and compare various architectures of Wireless Sensor Networks
• Understand Design issues and challenges in wireless sensor networks
• Analyze and compare various data gathering and data dissemination
methods.
• Design, Simulate and Compare the performance of various routing and
MAC protocol
COURSE LEARNING OUTCOMES (CLOs):
1. Understand Fundamental concepts of wireless sensor networks and its
applications.
2. Learn about network architecture techniques and find the differences between
various types of network architecture.
3. Regain knowledge about the network hardware platforms.
4. Understand network simulators of different types and Explore on core network
simulators.
5. Experience in implementation/modification of methods of medium access
protocols in WSN.

1
6. Describe duty-cycled Markov chain models and the skill sets needed to be a
network analysis.
7. Understand the concepts of discrete time Markov chain and its applications.
8. Identify the difference between asynchronous duty-cycled and Markov chain
analysis.
9. Understand significance models in WSN.
10. Describe the possible attacks in WSN.
11. Apply basic SPINS concepts for predictive network performance.
12. Identify the difference between static and dynamic key distribution.
13. Identify common approaches used to routing protocols in MANETS.
14. Create effective results of data centric and geographic routing.
15. Understand the advanced topics in wireless sensor networks.

UNIT - I: Introduction to Sensor Networks, unique constraints and challenges,


Advantage of Sensor Networks, Applications of Sensor Networks, Types of
wireless sensor networks
UNIT - II: Mobile Ad-hoc Networks (MANETs) and Wireless Sensor Networks,
Enabling technologies for Wireless Sensor Networks. Issues and challenges in
wireless sensor networks
UNIT - III: Routing protocols, MAC protocols: Classification of MAC
Protocols, S-MAC Protocol, B-MAC protocol, IEEE 802.15.4 standard and
ZigBee
UNIT - IV: Dissemination protocol for large sensor network. Data dissemination,
data gathering, and data fusion; Quality of a sensor network; Real-time traffic
support and security protocols.
UNIT - V: Design Principles for WSNs, Gateway Concepts Need for gateway,
WSN to Internet Communication, and Internet to WSN Communication. Single-
node architecture, Hardware components & design constraints, Operating
systems and execution environments, introduction to TinyOS and nesC.
TEXT BOOKS:
• 1. Ad-Hoc Wireless Sensor Networks- C. Siva Ram Murthy,B. S. Manoj,
Pearson

2
• 2. Principles of Wireless Networks – Kaveh Pah Laven and P. Krishna
Murthy, 2002, PE
REFERENCE BOOKS:
• Wireless Digital Communications – Kamilo Feher, 1999, PHI
• .Wireless Communications-Andrea Goldsmith, 2005 Cambridge
University Press.
• Mobile Cellular Communication – Gottapu Sasibhushana Rao, Pearson
Education, 2012. 4. Wireless Communication and Networking – William
Stallings, 2003, PHI.

UNIT-I
Introduction to Sensor Networks, unique constraints and challenges,
Advantage of Sensor Networks, Applications of Sensor Networks, Types of
wireless sensor networks
Introduction
Wireless Sensor Networks (WSNs) can be defined as a self-configured and
infrastructure-less wireless networks to monitor physical or environmental
conditions, such as temperature, sound, vibration, pressure, motion or pollutants
and to cooperatively pass their data through the network to a main location or
sink where the data can be observed and analysed .A sink or base station acts like
an interface between users and the network. One can retrieve required
information from the network by injecting queries and gathering results from the
sink. Typically a wireless sensor network contains hundreds of thousands of
sensor nodes. The sensor nodes can communicate among themselves using radio
signals. A wireless sensor node is equipped with sensing and computing devices,
radio transceivers and power components.
A Wireless Sensor Network (WSN) is a distributed network and it comprises a
large number of distributed, self-directed, tiny, low powered devices called sensor
nodes alias motes . WSN naturally encompasses a large number of spatially
dispersed, petite, battery-operated, embedded devices that are networked to
supportively collect, process, and convey data to the users, and it has restricted
computing and processing capabilities. Motes are the small computers, which
work collectively to form the networks. Motes are energy efficient, multi-
functional wireless device . The necessities for motes in industrial applications
are widespread. A group of motes collects the information from the environment

3
to accomplish particular application objectives. They make links with each other
in different configurations to get the maximum performance. Motes communicate
with each other using transceivers. In WSN the number of sensor nodes can be in
the order of hundreds or even thousands. In comparison with sensor networks, Ad
Hoc networks will have less number of nodes without any infrastructure. Now a
days wireless network is the most popular services utilized in industrial and
commercial applications, because of its technical advancement in processor,
communication, and usage of low power embedded computing devices. Sensor
nodes are used to monitor environmental conditions like temperature, pressure,
humidity, sound, vibration, position etc. In many real time applications the sensor
nodes are performing different tasks like neighbour node discovery, smart
sensing, data storage and processing data aggregation, target tracking, control and
monitoring, node localization synchronization and efficient routing between
nodes and base station.
FEATURES
• A Wireless Sensor Network (WSN) is a distributed network
• A network configuration where every participant can communicate with
one another without going through a centralized point.
• WSN comprises a large number of distributed, self-directed, tiny, low
powered devices called sensor nodes
• WSN has embedded devices that are networked to supportively collect,
process, and convey data to the users.
• WSN has restricted computing and processing capabilities.
• WSN can be defined as a self-configured and infrastructure-less wireless
networks
• It is used to monitor physical or environmental conditions, such as
temperature, sound, vibration, pressure, motion or pollutants
• It pass their data through the network to a main location or sink where the
data can be observed and analysed
• A sink or base station acts like an interface between users and the network.
• One can retrieve required information from the network by injecting
queries and gathering results from the sink.
• A wireless sensor network contains hundreds of thousands of sensor nodes.
• The sensor nodes can communicate among themselves using radio signals.
• A wireless sensor node is equipped with sensing and computing devices,
radio transceivers and power components.
• The individual nodes in a wireless sensor network (WSN) are inherently
resource constrained.

4
• They have limited
• processing speed
• storage capacity
• communication bandwidth
• After the sensor nodes are deployed, they are responsible for self
organizing an appropriate network infrastructure often with multi-hop
communication with them.
• Then the onboard sensors start collecting information of interest
• Wireless sensor devices also respond to queries sent from a ―control site‖
to perform specific instructions or provide sensing samples.
• The working mode of the sensor nodes may be either continuous or event
driven.
• Global Positioning System (GPS) and local positioning algorithms can be
used to obtain location and positioning information.
Why use a WSN?
• Ease of deployment
❖ Wireless communication means no need for a communication
infrastructure setup
❖ Drop and play
❖ Low-cost of deployment
❖ Nodes are built using off-the-shelf cheap components
• Fine grain monitoring
❖ Feasible to deploy nodes densely for fine grain monitoring
Applications of wireless sensor network
1. Military applications
2. Area monitoring
3. Transportation
4. Health applications
5. Environmental sensing
6. Structural monitoring
7. Industrial monitoring
8. Agricultural sector
9. Neighbor node discovery

5
10. Smart sensing
11. Data storage and processing
12. Data aggregation
13. Target tracking
14. Control and monitoring
15. Node localization
16. Synchronization
17. Efficient routing between nodes and base station Battle field Monitoring
18. Intelligent Guiding
19. Remote Sensing
20. Sniper Detection
21. Environmental
22. Habitat Monitoring Air or Water Quality Monitoring Hazard
23. Monitoring Disaster
24. Monitoring Health
25. Care Behavior Monitoring
26. Medical Monitoring Home
27. Intelligence Smart
28. Home Remote Metering
29. Industrial Process
30. Control Security and Surveillance
Military applications
❖ military command
❖ control
❖ communications
❖ computing
❖ Intelligence
❖ battlefield surveillance
❖ reconnaissance
❖ targeting systems
6
Area Monitoring
• In area monitoring, the sensor nodes are deployed over a region where
some phenomenon is to be monitored.
• When the sensors detect the event being monitored (heat, pressure etc), the
event is reported to one of the base stations, which then takes appropriate
action will be taken.
Transportation
• Real-time traffic information is being collected to feed transportation
models and alert drivers of congestion and traffic problems
Health applications
• Some of the health applications for sensor networks are
❖ supporting interfaces for the disabled patients
❖ integrated patient monitoring
❖ diagnostics,
❖ drug administration in hospitals
❖ tele-monitoring of human physiological data
❖ tracking & monitoring doctors or patients inside a hospital.
Environmental sensing
• This includes sensing volcanoes
❖ Oceans
❖ glaciers
❖ forests etc.
❖ Air pollution monitoring
❖ Forest fires detection
❖ Greenhouse monitoring
❖ Landslide detection
Structural monitoring:
• Wireless sensors can be utilized to monitor the movement within buildings
• to monitor infrastructure such as bridges, flyovers, embankments, tunnels
etc
• Enabling Engineering practices to monitor assets remotely.

Industrial monitoring

7
• Wireless sensor networks have been developed for machinery
condition based maintenance (CBM) as they offer significant cost
savings and enable new functionalities.
Agricultural sector
• using a wireless network frees the farmer from the maintenance of
wiring in a difficult environment.
• Irrigation automation enables more efficient water use and reduces
waste .

Components of a wireless sensor network :


The components of WSN system are sensor node, rely node, actor node,
cluster head, gateway and base station.

Sensor nodes
• Sensor nodes are used to monitor environmental conditions like
temperature, pressure, humidity, sound, vibration, position etc.
• Each and every node is capable to perform data gathering, sensing,
processing and communicating with other nodes.
• The sensing unit senses the environment
• The processing unit computes the confined permutations of the
sensed data
• The communication unit performs exchange of processed
information among neighboring sensor nodes.
• Mostly ATMEGA 16, ATMEGA 128L, MSP 430 controllers are
used in commercial motes.
• It is Capable of
❖ executing data processing
❖ data gathering
❖ communicating with additional associated nodes in the
network

• In WSN, based on the sensing range and environment, the sensor


nodes are classified into four groups, namely specialized sensing
node, generic sensing node, high bandwidth sensing node and
gateway node.
• The radio bandwidth for the sensor nodes are<50 Kbps, <100 Kbps,
≈500 Kbps and >500 Kbps

8
• Sensing is a technique used to gather information about a physical
object or process, including the occurrence of events (i.e., changes
in state such as a drop in temperature or pressure.
• An object performing such a sensing task is called a sensor.
• remote sensors, that is, they do not need to touch the monitored
object to gather information

BLOCK DIAGRAM

• sensor is a device that translates parameters or events in the physical


world into signals that can be measured and analyzed.
• A transducer is often used to describe a device that converts energy
from one form into another
• A sensor is a type of transducer that converts energy in the physical
world into electrical energy that can be passed to a computing system
or controller.
• Phenomena in the physical world (often referred to as process,
system, or plant) are observed by a sensor device.
• The resulting electrical signals are often not ready for immediate
processing, therefore they pass through a signal conditioning stage.
• A variety of operations can be applied to the sensor signal to prepare
it for further use.
• For example, signals often require amplification (or attenuation) to
change the signal magnitude to better match the range of the
following analog-to-digital conversion
• signal conditioning often applies filters to the signal to remove
unwanted noise within certain frequency ranges
• High pass filters can be used to remove 50 or 60Hz noise picked up
by surrounding power lines
• After conditioning, the analog signal is transformed into a digital
signal using an analog-to-digital converter (ADC).
• The signal is now available in a digital form and ready for further
processing, storing, or visualization.
9
• An increasing number of sensors communicate the collected data
wirelessly to a centralized processing station.
• This is important since many network applications require hundreds
or thousands of sensor nodes, often deployed in remote and
inaccessible areas.
• A wireless sensor has not only a sensing component, but also on-
board processing, communication, and storage capabilities.
• The sensors should be utilized in a way that produces the maximum
performance with less energy Sensor node: Capable of executing
data processing, data gathering and communicating with additional
associated nodes in the network. A distinctive sensor node capability
is about 4-8 MHz, having 4 KB of RAM, 128 KB flash and
preferably 916 MHz of radio frequency

Components of a wireless sensor node


• Components of a wireless sensor node
❖ sensing unit
❖ processing unit
❖ communication unit
❖ power unit

sensing unit
• The sensing unit of sensor nodes integrates different types of sensors like
thermal sensors, magnetic sensors, vibration sensors, chemical sensors, bio
sensors, and light sensors.
• The measured parameters from the external environment by sensing unit
of sensor node are fed into the processing unit.
• The analog signal generated by the sensors are digitized by using Analog
to Digital converter (ADC) and sent to controller for further processing.

processing unit
• The processing unit is the important core unit of the sensor node.
• The processor executes different tasks and controls the functionality of
other components.
• The required services for the processing unit are pre-programmed and
loaded into the processor of sensor nodes

10
• The energy utilization rate of the processor varies depending upon the
functionality of the nodes.

communication unit
• In communication unit, a common transceiver act as a communication unit
• it is mainly used to transmit and receive the information among the nodes
and base station and vice versa.
• There are four states in the communication unit:
❖ [Link]
❖ 2. receive
❖ 3. idle
❖ 4. sleep

Sensor Nodes Functions


➢ Effortlessness installation
➢ Fault indication,
➢ Energy level diagnosis
➢ Highly reliability
➢ Easy coordination with other nodes in the network
➢ Control protocols
➢ simple network interfaces with other smart devices

• sensor node is often not only responsible for data collection, but also for
in-network analysis, correlation
• Sensor nodes communicate not only with each other but also with a base
station (BS) using their wireless radios, allowing them to disseminate their
sensor data to remote processing, visualization, analysis, and storage
systems
• simple sensor nodes may monitor a single physical phenomenon
while more complex devices may combine many different sensing
techniques
(e.g., acoustic, optical,magnetic).
• They can also differ in their communication capabilities
• Eg. ultrasound, infrared, or radio frequency technologies with varying data
rates and latencies.

11
• While simple sensors may only collect and communicate information
about the observed environment.
• Global Positioning System (GPS) receivers, allowing them to accurately
determine their position.
• More powerful devices (i.e., devices with large processing, energy, and
storage capacities) may also perform extensive processing and aggregation
functions .
• Such devices may form communication backbones that can be used by
other resource-constrained sensor devices to reach the base station.
• For interconnectivity functions high end smart bandwidth sensing node
and gateway nodes are preferred.
• Senor nodes in an open environment regularly sense the physical and
environmental changes and transmit the information to the centralized
server called a gateway.
• The number of sensor nodes in a sensor network can be in the order of
hundreds or even thousands.
• Hence, WSN designed for sensor networks is supposed to be highly
scalable.
• Mobility of nodes--In order to increase the communication efficiency, the
nodes can move anywhere within the sensor field based on the type of
applications.
• The option for reprogramming or reconfiguring should be available for
the WSN to become adaptive for any dynamic changes in the network.
• The limited computation and power resources of sensor nodes often make
it undesirable to use public key algorithms.
• Sensor node (mote)

Unique constrains and challenges in designing WSN:

12
Handling such a wide range of application types will hardly
be possible with any single realization of a WSN. Nonetheless, certain
common traits appear, especially with respect to the characteristics and
the required mechanisms of such systems. Realizing these
characteristics with new mechanisms is the major challenge of the vision
of wireless sensor networks.

CHARACTERISTIC REQUIREMENTS
The following characteristics are shared among most of the
application examples discussed above:

Type of service
The service type rendered by a conventional communication network
is evident – it moves bits from one place to another. For a WSN, moving
bits is only a means to an end, but not the actual purpose. Rather, a
WSN is expected to provide meaningful information and/or actions
about a given task: “People want answers, not numbers”. Additionally,
concepts like scoping of interactions to specific geographic regions or to
time intervals will become important. Hence, new paradigms of using such
a network are required, along with new interfaces and new ways of thinking
about the service of a network.

Quality of Service
Closely related to the type of a network’s service is the quality of
that service. Traditional quality of service requirements – usually coming
from multimedia-type applications – like bounded delay or minimum
bandwidth are irrelevant when applications are tolerant to latency or the
bandwidth of the transmitted data is very small in the first place. In some
cases, only occasional delivery of a packet can be more than enough; in
other cases, very high reliability requirements exist. In yet other cases,
delay is important when actuators are to be controlled in a real-time fashion
by the sensor network. The packet delivery ratio is an insufficient metric;
what is relevant is the amount and quality of information that can be
extracted at given sinks about the observed objects or area. Therefore,
adapted quality concepts like reliable detection of events or the
approximation quality of a, say, temperature map is important.

Fault tolerance
Since nodes may run out of energy or might be damaged, or since
the wireless communication between two nodes can be permanently

13
interrupted, it is important that the WSN as a whole is able to tolerate
such faults. To tolerate node failure, redundant deployment is necessary,
using more nodes than would be strictly necessary if all nodes
functioned correctly.

Lifetime
In many scenarios, nodes will have to rely on a limited supply of
energy (using batteries). Replacing these energy sources in the field
is usually not practicable, and simultaneously, a WSN must operate at
least for a given mission time or as long as possible. Hence, the lifetime
of a WSN becomes a very important figure of merit. Evidently, an
energy-efficient way of operation of the WSN is necessary. As an
alternative or supplement to energy supplies, a limited power source
(via power sources like solar cells, for example) might also be
available on a sensor node. Typically, these sources are not powerful
enough to ensure continuous operation but can provide some recharging of
batteries. Under such conditions, the lifetime of the network should ideally
be infinite. The lifetime of a network also has direct trade-offs against
quality of service: investing more energy can increase quality but
decrease lifetime. Concepts to harmonize these trade-offs are required.
The precise definition of lifetime depends on the application at hand. A
simple option is to use the time until the first node fails (or runs out of
energy) as the network lifetime. Other options include the time until the
network is disconnected in two or more partitions, the time until 50% (or
some other fixed ratio) of nodes have failed, or the time when for the first
time a point in the observed region is no longer covered by at least a
single sensor node (when using redundant deployment, it is possible and
beneficial to have each point in space covered by several sensor nodes
initially).

Scalability
Since a WSN might include a large number of nodes, the employed
architectures and protocols must be able scale to these numbers.

Wide range of densities


In a WSN, the number of nodes per unit area – the density of the network
– can vary considerably. Different applications will have very different
node densities. Even within a given application, density can vary over
time and space because nodes fail or move; the density also does not
have to homogeneous in the entire network (because of imperfect

14
deployment, for example) and the network should adapt to such
variations.

Programmability
Not only will it be necessary for the nodes to process information, but also
they will have to react flexibly on changes in their tasks. These
nodes should be programmable, and their programming must be
changeable during operation when new tasks become important. A fixed
way of information processing is insufficient.

Maintainability
As both the environment of a WSN and the WSN itself change
(depleted batteries, failing nodes, new tasks), the system has to adapt. It
has to monitor its own health and status to change operational parameters
or to choose different trade-offs (e.g. to provide lower quality when
energy resource become scarce). In this sense, the network has to
maintain itself; it could also be able to interact with external
maintenance mechanisms to ensure its extended operation at a required
quality.

REQUIRED MECHANISMS
To realize these requirements, innovative mechanisms for a
communication network have to be found, as well as new architectures,
and protocol concepts. A particular challenge here is the need to find
mechanisms that are sufficiently specific to the idiosyncrasies of a
given application to support the specific quality of service, lifetime,
and maintainability requirements. On the other hand, these mechanisms
also have to generalize to a wider range of applications lest a complete
from-scratch development and implementation of a WSN becomes
necessary for every individual application – this would likely render
WSNs as a technological concept economically infeasible.
Some of the mechanisms that will form typical parts of WSNs are:

Multihop wireless communication


While wireless communication will be a core technique, a direct
communication between a sender and a receiver is faced with limitations.
In particular, communication over long distances is only possible using
prohibitively high transmission power. The use of intermediate nodes as
relays can reduce the total required power. Hence, for many forms of
WSNs, so-called multihop communication will be a necessary ingredient.

15
Energy-efficient operation To support long lifetimes, energy-efficient
operation is a key technique. Options to look into include energy-
efficient data transport between two nodes (measured in J/bit) or, more
importantly, the energy-efficient determination of a requested
information. Also, nonhomogeneous energy consumption – the forming of
“hotspots” – is an issue.

Auto-configuration A WSN will have to configure most of its


operational parameters autonomously, independent of external
configuration – the sheer number of nodes and simplified deployment
will require that capability in most applications. As an example, nodes
should be able to determine their geographical positions only using
other nodes of the network – socalled “self-location”. Also, the network
should be able to tolerate failing nodes (because of a depleted battery,
for example) or to integrate new nodes (because of incremental
deployment after failure, for example).
Collaboration and In-Network processing In some applications, a single
sensor is not able to decide whether an event has happened but several
sensors have to collaborate to detect an event and only the joint data
of many sensors provides enough information. Information is processed
in the network itself in various forms to achieve this collaboration, as
opposed to having every node transmit all data to an external network and
process it “at the edge” of the network.
An example is to determine the highest or the average temperature
within an area and to report that value to a sink. To solve such tasks
efficiently, readings from individual sensors can be aggregated as they
propagate through the network, reducing the amount of data to be
transmitted and hence improving the energy efficiency. How to perform
such aggregation is an open question.

Data centric Traditional communication networks are typically centered


around the transfer of data between two specific devices, each equipped
with (at least) one network address – the operation of such networks is
thus address-centric. In a WSN, where nodes are typically deployed
redundantly to protect against node failures or to compensate for the low
quality of a single node’s actual sensing equipment, the identity of the
particular node supplying data becomes irrelevant. What is important are
the answers and values themselves, not which node has provided them.
Hence, switching from an address-centric paradigm to a data-centric

16
paradigm in designing architecture and communication protocols is
promising.
An example for such a data-centric interaction would be to request the
average temperature in a given location area, as opposed to requiring
temperature readings from individual nodes. Such a data-centric
paradigm can also be used to set conditions for alerts or events (“raise an
alarm if temperature exceeds a threshold”). In this sense, the data-centric
approach is closely related to query concepts known from databases; it also
combines well with collaboration, in-network processing, and aggregation.

Locality Rather a design guideline than a proper mechanism, the


principle of locality will have to be embraced extensively to ensure, in
particular, scalability. Nodes, which are very limited in resources like
memory, should attempt to limit the state that they accumulate during
protocol processing to only information about their direct neighbours. The
hope is that this will allow the network to scale to large numbers of
nodes without having to rely on powerful processing at each single node.
How to combine the locality principle with efficient protocol designs is still
an open research topic, however.

Exploit trade-offs Similar to the locality principle, WSNs will have to rely
to a large degree on exploiting various inherent trade-offs between
mutually contradictory goals, both during system/protocol design and at
runtime. Examples for such trade-offs have been mentioned already:
higher energy expenditure allows higher result accuracy, or a longer
lifetime of the entire network trades off against lifetime of individual
nodes. Another important trade-off is node density: depending on
application, deployment, and node failures at runtime, the density of the
network can change considerably – the protocols will have to handle
very different situations, possibly present at different places of a single
network. Again, not all the research questions are solved here.
Harnessing these mechanisms such that they are easy to use, yet
sufficiently general, for an application programmer is a major challenge.
Departing from an address-centric view of the network requires new
programming interfaces that go beyond the simple semantics of the
conventional socket interface and allow concepts like required
accuracy, energy/accuracy trade-offs, or scoping.

Advantages of sensor Network:

17
Low cost: WSNs consist of small, low-cost sensors that are easy to deploy,
making them a cost-effective solution for many applications.

Wireless communication: WSNs eliminate the need for wired


connections, which can be costly and difficult to install. Wireless
communication also enables flexible deployment and reconfiguration of
the network.

Energy efficiency: WSNs use low-power devices and protocols to


conserve energy, enabling long-term operation without the need for
frequent battery replacements.

Scalability: WSNs can be scaled up or down easily by adding or removing


sensors, making them suitable for a range of applications and
environments.
Real-time monitoring: WSNs enable real-time monitoring of physical
phenomena in the environment, providing timely information for decision
making and control.

Applications of Sensor network :


The claim of wireless sensor network proponents is that this
technological vision will facilitate many existing application areas and
bring into existence entirely new ones. This claim depends on many
factors, but a couple of the envisioned application scenarios shall be
highlighted. Apart from the need to build cheap, simple to program and
network, potentially long-lasting sensor nodes, a crucial and primary
ingredient for developing actual applications is the actual sensing and
actuating faculties with which a sensor node can be endowed.
For many physical parameters, appropriate sensor technology
exists that can be integrated in a node of a WSN. Some of the few
popular ones are temperature, humidity, visual and infrared light (from
simple luminance to cameras), acoustic, vibration (e.g. for detecting
seismic disturbances), pressure, chemical sensors (for gases of different
types or to judge soil composition), mechanical stress, magnetic
sensors (to detect passing vehicles), potentially even radar. But even
more sophisticated sensing capabilities are conceivable, for example,
toys in a kindergarten might have tactile or motion sensors or be able to
determine their own speed or location.
Actuators controlled by a node of a wireless sensor network
are perhaps not quite as multifaceted. Typically, they control a

18
mechanical device like a servo drive, or they might switch some
electrical appliance by means of an electrical relay, like a lamp, a bullhorn,
or a similar device.
On the basis of nodes that have such sensing and/or actuation
faculties, in combination with computation and communication abilities,
many different kinds of applications can be constructed, with very
different types of nodes, even of different kinds within one application.
A brief list of scenarios should make the vast design space and the very
different requirements of various applications evident.

Disaster relief applications One of the most often mentioned application


types for WSN are disaster relief operations. A typical scenario is wildfire
detection: Sensor nodes are equipped with thermometers and can
determine their own location (relative to each other or in absolute
coordinates). These sensors are deployed over a wildfire, for example,
a forest, from an airplane. They collectively produce a “temperature
map” of the area or determine the perimeter of areas with high
temperature that can be accessed from the outside, for example, by fire
fighters equipped with Personal Digital Assistants (PDAs). Similar
scenarios are possible for the control of accidents in chemical factories,
for example. Some of these disaster relief applications have
commonalities with military applications, where sensors should detect,
for example, enemy troops rather than wildfires. In such an
application, sensors should be cheap enough to be considered
disposable since a large number is necessary; lifetime requirements are
not particularly high.

Environment control and biodiversity mapping WSNs can be used


to control the environment, for example, with respect to chemical
pollutants – a possible application is garbage dump sites. Another
example is the surveillance of the marine ground floor; an
understanding of its erosion processes is important for the construction
of offshore wind farms. Closely related to environmental control is the
use of WSNs to gain an understanding of the number of plant and animal
species that live in a given habitat (biodiversity mapping). The main
advantages of WSNs here are the long-term, unattended, wirefree
operation of sensors close to the objects that have to be observed; since
sensors can be made small enough to be unobtrusive, they only negligibly
disturb the observed animals and plants. Often, a large number of sensors
is required with rather high requirements regarding lifetime.

19
Intelligent buildings Buildings waste vast amounts of energy by
inefficient Humidity, Ventilation Air Conditioning (HVAC) usage. A
better, real-time, high-resolution monitoring of temperature, airflow,
humidity, and other physical parameters in a building by means of a WSN
can considerably increase the comfort level of inhabitants and reduce
the energy consumption (potential savings of two quadrillion British
Thermal Units in the US alone have been speculated. Improved energy
efficiency as well as improved convenience are some goals of
“intelligent buildings”, for which currently wired systems like BACnet,
LonWorks, or KNX are under development or are already deployed;
these standards also include the development of wireless components
or have already incorporated them in the standard. In addition, such
sensor nodes can be used to monitor mechanical stress levels of
buildings in seismically active zones. By measuring mechanical
parameters like the bending load of girders, it is possible to quickly
ascertain via a WSN whether it is still safe to enter a given building after
an earthquake or whether the building is on the brink of collapse –
a considerable advantage for rescue personnel. Similar systems can be
applied to bridges. Other types of sensors might be geared toward
detecting people enclosed in a collapsed building and communicating
such information to a rescue team.
The main advantage here is the collaborative mapping of physical
parameters. Depending on the particular application, sensors can be
retrofitted into existing buildings (for HVAC type applications) or have
to be incorporated into the building already under construction. If power
supply is not available, lifetime requirements can be very high – up to
several dozens of years – but the number of required nodes, and hence the
cost, is relatively modest, given the costs of an entire building.

Facility management In the management of facilities larger than a


single building, WSNs also have a wide range of possible applications.
Simple examples include keyless entry applications where people wear
badges that allow a WSN to check which person is allowed to enter which
areas of a larger company site. This example can be extended to the
detection of intruders, for example of vehicles that pass a street outside
of normal business hours. A wide area WSN could track such a
vehicle’s position and alert security personnel – this application shares
many commonalities with corresponding military applications. Along
another line, a WSN could be used in a chemical plant to scan for leaking

20
chemicals. These applications combine challenging requirements as the
required number of sensors can be large, they have to collaborate
(e.g. in the tracking example), and they should be able to operate a
long time on batteries.

Machine surveillance and preventive maintenance One idea is to fix


sensor nodes to difficult to reach areas of machinery where they can detect
vibration patterns that indicate the need for maintenance. Examples for
such machinery could be robotics or the axles of trains. Other applications
in manufacturing are easily conceivable. The main advantage of WSNs
here is the cable free operation, avoiding a maintenance problem in
itself and allowing a cheap, often retrofitted installation of such sensors.
Wired power supply may or may not be available depending on the
scenario; if it is not available, sensors should last a long time on a
finite supply of energy since exchanging batteries is usually impractical
and costly. On the other hand, the size of nodes is often not a
crucial issue, nor is the price very heavily constrained.

Precision agriculture Applying WSN to agriculture allows precise


irrigation and fertilizing by placing humidity soil composition sensors
into the fields. A relatively small number is claimed to be sufficient,
about one sensor per 100 m × 100 m area. Similarly, pest control can profit
from a high-resolution surveillance of farm land. Also, livestock breeding
can benefit from attaching a sensor to each pig or cow, which controls the
health status of the animal (by checking body temperature, step counting,
or similar means) and raises alarms if given thresholds are exceeded.

Medicine and health-care Along somewhat similar lines, the use of


WSN in health care applications is a potentially very beneficial, but
also ethically controversial, application. Possibilities range from
postoperative and intensive care, where sensors are directly attached to
patients – the advantage of doing away with cables is considerable here –
to the long-term surveillance of (typically elderly) patients and to
automatic drug administration (embedding sensors into drug packaging,
raising alarms when applied to the wrong patient, is conceivable).
Also, patient and doctor tracking systems within hospitals can be literally
life saving.

Logistics In several different logistics applications, it is conceivable


to equip goods (individual parcels, for example) with simple sensors

21
that allow a simple tracking of these objects during transportation or
facilitate inventory tracking in stores or warehouses. In these applications,
there is often no need for a sensor node to actively communicate;
passive readout of data is often sufficient, for example, when a suitcase is
moved around on conveyor belts in an airport and passes certain
checkpoints. Such passive readout is much simpler and cheaper than
the active communication and information processing concept discussed
in the other examples; it is realized by so-called Radio Frequency
Identifier (RF ID) tags. On the other hand, a simple RFID tag cannot
support more advanced applications. It is very difficult to imagine how a
passive system can be used to locate an item in a warehouse; it can also
not easily store information about the history of its attached object
– questions like “where has this parcel been?” are interesting in many
applications but require some active participation of the sensor node.

Telematics Partially related to logistics applications are applications


for the telematics context, where sensors embedded in the streets or
roadsides can gather information about traffic conditions at a much
finer grained resolution than what is possible today. Such a socalled
“intelligent roadside” could also interact with the cars to exchange danger
warnings about road conditions or traffic jams ahead.
In addition to these, other application types for WSNs that
have been mentioned in the literature include airplane wings and
support for smart spaces, applications in waste water treatment plants,
instrumentation of semiconductor processing chambers and wind tunnels,
in “smart kindergartens” where toys interact with children, the detection
of floods, interactive museums, monitoring a bird habitat on a remote
island, and implanting sensors into the human body (for glucose
monitoring or as retina prosthesis).
While most of these applications are, in some form or another,
possible even with today’s technologies and without wireless sensor
networks, all current solutions are “sensor starved”. Most applications
would work much better with information at higher spatial and temporal
resolution about their object of concern than can be provided with
traditional sensor technology. Wireless sensor networks are to a large
extent about providing the required information at the required accuracy
in time with as little resource consumption as possible.

Event detection Sensor nodes should report to the sink(s) once they
have detected the occurrence of a specified event. The simplest events

22
can be detected locally by a single sensor node in isolation (e.g. a
temperature threshold is exceeded); more complicated types of events
require the collaboration of nearby or even remote sensors to decide
whether a (composite) event has occurred (e.g. a temperature gradient
becomes too steep). If several different events can occur, event
classification might be an additional issue. Periodic measurements Sensors
can be tasked with periodically reporting measured values. Often, these
reports can be triggered by a detected event; the reporting period is
application dependent.

Function approximation and edge detection The way a physical


value like temperature changes from one place to another can be regarded
as a function of location. A WSN can be used to approximate this
unknown function (to extract its spatial characteristics), using a limited
number of samples taken at each individual sensor node. This approximate
mapping should be made available at the sink. How and when to update
this mapping depends on the application’s needs, as do the
approximation accuracy and the inherent trade-off against energy
consumption.
Similarly, a relevant problem can be to find areas or points of
the same given value. An example is to find the isothermal points in a
forest fire application to detect the border of the actual fire. This can be
generalized to finding “edges” in such functions or to sending
messages along the boundaries of patterns in both space and/or time.

Tracking The source of an event can be mobile (e.g. an intruder in


surveillance scenarios). The WSN can be used to report updates on
the event source’s position to the sink(s), potentially with estimates
about speed and direction as well. To do so, typically sensor nodes have to
cooperate before updates can be reported to the sink. These
interactions can be scoped both in time and in space (reporting events
only within a given time span, only from certain areas, and so on). These
requirements can also change dynamically overtime; sinks have to have
a means to inform the sensors of their requirements at runtime. Moreover,
these interactions can take place only for one specific request of a
sink (so-called “one-shot queries”), or they could be long-lasting
relationships between many sensors and many sinks.
The examples also have shown a wide diversity in deployment
options. They range from well planned, fixed deployment of sensor nodes
(e.g. in machinery maintenance applications) to random deployment by

23
dropping a large number of nodes from an aircraft over a forest fire. In
addition, sensor nodes can be mobile themselves and compensate for
shortcomings in the deployment process by moving, in a post
deployment phase, to positions such that their sensing tasks can be
better fulfilled. They could also be mobile because they are attached to
other objects (in the logistics applications, for example) and the network
has to adapt itself to the location of nodes.
Closely related to the maintenance options are the options for
energy supply. In some applications, wired power supply is possible
and the question is mute. For self-sustained sensor nodes, depending
on the required mission time, energy supply can be trivial (applications
with a few days of usage only) or a challenging research problem,
especially when no maintenance is possible but nodes have to work
for years. Obviously, acceptable price and size per node play a crucial
role in designing energy supply.

Types of wireless sensor network:


The types of networks are decided based upon the environment so that they
can be deployed underwater, underground, on land and so on. Different
types of WSNs include:
– Terrestrial WSNs
– Underground WSNs
– Underwater WSNs
– Multimedia WSNs
– Mobile WSNs

Terrestrial WSN’s
• Terrestrial WSNs are capable of communicating base stations efficiently
and consist of hundreds to thousands of wireless sensor nodes deployed
either in an unstructured or structured manner.
• In an unstructured mode, the sensor nodes are randomly distributed
within the target area dropped from a fixed plane.
• The preplanned or structured mode considers optimal placement, grid
placement, and 2D, 3D placement models. In this WSN, the battery power
is limited but equipped with solar cells as a secondary power source.
• The energy conservation of these WSNs is achieved by using low duty
cycle operations, minimizing delays, and optimal routing, and so on.

24
Underground WSN
• The underground wireless sensor networks are more expensive than the
terrestrial WSNs in terms of deployment, maintenance, and equipment cost
considerations and careful planning.
• The WSNs networks consist of several sensor nodes hidden in the ground
to monitor underground conditions.
• To relay information from the sensor nodes to the base station, additional
sink nodes are located above the ground.
• The underground wireless sensor networks deployed into the ground are
difficult to recharge.
• The sensor battery nodes equipped with limited battery power are difficult
to recharge
• In addition to this, the underground environment makes wireless
communication a challenge due to the high level of attenuation and signal
loss.

25
Under Water WSN
• More than 70% of the earth is occupied with water. These networks
consist of several sensor nodes and vehicles deployed underwater.
• Autonomous underwater vehicles are used for gathering data from these
sensor nodes. A challenge of underwater communication is a long
propagation delay, and bandwidth and sensor failures.
• Underwater, WSNs are equipped with a limited battery that cannot be
recharged or replaced.
• The issue of energy conservation for underwater WSNs involves the
development of underwater communication and networking techniques.

26
Multimedia WSN
• Multimedia wireless sensor networks have been proposed to enable
tracking and monitoring of events in the form of multimedia such as
imaging, video, and audio.
• These networks consist of low-cost sensor nodes equipped with
microphones and cameras.
• These nodes are interconnected with each other over a wireless
connection for data compression, data retrieval, and correlation.
• The challenges with the multimedia WSN include high energy
consumption, high bandwidth requirements, data processing, and
compressing techniques.
• In addition to this, multimedia contents require high bandwidth for the
content to be delivered properly and easily.

27
Mobile WSN
• These networks consist of a collection of sensor nodes that can be moved
on their own and can be interacted with the physical environment.
• The mobile nodes can compute sense and communicate. Mobile wireless
sensor networks are much more versatile than static sensor networks.
• The advantages of MWSN over static wireless sensor networks include
better and improved coverage, better energy efficiency, superior channel
capacity, and so on.

28
29
UNIT-2
Mobile Ad-hoc Networks (MANETs) and Wireless Sensor Networks,
Enabling technologies for Wireless Sensor Networks. Issues and
challenges in wireless sensor networks

Mobile Ad-hoc Networks (MANETs)

Overview of Ad-hoc Network


Communication between various devices makes it possible to provide
unique and innovative services. Although this inter-device communication is a
very powerful mechanism, it is also a complex and clumsy mechanism, leading
to a lot of complexity in the present-day systems. This not only makes networking
difficult but limits its flexibility as well. Many standards exist today for
connecting various devices. At the same time, every device has to support more
than one standard to make it interoperable between different devices.

Wireless networks can be classified in two types:

Infrastructure dependent network


Ad hoc wireless networks (Infrastructure less network)

Ad hoc network is a kind of Wireless Network which can be designed for


fulfilling particular purposes that is served by establishment of the whole set up
on the fly. Example types of an Ad hoc network are –
• Mobile Ad hoc Network (MANET)
• Vehicular Ad hoc Network (VANET)
• Wireless Sensor Network (WSN)

Mobile Ad hoc Networks (MANETs)


Mobile ad hoc network is a collection of independent mobile nodes that can
communicate to each other via radio waves. The mobile nodes can directly
communicate to those nodes that are in radio range of each other, whereas others
nodes need the help of intermediate nodes to route their packets. These networks
are fully distributed, and can work at any place without the aid of any
infrastructure. This property makes these networks highly robust.
Mobile Ad hoc Networks are autonomous systems which comprise a collection
of mobile nodes that use wireless transmission for communication. They are self-
organized, self-configured, and self-controlled infrastructure-less networks. This
type of network can be set up or deployed anywhere and anytime because it poses
30
very simple infrastructure setup and no or minimal central administration. These
networks are mainly used by community users such as military, researchers,
business, students, and emergency services. Nodes are using Internet Protocol and
IP addresses are assigned to each of the nodes. Individual nodes discover
dynamically which other nodes they can communicate with.

Features / Characteristics of MANETs

• Rapidly deployable, self-organized, self-configured, and self-controlled


infrastructure- less networks
• Wireless links
• Every computer or device (node) is a router as well as end host
• Nodes are mobile, topology can be very dynamic
• Nodes must be able to relay traffic since communicating nodes might be
out of range
• Can be a standalone network or it can be connected to external
networks(Internet)
• Radio communication – shared medium.
Enabling technologies for Wireless Sensor Networks:
• It has only become possible to build wireless sensor networks with some
fundamental advances in enabling technologies.
• First and fore most among these technologies is the miniaturization of
hardware.
• Smaller feature sizes in chips have driven down the power consumption of
the basic components of a sensor node to a level that the constructions of
WSNs can be contemplated.
• This is particularly relevant to microcontrollers and memory chips and the
radio modems responsible for wireless communication.
• Reduced chip size and improved energy efficiency is accompanied by
reduced cost, which is necessary to make redundant deployment of nodes
affordable.
• The actual sensing equipment is the third relevant technology next to
processing and communication.
• However, it is difficult to generalize because of the vast range of possible
sensors.

31
Fig / Enabling Technologies for WSN
Energy Scavenging
• These three basic parts of a sensor node have to be accompanied by power
supply.
• This requirement depends on application, high capacity batteries lasting for
long times and can efficiently provide small amounts of current.
• A sensor node also has a device for energy scavenging, recharging the battery
with energy gathered from the environment– solar cells or vibration-based power
generation are conceivable options.
• Such a concept requires the battery to be efficiently chargeable with small
amounts of current, which is not a standard ability.
• The counterpart to the basic hardware technologies is software.
• The architecture of the operating system or runtime environment has to support
simple re-tasking, cross layer information exchange and modularity to allow for
simple maintenance.
• This software architecture on a single node has to be extended to a network
architecture, where the division of tasks between nodes is considered.
• The third part to solve is how to design appropriate communication protocols.
• Figure shows the enabling technologies for WSN.

Issues and challenges in wireless sensor networks:


o Quality of Service
o Security Issue
32
o Energy Efficiency
o Network Throughput
o Performance
o Ability to cope with node failure
o Cross layer optimisation
o Scalability to large scale of deployment
Limited power and energy: WSNs are typically composed of battery-powered
sensors that have limited energy resources. This makes it challenging to ensure
that the network can function for long periods of time without the need for
frequent battery replacements.
Limited processing and storage capabilities: Sensor nodes in a WSN are
typically small and have limited processing and storage capabilities. This makes
it difficult to perform complex tasks or store large amounts of data.
Heterogeneity: WSNs often consist of a variety of different sensor types and
nodes with different capabilities. This makes it challenging to ensure that the
network can function effectively and efficiently.
Security: WSNs are vulnerable to various types of attacks, such as
eavesdropping, jamming, and spoofing. Ensuring the security of the network and
the data it collects is a major challenge.
Scalability: WSNs often need to be able to support a large number of sensor
nodes and handle large amounts of data. Ensuring that the network can scale to
meet these demands is a significant challenge.
Interference: WSNs are often deployed in environments where there is a lot of
interference from other wireless devices. This can make it difficult to ensure
reliable communication between sensor nodes.
Reliability: WSNs are often used in critical applications, such as monitoring the
environment or controlling industrial processes. Ensuring that the network is
reliable and able to function correctly in all conditions is a major challenge.

33
UNIT-3
Routing protocols, MAC protocols: Classification of MAC
Protocols, S-MAC Protocol, B-MAC protocol, IEEE 802.15.4
standard and ZigBee

Routing protocols :

Introduction
➢ The routing protocol is a process to select suitable path for the data to
travel from source to destination. The process encounters several
difficulties while selecting the route, which depends upon, type of network,
channel characteristics and the performance metrics.
➢ The data sensed by the sensor nodes in a wireless sensor network (WSN)
is typically forwarded to the base station that connects the sensor network
with the other networks (may be internet) where the data is collected,
analyzed and some action is taken accordingly.
➢ In very small sensor networks where the base station and motes (sensor
nodes) so close that they can communicate directly with each other than
this is single-hop communication but in most WSN application the
coverage area is so large that requires thousands of nodes to be placed and
this scenario requires multi-hop communication because most of the sensor
nodes are so far from the sink node (gateway) so that they cannot
communicate directly with the base station.
➢ The single-hop communication is also called direct communication and
multi-hop communication is called indirect communication.
➢ In multi-hop communication the sensor nodes not only produce and
deliver their material but also serve as a path for other sensor nodes towards
the base station.
➢ In multi-hop network, an intermediate node (as well as the source node)
has to decide to which neighbouring node an incoming packet should be
passed on so that it eventually reaches the destination – for example, node
S sending to node D through number of intermediate nodes (Figure ). This
act of passing on is called forwarding. The simplest forwarding role is
called flooding.

34
Figure 3.12 Multi-hop network – node S sends packets to node D
➢ Flooding is a common technique frequently used for path discovery and
information dissemination in wired and wireless ad hoc networks.
➢ Flooding uses a reactive approach whereby each node receiving a data
or control packet sends the packet to all its neighbors. After transmission,
a packet follows all possible paths. Unless the network is disconnected, the
packet will eventually reach its destination.
➢ Furthermore, as the network topology changes, the packet transmitted
follows the new routes. To prevent a packet from circulating indefinitely in
the network, a hop count field is usually included in the packet.
➢ Initially, the hop count is set to approximately the diameter of the
network. As the packet travels across the network, the hop count is
decremented by one for each hop that it traverses.
➢ When the hop count reaches zero, the packet is simply discarded. A
similar effect can be achieved using a time-to-live field, which records the
number of time units that a packet is allowed to live within the network. At
the expiration of this time, the packet is no longer forwarded.
➢ Flooding can be further enhanced by identifying data packets uniquely,
forcing each network node to drop all the packets that it has already
forwarded. Such a strategy requires maintaining at least a recent history of
the traffic, to keep track of which data packets have already been
forwarded.
➢ The simple forwarding rule that flooding uses to route packets does not
take into consideration the energy constraints of the sensor nodes. As such,
the node’s energy may deplete rapidly, reducing considerably the lifetime
of the network.
➢ To address the shortcomings of flooding, using a derivative approach,
referred to as gossiping.
➢ Gossiping is similar to flooding except that, a node receiving a packet,
instead of broadcasting, the node sends it to only one of its randomly
selected neighbour, and the neighbour in turn sends the packet to one of its
randomly selected neighbour, this continues until the packet reaches its
destination.

35
➢ The process of finding suitable path from source node to destination
node is called routing and this is the primary responsibility of the network
layer. To forward the data packet each node maintain the routing table.
Table shows two examples.
Table Routing tables for some nodes from Figure , using hop count as cost metric

Wireless MAC Protocols


➢ The specific requirements and design considerations for MAC protocols in
wireless sensor networks are:
• Balance of Requirements : For the case of WSNs, the balance of
requirements is different from traditional (wireless) networks. The
importance of energy efficiency for the design of MAC protocols is
relatively new and many of the “classical” protocols like ALOHA
and CSMA contain no provisions toward this goal. Other
requirements like fairness, throughput, transmission delay,
scalability and robustness are play a minor role in sensor networks.

• Energy problems on the MAC layer

❖ A transceiver consumes a significant share of energy. A


transceiver can be in one of the four main states.
Transmitting: In the transmit state, the transmit part of the
transceiver is active and the antenna radiates energy.
Receiving: In the receive state the receive part is active
Idling: A transceiver that is ready to receive but is not
currently receiving anything is said to be in an idle state. In
this idle state, many parts of the receive circuitry are active,
and others can be switched off.
❖ Sleeping: In the sleep state, significant parts of the transceiver
are switched off.
➢ Energy problems and Design Goals
36
• Collision: A collision is a wasted effort when two frames collide
with each other and are discarded because the receiver has to drop
the overlapped information. A collision usually results in
retransmission and drains more energy in transmitting and receiving
extra packets. The half-duplex nature of the wireless medium
precludes collision detection, thereby increasing the responsibilities
of the MAC protocol. Hence, collisions should be avoided, either
by design or by appropriate collision avoidance/hidden-terminal
procedures in CSMA protocols.
• Overhearing: An overhearing occurs on the wireless broadcast
medium when the node receives and processes a gratuitous packet
that is not addressed to it. In the dense network and under heavy
traffic situations, this could lead to a serious problem.
• Control packet overhead: An increase in the number and size of
control packets results in overhead and unnecessary energy waste
for WSNs, especially when only a few bytes of real data are
transmitted in each message. Such control signals also decrease the
channel capacity. A balanced approach is required so that the
required number of control packets can be kept at minimal.
• Idle listening: Since a node in a WSN usually does not know when
it will be the receiver of a message, it keeps its radio in ready-to-
receive mode, which consumes almost as much energy as in receive
mode. In low traffic applications, this is considered one of the major
sources of energy waste. The idle listening consumes significant
energy. Hence, need Periodic listen and sleep.

✓ Turn off radio when sleeping


✓ Reduce duty cycle
• Complexity: Computationally expensive algorithms might
decrease the time the node spends in the sleep mode.
• Over-emitting: An over-emitting or a deafness occurs due to the
transmission of the message when the destination node is not ready
to receive it.
Classification of routing protocols

37
The routing protocols define how nodes will communicate with each other and
how the information will be disseminated through the network. There are many
ways to classify the routing protocols of WSN.

Node centric
In node centric protocols the destination node is specified with some numeric
identifiers and this is not expected type of communication in Wireless sensor
networks. E.g. Low energy adaptive clustering hierarchy (LEACH).
Low energy adaptive clustering hierarchy (LEACH)
LEACH is a routing protocol that organizes the cluster such that the energy is
equally divided in all the sensor nodes in the network. In LEACH protocol several
clusters are produced of sensor nodes and one node defined as cluster head and
act as routing node for all the other nodes in the cluster.
As in routing protocols the cluster head is selected before the whole
communication starts and the communication fails if there is any problem occurs
in the cluster head and there is much chances that the battery dies earlier as
compare to the other nodes in cluster as the fix cluster head is working his duties
of routing for the whole cluster.
LEACH protocol apply randomization and cluster head is selected from the group
of nodes so this selection of cluster head from several nodes on temporary basis
make this protocol more long lasting as battery of a single node is not burdened
for long.
Sensor nodes elect themselves as cluster head with some probability criteria
defined by the protocol and announce this to other nodes.
Data-centric
In most of the wireless sensor networks, the sensed data or information is far more
valuable than the actual node itself. Therefore data centric routing techniques the

38
prime focus is on the transmission of information specified by certain attributes
rather than collecting data from certain nodes.
In data centric routing the sink node queries to specific regions to collect data of
some specific characteristics so naming scheme based on attributes is necessary
to describe the characteristics of data. Examples are as follows:
Sensor protocols for information via negotiation (SPIN)
SPIN is abbreviation of sensor protocol for information via negotiation.
This protocol is defined to use to remove the deficiency like flooding and
gossiping that occurs in other protocols. The main idea is that the sharing
of data, which is sensed by the node, might take more resources as compare
to the meta-data, which is just a descriptor about the data sensed, by the
node. The resource manager in each node monitors its resources and adapts
their functionality accordingly.
Three messages namely ADV, REQ and DATA are used in SPIN. The node
broadcast an ADV packet to all the other nodes that it has some data. This
advertising node ADV message includes attributes of the data it has. The
nodes having interests in data, which the advertising node has requested by
sending REQ message, to the advertising node. On receiving the REQ
message the advertising node send data to that node. This process continues
when the node on reception of data generate an ADV message and send it.

Figure SPIN routing protocol

Destination-initiated (Dst-initiated)
39
Protocols are called destination initiated protocols when the path setup generation
originates from the destination node. Examples are directed diffusion (DD) &
LEACH.
Directed diffusion (DD)
Directed diffusion is a data centric routing technique. It uses this data
centric technique for information gathering and circulating. This routing
protocol is also energy efficient and energy saving protocol so that’s why
life time of the network is increased. All the communication in directed
diffusion routing protocol is node to node so there is no need of addressing
in this protocol.
Source-initiated (Src-initiated)
In these types of protocols the source node advertises when it has data to share
and then the route is generated from the source side to the destination. Examples
is SPIN.
INTRODUCTION TO MAC:
Nodes in an Ad-hoc wireless network share a common broadcast radio channel.
Since the radio spectrum is limited, the bandwidth available for communication
in such networks is also limited.
Access to this shared medium should be controlled in such a manner that all nodes
receive a fair share of the available bandwidth, and that the bandwidth is utilized
efficiently.
Characteristics of the wireless medium are completely different from wired
medium.
So a different set of protocols is required for controlling access to the shared
medium in such networks. This is achieved by using Medium Access Control
(MAC) protocol.
Issues in Designing MAC Protocol for Ad-hoc Wireless Networks:
Bandwidth Efficiency:
Since the radio spectrum is limited, the bandwidth available for communication
is also very limited. The MAC protocol must be designed in such a way that to
maximize this bandwidth efficiency (the ratio of the bandwidth used for actual
data transmission to the total available bandwidth).
That is the uncommon bandwidth is utilized in an efficient manner.

40
Quality of Service Support(QoS):
Providing QoS support to data sessions in Ad-hoc networks is very difficult due
to their characteristic nature of nodes mobility.
Most of the time, Bandwidth reservation made at one point of time may become
invalid once the node moves out of the region.
The MAC protocol for Ad-hoc wireless networks that are to be used in such real-
time applications must have resource reservation mechanism take care of nature
of the wireless channel and the mobility of nodes.
Issues in Designing MAC Protocol for Ad-hoc Wireless Networks:
Synchronization:
The MAC protocol must take into consideration the synchronization between
nodes in the network.
Synchronization is very important for bandwidth (time slot) reservations by nodes
achieved by exchange of control packets.
Hidden and Exposed Terminal Problems:
The hidden terminal problem refers to the collision of packets at a receiving node
due to the simultaneous transmission of those nodes.
The exposed terminal problem refers to the inability of a node, which is blocked
due to transmission by a nearby transmitting node, to transmit to another node.
Mobility of Nodes:
This is a very important factor affecting the performance (throughput) of the
protocol.
The MAC protocol obviously has no role to play in influencing the mobility of
the nodes.
Issues in Designing MAC Protocol for Ad-hoc Wireless Networks:
Error-Prone Shared Broadcast Channel:
Due to broadcast nature of the radio channel (transmissions made by a node are
received by all nodes within its direct transmission range) there is a possibility of
packet collisions is quite high in wireless networks.
A MAC protocol should grant channel access to nodes in such a manner that
collisions are minimized.

41
Distributed Nature/Lack of Central Coordination
Ad hoc wireless networks do not have centralized coordinators because nodes
keep moving continuously.
Therefore, nodes must be scheduled in a distributed fashion for gaining access to
the channel.
The MAC protocol must make sure that the additional overhead, in terms of
bandwidth consumption is not very high.
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.
• Control overhead must be kept as low as possible.
• The protocol should minimize the effects of hidden and exposed terminal
problems.
• The protocol must be scalable to large networks.
• 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.
Classifications of MAC Protocols:
Ad hoc network MAC protocols can be classified into three types:
• Contention-based protocols
• Contention-based protocols with reservation mechanisms
• Contention-based protocols with scheduling mechanisms
• Other MAC protocols

42
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.
Contention-based protocols with reservation mechanisms
Synchronous protocols: All nodes need to be synchronized. Global time
synchronization is difficult to achieve.
Asynchronous protocols: These protocols use relative time information for
effecting reservations.
Contention-based protocols with scheduling mechanisms:
Node scheduling is done in a manner so that all nodes are treated fairly and no
node is starved of [Link]-based schemes are also used for
enforcing priorities among flows whose packets are queued at [Link]
scheduling schemes also consider battery characteristics.
Other protocols are those MAC protocols : These are not strictly fall under the
above categories.
Contention-based protocols :

43
Single-channel sender-initiated protocols:
EXAMPLES: MACAW, FAMA
MACAW: A Media Access Protocol for Wireless LANs is based on MACA
(Multiple Access Collision Avoidance) Protocol
MACA:-
• When a node wants to transmit a data packet, it first transmit a RTS
(Request To Send) frame.
• The receiver node, on receiving the RTS packet, if it is ready to receive
the data packet, transmits a CTS (Clear to Send) packet.
• 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 problem is solved by MACAW.

➢ Single-channel sender-initiated protocols:


• MACA EXAMPLES:
• MACA avoids the problem of hidden terminals
✓ A and C want to send to B
✓ A sends RTS first
✓ C waits after receiving
CTS from B
• MACA avoids the problem of exposed terminals
✓ B wants to send to A, C to another terminal
✓ now C does not have to wait for it cannot
44
receive CTS from A

Figure: MACA avoids the problem of hidden terminals

Figure: MACA avoids the problem of exposed terminals


➢ Single-channel sender-initiated protocols:
• MACAW: (MACA for Wireless) is a revision of MACA.
• The sender transmits a RTS (Request To Send) frame if no nearby station
transmits a RTS.
• The receiver replies with a CTS (Clear To Send) frame.
Neighbors
❑ see CTS, then keep quiet.
❑ see RTS but not CTS, then keep quiet until the CTS is back to the
sender.
• The receiver sends an ACK when receiving an frame.
❑ Neighbors keep silent until see ACK.

45
• Collisions
❑ There is no collision detection.
❑ The senders know collision when they don’t receive CTS.
❑ They each wait for the exponential back-off time.
Single-channel sender-initiated protocols:
• FAMA: Floor Acquisition Multiple Access Protocols.
✓ Channel access consists of a carrier-sensing operation and a collision
avoidance
✓ Carrier-sensing by the sender, followed by the RTS-CTS control packet
exchange.
▪ Data transmission to be collision free, the duration of an RTS must
be at least twice the maximum channel propagation delay
✓ Two FAMA protocol variants
▪ RTS-CTS exchange with no carrier sensing (MACA)
▪ RTS-CTS exchange with non-persistent carrier sensing (FAMA-
NTR)
• FAMA-NTR(Non-persistent Transmit Request)
▪ Before sending a packet, the sender senses the channel
▪ If channel is busy, the sender back-off a random time and retries later
▪ If the channel is free, the sender sends RTS and waits for a CTS packet
▪ If the sender cannot receive a CTS, it takes a random back-off and retries
later
▪ If the sender receives a CTS, it can start transmission data packet
▪ In order to allow the sender to send a burst of packets, the receiver is made
to wait a time duration τ seconds after a packet is received.
Multi-channel sender-initiated protocols:
❑ Busy Tone Multiple Access Protocols (BTMA):
❖ The transmission channel is split into two parts:
✓ a data channel for data packet transmissions

46
✓ 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.
• Dual Busy Tone Multiple Access Protocol (DBTMAP) is an extension of
the BTMA scheme.
✓ a data channel for data packet transmissions
✓ a control channel used for control packet transmissions (RTS and
CTS packets) and also for transmitting the busy tones.
❖ Use two busy tones on the control channel, BTt and BTr.
▪ BTt : indicate that it is transmitting on the data channel
▪ BTr: indicate that it is receiving on the data channel
❖ Two busy tone signals are two sine waves at different frequencies
• Receiver-initiated protocols:
❑ RI-BTMA: Receiver-Initiated Busy Tone Multiple Access Protocol
✓ 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.
• MACA-BI: MACA-By Invitation
✓ By eliminating the need for the RTS packet it reduces the number of
control packets used in the MACA protocol which uses the three-
way handshake mechanism.
• MARCH: Media Access with Reduced Handshake.
Receiver-initiated protocols:

47
Contention-based Protocols with Reservation Mechanism:
➢ Contention occurs during the resource (bandwidth) reservation
phase.
➢ Once the bandwidth is reserved, the node gets exclusive access to
the reserved bandwidth.
➢ QoS support can be provided for real-time traffic.
❖ Synchronous protocols:
❑ 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 is a TDMA-based scheme. The channel is divided into
fixed- and equal-sized frames along the time axis.

48
❖ Synchronous protocols:
❑ Collision Avoidance Time Allocation Protocol(CATA):
✓ Support broadcast, unicast, and multicast transmissions simultaneously.
✓ Each frame consists of S slots and each slot is further divided into five
Control Mini-Slots
• CMS1: Slot Reservation (SR)
• CMS2: RTS
• CMS3: CTS
• CMS4: Not To Send (NTS)
• DMS: Data transmission

❖ Synchronous protocols:
❑ Hop Reservation Multiple Access Protocol (HRMA):
✓ A multichannel MAC protocol which is based on half-duplex, very
slow frequency-hopping spread spectrum (FHSS) radios

49
✓ 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.

❖ Synchronous protocols:
❑ 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.
✓ Nodes use a collision-avoidance handshake mechanism and a soft
reservation mechanism.
❑ Five-Phase Reservation Protocol (FPRP)
✓ A single-channel 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,

50
• Packing And Elimination Phase.
❖ Synchronous protocols:
❑ Five-Phase Reservation Protocol (FPRP)
• Five-phase protocol:
• Reservation request: send reservation request (RR) packet to dest.
• Collision report: if a collision is detected by any node, that node
broadcasts a CR packet
• Reservation confirmation: a source node won the contention will send a
RC packet to destination node if it does not receive any CR message in the
previous phase
• Reservation acknowledgment: destination node acknowledge reception
of RC by sending back RA message to source
• Packing and elimination: use packing packet and elimination packet.
❖ Asynchronous protocols:
❑ MACA with Piggy-Backed Reservation (MACA/PR):
✓ Provide real-time traffic support in multi-hop wireless networks
✓ Based on the MACAW protocol with non-persistent CSMA
✓ The main components of MACA/PR are:
✓ A MAC protocol
✓ A reservation protocol
✓ A QoS routing protocol
❑ 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.
o A medium-access protocol for best-effort traffic
o A reservation protocol for real-time traffic

51
▪ A QoS routing protocol is responsible for end-to-end reservation and
release of bandwidth resources.
➢ Contention-based protocols with Scheduling Mechanism:
▪ 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
▪ 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 to the control and
data packets
✓ Multi-hop coordination – Extends the DPS scheme to carry out
scheduling over multi-hop paths.
➢ Contention-based protocols with Scheduling Mechanism:
• Distributed Wireless Ordering Protocol (DWOP)
▪ A media access scheme along with a scheduling mechanism based
on the distributed priority scheduling scheme
• Distributed Laxity-based Priority Scheduling (DLPS) Scheme
▪ Scheduling decisions are made based on the states of neighboring
nodes and feed back from destination nodes regarding packet losses
▪ Packets are recorded based on their uniform laxity budgets (ULBs)
and the packet delivery ratios of the flows. The laxity of a packet is
the time remaining before its deadline.
➢ MAC Protocols that use directional Antennas:
✓ MAC protocols that use directional antennas have several advantages:
▪ Reduce signal interference
▪ Increase in the system throughput
▪ Improved channel reuse
52
✓ MAC protocol using directional antennas
▪ Make use of an RTS/CTS exchange mechanism
▪ Use directional antennas for transmitting and receiving data packets
✓ Directional Busy Tone-based MAC Protocol (D-BTMA)
▪ It uses directional antennas for transmitting the RTS, CTS, data
frames, and the busy tones.
✓ Directional MAC Protocols for Ad Hoc Wireless Networks
▪ DMAC-1: A directional antenna is used for transmitting RTS packets
and Omni-directional antenna for CTS packets.
DMAC-1, both directional RTS and omni-directional RTS transmission are
used.
MAC Protocols that use directional Antennas:

➢ Other MAC Protocols:


✓ Multi-channel MAC Protocol (MMAC)
▪ Multiple channels for data transmission
▪ There is no dedicated control channel.

53
▪ Based on channel usage channels can be classified into three types:
high, medium and low preference channels.
✓ Multi-channel Carrier Sense Multiple Access(MCSMA) MAC
Protocol :
▪ 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.

S-MAC Protocol:
➢ The S-MAC (Sensor-MAC) protocol provides mechanisms to avoid idle
listening, collisions, and overhearing.
➢ S-MAC adopts a periodic wakeup scheme, with virtual cluster features as
shown in Figure Basically a network is formed as a flat single-hop
topology and S-MAC utilises only one frequency channel for
communication.
➢ The listen period of S-MAC can be used to receive and transmit packets.
The listen period is fixed at 115 ms and the wake-up period can take up to
hundreds of milliseconds. Thus the sleep period is adjustable. Within a
cluster, all the nodes are synchronised such that all the nodes can wake up
at the same time.

54
Figure 3.2 S-MAC Scheme
➢ A node x’s listen period is subdivided into three different phases. There are
❖ SYNCH Phase
❖ RTS Phase
❖ CTS Phase
➢ SYNCH Phase
• Node x accepts SYNCH packets from its neighbors. In these packets,
the neighbors describe their own schedule and x stores their schedule
in a table (schedule table).
➢ Node x’s SYNCH phase is subdivided into time slots and x’s neighbors
contend according to a CSMA scheme with additional backoff, that is, each
neighbour y wishing to transmit a SYNCH packet picks one of the time
slots randomly and starts to transmit if no signal was received in any of the
previous slots.
➢ In the other case, y goes back into sleep mode and waits for x’s next
wakeup. In the other direction, since x knows a neighbour y’s schedule, x
can wake at appropriate times and send its own SYNCH packet to y (in
broadcast mode).
➢ It is not required that x broadcasts its schedule in every of y’s wakeup
periods. However, for reasons of time synchronization and to allow new
nodes to learn their local network topology, x should send SYNCH packets
periodically. The according period is called synchronization period.
➢ RTS Phase
• Node x listens for RTS packets from neighbouring nodes. In S-
MAC, the RTS/CTS handshake is used to reduce collisions of data
packets due to hidden-terminal situations.
➢ CTS Phase Node x transmits a CTS packet if an RTS packet was received
in the previous phase. After this, the packet exchange continues, extending
into x’s nominal sleep time.
Network Allocation Vector (NAV) Approach
55
In general, when competing for the medium, the nodes use the
RTS/CTS handshake, including the virtual carrier-sense mechanism,
whereby a node maintains a NAV (Network Allocation Vector) variable.
The NAV mechanism can be readily used to switch off the node during
ongoing transmissions to avoid overhearing.

Virtual Cluster
➢ The S-MAC protocol allows neighbouring nodes to agree on the same
schedule and to create virtual clusters. The clustering structure refers solely
to the exchange of schedules; the transfer of data packets is not influenced
by virtual clustering.
➢ The S-MAC protocol proceeds as follows to form the virtual clusters: A
node x, newly switched on, listens for a time of at least the (globally
known) synchronization period.
➢ If x receives any SYNCH packet from a neighbour, it adopts the
announced schedule and broadcasts it in one of the neighbours’ next listen
periods. In the other case, node x picks a schedule and broadcasts it.
➢ If x receives another node’s schedule during the broadcast packet’s
contention period, it drops its own schedule and follows the other one. It
might also happen that a node x receives a different schedule after it already
has chosen one, for example, because bit errors destroyed previous
SYNCH packets.
➢ If node x already knows about the existence of neighbors who adopted its
own schedule, it keeps its schedule and in the future has to transmit its
SYNCH and data packets according to both schedules.
➢ On the other hand, if x has no neighbour sharing its schedule, it drops its
own and adopts the other one. Since there is always a chance to receive
SYNCH packets in error, node x periodically listens for a whole
synchronization period to relearn its neighbourhood. This makes the virtual
cluster formation fairly robust.
Message Passing Approach
➢ S-MAC also adopts a message-passing approach (illustrated in Figure
3.3), where a message is a larger data item meaningful to the
application. In-network processing usually requires the aggregating
node to receive a message completely.
➢ On the other hand, on wireless media, it is advisable to break a longer
packet into several shorter ones.
➢ S-MAC includes a fragmentation scheme working as follows. A series
of fragments is transmitted with only one RTS/CTS exchange between

56
the transmitting node A and receiving node B. After each fragment, B
has to answer with an acknowledgment packet. All the packets (data,
ack, RTS, CTS) have a duration field and a neighbouring node C is
required to set its NAV field accordingly.

Figure 3.3 S-MAC fragmentation and NAV setting


➢ In S-MAC, the duration field of all packets carries the remaining length
of the whole transaction, including all fragments and their
acknowledgments. Therefore, the whole message shall be passed at
once.
➢ If one fragment needs to be retransmitted, the remaining duration is
incremented by the length of a data plus ack packet, and the medium is
reserved for this prolonged time. However, there is the problem of how
a nonparticipating node shall learn about the elongation of the
transaction when he has only heard the initial RTS or CTS packets.
B-MAC
• B-MAC is a widely used WSN MAC protocol. It is a part of TinyOS.
• It employs low-power listening to minimize power consumption due to idle
listening.
• Nodes have a sleep period, after which they wake up and sense the medium for
preambles.
• If there is a preamble, the nodes stay awake and receive the data packet after
the preamble.
• If a node wants to send a message, it first sends a preamble for the sleep period
for all nodes to detect it. After the preamble, it sends the data packet.

57
• Thereare optional acknowledgments also.
• After the data packet exchange, the nodes go back to sleep. • The preamble
doesn’t contain addressing information. Figure shows the example transmission
using B-MAC.

Fig Example for BMAC Communication


Preamble Sampling Scheme
• The B-MAC preamble sampling scheme checks the channel for adjusting the
time interval equal to frame preamble size.
• As an example, if the medium is checked every 100 ms, the preamble of the
packet must be available for 100 ms at the minimum, in order for the receiver to
detect the packet.
• Upper layers may change the preamble duration, according to the application
requirements.
Advantages
• It does not use RTS, CTS, ACK, or any other control frame by default, but they
can be added.
• It is one of the few specialized MAC protocols whose implementation was tested
in hardware.

58
• No synchronization is required and the protocol performance can be tuned by
higher layers to meet the needs of various applications.
Disadvantages
• Thepreamble creates large overhead.
• One example presents 271 bytes of preamble to send 36 bytes of data.
IEEE 802.15.4 Standarad:
The Institute of Electrical and Electronics Engineers (IEEE) released the 802.15.4
MAC standard for wireless personal area networks (WPANs) equipped with a
duty cycle mechanism where the size of active and inactive parts can be
adjustable during the PAN formation.
Network Architecture and Types/Roles of Nodes
The IEEE 802.15.4 MAC combines both the schedule-based and contention-
based protocols and supports two network topologies, star and peer-to-peer as
shown in Figure

Figure 3.9 Topology configurations supported by IEEE 802.15.4 standard

Applications of IEEE 802.15.4


• Wireless sensor networks
• Home Automation
• Home Networking
• Connecting Devices to a PC
• Home security, etc.
➢ There are two special types of peer-to-peer topology. The first type is
known as a cluster-tree network which has been used extensively in
ZigBee. The other type is known as a mesh network which has been used
extensively in IEEE 802.15 WPAN Task Group 5 (TG5).
➢ The standard defines two types of nodes namely the Full Function Device
(FFD) and Reduced Function Device (RFD). The FFD node can operate

59
with three different roles as a PAN coordinator, a coordinator and a device
while RFD can operate only as a device.
➢ The devices must be associated with a coordinator in all network
conditions. The multiple coordinators can either operate in a peer-to-peer
topology or star topology with a coordinator becoming the PAN
coordinator.
➢ The star topology is more suitable for delay critical applications and small
network coverage while the peer-to-peer topology is more applicable for
large networks with multi-hop requirements at the cost of higher network
latency.
➢ Furthermore, the standard defines two modes on how data exchanges
should be done, namely, the beacon mode and the non-beacon mode. The
beacon mode provides networks with synchronisation measures while the
non-beacon mode provides the asynchronous features to networks.

Superframe Structure
• The beacon mode of IEEE 802.15.4 MAC defines a superframe structure
to organise the channel access and data exchanges.
• The superframe structure is shown in Figure with two main periods; the
active period and inactive period.
• The active period is divided into 16 time slots. Typically the beacon frame
is transmitted in the first time slot and it is followed by two other parts,
Contention Access Period (CAP) and Contention-Free Period (CFP) which
utilise the remaining time slots.
• The CFP part is also known as Guaranteed Time Slots (GTS) and can utilise
up to 7 time slots.

Figure Superframe structure of IEEE 802.15.4


➢ The length of the active and inactive periods as well as the length of
a single time slot are configurable and traffic dependant.

60
➢ Data transmissions can occur either in CAP or GTS. In CAP, data
communication is achieved by using slotted CSMA-CA while in
GTS nodes are allocated fixed time slots for data communication.
➢ The strategy to achieve energy efficient operations in IEEE 802.15.4
MAC is by putting the nodes to sleep during the inactive period and
when there is neither data to be transmitted nor any data to be
fetched from the coordinator.
➢ However, the burden of energy cost is put on the coordinator where
the coordinator has to be active during the entire active period.

GTS Management
➢ The coordinator allocates GTS to devices only when the latter send
appropriate request packets during the CAP. One flag in the request
indicates whether the requested time slot is a transmit slot or a receive slot.
➢ In a transmit slot, the device transmits packets to the coordinator and in a
receive slot the data flows in the reverse direction. Another field in the
request specifies the desired number of contiguous time slots in the GTS
phase.
➢ The coordinator answers the request packet in two steps: An immediate
acknowledgment packet confirms that the coordinator has received the
request packet properly but contains no information about success or
failure of the request.
➢ After receiving the acknowledgment packet, the device is required to track
the coordinator’s beacons for some specified time (called
aGTSDescPersistenceTime). When the coordinator has sufficient
resources to allocate a GTS to the node, it inserts an appropriate GTS
descriptor into one of the next beacon frames. This GTS descriptor
specifies the short address of the requesting node and the number and
position of the time slots within the GTS phase of the superframe.
➢ A device can use its allocated slots each time they are announced by the
coordinator in the GTS descriptor. If the coordinator has insufficient
resources, it generates a GTS descriptor for (invalid) time slot zero,
indicating the available resources in the descriptors length field. Upon
receiving such a descriptor, the device may consider renegotiation.
➢ If the device receives no GTS descriptor within aGTSDescPersistenceTime
time after sending the request, it concludes that the allocation request has
failed. A GTS is allocated to a device on a regular basis until it is explicitly
deallocated. The deallocation can be requested by the device by means of
a special control frame.

61
➢ After sending this frame, the device shall not use the allocated slots any
further. The coordinator can also trigger deallocation based on certain
criteria. Specifically, the coordinator monitors the usage of the time slot: If
the slot is not used at least once within a certain number of superframes,
the slot is deallocated. The coordinator signals deallocation to the device
by generating a GTS descriptor with start slot zero.
Data Transfer
➢ Assume that a device wants to transmit a data packet to the coordinator. If
the device has an allocated transmit GTS, it wakes up just before the time
slot starts and sends its packet immediately without running any carrier-
sense or other collision-avoiding operations.
➢ However, the device can do so only when the full transaction consisting of
the data packet and an immediate acknowledgment sent by the coordinator
as well as appropriate InterFrame Spaces (IFSs) fit into the allocated time
slots.

Figure Handshake between coordinator and device when the device


retrieves a packet
➢ If this is not the case or when the device does not have any allocated slots,
it sends its data packet during the CAP using a slotted CSMA protocol. The
coordinator sends an immediate acknowledgment for the data packet.

62
➢ Now, assume the coordinator wants to send a data packet to the device. If
the device has allocated a receive GTS and when the
packet/acknowledgment/IFS cycle fits into these, the coordinator simply
transmits the packet in the allocated time slot without further coordination.
➢ The device has to acknowledge the data packet. The handshake between
device and coordinator is sketched in Figure
➢ The coordinator announces a buffered packet to a device by including the
devices address into the pending address field of the beacon frame.
➢ When the device finds its address in the pending address field, it sends a
special data request packet during the CAP.
➢ The coordinator answers this packet with an acknowledgment packet and
continues with sending the data packet.
➢ The device knows upon receiving the acknowledgment packet that it shall
leave its transceiver on and prepares for the incoming data packet, which
in turn is acknowledged.
➢ Otherwise, the device tries again to send the data request packet during one
of the following superframes and optionally switches off its transceiver
until the next beacon.
Slotted CSMA-CA Protocol
➢ When nodes have to send data or management/control packets during the
CAP, they use a slotted CSMA protocol. The protocol contains no
provisions against hidden- terminal situations.
➢ For example, there is no RTS/CTS handshake. To reduce the probability of
collisions, the protocol uses random delays; it is thus a CSMA-CA protocol
(CSMA with Collision Avoidance).
➢ The time slots making up the CAP are subdivided into smaller time slots,
called backoff periods. One backoff period has a length corresponding to
20 channel symbol times and the slots considered by the slotted CSMA-
CA protocol are just these backoff periods.

ZigBee :
Zigbee Zigbee is an IEEE 802.15.4-based specification for a suite of high-
level communication protocols used to create personal area networks with small,
low-power digital radios, such as for home automation, medical device data
collection, and other low-power low-bandwidth needs.

63
The technology defined by the zigbee specification is intended to be
simpler and less expensive than other wireless personal area networks (WPANs),
such as Bluetooth or Wi-Fi.
Zigbee devices can transmit data over long distances by passing data
through a mesh network of intermediate devices to reach more distant ones.
Designed for low power consumption allowing batteries to essentially
last for ever. ZigBee makes possible completely networked homes where all
devices are able to communicate and be controlled by a single unit. It provides
network, security and application support services operating on the top of IEEE.

Zigbee Coordinator:
The zigbee coordinator acts as the root of the zigbee network. The ZC is
responsible for initiating the Zigbee network and it has the capability to
store information about the network.
Zigbee Router: Responsible for passing information from device to another
device or to another ZR.
Zigbee end device: End device containing zigbee functionality for data
communication. It can talk only with a ZR or ZC and doesn’t have the
capability to act as a mediator for transferring data from one device to another.
Zigbee Device type: There are three different ZigBee device types that
operate on the layers in any self-organizing application network

64
• Zigbee Coordinator node
• Full Function Device (FFD)
• Reduced Function Device(RFD)

Zigbee Coordinator node:


• It is the root of network tree and a bridge to other network
• Able to store information about the network
• Only one ZCN for a network
• It act as a repositary for other security keys

Full Function Device (FFD):


• An intermediatory router transmitting data from other devices
• Needs lesser memory than Zigbee coordinator node
• Lesser manufacturing cost
• Can operate on all topologies
• Also act as a coordinator

Reduced Function Device(RFD):


 Device capable of talking in the network
 It cannot relay data from other devices
 Less memory
 Cheaper than FFD
 It talks only to the n/w coordinator

Characteristics:
 Low power consumption with battery life ranging from months to years
 High density of nodes per network
 Low cost
 Simple implementation
 Low data rate
 Small packet devices

Application:
Applications include wireless light switches, electrical meters with in-
home-displays, traffic management systems, and other consumer and
industrial equipment that require short-range low- rate wireless data transfer.

65
UNIT_4
Dissemination protocol for large sensor network. Data dissemination, data
gathering, and data fusion; Quality of a sensor network; Real-time traffic
support and security protocols.

Introduction to Data Dissemination :


• A data dissemination is a process by which data and queries for data are
routed in the sensor network.
• In a scope of data dissemination, a source is the node that generates the
data and an event is the information to be reported .
• A node that is interested in data is called sink and the interest is a descriptor
for some event that node is interested in.
• Thus, after source receives an interest from the sink, the event is transferred
from the source to the sink.
• As a result, data dissemination is a twostep process.
• First, the node that is interested in some events, like temperature or air
humidity, broadcasts its interests to its neighbors periodically.
• Interests are then propagated through the whole sensor network. In the
second step, nodes that have requested data, send back data after receiving
the request.
• Intermediate nodes in the sensor network also keep a cache of received
interests and data.
Data dissemination in WSN Methods
There exist several different data dissemination methods.
1. Flooding
2. Gossiping
3. SPIN
4. Cost-field approach
66
1. Flooding
• In flooding method each sensor node that receives a packet broadcasts
it to its neighbors assuming that node itself is not the destination of the
packet and the maximum hop count is not reached.
• This ensures that the data and queries for data are sent all over the
network. Flooding is a very simple method, but is has several
disadvantages.
• In flooding duplicate messages can be sent to the same node which is
called implosion.
• This occurs when a node receives the same message for several
neighbors. In addition, the same event may be sensed by several nodes,
and thus when using flooding, neighbors will receive duplicate reports
of the same event, this situation is called overlap.
• Finally, many redundant transmissions occur when using flooding and
flooding does not take into account available energy at sensor nodes.
• This wastes a lot of network's resources and decreases the lifetime of
the network significantly
2. Gossiping
• Gossiping method is based on flooding, but node that receives the
packet forwards it only to a single randomly selected neighbor instead
of sending it to all neighbors.
• The advantage of gossiping is that it avoids the problem of implosion
and it does not waste as much network resources as flooding.
• The biggest disadvantage of gossiping is that since the neighbor is
selected randomly, some nodes in the large network may not receive the
message at all.
• Thus, gossiping is not a reliable method for data dissemination.
3. SPIN
• Sensor Protocols for Information via Negotiation (SPIN) use negotiation
and resource adaption to address the disadvantages of basic flooding.
• SPIN uses data-centric routing, nodes are advertising their data and they
will send the data after receiving a reply from interested nodes.
• SPIN uses three types of messages: ADV, REQ, and DATA. The sensor
node that has collected some data sends an ADV message containing meta-
data describing the actual data.
• If data is disseminated through the network. Figure below describes ADV-
REQDATA exchange of SPIN some of node's neighbors is interested in the
data, the neighbor sends a REQ message back.

67
• After receiving the REQ message, the sensor node sends the actual DATA.
The neighbor also sends ADV message forward to its neighbors, thus
• In the figure, node A advertises its data using an ADV message, its neighbor
node B replies with a REQ message and thus node A sends actual data to
the B. Node B also forwards ADV messages to its neighbors.
• Improved version of SPIN, SPIN-2 uses an energy or resource threshold
to reduce participation of nodes.
• Thus, only those nodes that have sufficient amount of resources participate
in ADV-REQ-DATA exchange.
• SPIN is more efficient than flooding since the data for a longer time.
• negotiation reduces the implosion and overlap.
• Resource adaptation in SPIN-2 prolongs the lifetime of the network:
sensor nodes with low resources do not have to participate in ADV-REQ-
DATA exchange and as a result they can collect

Data dissemination in WSN :


• 4. Cost-field approach
• The aim of the cost-field approach is to solve problem of setting paths to
the sink.
• The cost-field approach is a two-phase process, first the cost field is set up
in all sensor nodes, based on some metric like a delay.
• In the second phase, data is disseminated using the costs.
• The cost at each node is the minimum cost from the node to the sink, which
occurs on the optimal path.
• With the cost-field approach explicit path information does not need to be
maintained.
• In the first phase of cost-field approach, a cost field is set up starting from
the sink node.
• The sink node broadcasts an ADV packet with cost set to 0.

68
• When node N receives an ADV packet from node M, it sets its own path
cost to min(LN, LM+CNM), where LN represents the current total path
cost from sink to node N, LM is the cost from node M to sink, and CNM
is the cost from node N to M.
• When forwarding cost to other nodes in the network, cost-field approach
uses back-off timers to avoid transmission of non-optimal costs.
• Otherwise cost-field approach would resemble flooding which is very
ineffective.
• This means that node N will broadcast received ADV message forward
only after time γ*CNM has passed, γ is the parameter of the algorithm.
• Figure below shows an example of setting up the cost field and it also
describes how back-off timers work.

Data gathering:
• The objective of the data-gathering problem is to transmit the sensed data
from each sensor node to a BS. One round is defined as the BS collecting
data from all the sensor nodes once. This scheme performs poorly with
respect to the energy × delay metric. Power-Efficient Gathering for Sensor
Information Systems:
Power-efficient gathering for sensor information systems (PEGASIS)
is a data-gathering protocol based on the assumption that all sensor nodes
know the location of every other node, that is, the topology information is
available to all nodes.
The goals of PEGASIS are as follows:
• Minimize the distance over which each node transmits
• Minimize the broadcasting overhead

69
• Minimize the number of messages that need to be sent to the BS
• Distribute the energy consumption equally across all nodes

• Binary Scheme:
This is also a chain-based scheme like PEGASIS, which classifies nodes
into different levels. All nodes which receive messages at one level rise to
the next. The number of nodes is halved from one level to the next. The
number of nodes is halved from one level to the next. For instance, consider
a network with eight nodes labeled s0 to s7. This scheme is possible when
nodes communicate using CDMA, so that transmissions of each level can
take place simultaneously .

• Chain-Based Three-Level Scheme:


For non-CDMA sensor nodes, a binary scheme is not applicable. The chain
based three-level scheme addresses this situation, where again a chain is
constructed as in PEGASIS. The chain is divided into a number of groups
to space out simultaneous transmissions in order to minimize interference.
One node out of each group aggregates data from all group members and
rises to the next level. The index of this leader node is decided a priori. In
the second level, all nodes are divided into two groups, and the third level
consists of a message exchange between one node from each group of the
second level. Finally, the leader transmits a single message to the BS. The
working of this scheme is illustrated in Figure. The network has 100 nodes,
and the group size is ten for the first level and five for the second level.
70
Three levels have been found to give the optimal energy × delay through
simulations.

Quality of a service in WSN:


• Based on the level of application different levels of QOS required.
Challenges for QoS Support in WSN
• Extreme resource constraints -energy, bandwidth, buffer size
• Redundant data -sensor nodes generate redundant data, energy wastage
• Heterogeneity of sensor node -different types of sensor for monitor
temperature, pressure, humidity of surroundings
• Dynamic network topology and size-mobility of sensor node ,node
failure
• Less reliable medium-radio wave in wireless medium less reliable
• Multiple sink or base station-multiple sink node based on different
application’s requirement so WSN need diversified QOS support

QoS requirement in WSN


• Application specific QoS
• -data accuracy, aggregation delay, fault tolerance, coverage, optimum no
of active sensors
• Network QoS-
• event driven, query driven, continuous
QoS domain classification

71
• Timeliness
• reliability
• Battlefield awareness
• Mission critical application-target tracking, emergency response
• Energy efficient design
• Due to increasing network life time, energy effcient design is promising
solutions.
• Sensor operates its battery which is not chargeable and after losing the
energy they will die, in some cases battery is rechargeable.
• Sensor node may have the sleep status to save their energy
• Sensor node should and its sleeping time from its neighbour hoods, sinks,
by itself to save energy
• In some cases sensors could continue sensing during the sleeping operation
while the energy usage in this node could be ignored.
Real-time traffic support and security protocols.
• Real-time traffic support in Wireless Sensor Networks (WSNs) refers to
the ability of the network to provide timely and accurate data for
applications that require low latency and high reliability, such as traffic
monitoring and control systems.
• In these applications, sensors are deployed along roads or highways to
collect data such as vehicle speeds, counts, and locations. This data is then
transmitted to a central node for processing and analysis to support real-
time traffic management and decision-making.
• To support real-time traffic support in WSNs, several challenges must be
addressed, including:
❏ Latency: To support real-time applications, the network must have low
latency, so that the data is transmitted and processed quickly.
❏ Reliability: The network must be able to provide accurate and reliable
data, as errors or failures in the network can have serious consequences for
traffic management and
decision-making.
❏ Energy Efficiency: The network must conserve energy to ensure that
sensors have a long lifespan, as it can be difficult or expensive to replace
sensors in remote locations.
❏ Security: The network must be secure to prevent unauthorized access or
tampering with the data, which can also have serious consequences for
traffic management and decision-making. To meet these challenges, WSNs
used for real-time traffic support are often designed and implemented with
a focus on reliability, low latency, and energy efficiency.

72
UNIT-5
Design Principles for WSNs, Gateway Concepts Need for gateway, WSN to
Internet Communication, and Internet to WSN Communication. Single-
node architecture, Hardware components & design constraints, Operating
systems and execution environments, introduction to TinyOS and nesC.

Design principle of WSN:


Distributed Organization
• Both the scalability and the robustness optimization goal are required to
organize the network in a distributed fashion.
• When organizing a network in a distributed fashion, it is necessary
toknow potential shortcomings of this approach.
• In many cases, a centralized approach can produce solutions
that perform better or require fewer resources.
• One possibility is to use centralized principles in a localized fashion
byelecting, out of set of equal nodes.
• Such elections result in a dynamic hierarchy.
• The election process should be repeated continuously until the elected
node runs out of energy.
In Network Processing Techniques
1. Aggregation:
The simplest in-network processing technique is aggregation. The
term aggregation means that information is aggregated into a
condensed form in nodes intermediate between sources and
sinks out of information provided by nodes further away from the
sink.
2. Distributed Source Coding and Distributed Compression:
The objective is to encode the information provided by several
sensors by using traditional coding schemes, which may be complex for
simple sensor nodes.
The readings of adjacent sensors are going to be quite
similar and correlated.
Such correlation can be exploited instead of sending the sum of the
data so that the overhead can be reduced.

73
3. Mobile code/Agent-based networking:
The idea of mobile code is to have a small, compact representation
ofprogram code to be sent from node to node. This code is
executedlocally for collecting measurements and then decides where to
be sentnext. This idea has been used in various environments.

Adaptive Fidelity & Accuracy


The idea of making fidelity of computation depends upon the amount of
energy available for that particular computation.
This concept can be extended from a single node to an entire network.
As an example, consider a function approximation application.
When more sensors participate in the approximation, the function is
sampled at more points and the approximation is better. But
more energy has to be invested.
Hence, it is up to an application to define the degree of accuracy of the
results and the task of the communication protocols to achieve
this accuracy.

Data Eccentricity
In traditional communication networks, the focus will be on the pair of
communicating peers, the sender and the receiver of data.
In a wireless sensor network, the interest of an application is actual
information reported about the physical environment. This is applicable
when a WSN is redundantly deployed such that any given event can be
reported by multiple nodes.
This method of concentrating on the data rather than identity of nodes is
called data-centric networking.
For an application, this means that an interface is exposed by
the network where data only is addressed in requests.

Exploit Local Information


Another useful technique is to exploit location information in
the communication protocols when-ever such information is present.
Since the location of an event is crucial information for many
applications, mechanisms must be available to determine the location of
sensor nodes.
It can simplify the design and operation of communication protocols and
can improve their energy efficiency.

74
Exploit Activity Patterns
Activity patterns in a wireless sensor network are quite different from
that of traditional network.
The data rate averaged over a long time can be very small.
This can be detected by a larger number of sensors, breaking into a
frenzy of activity, causing a well-known event shower effect.
Hence, the protocol design should be able to handle such
bursts of traffic by switching between modes of quiescence and of high
activity.

Exploit Heterogeneity
Sensor nodes can be heterogeneous by constructions, that is, they have
larger batteries, farther-reaching communication devices, or more
processing power.
They can also be heterogeneous by evolution, that is, they started from
an equal state, but scavenge energy from the environment due
to overloading.
Heterogeneity in the network is both a burden and an opportunity.
The opportunity is an asymmetric assignment of tasks, giving nodes with
more resources or more capabilities the more demanding tasks.
The burden is asymmetric task assignments cannot be static but have to
be reevaluated.

Component Based Protocol Stacks


• The concept is a collection of components which can form a basic
“toolbox” of protocols and algorithms to build upon.
• All wireless sensor networks will require some form of physical, MAC,
Link layer protocols, routing and transport layer functionalities.
• Moreover, “helper modules” like time synchronization, topology control
can be useful.
• On top of these basic components, more abstract functionalities can then
be built.
• The set of components active on a sensor node can be complex and will
change from application to application.
• Protocol components will also interact with each other either by using
simple exchange of data packets or by exchange of cross-layer information.

Component Based Protocol Stacks


The concept is a collection of components which can form a
basic “toolbox” of protocols and algorithms to build upon.

75
All wireless sensor networks will require some form of physical, MAC,
Link layer protocols, routing and transport layer functionalities.
Moreover, “helper modules” like time synchronization, topology control
can be useful.
On top of these basic components, more abstract functionalities can
then be built.
The set of components active on a sensor node can be complex and will
change from application to application.
Protocol components will also interact with each other either by using
simple exchange of data packets or by exchange of cross-layer
information.

Gateways
Gateways make communication between the application and the server
feasible by connecting them altogether through a network tube,
an imaginary tube that is believed to exist between the application and the
server and constituted by network waves through which data
transmission takes place.
Gateways are considered to be the backbone for preserving
the intelligence as well as the storage capacity of the Smart
device altogether without compromising on the loss of the duo.

Need of Gateways
Gateways are designed as a passage for data transfer and the more
intelligent a gateway could be, the more secure gateways could be, the
76
more approachable the gateways could be, the more sophisticated the
programming and designing of gateways could be, the more
approachable and user-friendly internet of things be and the users could
access and enjoy the smart objects in their life more easily.
If gateways could be understood and made in a manner that makes their
potential, accessibility, and user-friendliness to the mark, there could be
prominent growth and more security.

Types of Gateways
1. High Bandwidth Gateways:-
These Gateways are meant for a more complex and intelligent Internet
of Things or when there are lots of data to be processed and transmitted
and a lot of smart devices to be handled once a time. These gateways
could process data with more speed and flexibility and are
able to handle more data at a time. Gateways basically are not
categorized as such in the market, but various brands have
certain specifications through which it could be decided either
the gateway is of high bandwidth or not.

2. Low Bandwidth Gateways:-


These Gateways are really the best choice while choosing a simple
smart object or when you want to handle a single device once at a time.
These Gateways are usually cheap and are easy going with
simple smart devices, and usually need a sink for more feasibility. They
are really awesome if want a cheap solution to your data transmission.

Features of Gateways
Gateways work as a network bridge for data transmission as it makes
the transmission of data possible to transmit with more ease and does
not demand high storage capacity.
Gateways made the transmission more feasible as it queued up all the
data and divide it into small packets of data rather than sending it bulk.
Data transmitted through Gateway is divided into various useful and
small packets each having its individual significance and a role to play
while processing data.
Gateways made the data more secure if the modifications
to the gateway could be done which then could create more reliability
over smart devices.

77
Gateways optimize the data for search engines, applications, and
servers by implanting better readability to the content so that a machine
could understand and optimize data with ease.

Advantages of Gateways
Gateways provide a way for the feasibility of smart objects
without reducing the intelligence of objects as there is no need to
transfer the intelligence of objects on the server-side hence preserving
performance and accessibility
Gateways make the use of smart objects energy-efficient as
data transfers do not rely on the smart device and transfers between
devices and gateways are possible through low energy options like
BLE, ZigBee, or Bluetooth.
Gateways could add an extra layer of security to the data if
certain modifications added to them.

WSN to internet communication:

Wireless sensor networks (WSNs) are networks of small, low-power


devices that are used to monitor and collect data from the surrounding
environment. In order to transmit this data to the internet or other external
networks, a gateway is typically used to connect the WSN to these networks.

There are several different ways that a WSN can communicate with the internet,
depending on the specific needs of the network and the available infrastructure:

❏ Cellular: A WSN can use a cellular network to transmit data to the internet.
This can be done using a cellular modem connected to the gateway, or by using
specialized sensor nodes that include a built-in cellular modem.

78
❏ Wi-Fi: If the WSN is deployed in an area with Wi-Fi coverage, it can use a
Wi-Fi network to transmit data to the internet. This can be done using a Wi-Fi
modem connected to the gateway, or by using specialized sensor nodes with built-
in Wi-Fi.
❏ Satellite: In remote or hard-to-reach areas, a satellite network may be used to
transmit data from the WSN to the internet. This can be done using a satellite
modem connected to the gateway, or by using specialized sensor nodes with built-
in satellite modems.
❏ Long-range wireless: In some cases, it may be possible to use long-range
wireless technologies, such as LoRa or Sigfox, to transmit data from the WSN to
the internet. These technologies can be used to transmit data over long distances,
making them well-suited for remote or hard-to-reach areas.

Internet to WSN communication:


Wireless sensor networks (WSNs) are networks of small, low-power
devices that are used to monitor and collect data from the surrounding
environment. In order to transmit data from the internet to a WSN, a gateway is
typically used to connect the WSN to the internet. There are several different
ways that the internet can communicate with a WSN:

❏ Remote management: The gateway can be used to remotely manage and


control the sensor nodes in the WSN. For example, it can be used to update the
firmware on the nodes, or to configure their sensor parameters.

❏ Data collection: The gateway can be used to collect data from the sensor nodes
in the WSN and transmit it to the internet for analysis and processing. This can
be done using a variety of protocols, such as HTTP, MQTT, or CoAP.
❏ Command and control: The gateway can be used to transmit commands from
the internet to the WSN, allowing remote users to control the sensor nodes and
collect data on demand.

79
❏ Alerts and notifications: The gateway can be used to transmit alerts and
notifications from the WSN to the internet in real-time. For example, if a sensor
node detects a problem or anomaly, the gateway can transmit an alert to the
internet to notify the appropriate parties.

Single node architecture and network components:


• Building a wireless sensor network requires the constituting nodes to be
developed. These nodes have to meet the requirements from a given application.
They have to be small, cheap, energy efficient, equipped with the right sensors,
memory resources and sufficient communication facilities. The hardware
components of the functioning node are explained as follows.
Overview of Sensor Node
• A basic sensor node comprises five main components are shown in the Figure.
• Controller: To process all relevant data
• Memory: To store programs and intermediate data.
• Sensors and actuators: Actual interface to the physical world to observe or
control physical parameters of the environment.
• Communication: Device for sending and receiving information over a wireless
channel
• Power supply: Some form of batteries necessary to provide energy and some
form of recharging by obtaining energy from the environment as well.

Fig 8 / Basic Components of a Sensor Node


Controllers

80
• The controller is the core of a wireless sensor node.
• It is the Central Processing Unit (CPU) of the node
• It collects data from sensors, processes this data, receives data from other sensor
nodes, and decides on the actuator’s behavior.
• It has to execute various programs, ranging from time critical signal processing
and communication protocols to application programs.
• Such a variety of processing tasks can be performed on various controller
architectures, representing trade-offs between flexibility, performance, energy
efficiency, and costs.
• Microcontrollers are suitable for WSNs since they can reduce their power
consumption by going into sleep states where only parts of the controller are
active.
• One of the main differences to general-purpose systems is that microcontroller-
based systems do not include a memory management unit– for example, protected
or virtual memory is difficult.
• In a wireless sensor node, DSP can be used to process incoming data. But the
advantages of a DSP are not required in a WSN node and they are usually not
used.
• Another option for the controller is to use Field Programmable Gate Arrays
(FPGAs) or Application Specific Integrated Circuits (ASICs) instead of
microcontrollers.
• An FPGA can be reprogrammed in the field to adapt to a changing set of
requirements , but this can take time and energy.
• An ASIC is a specialized processor, designed for a given application such as
high-speed routers and switches.
• The typical trade-off here is loss of flexibility in return for a considerably better
energy efficiency and performance.
Memory
• There is a need for Random Access Memory (RAM) to store intermediate sensor
readings, packets from other nodes etc.
• RAM is fast, but it loses its contents if power supply is interrupted.
• The program code can be stored in Read-Only Memory (ROM) or in Electrically
Erasable Programmable Read Only Memory (EEPROM) or flash memory.
• Flash memory can also serve as intermediate storage of data when the power
supply goes off for some time.
• The long read and write access delays of flash memory should be taken into
account as well as the high required energy.
Communication Module
1. Choice of transmission medium

81
• The first choice is the transmission medium and usual choices include radio
frequencies, communication, and ultrasound. Optical
• Radio Frequency (RF)-based communication is vital requirement of most
WSN applications.
• It provides long range and high data rates, acceptable error rates at
reasonable energy expenditure, and does not require line of sight between
sender and receiver.
• For a practical wireless, RF-based system, the carrier frequency has to be
carefully chosen. The wireless sensor networks use communication
frequencies between about 433 MHz and 2.4 GHz.
2. Transceivers
• For actual communication, both a transmitter and a receiver are required in
a sensor node to convert a bit stream coming from a microcontroller and
convert them to and from radio waves. Such combined devices are called
transceivers.
• Usually, half-duplex operation is realized since transmitting and receiving
at the same time on a wireless medium is impractical in most cases. A range
of low-cost transceivers is available that incorporate all the circuitry required
for transmitting and receiving, modulation, demodulation, amplifiers, filters,
mixers etc..
3. Transceiver tasks and characteristics
• The following are the some of the important characteristics of a transceiver
which should be taken into account.
– Service to upper layer
– Power Consumption and Energy Efficiency
– Carrier Frequency & Multiple channels
– Transmission Power Control
– Data Rates
– Modulation
– Noise Figure
– Power Efficiency
– Frequency Stability etc
4. Transceiver States
• Transmit State: The transmit part of the transceiver is active and the
antenna radiates energy.
• Receive State: The receive part is active.
• Idle State: A transceiver that is ready to receive but not currently receiving
anything is said to be in an idle state.
• Sleep State: The significant parts of the transceiver are switched off. There
are transceivers offering several different sleep states.

82
Sensors & Actuators
• Sensors can be categorized into the following three categories
1. Passive Omni-directional sensors:
• They can measure a physical quantity at the point of the sensor node without
manipulating the environment by active probing. They obtain the energy
directly from the environment– energy is only needed to amplify their analog
signal. There is no notion of “direction in these measurements. Typical
examples include thermometer, light sensors, vibration, microphones,
humidity, chemical sensors etc.
2. Passive narrow-beam sensors: They are passive but have a well-defined
notion of direction of measurement. A typical example is a camera, which can
“take measurements” in a given direction, but has to be rotated if need be.
3. Active sensors: They probe the environment, for example, a sonar or radar
sensor or some types of seismic sensors, which generate shock waves by
small explosions.
Power Supply of Sensor Nodes
1. Traditional batteries
• The power source of a sensor node is a battery, either non-rechargeable
(primary batteries) or, if an energy scavenging device is present on the
node, also rechargeable (secondary batteries).
• In some form or other, batteries are electro-chemical stores for energy–
the chemicals being the main determining factor of battery technology.
2. Energy scavenging
• Some of the unconventional energy sources like fuel cells, micro heat
engines and radioactivity– convert energy from stored secondary form
into electricity in a easy way than a normal battery would do.
• The entire energy supply is stored on the node itself once the fuel supply
is exhausted, the node fails. • The energy from a node’s environment must
be tapped into and made available to the node– energy scavenging should
take place.
3. Photo-voltaics
The solar cells can be used to power sensor nodes. The available power
depends on whether nodes are used outdoors or indoors, and on time of
day. The resulting power ranges between 10 mW/cm2 indoors and 15
mW/cm2 outdoors. Single cells achieve a fairly stable output voltage of
about 0.6 V. Hence, solar cells are used to recharge secondary batteries.
4. Temperature gradients
Differences in temperature can be directly converted to electrical energy.
Theoretically, even small difference for example, 5 K can produce

83
considerable power, but practical devices fall very short of theoretical
upper limits.
[Link]
Walls or windows in buildings are resonating with cars or trucks passing
in the streets, machinery often has low- frequency vibrations, ventilations
also cause it, and so on. The available energy depends on amplitude and
frequency of the vibration and ranges between 0.1 mW/cm3 and 10, 000
mW/cm3 for some extreme cases.
Operating Systems & Execution Environment:

Embedded Operating Systems


• The traditional tasks of an operating system are controlling and protecting the
access to resources, managing their allocation to users and support for concurrent
execution of processes.
• These tasks are only partially required in an embedded system and these systems
do not have required resources to support a full-blown operating system.
• In particular, the need for energy-efficient execution requires support for energy
management or Dynamic Voltage Scaling (DVS) techniques.
• Also, external components like sensors, the radio modem, or timers should be
handled easily and efficiently.
• All this requires an appropriate programming model to structure a protocol stack
and explicit support for energy management.
Programming Paradigms
1. Concurrent Programming
• The support for concurrent execution is crucial for WSN nodes to handle
data coming from arbitrary sources like multiple sensors or the radio
transceiver at arbitrary points in time.
• For example, a system can poll a sensor to decide whether data is
available and process the data, then poll the transceiver to check whether a
packet is available and then immediately process the packet and so on.
2. Process Based Concurrency
• Most general-purpose operating systems support concurrent execution of
multiple processes on a single CPU. Hence such a process-based approach
can be used to support concurrency in a sensor node as illustrated in (b) of
Figure .
• Mapping such an execution model of concurrent processes to a sensor
node shows that there are some granularity mismatches.

84
• This problem is severe for smaller tasks to be executed when compared
to overhead.

3. Event-based Programming
• The system waits for any event to happen, where an event can be the
availability of data from a sensor, or arrival of a packet.
• Such an event is then handled by a short sequence of instructions that
stores the occurrence of event and necessary information.
• This is called event based programming model as shown in Figure .
• This programming model distinguishes between two different
“contexts”:- time-critical event handlers (execution cannot be interrupted)
and for the processing of normal code (only triggered by the event
handlers).

85
4. Interfaces to Operating System
• In WSNs, the interfaces should be accessible from protocol
implementations.
• This interface is closely tied with the structure of protocol stacks.
• For example Application Programming Interface (API) comprises, a
“functional interface, object abstractions, and detailed behavioral
semantics”.
• Abstractions are wireless links, nodes and so on.
• The possible functions include state inquiry, manipulation, transmitting
of data, access to hardware and setting of policies.
Operating System & Protocols Stack
• In communication protocol structuring, the individual protocols are
stacked on top of each other, each layer only using functions of the layer
directly below.
• This layered approach has multiple benefits in keeping the entire protocol
stack manageable.
• As an example, consider the use of information about the strength of the
signal received from a communication partner.
• This physical layer information can be used to assist in networking
protocols to decide about routing changes.
• Hence, one single source of information can be used by many other
protocols not directly associated with the source of this information.
• Such cross-layer information exchange is one way to loosen the strict
confinements of the layered approach.
Dynamic Energy & Power Management
1. Probabilistic State Transition Policies

86
• These policies regulate the transition between various sleep states.
• They start out by considering sensors randomly distributed over a
fixed area and events arrive with certain temporal distributions and
spatial distributions.
• This allows them to compute probabilities for the time to the next
event, once an event has been processed.

2. Controlling Dynamic Voltage Scaling


• For example, only a single task has to be run in an operating system.
Hence, a clever scheduler is required to decide exact clock rate to use
in that situation to meet all deadlines. This can require feedback from
applications for example, video playback in reference.
3. Trading off fidelity against energy consumption
•There are certain tasks that can be computed with a higher or lower
level of accuracy. The fidelity achieved by such tasks is a candidate for
trading off against other resources. In a WSN, the natural trade-off is
against energy required to compute a task.

Introduction to TinyOS & NesC

Introduction
• The event-based programming model is the only feasible way to support the
concurrency required for sensor node software with simple hardware provided by
these nodes.
• In addition, modularity should be supported to easily exchange one state
machine against another.
• The operating system TinyOS along with the programming language nesC
addresses these challenges as follows.
Events & Commands
• TinyOS supports modularity and event-based programming by the concept of
components.
• A component contains related functionality, for example, for handling a radio
interface.
• Such a component comprises the required state information in a frame, program
code for normal tasks and handlers for events & commands.
• Both events and commands are exchanged between different components.
• Components are arranged from low-level components close to the hardware to
high-level components making up the actual application.

87
• Events originate in the hardware and pass upward from low-level to high-level
components whereas commands are passed from high-level to low-level
components.
Event Handlers
• Figure shows a timer component. It understands three commands (“init”,
“start”, and “stop”) and can handle one event (“fire”) from another component.
• It issues “setRate” commands to this component and can emit a “fired” event.
• In event-based paradigm, both command and event handlers must run to
conclusion and supposed to perform very simple triggering duties.
• Commands must not block or wait for an indeterminate amount of time.
• Similarly, an event handler only leaves information in its component’s frame
and arranges for a task to be executed later.
• Theactual computational work is done in the tasks.
• In TinyOS, they have to run to completion, but can be interrupted by handlers.

Fig 12 / Example Timer Component


FIFO Scheduler
• There are two advantages- there is no need for stack management and tasks are
atomic with respect to each other.
• The arbitration between tasks can be triggered by several events and are ready
to execute.
• This is done by a simple First In First Out (FIFO) scheduler, which shuts the
node down when there is no task executing or waiting.

88
Split Phase Programming
• The first phase is the sending of the command and the second is explicit
information about the outcome of the operation, delivered by a separate event.
• This split-phase programming approach requires for each command a matching
event that enables concurrency.
• When using split-phase programming, a large number of commands and events
are combined in a large program. Hence, an abstraction is required to organize
them.
• The set of commands that a component understands and the set of events that a
component may emit are its interface to the components of a hierarchically higher
layer.
• Therefore, structuring commands and events forms an interface between two
components.

NesC Language
• The nesC language allows a programmer to define interface types that define
commands and events belong together.
• This allows split-phase programming style to put commands and their
corresponding completion events into the same interface.
• Components then provide certain interfaces to their users and in turn use other
interfaces from underlying components.
• Figure shows the Timer component reorganized into using a clock interface and
providing two interfaces StdCtrl and Timer.

Fig Timer Component using Interfaces


Timer Component

89
• The Timer Component is defined as a primitive component containing handlers
and tasks.
• Such primitive components or modules can be combined into larger
configurations by simply “wiring” appropriate interfaces together.
• For this wiring only components that have the correct interface types can be
plugged together.
• Figure shows how the Timer Component and an additional component HW
Clock can be wired together to form a new component Complete Timer.

Fig Larger Configuration

90

You might also like