AI & ML for IoT Systems
1
Why AI + IoT Now
2
Billions of connected sensors
Cheap compute at the edge
Real-time decisions are expected
AI turns raw telemetry into value
IoT Stack Overview
3
Perception layer: sensors, actuators
Network layer: connectivity + routing
Application layer: analytics, automation, AI
Feedback/control loop
From Raw Signals to Usable Data
4
Sampling rate & Nyquist
Quantization and compression
Denoising, normalization
Time sync across devices
Control and Actuation Loops
5
Sense → infer → act
Closed-loop autonomy (e.g. smart HVAC)
Latency budgets: ms vs seconds
Safety and fail-safes
Feature Engineering for Sensor Data
6
Why ML in IoT?
7
Edge vs Cloud vs Hybrid
8
Edge: instant response, local context
Cloud: heavy analytics, global context
Hybrid: edge pre-filter + cloud refinement
Cascade inference patterns
What is Tiny Machine Learning (TinyML)?
9
TinyML
Fastest-growing field of ML
Algorithms, hardware, software
Low power consumption
On-device sensor analytics
Always-on ML
Battery-operated
Why Edge Intelligence?
10
Edge Hardware Landscape
11
MCUs (tens of kB RAM)
Single-board computers (Raspberry Pi class)
NPUs / TPUs / accelerators
Battery and thermal limits
TinyML Concepts
12
ML ON ULTRA-LOW-POWER MICROCONTROLLERS
USE CASES: WAKE-WORD, GESTURE, LEAK DETECTION
ALWAYS-ON SENSING UNDER ~1 MW BUDGET
Reference AIoT Architecture
13
Sensor node
Gateway / edge aggregator
Cloud analytics / data lake
Digital twin / dashboard
Human-in-the-loop feedback
EdgeML (P )
14
TinyML (P )
KeyWord Spotting
Motion & biometric
Environmental Control
Image Spot
Image Recognition
Autonomous Car Control
15
16
EdgeML
17
46
Rpi-Pico (Cortex-M0+)
Arduino Nano (Cortex-M4)
Arduino Pro (Cortex-M7)
RaspberryPi SmartPhone (Cortex-A)
Jetson Nano (Cortex-A + GPU)
Object Detection Complex Voice Processing
1 MB+
Image
Classification 250 KB+
KeyWord Spotting Audio Classification 50 KB
Anomaly Detection Sensor Classification 20 KB
Video Classification 2 MB+
Source: Edge Impulse
TinyML
Hardware
Software
18
(TFL Micro)
Example: KeyWord Spotting (KWS)
19
20
Sound
Image
KeyWord Spotting (KWS) - Inference
21
Digital Mic
“Yes”
Obtains an input
16KHz / 16 bits Sample: [1s]
KeyWord Spotting (KWS) - Inference
22
Digital Mic
“Yes”
MFCC
Feature Converter
Obtains an input
Pre-Process
16KHz / 16 bits Sample: [1s]
Output: Image [49, 40, 1]
KeyWord Spotting (KWS) - Inference
23
Digital Mic
“Yes”
MFCC
Feature Converter
Obtains an input
Pre-Process
Runs model
16KHz / 16 bits Sample: [1s]
Output: Image [49, 40, 1]
Output Dim [1, 4]
KeyWord Spotting (KWS) - Inference
24
Digital Mic
“Yes”
MFCC
Feature Converter
Obtains an input
Pre-Process
Runs model
Post-Processes
16KHz / 16 bits Sample: [1s]
Output: Image [49, 40, 1]
Output Dim [1, 4]
If Probability of YES is greater than 80% Take actions
KeyWord Spotting (KWS) - Inference
25
Digital Mic
“Yes”
MFCC
Feature Converter
Obtains an input
Pre-Process
Runs model
Post-Processes
Make things happen
16KHz / 16 bits Sample: [1s]
Output: Image [49, 40, 1]
Output Dim [1, 4]
If Probability of YES is greater than 80% Take actions
KeyWord Spotting (KWS) - Model
26
Digital Mic
“Yes
”
MFCC
Feature Converter
Obtains an input
Pre-Process
Runs model
postprocesses
Make things happen
16KHz / 16
bits
Sample: [1s]
Output:
Image
[49, 40, 1]
Output Dim [1, 4]
If Probability of YES is greater than 80%
Take actions
KeyWord Spotting (KWS) – Create Model (Training)
27
Digital Mic
MFCC
Feature Converter
Obtains data
Pre-Process
16KHz / 16 bits Sample: [1s]
Output: Image [49, 40, 1]
KeyWord Spotting (KWS) – Create Model (Training)
28
Digital Mic
MFCC
Feature Converter
Obtains data
Pre-Process
Train model
Evaluate Model
16KHz / 16 bits Sample: [1s]
Output: Image [49, 40, 1]
KeyWord Spotting (KWS) – Create Model (Training)
29
Digital Mic
MFCC
Feature Converter
Obtains data
Pre-Process
Train model
Evaluate Model
Deploy
16KHz / 16 bits Sample: [1s]
Output: Image [49, 40, 1]
Supervised Learning Refresher
30
Supervised Learning
31
Unsupervised & Self-Supervised IoT
32
Clustering for behavior patterns
Autoencoders for anomaly detection
Contrastive learning on time windows
Few/zero-label environments
Unsupervised Learning
33
Time Series Modeling Approaches
34
Classical: ARIMA, Kalman filters
ML: Random Forests on engineered windows
Deep: RNN / LSTM / GRU / 1D CNN
Transformers for long context
Activity Recognition Example
35
Predictive Maintenance Example
36
Anomaly Detection in IoT
37
Computer Vision in IoT
38
Multimodal Sensor Fusion
39
ML Decision Tree
40
Diagnose Steps (part 1)
1. Is it a ML task? Are you sure ML is the best solution?
2. Appropriate ML scenario?
3. Appropriate model?
4. Enough training data?
41
Diagnose Steps (part 2)
5. Model overly complicated?
6. Feature quality
7. Feature engineering
8. Combine models
42
Diagnose Steps (part 3)
9. Model validation
43
Types of Algorithms
44
Model Performance (Classification)
45
Threshold Selection (Binary)
46
Model Performance (Regression)
47
Evaluation Metrics for IoT ML
48
Model Compression Techniques
49
On-Device Inference Pipeline
50
Federated Learning for IoT
51
Digital Twins
52
Privacy & Responsible AI in IoT
53
Regulatory & Compliance
54
LLMs + IoT
55
Energy-Aware Intelligence
56
Adaptive sampling / duty cycling
Battery-aware model selection
Green AI: minimize inference carbon cost
Sustainability as design constraint
Edge Swarms & Collective Intelligence
57
Many small devices collaborating locally
Gossip instead of central cloud
Distributed anomaly detection
Use cases: env monitoring, precision agriculture
Where This Field Is Going
58
Every sensor becomes intelligent
Every decision must be explainable
AI/ML is the differentiator in IoT
Your job: design systems that are smart, safe, and trustworthy