You are on page 1of 68

Chapter 1

Introduction to IoT

Book website: http://www.internet-of-things-book.com Bahga & Madisetti, © 2015


Outline

• Definition of IoT
• Characteristics of IoT
• Physical design of IoT
• Logical design of IoT
• IoT protocols
• IoT levels and deployment templates

Book website: http://www.internet-of-things-book.com Bahga & Madisetti, © 2015


Applications of IoT
IoT
• Internet of Things is Fully Networked and Connected Devices sending analytics
data back to cloud or data center.
• The definition of Internet of things is that it is the network in which every object
or thing is provided unique identifier and data is transferred through a network
without any verbal communication.
• Scope of IoT is not just limited to just connecting things to the internet.
• it allows these things to
- communicate
- exchange data
- process
- control them while executing applications.
Formal Definition of IoT
A dynamic global network infrastructure with self- configuring capabilities based
on standard and interoperable communication protocols, where physical and
virtual “things” have identities, physical attributes, and use intelligent interfaces,
and are seamlessly integrated into information network that communicate data
with users and environments.
Characteristics of IoT
• Dynamic Global network & Self-Adapting : Adapt the changes w.r.t changing contexts and take
actions based on their operating conditions, user’s context or sensed environment.

Ex: surveillance system


- cameras can adapt their modes based on – weather conditions (day or night)
- cameras can switch from lower resolution to higher resolution.

• Self Configuring : allowing a large number of devices to work together to provide certain
functionality ( weather monitoring).
device has the ability - configure themselves
- set up the network
- Fetching latest s/w updates without manual intervention.
Interoperable Communication Protocols : Communicate through various
- protocols
- other devices
- infrastructure

Unique Identity : each IoT device has unique identity and unique identifier
(Such as Unique IP Address or a URI)

Integrated into Information Network : This allows to communicate and


exchange data with other devices to perform certain analysis.

IoT devices:
- Dynamically discovered in the network by other devices or other network.
- Capacity to describe themselves
ex: weather monitoring system (smart).
Physical Design of IoT

• Things in IoT
• IoT Protocols
Things in IoT
• Refers to IoT devices which have unique identities that can perform sensing, actuating and monitoring
capabilities.

• IoT devices can

- exchange data with other connected devices 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.

- collect various types of data (temperature, humidity and light intensity)

-connected to actuators that allow them to interact with other physical devices (relay).
Generic Block Diagram of an IoT Device

• An IoT device may consist of


several interfaces for
connections to other devices,
both wired and wireless.
• I/O interfaces for sensors
• Interfaces for internet
connectivity
• Memory and storage interfaces
• Audio/video interfaces

Book website: http://www.internet-of-things-book.com Bahga & Madisetti, © 2015


IoT Protocols
• Link Layer
• 802.3 – Ethernet
• 802.11 – WiFi
• 802.16 – WiMax
• 802.15.4 – LR-WPAN
• 2G/3G/4G
• Network/Internet Layer
• IPv4
• IPv6
• 6LoWPAN
• Transport Layer
• TCP
• UDP
• Application Layer
• HTTP
• CoAP
• WebSocket
• MQTT
• XMPP
• DDS
• AMQP
Book website: http://www.internet-of-things-book.com Bahga & Madisetti, © 2015
IoT Protocols…Link Layer…Ethernet
It determines how the:
- data is physically sent over the network’s physical layer or medium.
- packets are coded and signaled by the hardware device over the medium to
which host is attached.

Sr.No Standard Shared medium


1 802.3 Coaxial Cable…10BASE5

2 802.3.i Copper Twisted pair …..10BASE-T

3 802.3.j Fiber Optic……10BASE-F

4 802.3.ae Fiber…..10Gbits/s

Data Rates are provided from 10Gbit/s to 40Gb/s and higher


IoT Protocols…Link Layer…WiFi
Sr.No Standard Operates in
1 802.11a 5 GHz band

2 802.11b and 802.11g 2.4 GHz band

3 802.11.n 2.4/5 GHz bands

4 802.11.ac 5 GHz band

5 802.11.ad 60 GHz band

• Collection of Wireless LAN communication standards


• Data Rates from 1Mb/s to 6.75 Gb/s
IoT Protocols…Link Layer…WiMax
Sr.No Standard Data Rate
1 802.16m 100Mb/s for mobile stations
1Gb/s for fixed stations

• Collection of Wireless Broadband standards


• Data Rates from 1.5Mb/s to 1 Gb/s
IoT Protocols…Link Layer…LR-WPAN

• Collection of standards for low-rate wireless personal area networks


