Wireless sensor networks use large numbers of small, low-cost sensors that communicate wirelessly to monitor conditions like temperature, sound, pollution levels, pressure, etc. Sensors collect data and pass it to a base station, which can be accessed through the internet. Wireless sensor networks can be used for applications like environmental monitoring, smart grids, healthcare, agriculture, and more. They face challenges related to power efficiency, security, scalability and operating in different environments.
1. MODULE 4 : Wireless Sensor
Network
CO2. Identify the different technology.
CO3. Apply IOT to different applications.
CO4. Analysis and evaluate protocols used in IOT.
2. CONTENTS
• History and context
• Node
• Connecting nodes
• Networking nodes
• Securing communication
• Standards and Fora.
• Networking and the Internet -IP Addressing
• Protocols
– MQTT
– CoAP
– REST Transferring data
3. INTRODUCTION
• Wireless Sensor Network (WSN) is an infrastructure-
less wireless network that is deployed in a large
number of wireless sensors in an ad-hoc manner that is
used to monitor the system, physical or environmental
conditions.
• Sensor nodes are used in WSN with the onboard
processor that manages and monitors the environment
in a particular area.
• They are connected to the Base Station which acts as a
processing unit in the WSN System.
• Base Station in a WSN System is connected through the
Internet to share data.
4. INTRODUCTION
• WSN can be used for processing, analysis,
storage, and mining of the data.
5. Applications of WSN
• Internet of Things (IOT)
• Surveillance and Monitoring for security, threat
detection
• Environmental temperature, humidity, and air
pressure
• Noise Level of the surrounding
• Medical applications like patient monitoring
• Agriculture
• Landslide Detection
6. Challenges of WSN
• Quality of Service
• Security Issue
• Energy Efficiency
• Network Throughput
• Performance
• Ability to cope with node failure
• Cross layer optimization
• Scalability to large scale of deployment
7. Components of WSN
• Sensors:
Sensors in WSN are used to capture the environmental variables
and which is used for data acquisition. Sensor signals are converted
into electrical signals.
• Radio Nodes:
It is used to receive the data produced by the Sensors and sends it
to the WLAN access point. It consists of a microcontroller,
transceiver, external memory, and power source.
• WLAN Access Point:
It receives the data which is sent by the Radio nodes wirelessly,
generally through the internet.
• Evaluation Software:
The data received by the WLAN Access Point is processed by a
software called as Evaluation Software for presenting the report to
the users for further processing of the data which can be used for
processing, analysis, storage, and mining of the data.
9. Wireless Sensor Network Model
• A wireless sensor network consists of thousands of
low-cost nodes which could either have a fixed location
or be randomly deployed to monitor the environment.
• Sensors usually communicate with each other using a
multi hop approach.
• A base station links the sensor network to another
network (like a gateway) to disseminate the data
sensed for further processing. Base stations have
enhanced capabilities over simple sensor nodes since
they must do complex data processing.
10. Wireless Sensor Network Model
• One of the biggest problems of sensor networks is power
consumption, which is greatly affected by communication
between nodes. To solve this, aggregation points are
introduced in the network. This reduces the total number
of messages exchanged between nodes and saves some
energy.
• Aggregation points are regular nodes that receive data from
neighboring nodes, perform some kind of processing, and
then forward the filtered data to the next hop.
• Sensor nodes are organized into clusters, each cluster
having a “cluster head” as the leader. The communication
within a cluster must travel through the cluster head, which
is then forwarded to a neighboring cluster head until it
reaches its destination, the base station.
11. Wireless Sensor Network Model
• The design of the sensor network as described by Figure is influenced by following
factors:
• Fault Tolerance- Due to the failure of sensor nodes.
• Scalability- Due to increase in the number of sensor nodes.
• Production Costs - Due to large number of sensor nodes, the cost of system
network increases.
• Operating Environment- Sensor nodes are densely deployed either very close to or
directly inside the phenomenon to be observed.
• Sensor Network Topology- Deploying a high number of nodes densely requires
careful handling of topological maintenance.
• Hardware Constraints- A sensor node is made up of four basic components as a
sensing unit, a processing unit, a transceiver unit, and a power unit which
generates Hardware Constraints.
• Transmission Media- To enable the global operation of sensor networks, the
chosen transmission medium must be available worldwide.
• Power Consumption- The energy in data communication involves both data
transmission and reception. The wireless sensor node can only be equipped with a
limited power source. So need to increase battery lifetime .
12. Wireless Sensor Network Model
• A wireless sensor network contains a large number of
tiny sensor nodes that are densely deployed either
inside the phenomenon to be sensed or very close to
it. Sensor nodes consist of sensing, data processing,
and communicating components.
• The position of sensor nodes need not be engineered
or predetermined. This allows random deployment in
inaccessible terrain or disaster relief operations. This
also means that sensor network protocols and
algorithms must possess self-organizing capabilities.
13. Wireless Sensor Network Model
• Another unique feature of sensor networks is the
cooperative effort of sensor nodes. Sensor nodes are
fitted with an inboard processor. Instead of sending the
raw data to the nodes responsible for the fusion, they
use their processing abilities to locally carry out simple
computations and transmit only required and partially
processed data.
• Since large numbers of sensor nodes are densely
deployed, neighbor nodes may be very close to each
other. Hence, multihop communication in wireless
sensor networks is expected to consume less power
than traditional single hop communication.
14. Wireless Sensor Network Model
• Furthermore, the transmission power level can be kept low,
which is highly desirable in covert operations. Multihop
communication can effectively overcome some of the
signal propagation effects experienced in long-distance
wireless communication.
• One of the most important constraints on sensor nodes is
the low power consumption requirement. Sensor nodes
carry limited, generally irreplaceable power sources.
Therefore, while traditional networks aim to achieve high
quality of service (QoS) provisions, wireless sensor network
protocols must focus primarily on power conservation.
They must have built-in trade-off mechanisms that give the
end-user the option of prolonging network lifetime at the
cost of lower throughput or higher transmission delay.
15. Network Nodes
• Network nodes can have actual or logical
communication with all devices;
• such a communication defines a topology
according to the application.
• For instance, there can be a WSN with both types
of topologies being the same (mesh, star, etc).
• All WSN organization techniques can be classified
into one of the discussed groups:
1. Centralized
2. Distributed.
16. Network Nodes
• Centralized:
– Centralized formation techniques are suitable for networks
in which the
– processing power capacity relies mostly on a unique
device.
– In such cases, this device is responsible for the processing,
coordination, and management of the sensed information
activities. It also forwards this data to a sink node
• Distributed:
– In Distributed formation techniques, the information is
managed by each node and decisions are locally taken and
limited to its neighborhood
– (single-hop neighbours).
17. Centralized Wireless sensor network
• Centralized networks take directions from a
unique device.
• This central node is responsible for providing
network operation services
• such as node localization, event detection, and
traffic routing.
• A suitable logical topology for this approach is a
star.
• The centralized networks can be classified
according to how the information is processed.
18. Centralized Wireless sensor network
These groups include the following:
(i)Single Sink:
– The objective of the formation strategy is to reduce the forwarding time and
route the information towards a unique sink.
– The main drawback of single sink systems is the lack of redundancy.
(ii)Multisink.
– Multiple sinks are employed for scenarios in which the previous tasks are
distributed to several nodes.
– This is done for a number of reasons such as network density, coverage area,
redundancy, distribution of traffic flows, network life span, and possible
energy consumption.
(iii)Multiple Task Devices.
– Recent research works suggest the use of auxiliary network devices; these
devices can be responsible for doing a specific activity inside the network such
as knowing the complete environment to define a route, control of nodes
movements, and definition of a target node, to improve the overall WSN
application performance.
19. Distributed Techniques for Wireless
sensor networks
• Distributed techniques are used when the
application has to preserve some properties,
namely, energy saving, the number of
connections, memory, and efficiency, among
others, or when the information processing is
inefficient in a centralized way.
20. Distributed Techniques for Wireless
sensor networks
The distributed techniques have some special characteristics:
(i)Independence.
– It is present when a user is the only one who chooses where the
data will be stored and when the data can be modified or
deleted.
– The information saved does not have any information
dependency with other devices.
– The important decisions are based on the device data.
– This feature offers most of the time information support by an
own server or one host provided by a supporting company.
(ii)Integrity with respect to Other Services:
– Being present in this type of distributed techniques does not
mean to give up to the integrity offered by the centralized
models.
21. Distributed Techniques for Wireless
sensor networks
(iii)Scalability:
• According to the application, scalability allows
adding more nodes to the network without
changes on the network performance, which
means that this does not affect the rest of the
network.
(iv)Reduced Information Management:
• Networks are based on the local information
knowledge, namely, neighbors.
22. Wireless Sensor Network Architecture
• The most common WSN architecture follows the OSI
architecture Model.
• The architecture of the WSN includes five layers and
three cross layers.
• Mostly in sensor n/w we require five layers, namely
application, transport, n/w, data link & physical layer.
• The three cross planes are namely power
management, mobility management, and task
management.
• These layers of the WSN are used to accomplish the
n/w and make the sensors work together in order to
raise the complete efficiency of the network.
24. Wireless Sensor Network Architecture
Application Layer
• The application layer is liable for traffic
management and offers software for
numerous applications that convert the data
in a clear form to find positive information.
• Sensor networks arranged in numerous
applications in different fields such as
agricultural, military, environment, medical,
etc.
25. Wireless Sensor Network Architecture
Transport Layer
• The function of the transport layer is to deliver congestion
avoidance and reliability where a lot of protocols intended to offer
this function are either practical on the upstream.
• These protocols use dissimilar mechanisms for loss recognition and
loss recovery. The transport layer is exactly needed when a system
is planned to contact other networks.
• Providing a reliable loss recovery is more energy efficient and that is
one of the main reasons why TCP is not fit for WSN.
• In general, Transport layers can be separated into Packet driven,
Event driven.
• There are some popular protocols in the transport layer namely
STCP (Sensor Transmission Control Protocol), PORT (Price-Oriented
Reliable Transport Protocol and PSFQ (pump slow fetch quick).
26. Wireless Sensor Network Architecture
Network Layer
• The main function of the network layer is routing, it has a
lot of tasks based on the application, but actually, the main
tasks are in the power conserving, partial memory, buffers,
and sensor don’t have a universal ID and have to be self-
organized.
• The simple idea of the routing protocol is to explain a
reliable lane and redundant lanes, according to a convinced
scale called metric, which varies from protocol to protocol.
• There are a lot of existing protocols for this network layer,
they can be separate into; flat routing and hierarchal
routing or can be separated into time driven, query-driven
& event driven.
27. Wireless Sensor Network Architecture
Data Link Layer
• The data link layer is liable for multiplexing
data frame detection, data streams, MAC, &
error control, confirm the reliability of point–
point (or) point– multipoint.
28. Wireless Sensor Network Architecture
Physical Layer
• The physical layer provides an edge for transferring a
stream of bits above physical medium.
• This layer is responsible for the selection of frequency,
generation of a carrier frequency, signal detection,
Modulation & data encryption.
• IEEE 802.15.4 is suggested as typical for low rate
particular areas & wireless sensor network with low
cost, power consumption, density, the range of
communication to improve the battery life.
• CSMA/CA is used to support star & peer to peer
topology. There are several versions of IEEE 802.15.4.V.
29. Types of WSNs (Wireless Sensor
Networks)
• Depending on the environment, the types of
networks are decided so that those can be
deployed underwater, underground, on land, and
so on.
• Different types of WSNs include:
– 1. Terrestrial WSNs
– 2. Underground WSNs
– 3. Underwater WSNs
– 4. Multimedia WSNs
– 5. Mobile WSNs
30. Terrestrial WSNs
• Terrestrial WSNs are capable of communicating base
stations efficiently, and consist of hundreds to thousands of
wireless sensor nodes deployed either in unstructured (ad
hoc) or structured (Preplanned) manner.
• In an unstructured mode, the sensor nodes are randomly
distributed within the target area that is 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; however, the
battery is 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.
31. Underground WSNs
• 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 a number of sensor nodes that are
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 a limited battery power
are difficult to recharge.
• In addition to this, the underground environment makes wireless
communication a challenge due to high level of attenuation and
signal loss.
33. Under Water WSNs
• More than 70% of the earth is occupied with
water. These networks consist of a number of
sensor nodes and vehicles deployed under
water.
• 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.
35. Under Water WSNs
• Under water WSNs are equipped with a
limited battery that cannot be recharged or
replaced. The issue of energy conservation for
under water WSNs involves the development
of underwater communication and
networking techniques.
36. Multimedia WSNs
• 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.
38. Multimedia WSNs
• 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 contents to be
delivered properly and easily.
39. Mobile WSNs
• 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 have the ability to compute
sense and communicate.
• The mobile wireless sensor networks are much
more versatile than the static sensor networks.
• The advantages of MWSN over the static wireless
sensor networks include better and improved
coverage, better energy efficiency, superior
channel capacity, and so on.
41. MQTT
• MQTT is simply the name of the protocol. The longer
answer is that the former acronym stood for MQ
Telemetry Transport. “MQ” refers to the MQ Series, a
product IBM developed to support MQ telemetry
transport.
• It is designed as a lightweight messaging protocol that
uses publish/subscribe operations to exchange data
between clients and the server.
• Furthermore, its small size, low power usage,
minimized data packets and ease of implementation
make the protocol ideal of the “machine-to-machine”
or “Internet of Things” world.
43. How MQTT works
• Like any other internet protocol, MQTT is based on
clients and a server.
• The server is the one who is responsible for handling
the client’s requests of receiving or sending data
between each other.
• MQTT server is called a broker and the clients are
simply the connected devices.
• So:
– When a device (a client) wants to send data to the broker,
we call this operation a “publish”.
– When a device (a client) wants to receive data from the
broker, we call this operation a “subscribe”.
45. How MQTT works
In addition, These clients are publishing and subscribing to topics. So,
the broker here is the one that handles the publishing/subscribing
actions to the target topics.
Example:
Let’s say there is a device that has a temperature sensor. Certainly, it
wants to send
his readings to the broker. On the other side, a phone/desktop
application wants to receive this temperature value. Therefore, 2
things will happen:
– The device defines the topic it wants to publish on, ex: “temp”. Then, it
publishes the message “temperature value”.
– The phone/desktop application subscribes to the topic “temp”. Then,
it receives the message that the device has published, which is the
temperature value.
– Again, the broker role here is to take the message “temperature value”
and deliver it to phone/desktop application.
47. MQTT Components
That takes us to the MQTT components, which are 5 as
follows:
1. Broker, which is the server that handles the data
transmission between the clients.
2. A topic, which is the place a device want to put or retrieve
a message to/from.
3. The message, which is the data that a device receives
“when subscribing” from a topic or send “when
publishing” to a topic.
4. Publish, is the process a device does to send its message
to the broker.
5. Subscribe, where a device does to retrieve a message
from the broker.
49. COAP-Constrained Application
Protocol
• The CoAP protocol is specified in RFC 7252.
• It is a web transfer protocol which is used in
constrained nodes or networks such as WSN, IoT,
M2M etc.
• Hence the name Constrained Application
Protocol.
• The protocol is targetted for Internet of Things
(IoT) devices having less memory and less power
specifications.
50. COAP- Constrained Application
Protocol
• CoAP is an IoT protocol. CoAP stands for Constrained
Application Protocol, and it is defined in RFC 7252.
• CoAP is a simple protocol with low overhead specifically
designed for constrained devices (such as microcontrollers)
and constrained networks.
• This protocol is used in M2M data exchange and is very
similar to HTTP.
• The main features of CoAP protocols are:
– Web protocol used in M2M with constrained requirements
– Asynchronous message exchange
– Low overhead and very simple to parse
– URI and content-type support
– Proxy and caching capabilities
52. CoAP Architecture
• As shown it extends normal HTTP clients to
clients having resource constraints. These
clients are known as CoAP clients.
• Proxy device bridges gap between constained
environment and typical internet environment
based on HTTP protocols.
• Same server takes care of both HTTP and
CoAP protocol messages.
53. COAP- Constrained Application
Protocol
• As you may notice, some features are very
similar to HTTP even if CoAP must not be
considered a compressed HTTP protocol
because CoAP is specifically designed for IoT
and in more details for M2M so it is very
optimized for this task.
• From the abstraction protocol layer, CoAP can
be represented as:
55. COAP- Constrained Application
Protocol
As you can see there are two different layers
that make CoAp protocol:
– 1. Messages
– 2. Request/Response.
• The Messages layer deals with UDP and with
asynchronous messages.
• The Request/Response layer manages
request/response interaction based on
request/response messages.
57. COAP- Constrained Application
Protocol
• Before going deeper into the CoAp protocol, structure
is useful to define some terms that we will use later:
• Endpoint: An entity that participates in the CoAP
protocol. Usually, an Endpoint is identified with a host
• Sender: The entity that sends a message
• Recipient: The destination of a message
• Client: The entity that sends a request and the
destination of the response
• Server: The entity that receives a request from a client
and sends back a response to the client
58. CoAP Messages Model
• This is the lowest layer of CoAP. This layer
deals with UDP exchanging messages between
endpoints.
• Each CoAP message has a unique ID; this is
useful to detect message duplicates. A CoAP
message is built by these parts:
– A binary header
– A compact options
– Payload
59. CoAP Messages Model
• The CoAP protocol uses two kinds of messages:
– Confirmable message
– Non-confirmable message
• A confirmable message is a reliable message. When exchanging
messages between two endpoints, these messages can be
reliable.
• In CoAP, a reliable message is obtained using a Confirmable
message (CON).
• Using this kind of message, the client can be sure that the
message will arrive at the server.
• A Confirmable message is sent again and again until the other
party sends an acknowledge message (ACK).
• The ACK message contains the same ID of the confirmable
message (CON).
61. Confirmable message
• If the server has troubles managing the
incoming request, it can send back a Rest
message (RST) instead of the Acknowledge
message (ACK):
62. Non-confirmable (NON) messages
• The other message category is the Non-confirmable
(NON) messages.
• These are messages that don’t require an Acknowledge
by the server.
• They are unreliable messages or in other words
messages that do not contain critical information that
• must be delivered to the server.
• To this category belongs messages that contain values
read from sensors.
• Even if these messages are unreliable, they have a
unique ID.
64. CoAP Request/Response Model
• The CoAP Request/Response is the second layer in the
CoAP abstraction layer.
• The request is sent using a Confirmable (CON) or Non-
Confirmable (NON) message.
• There are several scenarios depending on if the server
can answer immediately to the client request or the
answer if not available.
• If the server can answer immediately to the client
request, then if the request is carried using a
Confirmable message (CON), the server sends back to
the client an Acknowledge message containing the
response or the error code:
65.
66. • As you can notice in the CoAP message, there is a
Token. The Token is different from the Message-ID and
it is used to match the request and the response.
• If the server can’t answer to the request coming from
the client immediately, then it sends an Acknowledge
message with an empty response.
• As soon as the response is available, then the server
sends a new Confirmable message to the client
containing the response.
• At this point, the client sends back an Acknowledge
message:
67.
68. • If the request coming from the client is carried
using a NON-confirmable message, then the
server answer using a NON-confirmable
message.
69. CoAp Message Format
• The constrained application protocol is the
meat for constrained environments, and for
this reason, it uses compact messages.
• To avoid fragmentation, a message occupies
the data section of a UDP datagram.
• A message is made by several parts:
70. • Ver: It is a 2 bit unsigned integer indicating the version
• T: it is a 2 bit unsigned integer indicating the message
type: 0 confirmable, 1 non-confirmable
• TKL: Token Length is the token 4 bit length
• Code: It is the code response (8 bit length)
• Message ID: It is the message ID expressed with 16 bit
71. CoAP Protocol Message Exchanges
• There are two modes in which CoAP protocol
messages get exchanged between CoAP client
and CoAP server viz. without separate
response and with separate response.
72. CoAP Protocol Message Exchanges
• With separate response, server notifies client
about receipt of the request message. This will
increase processing time but help in avoiding
unnecessary retransmissions.
• CoAP IoT is unreliable protocol due to use of UDP.
Hence CoAP messages reach unordered or will
get lost when they arrive at destination.
• To make CoAP as reliable protocol, stop and wait
with exponential backoff retransmission feature is
incorporated in it. Duplicate detection is also
introduced.
73.
74. RESTFULL Web services
• Representational State Transfer (REST), or
RESTful, web services provide interoperability
between computer systems on the Internet.
• REST-compliant web services allow the
requesting systems to access and manipulate
textual representations of web resources by using
a uniform and predefined set of stateless
operations.
• Other kinds of web services, such as WSDL and
SOAP, expose their own arbitrary sets of
operations.
75. RESTFULL Web services
• "Web resources" were first defined on the World Wide
Web as documents or files identified by their URLs.
• In a RESTful web service, requests made to a resource's
URI will elicit a response that may be in XML, HTML,
JSON, or some other format.
• The response may confirm that some alteration has
been made to the stored resource, and the response
may provide hypertext links to other related resources
or collections of resources.
• When HTTP is used, as is most common, the
operations available are GET, POST, PUT, DELETE, and
other predefined CRUD HTTP methods.
76. RESTFULL Web services
• By using a stateless protocol and standard
operations, REST systems aim for fast
performance, reliability, and the ability to
grow, by re-using components that can be
managed and updated without affecting the
system as a whole, even while it is running.