Lecture 2 · AI4ST

IoT & Sensor
Data Management

From transducers and ADC/DAC to energy-aware data acquisition. Two topics here map straight onto the simulation exam: ADC (Q1) and push vs pull (Q16).

⏱ ~35 min 📚 6 sections ✅ 7 MCQ + 2 open-ended ⭐ ADC & Push/Pull
1

The "Thing": Sensors, Actuators & ADC/DAC

A "thing" is a device that can interact with the physical world — by sensing or actuating. Forms range from dedicated hardware (sensing one phenomenon) to general-purpose devices (a smartphone).

Definition · Transducer
A device that transforms one form of energy into another. Input transducers = sensors · Output transducers = actuators.

How sensors work

Physical phenomenon Transducer (energy conversion) Electronic signal Data stream

Sensors detect physical changes and produce an electrical signal, output as a data stream (e.g., a phone accelerometer sampling at 100 Hz).

⭐ Sensor types — and where ADC fits (exam Q1)

Analog sensors

  • Receive voltage from the device and return an adjusted voltage = the analog representation of the measurement
  • Signals must be digitalized — devices only understand 0s and 1s
  • Done by an ADC (Analog-to-Digital Converter)

Digital sensors

  • Output a digital signal directly
  • Either measure two states (ON/OFF)…
  • …or use a built-in ADC
⭐ Memorize this — Simulation exam Q1
ADC converts analog signals into digital signals, enabling IoT devices to process and interpret sensor data. (The reverse — digital→analog — is the DAC, used to drive analog actuators.)

Actuators

Actuators are also transducers: they convert energy into an action (motion, switch…) upon receiving a command. Examples: LED, speakers, relay, screens, stepper motors.

  • Analog actuators — interaction changes with the supplied voltage; need a DAC (Digital-to-Analog Converter) to turn 0s and 1s into a voltage.
  • Digital actuators — two states by high/low voltage, or a built-in DAC.
ThinkA microcontroller reads a temperature from an analog thermistor and then dims an analog LED based on it. Which two converter components are involved, and in which direction?
Answer: Reading the thermistor needs an ADC (analog→digital, so the CPU can interpret the value). Dimming the analog LED needs a DAC (digital→analog, turning 0s/1s into a driving voltage).
2

IoT Architecture: Gateway & Edge

The "Internet" part of IoT = one or more applications that send/receive data to/from devices and process it (often with AI) to make decisions. Devices usually don't talk to the cloud directly — they go through a local gateway.

IoT Gateway

  • Collects data from physically close IoT devices
  • May connect to other networks (internet, other gateways)
  • Possibly has an embedded DB and does local processing
  • Transmits data to processing units (cloud/server)

Three-stage vs Four-stage architecture

Stage3-stage4-stage (adds the Edge)
1Sensors / ActuatorsSensors / Actuators
2IoT GatewayGateways & Data Acquisition (A/D, measurement)
3Cloud ServerEdge IT (analytics, pre-processing)
4Data Center / Cloud (analytics, management, archive)
Key idea · Edge nodes
Edge nodes are machines close to the IoT network (e.g., the gateway covers a room, an edge device covers the whole building). They have more compute than the gateway and are used to reduce latency and pre-process a smaller set of data before sending it to the cloud.

Because devices generate huge volumes, IoT is also Big Data analysis — needing ingestion → transformation → storage → presentation pipelines.

3

Communication & Interoperability

Each IoT device may use very different networking interfaces to reach the gateway — Bluetooth, Zigbee, Wi-Fi, Z-Wave, LoRaWAN, Sigfox, Cellular, NFC, MQTT, OPC-UA… Each modality has its own peculiarities, so integration is challenging.

Matter
A standard to make IoT devices "talk" between them. It sits at the application layer on top of network/transport layers (Zigbee, Thread, Wi-Fi, Bluetooth) and unifies ecosystems like HomeKit, Hue, Alexa, SmartThings, Google Home.

Types of IoT

🏠

Consumer

Personal use: smart speakers, heating, robot vacuums, appliances

🏬

Commercial

Workplaces: occupancy/motion sensors, cold-storage temp, vehicle localization

🏭

Industrial (IIoT)

Machinery control & predictive maintenance: temperature, vibration, rotation speed

🌉

Infrastructure

Smart cities/grids: pollution, traffic, energy consumption

A quick history (good for "which is FALSE" traps)

  • 1982 — first IoT device: a Coca-Cola vending machine on ARPANET (check stock & if drinks were cold)
  • 1990 — a toaster, first device connected to the Internet
  • 1999 — Kevin Ashton coins the term "Internet of Things"
  • ~2008–2010 — connected devices outnumber people
4

Sensing in IoT

Sensors/actuators can be embedded in resource-limited devices or in personal smart objects (phones, watches, glasses), interconnected into sensor networks.

Physical sensor categories

🏃

Inertial

Acceleration & rotation on 3 axes: accelerometer, gyroscope, gravity, rotational vector

🌡️

Environmental

Air temp, pressure, illumination, humidity: barometers, photometers, thermometers

🧭