• Basis for high level communication protocols such as Zigbee
• Data Rates from 40 Kb/s to 250 Kb/s
• Provide low-cost and low-speed communication for power constrained
devices
IoT Protocols…Link Layer…2G/3G/4G –Mobile
Communication
Sr.No Standard Operates in
1 2G GSM-CDMA

2 3G UMTS and CDMA 2000

3 4G LTE

• Data Rates from 9.6Kb/s (for 2G) to up to 100Mb/s (for 4G)


GSM- Global System For Mobile
CDMA- Code Division Multiple Access
UMTS- Universal Mobile Telecommunications System
LTE- Long Term Evolution
IoT Protocols…Network/Internet Layer

• Responsible for sending of IP datagrams from source to destination network

• The datagram contain the source and destination addresses which are used to route

them from source to destination across multiple networks.

• Performs the host addressing and packet routing

• Host identification is done using hierarchical IP addressing schemes such as

IPV4 (internet version protocol 4) or IPV6 (internet version protocol 6)


IoT Protocols…Network Layer
• IPV4
• Used to identify the devices on a network using hierarchical addressing scheme
• Uses 32-bit address scheme (232 or 4,294,967,296 addresses)
• IPV6
• Uses 128-bit address scheme (2128 or 3.4 x 1038 addresses)
• 6LoWPAN (IPV6 over Low power Wireless Personal Area Network)
• Used for devices with limited processing capability
• Operates in 2.4 GHz frequency
• Data Rates of 250 Kb/s
IoT Protocols…Transport Layer

• Provide end-to-end message transfer capability independent of the underlying


network
• the message transfer capability can be setup on connections, either using
handshakes (TCP) or with out handshake/ack (UDP).
• It provides functions such as error control, segmentation, flow-control and
congestion control
IoT Protocols…TCP
It is used by web browsers , email programs and file transfer .

• Transmission Control Protocol


• Connection Oriented
• Ensures Reliable transmission
• Provides Error Detection Capability to ensure no duplicacy of packets and retransmit lost packets
• Flow Control capability to ensure the sending data rate is not too high for the receiver process
• Congestion control capability helps in avoiding congestion which leads to degradation of N/W
performance
IoT Protocols…UDP

• User Datagram Protocol


• Connection-less
• Does not ensures Reliable transmission
• Does not do connection before transmitting
• Does not provide guaranteed delivery, ordering of messages and duplicate elimination
• Transaction oriented and stateless (time sensitive applications- very small data need to
exchange)
IoT Protocols…Application Layer…
Hyper Text Transfer Protocol
How the applications interface with the lower layer protocols to send the data over network.
Port numbers are used for application addressing (HTTP-80, SSH-22)

• Forms foundation of World Wide Web (WWW)


• Includes commands such as GET,PUT, POST, HEAD, OPTIONS, TRACE..etc
• Follows a request-response model (where a client sends request to server using HTTP commands)
• Uses Universal Resource Identifiers (URIs) to identify HTTP resources
IoT Protocols…Application Layer…CoAP
• Constrained Application Protocol
• Used for Machine to machine (M2M) applications meant for constrained devices and N/W’s
• Web transfer protocol for IoT and uses request-response model (it runs on top of UDP)
• Uses client –server architecture (using connection less datagrams)
• Supports methods such as GET,POST, PUT and DELETE
IoT Protocols…Application Layer…WebSocket
• Allows full-duplex communication over single socket (client to server)
• Based on TCP
• Client can be a browser, IoT device or mobile application

IoT Protocols…Application Layer…MQTT


• Message Queue Telemetry Transport , light-weight messaging protocol
• Based on publish-subscribe model
• Well suited for constrained environments where devices have limited processing, low
memory and N/W bandwidth requirement
IoT Protocols…Application Layer…XMPP

• Extensible messaging and presence protocol


• For Real time communication and streaming XML data between N/W
entities
• Used for Applications such as messaging, gaming, Multi-party chat and
voice/video calls.
• Decentralized protocol and uses client server architecture.
• It supports both client to server and server to server communication paths.
IoT Protocols…Application Layer…DDS

• Data Distribution service is a data-centric middleware standard for


device-to-device or machine-to-machine communication.
• Publish subscribe model where publishers create topics to which
subscribers can use.
• Provides Quality-of-service control and configurable reliability.
IoT Protocols…Application Layer…AMQP

• Advanced Messaging Queuing Protocol used for business messaging.


