Task 1

(a)

  1. unslotted CSMA, due to the minimum number of sensors, which not only have low traffic only sending data per 10 minutes and no need for synchronization since there’s little competing traffic
  2. slotted CSMA, there’s 2 requirement functionality for the periodic data reporting as well as urgent alarm, with slotted GTS and synchronization it would be suitable
  3. TSCH, as mentioned we have dense network and large traffic, which make it a better choice than the other option

(b) a longer delay doesn’t necessarily produce longer delay because it reduces the probability of a collision, lets say the previous backoff window is 0 - 7, doubling it is 0 - 15, reducing the probability from 1/8 to 1/16 of that number to occur. The channel could also be already cleared once the delay is finished allowing the transmission to send directly

(c) 802.15.4 frame can only fit 127 bytes of MTU, IPv6 require 1280 bytes it is simply too large to fit 6LoWPAN also enable header compression from 40 bytes to around 2 - 5 bytes, by removing and using the only required headers 6LoWPAN provides fragmentation adaptation/ link-specifc that splits IPv6 datagram across tiny 802.15.4 frame and reassemble them later before transfering to higher layer

(d) start with 0 - 79 6 x 80 = 480 480 / 8 = 90 i dont know why offset is 8byte

Task 2

(a)

  1. 802.15.4 would be sufficient, since mains power and local gateway is available. the buildings are mentioned to be nearby as well and this would eliminate the need for cell subscription
  2. NB-IoT, with the large region focus that is the core strength of NB-IoT and a railway company would definitley have the budget for cell subscription, and since the sensors will be spread out and battery powered eDRX would be utilize to still allow for infrequent connectivity. 802.15.4 would be hard to implement if its city or province wide area.
  3. 802.15.4, the scope area would still be manageable using 802.15.4, and the need for offline operation make it suitable. using nb-iot would be overkill excpet if its industrial greenhouse over wide range areas. and the less dependency to cell/internet subscription

(b) signalling channel: carries information about connectiviy, radio, and the paging messages data channel: carries user data, like sensor reading. paging is from network → UE, user data wouldn’t be transmitted through there as that why data channel exist.

(c)

  1. standalone → this is where the 200kHZ carrier can be place relative to LTE
  2. Guardband → where NB-IoT uses unused frequency or the guardband of other carrier licences LTE

(d) after powered-on, it would be paged by the nearest eNB, it would test the connection if its strong enough or good enough then join, if not it will find another with stronger threshold after that connection is establish, tracking area is group of cells that help UE when moving from one cell to another, if it switch TAI it would notify MME sending the TAU

(e) eDRX has this paging window period where its able to receive occasional command, with the trade of less battery endurance, while PSM is better for longevity but latency trade-off is worse than eDRX

Task 3

(a) it is useful for scenario where a configuration or settings is used. lets say a factory have a publisher with topic /factory/machine-2/rotation and a reset happen, when turning it back on it could subscribe to the same topic with the known configuration ready

the broker would store /factory/machine-2/rotation retain=1 or true flag

the broker would kept the last published and retained message and send it to the late subscriber the retain flag doesn’t provide history

(b)

  1. plant/+/temperature
  2. plant/#
  3. no, wildcards are only for subscriber topic and not publisher

(c) the broker must store that this client → topic alias 7 → for topic building/floor-3/lab-2/air-quality since it keps the mapping of the client, alias, topic it would know which to route the data to or which subscriber or subscriber group its not universal since it can be a different alias for different client

(d) all between the shared c1, c2, c3 only one of them receive the copy since they sub to same group and c4 also receive since its a catch all plant/# wildcard C5 can publish to the /plant/zone1/greenhouse/temperature or if they have different zone and type of building since C4 is /plant/#

(e) broker → c2 is Qos1 c1 → broker QoS 2 the rule for subscription is min(Qos sub, QoS pub)

Task 4

(a) update protocol reduces radio usage by only sending data where changes occur, this already reduces the number of transmisison and bandwidth stream compression reduces encoding byte size so a json {“data”: “67”} would be compress before sending, this reduces the transmission size which could also reduce the amoutn of time radio signal active. both can be used and combine to optimally reduce the number of times data being sent and the size

