[go: up one dir, main page]

0% found this document useful (0 votes)
64 views33 pages

SRKR VII Sem CSE R20 IoT Lecture Notes UNIT-1

SDFghffzxgd

Uploaded by

dexisa2804
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)
64 views33 pages

SRKR VII Sem CSE R20 IoT Lecture Notes UNIT-1

SDFghffzxgd

Uploaded by

dexisa2804
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
You are on page 1/ 33

VII Semester CSE [B20CS4103] Internet of Things

Lecture Notes

B20CS4103
Internet of Things
Lecture Notes
Department of Computer Science and Engineering
SRKR Engineering College (Autonomous)

UNIT – 1
Introduction to Internet of Things: Definition & Characteristics of IoT, Physical design of IoT-Things
in IoT, IoT protocols, Logical Design of IoT- IoT Functional Blocks, IoT Communication Models & API’s,
IoT levels and deployment templates. [Text Book: Internet of Things, A Hands-on Approach, Bahga and
Madisetti, Universities Press]. Technology behind IoT, Sources of the IoT. [Text Book: Internet of Things,
Architecture and Design Principles, Raj Kamal, McGraw Hill Edu.]
IoT Network Architecture and Design: Drivers Behind New Network Architectures, Comparing IoT
Architectures, A Simplified IoT Architecture. [Text Book: IoT Fundamentals, Cisco Press]

Prepared by: Dr. Ravi Kiran Varma P., Professor, CSE.

Table of Contents
Definition of IoT ........................................................................................................................................... 3
Alternate definition: .................................................................................................................................. 3
Characteristics of IoT .................................................................................................................................... 3
Physical design of IoT .................................................................................................................................. 4
Things in IoT............................................................................................................................................. 4
Generic block diagram of an IoT Device .................................................................................................. 5
IoT Protocols................................................................................................................................................. 5
Link Layer Protocols: ............................................................................................................................... 6
Network/Internet Layer ............................................................................................................................. 7
Transport layer protocols .......................................................................................................................... 7
Application layer protocols ....................................................................................................................... 8
Logical Design of IoT ................................................................................................................................... 8
Functional Blocks of IoT .......................................................................................................................... 9
IoT Communication Models: ........................................................................................................................ 9
Request –Response Model: ....................................................................................................................... 9
Publish-Subscribe communication model:.............................................................................................. 10
Push-Pull communication model: ........................................................................................................... 10
Exclusive Pair communication model: ................................................................................................... 11
IoT Communication APIs ........................................................................................................................... 11
1
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

REST-based Communication APIs:........................................................................................................ 12


WebSocket-based Communication APIs: ............................................................................................... 14
IoT Levels & Deployment Templates ......................................................................................................... 15
IoT Level-1 ............................................................................................................................................. 15
IoT Level-2 ............................................................................................................................................. 16
IoT Level-3 ............................................................................................................................................. 17
IoT Level-4 ............................................................................................................................................. 17
IoT Level-5 ............................................................................................................................................. 18
IoT Level-6 ............................................................................................................................................. 19
Technology behind IoT ............................................................................................................................... 20
Major components of IoT devices are: ................................................................................................... 21
Sensors and Control Units ...................................................................................................................... 21
Communication Module ......................................................................................................................... 21
Software: ................................................................................................................................................. 21
Middleware: ............................................................................................................................................ 21
Operating Systems (OS) ......................................................................................................................... 21
Firmware: ................................................................................................................................................ 22
Development Tools and Open-source Framework for IoT Implementation: .......................................... 22
APIs and Device Interfacing Components: ............................................................................................. 22
Platforms and Integration Tools:............................................................................................................. 22
Sources of the IoT ....................................................................................................................................... 23
Popular IoT Development Boards: ......................................................................................................... 23
Role of RFID and IoT Applications ........................................................................................................ 23
Wireless Sensor Networks (WSNs): ....................................................................................................... 23
IoT Network Architecture and Design ........................................................................................................ 24
Drivers Behind New Network Architectures .......................................................................................... 24
Scale: ................................................................................................................................................... 25
Security: .............................................................................................................................................. 25
Constrained Devices and Networks: ................................................................................................... 26
Data: .................................................................................................................................................... 26
Legacy device support: ....................................................................................................................... 26

2
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

Comparing IoT architectures: ..................................................................................................................... 27


The oneM2M IoT Standardized Architecture: ........................................................................................ 27
The IoT World Forum (IoTWF) Standardized Architecture................................................................... 28
A Simplified IoT Architecture .................................................................................................................... 30
The Core IoT Functional Stack: .............................................................................................................. 31
The IoT Data Management and Compute Stack ..................................................................................... 32

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 virtual personalities and use intelligent interfaces, and are seamlessly
integrated into the information network, often communicate data associated with users and their
environments.

Alternate definition:
The Internet of things (IoT) describes physical objects (or groups of such objects) with sensors,
processing ability, software and other technologies that connect and exchange data with other
devices and systems over the Internet or other communications networks

Characteristics of IoT
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. For example, consider a surveillance system comprising of a number of
surveillance cameras. The cameras can adapt their modes (to normal or infrared night mode) based
on whether it is day or night.