• Supports both point-to-point and publisher/subscriber models, routing
and queuing.
• Broker here receives messages from publishers and route them over
connections to consumers through messaging queues.
Logical Design of IoT
• Logical design of an IoT system
refers to an abstract
representation of the entities and
processes without going into the
low-level specifics of the
implementation.
• An IoT system comprises a
number of functional blocks that
provide the system the
capabilities for identification,
sensing,actuation, communication
and management.

Book website: http://www.internet-of-things-book.com Bahga & Madisetti, © 2015


Logical Design of IoT
• Device : Devices such as sensing, actuation, monitoring and control functions.
• Communication : IoT Protocols
• Services like device monitoring, device control services, data publishing services and
device discovery
• Management : Functions to govern the system
• Security : Functions as authentication, authorization, message and content integrity,
and data security
• Applications

Book website: http://www.internet-of-things-book.com Bahga & Madisetti, © 2015


Request–Response Communication Model
• Request–Response is a
communication model in which
the client sends requests to the
server and the server responds to
the requests.

• When the server receives a


request, it decides how to
respond, fetches the data,
retrieves resource
representations, prepares the
response and then sends the
response to the client.

• Stateless communication model

Book website: http://www.internet-of-things-book.com Bahga & Madisetti, © 2015


Publish–Subscribe Communication Model
• Publish–Subscribe is a
communication model that
involves publishers, brokers and
consumers.
• Publishers are the source of data.
Publishers send the data to the
topics which are managed by the
broker. Publishers are not aware
of the consumers.
• Consumers subscribe to the topics
which are managed by the broker.
• When the broker receives data for
a topic from the publisher, it
sends the data to all the
subscribed consumers.

Book website: http://www.internet-of-things-book.com Bahga & Madisetti, © 2015


Push–Pull Communication Model
• Push–Pull is a communication
model in which the data
producers push the data to
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.

Book website: http://www.internet-of-things-book.com Bahga & Madisetti, © 2015


Exclusive Pair Communication Model

• Exclusive Pair is a
bidirectional, fully duplex
communication model that
uses a persistent connection
between the client and the
server.
• Once the connection is set
up it, remains open until the
client sends a request to
close the connection.
• Client and server can send
messages to each other after
connection setup.

Book website: http://www.internet-of-things-book.com Bahga & Madisetti, © 2015


REST-based Communication APIs
• Representational State Transfer (REST) is a set of architectural principles by which you
can design web services and web APIs that focus on a system’s resources and how
resource states are addressed and transferred.

• REST APIs follow the request–response communication model.

• REST architectural constraints apply to the components, connectors and data elements
within a distributed hypermedia system.

Book website: http://www.internet-of-things-book.com Bahga & Madisetti, © 2015


REST-based Communication APIs

JSON - JavaScript Object Notation


XML - Extensible Markup Language Bahga & Madisetti, © 2015
REST-based Communication APIs Constraints
• Client – Server : separate concern
- client- should not be concerned with the storage of data
- server- should not be concerned about user interface
- client and server to be independently developed and updated
• Stateless:
- Each request from client must contain all the information necessary to
understand the request.
- It cannot take advantage of any stored context on the server.
- Session state is entirely on the client.
• Cache-able:
-It requires that the data with in a response to a request be implicitly or explicitly
labeled as cacheable or non-cacheable (history)

Book website: http://www.internet-of-things-book.com Bahga & Madisetti, © 2015


REST-based Communication APIs Constraints
• Layered System
- the behavior of components such that each component cannot see beyond the
immediate layer with which they are interfacing.
Ex: client cannot tell whether it is connected directly to the end server
• Uniform Interface
- Resources are identified in the requests (by URL) and are themselves separate from the
representations of the resources that are returned to the client.
• Code on demand
- Servers can provide executable code or scripts for clients to execute in their context.

Book website: http://www.internet-of-things-book.com Bahga & Madisetti, © 2015


WebSocket-based Communication APIs

• WebSocket APIs allow bi-


directional, full duplex
communication between
clients and servers.
• WebSocket APIs follow the
exclusive pair communication
model.
• Reduces net traffic and latency
• High throughput

Book website: http://www.internet-of-things-book.com Bahga & Madisetti, © 2015


Difference between REST and WebSocket-based
Communication APIs
Comparison Based on REST Websocket
State Stateless Statefull
Directional Unidirectional Bidirectional
Req-Res/Full Duplex Follow Request Response Model Exclusive Pair Model
TCP Connections Each HTTP request involves setting Involves a single TCP
up a new TCP Connection Connection for all requests
Header Overhead Each request carries HTTP Headers, Does not involve overhead of
hence not suitable for real-time headers.
IoT Enabling Technologies
• Wireless Sensor Network