(b)

  1. periodic reporting in the robot case would be like, it keeps sending the position data consecutively no matter the change in location it works well for tracking purposes, if that delivery robot carries important cargo, the monitor/controller would always know its location
  2. it would be inefficient since 5 seconds is very frequent 12x per minute, this would drain the battery fast
  3. yes, dead reckoning works by having the current constant velocity alongside timestamp direction, where receiver could extrapolate and predict movement
  4. would likely be this scenario, if there’s an obstacle that causes the once constant robot suddenly not in its course, it would need to send perhaps even more data or even use camera or other sensors that would also drain power when activated

(c)

key-value shipInformation: { “name”: “maersk” “yearBuild”: “2004” “size”: “200m” } link-data Ship A —onPort → alpha —stores→ Container B, Container C Ship A —owned→ ship GmbH —onRoute→ Japan

(d) stream processing is a continious timestamped data, where data could be aggregate and joined be used for analytics or reporting,where origin from database management, and can be use to find signifance in historical data

complex event processing is more similar to a notification system where it would find meaningful points from raw occurences, extending pub/submodel where it would hope to find event that triggers an action

(e) continious query, is a query that continiously produces result overtime while new data keeps coming, using window to manage the input, example CONTINIOUS QUERY max_vibration, temperature ON vibrationSensor, temperatureSensor WINDOW SLIDING 15 minutes, SLIDE 5 minutes SELECT machine, MAX(value) as maximum_vibration, AVG(value) as average_temperature GROUP BY machine EMIT EVERY 5 minutes

Task 5

(a)

  1. hybrid, local model to detect the wake word, but subsequent request like search or complex command that needs internet be forwared to cloud
  2. cloud, aggregating data from 20.000 machine , and historical data, would require strong capable hardware to pre-process and train
  3. hybrid, local for the object detection which require fast instant response, and cloud functionality to recieve, clean, process the data for model improvement

(b)

  • fast/instast inference, without needing to go back and forth request response from server
  • privacy, no data being send to 3rd party
  • could work offline
  • can operate on low power (although limited)
  • accuracy might not be the best since it use quantize/pruned model
  • updating or renewing the model would be more difficult
  • limited compute and hw limitation

training requires capable machine like GPU’s and still takes time to handle the arithmetic computation, which requires power running

(c) after training a program would filter the threshold weight and reduce or remove the weight with least significance, some weight that filtered might have connection or bigger impact to other NN/ layers that could impact the final result. use saliency base, optimal brain damage that estimate weight’s impact

(d) quantization → reducing weight precision from higher FP 32 bit number with lower precision 16, 8 or 4 bit instead of removing the weight and making the model sparse like pruning, quantizing keeps the model dense but with less precise number binarization take the quantization to the extreme by only using 1-bit +1 or -1 value, attractive to FPGA is specialize for digital logic operation and able to run it in parallel accuracy might not drop significantly

(e) skipped


Full model answers

These answers show the expected keywords and reasoning. Equivalent explanations are valid if they identify the same mechanism and trade-off.

Task 1 — IoT Networking

(a) IEEE 802.15.4 MAC selection

  1. Parking garage: use unslotted CSMA/CA. There are few sensors, sparse periodic traffic, and little contention. Beacon synchronization and a scheduled superframe would add unnecessary overhead. The trade-off is that access delay is not deterministic.

  2. Hospital ward: use beacon-enabled slotted CSMA/CA, potentially with GTS for the urgent alarm traffic. Regular monitoring data can use the contention access period, while reserved contention-free capacity can provide more predictable access for alarms. This requires synchronization and coordinator management, and GTS capacity is limited.

  3. Refinery: use TSCH. Dense periodic traffic benefits from scheduled time cells, which reduce collisions and allow devices to sleep between transmissions. Channel hopping improves reliability when some channels suffer narrow-band interference. TSCH requires a configured schedule, and the standard does not define the algorithm that creates the schedule.

  4. Backoff: a larger window does not necessarily make the next individual delay longer because the device draws a new random value from the larger range. The new value may be smaller than the previous value. Increasing the window is still useful because it reduces the probability that competing devices select the same backoff value and collide.

(b) 6LoWPAN need and efficiency

