Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
22 views39 pages

IoT Architecture and Protocols

IoT Architecture and Protocols unit 1 notes engineering

Uploaded by

misha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views39 pages

IoT Architecture and Protocols

IoT Architecture and Protocols unit 1 notes engineering

Uploaded by

misha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

IoT Architecture and Protocols

Unit–1: IoT – An Architectural Overview (15 hrs)


Chapter 1 – IoT Architectural Overview
• Building architecture: Layers (Perception, Network, Application).
• Design principles: scalability, interoperability, security, low power.
• IoT architecture outline: device layer → gateway layer → cloud layer.
• Standards considerations: IEEE 802.15.4, 6LoWPAN, CoAP, MQTT, etc.
• M2M and IoT Fundamentals: direct machine communication vs IoT-enabled smart environment.
• Physical & logical design: hardware (sensors, actuators), software (protocols, services).
• Design challenges: heterogeneity, power, QoS, security, latency.
• IoT Levels: perception → network → edge → application.
• Deployment templates: smart home, smart city, industrial IoT.

Building Architecture:
• Iot architecture refers to the tangle of components such as sensors, actuators, cloud services,
Protocols, and layers that make up iot networking systems.
• It is divided into layers that allow administrators to evaluate, monitor, and maintain the
integrity of the system.
• The architecture of iot is a four-step process through which data flows from devices connected
to sensors, through a network, and then through the cloud for processing, analysis, and storage.

there are four layers present i.e., the Perception Layer, Network Layer, Processing Layer, and
Application Layer
1. Perception/Sensing Layer:
• The Perception Layer is where sensors and devices collect data from the physical world.
• refers to the physical layer, which includes sensors and actuators that are capable of collecting,
accepting, and processing data over the network.
• Sensors and actuators can be connected either wirelessly or via wired connections.
• The architecture does not limit the scope of its components nor their location.

2. Network Layer:
• Provides an overview of how data moves throughout the application and connects devices to the
network.
• Includes Data Acquiring Systems (DAS) and Internet/Network gateways.
• DAS performs data aggregation and conversion, collecting data from sensors and converting
analog signals to digital formats.
• Transmits and processes data collected by sensor devices, ensuring the information reaches its
destination for further handling.
• Facilitates device communication with servers, smart devices, and other networked devices.
• Manages all data transmissions within the system.

3. Processing Layer:
• Acts as the brain of the IoT ecosystem.
• Data is analyzed, pre-processed, and stored at this stage before being sent to the data center.
• Software applications access the processed data to monitor, manage, and determine further
actions.
• This layer introduces edge IT or edge analytics, enabling real-time data processing closer to the
data source.

4. Application Layer:
• The application layer is where user interaction occurs, providing application-specific services.
• Examples include smart home apps allowing users to control devices (such as turning on a
coffee maker) or dashboards displaying device statuses.
• The Internet of Things can be implemented in various domains, including smart cities, smart
homes, and smart health.

IoT Design Methodology that includes:


• Purpose & Requirements Specification
• Process Specification
• Domain Model Specification
• Information Model Specification
• Service Specifications
• IoT Level Specification
• Functional View Specification
• Operational View Specification
• Device & Component Integration
• Application Development
Deployment templates: smart home, smart city,
industrial IoT.
1. Device
• An IoT device is the physical unit in the system.
• Functions:
o Identification (unique ID for each device).
o Remote sensing (collecting data via sensors).
o Actuating (controlling actuators like motors, lights, or alarms).
o Remote monitoring (sending device status to users).
• Examples: Smart thermostat, fitness tracker, smart bulb.

2. Resource
• Software modules on the device that manage data access, processing, and storage.
• Functions:
o Handle sensor readings and actuator control.
o Provide network access (e.g., TCP/IP stack, communication drivers).
• Think of resources as the “internal software brain” of the IoT device.

3. Controller Service
• A native service running on the device.
• Role:
o Sends sensor data to the web service.
o Receives commands from the application (via web services) to control the device.
• Example: A smart plug receives an “ON” command from the app → controller service switches
the relay.

4. Database
• Stores all IoT data generated by devices.
• Types:
o Local database (on-premises or device level).
o Cloud database (remote, scalable storage).
• Example: Firebase IoT DB, AWS DynamoDB, MongoDB.

5. Web Service
• Acts as the bridge between devices, applications, and databases.
• Can be implemented as:
o REST service (HTTP/REST principles) → request-response model.
o WebSocket service → real-time, two-way communication.
• Ensures smooth integration between IoT components.

6. Analysis Component
• Processes the raw IoT data into meaningful information.
• Functions:
o Apply analytics, machine learning, or visualization.
o Generate results in a user-friendly form (charts, predictions, alerts).
• Example: Predictive maintenance system analyzing sensor logs.

7. Application
• Provides the user interface for monitoring and control.
• Functions:
o Display device status and system health.
o Allow user control (turn devices on/off, set preferences).
o Visualize processed data (graphs, dashboards, reports).
• Examples: Smart home apps, healthcare monitoring dashboards.
Standard Considerations of IoT

1. Communication
Interoperability
• Devices from different manufacturers must work together.
• Protocols like MQTT, CoAP, and OPC UA allow seamless communication.
Network Technologies
• Short-range: Bluetooth, Wi-Fi → suitable for homes, offices, and small areas.
• Long-range: Cellular, LPWAN, and satellite → used for smart cities, logistics, or
industrial IoT.
5G
• Designed for IoT at scale.
• Provides low latency, high speed, and supports millions of devices
simultaneously.

2. Data
Unified Data Standards
• Data should follow consistent formats and structures so devices can exchange
and interpret information easily.
Data Velocity
• IoT generates real-time or near real-time data.
• Systems must handle fast ingestion, processing, and analysis.
Data Management
• Consider how data is stored, accessed, and secured.
• Must address privacy, compliance (e.g., GDPR), and regulatory requirements.
3. Security
End-to-End Security
• Protect communication between devices, gateways, and the cloud.
• Also secure data at rest in storage.
Security Protocols
• Use encryption and authentication protocols like HTTPS, TLS/DTLS.
Authentication & Authorization
• Only trusted devices and authorized users should access the system.
Threat Modeling
• Identify possible threats and vulnerabilities in advance.
• Apply countermeasures (e.g., firewalls, intrusion detection).
Decommissioning
• Plan secure retirement of devices.
• Ensure deletion of sensitive data when devices are no longer in use.

4. Other Considerations
International Standards
• ISO/IEC 30141: Framework for designing trustworthy IoT systems (focus on
security, privacy, interoperability).
• ISO/IEC 27030: Guidelines for secure design and development of IoT devices.
• ISO/IEC 21823-3: Rules for testing and validation of IoT systems.
ETSI (European Telecommunications Standards Institute)
• Works on IoT standards for privacy, safety, security, and low-power
operations.
Testbeds
• Provide environments to test new IoT devices and services.
• Help achieve plug-and-play compatibility and speed up innovation.

M2M and IoT Fundamentals


• Machine-to-Machine (M2M) refers to networking of machines (or devices) for
the purpose of remote monitoring and control and data exchange.
• An M2M area network comprises of machines (or M2M nodes) which have
• embedded hardware modules for sensing, actuation and communication.
• Various communication protocols can be used for M2M local area
• networks such as ZigBee, Bluetooh, ModBus, M-Bus, Wirless M-Bus, Power
• Line Communication (PLC), 6LoWPAN, IEEE 802.15.4, etc.
• The communication network provides connectivity to remote M2M area
• networks.
• The communication network can use either wired or wireless networks
(IPbased).
• While the M2M area networks use either proprietary or non-IP based
• communication protocols, the communication network uses IP-based
• networks.
• Since non-IP based protocols are used within M2M area networks, the
• M2M nodes within one network cannot communicate with nodes in an
• external network.
• To enable the communication between remote M2M area networks,
• M2M gateways are used.

