Iot Chapter 1-Final
Iot Chapter 1-Final
.
INTRODUCT
ION TO INTERNET OF THINGS
Introduction
Internet of things (IOT) comprises things that have unique identities and are connected to
the internet.
IOT allows these things to communicate and exchange data while executing meaningful
applications towards a common user or machine goal.
Data itself does not have a meaning until it is contextualized processed into useful
information.
Applications on IOT networks extract and create information from lower level data by
filtering, processing, categorizing, condensing and contextualizing the data.
This information obtained is then organized and structured to infer knowledge about the
system and/or its users, its environment, and its operations and progress towards its
objectives, allowing a smarter performance, as shown in fig 1.1.
For example, consider a series of raw sensor measurements((72,45);(84,56)) generated
by a weather monitoring station, which by themselves do not have any meaning are
context.
Page 1
Introduction to Internet of Things
To give meaning to the data, a context is added, which in this example can be that each
tuple in data represent the temperature and humidity measured every minute. With this
context added we know the meaning (or information ) of the measured data tuples.
further information is obtained by categorizing, condensing or processing this data. For
example, the average temperature and humidity readings for last 5 minutes is obtained by
averaging the last 5 data tuples.
The next step is to organize the information and understand the relationship between
pieces of information to infer knowledge which can be put into action.
For example, an alert is raised if the average temperature in last 5 minutes exceeds 120F,
and this alert may condition on the user’s geographical position as well.
Applications of IOT span a wide range of domains including homes, cities, environment,
energy systems, retail, logistics, industry, agriculture and health as listed in Figure 1.2.
Page 2
Introduction to Internet of Things
Dynamic and self-adapting:- IOT devices and systems may have the capability to
dynamically adapt with the changing contexts and take actions based on their operating
conditions, user’s context, or sensed environment.
Self-configuring:- IOT devices may have self configuring capability, allowing a large
number of devices to work together to provide certain functionality (such as weather
monitoring). These devices have the ability configure themselves (in association with the
IOT infrastructure), setup the networking, and fetch latest software upgrades with
minimal manual or user intervention.
Interoperable communication protocols:- IOT devices may support a number of
interoperable communication protocol and can communicate with other devices and also
with the infrastructure.
Unique identity: Each IOT device as a unique identity and a unique identifier (such as an
IP address or URI).IOT systems may have intelligent interface which adopt based on the
context, allow communicating with users and the environmental contexts. IOT devices
interface allow users to query the devices, monitor their status, and control them
remotely, in association with the control, configuration and management infrastructure.
Integrated into information network:-IOT devices are usually integrated into the
information network that allows them to communicate and exchange data with other
devices and systems.IOT devices can be dynamically discovered in the network, by other
devices and/or the network, and have the capability to describe to other devices or user
application .
Things of IOT
The “Things” in IOT usually refers to IOT devices which have unique identities and can
perform remote sensing, actuating and monitoring capabilities.
Page 3
Introduction to Internet of Things
IOT devices can exchange data with other connected devices and applications (directly or
indirectly), or collect data from other devices and process the data either locally or send
the data to centralized servers or cloud-based application back-ends for processing the
data, or perform some tasks locally and other tasks within the IOT infrastructure.
An IOT devices may consist of several interfaces for connections to other devices, both wired
and wireless. This include
4.Audio/video interfaces
An IOT device can collect various types of data from the on-board or attached sensors,
such as temperature humidity ,light intensity.
The sensed data can be communicated either to other devices or cloud-based
servers/storage. IOT devices can be connected to actuators that allow them to interact
with other physical entities in the vicinity of the devices .
For example , a relay switch connected to an IOT devices can turn an appliance on/off
based on the commands sent to the IOT device over the internet .
IOT Protocols
Link layer:Link layer protocols determine how the data is physically sent over the network’s
physical layer or medium (e.g. copper wire, coaxial cable, or a radio wave).
Some link layer protocols which are relevant in the context of IOT:
802.3 –Ethernet : IEEE 802.3 is a collection of wired Ethernet standards for the link
layer.
The "Things" in IoT usually refers to IoT devices which have unique identities and can perform remote sensing,
actuating and monitoring capabilities. • IoT devices can: • Exchange data with other connected devices and
applications (directly or indirectly), or • Collect data from other devices and process the data locally or • Send
the data to centralized servers or cloud-based application back-ends for processing the data, or • Perform some
Page 4
Introduction to Internet of Things
tasks locally and other tasks within the IoT infrastructure, based on temporal and space constraints
The standards provide data rates from 10mb/sec to 40gb/sec and higher
Page 5
Introduction to Internet of Things
Page 6
Introduction to Internet of Things
Network/internet layer:
The network layers are responsible for sending of IP datagram’s from the source network to
the destination network. This layer performs the host addressing and packet routing. The
datagram’s contain the source and destination addresses which are used to route them from the
source to destination across multiple networks. Host identification is done using hierarchical IP
addressing schemes such as IPv4 or IPv6.
IPv4: Internet protocol version 4(IPv4) is the most deployed internet protocol that is
used to identify the devices on a network using a hierarchical addressing scheme. IPv4
uses a 32-bit address scheme that allows total of 232 or 4,294,967,296 addresses.
Page 7
Introduction to Internet of Things
IPv6: Internet protocol version 6(Ipv6) is the newest version of internet protocol and
successor to IPv6 uses 128-bit address scheme that allows total of 2 128 or 3.4*1038
addresses.
6LoWPAN (IPv6 over low power wireless personal area networks) brings IP protocol to
the low-power devices which have limited processing capability. 6LoWPAN operates in
the 2.4 GHZ frequency range and provides data transfer rates of 250 kb/s.
Transport layer
The transport layer protocols provide end-to-end message transfer capability independent of the
underlying network.
The transport layer provides functions such as error control, segmentation, flow control and
congestion control.
TCP: Transmission control protocol (TCP) is the most widely used transport layer
protocol ,that is used by web browsers ,email programs and file transfer.
TCP is a connection oriented and state full protocol .while IP protocol deals with
sending packets, TCP ensures reliable transmission of packets in-order.
TCP also provides error detection capability so that duplicate packets can be
discarded and lost packets are retransmitted. The flow control capability of TCP ensures
that rate at which the sender sends the data is not too high for the receiver to process.
The congestion control capability of TCP helps in avoiding network congestion
and congestion collapse which can lead to degradation of network performance.
UDP: UDP is a connectionless protocol. UDP is useful for time-sensitive applications
that have very small data units to exchange and do not want the overhead of connection
setup. UDP is a transaction oriented and stateless protocol. UDP does not provide
guaranteed delivery, order of messages and duplicate elimination.
Application Layer
Application layer protocols defines how the applications interface with lower layer
protocols to send the data over the network. Application layer protocols enable process-
to-process connections using ports.
HTTP: Hypertext transfer protocol l(HTTP)is the application layer protocol that
forms the foundation of the world wide web(www). HTTP includes commands such
as GET, PUT , POST , DELETE, HEAD, TRACE, OPTIONS, etc. The protocol
follows a request-response model where a client sends a requests to a server using the
Page 8
Introduction to Internet of Things
An IOT system comprises of a number a functional blocks that provide the system the
capabilities for identification, sensing, actuation, communication and management as shown in
figure 1.6. These functional blocks are describe as follows.
Page 9
Introduction to Internet of Things
Device: An IOT system comprises of devices that provide sensing actuation, monitoring
and control functions.
Communication: Communication block handles the communication for the IOT system.
Services: An IOT system uses various types of IOT services such as services for device
monitoring, device control services, data publishing services and service for device
discovery.
Management: Management functional block provide various functions to govern the IOT
system.
Security: Security functional block secure the IOT system and by providing functions
such as authentication, authorization, message and content integrity, and data security.
Application: IOT applications provide an interface that the users can use to control and
monitor various aspects of the IOT systems. Application also allow users to view the
system status and view or analyze the processes data.
Page 10
Introduction to Internet of Things
prepares the response, and then sends the response to the client. Request-response model
is a stateless communication model and each request-response pair is independent of
others. Fig 1.7 shows the client and server instructions in the request-response model.
Page 11
Introduction to Internet of Things
Push-Pull: Push-Pull is a communication model in which the data producers push the
data queues and the consumers pull the data from the queues. Producers do not need to be
aware of the consumers. Queues help in decoupling the messaging between the producers
and consumers. Queues also act as a buffer which helps in situations when there is a
mismatch between the rate at which the producers push data and the rate at which the
consumers pull data. Figure 1.9 shows the publisher-queue-consumer interaction in the
push-pull model.
Exclusive Pair: Exclusive pair is a bi-directional, fully duplex communication model that
uses a persistent connection between the client and server. Once the connection is setup it
Page 12
Introduction to Internet of Things
remains open until the client sends a request to close the connection. Client and server
can send messages to each other after connection setup. Exclusive pair is a state full
communication model and the server is aware of all the open connections. Figure 1.10
shows the client-server interactions in the exclusive pair model.
Page 13
Introduction to Internet of Things
A RESTfull web services is a “web API” implemented using HTTP and REST principle.
Figure 1.11 shows the communication between client and sever using REST APIs.
Figure 1.12 shows the interactions in the request-response model used by REST. Restful
web service is a collection of resources which are represented by URIs. RESTful web
API has a base URI(eg. http://example.com/api/taks).The clients send requests to these
URIs using the methods defined by the HTTP protocol (eg.GET,PUT,POST,orDELETE),
as shown in table 1.1.
Page 15
Introduction to Internet of Things
Page 16
Introduction to Internet of Things
This request is sent over HTTP and the server interprets it as an upgrade request.
If the servers support Web Socket protocol, the server responds to the WebSocket
handshake response.
After the connection is setup, the client and server can send data/message to each other in
full-duplex mode.
Web Socket APIs reduces the network traffic and latency as there is no overhead for
connection setup and termination requests for each message.
WebSocket is suitable for IOT applications that have low latency or high throughput
requirements.
Page 17
Introduction to Internet of Things
Structural health monitoring systems use WSNs to monitor the health of structures
(buildings, bridges) by collecting vibration data from sensor nodes deployed at various
points in the structure.
WSNs are enabled by wireless communication protocols such as IEEE 802.15.4.
ZigBee is one of the most popular wireless technologies used by WSNs.
ZigBee specifications are based on IEEE 802.15.4. ZigBee operates at 2.4 GHz frequency
and offers data rates upto 250 KB/s and range from 10 to 100 meters depending on the
power output and environmental conditions.
The power of WSNs lies in their ability to deploy range large number of low-cost and
low-power sensing nodes for continuous monitoring of environmental and physical
conditions. WSNs are self-organizing networks. Since WSNs have large number of
nodes, manual configuration for each node is not possible.
The self-organizing capability of WSN makes the robust. In the event of failure of some
needs or addition of new nodes to the network, the network can reconfigure itself.
Cloud computing
Cloud computing is a transformative computing paradigm that involves delivering
applications and services over the Internet.
Cloud computing involves provisioning of computing, networking and storage
resources on demand and providing these resources as metered services to the
users, in a “play as you go” model.
Cloud computing resources can be provisioned on-demand by the users, without
requiring interactions with the cloud service Provider.
The processor of provisioning resources is automated .Cloud computing resources
can be accessed over the network using standards access mechanism that provide
platform-independent access throw the use of heterogeneous client platforms such
as work stations laptops, tablets and smart phones.
The computing and storage resources provided by cloud services provider are
pooled to serve multiple users using multi-tenancy.
multi-tenant aspects of the cloud allow multiple users to the served by the same
physical hardware.
Cloud computing services are offered to users in different formed(see the authors company and
Page 18
Introduction to Internet of Things
Big data analytical involves several steps starting from data cleansing, data mugging ,
Data processing and visualization.
Some examples of big data general by IOT system are described as follows:
Page 19
Introduction to Internet of Things
Machine sensor data collected from sensors embedded in industrial and energy
systems for monitoring their health and detecting failures.
Health and fitness data generated by IOT devices such as wearable fitness bands.
Data generated by IOT system for location and tracking of vehicles.
Data generated by retail inventory monitoring systems.
The characteristics of big data include:
Volume: The volumes of data generated by modern IT, industrial, and health-care
system is growing exponentially driven by the lowering costs of data storage and processing
architectures and the need to extract valuable insights from the data to improve business
processes, efficiency and service to consumers.
Velocity: Velocity of data refers to how fast the data is generated and how frequently it
varies. Modern IT, industrial and other systems are generating data at increasingly higher
speeds.
Variety: variety refers to the forms of the data. Big data comes in different forms such as
structured or unstructured data, including text data, image, audio, video, and sensor data.
Communications protocols
Communications protocols form the backbone of IOT system and unable network
connectivity and coupling to applications.
Communication protocols allow devices to exchange data over the network.
IOT protocols define the data exchange formats, data encoding, addressing schemes for
devices and routing of packets from source to destination.
Other function of the protocols include sequence control (that helps in ordering packets
determining lost packets), flow control(that helps in controlling the rate at which the
sender is sending the data so that the receiver or the network is not overwhelmed) and
retransmission of lost packets.
Embedded systems
An embedded system is a computer system that has computer hardware and
software embedded to perform specific task.
Embedded system are design to perform a specific set of task. Key components of
an embedded system include, microprocessor or microcontroller, memory (RAM,
Page 20
Introduction to Internet of Things
ROM, cache) , networking units (Ethernet, wifi adapter), input /output units
(display, keyboard etc.) and storage(such as flash memory ).
Some embedded system have specialized processors such as digital signal
processors(DSPs),graphics processors and application specific processors.
Embedded systems run embedded operating system such as real time operating
systems (RTOS).
Embedded systems range from miniaturized devices such as digital watches to
devices such as digital cameras, point of sale terminals, vending machines,
appliances(such as washing machines),etc.
Stateless/Stateful:
REST services are stateless in nature. Each request contains all the information needed to
process it. Requests are independent of each other.
Page 21
Introduction to Internet of Things
Web Socket on the other hand is stateful in nature where the server maintains the state
and is aware of all the open connections.
Uni-directional/Bi-directional:
REST services operate over HTTP and are uni-directional. Request is always sent by a
client and the server responds to the request.
Web Socket is a bi-directional protocol and allows both client and server to send
messages to each other.
Request-Response/Full Duplex:
REST services follow a request –response communication model where the client sends
request and the server respond to the requests.
WebSocket on the other hand allow full-duplex communication between the client and
server, i.e., both client and server can send messages to each other independently.
TCP Connections:
For REST services, each HTTP request involves setting up a new TCP connection.
WebSocket on the other hand involves a single TCP connection over which the client and
server communicate in a full-duplex mode.
Header Overhead:
REST services operate over HTTP, and each request is independent of others. Thus each
request carries HTTP headers which is an overhead. Due the overhead of HTTP headers ,
REST is not suitable for real-time applications.
WebSocket on the other hand does not involve overhead of headers. After the initial and
handshake (that happens over HTTP), the client and server exchange messages with
minimal frame information. Thus WebSocket is suitable for real-0time applications.
Scalability:
Scalability is easier in the case REST services as request are independent and no state
information needs to be maintained by the server. Thus both horizontal (scaling-out)and
vertical scaling (scaling-up) solutions are possible for REST services.
For WebSockets, horizontals scaling can be cumbersome due to the stateful nature of the
communication. Since the server maintains the state of a connection, vertical scaling is
easier for websocket than horizontal scaling.
Analysis components: The analysis component is responsible for analyzing the IOT data
and generate results in a form which are easy for the user to understand. Analysis of IOT
data can be preformed either locally or in the cloud. Analyzed results are stored in the
local or cloud databases.
Page 22
Introduction to Internet of Things
Application: IOT applications provide an interface that the users can use to control and
monitor various aspects of the IOT system. Applications also allow users to view the
system status and view the processed data.
IOT Level-1
A level-1 IOT system has a single node/device that perform sensing and/or actuation,
stores data, performs analysis and hosts the applications shown in figure 1.14.
Level-1 IOT systems are suitable for modeling low-cost and low-complexity
solutions where the data involved is not big and the analysis requirements are not
computationally intensive.
Consider an example of a level-1 IOT system for home automation. The system
consists of a single node that allows controlling the lights and appliances in a home
remotely. The device used in this system interfaces with the lights and appliances
using electronic relay switches. The status information of each light or appliance is
maintained in a local database. REST services deployed locally allow retrieving and
updating the state of each light or appliance in the status database. The controller
service continuously monitors the state of each light or appliance (by retrieving state
from the database) and triggers the relay switches accordingly. The application which
is deployed locally as a user interface for controlling the lights or appliances. Since
the devices is connected to the internet, the application can be accessed remotely as
well
Page 23
Introduction to Internet of Things
Figure1.14:IoT Level-1
IOT Level-2
A level-2 IOT system has a single node/device that perform sensing and/or actuation and
local analysis as shown in figure 1.15.
Data is stored in the cloud and applications is usually cloud-based. Level-2 IOT systems
are suitable for solutions where the data involved is big, the primary analysis requirement
is not computationally intensive and can be done locally itself.
Page 24
Introduction to Internet of Things
Figure1.15:IoT Level-2
Consider an example of a level-2 IOT system for smart irrigation. The system consists of
a single node that monitors the soil moisture level and controls the irrigation system. The
device used in this system collects soil moisture data from sensors. The controller service
continuously monitors the moisture levels. If the moisture level drops below threshold,
the irrigation system is turned on. For controlling the irrigation system actuators such as
solenoid values can be used. The controller also sends the moisture data to the computing
cloud. A cloud-based REST web service is used for storing and retrieving moisture data
which is stored in the cloud database. A cloud-based application is used for visualizing
the moisture levels over a period of time which can help in making decisions about
irrigation schedules.
IOT Level-3
A level-3 IOT system as a single node. Data is stored and analyzed in the cloud and
application is cloud-based as shown in figure 1.16.
Level-3 IOT systems are suitable for solutions where the data involved is big and the
analysis requirements are computationally intensive.
Page 25
Introduction to Internet of Things
consider an example of a level-2 IOT system for tracking package handling. The system
consists of a single node (for a package) that monitors the vibration levels for a package
begin shipped. The device in this system uses accelerometer and gyroscope sensors for
monitoring vibration levels. The controller service sends the sensor data to the cloud in
real-time using a websocket service. The data is stored in the cloud and also visualized
using a cloud based application. The analysis components in the cloud can trigger alerts if
the vibration levels become greater than a threshold. The benefit of using web socket
service instead of REST service in this example if that, the sensor data can be send in
real time to the cloud. Moreover, cloud based applications can subscribe to the sensor
data feeds for viewing the real-time data.
Figure1.16:IoT Level-3
IOT Level-4
A level-4 IOT system has multiple nodes that perform local analysis. Data is stored in the
cloud and application is cloud-based as shown in figure 1.17.
Level-4 contains local and cloud based observer nodes which can subscribe to and
receive information collected in the cloud from IOT devices. Observer nodes can process
Page 26
Introduction to Internet of Things
information and use it for various application, however, observer nodes do not perform
any control functions.
Level-4 IOT systems are suitable for solutions where multiple nodes are required, the
data involved is big and the analysis requirement are computationally intensive.
Figure1.17:IoT Level-4
Consider an example of a level-4 IOT system for noise monitoring. The system consists
of multiple nodes placed in different locations for monitoring noise level in an area. The
nodes in this example are equipped with sound sensors. Nodes are independent of each
other. Each node runs its own controller service that sends the data to the cloud. The data
is stored in a cloud database. The analysis of data collected from a number of nodes is
done in the cloud. A cloud-based applications is used for visualizing the aggregated data.
IOT Level-5
A level-5 System as multiple end nodes and one coordinator node as shown in the
fig.1.1.8 The end nodes that perform sending and or actuation.
Page 27
Introduction to Internet of Things
Coordinator node collects data from the end nodes and sends to the cloud. Data is
stored and analyzed in the cloud and application is cloud based.
LEVEL-5 systems are suitable for solution based on wireless sensor networks, in
which the data involved is big and the analysis requirements are computational
intensive.
Figure1.18:IoT Level-5
Consider an example for level-5 IOT systems for forest fire detection. The system
consists of multiple nodes placed in different location for monitoring temperature,
humidity and carbon dioxide (c02)levels in a forest. The end node in this example are
equipped with various sensors (such as temperature, humidity and c02). The
coordinator node collects the data from the end node and act as a gateway that
provides internet connectivity to the IOT system.The controller service on the
coordinator devices sends the collected data to the cloud. The data is stored in a cloud
database. The analyses of the data is done in the computing cloud to aggregate the
data and make predictions. A cloud-based application is used for visualizing the data.
Page 28
Introduction to Internet of Things
IOT Level-6
A level-6 IOT system has multiple independent end nodes that perform sending and/or
actuation and send data to the cloud.
Data is stored in the cloud and application is cloud-based as shows in figure 1.19.
The analytics component analyses the data and stored the results in the cloud
database. The results are visualized with the cloud based application.
The centralized controller is aware of the status of all the end nodes and sends control
commands to the nodes.
Figure1.19:IoT Level-6
Consider an example of a level-6 IOT systems for whether monitoring. The systems
consist of multiple nodes placed in different location for monitoring temperature,
humidity and pressure in an area. The end nods are equipped with various sensors
such as temperature, pressure and humidity. The end nodes send the data to the cloud
in a real time using a websocket service. The data is stored in a cloud database. The
analysis of data is done in the cloud to aggregate the data and make prediction. A
cloud based application is used for visualizing the data.
Page 29