IEEE 802.15.4 has a maximum frame size of 127 bytes, with considerably less space remaining after MAC and security headers. IPv6 requires a link MTU of at least 1280 bytes, so a complete IPv6 datagram cannot fit into one 802.15.4 frame. IPv6 headers also consume a large fraction of a constrained frame.

6LoWPAN is an adaptation layer between IPv6 and 802.15.4. It provides features such as:

  • fragmentation and reassembly;
  • IPv6 header compression;
  • stateless address autoconfiguration;
  • optional mesh addressing/forwarding headers.

(c) Fragmentation calculation

The seventh fragment begins after six complete 80-byte payloads:

start position = 6 × 80 = 480 bytes
fragment offset = 480 / 8 = 60

Therefore, the datagram offset is 60. The offset is expressed in 8-byte units to represent positions compactly in the fragmentation header. The first fragment carries the datagram size and tag; subsequent fragments carry the tag and offset information needed for reassembly.

Task 2 — NB-IoT

(a) Choosing NB-IoT or IEEE 802.15.4

  1. University buildings: choose IEEE 802.15.4. The buildings are nearby, a local gateway is available, and the sensors have mains power. A local PAN avoids cellular subscription costs and is suitable for short-range, low-rate communication.

  2. Railway track switches: choose NB-IoT. The sensors are geographically distributed over a large region and need wide-area connectivity without deploying a local 802.15.4 gateway and mesh. NB-IoT is suitable for infrequent messages, licensed cellular coverage, and battery operation. eDRX or PSM can reduce energy consumption depending on downlink reachability needs.

  3. Greenhouse: choose IEEE 802.15.4. The sensors are nearby, numerous, and need local coordination. The irrigation controller must continue operating during an Internet outage. A local 802.15.4 network avoids cellular subscription costs and can provide low-latency local control.

(b) NB-IoT channels

The two broad channel categories are:

  • Signaling/control channels: carry control information for access, synchronization, radio-resource management, paging, and connection management.
  • Data channels: carry user traffic such as sensor readings, commands, and application payloads.

Paging is sent on a signaling/control channel because it tells the UE that the network wants to communicate with it. It is not the actual application payload. After the UE responds to the page, user data can be transferred using data channels.

(c) Deployment scenarios

Two valid examples are:

  • Standalone: NB-IoT uses a separate 200-kHz carrier, for example in spectrum previously used by GSM. It does not occupy an LTE physical resource block.
  • Guard-band: NB-IoT uses an unused 200-kHz resource in the guard band next to an LTE carrier.

A third possibility is in-band deployment, where NB-IoT uses one LTE physical resource block inside an existing LTE carrier.

(d) Cell access and tracking

A newly powered-on UE:

  1. scans for broadcast information from candidate cells;
  2. checks whether a cell is acceptable/joinable and meets signal-quality criteria;
  3. selects the best acceptable cell;
  4. performs access/attachment procedures, including authentication and security setup.

A tracking area is a group of cells identified by a tracking-area identifier. The network does not need to track the UE’s exact cell continuously. When downlink data arrives, it can page all cells in the UE’s last known tracking area.

The UE performs a tracking-area update (TAU) when it enters a cell belonging to a different tracking area. Periodic tracking updates can also maintain the UE’s registration.

(e) Power saving

eDRX lets the UE sleep between scheduled paging opportunities. It remains reachable when it wakes and listens during its paging window, so downlink commands can eventually be delivered. Longer eDRX cycles save more energy but increase possible downlink latency.

PSM lets the UE sleep for an effectively indefinite period. It consumes less energy, but the network cannot page the UE while it is in PSM. The UE becomes reachable again when it wakes, for example to transmit or perform an update.

For a sensor that must receive occasional commands without initiating an uplink first, eDRX is the safer choice. PSM provides better battery life but does not provide downlink reachability during sleep.

Task 3 — MQTT

(a) Retained messages

A retained message is useful for a device-status or configuration topic. For example, a factory controller can publish:

Topic: factory/machine-2/config
Payload: {"mode":"slow", "limit":80}
Retain: true

The broker stores the latest retained PUBLISH for that topic. When a new controller or dashboard subscribes later, the broker immediately sends the stored value even if the original publisher is currently offline.