Difference
Basis of IoT M2M
Abbreviation Internet of Things Machine to Machine
Intelligence Devices (“Things”) have embedded Machines have limited, task-
intelligence and can make decisions specific intelligence
Connection Type Network-based, supports multiple Point-to-point connections
communication types (IP-based)
Communication Uses Internet protocols like HTTP, Uses proprietary or non-IP
Protocols FTP, MQTT, CoAP, Telnet protocols and traditional
comm. methods
Machines vs Things = physical objects with Typically homogeneous
Things unique IDs; can sense environment & machines within an M2M
communicate area network
Hardware vs Strong focus on software (apps, Strong focus on hardware
Software APIs, cloud, analytics) (embedded modules, device
solutions)
Data Sharing Data shared across multiple Data shared only between
applications to enhance user the two communicating
experience machines
Data Collection Data collected in the cloud Data collected in point
(public/private/hybrid) solutions / on-premises
infrastructure
Data Analysis & Cloud applications (analytics, On-premises applications
Access enterprise apps, AI/ML, remote (diagnostics, service mgmt,
monitoring) ERP systems)
Internet Requires Internet connection Not dependent on Internet
Dependency
Type of Supports cloud communication Supports point-to-point
Communication communication
Computer System Uses both hardware and software Mostly hardware-based
Scope Very large scope, supports millions Limited scope, fewer devices
of heterogeneous devices
Business Type B2B (Business to Business) & B2C Mainly B2B
(Business to Consumer)
Open API Supports Open API integrations No support for Open APIs
Support
Requirements Uses generic commodity devices Requires specialized device
solutions
Centric Approach Information & service centric Communication & device
centric
Approach Used Horizontal enabler approach Vertical system solution
(scalable across industries) approach (industry-specific)
Components Sensors, connectivity, data Devices, area networks,
processing, cloud, UI, big data gateway, application server
Applications Cloud-based apps: analytics, On-premises apps:
enterprise apps, remote diagnosis, diagnostics, service
management apps management, local enterprise
Examples Smart wearables, smart homes, big Industrial telemetry, utility
data, cloud services sensors, device-to-device
systems

Physical and Logical Design of IoT


1. Physical Design of IoT
Physical design refers to the tangible components that make up an IoT
system — the hardware we can touch and see.
Key Components:
1. Devices / “Things”
o Sensors: detect physical parameters (temperature, pressure, motion,
light, etc.).
o Actuators: perform actions (motors, alarms, switches).
o Examples: smart thermostats, cameras, wearable health monitors.
2. IoT Protocols (Physical Layer)
o Communication technologies used at the physical layer: Wi-Fi,
Bluetooth, Zigbee, LoRa, LTE, RFID.
3. IoT Gateways
o Intermediate devices that connect local IoT networks to the cloud.
o Handle protocol translation, data aggregation, security filtering.
4. Connectivity
o Wired (Ethernet, RS-232) or Wireless (Wi-Fi, Cellular, LPWAN,
Satellite).
In short, physical design = devices + hardware interfaces + network
connectivity.

2. Logical Design of IoT


Logical design refers to the abstract representation of how IoT systems are
structured, communicate, and process data. It’s more about concepts, models,
and data flow than actual hardware.
Key Elements:
1. Functional Blocks
o Perception Block: sensing, data collection.
o Network Block: transmission of data.
o Application Block: delivers services to users.
2. IoT Functional Model
o Device Management: provisioning, monitoring, firmware updates.
o Communication Management: protocols (MQTT, CoAP, HTTP,
AMQP).
o Security Management: authentication, encryption, access control.
o Data Processing & Analytics: transforming raw sensor data into
insights.
3. Logical Entities
o IoT Devices: identified by unique IDs.
o Resources: abstract representation of device data or services (e.g.,
“temperature sensor reading”).
o Services: functions provided (monitoring, alerts, control).
4. Data Flow in Logical Design
o Device → Data Acquisition → Communication Protocol →
Processing (Edge/Cloud) → Application/Services.
In short, logical design = how devices, data, and services interact
conceptually.
Example to Differentiate
• Smart Home IoT Example
o Physical Design: Smart thermostat (hardware), Wi-Fi router,
sensors, actuators, cloud server.
o Logical Design: Data sensed (temperature) → transmitted via MQTT
→ processed in cloud → user app displays analytics and allows
remote control.

Design challenges
. Security and Privacy
• IoT devices often handle sensitive personal or industrial data.
• Protecting devices and networks from cyberattacks, data breaches, and unauthorized access is
critical.
• End-to-end encryption, authentication, and secure firmware updates are essential measures.

2. Interoperability and Standardization


• IoT devices come from different manufacturers and use different protocols.
• Lack of universal standards makes seamless communication difficult.
• Efforts like oneM2M and ISO/IEC 30141 aim to improve interoperability.

3. Power Consumption and Battery Life


• Many IoT devices are battery-operated and deployed in remote areas.
• Energy-efficient hardware and low-power communication technologies (LoRa, NB-IoT) are
needed to extend device life.

4. Scalability
• IoT networks may need to handle millions of devices.
• Systems must be designed to scale without affecting performance, latency, or reliability.

5. Data Management
• IoT generates huge volumes of real-time data.
• Efficient collection, storage, and processing (using edge, fog, and cloud computing) is
necessary.
• Big data analytics and AI play a key role in extracting insights.
6. Hardware Limitations
• Devices must be small, affordable, and durable.
• Limited processing power, memory, and storage present challenges when designing IoT systems.

7. Connectivity
• Reliable communication is required across diverse environments (urban, rural, industrial,
remote).
• Challenges include network coverage, latency, bandwidth, and congestion.

8. Integration with Existing Systems


• IoT must work with legacy systems, enterprise IT, and industrial OT infrastructure.
• Integrating new devices without disrupting operations can be complex.

9. User-Friendliness
• Interfaces should be intuitive, accessible, and inclusive.
• Adoption depends on easy-to-use applications that cater to all users, including those with
disabilities.

10. Cost
• IoT deployments require investment in hardware, networks, cloud services, and maintenance.
• Balancing affordability with quality and functionality is a key challenge.

11. Environmental Impact


• Billions of IoT devices contribute to e-waste and energy use.
• Designing sustainable devices with eco-friendly materials, recycling plans, and energy-
efficient designs is vital.

IoT architecture outline


1. Physical Devices & Controllers (Perception Layer)
• Includes all “things” in IoT: sensors, actuators, devices, machines.
• Responsible for sensing the environment, collecting raw data, and executing
actions.
• Examples: Temperature sensors, cameras, smart meters, industrial machines.

2. Connectivity Layer
• Provides communication and processing units.
• Transfers data between devices and the network/cloud.
• Technologies: Wi-Fi, Bluetooth, Zigbee, LoRa, NB-IoT, Cellular
(3G/4G/5G), Ethernet.
• Ensures that devices are always connected to gateways or cloud platforms.

3. Edge Computing Layer


• Performs data element analysis and transformation close to the data
source.
• Reduces latency and network load by processing locally.
• Examples: IoT gateways, edge servers, routers with compute capability.
• Functions: Filtering, preprocessing, real-time responses.
4. Data Accumulation Layer (Storage Layer)
• Stores raw and processed IoT data for future use.
• Can use databases, distributed storage, or cloud storage platforms.
• Ensures that data is available for higher-level processing and analytics.

5. Data Abstraction Layer


• Provides aggregation and access to stored IoT data.
• Organizes, indexes, and formats data so it can be used effectively by
applications.
• Examples: APIs, data warehouses, middleware tools.
• Ensures data consistency and availability across applications.

6. Application Layer
• Provides reporting, analytics, and control to end-users.
• Translates IoT data into meaningful information via dashboards, apps, or
enterprise software.
• Examples: Smart home apps, industrial monitoring dashboards, healthcare
apps.

7. Collaboration & Processes Layer (Business Layer)


• Focuses on people and business processes.
• Defines how IoT data supports business goals, decisions, and workflows.
• Includes automation, collaboration tools, and integration with enterprise
systems (ERP, CRM).
• Examples: Predictive maintenance processes, smart city management,
supply chain optimization.
Chapter 2 – M2M and IoT Technology Fundamentals
• IoT Security: attacks (DoS, eavesdropping, spoofing), risks, countermeasures (encryption, authentication).
• IoT digitization: convergence of OT (Operational Tech) & IT.
• Differences IT vs OT: IT → data mgmt, OT → physical processes.
• Trends & Research: edge AI, 5G IoT, blockchain IoT, digital twins.
• Privacy & Security: data anonymization, GDPR, secure communication.
• IoT Applications: healthcare, transport, smart grids, agriculture.
• Devices & Gateways: microcontrollers, Raspberry Pi, industrial gateways.
• Networking: LAN, WAN, LPWAN (LoRa, NB-IoT).
• M2M & IoT Analytics: predictive maintenance, real-time dashboards.
• Edge Computing: processing data near the source, reduces latency.
• Industrial Internet Reference Architecture (IIRA): layers – business, functional, implementation,
communication.