Self-Configuring: IoT devices may have self-configuring capability, allowing a large number of
devices to work together to provide certain functionality. These devices have ability configure
themselves, setup the networking and fetch latest software upgrades with minimal manual
intervention.

Interoperable Communication Protocols: IoT devices may support a number of interoperable


communication protocols and can communicate with other devices and also with infrastructure.

Unique Identity: Each of IoT device has unique identity and a unique identifier (Such as IP address
or URI) IoT systems may have intelligent interfaces which adapt based on the context, allow
communicating with users and environmental contexts.

3
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

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 hence the capability to describe themselves to other devices or user applications. For example,
a weather monitoring node can describe its monitoring capabilities to another connected node so
that they can communicate and exchange data. Integration into the information network helps in
making the IoT systems “smarter” due to collective intelligence.

Physical design of IoT


Things in IoT
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 tasks locally and other tasks within the IoT infrastructure, based on
temporal and space constraints

An IoT device can collect various types of data from the on-board or attached sensors, such as
temperature, humidity etc. 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 the
other physical entities (including non-IoT devices and systems) in the vicinity of the device. For
example, a relay switch connected to an IoT device can turn an appliance on/off based on the
commands send to the IoT device over the Internet.

IoT devices can also be of varied types, for instance, wearable sensors, smart watches, LED lights,
automobiles and industrial machines. Almost all IoT devices generate data in some form or the
other which when processed by data analytic systems leads to useful information.

4
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

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.

IoT Protocols

There are various protocols at different layers of the IoT:


Link Layer
• 802.3 – Ethernet

5
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

• 802.11 – Wi-Fi
• 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
A brief description of the protocols is given below.

Link Layer Protocols:


Link layer protocols determine how the data is physically send over the networks physical layer
or medium. The scope of link layer is the local network connection to which the host is attached.
Let us examine some useful link layer protocols in the context of IoT.

802.3- Ethernet: IEEE 802.3 is a collection of wired Ethernet standards for the link layer. For
example, 802.3 is the standard for 10BASE5 Ethernet that uses co-axial cable as shared
medium, 802.3.i is the standard for 10BASET Ethernet over copper twisted pair connections,
802.3.j is the standard for 10BASEF Ethernet over optic fibre connections and so on.

802.11-WiFi: IEEE 802.11 is a collection of Wireless Local Area Network (WLAN)


communication standards, including extensive description of link layer. For example, 802.11a
operates in the 5GHz band, 802.11b and 802.11g operate in the 2.4 GHz band, 802.11n operates
in the 2.4/5 GHz band, 802.11ac operates in the 5GHz band and 802.11ad operates in the 60
GHz band. These standards provide data rates from 1 Mbps to 6.75 Gbps.

802.16-WiMax: IEEE 802.16 is a collection of wireless broad band standards including


extensive description for the link layer. WiMAX standard provide data rates from 1.5 Mbps to

6
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

1Gbps. The recent update (802.16m) provides data rates of 100 Mbps for mobile stations and
1 Gbps for fixed stations.

802.15.4-LR-WAN: IEEE 802.15.4 is a collection of standards for Low Rate Wireless Personal
Area Networks(LR-WPAN). These standards form the basis of specifications for high level
communication protocols such as ZigBee. LR-WPAN standards provide data rates from
40Kbps to 250 Kbps. These standards provide low cost and low-speed communication for
power constrained devices.

2G/3G/4G-Mobile Communication: These are different generations of mobile communication


standards including 2nd generation (2G including GSM and CDMA), 3rd generation (3G
including UMTS and CDMA2000) and 4th generation (4G-including LTE). IoT devices based
on these standards communicate over cellular networks. Data rates for these standards range
from 9.6 kbps (for 2G) to up to 100 mbps (for 4G).

Network/Internet Layer
The network layers are responsible for sending IP datagrams from the source network to the
destination network. This layer performs the host addressing and packet routing. Some useful
protocols in the context of IoT are IPv4, IPv6 and 6LoWPAN.
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 32-bit
address scheme that allows a total of 232 addresses. As more and more devices got connected
to the internet, these addressed got exhausted in the year 2011. IPv4 has been succeeded by
IPv6.
IPv6: Internet Protocol version 6 is the newest version of the Internet protocol. It uses 128-bit
address scheme that allows a total of 2128 addresses.
6LoWPAN: IPv6 over Low Power Wireless Personal Area Networks(6LoWPAN) protocol
brings IP protocol to the low power devices which have limited processing capabilities.
6LoWPAN operates in the 2.4 GHz band and provides data transfer rates of 250 kbps. It works
with the 802.15.4 link layer protocol.
Transport layer protocols
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.
The widely used transport protocols are TCP and UDP.
TCP: Transmission Control Protocol (TCP) is the most widely used transport protocol, that is
used by web browsers (along with HTTP, HTTPS application layer protocols), email
programs and file transfer(FTP). TCP is a connection oriented and stateful protocol. TCP
ensures reliable transfer of packets in order. It also provides error detection capability, Flow
control capability and Congestion control capability.
UDP: User Datagram Protocol(UDP): Unlike TCP, which requires carrying out an initial
setup procedure, UDP is a connection-less 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. It is a transaction oriented and stateless protocol. It doesn’t provide
guaranteed delivery, ordering of messages and duplicate eliminations.
7
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