Retain provides the latest retained value, not an unlimited history or time-series database. The value can also become stale, so it may need a timestamp or validity period.

(b) Topic filters

  1. The filter that matches C1 and C2 but not C3 or C4 is:
plant/+/temperature

The + wildcard matches exactly one topic level.

  1. The filter that matches C1, C2, and C4, while also matching other measurements below plant/, is:
plant/#

The # wildcard matches zero or more trailing levels.

  1. No. Wildcards are permitted in subscription filters, not in publish topic names. A publisher must publish to a concrete topic such as plant/zone1/temperature.

(c) Topic alias

For the publisher’s MQTT connection, the broker stores:

Topic Alias 7 → building/floor-3/lab-2/air-quality

When a later PUBLISH contains an empty topic name and alias 7, the broker resolves the alias to the concrete topic and routes the message as a publication to building/floor-3/lab-2/air-quality.

The mapping is connection-specific because alias 7 can refer to a different topic on another client connection. It is not a global broker-wide definition. The mapping also needs to be established again after a reconnect.

(d) Shared subscriptions

C1, C2, and C3 belong to the same shared subscription group because they use:

$share/analysis/plant/+/+/temperature

The publication matches the filter, but the broker sends one copy to one eligible member of that group, not to all three clients.

C4 also receives a copy because it has a normal subscription to:

plant/#

The publisher sends to the ordinary topic:

plant/zone1/greenhouse/temperature

The publisher does not publish to the $share/... string; that syntax is only used by subscribers.

(e) QoS direction

  • C1 to broker: QoS 2;
  • broker to C2: QoS 1.

For a publication delivered to a subscriber:

outgoing QoS = min(publication QoS, subscription QoS)

Therefore, min(2, 1) = 1 for the broker-to-C2 delivery.

Task 4 — Connected Data

(a) Update protocols and stream compression

An update protocol reduces the number of application-level messages. For example, distance-based reporting sends a new position only when the object has moved beyond an accuracy threshold.

Stream compression reduces the number of bytes required to encode the messages that are sent. For example, repeated values or JSON fields can be encoded more compactly.

They reduce different costs and can be combined: an application can send fewer updates and compress each update before transmission.

(b) Periodic reporting and dead reckoning

  1. Periodic reporting sends a measurement at fixed time intervals regardless of whether the value has changed. It works well for regular monitoring, heartbeats, or applications that require a predictable update schedule.
  2. It is inefficient here because the robot may send many nearly identical positions. Each transmission consumes radio energy and bandwidth even when the receiver gains little new information.
  3. Dead reckoning can reduce transmissions if the robot’s motion is predictable. The robot sends an initial position, velocity/direction, and timestamp. The receiver extrapolates the current position from that model and does not need a new message for every time step.
  4. Dead reckoning performs poorly when the motion model is violated, for example because of wheel slip, an obstacle, a sudden turn, or wind. The predicted position diverges from the real position, so correction messages are required.

(c) Key-value versus linked data

A key-value model is good for a direct lookup such as:

GET container:CONT-8823

which might return its current status, owner, or location.

A graph model is better for a relationship query such as:

Which containers are carried by vessels owned by Company A and currently located at Port Rotterdam?

The graph can represent paths such as:

Container --carriedBy--> Vessel --ownedBy--> Company A
Container --locatedAt--> Port Rotterdam

In a key-value record, these relationships may be stored as nested JSON, but they are largely opaque to the data model. The application must scan, parse, and join records itself. Graph links are first-class and can be traversed and queried directly.

(d) Stream processing versus CEP

Stream processing:

  • information model: an unbounded stream of timestamped data items;
  • focus: selections, joins, filtering, aggregation, and windowed queries;
  • origin: an extension of database or data-stream-management systems;
  • typical result: continuously updated averages, counts, or other query results.

Complex event processing:

  • information model: atomic event notifications and composed complex events;
  • focus: temporal, spatial, or historical event patterns and event composition;
  • origin: an extension of publish/subscribe systems with filtering and composition;
  • typical result: a higher-level event, notification, or action generated by an ECA rule.