• Cloud Computing

• Big Data Analytics

• Communication protocols

• Embedded Systems
WSN
• Distributed Devices with sensors used to monitor the environmental and physical
conditions
• Consists of several end-nodes, routers and a coordinator.
• each node has several sensors attached to them
• Routers route the data packets from end nodes to coordinators.
• Coordinators collects data from all nodes / acts as gateway that connects WSN to
internet
• WSN is a self organizing networks.
Ex: weather monitoring system (nodes collect temperature, humidity and other data,
which is aggregated and analyzed)
Example of WSNs in IoT & Protocols used
Example
• Weather monitoring system
• Indoor Air quality monitoring system
• Soil moisture monitoring system
• Surveillance systems
• Health monitoring systems
Protocols
• Zigbee:
- operates at 2.4 GHz
- data rates 250 kB/s
- range from 10 to 100 meters
Cloud Computing
• Deliver applications and services over internet
• Provides computing, networking and storage resources on demand and providing these
resources as metered services to the users , in a “ pay as you go model”.
- Computing resources can accessed using standard access mechanisms to provide platform
independent through the use of heterogeneous client platforms such as work stations,
laptops, tablets and smart phones.
- Computing and stored resources of cloud are pooled to serve multiple users.
• Cloud computing services are offered to users in different forms:
1) infrastructure as a service (IaaS)
2) platform as a service (PaaS)
3) software as a service (SaaS)
Cloud Computing
INFRASTRUCTURE AS A SERVICE (IAAS):
• It provides the users the ability to provision computing and storage resources.
• Resources are provided as virtual machine instances and virtual storage.
• These resources are suppled by cloud service providers are pooled to serve multiple users.
• Here multiple users are served by same physical hardware.
• Users assigned virtual recourses that run on top of the physical resources.

PLATFORM AS A SERVICE (PAAS)


• Provides the user to develop and deploy application in the cloud using the development
tools and application programming interfaces.
• The service provider manages includes servers, network, OS and storage.
• The users themselves responsible for developing, deploying, configuring and managing
applications.
Cloud Computing
SOFTWARE AS A SERVICE (SAAS):

• It provides user as a complete software application or the user interface to the application
itself.

• The service provider manages includes servers, OS, storage and application software and
user unaware of the underlying architecture of the cloud.
Big Data Analytics
• Collection of data sets whose volume, velocity or variety is too large
and difficult to store, manage, process and analyze the data using
traditional databases and data processing tools.
• It involves data cleansing, wrangling, processing and visualization
• Lots of data is being collected and warehoused
• Web data, e-commerce
• purchases at department/ grocery stores
• Bank/Credit Card transactions
• Social Network
Big Data Analytics
Variety refers to different forms of data
Big data comes in different forms:
• Structured
• Unstructured, including text data, image, audio, video and sensor data

Velocity Refers to how fast the data is generated and how frequently it varies.
Modren IT, industrial and other systems are generating data at higher speeds.

Volume refers to the amount of data


The volume of data generated by IT, industrial and health care systems is
growing exponentially and need to extract valuable insights from the data to
improve business process, efficiency and service to consumers.
Communication protocols
- These are the backbone of IoT systems and enable connectivity and coupling
to applications.
- These allow devices to exchange data over the network.
These protocols define:
- Data exchange format
- data encoding
- addressing schemes for devices
- routing of packets
- flow control
- retransmission of lost packets
Embedded systems
• It is a computer system that has computer hardware and software embedded
to perform specific tasks.
• These are designed to perform a specific set of tasks.
• Key components include microcontroller, memory, networking unit and
input/output units.
• Some embedded systems has specialized processors DSP, Graphical processors
and application specific processors
IoT Levels and Deployment Templates
An IoT system comprises the following components:
• Device: An IoT device allows
- identification,
- remote sensing
- actuating
- remote monitoring capabilities.
• Resource: Resources are software components on the IoT device for
- accessing
- Processing
- storing sensor information
- controlling actuators connected to the device
- enable network access for the device.
• Controller Service: Controller service is a native service that runs on the device and interacts
with the web services.
- it can send data from the device to the web service and receives commands from the
application (via web services) for controlling the device.
IoT Levels and Deployment Templates
• Database: Database can be either local or in the cloud and stores the data
generated by the IoT device.

• Web Service: Web services serve as a link between the IoT device, application,
database and analysis components.
it can be implemented using HTTP and REST principles (REST service) or using
the WebSocket protocol (WebSocket service).

• Analysis Component: This is responsible for analyzing the IoT data and generating
results in a form that is easy for the user to understand.