Application layer protocols


Application layer protocols define how the applications interface with lower layer protocols
to send the data over the network. Some useful application layer protocols in the context of
IoT are: HTTP, CoAP, WebSocket, MQTT, XMPP, DDS and AMQP.
HTTP: Hyper Text Transfer Protocol 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 when a client sends a request to a server using HTTP commands. It is a stateless
protocol and each request is independent of other requests. HTTP uses Universal Resource
Identifiers (URIs) to identify HTTP resources.
CoAP: Constrained Application Protocol (CoAP) is for Machine-to-Machine (M2M)
applications meant for constrained environments with constrained devices and constrained
networks. Like HTTP, CoAP is a web transfer protocol and uses Request-Response model,
however it runs on top of UDP instead of TCP.
WebSocket: WebSocket allows full duplex communication over a single socket connection
for sending messages between client and Server. WebSocket is based on TCP and allows
streams of messages to be sent back and forth between the client and the server while keeping
the TCP connection open. The client can be a browser, a mobile application or an IoT device.
MQTT: Message Queue Telemetry Transport (MQTT) is a high weight messaging protocol
based on the Publish-Subscribe model. MQTT uses a Client-Server architecture when the
client connects to the server and publishes messages to topics on server. This protocol is well
suited for constrained environments where the devices have limited processing and memory
resources, and the network bandwidth is low.
XMPP: Extensible Messaging and Presence Protocol (XMPP) is for real time communication
and streaming XML data between network entities. It allows sending small chunks of XML
data from one network entity to another in near real time. It is a decentralized protocol and
uses Client-Server architecture.
DDS: Data Distribution Service(DDS) is a data centric middleware standard for device-to-
device for Machine-to-Machine connections. It uses a Publish-Subscribe model where
publishers create topics to which subscribers can subscribe. It provides Quality of
Service(QoS) control and configurable reliability.
AMQP: Advanced Message Queuing Protocol (AMQP) is an open application layer protocol
for business messaging. It supports both point-to-point and publisher-subscriber models,
routing and queuing. AMQP broker receive messages from publishers and route them over
connections to consumers.

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 of a number of
functional blocks that provide the system the capabilities for identification, sensing, actuation,
communication, and management.
8
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

Functional Blocks of IoT


Device: An IoT system comprises devices that provide, sensing, actuation, monitoring and control
functions.

Communication: This 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 services for device discovery

Management: It provides various function to govern the IoT system Security: It secures the IoT
system and providing functions such as authentication, authorization, message and content integrity
and data security.

Application: IoT application provides an interface that the users can use to control and monitor
various aspect of the IoT system. It also allows users to view the system status and view or analyze
the processed data

IoT Communication Models:


Request –Response Model:

Request-response communication model

9
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

 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.

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.

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.
10
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

Exclusive Pair communication model:

 Exclusive Pair is a bidirectional, fully duplex communication model that uses a


persistent connection between the client and server.
 Once the connection is setup 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.

IoT Communication APIs


There are two types of IoT Communciation APIs
1) REST-based Communication APIs : Representational State Transfer:
2) WebSocket-based Communication APIs : Full Duplex communication
IoT APIs are the points of interaction between an IoT device and the internet and/or other elements
within the network.

11
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

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.
 The REST architectural constraints apply to the components, connectors, and data elements,
within a distributed hypermedia system (hypermedia system -a multimedia system in which
related items of information are connected and can be presented together)

The REST architectural constraints are as follows.

 Client-Server: The principal behind the client –server constraint is the separation of
concerns. For example, client should not be concerned with the storage of data which is a
concern of the server.
 Stateless: Each request from client to server must contain all the information necessary to
understand the request and cannot take any advantage of any stored context on the server.
 Cache-able: Cache constraint requires that the data within a response to a request be
implicitly or explicitly labelled as cache-able or non-cacheable. If a response is cache-able,
then a client cache is given the right to reuse that response data for later, equivalent requests.
 Layered System: Constraint the behaviour of components such that each component cannot
see beyond the immediate layer with which they are interacting.
 Uniform Interface: Uniform interface constraint requires that the method of communication
between client and server must be uniform. Recourses are identified in the request are by
(URIs in web based systems) and themselves separate from the representation 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.

RESTful Web Services are basically REST Architecture based Web Services. In REST
Architecture everything is a resource. RESTful web services are light weight, highly scalable
and maintainable and are very commonly used to create APIs for web-based applications.

A RESTful web service is a” Web API” implemented using HTTP and REST principles. REST
is most popular IoT Communication APIs.

The request-response communication protocol between client and server using REST APIs is
show below.

12
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

The resources in RESTful web services are represented by URIs.

HTTP Request methods and actions

13
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

The RESTful web API has a base URI, for example, http://api.example.com/device-
management/managed-devices/{device-id}. The clients send requests to these URIs using the
methods defined by the HTTP protocol as shown in the table above.

A RESTful web service can support various internet media types like JSON, IPSO etc. JSON is the
most popular one.

WebSocket-based Communication APIs:

WebSocket APIs allow bi- directional, full duplex communication between clients and servers

WebSocket APIs follow the exclusive pair communication model

 WebSocket APIs allow bi-directional, full duplex communication between clients and
servers. WebSocket APIs follow the exclusive pair communication model.
 Unlike request-response model such as REST, the WebSocket APIs allow full duplex
communication and do not require new connection to be setup for each message to be
sent. WebSocket communication begins with a connection setup request sent by the
client to the server.
 The request (called WebSocket handshake) is sent over HTTP and the server interprets
it is an upgrade request.
 If the server supports WebSocket protocol, the server responds to the WebSocket
handshake response.
 After the connection setup client and server can send data/messages to each other in
full duplex mode.
 WebSocket API reduce the network traffic and latency as there is no overhead for
connection setup and termination requests for each message.

14
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

 WebSocket suitable for IoT applications that have low latency or high throughput
requirements. So Web socket is most suitable IoT Communication APIs for IoT
System.

IoT Levels & Deployment Templates


An IoT system comprises of the following components:

Device: An IoT device allows identification, remote sensing, actuating and remote monitoring
capabilities. You learned about various examples of IoT devices in section Resource: Resources
are software components on the IoT device for accessing, processing, and storing sensor
information, or controlling actuators connected to the device. Resources also include the software
components that 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. Controller service sends data from the device to the web service and
receives commands from the application (via web services) for controlling the device.

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. Web service can be either implemented using HTTP and REST principles
(REST service) or using WebSocket protocol (WebSocket service).

Analysis Component: The Analysis Component is responsible for analysing the IoT data and
generate results in a form which are 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
view 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.
 Example: Home Automation.

15
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

IoT Level-2

16
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

 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 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 itself.
 Example: Smart Irrigation.

IoT Level-3

 A level-3 IoT system has a single node. Data is stored and analysed in the cloud and
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.
 Example: System for tracking courier shipment system

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.
 Level-4 contains local and cloud- based observer nodes which can subscribe to and receive
information collected in the cloud from IoT devices.

17
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

 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.
 Example: Pollution Monitoring System
o The system consists of multiple nodes at different locations.
o The nodes are equipment with gaseous sensors and are independent of each other.
o Each node runs its controller service and send data to the cloud for storing.
o The analysis of data collected from a number of nodes is done in the cloud.
o A cloud-based application is used for visualization the data.

IoT Level-5
 A level-5 IoT system has multiple end nodes and one coordinator node.
 The end nodes that perform sensing and/or actuation.
 Coordinator node collects data from the end nodes and sends to the cloud.
 Data is stored and analysed in the cloud and 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.
 Example: Fire detection System
o The System consists of multiple nodes in different locations for monitoring flame,
temperature, humidity and gaseous levels in that locations.
o The end nodes are equipped with various sensors flame sensor, temperature,
humidity sensor and gaseous sensor.
o The coordinator node collects the data from the end nodes and act as a gateway that
provides internet connectivity to the system.

18
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

o The controller service on the controller device sends the collected data to the cloud
for storing in cloud database.
o The analysis of data I done in the cloud computing to aggregate the data and make
predictions.
o A cloud based application is used for victualing the data.

IoT Level-6

19
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

 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 application is cloud-based.
 The analytics component analyses 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.
 Example: Weather monitoring System
o It consists of multiple nodes placed indifferent locations for monitoring temperature,
humidity and pressure in an area.
o The end nodes are equipped with various sensors.
o The end nodes are send the data to the cloud real time using a WebSocket service

Technology behind IoT


The following entities provide a diverse technology environment and are examples of technologies,
which are involved in IoT.

 Hardware (Arduino Raspberry Pi, Intel Galileo, Intel Edison, ARM mBed, Bosch XDK110,
Beagle Bone Black and Wireless SoC)
 Integrated Development Environment (IDE) for developing device software, firmware and APIs
 Protocols [RPL, CoAP, RESTful HTTP, MQTT, XMPP (Extensible Messaging and Presence
Protocol)]
 Communication (Powerline Ethernet, RFID, NFC, 6LowPAN, UWB, ZigBee, Bluetooth, Wi-Fi,
WiMAX, 2G/3G/4G)
 Network backbone (IPv4, IPv6, UDP and 6LowPAN)
 Software (RIOT OS, Contiki OS, Thingsquare Mist firmware, Eclipse IoT)
 Internetwork Cloud Platforms/Data Centre (Sense, ThingWorx, Nimbits, Xively, openHAB, AWS
IoT, IBM BlueMix, CISCO IoT, IOx and Fog, EvryThng, Azure, TCS CUP)
 Machine learning algorithms and software. An example of machine-learning software is GROK
from Numenta Inc. that uses machine intelligence to analyse the streaming data from clouds and
uncover anomalies, has the ability to learn continuously from data and ability to drive action from
the output of GROK’s data models and perform high level of automation for analysing streaming
data.

The following five entities can be considered for the five levels behind an IoT system:

1. Device platform consisting of device hardware and software using a microcontroller (or SoC
or custom chip), and software for the device APIs and web applications

2. Connecting and networking (connectivity protocols and circuits) enabling internetworking of