Both operate continuously and can maintain temporal context, but stream processing is primarily query/aggregation-oriented while CEP is pattern/action-oriented.

(e) Continuous query

A continuous query is registered once and continues producing results as new data arrives. A suitable query is:

CONTINUOUS QUERY machine_statistics
ON MachineReadings
WINDOW SLIDING 15 minutes, SLIDE 5 minutes
SELECT machine,
       MAX(vibration) AS maximum_vibration,
       AVG(temperature) AS average_temperature
GROUP BY machine
EMIT EVERY 5 minutes

The sliding window contains the most recent 15 minutes and is reevaluated every 5 minutes for each machine.

Task 5 — Embedded Machine Learning

(a) Local or cloud placement

  1. The wake-word detector should run locally. It must listen continuously at low power, respond with low latency, and avoid streaming all audio to the cloud. After the wake word is detected, a larger cloud model can process the full voice request.

  2. The fleet model should be trained in the cloud. The cloud can aggregate histories from 20,000 machines, store large datasets, run expensive training, and distribute updated models. Individual devices can still perform a simple local anomaly check.

  3. Use a hybrid design for the agricultural drone. Obstacle detection and immediate avoidance should run locally because a cloud round trip is too slow and the drone must remain safe if connectivity fails. Selected images, features, and flight data can be uploaded for cloud analytics and model retraining.

(b) Benefits and challenges of edge ML

Benefits include:

  • lower latency;
  • operation during network outages;
  • improved privacy because raw data can remain local;
  • reduced bandwidth and communication cost;
  • improved local autonomy.

Challenges include:

  • limited compute and memory;
  • limited flash/storage;
  • energy consumption;
  • model-update and deployment difficulty;
  • possible accuracy loss after compression;
  • difficulty collecting enough local training data.

Training or large-scale model updating may remain in the cloud because training requires substantial compute, memory, storage, and aggregated data from many devices. Large or frequently retrained models may not fit the embedded device.

(c) Magnitude-based pruning

A typical procedure is:

  1. train a dense neural network;
  2. calculate the absolute magnitude of each weight;
  3. rank the weights or choose a threshold;
  4. set the smallest weights to zero using a mask;
  5. fine-tune the pruned network;
  6. optionally repeat the pruning and fine-tuning process.

The method can increase loss drastically because a small-magnitude weight is not necessarily unimportant. Its importance may depend on the input activation, other weights, network paths, and interactions with later neurons. Removing a small weight can eliminate a critical route through the network or disconnect a neuron.

A saliency-based method such as Optimal Brain Damage estimates the effect of removing a weight on the training loss, using derivative or higher-order sensitivity information. It removes weights with low estimated impact rather than relying only on magnitude.

(d) Quantization and binary networks

Pruning removes or zeros connections and creates a sparse network. It can reduce the number of effective operations, but sparse storage or specialized hardware may be needed to obtain the full speed benefit.

Quantization reduces the numerical precision of weights and/or activations, for example from FP32 to INT8 or fixed-point values. The connections usually remain dense, but memory use and arithmetic cost decrease. Too few bits can reduce accuracy.

Binarization is an extreme form of quantization using values such as +1 and -1. Binary dot products can replace floating-point multiplication with XNOR and population-count operations. This is attractive for FPGAs and specialized hardware because the operations can be implemented with simple logic gates and parallel processing. The trade-off is a more difficult optimization problem and potentially greater accuracy loss.

(e) Embedded ML system design

Two suitable optimizations are:

  1. Quantization: convert FP32 weights and activations to INT8 or fixed-point values. This reduces memory, bandwidth, and arithmetic cost, and can map well to FPGA DSP or integer resources. The trade-off is reduced numerical precision and possible accuracy loss.
  2. Pruning: remove low-impact weights and fine-tune the remaining network. This reduces the number of parameters and potentially the number of computations. The trade-off is that sparse execution may require specialized support, and aggressive pruning can increase error.

Other valid lecture-based optimizations include layer merging, precomputation or lookup tables, shift registers, mixed precision, and binary networks. An FPGA accelerator helps by executing repeated neural-network operations in parallel with specialized, low-power hardware, reducing inference latency and energy compared with a general-purpose processor.