IoT Mock Exam 2 — 2021-Style
Suggested conditions: closed book, 90–120 minutes. Answer in complete sentences and justify every technology or protocol selection. A correct label without reasoning earns only partial credit. The scenarios and numbers differ from the 2021 exam, but the structure follows the old exam and weekly question sheets.
1. Task: IoT Networking
(a) IEEE 802.15.4 MAC selection
An IEEE 802.15.4 network is deployed in the following scenarios. For each one, select unslotted CSMA/CA, slotted CSMA/CA, or TSCH and justify your choice.
- A parking garage contains six battery-powered air-quality sensors. Each sensor reports once every ten minutes and there is little competing traffic.
- A hospital ward has patient monitors sending periodic data and a separate urgent alarm channel that requires a reserved transmission opportunity.
- A refinery has many periodic sensors and actuators. The network is dense and some 2.4-GHz channels experience intermittent narrow-band interference.
(b) CSMA/CA backoff
In unslotted CSMA/CA, the backoff window grows after a failed attempt. Explain why a larger window does not necessarily produce a longer delay for the next individual transmission. Also explain why increasing the window can still be useful overall.
(c) IPv6 over 802.15.4
Give two reasons why 6LoWPAN is needed to support IPv6 over IEEE 802.15.4. Name two adaptation features that improve efficiency or interoperability.
(d) 6LoWPAN fragmentation calculation
An IPv6 datagram of 910 bytes is sent over 802.15.4. 6LoWPAN fragmentation is used, and every fragment except the last has 80 bytes available for payload.
What is the datagram offset of the seventh fragment? Show the fragment start position and explain why the offset is measured in 8-byte units.
2. Task: NB-IoT
(a) Choosing NB-IoT or IEEE 802.15.4
For each application, select NB-IoT or IEEE 802.15.4 and justify the choice.
- A university wants temperature and occupancy sensors in five nearby buildings. The buildings have mains power and a local gateway is available.
- A railway company wants battery-powered sensors on isolated track switches distributed over a large region. Measurements are infrequent, but the devices require wide-area connectivity.
- A greenhouse contains many nearby soil and humidity sensors that must continue controlling irrigation when the Internet connection fails.
(b) NB-IoT channels
Name and explain the two broad types of channels used in NB-IoT. Which type carries paging messages, and why is paging not considered user data?
(c) Deployment scenarios
Name and briefly explain two NB-IoT deployment scenarios. Include where the 200-kHz NB-IoT carrier or resource can be placed relative to LTE or other cellular spectrum.
(d) Cell access and tracking
Describe the procedure followed by a newly powered-on NB-IoT UE to find and join a suitable cell. Then explain the purpose of a tracking area and when a tracking-area update can occur.
(e) Power saving
Compare eDRX and PSM for a battery-powered sensor that sends one message per day but may receive an occasional network command. Explain the reachability and latency trade-off.
3. Task: MQTT
(a) Retained messages
Describe a scenario in which the MQTT retain flag is useful. Explain what the broker stores and what happens when a new subscriber joins later. State one thing retain does not provide.
(b) Topic filters
The following clients publish:
- C1 publishes to
plant/zone1/temperature. - C2 publishes to
plant/zone2/temperature. - C3 publishes to
plant/zone2/humidity. - C4 publishes to
plant/zone2/window/temperature.
- Which subscription filter receives the temperature messages from C1 and C2 but not C3 or C4?
- Which subscription filter receives C1, C2, and C4, but also risks receiving other measurements below
plant/? - Can a publisher publish to
plant/+/temperature? Explain.
(c) Topic alias
A constrained publisher first sends a PUBLISH with:
Topic Name: building/floor-3/lab-2/air-quality
Topic Alias: 7
Payload: {"co2":812}Later it sends an empty topic name with Topic Alias 7 and a new payload.
Explain what the broker must store, how it resolves the later message, and why the mapping is not a universal broker-wide definition.
(d) Shared subscriptions
C1, C2, and C3 subscribe to:
$share/analysis/plant/+/+/temperatureC4 subscribes normally to:
plant/#C5 publishes to plant/zone1/greenhouse/temperature.
Which clients receive the publication? Explain the difference between the shared group and the normal subscription. To which topic should C5 publish?
(e) QoS direction
C2 subscribes to factory/motor/status with QoS 1. C1 publishes to the same topic with QoS 2.
What QoS is used between C1 and the broker? What QoS is used between the broker and C2? State the rule that determines the second value.
4. Task: Connected Data
(a) Update protocols and compression
Explain the difference between an update protocol and stream compression. Give one example of a cost reduced by each technique, and explain why both can be used together.
(b) Periodic reporting and dead reckoning
A delivery robot sends its position every five seconds even when it has barely moved.
- Explain periodic reporting and one situation where it works well.
- Explain why it is inefficient in the scenario above.
- Could dead reckoning reduce the transmissions if the robot moves at constant velocity? Justify your answer.
- Give one situation in which dead reckoning performs poorly and requires correction messages.
(c) Key-value versus linked data
A shipping system stores containers, owners, vessels, ports, routes, and delay events.
Give one example of information that is simple to retrieve with a key-value model and one relationship query that is more naturally represented by a linked-data/graph model. Explain the limitation of treating all relationships as opaque values in a key-value record.
(d) Stream processing versus CEP
Compare stream processing and complex event processing with respect to:
- their information model;
- their main focus;
- their origin or system style;
- the kind of result they typically produce.
(e) Continuous query
Define a continuous query and write pseudo-code for one that reports the maximum vibration and average temperature for each machine over the most recent 15 minutes. Results should be refreshed every 5 minutes. Include an appropriate window and grouping operation.
5. Task: Embedded Machine Learning
(a) Local or cloud placement
For each scenario, decide whether the ML task should run locally, in the cloud, or as a hybrid design. Justify each answer.
- A smart speaker must detect a wake word while consuming very little power.
- A fleet operator wants to train a failure-prediction model using vibration histories from 20,000 machines.
- An autonomous agricultural drone must detect an obstacle and change direction immediately, but also uploads selected observations for later model improvement.
(b) Benefits and challenges of edge ML
State four advantages of moving ML inference to an embedded IoT device and four challenges. Explain two reasons why training or large-scale model updating may remain in the cloud.
(c) Magnitude-based pruning
Explain how magnitude-based pruning is performed on a trained neural network. Why can pruning the smallest-magnitude weights lead to a drastic increase in the loss? Mention one approach that can make pruning decisions more informed.
(d) Quantization and binary networks
Explain the difference between quantization and pruning. Then explain binarization and why XNOR/popcount operations can make binary neural networks attractive for FPGA or specialized hardware. Mention one accuracy or training trade-off.
(e) Embedded ML system design
An ECG classifier is initially implemented as a large cloud model. The project team wants to deploy a version on an embedded FPGA while preserving accuracy as far as possible.
Propose two model or implementation optimizations from the lecture and explain the trade-off of each. Include one reason a hardware accelerator can help.