IoT Digitization: Convergence of OT and IT


1. What is IoT Digitization?
• IoT digitization means transforming physical operations, assets, and processes into digital data
streams using IoT technologies.
• It enables organizations to monitor, control, and optimize systems in real time.

2. Convergence of OT and IT
• Operational Technology (OT):
o Hardware and software that monitors and controls physical devices.
o Examples: SCADA systems, PLCs, factory equipment, utility grids.
o Focus: Reliability, safety, and availability of physical processes.
• Information Technology (IT):
o Systems that manage data, networks, and applications.
Examples: Databases, enterprise software, cloud platforms.
o
Focus: Data processing, analysis, security, and business processes.
o
• Convergence in IoT:
o IoT bridges OT and IT by connecting physical devices (OT) with digital platforms
(IT).
o Sensor data from machines → transmitted to cloud/IT systems → analyzed → used for
decision-making → control signals sent back to devices.

3. Benefits of IoT Digitization


• Real-time insights: Live monitoring of operations.
• Predictive maintenance: Detect failures before they happen.
• Process optimization: Improves efficiency and reduces waste.
• Data-driven decisions: Combines IT analytics with OT operations.
• Business value: Enables new models like smart manufacturing, digital twins, and Industry 4.0.

4. Example
• In a smart factory:
o OT → Machines with embedded sensors measure vibration, temperature, output.
o IT → Cloud analytics platform stores and processes this data.
o IoT Digitization → Merges both → Factory managers get real-time dashboards +
predictive alerts.
Difference between IT VS OT
Aspect IT (Information OT (Operational
Technology) Technology)
Focus Data, information Physical devices,
flow, business machines, and
processes processes
Environment Offices, enterprises, Factories, plants,
data centers utilities, transport
Data Transactional, Real-time sensor
video, bulk and machine data
enterprise data
Processing Batch/transactional Real-time/near real-
time
Protocols Internet-based Industrial (Modbus,
(TCP/IP, HTTP, Profibus,
HTTPS) proprietary)
Updates Frequent patches Rare, only during
and upgrades scheduled
maintenance
Stability Dynamic, changes Stable, long
often operational lifetimes
Risk Data breaches, Process failures,
automation risks equipment
downtime, safety
Users IT staff, analysts, Engineers,
enterprise users operators,
technicians
Centric Information & data Process & control
centric centric

Trends & Research


1. Edge and Fog Computing
Edge and fog computing are trends where IoT data is processed closer to devices instead of sending
everything to the cloud. This reduces delay, saves bandwidth, and supports real-time decision-
making. Research is focused on running AI models on small edge devices.

2. 5G and Next-Generation Connectivity


5G technology gives very high speed, low latency, and the ability to connect millions of devices at
once. This is useful in smart cities, autonomous vehicles, and healthcare. Research is moving
towards 6G, LPWAN, and satellite IoT for global coverage.

3. AI and Machine Learning in IoT


Artificial Intelligence makes IoT smarter by enabling predictive analytics, anomaly detection, and
automation. It is used in healthcare, transport, and industries. Research includes TinyML for low-
power devices and federated learning for secure data training.

4. Blockchain and Security


Blockchain is being used in IoT to provide data integrity, authentication, and secure
communication. It creates trust in multi-device systems. Research focuses on lightweight
blockchain protocols suitable for resource-limited IoT devices.

5. Digital Twins
A digital twin is a virtual model of a physical device or system. It is used for monitoring,
simulation, and predictive maintenance. Research is on applying digital twins to Industry 4.0,
healthcare, and smart city management.

6. Sustainable / Green IoT


Green IoT is a trend to design devices that are energy-efficient, recyclable, and eco-friendly. This
reduces e-waste and power usage. Research focuses on solar-powered sensors, energy harvesting,
and biodegradable IoT materials.

7. Healthcare IoT (IoMT Advances)


Healthcare IoT is improving through wearables, telemedicine, and smart monitoring systems.
Research is on secure patient data sharing, AI-based diagnosis, and real-time emergency alerts.

8. Smart Cities Development


IoT is being applied in smart traffic, pollution control, energy management, and waste collection in
cities. Research focuses on building scalable and interoperable platforms for large urban
populations.

9. Industry 4.0 (Industrial IoT)


Industry 4.0 refers to the fourth industrial revolution where IoT combines with automation,
robotics, and AI to create smart factories. It enables predictive maintenance, supply chain
optimization, and real-time monitoring. Research is on designing secure and scalable industrial IoT
architectures.

10. Agriculture and Smart Farming


IoT in agriculture includes precision farming, livestock monitoring, and greenhouse automation.
Research is focused on using drones with IoT sensors, low-cost devices for rural areas, and AI-
based crop yield prediction.

IoT Applications
IoT Applications
1. Smart Homes
IoT is widely used in homes with devices like smart lights, thermostats, cameras, and voice
assistants. These allow users to remotely control appliances, save energy, and improve
safety.

2. Healthcare (IoMT)
In healthcare, IoT enables wearable devices, telemedicine, and remote patient monitoring.
Doctors can track patient health in real time, leading to faster diagnosis and better
treatment.

3. Agriculture (Smart Farming)


Farmers use IoT for precision farming, livestock monitoring, and greenhouse automation.
Sensors help measure soil moisture, temperature, and crop conditions, improving yield and
reducing resource use.

4. Transportation & Logistics


IoT is applied in fleet management, GPS tracking, smart parking, and predictive vehicle
maintenance. This makes transportation safer, reduces traffic, and increases delivery
efficiency.

5. Industrial IoT (IIoT)


Factories and industries use IoT for automation, robotics, and predictive maintenance of
machines. This reduces downtime, improves productivity, and lowers operating costs.

6. Smart Cities
IoT is used for traffic control, waste management, smart street lights, water supply, and
pollution monitoring. These applications improve resource efficiency and enhance quality
of life in cities.

7. Retail
Retailers use IoT for smart shelves, automated checkouts, and RFID-based inventory
management. This reduces losses, saves time, and improves customer shopping
experiences.

8. Energy & Utilities


IoT is applied in smart meters, energy monitoring, and renewable energy integration. It
helps track consumption, reduce wastage, and maintain stable power distribution.

9. Environmental Monitoring
IoT sensors are used for monitoring air quality, water levels, forest fires, and weather
conditions. These applications are vital for disaster management and environmental
protection.

Devices & Gateways


1. IoT Devices
IoT devices are the basic building blocks of the Internet of Things. They are physical objects that
are embedded with sensors, actuators, processors, and communication modules. Their main role is
to sense, collect, process, and sometimes act upon data from the physical environment.
Key Characteristics of IoT Devices
• Unique Identification – Each device has a unique ID (e.g., IP address, MAC address).
• Connectivity – Devices communicate via Wi-Fi, Bluetooth, Zigbee, LoRa, or cellular networks.
• Energy Efficient – Most devices are battery-powered and designed for low energy use.
• Scalable Deployment – Devices can be deployed in large numbers (e.g., thousands of sensors in
smart cities).
• Integration with Cloud/Apps – Devices send data to cloud platforms for storage, analysis, and
user access.
Types of IoT Devices
1. Sensors – Measure environmental conditions like temperature, humidity, pressure, motion,
sound, or light.
Example: DHT11 temperature sensor, GPS trackers.
2. Actuators – Convert electrical signals into physical actions such as rotation, locking, switching,
or movement.
Example: Electric motor in a smart fan, smart door lock.
3. Wearables – Devices worn by humans or animals for tracking and monitoring.
Example: Smartwatches, fitness bands, health monitoring patches.
4. Smart Appliances – Everyday household or industrial appliances enhanced with IoT
connectivity.
Example: Smart refrigerators, smart washing machines, connected ovens.
5. Embedded Controllers – Small microcontroller boards or SoCs that combine sensors,
computing, and communication.
Example: Arduino, Raspberry Pi, ESP32, STM32 boards.
6. Industrial Devices – Specialized devices used in factories and industries.
Example: Vibration sensors, robotic arms, connected PLCs.