devices and physical objects called things and enabling the internet connectivity to remote servers

3. Server and web programming enabling web applications and web services

20
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

4. Cloud platform enabling storage, computing prototype and product development platforms

5. Online transactions processing, online analytics processing, data analytics, predictive analytics
and knowledge discovery enabling wider applications of an IoT system

Major components of IoT devices are:


1. Physical object with embedded software into a hardware.

2. consisting of a microcontroller, firmware, sensors, control unit, actuators and communication


module.

3. Communication module: Software consisting of device APIs and device interface for
communication over the network and communication circuit/port(s), and middleware for creating
communication stacks using 6LowPAN, CoAP, LWM2M, IPv4, IPv6 and other protocols.

4. for actions on messages, information and commands which the devices receive and then output
to the actuators, which enable actions such as glowing LEDs, robotic hand movement etc.

Sensors and Control Units


Sensors: Sensors are of two types. The first type gives analog inputs to the control unit. Examples
are thermistor, photoconductor, pressure gauge and Hall sensor. The second type gives digital
inputs to the control unit. Examples are touch sensor, proximity sensor, metal sensor, traffic
presence sensor, rotator encoder for measuring angles and linear encoders for measuring linear
displacements.

Control Units: Most commonly used control unit in IoT consists of a Microcontroller Unit
(MCU) or a custom chip. A microcontroller is an integrated chip or core in a VLSI or SoC.
Popular microcontrollers are ATmega 328, ATMega 32u4, ARM Cortex and ARM LPC.

Communication Module
A communication module consists of protocol handlers, message queue and message cache. A
device message-queue inserts the messages in the queue and deletes the messages from the queue
in a first-in first-out manner. A device message-cache stores the received messages. Example:
REST over HTTP.

Software:
IoT software consists of two components—software at the IoT device and software at the IoT
server. Example: APIs

Middleware:
It enables communication with sensor clouds as well as cloud-based ‘sensing as a service’.
Examples: OpenIoT, IoTSyS.

Operating Systems (OS)


Examples of OSs are RIOT, Raspbian, AllJoyn, Spark and Contiki.

21
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

Firmware:
Thingsquare Mist is an open-source firmware (software embedded in hardware) for true Internet-
connectivity to the IoT. It enables resilient wireless mesh networking. Several microcontrollers
with a range of wireless radios support Things MIST.

Development Tools and Open-source Framework for IoT Implementation:


Examples: Eclipse IoT, Arduino, Kinoma.

APIs and Device Interfacing Components:

Platforms and Integration Tools:


ThingSpeak: is an open data platform with an open API. It consists of APIs that enable real-time
data collection, geolocation data, data processing and visualisations. It enables device status
messages and plugins. It can process HTTP requests and store and process data. It can integrate
multiple hardware and software platforms. It supports Arduino, Raspberry Pi,
ioBridge/RealTime.io, and Electric Imp. An important feature of ThingSpeak is the support to
MATLAB data analytics, mobile, web applications and social networks.

Nimbits is a cloud platform which supports multiple programming languages, including Arduino,
JavaScript, HTML or the Nimbits.io Java library. The software deploys on Google App Engine,
any J2EE server on Amazon EC2 or Raspberry Pi. It processes a specific type of data and can
also store the data. The data can be time- or geo-stamped. IoT Toolkit offers Smart Object API,
HTTP-to-CoAP Semantic mapping and a variety of tools for integrating multiple IoT-related
sensor networks and protocols.

SiteWhere provisions a complete platform for managing IoT devices. It enables gathering of data
and integrating it with external systems. SiteWhere can be used on Amazon’s cloud or
downloaded. It also integrates MongoDB, ApacheHBase and multiple big data tools.12

22
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

Sources of the IoT


Popular IoT Development Boards:
Arduino Yún board uses microcontroller ATmega32u4 that supports Arduino and includes Wi-Fi,
Ethernet, USB port, micro-SD card slot and three reset buttons. The board also combines with
Atheros AR9331 that runs Linux.

Microduino: Microduino is a small board compatible with Arduino that can be stacked with the other
boards. All the hardware designs are open source.

Intel Galileo: Intel Galileo is a line of Arduino-certified development boards. Galileo is based on
Intel x86 architecture. It is open-source hardware that features the Intel SOC X1000 Quark based
Soc. Galileo is pin-compatible with Arduino. It has 20 digital I/O (12 GPIOs fully native), 12-bit
PWM for more precise control, six analog inputs and supports power over Ethernet (PoE).

Intel Edison Intel Edison19 is a compute module. It enables creation of prototypes and fast
development of prototyping projects and rapidly produces IoT and wearable computing devices. It
enables seamless device internetworking and device-to-cloud communication. It includes
foundational tools. The tools collect, store and process data in the cloud, and process rules on the data
stream. It generates triggers and alerts based on advanced analytics.

Beagle Board Beagle Bone based board has very low power requirement. It is a card-like computer
which can run Android and Linux. Both the hardware designs and the software for the IoT devices
are open source.

Raspberry Pi Wireless Inventors Kit (RasWIK) RasWIK enables Raspberry Pi Wi-Fi connected
devices. It includes documentation for 29 different projects or you can come up with one of your
own. There is a fee for the devices but all of the included code is open source, and you can use it to
build commercial products as well.

