UNIT 1: Fundamentals and Architecture of Internet of Things (IoT)
1. Introduction and Fundamentals
Definition & Evolution:
-
IoT: A system of interrelated computing devices, mechanical and digital machines, objects, animals, or people that are provided with unique identifiers (UIDs) and the ability to transfer data over a network without requiring human-to-human or human-to-computer interaction.
-
Evolution: From Machine-to-Machine (M2M) communication → Internet-enabled devices → pervasive, seamless integration of physical and virtual worlds.
Key Characteristics of IoT Systems:
| Characteristic | Description |
|---|---|
| Connectivity | Seamless communication between devices, networks, and services. |
| Things/Objects | Physical/virtual entities with sensing/actuation capabilities and unique IDs. |
| Data | Massive volume, velocity, and variety generated by things. |
| Communication | Various protocols (MQTT, CoAP, HTTP) tailored to device constraints. |
| Intelligence | Data analytics, machine learning at edge/cloud for actionable insights. |
| Actionability | Ability to trigger automated or semi-automated actions based on insights. |
| Services | Horizontal platforms offering reusable functions across domains. |
| Security & Privacy |
Physical Design of IoT:
Focuses on the hardware components of an IoT node/device.
-
Sensors/Actuators: Interface with the physical world.
-
Microcontroller/Microprocessor (e.g., Arduino, ESP32): The "brain" for local processing and control.
-
Communication Module (e.g., Wi-Fi, BLE, LoRa, Cellular): Enables network connectivity.
-
Power Source: Batteries (often constrained) or energy harvesting.
-
Enclosure & Interface: Physical protection and user/device interfaces (buttons, LEDs).
[!TIP] Exam Focus: "Physical Design" questions expect you to list and briefly explain the hardware building blocks of a single IoT device/node.
Design Objectives for Horizontal IoT Architecture:
Targeting horizontal (cross-domain) real-world services requires architecture to be:
-
Scalable: Handle growth in devices and data volume.
-
Interoperable: Support diverse devices, protocols, and applications.
-
Modular & Layered: Clear separation of concerns (e.g., perception, network, application layers).
-
Secure & Trustworthy: Built-in security from device to cloud.
-
Manageable: Remote device management, monitoring, and updates (OTA).
-
Resource-Efficient: Optimized for constrained devices (low power, low compute).
-
Service-Oriented: Expose functionalities as reusable services (APIs).
2. IoT Architecture and Frameworks
Conceptual Framework (Layered View):
A common 3-layer or 5-layer model:
-
Perception Layer (Physical Layer): Sensors, actuators, RFID, cameras for data acquisition.
-
Network Layer: Gateways, networks (WSN, LPWAN, IP-based) for data transmission.
-
Middleware/Service Layer (Processing Layer): Data processing, storage, service discovery, and management.
-
Application Layer: Domain-specific applications (smart city, health, etc.).
-
Business Layer: Overall business models, profit, and user interaction.
Applied Architecture in M2M/IoT Solutions: Partitioning into Domains
The oneM2M standard introduces a key architectural principle:
-
Architecture Domain: Defines common, standardized functions (e.g.,
Application Entity (AE),Common Service Entity (CSE),Underlying Network Entity (UNE)). This is the horizontal, reusable platform. -
Solution Domain: Contains domain-specific applications and resources built on top of the Architecture Domain. This is the vertical implementation (e.g., a specific smart parking app).
[!TIP] Exam Focus: 14-mark questions on this topic require you to explain why this separation is crucial: It enables interoperability and reusability. Different solution providers can build applications on a common, standardized platform (Architecture Domain), avoiding siloed, incompatible systems.
IoT System Views: Deployment & Operational Example (Smart Parking)
Consider a Smart Parking System:
-
Deployment View: Physical arrangement.
-
Sensors (ultrasonic/magnetic) in each parking spot.
-
Gateway(s) per zone/street.
-
Network links (LoRaWAN, Wi-Fi).
-
Cloud/Data Center.
-
User mobile app & management dashboard.
-
-
Operational View (Resources, Services, Virtual Entities, Users):
-
Resources: The actual sensor data (
/sensors/spot_101/status), parking spot metadata. -
Services:
ParkingAvailabilityService,PaymentService,NavigationService. These are software functions that act on resources. -
Virtual Entities: Digital twins of physical things. E.g., a
ParkingSpotvirtual entity with attributes (ID, location, status) linked to the physical sensor resource. -
Users: Driver (consumer of availability data), Parking Operator (manager), City Planner (analyst of analytics).
-
3. Communication Protocols for IoT
| Protocol | Key Features | Role in IoT | Typical Use Case |
|---|---|---|---|
| MQTT | Publish/Subscribe, lightweight, TCP-based, QoS levels (0,1,2), small header. | De facto standard for telemetry/data streaming from constrained devices to cloud/central broker. | Sensor data upload (temperature, humidity). |
| CoAP | RESTful, UDP-based, low overhead, confirmable/non-confirmable messages, observe pattern. | For resource-constrained devices in lossy networks. Enables machine-to-machine REST interactions. | Actuation, simple queries in low-power networks (6LoWPAN). |
| HTTP | Request/Response, TCP, heavy header, widely supported, stateless. | Used when devices have sufficient power/bandwidth and need to interact with existing web infrastructure. | Firmware updates, admin interfaces, devices with good connectivity. |
| SOAP | XML-based, strict standards (WS-*), heavy, ACID properties. | Rare in constrained IoT. Used in enterprise backend integration where formal contracts and security are critical. | Integration with legacy enterprise systems (SAP, etc.). |
IP Addressing in IoT:
-
Critical Enabler: Allows every "thing" to be addressable and reachable on the internet.
-
Challenges: IPv4 exhaustion → IPv6 (128-bit address space) is fundamental for massive IoT deployments.
-
Techniques: 6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks) compresses IPv6 headers for use with protocols like IEEE 802.15.4.
[!TIP] Exam Pitfall: Do not confuse MQTT (Pub/Sub) and CoAP (REST/Req-Resp). MQTT is great for many-to-many data distribution. CoAP is for direct, web-like interaction with individual resources.
4. Enabling Technologies
Wireless Sensor Networks (WSN)
-
Single-Node Architecture:
[Sensor] --> [ADC] --> [Microcontroller/Processor] | [Memory (RAM/Flash)] | [Communication Module (Radio)] | [Power Source (Battery)] -
Benefits: Flexible deployment, self-organization (in ad-hoc networks), can monitor inaccessible areas.
-
Limitations: Limited battery life, constrained resources (CPU, memory), vulnerability to physical attacks, network scalability issues, communication unreliability in harsh environments.
Sensors & Actuators
-
Sensors: Convert physical phenomena (temp, light, motion, pressure) into electrical signals.
- Example (Smart Street Light): LDR (ambient light), PIR/motion sensor (detect movement), current sensor (monitor lamp health).
-
Actuators: Convert electrical signals into physical action.
-
Types:
-
Electrical: Relays, solenoids, motors (DC, stepper, servo).
-
Hydraulic: Use fluid pressure.
-
Pneumatic: Use compressed air.
-
Thermal/Magnetic: Shape memory alloys, piezoelectric.
-
-
Example (Smart Street Light): Relay/SSR (switch lamp ON/OFF), Stepper Motor (for dynamic tilting/adjustment).
-
Participatory Sensing:
-
Concept: Leveraging human-carried sensors (smartphones, wearables) and human observations to collect data. Humans become mobile sensing nodes.
-
Importance: Provides contextual, subjective, and large-scale data (e.g., noise levels, traffic congestion, environmental conditions) that fixed sensor networks cannot. Enables citizen science and crowd-sourced applications.
5. IoT Applications and Domains
Smart City & Urban IoT:
-
Smart Street Light System:
-
Sensors: LDR (detect dusk/dawn), PIR/microwave (detect motion/presence), ambient sound/vibration (detect incidents).
-
Operation: Lights dim to low level when no motion. Brighten to full when motion detected. Report faults (lamp out, abnormal current). Schedule maintenance. Adaptive lighting based on weather data.
-
-
Smart Parking (Deployment View Recap): In-ground sensors detect spot occupancy → Gateway aggregates data → Cloud processes → App shows real-time availability → Enables reservation/payment.
Domain-Specific IoT:
| Feature | Industrial IoT (IIoT) | Automotive IoT |
|---|---|---|
| Primary Focus | Machine/Process Efficiency, Safety, Predictive Maintenance. | Vehicle Functionality, Connectivity, User Experience, Mobility Services. |
| Key Use Cases | Asset tracking, factory automation, energy management, supply chain optimization. | Connected infotainment, telematics, V2X (Vehicle-to-Everything) communication, autonomous driving, usage-based insurance. |
| Critical Requirements | Extreme reliability, low latency, deterministic communication, harsh environment tolerance. Safety-critical. | High mobility support, real-time location, robust connectivity (cellular/V2X), security against remote attacks. |
| Typical Tech | Industrial Ethernet (TSN), 5G URLLC, OPC UA, Wired/PROFINET. | Cellular (4G/5G), DSRC/C-V2X, CAN-FD, Ethernet in vehicle. |
| Data Nature | Primarily machine/process telemetry. | Mix of vehicle telemetry, location, infotainment, and external service data. |
6. Supporting Infrastructures and Technologies
Cloud of Things (CoT):
-
Role: IoT data ingestion, storage, processing, and analytics platform. Acts as the central service enabler.
-
How it Enables Value-Added Services:
-
Scalable Data Hub: Ingests massive, heterogeneous IoT data streams.
-
Processing & Analytics: Batch/real-time processing (Spark, Flink), ML/AI for insights (predictive maintenance, anomaly detection).
-
Service Platform: Exposes processed data and insights via APIs (REST, MQTT) to vertical applications (e.g., a farmer's dashboard, a city manager's command center).
-
Device Management: Remote provisioning, monitoring, and updates.
-
Integration: Connects IoT data with enterprise systems (ERP, CRM).
-
-
Diagram Concept: Devices → (MQTT/CoAP) → Cloud IoT Core/Platform (Ingestion, Processing, Storage) → Application Services/APIs → End-User Apps.
Network Function Virtualization (NFV) for IoT:
-
Concept: Decouples network functions (e.g., firewall, gateway, router, MQTT broker) from proprietary hardware. They run as software (Virtual Network Functions - VNFs) on standard high-volume servers (NFVI).
-
Virtualizing IoT Devices/Functions:
-
Instead of a physical hardware gateway at each site, a virtual gateway VNF can be instantiated in the cloud/edge data center.
-
Virtualizes network services that IoT traffic passes through (security, protocol translation, QoS).
-
Benefit: Dynamic scaling, reduced CAPEX, flexible service chaining (e.g., IoT data → firewall VNF → MQTT broker VNF → storage VNF).
-
Software Defined Networking (SDN) in IoT:
-
Concept: Separates control plane (centralized SDN Controller) from data plane (switches/routers).
-
Role in IoT:
-
Centralized Management: Controller has a global view of the IoT network (including constrained nodes via southbound APIs like OpenFlow or P4).
-
Dynamic Traffic Engineering: Prioritize critical IoT traffic (e.g., emergency sensor data) over bulk data.
-
Security: Implement fine-grained, policy-based security rules at the network level.
-
Network Slicing: Create isolated virtual networks for different IoT applications (e.g., one slice for smart meters, another for industrial robots) on shared physical infrastructure.
-
Simplifies Mobility Management: Handoff decisions can be centrally optimized.
-
7. Tools and Platforms
Arduino Platform for IoT Development
-
What: Open-source electronics platform based on easy-to-use hardware (Arduino boards like Uno, Nano, Mega, ESP32) and software (Arduino IDE).
-
Arduino IDE: Simplifies writing, compiling, and uploading code (sketches in C/C++) to the board.
-
Example: Ultrasonic Sensor (HC-SR04) Distance Measurement
const int trigPin = 9; const int echoPin = 10; long duration; int distance; void setup() { Serial.begin(9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); } void loop() { // Clear trigPin digitalWrite(trigPin, LOW); delayMicroseconds(2); // Send pulse digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); // Read echoPin duration = pulseIn(echoPin, HIGH); // Calculate distance (speed of sound = 343 m/s) distance = duration * 0.034 / 2; // in cm Serial.print("Distance: "); Serial.print(distance); Serial.println(" cm"); delay(1000); }- Principle:
triggerpin sends 10µs pulse → sound wave travels to object →echopin measures pulse duration → distance = (duration × speed_of_sound) / 2.
- Principle:
Data Storage in IoT Systems
-
Challenges: Volume (big data), Velocity (streaming), Variety (structured/unstructured), Veracity (quality).
-
Strategies & Solutions:
-
Time-Series Databases (TSDB): Optimized for timestamped sensor data (e.g., InfluxDB, TimescaleDB).
-
NoSQL Databases: For flexible, scalable, schema-less storage.
-
Document Stores (MongoDB): Store complex, nested device data.
-
Column-Family (Cassandra, HBase): High write throughput, distributed.
-
Key-Value (Redis): Caching, real-time lookups.
-
-
Data Lakes (Hadoop HDFS, AWS S3): Store raw, unstructured data at scale for later batch processing.
-
Edge Storage: Local storage on gateway/device for buffering during network outages.
-
Hybrid Approach: Hot data in TSDB/NoSQL, cold data in Data Lake/Cloud Object Storage.
-