2. IoT Gateways
IoT gateways act as intermediaries between IoT devices and higher-level platforms such as cloud
servers or enterprise systems. They are essential for ensuring smooth, secure, and reliable
communication.
Functions of IoT Gateways
• Protocol Translation – Convert different device protocols (e.g., Zigbee, BLE, Modbus) into
standard internet protocols (TCP/IP).
• Data Filtering & Aggregation – Collect raw data from multiple devices, remove unnecessary
data, and combine readings.
• Local Processing (Edge) – Perform analytics and preprocessing before sending data to the
cloud, reducing bandwidth and latency.
• Security Enforcement – Provide firewalls, encryption, and authentication to secure
communication.
• Connectivity Management – Ensure devices with short-range communication can reach wider
networks (e.g., Wi-Fi to 5G).
• System Reliability – Offer backup communication in case of network failures.
Types of IoT Gateways
1. Protocol Gateways – Handle conversion between non-IP device protocols and internet
protocols.
Example: Zigbee-to-IP converter.
2. Edge Gateways – Provide local intelligence by preprocessing and analyzing data at the edge of
the network.
Example: Cisco Edge Gateway.
3. Cloud Gateways – Directly connect devices to cloud platforms like AWS IoT Core, Microsoft
Azure IoT Hub, or Google Cloud IoT.
4. Industrial Gateways – Rugged gateways used in harsh environments with support for industrial
protocols like Modbus, OPC UA, Profibus.
Example: Siemens IoT2040 Industrial Gateway.
5. Consumer Gateways – Used in smart homes and offices, acting as hubs for appliances and
devices.
Example: Amazon Echo, Google Nest Hub.
Networking in IoT
Networking in IoT refers to how IoT devices connect and communicate with each other, with
gateways, and with cloud platforms. Since IoT devices are diverse (low power, short range, or
high-speed), multiple networking options are used.

1. Local Area Networking (LAN in IoT)


• Definition: A LAN connects IoT devices within a limited area such as a home, office, or factory
floor.
• Technologies Used:
o Wi-Fi (IEEE 802.11): Common in homes and offices, supports medium range and high
bandwidth.
o Bluetooth & BLE (Bluetooth Low Energy): Short-range, low-power networking, used
in wearables and smart home devices.
o Zigbee (IEEE 802.15.4): Low-power mesh network, common in smart lighting and
home automation.
o Z-Wave: Similar to Zigbee, often used in smart homes.
o RFID & NFC: Very short range, used for access control, tagging, and payments.
• Application: Smart homes, personal wearables, industrial sensors inside a plant.

2. Personal Area Networking (PAN in IoT)


• Definition: PAN covers a very small range around an individual (1–10 meters).
• Technologies Used: Bluetooth, NFC, Infrared.
• Application: Smartwatches, fitness trackers, wireless headphones.

3. Wide Area Networking (WAN in IoT)


• Definition: A WAN covers larger areas, connecting devices across cities, countries, or globally.
• Technologies Used:
o Cellular Networks (3G, 4G, 5G): Provide wide coverage and support mobility. 5G is
especially important for massive IoT.
o Satellite Networks: Useful for remote areas with no cellular coverage.
• Application: Connected cars, logistics tracking, smart agriculture in remote farms.

4. Low-Power Wide Area Networks (LPWAN in IoT)


• Definition: LPWAN is designed for IoT devices that need long-range, low-power, and low-
bandwidth communication.
• Technologies Used:
o LoRaWAN (Long Range Wide Area Network): Supports rural and urban
deployments, range up to several kilometers.
o NB-IoT (Narrowband IoT): Cellular-based, designed for deep coverage and very low
power consumption.
o Sigfox: Ultra-narrowband technology, suitable for low-data IoT use cases.
• Application: Smart metering, environmental monitoring, agriculture, utility networks.

5. Metropolitan Area Networking (MAN in IoT)


• Definition: MAN spans a city-wide area.
• Technologies Used: WiMAX, LTE/5G small cells, municipal Wi-Fi.
• Application: Smart city solutions such as traffic management, waste collection, and public Wi-
Fi.

6. Backend & Cloud Networking


• IoT devices connect via gateways to cloud platforms for data storage and analysis.
• Protocols Used: MQTT (publish/subscribe), CoAP (lightweight REST), HTTP/HTTPS, AMQP.
• Application: Remote dashboards, cloud analytics, and IoT applications.
M2M and IoT Analytics
1. What is IoT Analytics?
IoT Analytics is the process of analyzing the massive amounts of data generated by IoT devices
and sensors to extract valuable and actionable insights. It helps organizations make better decisions
by identifying patterns, detecting anomalies, and predicting future events.
• IoT devices generate heterogeneous and unstructured data (temperature, pressure, movement,
energy usage, etc.).
• Analytics tools convert this raw data into meaningful information for monitoring, optimization,
and decision-making.
• IoT Analytics is considered a subset of Big Data Analytics, as it specifically deals with data
from connected IoT devices.

2. Types of IoT Analytics


1. Descriptive Analytics – Explains what happened in the past using historical IoT data.
Example: Machine downtime reports.
2. Diagnostic Analytics – Explains why it happened by finding root causes using statistical
analysis. Example: Identifying why a sensor failed.
3. Predictive Analytics – Uses past and current data to predict future events with the help of
machine learning models. Example: Predictive maintenance in factories.
4. Prescriptive Analytics – Most advanced; not only predicts outcomes but also recommends what
action should be taken. Example: Suggesting optimal maintenance schedules or energy-saving
actions.

3. Benefits of IoT Analytics


Business Benefits
• Operational Efficiency: Detect inefficiencies and optimize processes (e.g., monitoring cold
storage to prevent spoilage).
• Cost Reduction: Reduce downtime, save energy, improve resource utilization.
• Enhanced Customer Experience: Personalized services based on user data (e.g., smart retail
recommendations).
• Improved Safety: Detect hazards early and prevent accidents (e.g., construction site monitoring).
Technical Benefits
• Real-time Data Analysis: Ability to process streaming data as it is generated.
• Scalability: Cloud-based analytics can handle large-scale IoT deployments.
• Accuracy: High precision through data collected from multiple devices.
• Security: Detects abnormal patterns and potential cyber threats.

4. Role of IoT Analytics in Industries


• Manufacturing (IIoT): Predictive maintenance, production optimization, supply chain
efficiency.
• Healthcare: Patient monitoring, telemedicine analytics, early diagnosis.
• Retail & eCommerce: Customer behavior tracking, personalized marketing.
• Transportation & Logistics: Fleet tracking, route optimization, real-time dashboards.
• Energy & Utilities: Smart meters, load prediction, and grid management.
• Agriculture: Soil analytics, crop prediction, greenhouse monitoring.

5. Industrial IoT (IIoT) Analytics


• A branch of IoT analytics focused on industrial processes.
• Uses data from manufacturing equipment, pipelines, weather stations, and logistics systems.
• Provides insights for maintenance scheduling, production optimization, and operational
safety.
• Example: Oil pipelines equipped with IoT sensors analyzed in real time to prevent leaks.
6. M2M Analytics vs IoT Analytics
M2M (Machine-to-
Aspect IoT Analytics
Machine) Analytics
Direct communication
Analyzing data from
between two or more
Definition IoT devices and
machines without human
sensors via the internet.
intervention.
Point-to-point or via
Internet-based, often
Communication mobile networks (GSM,
cloud-supported.
GPRS, CDMA).
Large-scale,
Data exchanged between
heterogeneous data
Data Source machines for a specific
from many devices &
task.
applications.
Narrow (focused on Wide (homes,
Scope device-to-device use industries, healthcare,
cases). smart cities, etc.).
Advanced analytics –
Analytics Basic monitoring, device descriptive, diagnostic,
Capability reports, fault detection. predictive,
prescriptive.
Predictive
Security alarms, remote
maintenance, real-time
Use Cases metering, facility
dashboards, anomaly
management.
detection.
Superset, includes
Relation Subset of IoT. M2M as a part of IoT
ecosystem.

7. Why IoT Analytics is Important?


• IoT Analytics converts raw device data into business intelligence.
• It helps in real-time decision-making, predicting failures, reducing costs, and improving
user experience.
• Without analytics, IoT data remains unused and does not deliver value.