Role of RFID and IoT Applications


Earlier IoT systems were internet-connected RFID based systems. RFID enables tracking and
inventory control, identification in supply chain systems, access to buildings and road tolls or secured
store centre entries, and devices such as RFID-based temperature sensors. RFID networks have new
applications in factory design, 3PL-management, brand protection, and anti-counterfeiting in new
business processes for payment, leasing, insurance and quality management.

Wireless Sensor Networks (WSNs):


Sensors can be networked using wireless technology and can cooperatively monitor physical or
environmental conditions. Sensors acquire data from remote locations, which may not be easily
accessible. Each wireless sensor also has communication abilities for which it uses a radio-frequency
transceiver. Each node either has an analog sensor with signal conditioner circuit or a digital sensor.
Sensing can be done to monitor temperature, light intensity, presence of darkness, metal proximity,
traffic, physical, chemical and biological data etc.

23
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

WSN Definition Wireless Sensor Network (WSN) is defined as a network in which each sensor node
connects wirelessly and has capabilities of computations for data compaction, aggregation and
analysis plus communication and networking. WSN node is autonomous. Autonomous refers to
independent computing power and capability to send requests and receive responses, and data
forward and routing capabilities.

IoT Network Architecture and Design


Drivers Behind New Network Architectures
The traditional network architectures for IT have served us well for many years, but they are not
well suited to the complex requirements of IoT. These differences and challenges are driving
fundamentally new architectures for IoT systems. The key difference between IT and IoT is the
data. While IT systems are mostly concerned with reliable and continuous support of business
applications such as email, web, databases, CRM systems, and so on, IoT is all about the data
generated by sensors and how that data is used. The essence of IoT architectures thus involves
how the data is transported, collected, analysed, and ultimately acted upon.

Challenge Description IoT Architectural Change


Required

Scale The massive scale of IoT end The IPv4 Address space has
Points is far Beyond that of reached exhaustion and is unable
Typical IT Networks. to meet IoT’s scalability
requirements. Scale can be met
only by using IPv6.

Security IoT devices, especially those Security is required at every level


on wireless sensor networks of the IoT network. Every IoT
are often physically exposed endpoint node on the network
to the world. must be part of the overall security
strategy and must support device-
level authentication and link
encryption. It must also be easy to
deploy with some type of a zero-
touch deployment model

Devices and networks Due to the massive scale and New last-mile wireless
longer distances, the networks technologies are needed to support
Constrained by power, are often constrained. Lossy constrained IoT devices over long
CPU, memory, and link and capable of supporting distances.
Speed. only minimal data rates. (tens
of bps to hundreds of Kbps) The network is also constrained,
meaning modifications need to be
made to traditional network layer
transport mechanisms.

24
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

The massive volume of The sensors generate a Data analytics capabilities need to
data generated massive amount of data on be distributed throughout the IoT
daily basis, causing the networks, from the edge to the
network bottlenecks and slow cloud. In traditional IT networks,
analytics in the cloud. analytics and Applications
typically run only in the cloud.

Support for legacy An IoT network often Digital transformation is a long


devices comprises a collection of process that may take many years,
modern, IP-capable endpoints and IoT networks need to support
as well as legacy, non-IP protocol translation and/or
devices that rely on serial or tunnelling mechanisms to support
proprietary protocols. legacy protocols over standards-
based protocols, such as Ethernet
and IP.

The need for data to be Whereas traditional IT Analytics software needs to be


analysed in real time networks perform scheduled positioned closer to the edge and
batch processing of data, IoT should support real-time
data needs to be analysed and streaming analytics.
responded to in real-time

Scale:
The scale of a typical IoT Network is on the order of several thousand devices/nodes to a few
million end devices/nodes. IoT introduces a model where an average -sized utility, factory,
system, or city could easily be asked to support a network of this scale. Based on scale
requirements of this order, IPv6 is the natural foundation for the IoT network layer.

Security:
The frequency and impact of cyber-attacks in recent years has increased dramatically. We have
already seen evidence of targeted malicious attacks using vulnerabilities in networked machines,
such as the outbreak of the Stuxnet worm, which specifically affected Siemens programmable
logic controller (PLC) systems. However, despite all the efforts mustered to protect networks and
data, hackers still find ways to penetrate trusted networks. However, IoT endpoints are often
located in wireless sensor networks that use unlicensed spectrum and are not only visible to the
world through a spectrum analyser but often physically accessible and widely distributed in the
field.

Example: On December 23, 2015 at 3:30 pm, the Ukrainian power grid experienced an
unprecedented cyber-attack that affected approximately 225,000 customers. This attack wasn’t
simply carried out by a group of opportunistic thieves; it was a sophisticated, well-planned assault
on the Ukrainian power grid that targeted the SCADA (supervisory control and data acquisition)
system, which governs communication to grid automation devices. IoT systems require

25
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

consistent mechanisms of authentication, encryption, and intrusion prevention techniques that


understand the behaviour of industrial protocols and can respond to attacks on critical
infrastructure.

