UNIT 5: Internet of Things - Comprehensive Study Notes
Based on RGPV past paper analysis (May 2022 - Jun 2025). Focus on definitions, comparisons, protocols, and architectures.
I. IoT Fundamentals & Architectural Framework
IoT Ecosystem & Conceptual Framework
-
Definition: IoT is a network of physical objects ("things") embedded with sensors, software, and connectivity to exchange data with other devices/systems over the internet.
-
Core Characteristics (8 key traits):
-
Connectivity: Seamless communication.
-
Things: Physical/virtual objects with unique IDs.
-
Data: Raw data from sensors becomes actionable information.
-
Communication: Various protocols/wireless standards.
-
Intelligence: Data processing & decision-making (often via analytics/cloud).
-
Actionability: Results trigger physical/digital actions.
-
Services: IoT as a service platform (e.g., monitoring, automation).
-
Semantics: Meaningful interpretation of data (context-awareness).
-
IoT Ecosystem Components:
- Things/Devices: Sensors, actuators, embedded systems.
- Communication: Networks & protocols (LAN, WAN, LPWAN).
- Data Processing & Storage: Edge computing, cloud platforms.
- Applications & Analytics: User interfaces, business logic, data analysis.
- Management & Security: Device management, security models, privacy policies.
IoT Reference Architecture & Information Model
A common 3-layer or 5-layer model:
-
Perception Layer (Device Layer): Sensors/actuators for data collection/action.
-
Network Layer (Gateway/Transport Layer): Data transport via networks (Wi-Fi, ZigBee, cellular). IoT Gateways aggregate data, protocol translation, security.
-
Application Layer: User-facing apps, analytics, specific IoT services.
-
Middleware/Service Layer (in 5-layer): Service discovery, data management, SOA.
-
Business Layer (in 5-layer): Overall management, business models.
Information Model: Defines how data is structured, represented, and exchanged (e.g., using standards like oneM2M, LwM2M). It ensures interoperability.
IoT Service-Oriented Architecture (SOA) & Challenges
-
SOA in IoT: Treats device functions as reusable "services" (e.g., "read temperature", "turn on light"). Enables loose coupling, interoperability, and composition of complex services from simple ones.
-
Challenges:
-
Resource Constraints: Limited power, memory, CPU on devices.
-
Heterogeneity: Diverse devices, protocols, data formats.
-
Scalability: Millions of devices.
-
Real-time Requirements: Latency-sensitive applications.
-
Security & Privacy: Increased attack surface.
-
Design Perspectives
-
Logical vs. Physical Design:
-
Logical Design: What the system does. Defines functions, services, data flows, and interactions (abstract). e.g., "System shall monitor temperature."
-
Physical Design: How it's built. Specifies hardware (sensors, microcontrollers), communication modules, physical layout, and power sources. e.g., "Use DHT22 sensor with ESP32 via Wi-Fi."
-
-
IoT Level-Based Systems:
| Feature | Level 3 System | Level 4 System | | :--- | :--- | :--- | | Connectivity | Single device → single app (point-to-point). | Device → Gateway → Cloud → Multiple Apps (networked). | | Example | Smart bulb controlled by one phone app. | Smart home system (bulb, thermostat, camera) all managed via cloud platform. | | Complexity | Low. | High. | | Scalability | Poor. | Excellent. | | Data Flow | Direct. | Via intermediate layers (gateway, cloud). |
Evolution & Context: M2M vs IoT vs WoT
| Aspect | M2M (Machine-to-Machine) | IoT (Internet of Things) | WoT (Web of Things) |
|---|---|---|---|
| Core | Point-to-point machine communication (often proprietary/siloed). | Internet-connected "things" with intelligence & services. | IoT devices made accessible via Web standards (HTTP, REST, JSON). |
| Communication | Often isolated networks, vertical solutions. | IP-based, horizontal integration. | Uses Web protocols (HTTP, RESTful APIs) to wrap device functions. |
| Data | Limited, for specific automation. | Massive, for analytics & insights. | Exposed as Web resources (URIs). |
| Scalability | Low. | Very High. | High (leverages Web infrastructure). |
| Analogy | Dedicated telephone line between two machines. | Global internet of smart devices. | IoT devices appear as "websites" you can query. |
Reasons for shift from M2M to IoT: Need for scalability, integration with enterprise systems, big data analytics, cloud computing, and standardized IP-based communication.
II. Device Layer: Sensors, Actuators & Hardware
Sensors
-
Sensor Node: A complete unit containing sensor, microcontroller, communication module, and power source.
-
Key Features: Sensitivity, accuracy, precision, range, resolution, response time, stability, power consumption.
-
Types:
-
By Signal: Scalar (measures magnitude, e.g., temperature sensor), Vector (measures magnitude & direction, e.g., accelerometer, magnetometer).
-
By Output: Analog (continuous voltage/current, needs ADC), Digital (discrete binary output, e.g., I2C/SPI sensors).
-
-
Common IoT Sensors: Temperature/Humidity (DHT11/22), PIR (motion), Gas (MQ series), Pressure (BMP280), Proximity (Ultrasonic), Image (Camera), GPS.
Sensor Characteristics & Errors (Frequently Tested)
| Term | Definition | Example |
|---|---|---|
| Bias | Systematic error; constant offset from true value. | Thermometer always reads 0.5°C high. |
| Drift | Gradual change in sensor output over time for a constant input. | Aging of a strain gauge. |
| Hysteresis Error | Difference in output when input is approached from above vs. below. | Pressure sensor reads differently when pressure is increasing vs. decreasing to same value. |
| Quantization Error | Error due to finite resolution of digital conversion (ADC). | ADC with 10-bit resolution for 0-5V has step size = 5V/1024 ≈ 4.88mV. Error is ±½ step. |
Actuators
-
Role: Convert electrical/control signals into physical action (opposite of sensor).
-
Four Common Selection Characteristics:
-
Force/Torque Output: Required mechanical strength.
-
Stroke/Displacement: Distance/movement needed.
-
Speed/Response Time: How fast it must act.
-
Power Source & Efficiency: Voltage, current, energy consumption.
-
-
Types:
-
Mechanical: Electric motors (DC, stepper), solenoids, relays.
-
Soft: Made of flexible materials (silicone) for gentle handling.
-
Shape Memory Polymer (SMP): Change shape with temperature/light stimulus.
-
Hardware Platforms & Interfacing
-
Microcontrollers (MCU): e.g., Arduino (ATmega328), ESP32/8266. Low-cost, low-power, good for dedicated sensor/control tasks. Use GPIO, SPI, I2C, UART for interfacing.
-
Single-Board Computers (SBC): e.g., Raspberry Pi (Broadcom SoC). Runs full OS (Linux), more powerful, for complex processing/gateway roles.
- Raspberry Pi vs Desktop: Pi is ARM-based, lower power, no internal storage (uses SD), less RAM/CPU, designed for embedded/IoT, not general computing.
-
Interfacing:
-
GPIO (General Purpose Input/Output): Digital pins for simple on/off or communication.
-
I2C (Inter-Integrated Circuit): 2-wire (SDA, SCL) serial bus for multiple low-speed devices (sensors, EEPROM).
-
SPI (Serial Peripheral Interface): 4-wire (MOSI, MISO, SCLK, CS) faster synchronous serial for high-speed devices (displays, SD cards).
-
-
Pneumatic: Use of compressed air/gas to generate motion/force (e.g., pneumatic actuators/cylinders). An example of an actuator type.
III. Communication & Networking Protocols
Wireless Communication Technologies
| Technology | Standard | Key Features | IoT Role |
|---|---|---|---|
| IEEE 802.15.4 | Low-Rate WPAN | Defines PHY & MAC layers for low-power, low-data-rate, star/peer-to-peer networks. | Foundation for ZigBee, 6LoWPAN. |
| ZigBee | Based on 802.15.4 | Mesh networking, low power, secure, supports many nodes. Architecture: Device (end device, router, coordinator). Types: ZigBee PRO (general), ZigBee IP (IPv6), ZigBee RF4CE (remote control). | Home automation, industrial monitoring. |
| Bluetooth | IEEE 802.15.1 | Short-range (10m), point-to-point/piconet. BLE (Bluetooth Low Energy): Ultra-low power, beaconing, sensor data. | Wearables, personal area networks. |
| Wireless Sensor Networks (WSN) | Various (often 802.15.4) | Network of spatially distributed autonomous sensors to monitor physical conditions. Topologies: Star, mesh, tree. | Environmental monitoring, smart agriculture. Relation to IoT: WSN is often the perception layer of an IoT system. |
Network Types by Topology/Connection:
- Physical Topology: Star (all to hub/AP), Mesh (multi-hop), Tree (hierarchical), Bus (single backbone).
- Connection Type: PAN (Personal), LAN (Local), WAN (Wide), LPWAN (Low-Power WAN, e.g., LoRaWAN, NB-IoT).
IP & Adaptation Layer: 6LoWPAN
-
Role: Enables IPv6 packets to be carried efficiently over IEEE 802.15.4 networks (which have small MTU ~127 bytes).
-
How: Header Compression (compresses 40-byte IPv6 header to ~1-2 bytes), Fragmentation & Reassembly (splits IPv6 packet to fit 802.15.4 frame).
-
Difference from IPv4/IPv6: It's not a new IP version. It's an adaptation layer between IPv6 and 802.15.4 MAC. IPv4 has no such adaptation for constrained networks; native IPv6 is too heavy for 802.15.4.
Application Layer Protocols (Very High Frequency)
| Protocol | Full Form | Model | Key Features | Message Types / Components |
|---|---|---|---|---|
| MQTT | Message Queuing Telemetry Transport | Publish/Subscribe (broker-centric) | - Lightweight, TCP-based.<br>- QoS Levels: 0 (At most once), 1 (At least once), 2 (Exactly once).<br>- Topics (hierarchical strings).<br>- Does NOT use WebSockets by default (uses TCP), but can be tunneled over WebSockets for web apps. | Components: Client, Broker, Topic, Message (Topic + Payload). |
| CoAP | Constrained Application Protocol | Request/Response (like HTTP) | - For constrained nodes/networks (UDP-based).<br>- RESTful (GET, POST, PUT, DELETE).<br>- Confirmable (CON) & Non-Confirmable (NON) messages.<br>- Built-in discovery, observe (for notifications).<br>- Low overhead, binary header. | Message Types: CON, NON, ACK, RST. Request/Response Model: Client sends CON/NON request; server responds with ACK+RSP or separate CON/NON. |
| AMQP | Advanced Message Queuing Protocol | Publish/Subscribe & Queue-based | - Wire-level protocol for business messaging.<br>- Components: Sender, Receiver, Broker (with Exchanges & Queues).<br>- Message Attributes: Routing key, delivery mode, priority, timestamp.<br>- Payload: Application data (any format).<br>- Frame Types: Protocol header, method, content, heartbeat, transport. | Frame Types: 1. Protocol Header, 2. Method (commands), 3. Content (body+properties), 4. Heartbeat, 5. Transport (tunneling). |
| XMPP | Extensible Messaging and Presence Protocol | Publish/Subscribe (based on XML) | - XML-based, decentralized (client-server).<br>- Presence & Roster management built-in.<br>- Extensible via XEPs (Extensions).<br>- Role in IoT: Enables real-time, secure, federated communication between devices/apps; good for social IoT, collaborative control. | Core: <message>, <presence>, <iq> stanzas. |
| SMQTT | Secure MQTT | Publish/Subscribe | - MQTT with security enhancements.<br>- Uses cryptography (often AES) on payload before publishing.<br>- Broker holds decryption keys.<br>- Secure Transfer: Publisher encrypts payload with symmetric key; broker decrypts, routes; subscriber decrypts. | Similar to MQTT but with encrypted payload field. |
Differentiation: AMQP vs MQTT
- AMQP: More complex, enterprise-oriented, guaranteed delivery, rich routing (exchanges), standard for financial/business systems.
- MQTT: Extremely lightweight, simple, minimal overhead, ideal for constrained devices, simple pub/sub.
Other Enablers & Technologies
-
RFID (Radio Frequency Identification):
-
Principle: Uses radio waves to automatically identify and track tags attached to objects.
-
Components: Tag (passive/active, with ID), Reader, Antenna, Backend System.
-
Link to IoT: Provides unique digital identity to physical objects, enabling them to be "things" in IoT. Used in inventory, access control, supply chain.
-
-
NFC (Near Field Communication):
-
Principle: Short-range (≤10 cm) wireless tech. based on RFID standards. Enables two-way communication.
-
Use in IoT: Device pairing (e.g., phone to IoT device), contactless payments, data exchange (touch to configure), access control.
-
-
IoT Enablers: Broad category including Cloud Computing, Big Data Analytics, AI/ML, Mobile Computing, IPv6, M2M Platforms, Semantic Technologies that make IoT systems viable and scalable.
IV. IoT Platforms, Cloud & Data
Cloud Computing for IoT
-
Usefulness:
-
Storage: Massive, scalable storage for time-series sensor data.
-
Processing: On-demand compute for analytics, ML, batch/stream processing.
-
Device Management: Provisioning, monitoring, updating fleets of devices.
-
Scalability & Cost: Pay-as-you-go, no upfront infrastructure cost.
-
-
Cloud Service Models:
-
IaaS (Infrastructure as a Service): VMs, storage, networks (e.g., AWS EC2). User manages OS/apps.
-
PaaS (Platform as a Service): Runtime environment, DBs, dev tools (e.g., AWS IoT Core, Azure IoT Hub). User focuses on app/data.
-
SaaS (Software as a Service): Ready-to-use applications (e.g., Salesforce). User just uses software.
-
-
Cloud Storage Models:
-
Object Storage (e.g., AWS S3): Unstructured data (images, logs).
-
Block Storage (e.g., EBS): Raw storage volumes for VMs.
-
File Storage (e.g., EFS): Shared file system.
-
-
Cloud Communication APIs: RESTful APIs provided by cloud IoT platforms (AWS IoT, Azure IoT) for:
-
Device registration & authentication.
-
Sending telemetry data (publish).
-
Receiving commands (subscribe).
-
Device shadow/state management.
-
IoT Platforms
-
What: Integrated software/hardware suites that provide tools for device management, data ingestion, analytics, and application development.
-
How they facilitate:
-
Device Connectivity & Management: SDKs, protocols (MQTT/CoAP), lifecycle management.
-
Data Ingestion & Storage: Scalable pipelines.
-
Analytics & Visualization: Built-in dashboards, ML tools.
-
Application Enablement: APIs, rules engines, integration with other services.
-
Examples: AWS IoT, Microsoft Azure IoT, Google Cloud IoT Core, IBM Watson IoT, open-source (ThingsBoard, Kaa).
-
Data Analytics in IoT
-
Role: Transform raw sensor data into actionable insights, predictions, and automated decisions.
-
Process: Data Ingestion → Storage → Processing (batch/stream) → Analysis (descriptive, predictive, prescriptive) → Visualization/Actuation.
-
How differs in M2M vs IoT:
-
M2M: Analytics is often local, simple, and reactive (e.g., threshold alert). Data volume low, siloed.
-
IoT: Analytics is centralized, complex, predictive/prescriptive. Uses big data tools, ML/AI on massive, diverse, real-time streams for optimization, forecasting, anomaly detection.
-
-
Extracting Insights: Through statistical analysis, machine learning (regression, classification, clustering), stream processing (Apache Flink, Spark Streaming), and visualization (dashboards, alerts).
V. Security & Privacy in IoT
Need for Security & Models
-
Why Required?
-
Physical Vulnerability: Devices in public/unattended locations.
-
Resource Constraints: Hard to implement strong crypto.
-
Large Attack Surface: Millions of devices.
-
Critical Impact: Attacks on medical devices, infrastructure.
-
Privacy: Sensitive user data (location, habits) collection.
-
-
Security Models (Frameworks/Approaches):
-
CIA Triad Adaptation: Confidentiality (encryption), Integrity (hashing, signatures), Availability (DDoS mitigation).
-
Zero Trust Model: "Never trust, always verify." Continuous authentication/authorization.
-
End-to-End Security: Security at device, network, cloud, and application layers.
-
Identity & Access Management (IAM): Device identity (certificates, tokens), least privilege access.
-
Security by Design: Integrating security from initial design phase.
-
Vulnerabilities & Attacks
-
Kinds of Vulnerabilities:
-
Hardware: Physical tampering, side-channel attacks.
-
Software/Firmware: Unpatched bugs, weak/default passwords, insecure APIs.
-
Network: Unencrypted traffic, weak protocols, open ports.
-
Privacy: Excessive data collection, lack of anonymization.
-
-
Attacks Exploiting Application/Service Layer:
-
Injection Attacks: SQL, command injection via device APIs.
-
Broken Authentication: Weak credentials, session hijacking.
-
Sensitive Data Exposure: Lack of encryption in transit/at rest.
-
XML External Entities (XXE): If using XML (like XMPP).
-
Denial-of-Service (DoS/DDoS): Overwhelming device or cloud service.
-
Man-in-the-Middle (MitM): Intercepting/altering communication between device and cloud/app.
-
-
Various Attacks on IoT Systems:
-
Device Hijacking: Taking control of device (botnet for DDoS).
-
Data Theft: Stealing collected data.
-
Privacy Breach: Tracking user via device data.
-
Physical Damage: Malicious commands to actuators (e.g., industrial machinery).
-
Replay Attacks: Re-sending valid captured messages.
-
VI. Applications & Case Studies
Smart Home / Home Automation
-
Applications: Lighting control, HVAC, security (cameras, locks), entertainment, appliance monitoring, energy management.
-
Design with Raspberry Pi & Hardware (Conceptual Sketch Description):
-
Central Hub/Gateway: Raspberry Pi 4 running Home Assistant/OpenHAB.
-
Sensors: DHT22 (temp/humidity), PIR (motion), MQ-2 (gas), door/window magnetic sensors.
-
Actuators: Relay modules (for lights/fans), smart plugs, servo motors (for locks).
-
Communication:
-
Short-range: ZigBee/Z-Wave modules (USB dongle on Pi) for low-power sensors.
-
Wi-Fi: For Wi-Fi devices (smart plugs, cameras) and Pi's internet connection.
-
Bluetooth: For BLE beacons/sensors.
-
-
Power: 5V/3A adapter for Pi, separate power for high-current actuators.
-
Cloud Integration: Pi connects to cloud (e.g., AWS IoT) for remote access/analytics.
-
User Interface: Mobile app/Web dashboard served by Pi.
-
Case Study: Smart Agriculture
-
Objective: Optimize water usage, monitor crop health, increase yield.
-
IoT Implementation:
-
Sensors: Soil moisture, temperature/humidity, pH, light sensors deployed in fields.
-
Actuators: Automated irrigation valves, fertilizer dispensers.
-
Network: LPWAN (LoRaWAN) for long-range, low-power sensor data to gateway. Gateway uses cellular (4G/5G) to cloud.
-
Platform: Cloud IoT platform (e.g., Azure IoT) ingests data.
-
Analytics: ML models predict irrigation needs based on weather forecasts + soil data. Alerts for disease detection (from image sensors).
-
Actuation: Automated irrigation schedules based on analytics.
-
Benefits: 20-30% water saving, early pest detection, reduced labor.
-
Other Mentioned Topics
-
WebSockets: Full-duplex communication protocol over a single TCP connection. Used in IoT for real-time web dashboards (push updates from server to browser without polling). MQTT can be tunneled over WebSockets for browser-based clients.
-
Software Defined Networking (SDN): Separates control plane (centralized controller) from data plane (switches). Maturity: Maturing technology. Used in IoT for dynamic network management, traffic optimization, and security policy enforcement across large-scale IoT deployments. Not yet ubiquitous in small IoT but promising for industrial IoT.
-
Context Awareness: System's ability to adapt based on situational information (location, time, user activity, environment). Enabled by sensor fusion.
-
Reality Mining: Collecting and analyzing data from device usage (phones, wearables) to understand human behavior, social patterns, and mobility.
Exam Tips & Common Pitfalls
[!TIP]
- Protocols: Be very clear on CoAP (request/response, UDP, CON/NON) vs MQTT (pub/sub, TCP, QoS). Know AMQP's exchange/queue model.
- Architecture: Distinguish Logical vs Physical and Level 3 vs Level 4 with examples.
- Sensors: Memorize Bias, Drift, Hysteresis, Quantization Error definitions.
- Security: Link vulnerabilities to specific attack types (e.g., weak password → broken authentication).
- 6LoWPAN: Emphasize it's an adaptation layer, not a new IP. Its job is header compression & fragmentation for 802.15.4.
- Smart Home Sketch: Label Pi (gateway), sensors/actuators, communication tech (Wi-Fi/ZigBee), and cloud link. Even a rough labeled diagram scores marks.
- M2M vs IoT: Focus on connectivity (siloed vs IP), data (limited vs big), and intelligence (none vs analytics).