Position

Physical position: orientation sensors, magnetometers

Mobile & wearable devices

Mobile/wearables are IoT devices too — they provide sensing, gateway / opportunistic data exchange, an interface, a way to identify subjects in an environment, and a way to know their goals/preferences. Built-in sensors: inertial, environmental, location (GPS), and virtual sensors.

Virtual sensors
Services/apps that provide high-level context from low-level context. E.g., from GPS coordinates → weather (OpenWeather), semantic location (Google Places), nearby transport (Transitland). (Ties back to high-level vs low-level context in Lecture 1.)

Wearable biosensors: ECG, body temperature, blood pressure, heart rate, oxygen saturation, perspiration, skin conductivity, blood glucose, EMG, EEG.

Challenges of IoT devices

  • Limited resources (energy, CPU, memory)
  • Different types of interfaces
  • High variance in connectivity
  • Variable location
5

Sensor Data Management

Analysing sensor data is important — but collecting it is itself a hard problem: data collection is energy-costly, may be incomplete/erroneous, sensors may be unavailable, it often needs real-time and distributed processing.

⭐ Energy consumption — the golden rule

Remember this number
The most energy-intensive task is communication (sending values to the gateway), not computation. Transmitting 1 bit costs as much power as ~1000 CPU operations. → It's worth computing locally to avoid transmitting.

Two cost drivers: Data Generation Costs (reading a sensor; depends on the phenomenon) and Communication Costs (transmitting to the gateway — dominant).

The four data-management tasks

TaskGoalWhere
Data AcquisitionEfficiently acquire samples from the sensor networkLocally, on the sensor network
Data CleaningIdentify & remove noisy/erroneous readings (failures, lost comms)After acquisition (e.g., base station)
Query ProcessingAnswer queries accessing/generating minimal dataNetwork / base station
Data CompressionSummarize / eliminate redundancy in large dataNetwork / storage

Acquisition techniques

  • Duty cycling: transmitting is costly → keep the antenna in sleep mode most of the time, with coordinated sleep/wakeup scheduling.
  • Mobility-based: exploit mobile gateways/nodes (carried by people, cars, animals) to better distribute transmission costs.
  • Sampling: don't use all the signal — sample at a frequency that's still representative (HAR accelerometer may give 200 Hz, but 50 Hz is often enough).
  • In-network query processing: instead of centralizing, build an overlay network and aggregate in intermediate nodes (avg, min/max) to cut transmitted data.

Compression

Approximate a sensor data stream with a set of functions. Regression, transformation and filtering exploit spatio-temporal correlations; orthogonal transforms (Fourier, wavelet) reduce dimensionality.

ThinkA battery sensor must report the average temperature each hour. Why is computing the average on the sensor and sending one value far better than streaming all raw readings to the gateway?
Answer: Because communication dominates energy use — 1 transmitted bit ≈ 1000 CPU operations. Computing the average locally (cheap CPU work) and sending a single value drastically cuts transmissions, saving battery. This is the logic behind in-network aggregation and the push model.
6

⭐ Data Acquisition: Push vs Pull

This is the topic behind simulation exam Q16. Get the direction right and you've got the question.

🔄 Pull-based

  • The user/gateway defines the interval and frequency of acquisition
  • Sensors are queried on demand
  • Declarative style: SELECT … SAMPLE INTERVAL 1s FOR 10s
  • Simple, but can waste energy querying when nothing changed

📤 Push-based

  • Gateway & sensors agree on a model of expected behavior (e.g., usual daily temperature curve)
  • Sensors transmit only when values deviate from the model
  • Energy-efficient — silence means "as expected"
  • Models: linear prediction (temporal only, per-sensor) or Markovian (complex spatial dependencies among sensors)
⭐ Exam-ready phrasing — Simulation Q16
In the 'pull' strategy, sensors are queried with a frequency decided by the user. In the 'push' strategy, the sensors transmit data themselves (e.g., when values differ from a model).

Why push saves energy

Both base station and sensor network keep the same probabilistic model in sync. As long as readings match the model, nothing is transmitted; only deviated sensor values + model updates travel over the network — directly attacking the communication cost that dominates the energy budget.

ThinkA room temperature sensor follows a predictable daily curve. Which acquisition strategy minimizes radio transmissions, and what exactly gets sent?
Push-based. The sensor and gateway share a model of the expected daily curve. The sensor stays silent while readings match the model, and only transmits when a reading deviates from it (plus occasional model updates). Far fewer transmissions than pull-based periodic querying.

Final Quiz — Exam Style

7 MCQs with instant feedback + 2 open-ended questions. Q1 and Q6 are modeled directly on the simulation exam.