• 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 the processed data.
IoT Level-1
• A level-1 IoT system has a single
node/device that performs sensing and/or
actuation, stores data, performs analysis
and hosts the application.

• Level-1 IoT systems are suitable for


modelling low-cost and low-complexity
solutions where the data involved is not big
and the analysis requirements are not
computationally intensive.
IoT – Level 1 Example …Home Automation
System
IoT Level-2

• A level-2 IoT system has a single node


that performs sensing and/or actuation
and local analysis.

• Data is stored in the cloud and the


application is usually cloud-based.

• Level-2 IoT systems are suitable for


solutions where the data involved is big;
however, the primary analysis
requirement is not computationally
intensive and can be done locally.
IoT – Level 2 Example …Smart Irrigation
IoT Level-3
• A level-3 IoT system has a single
node.

• Data is stored and analyzed in the


cloud and the application is cloud-
based.

• Level-3 IoT systems are suitable for


solutions where the data involved is
big and the analysis requirements
are computationally intensive.
IoT – Level 3 Example …Tracking Package
Handling
Sensors used accelrometer and gyroscope
IoT Level-4
• A level-4 IoT system has multiple nodes
that perform local analysis.

• Data is stored in the cloud and the


application is cloud-based.

• Level-4 contains local and cloud-based


observer nodes which can subscribe to
and receive information collected in the
cloud from IoT devices.

• Level-4 IoT systems are suitable for


solutions where multiple nodes are
required, the data involved is big and the
analysis requirements are computationally
intensive.
IoT – Level 3 Example …Noise Monitoring
Sound Sensors are used
IoT Level-5
• A level-5 IoT system has multiple
end nodes and one coordinator
node.
• The end nodes perform sensing
and/or actuation.
• The coordinator node collects data
from the end nodes and sends it to
the cloud.
• Data is stored and analyzed in the
cloud and the application is cloud-
based.
• Level-5 IoT systems are suitable for
solutions based on wireless sensor
networks, in which the data
involved is big and the analysis
requirements are computationally
intensive.
IoT Level-6
• A level-6 IoT system has multiple
independent end nodes that
perform sensing and/or actuation
and send data to the cloud.
• Data is stored in the cloud and the
application is cloud-based.
• The analytics component analyzes
the data and stores 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.
M2M (Machine-to-Machine)
• It refers to the networking of machines (or devices) for the purpose of remote monitoring
and control and data exchange.

M2M area networks comprises of:


Machines – which have embedded
hardware modules for sensing,
actuation and communication.

Various communication protocols can be


used : ZigBee, Bluetooth, Modbus
6LoWPAN, IEEE 802.15.4 etc.

Communication networks provides


connectivity to remote M2M area
networks
• Communication network : Wired or wireless network ( IP based)
• Wire less area network – proprietary or non IP based communication protocols
• The communication uses IP based networks.
• The M2M mode with in one network cannot communicate with nodes in an external
network.
• To enable the communication between remote M2M area networks, M2M gateways are
used.
• M2M gateway performs protocol translations to enable IP-connectivity for M2M area networks.
• It acts as proxy performing translations fro/to native protocols to/from internet protocol (IP).
• With an M2M gateway each node in an M2M area network appears as virtualized node for
external M2M area network.
M2M IoT
It focus on protocols below the
Communication network layer (i.e. n/w layer and It focus on above network layer (i.e transport layer and application
protocols link layer protocols like ZigBee, layer such as HTTP, CoAP, Websockets, MQTT, XMPP, DDS, AMQP etc)
Bluetooth etc)
- Things in IoT refers to physical objects that have unique identifier and
can sense and communicate with their external environment or their
Machines in
internal physical states.
M2M Homogenous machine types with
- The things in IoT have IP addresses ( or MAC addresses)
Vs in an M2M area Network.
- They have software components
Things in IoT
- This type of system have heterogeneous thing ( home automation
contains of fire alarms, door alarms, lighting control devices etc.)
H/W
It is more on hardware with - it is more on software
Vs
embedded modules - It run specialized software for sensor data collection, analysis and
S/W Emphasis
interfacing with cloud through IP based communication.

It is collected in point solutions It is collected in the cloud (can be public, private or hybrid cloud)
Data collection
and often in on-premises storage It analyzes the data and stores the results in cloud data base.
and analysis
infrastructure. These results are visualized with the cloud based application
On-remises applications like
diagnosis , service management , Cloud applications such as analytics, enterprise, remote diagnosis and
applications
On-remise enterprise management applications.
applications

You might also like