The IoT systems must:

 Be able to identify and authenticate all entities involved in the IoT service (that is, gateways,
endpoint devices, home networks, roaming networks, service platforms)
 Ensure that all user data shared between the endpoint device and back-end applications is
encrypted
 Comply with local data protection legislation so that all data is protected and stored correctly
 Utilize an IoT connectivity management platform and establish rules-based security policies
so immediate action can be taken if anomalous behaviour is detected from connected devices
 Take a holistic, network-level approach to security

Constrained Devices and Networks:


Most IoT sensors are designed for a single job, and they are typically small and inexpensive. This
means they often have limited power, CPU, and memory, and they transmit only when there is
something important. Because of the massive scale of these devices and the large, uncontrolled
environments where they are usually deployed, the networks that provide connectivity also tend
to be very lossy and support incredibly low data rates.

Data:
IoT devices generate a mountain of data where the IoT data is like gold. This data enables
business to deliver new IoT services that enhance the customer experience, reduce cost, and
deliver new revenue opportunities. Although most IoT-generated data are unstructured, the
insights it provides through analytics can revolutionize processes and create new business
models.

Legacy device support:


In IoT systems end devices are likely to be on the network for an exceptionally long time
sometimes decades. As IoT networks are deployed, they need to support the older devices already
present on the network, as well as devices with new capabilities. In many cases, legacy devices
are so old that they do not even support IP. Thus, IoT network must either be capable of some
type of protocol translation or use a gateway device to connect these legacy endpoints to the IoT
network.

Example: A factory may replace machines only once every 20 years—or perhaps even longer! It
does not want to upgrade multi-million-dollar machines just so it can connect them to a network
for better visibility and control.

26
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

Comparing IoT architectures:


Two of the best-known architectures are those supported by oneM2M and the IoT World Forum (IoTWF).

The oneM2M IoT Standardized Architecture:


In 2012, European Telecommunications Standards Institute (ETSI) ETSI and 13 other founding
members launched oneM2M as a global initiative designed to promote efficient M2M communication
systems and IoT.

The goal of oneM2M is to create a common services layer, which can be readily embedded in field
devices to allow communication with application servers.

oneM2M’s framework focuses on IoT services, applications, and platforms. These include smart
metering applications, smart grid, smart city automation, e-health, and connected vehicles.

By developing a horizontal platform architecture, oneM2M is developing standards that allow


interoperability at all levels of the IoT stack.

The oneM2M architecture divides IoT functions into three major domains: the application layer, the
services layer, and the network layer.

Applications layer: The oneM2M architecture gives major attention to connectivity between devices
and their applications. This domain includes the application-layer protocols and attempts to
standardize northbound API definitions for interaction with business intelligence (BI) systems.
Applications tend to be industry-specific and have their own sets of data models, and thus they are
shown as vertical entities.

27
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

Services layer: This layer is shown as a horizontal framework across the vertical industry
applications. At this layer, horizontal modules include the physical network that the IoT
applications run on, the underlying management protocols, and the hardware. Examples include
backhaul communications via cellular, MPLS networks, VPNs, and so on.

Network layer: This is the communication domain for the IoT devices and endpoints. It includes
the devices themselves and the communications network that links them. Embodiments of this
communications infrastructure include wireless mesh technologies, such as IEEE 802.15.4, and
wireless point-to-multipoint systems, such as IEEE 801.11ah. Also included are wired device
connections, such as IEEE 1901 power line communications.

The IoT World Forum (IoTWF) Standardized Architecture


In 2014 the IoTWF architectural committee (led by Cisco, IBM, Rockwell Automation, and others)
published a seven-layer IoT architectural reference model.

While various IoT reference models exist, the one put forth by the IoT World Forum offers a clean,
simplified perspective on IoT and includes edge computing, data storage, and access.

It provides a succinct way of visualizing IoT from a technical perspective. Each of the seven layers
is broken down into specific functions, and security encompasses the entire model.

Layer 1: Physical Devices and Controllers Layer

The first layer of the IoT Reference Model is the physical devices and controllers layer. This layer
is home to the “things” in the Internet of Things, including the various endpoint devices and sensors
that send and receive information. The size of these “things” can range from almost microscopic
sensors to giant machines in a factory. Their primary function is generating data and being capable
of being queried and/or controlled over a network.

28
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

Layer 2: Connectivity Layer

In the second layer of the IoT Reference Model, the focus is on connectivity. The most important
function of this IoT layer is the reliable and timely transmission of data. More specifically, this
includes transmissions between Layer 1 devices and the network and between the network and
information processing that occurs at Layer 3 (the edge computing layer).

Layer 3: Edge Computing Layer

Edge computing is the role of Layer 3. Edge computing is often referred to as the “fog” layer. At
this layer, the emphasis is on data reduction and converting network data flows into information
that is ready for storage and processing by higher layers. One of the basic principles of this
reference model is that information processing is initiated as early and as close to the edge of the
network as possible. Figure 2-4 highlights the functions handled by Layer 3 of the IoT Reference
Model.

Figure 2-4 IoT Reference Model Layer 3 Functions

29
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

Upper Layers: Layers 4–7

A Simplified IoT Architecture


