iot notes
iot notes
Definition
The Internet of Things (IoT) refers to a network of interconnected physical objects ("things")
that are embedded with sensors, software, and other technologies to collect and exchange
data over the internet. These devices can include anything from household items to industrial
machinery, creating a smart environment through connectivity and automation.
Introduction
IoT is revolutionizing industries and transforming the way we live. By connecting physical
objects to the internet, IoT enables automation, remote monitoring, and data-driven decision-
making. This technology has the potential to improve efficiency, reduce costs, and enhance
our overall quality of life.
Importance of IoT
1. Improved Quality of Life: Enhances daily living with smart home technologies and
wearables.
2. Business Optimization: Boosts productivity and efficiency through automation.
3. Environmental Monitoring: Aids in addressing climate change and conservation.
4. Healthcare Advancements: Facilitates remote monitoring and preventive care.
5. Smart Cities: Addresses urban challenges like traffic, waste, and energy
management.
Types of IoT
1. Consumer IoT:
o Smart homes (e.g., Amazon Alexa, Google Nest)
o Wearables (e.g., Fitbit, smartwatches)
2. Industrial IoT (IIoT):
o Manufacturing, supply chain management
o Smart agriculture, predictive maintenance
3. Healthcare IoT:
o Remote monitoring devices (e.g., insulin pumps, ECG monitors)
o Telemedicine platforms
4. Smart Cities:
o Smart traffic management
o Waste management systems
5. Environmental IoT:
o Weather monitoring stations
o Wildlife tracking systems
Q2. Explain types of IOT and difference between Consumer IOT and Industrial
Internet.
Types of IoT
IoT can be categorized into various types based on application domains:
3. Healthcare IoT:
● Focuses on medical devices and systems to improve patient care.
● Examples:
o Remote patient monitoring.
o Smart insulin pumps and ECG monitors.
o Wearable health trackers.
4. Smart Cities IoT:
● Used in urban planning and infrastructure to improve quality of life.
● Examples:
o Smart traffic systems.
o Waste management.
o Energy-efficient streetlights.
5. Environmental IoT:
● Monitors environmental conditions and manages resources.
● Examples:
o Weather monitoring systems.
o Smart irrigation systems.
o Wildlife tracking.
6. Agricultural IoT:
● Focuses on improving agricultural productivity and efficiency.
● Examples:
o Soil moisture sensors.
o Automated irrigation systems.
o Livestock monitoring.
7. Military IoT:
● Used for defense and strategic operations.
● Examples:
o Surveillance drones.
o Smart weaponry.
o Battlefield monitoring.
Large-scale, interconnected
Scale Small-scale, personal use devices.
systems.
Q3. Fundamental building blocks, use case of IOT in various industry domains.
Building Blocks Of IOT
1. Sensors and Actuators:
o Sensors: Collect real-world data (e.g., temperature, motion, humidity).
o Actuators: Perform actions based on processed data (e.g., turning on lights).
2. Processors:
o Handle data processing using microcontrollers or microprocessors.
o Example: Arduino, Raspberry Pi.
3. Gateways and Communication:
o Transfer data between devices and networks via Wi-Fi, Bluetooth, Zigbee, or
5G.
o Gateways ensure secure and reliable communication.
4. Application:
o User interface for controlling and monitoring devices through mobile apps,
dashboards, or voice commands.
5. Database:
o Stores and manages data collected by IoT devices.
o Example: Cloud platforms like AWS, Google Cloud, or local databases.
2. Healthcare
● Applications:
o Remote patient monitoring (heart rate monitors, ECG devices).
o Wearable health trackers (Fitbit).
o Smart pill dispensers for medication adherence.
● Benefits:
o Improved patient outcomes and reduced hospital visits.
3. Manufacturing (Industrial IoT - IIoT)
● Applications:
o Predictive maintenance using sensors to monitor equipment health.
o Robotics for automation in assembly lines.
o Supply chain optimization with real-time tracking.
● Benefits:
o Reduced downtime, increased efficiency, and cost savings.
4. Agriculture
● Applications:
o Smart irrigation systems based on soil moisture sensors.
o Livestock monitoring for health and location tracking.
o Climate monitoring to optimize crop yield.
● Benefits:
o Increased productivity and resource efficiency.
6. Smart Cities
● Applications:
o Smart traffic management (adaptive traffic lights).
o Waste collection optimization with smart bins.
o Energy-efficient streetlights.
● Benefits:
o Enhanced urban living and reduced resource wastage.
7. Energy
● Applications:
o Smart grids for real-time energy management.
o Smart meters for monitoring electricity, gas, and water usage.
o Renewable energy systems with IoT-based performance monitoring.
● Benefits:
o Lower energy costs and reduced environmental impact.
8. Retail
● Applications:
o Smart shelves that track inventory levels.
o Personalized in-store experiences using beacon technology.
o Automated checkout systems.
● Benefits:
o Enhanced customer satisfaction and reduced operational costs.
9. Environmental Monitoring
● Applications:
o Air and water quality monitoring systems.
o Wildlife tracking using GPS-enabled devices.
o Climate change data collection.
● Benefits:
o Better resource management and informed decision-making.
2. Edge Computing
● Definition: Data is processed locally at the edge devices rather than relying solely on
the cloud.
● Benefits:
o Reduces latency for real-time operations.
o Minimizes bandwidth usage by preprocessing data locally.
o Improves system reliability by operating independently of cloud connectivity.
3. IoT Gateways
● Role: Bridges the gap between the edge devices and cloud systems.
● Functions:
o Converts protocols (e.g., from Modbus to MQTT).
o Filters and aggregates data to reduce unnecessary cloud storage.
o Enhances security by encrypting data before transmission.
1. Data Ingestion
Definition: Data ingestion is the process of collecting raw data from multiple sources and
loading it into a storage system (e.g., a database, data lake, or cloud storage) for further
processing and analysis. It is the first step in the data pipeline, which prepares data for
downstream tasks like cleaning, transformation, and analysis.
Types of Data Ingestion:
1. Batch Ingestion:
o Data is collected in large chunks at scheduled intervals (e.g., hourly, daily).
o It is suitable for non-time-sensitive data and systems that can tolerate delays.
o Example: Loading daily sales data from a retail store to a data warehouse.
2. Real-Time (Stream) Ingestion:
o Data is ingested continuously in real-time or near real-time.
o It is used when immediate processing of data is required (e.g., in monitoring
systems).
o Example: Ingesting real-time data from IoT sensors or web logs.
3. Hybrid Ingestion:
o Combines both batch and real-time ingestion based on the needs of the
system.
o Example: Analyzing historical data with batch processing while processing
real-time sensor data in parallel.
Key Technologies for Data Ingestion:
● Apache Kafka: A distributed streaming platform for real-time data ingestion.
● Apache Nifi: A data integration tool for automating the movement of data.
● AWS Kinesis: A platform for real-time data streaming.
● Flume: A distributed service for efficiently collecting, aggregating, and moving large
amounts of log data.
1. Sensors
Definition: A sensor is a device that detects a physical parameter (such as temperature,
pressure, light, or motion) from the environment and converts it into an electrical signal,
which can be measured and analyzed.
Types of Sensors:
1. Temperature Sensors: Measure temperature changes (e.g., Thermocouples,
RTDs).
2. Pressure Sensors: Detect pressure levels in gases or liquids (e.g., Strain gauges,
piezoelectric sensors).
3. Proximity Sensors: Detect the presence of objects without physical contact (e.g.,
Capacitive, inductive sensors).
4. Light Sensors: Measure light intensity (e.g., Photodiodes, phototransistors).
5. Motion Sensors: Detect motion (e.g., PIR sensors, accelerometers).
6. Humidity Sensors: Measure humidity or moisture levels in the air (e.g., Capacitive
humidity sensors).
7. Gas Sensors: Detect gases like oxygen, carbon dioxide, or volatile organic
compounds (e.g., MQ series sensors).
Working Principle:
● Sensors work by detecting a physical phenomenon (such as light intensity,
temperature change, or force) and converting it into an electrical signal. This signal is
typically a voltage or current, which is then used for further processing.
2. Transducers
Definition: A transducer is a device that converts one form of energy into another. In the
context of sensors, a transducer converts the sensor's output (usually a physical quantity like
temperature or pressure) into an electrical signal that can be easily processed.
Types of Transducers:
1. Active Transducers: These generate an electrical signal directly in response to an
external stimulus (e.g., thermocouples).
2. Passive Transducers: These require an external power source to operate and
modify a physical signal (e.g., resistive temperature devices (RTDs), strain gauges).
3. Electromechanical Transducers: These convert mechanical energy into electrical
energy (e.g., piezoelectric transducers).
4. Optical Transducers: These convert light into an electrical signal (e.g., photodiodes,
phototransistors).
Working Principle:
● A sensor is often paired with a transducer to translate the detected physical property
(like temperature, pressure, etc.) into a proportional electrical signal. The transducer
amplifies or adjusts the signal, enabling it to be processed by electronics.
2. Distributed Control System (DCS): Controls processes within a specific area (e.g.,
a factory). It distributes control across multiple devices or controllers for better
management.
Functions:
● Continuous control of industrial processes.
● Distributed processing and control, where each subsystem or plant area has its own
local controller.
● Integration with plant-wide systems for optimized process management.
● Alarm, event logging, and real-time control.
Functions of ICS:
1. Automation: Automates the control of machinery and equipment, reducing human
intervention.
2. Monitoring and Control: Monitors the system’s performance and makes necessary
adjustments to ensure smooth operation.
3. Safety and Security: Ensures the safe operation of industrial equipment, protecting
workers and systems from hazards.
4. Data Acquisition: Collects data from various devices and sensors to optimize
performance and detect faults or anomalies.
Components of ICS:
● Sensors and Actuators (for real-time measurements and control)
● Controllers (like PLCs or DCS to make decisions based on data)
● Human-Machine Interface (HMI) (for operators to interact with the system)
● Communication Networks (to link devices and controllers for data transfer)
UNIT 4
Q1. OSI Model 7 layers and mapping to IOT architecture.
The OSI (Open Systems Interconnection) model consists of seven layers that describe how
data is transmitted over a network. When mapping these layers to an IoT (Internet of Things)
architecture, the general concepts are aligned, though IoT typically requires additional
considerations like device communication protocols and cloud services. Below is a mapping
of the OSI layers to the IoT architecture:
OSI Model Layers and IoT Architecture Mapping
1. Physical Layer (Layer 1)
o OSI Definition: Deals with the physical transmission of data over a medium
(e.g., cables, radio waves).
o IoT Mapping: Refers to the actual hardware devices and communication
mediums used to connect IoT devices. This includes sensors, actuators, Wi-
Fi, Bluetooth, Zigbee, LoRa, cellular networks (e.g., 4G, 5G), and Ethernet.
2. Data Link Layer (Layer 2)
o OSI Definition: Handles the error-free transfer of data frames between two
devices over the physical layer.
o IoT Mapping: Focuses on communication protocols that manage error
detection and correction. Examples include Bluetooth Low Energy (BLE),
Zigbee, LoRaWAN, and Wi-Fi MAC layers. It ensures reliable data
transmission from one node to another.
3. Network Layer (Layer 3)
o OSI Definition: Manages routing and forwarding of data packets across
networks.
o IoT Mapping: Defines how data is routed through the network. In IoT, this
layer uses IP-based protocols like IPv6 (due to the need for many IP
addresses in IoT). It also includes routing protocols such as RPL (Routing
Protocol for Low Power and Lossy Networks) used in low-power IoT devices.
4. Transport Layer (Layer 4)
o OSI Definition: Responsible for end-to-end communication and error
recovery, ensuring complete data transfer.
o IoT Mapping: In IoT, this layer can include protocols like TCP, UDP, and
lightweight protocols such as MQTT (Message Queuing Telemetry Transport)
or CoAP (Constrained Application Protocol) for low-power devices. MQTT is
widely used for IoT due to its lightweight nature and efficient message
delivery.
5. Session Layer (Layer 5)
o OSI Definition: Manages sessions or connections between two devices,
ensuring data exchange is organized and continuous.
o IoT Mapping: In the context of IoT, this layer could be part of a
communication protocol or middleware responsible for managing ongoing
device communications. It often relies on MQTT and CoAP to maintain
communication sessions between IoT devices and the cloud.
6. Presentation Layer (Layer 6)
o OSI Definition: Responsible for data translation, encryption, and
compression.
o IoT Mapping: This layer ensures that data from IoT devices is formatted and
processed correctly. It may include compression of data before sending it to
conserve bandwidth or encryption to secure the data. Formats such as JSON
or CBOR (Concise Binary Object Representation) are often used for data
exchange in IoT systems.
7. Application Layer (Layer 7)
o OSI Definition: The highest layer that interacts directly with the application
and end-users. It provides application services like email, file transfer, and
network management.
o IoT Mapping: In IoT, this is the layer where the devices and applications
interact. It includes protocols and services that provide the core functionality
of IoT systems, such as cloud-based applications, device management, data
analytics, and control applications. Protocols such as HTTP, MQTT, and
CoAP facilitate communication between the IoT devices and cloud services or
edge nodes.
2. Bluetooth
Overview: Bluetooth is a short-range wireless communication technology designed for
exchanging data over short distances (typically up to 100 meters).
Key Features:
● Short Range: Bluetooth's range typically varies from 10 meters (Bluetooth Class 3)
to 100 meters (Bluetooth Class 1), depending on the device class and power
settings.
● Low Power Consumption: Bluetooth Low Energy (BLE) is a variation of Bluetooth
that is optimized for low power consumption, making it suitable for IoT devices that
run on batteries for long durations.
● High-Speed Data Transfer: Bluetooth offers data transfer rates of up to 3 Mbps
(Bluetooth 2.0), and BLE provides data rates of around 1 Mbps, which is suitable for
many IoT applications.
● Piconet and Scatternet: Bluetooth operates using piconets, where one master
device can communicate with up to seven slave devices. A scatternet allows
communication between multiple piconets, enabling more extensive networks.
● Security: Bluetooth provides secure pairing mechanisms and encryption using
various protocols like AES for data confidentiality.
Applications:
● Personal Area Networks (PAN): Bluetooth is commonly used for creating PANs,
enabling devices such as smartphones, laptops, and tablets to communicate with
peripherals like keyboards, speakers, and headsets.
● Healthcare: BLE is widely used in wearable health devices, such as fitness trackers,
blood pressure monitors, and glucose meters.
● Smart Home: Bluetooth is also used in smart home devices like locks, lights, and
appliances.
Advantages:
● Low power consumption (BLE)
● Widely adopted and compatible across many devices
● High-speed data transfer
● Secure pairing and encryption
Disadvantages:
● Shorter range compared to other technologies like ZigBee and Wi-Fi
● Interference from other devices operating in the 2.4 GHz band
● Limited data rate for some applications
3. Serial Communication
Overview: Serial communication refers to the process of transmitting data one bit at a time
over a communication channel. It is one of the simplest and oldest forms of communication,
typically used for point-to-point communication between two devices, such as a computer
and a peripheral device. Serial communication is often used in embedded systems,
microcontroller-based projects, and industrial control systems.
Key Features:
● Data Transmission: Data is transmitted in a series of bits, one after another, over a
communication channel.
● Two Types: There are two main types of serial communication:
o A standard for serial communication that uses voltage levels to represent
data. Commonly used for communication between computers and external
devices like modems and printers.
o TTL (Transistor-Transistor Logic): Uses digital signals (0 and 1) for
communication, commonly used in microcontroller-based systems.
● Low Data Rates: Serial communication generally supports lower data rates
compared to wireless technologies like Bluetooth or ZigBee.
● Point-to-Point Communication: Serial communication typically involves
communication between two devices. However, some protocols like RS-485 can
support multi-point communication.
Applications:
● Embedded Systems: Serial communication is widely used in microcontrollers and
embedded systems for communication between devices, such as sensors, actuators,
and peripherals.
● Industrial Control Systems: Serial communication is used in PLCs (Programmable
Logic Controllers) and SCADA (Supervisory Control and Data Acquisition) systems
for data acquisition and control.
● Consumer Electronics: Devices like printers, modems, and older computer
peripherals often use serial communication for data exchange.
Advantages:
● Simple and inexpensive
● Low power consumption
● Reliable for short-range communication
Disadvantages:
● Limited data rates (compared to wireless technologies)
● Limited to point-to-point communication (except in multi-drop configurations)
● Requires cables, making it less flexible than wireless solutions
Q3. Industrial Network Protocols – MODBUS, CANBUS
Industrial Network Protocols: Modbus and CANBus
Industrial networks rely on various communication protocols to ensure reliable and efficient
data exchange between machines, sensors, and control systems. Two of the most widely
used protocols in industrial applications are Modbus and CANBus. These protocols help in
automation, monitoring, and control within industries such as manufacturing, energy, and
automotive.
Below is a detailed yet easy-to-understand note on Modbus and CANBus, explaining their
features, applications, advantages, and differences.
1. Modbus Protocol
Overview:
Modbus is one of the oldest and most commonly used communication protocols in industrial
automation. It was developed by Modicon (now Schneider Electric) in 1979 to allow devices
like Programmable Logic Controllers (PLCs) to communicate over serial lines. It is widely
used in industries for connecting devices like sensors, actuators, and control systems in
supervisory control and data acquisition (SCADA) systems.
Key Features:
● Communication Types: Modbus allows two types of communication:
o Modbus RTU (Remote Terminal Unit): This version of Modbus uses binary
coding for data transmission and is often used in serial communication (RS-
485, RS-232). It is efficient in terms of data transmission and error checking.
o Modbus TCP/IP: This version of Modbus runs over Ethernet and is used for
network-based communication, making it suitable for larger networks and
faster communication.
● Master-Slave Architecture: Modbus operates using a master-slave architecture,
where one master device (usually a PLC or a computer) controls communication with
one or more slave devices (sensors, actuators). The master sends requests, and the
slave responds with data or actions.
● Simple and Open: Modbus is simple to implement and open-source, which makes it
easy for different devices and manufacturers to integrate Modbus communication into
their systems.
● Data Types: Modbus can handle different data types, such as coils (on/off states),
discrete inputs (binary data), and analog inputs/outputs (integer or floating-point
values).
Applications:
● PLC Communication: Modbus is commonly used for communication between PLCs
and devices like remote sensors, meters, or actuators.
● SCADA Systems: Modbus is used in SCADA systems for monitoring and controlling
remote devices in industries like oil & gas, water treatment, and manufacturing.
● Energy Management: Modbus is used in energy meters and controllers to collect
data for monitoring and controlling electrical power systems.
Advantages:
● Easy to Implement: Modbus is straightforward to set up and configure, even for non-
experts.
● Wide Compatibility: It is supported by a large number of devices and vendors
across many industries.
● Open Protocol: Being open-source, Modbus is cost-effective and flexible for various
industrial needs.
Disadvantages:
● Limited Data Transfer Rate: Modbus, especially Modbus RTU, is slower than newer
protocols and may not be suitable for applications requiring high-speed
communication.
● No Built-in Security: Modbus lacks built-in encryption or security features, which
can be a concern in sensitive applications.
● Limited Scalability: Modbus may face challenges when handling very large
networks or high volumes of data.
MQTT Architecture:
1. Broker: The MQTT broker is a central server that handles the routing of messages
between publishers and subscribers. It is responsible for receiving all messages,
filtering them based on topics, and then distributing them to the appropriate
subscribers.
2. Publisher: A publisher is any device or application that sends messages to a topic. A
publisher can send messages to one or more topics based on the application's
requirements.
3. Subscriber: A subscriber is a device or application that subscribes to one or more
topics to receive messages. A subscriber only receives messages for the topics to
which it has subscribed.
Unit 6
Q1. Time Series data and their characteristics, time series database, basic time series
analytics.
Time Series Data
refers to data that is collected, recorded, or indexed in time order. It consists of sequences of
data points typically taken at successive, evenly spaced time intervals, such as seconds,
minutes, hours, or days. This type of data is used extensively in various fields like finance,
economics, weather forecasting, sensor monitoring, and more.
Key Characteristics of Time Series Data:
1. Time Dependency:
In time series data, the values at a given time are dependent on previous time points.
This temporal dependency is a fundamental characteristic of time series data.
2. Trend:
A trend refers to the long-term movement in the data over time. It can either be
upward (increasing), downward (decreasing), or flat (no significant change over
time). Identifying a trend helps in understanding the general direction of the data.
3. Seasonality:
Seasonality is the repeating fluctuation or pattern observed in the data at regular
intervals over time. These patterns can be daily, weekly, monthly, or yearly. For
example, sales data might show higher figures during holidays every year.
4. Cyclic Patterns:
Unlike seasonality, cyclic patterns refer to the long-term fluctuations that occur at
irregular intervals due to economic cycles, business cycles, or other factors. These
cycles do not have a fixed period like seasonal patterns.
5. Noise:
Noise represents random variations or irregularities in the data that are not part of the
trend or seasonality. Noise can obscure patterns and make predictions less accurate.
6. Stationarity:
A time series is said to be stationary if its statistical properties, such as mean and
variance, do not change over time. Non-stationary time series data often needs to be
transformed to become stationary for analysis or modeling.
7. Autocorrelation:
Autocorrelation is the correlation between a time series and a lagged version of itself.
It helps in identifying the relationships and dependencies between observations at
different time lags.
7. Correlation Analysis: Correlation analysis examines how different time series are
related. Cross-correlation can be used to understand the relationship between two
time series, helping identify how one series might influence the other over time.
8. Change Point Detection: This technique is used to identify points in time when the
statistical properties of a time series change. Change points can indicate shifts in
behavior, such as a sudden spike in sales or an unexpected system failure.
Q2. Data Summarization and sketching, dealing with noisy and missing data, anamoly
and outliner detection.
Data Summarization and Sketching
Data Summarization is the process of presenting the key features or essence of a dataset
in a more concise and interpretable form. It involves extracting meaningful information from
raw data, which can then be used for further analysis or decision-making.
Methods of Data Summarization:
1. Descriptive Statistics:
Descriptive statistics involve summarizing the central tendency, spread, and shape of
the data distribution. This includes:
o Mean: The average value of a dataset.
o Median: The middle value when the data is ordered.
o Mode: The most frequent value in the dataset.
o Variance and Standard Deviation: Measures of data spread or dispersion
around the mean.
o Skewness: A measure of asymmetry in the data.
o Kurtosis: The "tailedness" or sharpness of the data distribution.
2. Data Visualization:
Visualization helps to summarize data through graphs and charts. Common
techniques include:
o Histograms: For understanding the frequency distribution of data.
o Boxplots: To show the spread and identify potential outliers.
o Scatter Plots: To visualize relationships between variables.
o Heatmaps: For showing correlations or relationships between multiple
variables.
3. Sampling:
Data summarization often involves using representative samples from a large
dataset. Random sampling, stratified sampling, or systematic sampling helps reduce
the data size while preserving essential characteristics.
4. Data Aggregation:
This involves grouping data and calculating summary statistics (e.g., sum, average,
count) over different categories. For example, calculating the average sales per
month for each region.
5. Dimensionality Reduction:
Techniques like Principal Component Analysis (PCA) and t-SNE (t-Distributed
Stochastic Neighbor Embedding) can reduce the complexity of high-dimensional
data by extracting the most important features.