Edge Computing:
1. Definition
Edge computing is a distributed computing model where data is processed closer to where it is
generated (at IoT devices or gateways), instead of sending all the data to a central cloud server.
This reduces delay, saves bandwidth, and allows faster responses.
In simple words → Edge Computing = bringing computation and storage near the “edge” of
the network (close to devices).

2. Need for Edge Computing in IoT


• IoT devices generate massive real-time data.
• Sending all data to the cloud causes high latency, bandwidth overload, and higher costs.
• Some applications (autonomous vehicles, healthcare monitoring, industrial robots) require
instant decision-making.
3. Features of Edge Computing
• Local Data Processing: Data analyzed at gateways, routers, or edge servers.
• Low Latency: Quick responses without waiting for the cloud.
• Bandwidth Efficiency: Only filtered/important data sent to cloud.
• Security: Sensitive data can stay local, reducing exposure to cyber risks.
• Scalability: Supports large IoT networks by offloading tasks from the cloud.

4. Benefits of Edge Computing in IoT


• Real-time Decision Making: Critical for healthcare monitoring, self-driving cars, and industrial
control.
• Reduced Bandwidth Use: Avoids constant heavy data transfer to the cloud.
• Improved Reliability: Works even with poor or unstable internet connections.
• Enhanced Security: Local data processing reduces chances of data leakage.
• Cost Efficiency: Saves on cloud storage and transmission costs.

5. Examples / Applications
• Healthcare: Wearable devices analyze patient vitals locally and alert doctors immediately in
emergencies.
• Autonomous Vehicles: Cars process sensor data on-board to make split-second driving
decisions.
• Industrial IoT (IIoT): Edge devices monitor machinery and detect faults in real time (predictive
maintenance).
• Smart Cities: Traffic cameras and sensors process video data locally for faster congestion
control.

6. Relation with Cloud & Fog Computing


• Cloud Computing: Centralized, powerful, but higher latency.
• Fog Computing: Intermediate layer between edge and cloud.
• Edge Computing: Closest to devices, handles immediate and local tasks.

Industrial Internet Reference Architecture (IIRA)


. Definition
The Industrial Internet Reference Architecture (IIRA) is a standard framework developed by
the Industrial Internet Consortium (IIC) to design and build Industrial IoT (IIoT) systems. It
provides guidelines, best practices, and a structured model to ensure IIoT solutions are
interoperable, secure, scalable, and efficient across industries like manufacturing, energy,
healthcare, and transportation.
In simple words: IIRA is like a blueprint that tells engineers how to build and organize
industrial IoT systems.

2. Purpose of IIRA
• To provide a common language for different stakeholders (engineers, IT staff, vendors,
managers).
• To ensure interoperability between devices, networks, and platforms.
• To address key industrial requirements like real-time performance, reliability, security, and
scalability.
• To guide industries in moving from traditional automation to smart, connected, and data-
driven systems.

3. Core Dimensions of IIRA


IIRA is built around three main dimensions:
1. Functional Domains (What functions the system performs)
o Control Domain: Handles real-time monitoring and control of industrial processes.
o Operations Domain: Supports production planning, asset management, and logistics.
o Information Domain: Manages data collection, storage, analytics, and visualization.
o Application Domain: Provides user applications and interfaces.
o Business Domain: Aligns IIoT with business goals like efficiency, cost savings, and
new revenue models.
2. System Characteristics (Qualities that must be achieved)
o Security: Protecting data, devices, and operations.
o Scalability: Ability to handle millions of devices and large data volumes.
o Resilience: Continuity of operations despite failures.
o Interoperability: Seamless communication between heterogeneous systems.
o Real-time performance: Meeting strict timing requirements in industrial settings.
3. Crosscutting Functions (Essential services used across all domains)
o Connectivity, data management, analytics, security services, and integration
frameworks.

4. Layers in IIRA Architecture


IIRA organizes IIoT into several architectural tiers (layers):
1. Edge Tier – Physical devices, sensors, actuators, and controllers located near machines.
2. Platform Tier – Middleware, data management, and integration platforms.
3. Enterprise Tier – Business applications, analytics, and decision-making systems.
This ensures a flow: Device → Edge → Platform → Enterprise → User Applications.

5. Benefits of IIRA
• Provides a standardized reference to design complex IIoT systems.
• Reduces integration challenges across multiple vendors.
• Ensures security, reliability, and scalability from the start.
• Enables industries to adopt Industry 4.0 and digital transformation smoothly.

6. Example Use Case


• Smart Factory:
o Edge Tier: Machines with sensors and PLCs.
o Platform Tier: Gateways and data processing (e.g., predictive maintenance).
o Enterprise Tier: Business apps optimize production schedules and supply chain.
o IIRA ensures all these work together securely and efficiently.
IoT Security
IoT Security Challenges
1. Authentication
Ensuring only legitimate devices and users can access the IoT network.
Weak or no authentication leads to unauthorized control of devices.
Example: Default passwords in IoT cameras exploited in Mirai botnet.

2. Access Control
Once devices are authenticated, access must be restricted based on role and
privilege. Without proper access control, attackers can misuse sensitive
functions.
Example: A smart home device controlling doors should not be accessible to
every user.

3. Privacy
IoT devices collect sensitive personal data (health, location, habits). If not
protected, it may be misused. Privacy challenges require data
anonymization, encryption, and GDPR compliance.

4. Confidentiality
IoT communication must ensure data confidentiality so that only authorized
parties can read it. Lack of encryption can lead to eavesdropping and data
leakage.

5. Policy Enforcement
IoT networks need rules and policies (who can access what, update
procedures, usage monitoring). Without policy enforcement, devices may
operate in insecure ways.

6. Trust
Devices in IoT must trust each other’s identity and behavior. Malicious or
counterfeit devices may join networks and leak/manipulate data. Building
trust requires certificates, digital signatures, and blockchain solutions.

7. Secure Middleware
Middleware connects devices, applications, and services. If not secured,
attackers can exploit vulnerabilities in data routing and integration
platforms. Secure middleware ensures safe data exchange and
interoperability.

8. Mobile Security
IoT often integrates with mobile apps for control and monitoring.
Weaknesses in mobile apps can expose the entire IoT system to attacks.
Securing mobile interfaces is crucial.

IoT Security Attacks and Risks


Since IoT devices are widely connected and often resource-constrained, they
are vulnerable to a variety of cyberattacks. These attacks can lead to serious
risks such as data loss, privacy violations, and even threats to human safety.

1. IoT Security Attacks


1. Denial of Service (DoS / DDoS) Attacks
Attackers flood IoT devices or networks with excessive traffic, making them
unavailable to legitimate users. Large-scale Distributed DoS (DDoS) attacks
using IoT botnets like Mirai have disrupted major internet services
worldwide.
2. Eavesdropping
Unencrypted IoT communications can be intercepted by attackers. This
allows them to steal sensitive information such as health data from
wearables or location data from GPS devices.
3. Spoofing
In spoofing attacks, a malicious entity impersonates a legitimate IoT device
or user. The attacker injects false data into the system or issues unauthorized
commands, leading to wrong decisions and unsafe operations.
4. Replay Attacks
Attackers capture valid data packets or commands and resend them later to
trick devices. For example, replaying a command to unlock a smart door can
give unauthorized entry.
5. Malware and Ransomware Attacks
Hackers inject malicious code into IoT devices, turning them into botnets or
locking their data. In ransomware cases, attackers demand money to restore
control of the device or decrypt the data.
6. Physical Attacks
Many IoT devices are deployed in open or insecure environments (like
outdoor cameras or sensors). Attackers can physically tamper with these
devices to steal information or damage the system.

2. Risks of IoT Security Breaches


1. Data Breaches and Privacy Violations
Compromised IoT devices can leak sensitive personal or industrial data. For
example, smart home assistants may expose user conversations, or health
monitors may leak patient information.
2. Operational Disruption
Attacks on industrial IoT systems (IIoT) may halt production lines, shut
down power grids, or disable smart city infrastructure. This can cause huge
financial losses.
3. Financial Losses
Security breaches can lead to downtime, ransom payments, loss of
resources, and reputational damage, all of which directly impact revenue.
4. Safety Risks
In critical systems like medical devices, connected cars, or industrial robots,
a security compromise can cause accidents, injuries, or even loss of life.
5. Loss of Trust
If IoT products are repeatedly hacked, customers lose confidence in the
technology. This damages the brand reputation of manufacturers and slows
down IoT adoption.