1
Simulation exam Q1. What specific function does an ADC perform in the context of IoT devices?
AADC converts digital signals to analog signals, enabling IoT devices to act on the environment through actuators.
BADC amplifies weak signals to enhance communication range of IoT devices, ensuring data integrity over long distances.
CADC filters out noise from sensor data to improve the accuracy of IoT devices.
DADC converts analog signals into digital signals, enabling IoT devices to process and interpret sensor data.
D — slide: "this is done with specific components called ADC (analog-to-digital converters)". Option A describes the DAC (the reverse, the one-word-swap distractor).
2
Which component is needed for an IoT device to drive an analog actuator?
AAn ADC, to convert the actuator's analog output to digital
BA gateway, since actuators cannot receive voltage directly
CA DAC, to convert the device's 0s and 1s into a voltage
DNo converter — analog actuators read digital signals natively
C — analog actuators need a DAC (digital→analog) to turn the device's bits into a driving voltage.
3
In a battery-powered sensor node, which statement about energy is correct?
AComputation dominates; transmitting data is essentially free
BCommunication dominates; transmitting 1 bit ≈ the cost of ~1000 CPU operations
CSensing always costs more than both computation and communication combined
DEnergy cost is identical for computation and communication
B — communication is the dominant cost, motivating local processing, aggregation, and push-based acquisition.
4
What is the primary purpose of an Edge node in a four-stage IoT architecture?
ATo replace the cloud entirely so no data is ever stored remotely
BTo convert analog sensor signals to digital ones
CTo pre-process data and reduce latency, having more compute than the gateway
DTo provide the wireless radio link between sensors and the gateway
C — edge nodes sit close to the network with more compute than the gateway, used to pre-process a smaller dataset and reduce latency before the cloud.
5
What does in-network query processing achieve?
AIt sends all raw data to a central server for maximum precision
BIt aggregates data in intermediate nodes (e.g., avg, min/max) to reduce transmitted data
CIt increases the sampling frequency of every sensor
DIt encrypts data hop-by-hop without affecting volume
B — intermediate nodes aggregate, significantly cutting the amount of data transmitted over the network.
6
Simulation exam Q16. What is the difference between "push" and "pull" strategies in sensor data acquisition?
AConsidering the 'pull' strategy, data are queried when the gateway detects anomalies with respect to a model. In the 'push' strategy, the sensors transmit data (e.g., when they differ from a model)
BConsidering the 'push' strategy, each sensor immediately transmits data to its neighbors until they reach the gateway. In the 'pull' strategy, sensors periodically transmit data.
CConsidering the 'push' strategy, sensors are queried with a frequency decided by the user. In the 'pull' strategy, the sensors transmit data (e.g., when they differ from a model)
DConsidering the 'pull' strategy, sensors are queried with a frequency decided by the user. In the 'push' strategy, the sensors transmit data (e.g., when they differ from a model)
D — slides: "Pull-based: the user defines the interval and frequency of data acquisition"; "Push-based: the gateway and the sensors agree on an expected behavior (i.e., a 'model')" and transmit on deviation. C is the exact mirror swap.
7
Which pair of push-model types is described correctly?
ALinear prediction models capture spatial dependencies; Markovian models are per-sensor and temporal-only
BLinear prediction models consider only temporal features per sensor; Markovian models capture complex (spatial) dependencies among sensors
CBoth linear and Markovian models ignore time entirely
DMarkovian models require no transition probabilities
B — linear prediction (X̂ᵗ⁺¹ = αX̂ᵗ + β) is temporal & per-sensor; Markovian models add complex spatial dependencies via initial state + transition probabilities.
8
Open-ended · Sensor data acquisition
a) Explain why energy consumption is the central concern when acquiring data from a wireless sensor network, and name the two main cost drivers.
b) Describe two techniques that reduce energy consumption during data acquisition and how each one helps.
Model answer

a) Sensors are typically battery-powered and may sit in inaccessible locations, so battery life determines system lifetime. The two cost drivers are data generation cost (reading the sensor — depends on the phenomenon) and communication cost (transmitting to the gateway), the latter being dominant: transmitting 1 bit costs about as much as 1000 CPU operations.

b) Examples: (1) Duty cycling — keep the radio antenna asleep most of the time with coordinated sleep/wakeup scheduling, since transmitting is the costly part. (2) In-network query processing / aggregation — aggregate (avg, min/max) at intermediate nodes so far less data is transmitted. Also valid: push-based acquisition (transmit only deviations from a shared model), sampling at a lower-but-representative frequency, and compression (Fourier/wavelet).

9
Open-ended · Push vs Pull
a) Contrast pull-based and push-based data acquisition, making the direction of communication explicit.
b) In push-based acquisition, what is the role of the "model", and what is the difference between linear-prediction and Markovian models?
Model answer

a) In pull-based acquisition the user/gateway decides the interval and frequency and queries the sensors (e.g., SAMPLE INTERVAL 1s FOR 10s). In push-based acquisition the sensors transmit on their own, sending data only when readings deviate from an agreed model — making it more energy-efficient.

b) The model is a shared expectation of sensor behavior kept in sync between the sensor network and the base station; while readings match it, nothing is transmitted, so only deviations + model updates travel the network. Linear-prediction models (X̂ᵗ⁺¹ = αX̂ᵗ + β) use only temporal features and treat each sensor independently; Markovian models capture complex, also spatial dependencies among sensors via an initial state distribution and transition probabilities.

0/7
MCQ score 0/7