IoT All 5 Units Notes (Q&A)
IoT All 5 Units Notes (Q&A)
1. Describe the IoT enabling Technologies & M2M Communication with suitable
explanations.
2. Explain IoT World Forum standardized reference model.
3. Summarize in detail IoT data management and Compute stack.
4. Explain the Core IoT Functional stack in simplified IoT Architecture.
5. Discuss the following in detail
i. Sensors and Actuators.
ii. Connecting Smart Objects.
6. Explain the various functional blocks of IoT eco systems.
7. Identify the IoT Networking considerations and Challenges in IOT
Ans: The Internet of Things (IoT) describes the network of physical objects—“things”—that are
embedded with sensors, software, and other technologies for the purpose of connecting and exchanging
data with other devices and systems over the internet.
1
.
3. Big Data Analytics: It refers to the method of studying massive volumes of data or big data.
Collection of data whose volume, velocity or variety is simply too massive and tough to store,
control, process and examine the data using traditional databases.
Big data is gathered from a variety of sources including social network videos, digital images,
sensors and sales transaction records.
Several steps involved in analyzing big data –
1. Data cleaning
2. Data wrangling(converting data from one format to other)
3. Processing
4. Visualization
Examples –
Bank transactions
Data generated by IoT systems for location and tracking of vehicles
E-commerce and in Big-Basket
Health and fitness data generated by IoT system such as a fitness bands
4. Communications Protocols: They are the backbone of IoT systems and enable network
connectivity and linking to applications. Communication protocols allow devices to exchange
data over the network. Multiple protocols often describe different aspects of a single
communication. A group of protocols designed to work together is known as a protocol suite;
when implemented in software they are a protocol stack.
They are used in
1. Data encoding
2. Addressing schemes
5. Embedded Systems :
It is a combination of hardware and software used to perform special tasks.
It includes microcontroller and microprocessor memory, networking units (Ethernet Wi-Fi
adapters), input output units (display keyword etc. ) and storage devices (flash memory).
It collects the data and sends it to the internet.
2
Embedded systems used in
Examples –
1. Digital camera
2. DVD player, music player
3. Industrial robots
Ans: Machine-to-Machine, or M2M, refers to the direct communication between devices. They
may use wired or wireless communication channels without human intervention. The technology
allows point-to-point communication between machines, sensors, and hardware.
Common examples of machine-to-machine technology are controlling electrical devices like fans
and bulbs using Smartphone's Bluetooth. Here, the Smartphone and the electrical devices are the
two interacting devices. IoT is the successor of M2M technology. In other words, M2M serves as
the foundation for IoT.
• cost-effective
• easy to maintain
• improves customer service by proactive monitoring and servicing.
3
The oneM2M architecture divides IoT functions into three major domains:
• It supports Source end to end data control exchange between IoT devices and custom
applications by providing functions for proper identification authorization
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.
Ans: In 2014 the IoTWF architectural committee (led by Cisco, IBM, Rockwell Automation,
and others) published a seven-layer IoT architectural reference model.
• Each of the seven layers is broken down into specific functions, and security
encompasses the entire model.
• The IoT Reference Model defines a set of levels with control flowing from the center
(this could be either a cloud service or a dedicated data center), to the edge, which
includes sensors, devices, machines, and other types of intelligent end nodes.
4
Layer 1: 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.
Layer 2: Connectivity Layer
• The connectivity or transport layer transferring data from the physical layer to the cloud
and vice versa via networks and gateways.
• 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).
Functions
• Communication between Layer 1 devices
• Reliable Delivery of information across the network.
• Switching & Routing
• Translation between protocols
• Network level security
5
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.
• Information processing is initiated as early and as close to the edge of the network as
possible.
• Functions:
• Evaluate and Reformat Data for Processing at Higher Levels.
• Filter Data to reduce traffic higher level processing.
• Assess Data for Alerting, Notification, or Other Actions.
Layer 4: Data Accumulation
• Data in motion to data at rest.
• Data format is converted from network packets to database relational tables.
• Transforms event- based computing to query -based computing.
• Data is also reduced through filtering and selective storage.
Layer 5: Data Abstraction
• This level creates schemas and view of data in the
mannerthat application wants.
• Combines data from multiple sources.
• Simplifies, reformats data to serve client applications.
• It reconciles the differences in data shape, format, semantics, access protocol and
security.
Layer 6 & Layer 7
• Layer 6: Level control application and performs business intelligence and analytics.
• The application layer delivering solutions like analytics, reporting, and device control to
end users.
• Layer 7: Involves people and business process.
3. Summarize in detail IoT data management and Compute stack.
Ans : The IoT Data Management and Compute Stack
In most cases, the processing location is outside the smart object. A natural location for this
processing activity in a traditional IT model is the cloud. Smart objects need to connect to the
cloud, and data processing is centralized. These requirements include:
Minimizing Latency
Conserving Network Bandwidth
Increasing Local Efficiency
6
Minimizing Latency
Milliseconds matter for many types of industrial systems, such as when trying to prevent
manufacturing line shutdowns or restore electrical service.
To address these challenges, we need to distribute data management throughout the IoT system,
as close to the edge of the IP network as possible. The best-known embodiment of edge services
in IoT is Fog computing.
Fog Computing
An advantage of this structure is that the fog node allows intelligence gathering (such as
analytics) and control from the closest possible point, and in doing so, it allows better
performance over constrained networks. In one sense, this introduces a new layer to the
traditional IT computing model, one that is often referred to as the “fog layer.
7
The defining characteristic of fog computing are as follows:
Contextual location awareness and low latency: The fog node sits as close to the IoT
endpoint as possible to deliver distributed computing.
Wireless communication between the fog and the IoT endpoint: Wireless access is the
easiest when dealing with a large number of remote endpoints.
Use for real-time interactions: Important fog applications involve real-time interactions
rather than batch processing
Edge Computing
Edge computing is a physical compute infrastructure that is positioned on the spectrum between
the device and the hyper-scale cloud, supporting various applications. Edge computing brings
processing capabilities closer to the end user/device/source of data which eliminates the journey
to the cloud data center and reduces latency.
Edge computing is the architectural principle of moving services to locations where they can:
Yield lower latency to the end device to benefit application performance and improve the
quality of experience (QoE).
Implement edge offloading for greater network efficiency.
Perform computations that augment the capabilities of devices and reduce transport costs.
8
The Hierarchy of Edge, Fog, and Cloud
(How and where data is filtered, aggregated, stored, and analyzed)
This model suggests a hierarchical organization of network, compute, and data storage
resources. At each stage, data is collected, analyzed, and responded to when necessary,
according to the capabilities of the resources at each layer.
Edge and Fog thus require an abstraction layer that allows applications to communicate
with one another.
The abstraction layer exposes a common set of APIs for monitoring, provisioning, and
controlling the physical resources in a standardized way. The abstraction layer also
requires a mechanism to support virtualization, with the ability to run multiple operating
systems or service containers on physical devices to support multitenancy and application
consistency across the IoT system.
Ans: Every IoT published model includes core layers including things, communications
network and application layers. Framework represented here separates core IoT and Data
management in parallel & in aligned stack.
9
The Core IoT Functional Stack: The three major layers are:
1. Things layer
2. Communications network layer
1. Access network sub layer
2. Gateways and backhaul network sub layer
3. Network transport sub layer
4. IoT network management sub layer
3. Application and analytics layer
1. Things Layer
The physical devices need to fit the constraints of the environment in which they are deployed.
Most IoT networks start from the object, or ―things that needs to
be connected.
Battery powered
Mobile or Static
Low or High Reporting Frequency
Simple or Rich Data
Report Range
Object Density per cell
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 sub layers:
10
Access Network Sublayer: One key parameter determining the choice of
access technology is the range between the smart object and the information collector.
Data collected from a smart object may need to be forwarded to a central station where
data is processed.
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 head end central station where the information is processed.
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.
11
IoT Network Management Sublayer: Additional protocols must be in place to allow the
head end applications to exchange data with the sensors.
Actuators: On the other hand actuators are such devices which deliver physical quantity (like
force or motion) to the environment by converting source energy according to control signal
received that can be in electrical form. Here source energy can be pneumatic, hydraulic or
electric type and motion produced (by actuator) can be either linear or rotary. Actuator acts as
output device. For examples- different types of electric motor actuator, heaters, electro
12
pneumatic actuator, electro-hydraulic actuator, magnetic actuator etc. A block diagram of
actuator is shown below-
S.
Sensor Actuator
No.
Sensor converts physical quantities and Actuator converts electrical signals into
1
characteristics into electrical signals. physical action such as force and motion.
Sensor takes input from environment and Actuator takes input from output signal
3
senses surroundings condition. conditioning unit of system.
13
Actuators are often used to operate control
Sensors are often used to measure process valves, dampers, guide vanes, and to move
6 pressure, temperature, fluid levels, flow, objects from one place to another, to move
vibration, speed etc. conveyor belts in robotic arms movement
etc..
A smart object is an object that enhances the interaction with other smart objects as well as with
people also. Smart objects are, quite simply, the building blocks of IoT.
They transform everyday objects into a network of intelligent objects that are able to learn from
and interact with their environment in a meaningful way.
14
IoT devices and sensors must be connected to the network for their data to be utilized. In
addition to the wide range of sensors, actuators, and smart objects that make up IoT, there are
also a number of different protocols used to connect them. There are various access technologies
will be used for connecting smart objects.
The following are the parameters considered to select particular communication criteria.
Communications Criteria, describes the characteristics and attributes considered when selecting
and dealing with connecting smart objects.
1. Range
2. Frequency bands
3. Power consumption
4. Topology
5. Constrained devices
6. Constrained-Node networks
1. Range: Deals with how far the signal needs to be propagated. It Is usually considered when
dealing with Wireless Networks.
Short range: Supporting tens of meters of maximum distance between two devices.
Examples: Bluetooth or Visible Light Communications (VLC) as alternative of (wired) serial
cable.
Medium range: Supports the range of tens to hundreds of meters. The maximum distance is
generally less than 1 km between two devices.
Wireless examples are cellular (2G, 3G, 4G) and some applications of outdoor Wi-Fi and
Low-Power Wide-Area (LPWA) technologies.
2. Frequency bands: The radio spectrum is regulated by countries and organizations, such as the
International Telecommunication Union (ITU). These groups define the regulations and
transmission requirements. Focusing on IoT access technologies, the frequency bands
leveraged by wireless communications are split between licensed and unlicensed bands.
3. Power consumption: There is a clear delineation between powered nodes and battery
powered nodes.
15
A powered node has a direct connection to a power source, and communications are usually not
limited by power consumption criteria. However, ease of deployment of powered nodes is
limited by the availability of a power source, which makes mobility more complex.
Battery-powered nodes bring much more flexibility to IoT devices. These nodes are often
classified by the required lifetimes of their batteries.
4. Constrained devices: details the limitations of certain smart objects from a connectivity
perspective.
6. Topology: Various layouts that may be supported for connecting multiple smart objects.
16
Sensors:
These form the front end of the IoT devices. These are the so-called “Things” of the system.
Their main purpose is to collect data from its surroundings (sensors) or give out data to its
surrounding (actuators).
These have to be uniquely identifiable devices with a unique IP address so that they can be
easily identifiable over a large network.
These have to be active in nature which means that they should be able to collect real-time
data. These can either work on their own (autonomous in nature) or can be made to work by
the user depending on their needs (user-controlled).
Examples of sensors are gas sensor, water quality sensor, moisture sensor, etc.
Processors:
Processors are the brain of the IoT system. Their main function is to process the data
captured by the sensors and process them so as to extract the valuable data from the
enormous amount of raw data collected. In a word, we can say that it gives intelligence to the
data.
Processors mostly work on real-time basis and can be easily controlled by applications.
These are also responsible for securing the data – that is performing encryption and
decryption of data.
Embedded hardware devices, microcontroller, etc are the ones that process the data because
they have processors attached to it.
Gateways:
Gateways are responsible for routing the processed data and send it to proper locations for
its (data) proper utilization.
In other words, we can say that gateway helps in to and fro communication of the data. It
provides network connectivity to the data. Network connectivity is essential for any IoT
system to communicate.
Applications:
Applications form another end of an IoT system. Applications are essential for proper
utilization of all the data collected.
17
These cloud-based applications which are responsible for rendering the effective meaning
to the data collected. Applications are controlled by users and are a delivery point of
particular services.
Examples of applications are home automation apps, security systems, industrial control hub,
etc.
When you consider which networking technologies to adopt within your IoT application, be
mindful of the following constraints:
Range
Bandwidth
Power usage
Intermittent connectivity
Interoperability
Security
Range: Networks can be described in terms of the distances over which data is typically
transmitted by the IoT devices attached to the network:
PAN (Personal Area Network): PAN is short-range, where distances can be measured in
meters, such as a wearable fitness tracker device that communicates with an app on a cell
phone over BLE.
MAN (Metropolitan Area Network): MAN is long-range (city wide), where distances are
measured up to a few kilometers, such as smart parking sensors installed throughout a city that
are connected in a mesh network topology.
WAN (Wide Area Network): WAN is long-range, where distances can be measured in
kilometers, such as agricultural sensors that are installed across a large farm or ranch that are
used to monitor micro-climate environmental conditions across the property.
18
Bandwidth: Bandwidth is the amount of data that can be transmitted per unit of time. It limits
the rate at which data can be collected from IoT devices and transmitted upstream. Bandwidth is
affected by many factors, which include:
Power usage
Transmitting data from a device consumes power. Transmitting data over long ranges requires
more power than over a short range. You must consider the power source – such as a battery,
solar cell, or capacitor - of a device and its total lifecycle. A long and enduring lifecycle will not
only provide greater reliability but reduce operating cost.
Intermittent connectivity
IoT devices aren't always connected. In some cases, devices are designed to connect periodically.
However, sometimes an unreliable network might cause devices to drop off due to connectivity
issues. Sometimes quality of service issues, such as dealing with interference or channel
contention on a wireless network using a shared spectrum. Designs should incorporate
intermittent connectivity and seek any available solutions to provide uninterrupted service,
should that be a critical factor for IoT landscape design.
Interoperability
Devices work with other devices, equipment, systems, and technology; they are interoperable.
With so many different devices connecting to the IoT, interoperability can be a challenge.
Adopting standard protocols has been a traditional approach for maintaining interoperability on
the Internet.
Security
19
UNIT 2
IOT PROTOCOLS
1) Explain the topology & security of IEEE 802.15.4.
Ans:
• IEEE 802.15.4 is a wireless access technology for low-cost and low-data-rate devices that
are powered or run on batteries.
• This access technology enables easy installation using a compact protocol stack while
remaining both simple and flexible.
• Used for Low power, low cost and low speed communication between devices.
• IEEE 802.15.4 is commonly found in the following types of deployments:
• A minimum of one FFD acting as a PAN coordinator is required to deliver services that
allow other devices to associate and form a cell or PAN.
20
• FFD devices can communicate with any other devices, whereas RFD devices can
communicate only with FFD devices.
• The IEEE 802.15.4 specification does not define a path selection within the MAC layer for a
mesh topology. This function can be done at Layer 2 and is known as mesh-under.
• The routing function can occur at Layer 3, using a routing protocol, such as the IPv6 Routing
Protocol for Low Power and Lossy Networks (RPL). This is referred to as mesh-over.
• The IEEE 802.15.4 specification uses Advanced Encryption Standard (AES) with a
128-bit key length as the base encryption algorithm for securing its data.
• AES is a block cipher, which means it operates on fixed- size blocks of data.
• It is the most popular algorithms used in symmetric key cryptography. (A symmetric
key means that the same key is used for both the encryption and decryption of the data.)
• In addition to encrypting the data, AES in 802.15.4 also validates the data that is sent.
• This is accomplished by a message integrity code (MIC), which is calculated for the
entire frame using the same AES key that is used for encryption
• Enabling these security features for 802.15.4 changes the frame format slightly and
consumes some of the payload.
• Using the Security Enabled field in the Frame Control portion of the 802.15.4 header is
the first step to enabling AES encryption.
• This field is a single bit that is set to 1 for security.
• Once this bit is set, a field called the Auxiliary Security Header is created after the Source
Address field, by stealing some bytes from the Payload field
21
2) Analyze in detail Lora WAN technology, illustrating the layers, MAC
format and Architecture.
Ans:
LoRaWAN provides long-range wireless connectivity for low-power IoT end-devices operating
in unlicensed spectrum worldwide.
The LoRa Alliance describes LoRaWAN as, "a Low Power, Wide Area (LPWA) networking
protocol designed to wirelessly connect battery operated ‘things’ to the internet in regional,
national or global networks, and targets key Internet of Things (IoT) requirements such as bi-
directional communication, end-to-end security, mobility and localization services.".
Establishes connection between MAC layer of peers (i.e. between LoRa Gateway and End
device).
• The MAC layer handles transmission and reception of MAC commands and data from
application layer. All the LoRaWAN MAC messages are identified based on MAC
message types.
• MAC layer adds MHDR (MAC header) and MIC (message integrity code) at the
beginning and end of MAC payload. MAC header is 1 octet in size and MIC is 4 octet in
size. As mentioned MAC payload carries either MAC commands or data.
• The MAC layer data is used by PHY layer which incorporates Preamble, PHY header at
the beginning and PHY header CRC and entire frame CRC at the end while constructing
PHY payload at the transmit end. The reverse process i.e. stripping of preamble, PHY
header and CRC is done at receive end.
22
High-Level LoRaWAN MAC Frame Format
– The MAC payload size depends on the frequency band and the data rate, ranging from 59
to 230 bytes for the 863–870 MHz band and 19 to 250 bytes for the 902–928 MHz band.
23
End Devices - sensors or actuators send LoRa modulated wireless messages to the gateways
or receive messages wirelessly back from the gateways. .
Gateways - receive messages from end devices and forward them to the Network Server.
Network Server - a piece of software running on a server that manages the entire network.
Application servers - a piece of software running on a server that is responsible for securely
processing application data.
Join Server - a piece of software running on a server that processes join-request messages
sent by end devices (The Join Server is not shown in the above figure).
End devices communicate with nearby gateways and each gateway is connected to the network
server. LoRaWAN networks use an ALOHA based protocol, so end devices don’t need to peer
with specific gateways. Messages sent from end devices travel through all gateways within
range. These messages are received by the Network Server. If the Network Server has received
multiple copies of the same message, it keeps a single copy of the message and discards others.
This is known as message deduplication
Like other networks, where end devices can have different capabilities depending on devices
classes, end nodes in LoRaWAN network can have different device classes.
Each device class is a trade-off between network downlink communication latency verses
battery-life.
24
3) Discuss the following:
(i) Constrained nodes and Networks. (ii) IP versions
Ans:
i)Constrained nodes and Networks.
The edge system consists of constrained or unconstrained devices, or both. In IoT
solutions, different classes of devices coexist.
Power consumption is a key characteristic of constrained
nodes.
Devices with limited resources like memory, processing capacity and power are
called constrained nodes. There are three classes of constrained nodes, as shown in
Table 1.
25
The packets of data have to go through a number of intermediary machines, called
routers, to reach their destination.
There are two versions of IP.
• IPv4
• IPv6
IPv4
IP stands for Internet Protocol and v4 stands for Version Four (IPv4). IPv4 was the primary
version brought into action for production within the ARPANET in 1983.
IP version four addresses are 32-bit integers which will be expressed in decimal notation.
Example- 192.0.2.126 could be an IPv4 address.
.
Characteristics of IPv4
• IPv4 could be a 32-Bit IP Address.
• IPv4 could be a numeric address, and its bits are separated by a dot.
• The number of header fields is twelve and the length of the header field is twenty.
• It has Unicast, broadcast, and multicast style of addresses.
• IPv4 supports VLSM (Virtual Length Subnet Mask).
• IPv4 uses the Post Address Resolution Protocol to map to the MAC address.
• Packet fragmentation permits from routers and causing host.
IPv6
IPv6 was developed by Internet Engineering Task Force (IETF) to deal with the problem of IPv4
. IPv6 is a 128-bits address having an address space of 2^128, which is way bigger than IPv4. In
IPv6 we use Colon-Hexa representation. There are 8 groups and each group represents 2 Bytes.
26
key benefits to IPv6 include:
Ans:
6LoWPAN
6LoWPAN stands for “IPv6 Over Low Power Wireless Personal Networks”. It is
designed specifically to handle the limitations when sending and receiving IPv6 packets
over 802.15.4 links.
6LoWPAN is an emerging technology for the Internet of Things. It is an open standard
and allows the IPv6 protocol stack to work on low power sensor networks like
IEEE802.15.4.
Nodes communicate using IPv6 packets
An IPv6 packet is carried in the payload of IEEE 802.15.4 data frames
The model for packaging IP into lower-layer protocols is often referred to as an
adaptation layer.
27
An adaptation layer, 6LoWPAN sits between Data link layer and network layer, and it provides
the necessary mechanisms and interfaces for them to interconnect.
To sum up, the 6LoWPAN adaptation layer provides the following:
• IPv6 packet encapsulation
• IPv6 packet fragmentation and reassembly
• IPv6 header compression
• Link layer packet forwarding
IPv6 packet encapsulation
28
6LoWPAN Header Stacks
• The 6LoWPAN working group published several RFCs (Request for comments), but RFC
4994 is foundational because it defines frame headers for the capabilities of header
compression, fragmentation, and mesh addressing.
• Depending on the implementation, all, none, or any combination of these capabilities and
their corresponding headers can be enabled.
6LoWPAN-Header Compression
• IPv6 header compression for 6LoWPAN was defined initially in RFC 4944 and subsequently
updated by RFC 6282.
• This capability shrinks the size of IPv6’s 40-byte headers and User Datagram Protocol’s
(UDP’s) 8-byte headers down as low as 6 bytes combined in some cases.
•
6LoWPAN- Fragmentation
• The maximum transmission unit (MTU) for an IPv6 network must be at least 1280 bytes.
• The term MTU defines the size of the largest protocol data unit that can be passed.
• For IEEE 802.15.4, 127 bytes is the MTU.
• IPv6 MTU is much larger, which is carried inside the 802.15.4 frame with a much
smaller one.
• To remedy this situation, large IPv6 packets must be fragmented across multiple 802.15.4
frames at Layer 2.
• The fragment header utilized by 6LoWPAN is composed of three primary fields:
– Datagram Size
– Datagram Tag
– Datagram Offset.
29
• The 1-byte Datagram Size field specifies the total size of
the unfragmented payload.
• Datagram Tag identifies the set of fragments for a payload.(Unique identifier for the
fragmented packets.)
• Finally, the Datagram Offset field delineates how far into a payload a particular fragment
occurs. By using this receiver know where to copy the information in the reconstruction
of original IPv6 packet.
30
5) Describe the framework and message format of Application Layer
Protocols: (i) CoAP (ii) MQTT
Ans: (i) CoAP
• The CoAP protocol is specified in RFC 7252. It is a web transfer protocol which is used in
constrained nodes or networks such as WSN, IoT, M2M etc. Hence the name Constrained
Application Protocol. The protocol is targetted for Internet of Things (IoT) devices having
less memory and less power specifications.
• The CoAP messaging model is primarily designed to facilitate the exchange of messages
over UDP between endpoints.
As you can see there are two different layers that make CoAp protocol: Messages and
Request/Response. The Messages layer deals with UDP and with asynchronous messages. The
Request/Response layer manages request/response interaction.
CoAP supports four different message types:
• Confirmable
• Non-confirmable
• Acknowledgment
• Reset
31
CoAP Message Format
32
ii) Message Queuing Telemetry Transport (MQTT)
Message Queuing Telemetry Transport (MQTT) is a reliable, lightweight, and cost-effective
protocol to monitor and control a large number of sensors and their data from a central server
location, as typically used by the oil and gas industries Protocol.
An extremely simple protocol with only a few options was designed, with considerations for
constrained nodes, unreliable WAN backhaul communications, and bandwidth constraints with
variable latencies.
MQTT Message Format
MQTT packet has three fields and those are Fixed header, Variable header and Payload. The
fixed header field is present in all the packet and the size is 2 bytes. Variable header and Payload
are not present in all packets. The size of Variable header and Payload is variable. As the size of
the variable header and payload is variable, the overall size of the MQTT packet size is also
variable. The MQTT Packet structure is shown below.
Fixed Header: Fixed header is always present in each MQTT packet. It is two bytes in length.
Detail structure of fixed header is given below.
33
Message Type: Message type represents a connection request type. Each value of message type
represents different connection request. It is 4 bit in length. Following table shows the value
of message request and it’s meaning as well as the presence of fixed header in all message
request.
Header Flags: There are 3 Header flags and those are DUP , QOS and RETAIN.
DUP is one bit(bit 3) , QOS is 2 bit(bit 1 and bit 2) and RETAIN is one bit(bit 0).
1)DUP Flag: Duplicate delivery of publish control packet. If DUP=0 means this is Clients
first attempt to send MQTT publish control packet. If DUP=1 means client is again trying to
send previously sent packet.
2)QOS level: Quality of service (QOS) indicates the assurance of message delivery. There are
three 3 QOS . It is 2 bit in length.
3)RETAIN: If RETAIN=1 means Broker or server will hold or store the packet unless there no
subscriber with same topic as topic in stored packet . As soon as there is subscriber , Broker will
deliver the stored packet. If RETAIN=0 means broker will not hold the packet.
Remaining length: Number of bytes left within current packet, including variable header plus
payload.
Variable Header: It’s not present in all MQTT control packets. It’s structure is different for
different MQTT requests.
Payload: Payload is actual data which is to be send. It’s not present in all the MQTT control
packets.
SCADA Components
Supervisory System
The supervisory system works like a communication server among the human-machine interface
software within the control room of workstations as well as its apparatus such as RTUs, Sensors,
PLCs, etc.
Human-Machine Interface
This is basically the command center that allows control of the devices. The values stored in the
computers are accesses here in an understandable and comprehensible form by HMIs.
Remote Terminal Units (RTUs)
It connect to sensors in the process, converting sensor signals to digital data and sending digital
data to the supervisory system.
Programmable Logic Controller (PLCs)
It is used as field devices because they are more economical, versatile, flexible, and configurable
than special-purpose RTUs.
Communication infrastructure in SCADA
It provides connectivity to the supervisory system to the Remote Terminal Units.
35
SCADA Programming
In HMI otherwise master station, SCADA programming is mainly used to make maps, diagrams
to provide very important information throughout progression otherwise when event failure
occurs.
36
• The synchronization header for this frame is composed of the Preamble and the Start of
Frame Delimiter fields.
• The Preamble field is a 32-bit 4-byte (for parallel construction) pattern that identifies the
start of the frame and is used to synchronize the data transmission.
• The Start of Frame Delimiter field informs the receiver that frame contents start
immediately after this byte.
• The PHY Header portion of the PHY frame is simply a frame length value.
• It lets the receiver know how much total data to expect in the PHY service data unit (PSDU)
portion of the 802.15.4 PHY. The PSDU is the data field or payload.
• The Frame Control field defines attributes such as frame type, addressing modes, and other
control flags.
• The Sequence Number field indicates the sequence identifier for the frame.
• The Addressing field specifies the Source and Destination PAN Identifier fields as well as
the Source and Destination Address fields.
• The MAC Payload field varies by individual frame type. For example, beacon frames have
specific fields and payloads related to beacons, while MAC command frames have different
fields present.
37
• The MAC Footer field is nothing more than a frame check sequence (FCS). An FCS is a
calculation based on the data in the frame that is used by the receiving side to confirm the
integrity of the data in the frame.
Advantages of IEEE 802.15.4:
IEEE 802.15.4 has the following advantages:
• cheap cost
• long battery life,
• Quick installation
• simple
• extensible protocol stack
Disadvantages of IEEE 802.15.4:
IEEE 802.15.4’s drawbacks include:
• IEEE 802.15.4 causes interference and multipath fading.
• unbounded latency
• interference susceptibility
IEEE 802.11ah
IEEE 802.11ah is the WLAN standard operating under sub 1GHz frequency range (about
900MHz). It is designed to extend range of existing 11ac wifi network operating in 2.4/5GHz as
well as to utilize the emerging opportunities in IoT(Internet of Things) space. It will also be used
for home automation, smart grid, low power sensors and wearable consumer electronic devices.
It supports various bandwidths viz. 1MHz, 2MHz, 4MHz, 8MHz and 16MHz. Hence it is
considered to be 10 times downclocked version of IEEE 802.11ac standard.
IEEE 802.11ah supports completely new PHY(Physical) layer and MAC(Medium Access
Control) layer.
Following are the features of WLAN-11ah Physical layer operating at 2MHz and above:
• Supports OFDM and MIMO
• Supports downlink Multi-user MIMO as introduced in legacy version 802.11ac
• 11ah Symbol duration is 10 times compare to 11ac
• MCS and number of data subcarriers are same as supported in 11ac from MCS0 to MCS9.
38
MCS10 for 1MHz PHY is newly introduced.
• Supports 64 Point FFT with 52 data subcarriers.
In 802.11ah MAC layer design and development, some features are enhanced compare to 802.11
MAC layer and new frame structure has been introduced. The improvements in 11ah MAC layer
are targetted for the following features.
➤Support for large number of stations
➤Enhancement in power savings
➤Efficient medium access mechanisms
➤Throughput enhancements
Enhancements and features specified by IEEE 802.11ah for the MAC layer include the
following:
• Number of devices: Has been scaled up to 8192 per access point.
• MAC header: Has been shortened to allow more efficient communication.
• Null data packet (NDP) support: Is extended to cover several control and management
frames.
• Grouping and sectorization: 802.11ah that allows stations to transmit in different sectors
(positions) around the AP in a time division multiplexing manner Enables an AP to use
sector antennas and also group stations (distributing a group ID).
• Restricted access window (RAW): Is a control algorithm that avoids simultaneous
transmissions when many devices are present and provides fair access to the wireless
network. It reduce collisions by improving the channel efficiency.
• Target wake time (TWT): TWT is a function that permits an AP to define a specific time or
set of times for individual stations to access the medium
39
UNIT_III
40
data collection requirements
data analysis requirements
system management requirements
data privacy and security requirements
user interface requirements
Step 2: Process Specification
The second step in the IoT design methodology is to define the process specification. In this
step, the use cases of the IoT system are formally described based on and derived from the
purpose and requirement specifications.
• Service specifications define the services in the IoT system, service types, service
inputs/output, service endpoints, service schedules, service preconditions and service
effects.
41
Step 6: IoT Level Specification
The sixth step in the IoT design methodology is to define the IoT level for the system. There are
five IoT Levels.
IoT level 1
IoT systems have a single device that performs sensing or actuation, stores a. analyses it and
hosts the application, and IoT system-level-l is the best example for modeling low complexity
and low-cost.
IoT level 2
A node performs sensing/actuation and local analysis. Data is stored in the cloud. This level is
facilitated where the data involved is big and primary analysis is not comprehensive
IoT level 3
At this level, the application is cloud-based. A single node monitors the environment and stores
data in the cloud. This is suitable where data is comprehensive and analysis requirements are
computationally intensive.
IoT level 4
At this level, multiple nodes collect information and store it in the cloud. Local and rent server
nodes are used to grant and receive information collected in the cloud from various devices.
IoT level 5
In this level Nodes present locally are of two types end odes and coordinator nodes End nodes
collect data and perform sensing or actuation or both. Coordinator nodes collect data from end
nodes and send it to the cloud. Data is stored and analyzed in the cloud.
Step 7: Functional View Specification
• The seventh step in the IoT design methodology is to define the Functional View.
• The Functional View (FV) defines the functions of the IoT systems grouped into various
Functional Groups (FGs).
• Each Functional Group either provides functionalities for interacting with instances of
concepts defined in the Domain Model or provides information related to these concepts.
• The Functional Groups (FG) included in a Functional View include:
• Device: The device FG contains devices for monitoring and control.
• Communication: The communication FG handles the communication for the IoT system.
• Services: The service FG includes various services involved in the IoT system such as
services for device monitoring, device control services, data publishing services and services
for device discovery.
• Management: The management FG includes all functionalities that are needed to configure
and manage the loT system.
• Security: The security FG includes security mechanisms for the loT system such as
authentication, authorization, data security, etc.
42
Application: The application FG includes applications that provide an interface to the users to
control and monitor various aspects of the IoT system. Applications also allow users to view the
system status and the processed data
Step 10: Application Development: The final step in the IoT design
methodology is to develop the IoT application.
43
Block diagram of embedded system with IoT
Embedded system hardware: It has 5 modules: the processor, memory, input
devices, output devices and bus controllers.
Processors: Embedded processors can either be a microprocessor or a microcontroller.
Microprocessors needs separate integrated circuits for memory and peripherals whereas
microcontrollers have on-chip peripherals which reduce power consumption, size and
its cost. They include the following:
Microcontroller (CPU) — Brain of an embedded system It is an intelligent device that
computes the tasks assigned by the user. It builds small applications with precise
calculations.
Memory: Its the area used for storage of the data and the information. There are
different types of memory for the embedded system including RAM( Random Access
Memory), ROM( Read Only Memory), DRAM( Dynamic RAM) , SRAM( Static RAM).
Input devices: Input devices capture data from the outside. They acquire data to
perform the tasks in order to provide the output. Input devices include sensors,
switches, photodiode, optocouplers, etc.
44
Output devices: Output devices respond to input events from outside the
microcontroller and display it using output device. For example, LCD (Liquid Crystal
Display), seven-segment displays to display output, buzzers and LEDs for notifyi ng
purposes, and controllers such as actuators, relays etc.
Bus controllers: It acts as a communication device. The bus controller transfers data
between the components inside an embedded system. For instance, commonly used bus
controllers are serial buses (I2C, SPI, SMBus, etc.), RS232, RS485 and Universal
Serial Bus (USB).
Embedded software: It is written for the device drivers, operating system and
applications, as well as for error handling and debugging. Software components of
embedded system include:
Device Driver: A device driver is an embedded code written for a specific piece of
hardware.
Operating System (OS) or MicroOS: Embedded systems have a operating systems,
including RTOS (Real-time Operating Systems), mobile embedded, stand-alone and
network embedded systems.
Non-volatile Memory: An internal unit that stores program code and other non-volatile system
information
Volatile Memory: Another storage unit used to store temporary code and data
Digital Signal Processor (DSP): An instrument that aids in receiving and understanding signals
from connecting devices and helps the MCU execute complex programming
Peripheral Ports: Physical joints where external devices like USB drives, Ethernet cables, etc.,
can physically connect to an apparatus and communicate with it
Power Management: A dedicated circuit to manage and optimize the power consumption of
different working modes of the SoC
45
• This IoT SoC (system on chip in IoT) can be used for numerous applications as mentioned
below:
– Mobile
– M2M-Communication
– Real time location finding tags
– Thermostats
– Smart meters
– Wireless sensor devices
– Serial to Wi-Fi converter
– Voice Over Wi-Fi compliant phones
– Home automation
– Health care devices and equipments
ii) Microcontrollers:
46
The general microcontroller consists of the processor, the memory (RAM, ROM, EPROM),
Serial ports, peripherals (timers, counters), , interrupts, timer/counter, memory, and all in a
single integrated circuit (IC).
Microcontrollers are divided into categories according to their memory, architecture, bits and
instruction sets. So let’s discuss types of microcontrollers:
Bits:
8 bits microcontroller executes logic & arithmetic operations.
Examples of 8 bits micro controller is Intel 8031/8051.
16 bits microcontroller executes with greater accuracy and performance in contrast to 8-
bit.
Example of 16 bit microcontroller is Intel 8096.
32bits microcontroller is employed mainly in automatically controlled appliances such as
office machines, implantable medical appliances, etc. It requires 32-
bit instructions to carry out any logical or arithmetic function.
Memory:
Instruction Set:
Applications of Microcontrollers
47
Fig. Micro Controller Block Diagram
48
1. Micro-USB Power Supply: A 5V micro USB typically powers the Raspberry Pi. But how
much current (in milliamps or amps) the Pi requires to function depends on your usage.
2. HDMI port: Raspberry Pi board has an HDMI or High Definition Multimedia Interface port
that allows the device to have video options of the output from the computer displayed. An
HDMI cable connects the Raspberry Pi to an HDTV. The supported versions include 1.3 and
1.3. It also comes with an RCA port for other display options.
3. Ethernet port
The Ethernet port is a connectivity hardware feature available on B models of Raspberry Pi.
The Ethernet port enables wired internet access to the minicomputer. The Ethernet port found
on Raspberry computers uses the RJ45 Ethernet jack. With this component, Raspberry Pi can
connect to routers and other devices.
4. SD card slot
Like most other regular computers, Raspberry Pi must have some sort of storage device.
However, unlike conventional PCs, it does not come with a hard drive, nor does it come with
a memory card. The Raspberry Pi board has a Secure Digital card or SD card slot where
users must insert SD cards for the computer to function. The SD card functions like a hard
drive as it contains the operating system necessary for turning the system on. It also serves to
store data.
5. GPIO (General Purpose Input Output): The Raspberry header is the key to its ability to
interface with the real world. GPIO facilitates connecting all sorts of peripheral devices to
Raspberry Pi. Raspberry Pi has onboard GPIO with 40 pins, 26 of which are used as digital
inputs or outputs. More importantly, 9 of the 14 new GPIO pins are dedicated inputs/outputs,
it also facilitates the onboard UART, I2C, SPI Bus and still large amount of free GPIO pins
are there for add-on attachments.
49
6. Status LED’s:
These are a group of five light-emitting diodes. They signal the user on the present status of the
Raspberry Pi unit. Their function covers:
PWR (Red): these functions solely to indicate power status. When the unit is on, it emits a red
light and only goes off when the unit is switched off, or disconnected from the power source.
ACT (Green): This flashes to indicate any form of SD card activity.
LNK (Orange): LNK LED gives off an orange light to signify that active Ethernet connectivity
has been established.
100 (Orange): This light comes on during Ethernet connection when the data speed reaches
100Mbps.
FDX (Orange): FDX light also comes during Ethernet connection. It shows that the connection
is a full-duplex.
7. USB ports : Universal service bus (USB) ports are a principal part of Raspberry Pi. They
allow the computer to connect to a keyboard, mouse, hard drives, etc. The first model of
Raspberry Pi had only two USB 2.0 ports. Subsequent models increased this number to four.
Raspberry Pi 4 and Pi 400, much newer models, come with a mix of USB 2.0 and USB 3.0
ports.
8. Video Out (RCA Cable): In addition to HDMI Connectivity which facilitates HD
connection, Raspberry Pi also has provision to be connected to standard monitor or TV using
RCA video cable. RCA cable is less expensive as compared to HDMI but along with RCA
cable, the user has to buy 3.5mm stereo cable for audio facilitation.
9. Audio port – a 3.5mm jack used to connect speakers.
10. CSI Camera connector – enables the capturing of photographs and videos.
11. DSI display connector – used to attach an LCD panel. On the other side of the board is
a microSD card slot that holds the operating system.
12. System on a chip (SoC) – an integrated circuit that incorporates many computer components
on a single chip – the CPU, memory, and RAM.
5. Sketch Arduino UNO depicting the pin diagram and explain in detail
Ans:
Arduino is a prototype platform (open-source) based on an easy-to-use hardware and
software.
Arduino is an embedded development platform that consists of both the hardware as well
as software parts.
Arduino UNO is a basic and inexpensive Arduino board and is the most popular of all the
Arduino boards with a market share of over 50%. Arduino UNO is considered to be the
best prototyping board for beginners in electronics and coding.
Arduino UNO comes with different features and capabilities. The microcontroller used in
UNO is ATmega328P, which is an 8-bit microcontroller based on the AVR architecture.
50
UNO has 14 digital input – output (I/O) pins which can be used as either input or output by
connecting them with different external devices and components. Out of these 14 pins, 6
pins are capable of producing PWM signal. All the digital pins operate at 5V and can
output a current of 20mA.
51
Arduino UNO Board Details
Power USB: Arduino board can be powered by using the USB cable from your computer. All
you need to do is connect the USB cable to the USB connection.
Power (Barrel Jack): Arduino boards can be powered directly from the AC mains power supply
by connecting it to the Barrel Jack.
Voltage Regulator The function of the voltage regulator is to control the voltage given to the
Arduino board and stabilize the DC voltages used by the processor and other elements.
Crystal Oscillator
The crystal oscillator helps Arduino in dealing with time issues. How does Arduino calculate
time? The answer is, by using the crystal oscillator. The number printed on top of the Arduino
crystal is 16.000H9H. It tells us that the frequency is 16,000,000 Hertz or 16 MHz.
Arduino Reset
You can reset your Arduino board, i.e., starts your program from the beginning. You can reset
the UNO board in two ways. First, by using the reset button (17) on the board. Second, you can
connect an external reset button to the Arduino pin labeled RESET (5).
Pins (3.3, 5, GND, Vin)
3.3V (6) − Supply 3.3 output volt
5V (7) − Supply 5 output volt
Most of the components used with Arduino board works fine with 3.3 volt and 5 volt.
GND (8)(Ground) − There are several GND pins on the Arduino, any of which can be used to
ground your circuit.
Vin (9) − This pin also can be used to power the Arduino board from an external power source,
like AC mains power supply.
Analog pins
The Arduino UNO board has six analog input pins A0 through A5. These pins can read the
signal from an analog sensor like the humidity sensor or temperature sensor and convert it into a
digital value that can be read by the microprocessor.
Main microcontroller
Each Arduino board has its own microcontroller (11). You can assume it as the brain of your
board. The main IC (integrated circuit) on the Arduino is slightly different from board to board.
The microcontrollers are usually of the ATMEL Company. You must know what IC your board
has before loading up a new program from the Arduino IDE. This information is available on the
top of the IC.
ICSP pin
Mostly, ICSP is an AVR, a tiny programming header for the Arduino consisting of MOSI,
MISO, SCK, RESET, VCC, and GND. It is often referred to as an SPI (Serial Peripheral
Interface), which could be considered as an "expansion" of the output. Actually, you are slaving
the output device to the master of the SPI bus.
52
Power LED indicator: This LED should light up when you plug your Arduino into a power
source to indicate that your board is powered up correctly. If this light does not turn on, then
there is something wrong with the connection.
TX and RX LEDs
On your board, you will find two labels: TX (transmit) and RX (receive). They appear in two
places on the Arduino UNO board. First, at the digital pins 0 and 1, to indicate the pins
responsible for serial communication. Second, the TX and RX led (13). The TX led flashes with
different speed while sending the serial data. The speed of flashing depends on the baud rate
used by the board. RX flashes during the receiving process.
Digital I/O
The Arduino UNO board has 14 digital I/O pins (of which 6 provide PWM (Pulse Width
Modulation) output. The pins 0 to 13 are used as a digital input or output for the Arduino board.
These pins can be configured to work as input digital pins to read logic values (0 or 1) or as
digital output pins to drive different modules like LEDs, relays, etc.
External Interrupt Pins: This pin of the Arduino board is used to produce the External interrupt
and it is done by pin numbers 2 and 3.
PWM Pins: This pins of the board is used to convert the digital signal into an analog by varying
the width of the Pulse. The pin numbers 3,5,6,9,10 and 11 are used as a PWM pin.
SPI Pins: This is the Serial Peripheral Interface pin, it is used to maintain SPI
communication with the help of the SPI library. SPI pins include:
SS: Pin number 10 is used as a Slave Select
MOSI: Pin number 11 is used as a Master out Slave In
MISO: Pin number 12 is used as a Master In Slave Out
SCK: Pin number 13 is used as a Serial Clock
AREF Pin: This is an analog reference pin of the Arduino board. It is used to provide a
reference voltage from an external power supply.
6. Discuss in detail the building blocks of IoT and its functionalities with
suitable illustration.
Ans:
Four things form basic building blocks of the IoT system –sensors, processors, gateways,
applications. Each of these nodes has to have its own characteristics in order to form a useful IoT
system.
53
Sensors:
These form the front end of the IoT devices. These are the so-called “Things” of the system.
Their main purpose is to collect data from its surroundings (sensors) or give out data to its
surrounding (actuators).
These have to be uniquely identifiable devices with a unique IP address so that they can be
easily identifiable over a large network.
These have to be active in nature which means that they should be able to collect real-time
data. These can either work on their own (autonomous in nature) or can be made to work by
the user depending on their needs (user-controlled).
Examples of sensors are gas sensor, water quality sensor, moisture sensor, etc.
Processors:
Processors are the brain of the IoT system. Their main function is to process the data
captured by the sensors and process them so as to extract the valuable data from the
enormous amount of raw data collected. In a word, we can say that it gives intelligence to the
data.
Processors mostly work on real-time basis and can be easily controlled by applications.
These are also responsible for securing the data – that is performing encryption and
decryption of data.
54
Embedded hardware devices, microcontroller, etc are the ones that process the data because
they have processors attached to it.
Gateways:
Gateways are responsible for routing the processed data and send it to proper locations for
its (data) proper utilization.
In other words, we can say that gateway helps in to and fro communication of the data. It
provides network connectivity to the data. Network connectivity is essential for any IoT
system to communicate.
Applications:
Applications form another end of an IoT system. Applications are essential for proper
utilization of all the data collected.
These cloud-based applications which are responsible for rendering the effective meaning
to the data collected. Applications are controlled by users and are a delivery point of
particular services. Examples of applications are home automation apps, security systems,
industrial control hub, etc.
55
UNIT-IV
DATA ANALYTICS & SUPPORING SERVICES
1. Explain the need of Data Analytics for IoT and brief the types of Data
Analytics.
Ans:
Internet of Things (IoT) analytics is a data analysis tool that assesses the wide range of data
collected from IoT devices. IoT analytics assesses vast quantities of data and produces useful
information from it.
The true importance of IoT data from smart objects is realized only when the analysis of the data
leads to actionable business intelligence and insights.
56
Four types of data analysis results:
1. Descriptive:
Descriptive data analysis tells you what is happening, either now or in the past.
These analytics indicate whether business operations are going as planned and alert when
disruptions occur.
For example, a thermometer in a truck engine reports temperature values every second.
From a descriptive analysis perspective, you can pull this data at any moment to gain insight
into the current operating condition of the truck engine.
If the temperature value is too high, then there may be a cooling problem or the engine may
be experiencing too much load.
2. Diagnostic:
When you are interested in the “why,” diagnostic data analysis can provide the answer.
These analytics deal with the identification of problems in business operations.
Continuing with the example of the temperature sensor in the truck engine, you might
wonder why the truck engine failed.
Diagnostic analysis might show that the temperature of the engine was too high, and the
engine overheated.
Applying diagnostic analysis across the data generated by a wide range of smart objects can
provide a clear picture of why a problem or an event occurred
3. Predictive:
Predictive analysis aims to foretell problems or issues before they occur.
For example, with historical values of temperatures for the truck engine, predictive analysis
could provide an estimate on the remaining life of certain components in the engine.
These components could then be proactively replaced before failure occurs.
Or perhaps if temperature values of the truck engine start to rise slowly over time, this could
indicate the need for an oil change or some other sort of engine cooling maintenance.
4. Prescriptive:
Prescriptive analysis goes a step beyond predictive and recommends solutions for upcoming
problems.
Prescriptive analytics deals with providing actionable steps to take to fix problems in
business operations.
A prescriptive analysis of the temperature data from a truck engine might calculate various
alternatives to cost-effectively maintain our truck.
These calculations could range from the cost necessary for more frequent oil changes and
cooling maintenance to installing new cooling equipment on the engine or upgrading to a
lease on a model with a more powerful engine.
Prescriptive analysis looks at a variety of factors and makes the appropriate recommendation
57
Both predictive and prescriptive analyses are more resource intensive and increase complexity,
but the value they provide is much greater than the value from descriptive and diagnostic
analysis
2. What are the three main IOT data analytics challenges? Explain.
Ans:
Businesses may face challenges in using IoT analytics tools. Some of these challenges are –
Excessive data generation and storage requirements –The aggregate data generated by
thousands of IoT sensors are usually very large, thus making it expensive to manage and store
such data.
The complexity of data – Data from multiple IoT devices consists of different types, formats
and sizes, thus making it very complex and difficult to process and clean.
Security – Businesses, especially those dealing with consumer data, have to take various
security measures to protect the stored IoT network data against hacking attempts and leaks.
Inaccurate data – Faulty IoT devices lead to inaccurate measurements, thereby messing up the
analysis of such data. When you have faulty IoT devices at large, the insights offered by IoT
analytics tools become unreliable.
Building a competent data analysis team – Businesses need to hire data scientists and analysts
to run analytical techniques on the IoT data and derive actionable insights.
3. Compare
(a) Structured vs. Unstructured Data with relevant examples.
(b) Data in Motion vs. Data in rest with relevant examples.
Ans: a) Structured vs. Unstructured Data
58
Nature Structured data is quantitative, It is qualitative, as it cannot be
i.e., it consists of hard numbers processed and analyzed using
or things that can be counted. conventional tools.
59
b) Data in Motion vs. Data in rest
There are 3 states of data: Data at rest, data in motion, and data in use.
5 Basic cyber security measures such Data Loss Prevention (DLP) solutions are a
as firewalls and antivirus software are popular tool for the protection of data both
necessary to protect data at rest from in motion and at rest from insider threats
outsider attacks.
60
4. Explain and compare edge computing, fog computing and cloud
computing.
Ans:
Cloud computing is completely suited for the long term, in-depth analysis of data and storage.
On the other hand, Fog and Edge computing are more suitable for the quick analysis required for
real-time response.
61
mobility is Limited. in fog computing. in fog computing.
Number of Server Cloud computing has Fog computing has a Edge computing has a
Nodes Few numbers server Large number of Large number of
nodes. server nodes. server nodes.
62
The goal is to create data that is consistent, accurate and complete so to prevent data loss
and errors during a move.
iii) Data Categorization for Storage
Services, business processes and business intelligence use data. Valid, useful and relevant data
can be categorized into three categories for storage—data alone, data as well as results of
processing, only the results of data analytics are stored. Following are three cases for storage:
1. Data which needs to be repeatedly processed, referenced or audited in future, and therefore,
data alone needs to be stored.
2. Data which needs processing only once, and the results are used at a later time using the
analytics, and both the data and results of processing and analytics are stored. Advantages of this
case are quick visualization and reports generation without reprocessing. Also the data is
available for reference or auditing in future.
3. Online, real-time or streaming data need to be processed and the results of this processing and
analysis need storage.
Benefits
Cloud Computing has numerous advantages. Some of them are listed below -
One can access applications as utilities, over the Internet.
One can manipulate and configure the applications online at any time.
It does not require installing software to access or manipulating cloud application.
Cloud Computing offers online development and deployment tools, programming
runtime environment through PaaS model.
Cloud resources are available over the network in a manner that provide platform
independent access to any type of clients.
Cloud Computing offers on-demand self-service. The resources can be used without
interaction with cloud service provider.
Cloud Computing is highly cost effective because it operates at high efficiency with
optimum utilization. It just requires an Internet connection
Cloud Computing offers load balancing that makes it more reliable.
63
Importance of Cloud Computing
64
1. Infrastructure as a Service (IaaS)
Iaas is also known as Hardware as a Service (HaaS). It is one of the layers of the cloud
computing platform. It allows customers to outsource their IT infrastructures such as
servers, networking, processing, storage, virtual machines, and other resources.
Customers access these resources on the Internet using a pay-as-per use model.
IaaS provides access to fundamental resources such as physical machines, virtual
machines, virtual storage, etc.
It is a computing infrastructure managed over the internet. The main advantage of using
IaaS is that it helps users to avoid the cost and complexity of purchasing and managing
the physical servers.
Top Iaas Providers who are providing IaaS cloud computing platform
65
2. Platform as a Service(PaaS):
Platform as a Service (PaaS) provides a runtime environment. It allows programmers to
easily create, test, run, and deploy web applications. You can purchase these applications
from a cloud service provider on a pay-as-per use basis and access them using the
Internet connection.
In PaaS, back end scalability is managed by the cloud service provider, so end- users do
not need to worry about managing the infrastructure.
PaaS includes infrastructure (servers, storage, and networking) and platform
(middleware, development tools, database management systems, business intelligence,
and more) to support the web application life cycle.
PaaS providers provide the Programming languages, Application frameworks, Databases, and
Other tools:
1. Programming languages
PaaS providers provide various programming languages for the developers to develop the
applications. Some popular programming languages provided by PaaS providers are Java,
PHP, Ruby, Perl, and Go.
2. Application frameworks
66
PaaS providers provide application frameworks to easily understand the application
development. Some popular application frameworks provided by PaaS providers are Node.js,
Drupal, WordPress, Spring, Play, Rack, and Zend.
3. Databases
PaaS providers provide various databases such as ClearDB, PostgreSQL, MongoDB, and
Redis to communicate with the applications.
4. Other tools
PaaS providers provide various other tools that are required to develop, test, and deploy the
applications.
67
Document Management - SaaS document management is a software application offered by a
third party (SaaS providers) to create, manage, and track electronic documents.
Social Networks - As we all know, social networking sites are used by the general public, so
social networking service providers use SaaS for their convenience and handle the general
public's information.
Mail Services - To handle the unpredictable number of users and load on e-mail services, many
e-mail providers offering their services using SaaS.
68
7. (a) Explain about Data Organizing in IoT.
(b) Explain Cloud Computing Deployment models.
1. Centralized Database
It is the type of database that stores data at a centralized database system. It comforts the
users to access the stored data from different locations through several applications.
These applications contain the authentication process to let users access data securely.
An example of a Centralized database can be Central Library that carries a central database
of each library in a college/university.
2. Distributed Database
Unlike a centralized database system, in distributed systems, data is distributed among
different database systems of an organization.
69
These database systems are connected via communication links. Such links help the end-
users to access the data easily.
3. Relational Database:
This database is based on the relational data model, which stores data in the form of
rows(tuple) and columns(attributes), and together forms a table(relation).
A relational database uses SQL for storing, manipulating, as well as maintaining the data.
Each table in the database carries a key that makes the data unique from others.
Examples of Relational databases are MySQL, Microsoft SQL Server, Oracle, etc.
Properties of Relational Database
There are following four commonly known properties of a relational model known as ACID
properties, where:
A means Atomicity: This ensures the data operation will complete either with success or
with failure. It follows the 'all or nothing' strategy. For example, a transaction will either be
committed or will abort.
C means Consistency: If we perform any operation over the data, its value before and after
the operation should be preserved. For example, the account balances before and after the
transaction should be correct, i.e., it should remain conserved.
I mean Isolation: There can be concurrent users for accessing data at the same time from the
database. Thus, isolation between the data should remain isolated. For example, when
multiple transactions occur at the same time, one transaction effects should not be visible to
the other transactions in the database.
D means Durability: It ensures that once it completes the operation and commits the data,
data changes should remain permanent.
The database should be durable enough to hold all its latest updates even if the system fails
or restarts.
4. NoSQL Database
Non-SQL/Not Only SQL is a type of database that is used for storing a wide range of data
sets. It is not a relational database as it stores data not only in tabular form but in several
70
different ways. It came into existence when the demand for building modern applications
increased.
Not Only SQL that does not integrate with applications that are based on SQL. NOSQL is
used in cloud data store.
Thus, NoSQL presented a wide variety of database technologies in response to the
demands. We can further divide a NoSQL database into the following four types:
5. Cloud Database
A type of database where data is stored in a virtual environment and executes over the cloud
computing platform. It provides users with various cloud computing services (SaaS, PaaS, IaaS,
etc.) for accessing the database.
6. Object-oriented Databases
The type of database that uses the object-based data model approach for storing data in the
database system. The data is represented and stored as objects which are similar to the objects
used in the object-oriented programming language.
7. Hierarchical Databases
It is the type of database that stores data in the form of parent-children relationship nodes. Here,
it organizes data in a tree-like structure. Data get stored in the form of records that are connected
via links. Each child record in the tree will contain only one parent. On the other hand, each
parent record can have multiple child records.
71
8. Network Databases
It is the database that typically follows the network data model. Here, the representation of data
is in the form of nodes connected via links between them. A network database is based on a
traditional hierarchical database, except it allows each object to have multiple parents instead of
a single parent.
A network database is based on a traditional hierarchical database, except it allows each object to
have multiple parents instead of a single parent.
9. Personal Database
Collecting and storing data on the user's system defines a Personal Database. This database is
basically designed for a single user.
Query Processing:
Query Processing is the activity performed in extracting data from the database. In query
processing, it takes various steps for fetching the data from the database. The steps involved are:
Parsing and translation
Optimization
Evaluation
SQL (Structured Query Language)
• It is a language for viewing or changing (update, insert or append or delete) databases.
• SQL is Structured Query Language, which is a computer language for storing,
manipulating and retrieving data stored in a relational database.
72
Public Cloud
The public cloud allows systems and services to be easily accessible to the general public.
Public cloud may be less secure because of its openness.
Data Privacy - It is ideal for storing corporate data where only authorized personnel gets
access
Security - Segmentation of resources within the same Infrastructure can help with better
access and higher levels of security.
Supports Legacy Systems - This model supports legacy systems that cannot access the
public cloud.
Limitations of Private Cloud
Higher Cost
Fixed Scalability
High Maintenance
Community Cloud
The community cloud allows systems and services to be accessible by a group of organizations.
Benefits of Community Cloud
Smaller Investment - A community cloud is much cheaper than the private & public
cloud and provides great performance
Setup Benefits - The protocols and configuration of a community cloud must align
with industry standards, allowing customers to work much more efficiently.
73
Limitations of Community Cloud
Hybrid Cloud
The hybrid cloud is a mixture of public and private cloud, in which the critical activities are
performed using private cloud while the non-critical activities are performed using public cloud.
Cost-Effectiveness - The overall cost of a hybrid solution decreases since it majorly uses
the public cloud to store data.
Security - Since data is properly segmented, the chances of data theft from attackers are
significantly reduced.
Flexibility - With higher levels of flexibility, businesses can create custom solutions that
fit their exact requirements
74
UNIT-V
CASE STUDIES/INDUSTRIAL APPLICATIONS
1. Design a smart home automation system using IoT.
Ans: Smart home automation system using IoT:
• Smart home automation is where Automatic devices such as lights, thermostat, doors or
windows, and so many other things are considered as a part of a smart home.
• Home automation is constructing automation for a domestic, mentioned as a sensible home
or smart house. In the IoT home automation ecosystem, you can control your devices like
light, fan, TV, etc.
• Creating a smart home enables us to control all the devices we have remotely by using a
network system in which we can assign a task to be done later.
– Measuring home conditions
– Managing home appliances
– Controlling home access
The major components are involved in building a smart home can be broken into:
IoT Sensors
IoT Gateways
75
IoT Protocols
IoT Firmware
IoT Cloud and Databases
IoT Middleware (if required)
IoT sensors involved in home automation are in thousands, and there are hundreds of home
automation gateways as well. Most of the firmware is either written in C, Python, Node.Js, or
any other programming language.
The biggest players in IoT cloud can be divided into a platform as a service(PaaS) and
infrastructure as a service(LaaS).
We will break down IoT sensors for home automation by their sensing capabilities:
Temperature sensors
Water level sensors
Air composition sensors
Video cameras for surveillance
Voice/Sound sensors
Pressure sensors
Humidity sensors
Accelerometers
Infrared sensors
Vibrations sensors
Ultrasonic sensors
Depending upon what you need you may use one or many of these to build a truly smart home
IoT product.
Applications of IoT in Smart Homes
Smart Lighting
Smart Appliances
Smoke/gas detectors
Smart Refrigerator with Internet of Things
Smart Washing Machine
Smart Doorbell
smart lock
Smart Water Sensor
Multiple Smart Power Socket
76
Smart infrastructures are based not only on their physical structure (cabling, sensors, etc.) but also
on four principles: data, analytics, feedback and adaptability.
Data: It is the basic element required by a smart system to work, and the raw material required by a
smart infrastructure for its operation.
Analytics: The analysis of information is key to obtain useful information for decision making.
Feedback: A data feedback loop is fundamental for any smart system. This feedback is evident
when information is collected regarding the way in which an asset is used, and this information is
used to improve the way in which the system operates.
Adaptability: Smart systems are those that not only adapt to current demands, but also conform to
the needs of the future.
Depending on degree of human participation in decision making process
– Semi Intelligent Infrastructure
– Intelligent Infrastructure
– Smart Infrastructure
77
This system is one of the most effective Industrial IOT applications and works via
sensors that, once installed on the machines and operating platforms, can send alerts
when certain risk factors emerge.
3. Faster implementation of improvements
IIoT generates valuable information so that those in charge of improving processes in an
industrial business model (process, quality or manufacturing engineers) can access data and
analyze it faster and automatically and remotely perform the necessary processes adjustments.
This also increases the speed in which changes and improvements are applied in Operational
Intelligence and Business Intelligence – changes that are already offering competitive
advantages to a myriad of industrial businesses.
4. Quality control
Another entry among the most important IIoT applications is the ability to monitor the
quality of manufactured products at any stage: from the raw materials that are used in the
process, to the way in which they are transported (via smart tracking applications), to the
reactions of the end customer once the product is received.
It has also been proven that it is essential to prevent risks in more delicate industries, such
as pharmaceutics or food.
78
IoT security methods
Other ways to implement IoT security include:
Network access control. NAC can help identify and inventory IoT devices connecting to a
network. This will provide a baseline for tracking and monitoring devices.
Segmentation. IoT devices that need to connect directly to the internet should be segmented into
their own networks and have restricted access to the enterprise network. Network segments
should be monitoring for anomalous activity, where action can be taken, should an issue be
detected.
Security gateways. Acting as an intermediary between IoT devices and the network, security
gateways have more processing power, memory and capabilities than the IoT devices
themselves, which provides them the ability to implement features such as firewalls to ensure
hackers cannot access the IoT devices they connect.
Patch management/continuous software updates. It is critical to provide the means of
updating devices and software either over network connections or through automation. Having a
coordinated disclosure of vulnerabilities is also important for updating devices as soon as
possible.
Training. IoT and operational system security are new to many existing security teams. It is
critical for security staff to keep up to date with new or unknown systems, learn new
architectures and programming languages and be ready for new security challenges
Integrating teams. Along with training, integrating disparate and regularly siloed teams can be
useful. For example, having programming developers work with security specialists can help
ensure the proper controls are added to devices during the development phase.
Consumer education. Consumers must be made aware of the dangers of IoT systems and
provided steps to stay secure, such as updating default credentials and applying software updates.
Consumers can also play a role in requiring device manufacturers to create secure devices and
refusing to use those that don't meet high-security standards.
2. Smart Plugs
79
Smart plugs look like regular plugs and also fit into your existing wall outlets. They connect to
your Wi-Fi and Bluetooth network and enable you to control various appliances through their
companion app or virtual assistants like Alexa and Google Assistant.
Once set up, smart plugs allow you to turn appliances on and off and even schedule them to start
at a particular time. So you could set your water heater to turn on half an hour before you wake
up. Or turn on the slow cooker before leaving home and turn it off remotely when the cooking
time is over.
3. Smart Bulbs
Smart bulbs are well known. They don't need extra fittings to run—just plug into your wall
socket and turn them on. They can light up in millions of colors and can be scheduled to turn on
at specific times.
4. Smart Cookers
A smart pressure cooker lets you cook a tasty meal with minimal effort. Smart cookers are many
kitchen items blended into one. You can weigh food, chop it, mince, and blend in one single pot.
Some smart cookers come with a steaming rack for food and even a touchscreen to tune settings.
5. Smart Refrigerators
• There is internet in this kitchen which makes life easier for you and your family in the
kitchen.
• With this internet connection, you can transmit a lot
of information to your shopping list in the weather.
• You can also view the inside of your refrigerator with its camera technology
6. Smart Doorbell
• The most important thing in smart home applications is known to be secure and protected
home.
• With this smart doorbell designed for security, you can recognize people who come to your
home with high quality.
• The night also has infrared technology added to the smart bell. This will also send the screen
to you when it gets dark.
80
cloud computing and analytics, and AI and machine learning into their production facilities
and throughout their operations.
The process of change (or transition) from a handicraft economy to a manufacturing industry that
uses machines and new technologies is what is referred to as the Industrial Revolution.
Stages of the industrial revolution 1.0 to 4.0:
IR 1.0 or Industry 1.0 meaning: the First Industrial Revolution
IR 2.0 or Industry 2.0 meaning: the Second Industrial Revolution
IR 3.0 or Industry 3.0 meaning: the Third Industrial Revolution
IR 4.0 or Industry 4.0 meaning: the Fourth Industrial Revolution
So far, we have gone through three industrial revolutions: Industry 1.0, industry 2.0 and Industry
3.0. And now, we are in the midst of the fourth industrial revolution (industry 4.0).
Evolution of industry 1.0 to 4.0
81
lengthy hours.
4 During industry 2.0, Good examples of these There are nine principal
more techniques and are robots which can be technologies that make
The industries that programs were put in programmed to perform up Industry 4.0:
were impacted by place to improve the certain activities by – Autonomous Robots
industry 1.0 quality of output and themselves, without any – Simulation
included the glass, ensure better human intervention. – The Industrial
mining, agriculture management of Internet of Things
and textile production. – Cyber security
industries – The Cloud
– Data and Analytics
82