Simplified IoT Architecture is an IoT framework that highlights the fundamental building blocks that
are common to most IoT systems and which is intended to help you in designing an IoT network.
This framework is presented as two parallel stacks: The IoT Data Management and Compute Stack
and the Core IoT Functional Stack. Reducing the framework down to a pair of three layer stacks in
no way suggests that the model lacks the detail necessary to develop a sophisticated IoT strategy.
Rather, the intention is to simplify the IoT architecture into its most basic building blocks and then
to use it as a foundation to understand key design and deployment principles that are applied to
industry-specific use cases. All the layers of more complex models are still covered, but they are
grouped here in functional blocks that are easy to understand. Figure 2-6 illustrates the simplified IoT
model.

Unlike other models, the framework presented here separates the core IoT and data management into
parallel and aligned stacks, allowing you to carefully examine the functions of both the network and
the applications at each stage of a complex IoT system. This separation gives you better visibility
into the functions of each layer.

30
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

The Core IoT Functional Stack has three layers: The IoT sensors and actuators, networking
components, and applications and analytics layers. The networking components and applications
layers involve several sublayers corresponding to different parts of the overall IoT system.

The IoT Data Management and Compute Stack deals with how and where data is filtered, aggregated,
stored, and analyzed. In traditional IT models, this occurs in the cloud or the data center. However,
due to the unique requirements of IoT, data management is distributed as close to the edge as possible,
including the edge and fog layers.

The Core IoT Functional Stack:


“Things” layer: At this layer, the physical devices need to fit the constraints of the environment in
which they are deployed while still being able to provide the information needed.

Communications network layer: When smart objects are not self-contained, they need to
communicate with an external system. In many cases, this communication uses a wireless technology.
This layer has four sublayers:

Access network sublayer: The last mile of the IoT network is the access network. This is
typically made up of wireless technologies such as 802.11ah, 802.15.4g, and LoRa. The
sensors connected to the access network may also be wired.

Gateways and backhaul network sublayer: A common communication system organizes


multiple smart objects in a given area around a common gateway. The gateway
communicates directly with the smart objects. The role of the gateway is to forward the
collected information through a longer-range medium (called the backhaul) to a headend
central station where the information is processed. This information exchange is a Layer 7
(application) function, which is the reason this object is called a gateway. On IP networks,
this gateway also forwards packets from one IP network to another, and it therefore acts as a
router.

Network transport sublayer: For communication to be successful, network and transport


layer protocols such as IP and UDP must be implemented to support the variety of devices
to connect and media to use.

31
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

IoT network management sublayer: Additional protocols must be in place to allow the
headend applications to exchange data with the sensors. Examples include CoAP and MQTT.

Application and analytics layer: At the upper layer, an application needs to process the collected
data, not only to control the smart objects when necessary, but to make intelligent decision based on
the information collected and, in turn, instruct the “things” or other systems to adapt to the analyzed
conditions and change their behaviors or parameters.

The IoT Data Management and Compute Stack


Cloud computing:

Cloud computing refers to the on-demand delivery of IT services/resources over the internet. On-
demand computing service over the internet is nothing but cloud computing. By using cloud
computing users can access the services from anywhere whenever they need.

Nowadays, a massive amount of data is generated every second around the globe. Businesses collect
and process that data from the people and get analytics to scale their business. When lots of
organizations access their data simultaneously on the remote servers in data centers, data traffic might
occur. Data traffic can cause some delay in accessing the data, lower bandwidth, etc. But cloud
computing technology alone is not effective enough to store and process massive amounts of data
and respond quickly.

For example, in the Tesla self-driving car, the sensor constantly monitors certain regions around the
car. If it detects an obstacle or pedestrian on its way, then the car must be stopped or move around
without hitting. When an obstacle is on its way, the data sent through the sensor must be processed
quickly and help the car to detect before it hits. A little delay in detection could be a major issue. To
overcome such challenges, edge computing and fog computing are introduced.

Edge Computing:

Computation takes place at the edge of a device’s network, which is known as edge computing. That
means a computer is connected with the network of the device, which processes the data and sends
the data to the cloud in real-time. That computer is known as “edge computer” or “edge node”.

With this technology, data is processed and transmitted to the devices instantly. Yet, edge nodes
transmit all the data captured or generated by the device regardless of the importance of the data.

Example of Edge computing:

 Autonomous vehicle edge computing devices collect data from cameras and sensors on the vehicle,
process it, and make decisions in milliseconds, such as self-parking cars.

 In order to accurately assess a patient’s condition and foresee treatments, data is processed from
a variety of edge devices connected to sensors and monitors.

Here Fog Computing was introduced and becomes an ideal solution.

Fog Computing
32
Department of Computer Science and Engineering
VII Semester CSE [B20CS4103] Internet of Things
Lecture Notes

Fog computing is an extension of cloud computing. It is a layer in between the edge and the cloud.
When edge computers send huge amounts of data to the cloud, fog nodes receive the data and analyze
what’s important. Then the fog nodes transfer the important data to the cloud to be stored and delete
the unimportant data or keep them with themselves for further analysis. In this way, fog computing
saves a lot of space in the cloud and transfers important data quickly.

END OF UNIT 1

33
Department of Computer Science and Engineering

You might also like