privacy and security in iot


IoT devices collect and transmit vast amounts of sensitive data, such as personal health
records, financial transactions, or industrial operations. Ensuring privacy and security in
IoT is therefore critical for protecting users, organizations, and infrastructure.

1. Privacy in IoT
Privacy focuses on protecting personal and sensitive information collected by IoT
devices from unauthorized access or misuse.
• Data Anonymization: Personally Identifiable Information (PII) is anonymized before
sharing or storing, reducing the risk of exposing individuals’ identities.
• Regulatory Compliance: Frameworks like GDPR (General Data Protection
Regulation) enforce rules on data collection, consent, and storage.
• User Control: Users should have the ability to manage their data, decide what
information is shared, and revoke access when needed.
Example: In healthcare IoT (IoMT), patient data from wearable sensors must remain
confidential and accessible only to authorized doctors.

2. Security in IoT
Security in IoT ensures that data, devices, and communication are protected from cyber
threats and misuse.
Key Security Requirements:
1. Authentication – Verifying the identity of devices and users to prevent unauthorized
access.
2. Authorization & Access Control – Granting specific permissions based on roles (e.g.,
an operator can monitor but not change system settings).
3. Confidentiality – Ensuring that data is only visible to authorized parties, usually through
encryption.
4. Integrity – Guaranteeing that data is not altered or tampered with during transmission.
5. Availability – Making sure IoT systems are always accessible to legitimate users, even
under attack.
6. Non-repudiation – Preventing denial of actions. Once a device or user performs a
transaction or sends data, they cannot deny it later. This is achieved using digital
signatures and secure logging.
Example: In smart payments, non-repudiation ensures a user cannot deny making a
purchase.

3. Secure Communication in IoT


• Use of end-to-end encryption protocols such as TLS/SSL, DTLS, or MQTT over TLS.
• Employing secure key management to protect cryptographic keys.
• Ensuring mutual authentication between devices and servers.

Chapter 3 – IoT Network Architecture


• IoT architecture: layered (perception, network, middleware, application).
• M2M IoT Standardized Architecture: ETSI M2M, oneM2M.
• IoT Data Management & Compute Stack: sensor data → edge processing → cloud.
• Fog Computing: distributed computing near IoT devices.
• Edge Computing: low-latency decision making.
• Hierarchy (Edge, Fog, Cloud):
o Edge → sensors/devices.
o Fog → local processing nodes.
o Cloud → large-scale storage & analytics.
• Session Layer Protocols:
o HTTP (web-based IoT),
o CoAP (lightweight REST for constrained devices),
o MQTT (pub-sub protocol for telemetry).
• MQTT Broker: manages communication between publishers (sensors) & subscribers (applications).

IoT Network Architecture


IoT Network Architecture defines how IoT devices, gateways, networks, and cloud
services are connected and organized to exchange data and deliver applications. It ensures
reliable communication, security, and scalability of IoT systems.

1. Basic Layers of IoT Network Architecture


1. Perception Layer (Sensing Layer)
o Also called the "Device Layer."
o Consists of sensors, actuators, RFID tags, cameras, and other devices that collect
information from the physical environment.
o Example: Temperature sensor, GPS tracker, smart lock.
2. Network Layer
o Responsible for transferring the data collected by devices to other systems.
o Uses different communication technologies:
▪ Short-range: Wi-Fi, Bluetooth, Zigbee.
▪ Long-range: 4G/5G, LoRaWAN, NB-IoT, Satellite.
o Ensures secure and reliable data transmission.
3. Edge Layer (Optional)
o Performs local data processing close to devices.
o Reduces latency and network load by filtering and analyzing data before sending
to the cloud.
o Example: Edge gateways in smart factories.
4. Middleware Layer (Data Processing Layer)
o Acts as a bridge between devices and applications.
o Provides services like data aggregation, storage, analytics, and device
management.
o Example: IoT middleware platforms such as AWS IoT Core or Azure IoT Hub.
5. Application Layer
o Provides IoT services and applications to users.
o Examples: Smart homes, e-health, connected cars, industrial automation, smart
cities.

2. Characteristics of IoT Network Architecture


• Scalability: Must support billions of devices.
• Heterogeneity: Devices use different protocols and technologies but must work together.
• Security & Privacy: Encryption, authentication, and access control are vital.
• Low Latency: Critical for applications like healthcare and autonomous vehicles.
• Reliability: System must work even if some devices fail.

3. Example Data Flow in IoT Network Architecture


1. Sensor (temperature sensor) collects data.
2. Data sent via Wi-Fi or Zigbee to a local gateway.
3. Gateway preprocesses and sends the data over the internet (4G/5G/LoRa) to the cloud.
4. Cloud stores and analyzes data.
5. Application displays results on a dashboard or mobile app for users.

M2M and IoT Standardized Architecture


IoT and M2M systems require standardized architectures so that devices from different
vendors can communicate and work together. A well-defined architecture ensures
interoperability, scalability, security, and efficient data exchange. International bodies
like ETSI (European Telecommunications Standards Institute), IEEE, IETF, ITU,
and ISO/IEC are actively working to define these frameworks.

1. What is M2M (Machine-to-Machine)?


• M2M refers to direct communication between machines or devices without human
intervention.
• Communication may happen via wired or wireless networks such as GSM, GPRS,
3G/4G, or proprietary protocols.
• M2M is mainly used in remote monitoring, smart metering, asset tracking, and
industrial automation.
• M2M is considered a subset of IoT, as IoT extends M2M with internet connectivity,
cloud services, and data analytics.

2. Need for Standardized Architecture


• Devices and networks are highly diverse (different hardware, protocols, and software).
• Standardization enables seamless communication, interoperability, and integration of
devices from multiple vendors.
• It ensures security, privacy, and data management across the IoT ecosystem.

3. ETSI M2M / oneM2M Standardized Architecture


ETSI initially developed the M2M architecture, which later evolved into the oneM2M
standard (a global initiative).
Key Layers of M2M/IoT Architecture:
1. Device Domain (Perception Layer)
o IoT devices, sensors, actuators, RFID tags.
o Collect data from the environment or perform actions.
2. Network Domain
o Provides communication between devices and application servers.
o Uses technologies like Wi-Fi, Zigbee, LTE/5G, LoRaWAN, NB-IoT, and
Ethernet.
o Handles data transport, security, and reliability.
3. Service / Middleware Domain
o Provides common service functions such as:
▪ Data storage & management
▪ Device discovery & registration
▪ Security (authentication, authorization, encryption)
▪ Event handling & communication protocols (MQTT, CoAP, HTTP)
o oneM2M defines a Common Services Entity (CSE) for these functions.
4. Application Domain
o End-user applications that use IoT data and services.
o Examples: Smart homes, e-healthcare, industrial automation, smart cities.

4. Features of Standardized Architecture


• Interoperability – Devices from different vendors can work together.
• Scalability – Supports billions of devices.
• Security & Privacy – Ensures safe communication and user data protection.
• Flexibility – Supports different communication technologies (short-range, long-range,
cellular).
• Service Reuse – Middleware services can be reused by multiple applications.

5. Example Use Case


• In smart metering, IoT devices (meters) collect data → network transports it to
middleware → middleware ensures secure storage and device management →
applications display consumption patterns to users and utilities.
In short: M2M and IoT Standardized Architecture, as defined by ETSI/oneM2M, is a
four-domain layered model (Device → Network → Middleware → Application) that
ensures interoperability, security, and scalability of IoT systems across industries.

IoT Data Management & Compute Stack


IoT generates massive volumes of real-time data from billions of connected devices. To
make this data useful, IoT systems follow a data management and compute stack – a
structured pipeline for collection, transmission, storage, processing, and analysis.

1. Data Management in IoT


a) Data Collection
• Data is collected by sensors and actuators at the perception/device layer.
• Devices generate structured (numerical, logs) and unstructured (images, video,
voice) data.
b) Data Transmission
• Gateways and network protocols (e.g., MQTT, CoAP, 6LoWPAN, ZigBee, LTE/5G)
transmit device data to the cloud or edge.
• Data velocity (real-time or near real-time) requires low-latency and reliable
communication.
c) Data Storage
• Data is stored in databases for further use.
o Local storage: Lightweight DBs for small-scale IoT (SQLite, TinyDB).
o Cloud storage: Scalable DBs (MongoDB, AWS DynamoDB, InfluxDB).
• Cloud enables long-term archiving, backups, and large-scale queries.
d) Data Processing & Analytics
• Raw IoT data is cleaned, aggregated, and normalized before analysis.
• Processing may happen at:
o Edge/Fog nodes (low latency, close to device, for real-time use).
o Cloud servers (for large-scale analytics, AI/ML).
e) Data Security & Privacy
• Encryption, access control, anonymization, GDPR compliance.
• Secure deletion during device decommissioning.

2. Compute Stack in IoT


The IoT compute stack defines where and how computation happens across different
layers:
1. Device/Edge Compute
o Devices and gateways perform lightweight processing.
o Examples: Local filtering, event detection, threshold alerts.
o Benefit: Reduces latency and saves bandwidth.
2. Fog/Edge Servers
o Intermediate layer between devices and cloud.
o Perform real-time analytics, protocol translation, and caching.
o Example: Smart traffic systems using roadside edge servers.
3. Cloud Compute
o Centralized computation with high processing power.
o Supports Big Data analytics, AI/ML, and predictive modeling.
o Examples: AWS IoT Core, Azure IoT Hub, Google Cloud IoT.
4. Analytics & Visualization Layer
o Converts processed data into dashboards, KPIs, and decision-support tools.
o Supports descriptive, diagnostic, predictive, and prescriptive analytics.

3. Benefits of IoT Data Management & Compute Stack


• Efficient handling of high-velocity data streams.
• Scalability to billions of devices.
• Improved decision-making using AI/ML-driven analytics.
• Balanced trade-off between real-time local insights and cloud-based deep analytics.

Fog Computing in IoT


1. Definition
Fog computing is a decentralized computing model that extends cloud services closer to
IoT devices. It acts as a bridge between edge devices and the cloud, providing storage,
networking, and processing at intermediate nodes (like gateways, routers, or local servers).
In simple words → Fog = “Cloud closer to the ground” — it sits between the cloud and
edge devices to reduce latency and improve efficiency.

Process of Fog Computing


The fog computing process typically follows these steps:
1. Data Generation (Perception Layer)
o IoT devices (sensors, actuators, RFID tags, cameras) generate raw data.
o Example: A temperature sensor records readings every second.
2. Local Fog Node Processing
o Data is sent to nearby fog nodes (e.g., gateway, router, local server).
o Fog nodes filter, preprocess, and analyze the data.
o Example: Only abnormal temperature values are flagged, while normal readings
are ignored.
3. Temporary Storage & Decision Making
o Fog nodes store and process critical information.
o Quick decisions can be made locally without cloud involvement.
o Example: A smart traffic signal changes immediately based on traffic density
detected by cameras.
4. Data Transmission to Cloud (Selective)
o Only relevant or aggregated data is forwarded to the cloud.
o Example: Daily traffic summary sent to cloud, while real-time decisions are
made locally.
5. Cloud Analysis & Long-Term Storage
o Cloud handles big data analytics, AI/ML training, and archiving.
o Provides historical trends, large-scale predictions, and insights.

2. Need for Fog Computing


• IoT generates huge amounts of real-time data.
• Sending all data to the cloud causes latency, bandwidth overload, and high costs.
• Edge devices are often too limited to handle complex processing.
• Fog provides a middle layer that balances local responsiveness and cloud intelligence.

3. Features of Fog Computing


• Intermediate Layer: Operates between edge and cloud.
• Distributed Processing: Splits workloads between local fog nodes and cloud servers.
• Low Latency: Supports real-time and near-real-time applications.
• Context Awareness: Can analyze data based on location and environment.
• Scalability: Supports large IoT networks by reducing cloud dependency.

4. Benefits of Fog Computing


• Reduced Latency: Data processed closer to devices for faster response.
• Bandwidth Optimization: Only essential data is sent to the cloud.
• Improved Reliability: Fog nodes can operate even with weak internet connectivity.
• Enhanced Security: Local processing reduces exposure of sensitive data.
• Support for Mobility: Ideal for moving devices like connected cars or drones.

5. Examples / Applications
• Smart Traffic Systems: Roadside fog nodes process data from traffic cameras and
sensors to manage signals in real time.
• Industrial IoT: Fog nodes monitor machines and provide predictive maintenance
insights before data goes to the cloud.
• Healthcare: Fog systems process patient data from wearables locally for faster alerts.
• Smart Cities: Streetlights, pollution sensors, and surveillance cameras use fog nodes for
local decisions.

6. Relation to Edge and Cloud


• Edge Computing: Processing happens directly on devices or gateways.
• Fog Computing: Provides a layer between edge and cloud, performing richer analytics
and coordination.
• Cloud Computing: Handles large-scale, centralized analytics and long-term storage.

Edge Computing in IoT


1. Definition
Edge computing is a computing model where data processing happens directly on IoT
devices or very close to them (edge of the network) instead of relying only on
centralized cloud servers. It minimizes delay, reduces bandwidth use, and enables real-time
decision-making.
In simple words → Edge = computation at or near the data source.
2. Process of Edge Computing
1. Data Generation (Devices/Sensors)
o IoT devices such as sensors, actuators, and cameras generate continuous data.
o Example: A surveillance camera captures live video.
2. Local Processing at the Edge
o Data is processed directly on the device itself or at a nearby edge gateway.
o Example: The camera identifies motion locally instead of streaming all video to
the cloud.
3. Real-Time Decision Making
o The edge device makes immediate decisions without depending on cloud
servers.
o Example: An industrial sensor shuts down a machine instantly when overheating
is detected.
4. Filtered Data Transmission
o Only important, aggregated, or abnormal data is sent to the cloud for further
analysis.
o Example: Instead of sending every second of video, only suspicious activity clips
are uploaded.
5. Cloud Integration (Optional)
o The cloud handles large-scale analytics, storage, and AI model training.
o Edge devices then use these AI models for local decision-making.

3. Features of Edge Computing


• Local Data Processing close to devices.
• Low Latency → near-instant responses.
• Bandwidth Efficiency → reduced data transfer to cloud.
• Autonomy → devices can work even without internet.
• Security → sensitive data stays local.

4. Benefits
• Enables real-time decision-making.
• Reduces network congestion and cloud dependency.
• Improves reliability for critical systems.
• Enhances data privacy by limiting external exposure.
• Supports applications requiring ultra-fast responses (e.g., autonomous cars).

5. Examples / Applications
• Healthcare: Wearables detect abnormal heart rate and alert doctors instantly.
• Autonomous Vehicles: Cars process sensor data onboard for safe driving.
• Industrial IoT: Machines detect and respond to faults locally for predictive
maintenance.
• Smart Homes: Voice assistants process simple commands locally for faster response.
• Retail: Edge-enabled cameras analyze customer movement in stores for real-time
insights.

6. Relation with Fog and Cloud


• Edge Computing → Processing happens on devices or local gateways.
• Fog Computing → Acts as an intermediate layer between edge and cloud for richer
analytics.
• Cloud Computing → Centralized storage, large-scale AI/ML, and long-term analytics.
Hierarchy of Edge, Fog, and Cloud in IoT
IoT systems generate huge amounts of data from billions of connected devices. To handle
this data efficiently, computation is organized in a hierarchical structure: Edge → Fog
→ Cloud. Each level has a specific role in processing, storing, and analyzing IoT data.

1. Edge Layer
• Location: Closest to devices (sensors, actuators, controllers).
• Function: Performs immediate, lightweight data processing at or near the source.
• Role:
o Filters raw data.
o Executes real-time decisions.
o Reduces the volume of data sent upstream.
• Example: A smart thermostat processes room temperature locally and adjusts the AC
without contacting the cloud.

2. Fog Layer
• Location: Sits between the edge and the cloud, often at gateways, routers, or local
servers.
• Function: Acts as an intermediate computing and storage layer that handles larger
processing tasks than edge devices but closer than the cloud.
• Role:
o Aggregates data from multiple edge devices.
o Performs near-real-time analytics.
o Ensures security, policy enforcement, and protocol translation.
• Example: In a smart city, traffic cameras send data to roadside fog servers that adjust
signals instantly.

3. Cloud Layer
• Location: Centralized data centers accessed via the internet.
• Function: Handles large-scale processing, long-term storage, and advanced analytics
(AI/ML).
• Role:
o Performs complex computations.
o Provides global data access and dashboards.
o Archives data for future analysis and regulatory needs.
• Example: In industrial IoT, machine performance logs are sent to the cloud for
predictive maintenance modeling.

4. Hierarchical Process Flow


1. Data Generation (IoT Devices) → sensors/actuators collect raw data.
2. Edge Layer → first processing, filtering, and immediate actions.
3. Fog Layer → aggregates, preprocesses, and executes near-real-time decisions.
4. Cloud Layer → performs deep analytics, AI/ML, storage, and visualization.
5. Application Layer → results are delivered to users through dashboards or apps.

5. Key Differences
Aspect Edge Fog Cloud
Between
Remote,
Closest to edge &
Location centralized
devices cloud
data centers
(gateways)
Near-real- Heavy,
Lightweight,
Processing time, large-scale
real-time
moderate analytics
Latency Lowest Low Higher
Storage Minimal Moderate Massive
Local
AWS IoT,
Smart traffic
Azure IoT,
Example thermostat, servers,
Google
wearables factory
Cloud
nodes

Session Layer Protocols in IoT


The session layer protocols in IoT ensure communication, data exchange, and
management of sessions between devices and applications. Some of the most widely used
protocols are HTTP, CoAP, and MQTT.

1. HTTP (Hypertext Transfer Protocol)


• Definition: A request–response protocol used for communication between clients and
servers over the web.
• How it Works: IoT devices send HTTP requests (GET, POST, PUT, DELETE) to a
server, which responds with data.
• Features:
o Simple, widely adopted, human-readable.
o Based on TCP (connection-oriented).
o Uses REST architecture (stateless).
• Advantages:
o Easy to implement, universally supported.
o Works with existing web infrastructure.
• Limitations:
o Heavy protocol, not optimized for low-power IoT.
o High bandwidth and energy consumption.
• Use Cases: Smart appliances sending updates to cloud servers, web dashboards for IoT
monitoring.

2. CoAP (Constrained Application Protocol)


• Definition: A lightweight protocol designed for IoT devices with limited resources
(memory, battery, and processing power).
• How it Works:
o Similar to HTTP but runs over UDP instead of TCP.
o Follows REST architecture with methods like GET, POST, PUT, DELETE.
• Features:
o Low overhead, supports multicast.
o Designed for constrained networks (LoWPAN, Zigbee).
o Built-in support for asynchronous communication.
• Advantages:
o Lightweight and fast.
o Ideal for small sensors and embedded devices.
• Limitations:
o Less reliable than TCP (though retransmission is supported).
o Limited support in mainstream web systems.
• Use Cases: Smart lighting, home automation, low-power sensors.

3. MQTT (Message Queuing Telemetry Transport)


• Definition: A lightweight publish–subscribe messaging protocol optimized for low-
bandwidth and unreliable networks.
• How it Works:
o Devices (clients) publish messages to a broker.
o Other devices subscribe to topics from the broker.
o Broker manages message distribution.
• Features:
o Runs on top of TCP.
o Low power, minimal bandwidth usage.
o Supports Quality of Service (QoS) levels: At most once, At least once, Exactly
once.
• Advantages:
o Efficient for real-time communication.
o Works well in unreliable or remote networks.
• Limitations:
o Requires a broker (adds infrastructure cost).
o Not suitable for very large payloads like video.
• Use Cases: Remote monitoring, predictive maintenance, real-time chat, industrial IoT.

Comparison Table
Feature HTTP CoAP MQTT
Request– Request– Publish–
Response Response Subscribe
Model
(Client– (REST, over (Broker
Server) UDP) based)
Transport TCP UDP TCP
Lightweigh
No Yes Yes
t
Feature HTTP CoAP MQTT
Overhead High Low Very Low
Moderate
High
High (UDP +
Reliability (QoS
(TCP) retransmission
options)
)
Web Constrained Real-time
Best For dashboards devices, low messaging
, APIs power , IIoT
Constrained and Non-Constrained Nodes in IoT
IoT devices (nodes) differ in terms of their resources (processing power, memory, energy,
and communication capabilities). Based on these, they are classified into constrained
nodes and non-constrained nodes.

1. Constrained Nodes
• Definition: Devices with limited processing power, memory, energy, and bandwidth.
• Characteristics:
o Low CPU capacity and RAM.
o Often battery-powered, need energy-efficient communication.
o Use lightweight protocols (CoAP, MQTT-SN, 6LoWPAN).
o Limited security and storage capacity.
• Examples:
o Simple temperature sensors.
o Wearable fitness bands.
o Battery-powered smart locks.
• Advantages: Cheap, energy-efficient, easy to deploy in large numbers.
• Limitations: Cannot perform heavy computation, rely on gateways/fog/cloud for
processing.

2. Non-Constrained Nodes
• Definition: Devices with sufficient resources (high processing power, memory, and
energy supply) to perform complex tasks.
• Characteristics:
o High-performance processors and larger memory.
o Can run full operating systems and support strong security mechanisms.
o Usually mains-powered, so energy is not a big issue.
o Can handle advanced communication protocols (HTTP, full MQTT, TLS
encryption).
• Examples:
o IoT Gateways and Edge Servers.
o Smart home hubs (Google Nest Hub, Amazon Echo).
o Industrial PCs and Raspberry Pi clusters.
• Advantages: Can perform analytics, storage, and complex decision-making locally.
• Limitations: More expensive, less energy-efficient for large-scale deployment.

3. Key Difference Between Constrained and Non-Constrained Nodes


Non-Constrained
Aspect Constrained Nodes
Nodes
Low CPU, memory, High CPU, memory,
Resources
battery stable power
Lightweight (CoAP, Heavy (HTTP, MQTT,
Protocols
6LoWPAN, MQTT-SN) TLS/SSL)
Power Battery-operated, energy- Mains-powered or
Supply efficient rechargeable
Strong, advanced
Security Basic, limited encryption
encryption
Gateways,
Sensors, wearables, RFID
Examples smartphones, industrial
tags
PCs

MQTT Broker
1. Definition
The MQTT Broker is the central server in the MQTT (Message Queuing Telemetry
Transport) protocol. It is responsible for receiving messages from publishers, filtering
them, and delivering them to subscribers. Without a broker, the MQTT publish–
subscribe communication model cannot function.
In simple words → The broker is the “post office” of MQTT, making sure every
message published on a topic reaches all subscribers of that topic.

2. Role of MQTT Broker


• Acts as a middleman between IoT devices (publishers and subscribers).
• Ensures reliable message delivery according to QoS (Quality of Service) levels.
• Manages connections, sessions, and topic-based routing.
• Provides security functions like authentication, authorization, and encryption.

3. How It Works (Process)


1. Publisher sends a message to the broker on a specific topic (e.g., sensor/temp).
2. The MQTT Broker receives the message.
3. The broker checks which devices are subscribed to that topic.
4. The broker forwards the message to all relevant subscribers.
5. QoS ensures delivery reliability (e.g., at most once, at least once, exactly once).

4. Features of MQTT Broker


• Topic-Based Messaging: Messages are categorized into topics for efficient routing.
• Lightweight & Low Bandwidth: Suitable for constrained IoT devices.
• Scalability: Can manage thousands to millions of IoT connections.
• QoS Levels: Supports 3 levels of delivery assurance.
• Security: Uses SSL/TLS encryption, username–password authentication, and access
control.
• Session Management: Maintains connection states, useful for devices that frequently
disconnect.

5. Examples of MQTT Brokers


• Mosquitto (Eclipse) – Open-source, lightweight, widely used.
• EMQX – Highly scalable, supports millions of connections.
• HiveMQ – Enterprise-grade broker with strong security.
• AWS IoT Core / Azure IoT Hub / Google Cloud IoT – Cloud-based managed MQTT
brokers.

6. Applications of MQTT Broker


• Smart Homes: Connecting devices like smart bulbs, thermostats, and locks.
• Healthcare: Real-time patient monitoring using wearable sensors.
• Industrial IoT: Machine data monitoring and predictive maintenance.
• Transportation: Vehicle tracking and fleet management.

You might also like