IoT architecture, sensors and edge devices
UAT 459 UAS, Internet of Things and Smart Warehouse Systems
Lesson
By the end of this module you will be able to
- Explain the four-layer Internet of Things (IoT) reference architecture of ITU-T Y.2060 and place the devices of a real warehouse in each layer
- Turn the requirements of a temperature-controlled pharmaceutical store into design numbers, such as time from event to alert and availability of the alarm path
- Estimate the uncertainty of temperature measurement and set pre-alarm limits with guard bands
- Select sensors and edge devices by calculating battery life from the recording interval and the radio used
Why this matters
One pallet of vaccine can be worth millions of baht and must stay at 2 to 8 °C at all times. If the cold-room compressor stops at two in the morning, what decides whether the whole room survives is not only the night duty staff. It is the system that measures the temperature, moves the data, decides “this is a real event” and wakes the responsible person in time. Such a system is part of the Internet of Things (IoT): many devices that sense or act on physical things and report over a network.
modules 1–5 of this course used drones to count stock in a parts warehouse and handed their results to the warehouse management system (WMS) at application level. This course goes one layer deeper, into the IoT platform behind it: sensors, gateways, protocols, databases, asset tracking, system integration, automation, data analytics and security. The drone is just one of hundreds of devices the platform must look after.
The case study for modules 6–10 of this part is the temperature-controlled pharmaceutical distribution centre of a drug distributor in Bang Phli district, Samut Prakan province. It has four zones.
| Zone | Temperature range | Description |
|---|---|---|
| Z1 controlled-temperature hall | 15 to 25 °C | High-bay racks 9 m tall, 3,600 pallet positions, two drones fly inspections at night |
| Z2 cold room | 2 to 8 °C | Racks 6 m tall, 640 pallet positions for vaccines and biologics |
| Z3 freezer room | −25 to −15 °C | Small room, 10 × 8 m |
| Z4 receiving and dispatch | 15 to 25 °C | Six dock doors with RFID portals |
The system has 92 fixed temperature sensors (48 in Z1, 24 in Z2, 8 in Z3, 12 in Z4), 14 door sensors, four gateways (G1 to G4), three refrigeration PLC controllers, ten forklifts with location tags and two drone docks. All figures in this course are fictional. The Python code can be downloaded from /downloads/uat-459/.
The four-layer IoT reference architecture
When a system has hundreds of devices from many vendors, the team needs a common language for which part does what. Recommendation ITU-T Y.2060 of the International Telecommunication Union (2012) proposes a four-layer reference model, with management and security capabilities that cut across every layer.
- The device layer holds devices that measure or act, plus gateway capabilities: an intermediary that supports several radio interfaces and converts protocols. Devices may reach the network directly or through a gateway, and may “sleep and wake” to save energy
- The network layer controls connectivity and transports data; here, the centre’s LAN and Wi-Fi, the MQTT message broker and a 4G backup link
- The service support and application support layer provides generic capabilities shared by all applications, such as data processing and storage, and specific ones such as temperature alarm rules
- The application layer is what people use: dashboards, the WMS, alerting and quality assurance (QA) reports
Y.2060 states that management covers faults, configuration, accounting, performance and security, including remote firmware updates of devices, while security is needed in every layer, for example device authentication in the device layer and encryption in the network layer.
This model looks from the viewpoint of “data services”, while the ISA-95 (IEC 62264) model used in modules 1–5 of this course looks from the viewpoint of “production control and business” (International Society of Automation, n.d.). They work together: ISA-95 levels 1 and 2 (sensing and control) sit in the Y.2060 device layer, and level 3 (the WMS) and level 4 (ERP) sit in the application layer. Module 9 uses ISA-95 to draw the integration map; this module uses Y.2060 to separate device functions.
Key idea
Every box in the architecture must answer three questions: what does it do, if it fails is data lost or only delayed, and who owns it. The second matters most in a pharmaceutical store, because a gap in temperature data is missing evidence, and QA may have to treat the product from that period as failed.
Requirements that shape the architecture
An ordinary warehouse designs its IoT system for convenience; a pharmaceutical store designs it from requirements. The World Health Organization model guidance for storing and transporting time- and temperature-sensitive pharmaceutical products (World Health Organization, 2011) sets minimums that translate directly into system requirements.
- Electronic monitoring sensors must be accurate to ±0.5 °C or better and calibrated against a traceable reference standard at least once a year
- Temperature-controlled rooms, cold rooms and freezer rooms need a temperature record at least six times per hour at each sensor position, and the system must keep operating independently in a power failure
- High and low alarms are required, preferably with an automatic phone or SMS warning to on-call staff out of hours, and alarms must be checked at least every six months
- Temperature records are kept for at least one year after the end of the product’s shelf life, or longer if national law requires
WHO Supplement 6 on temperature and humidity monitoring systems for fixed storage areas (World Health Organization, 2015a) adds that wireless sensors should buffer data during network outages and power cuts and send it when the connection returns, and that web-based systems need audit trails. In Thailand, drug distributors must follow the Ministry of Public Health notification on criteria, methods and conditions for distributing modern drugs B.E. 2568 (2025) (Ministry of Public Health, 2025); the details that apply to a real site must be checked with the Drug Control Division of the Thai FDA.
These requirements become two numeric questions. First, when a real event happens, how quickly can the system alert a person? Second, for what share of the time does the whole path from sensor to phone work?
Example 1 Time budget from event to alert
The system confirms a real event after two consecutive readings beyond the limit. In the worst case the event starts just after a reading, so the system waits almost one recording interval to see the first value and one more to confirm. The cold-room acceptance test found that after a power cut the room stays within 2 to 8 °C for 55 minutes, and the on-call staff need 20 minutes to reach the room and act (all values assumed).
# worst-case time from the start of a real excursion to the on-call pharmacist's phone (assumed values)
steps = {"wait for the next reading": None, "second reading to confirm": None,
"gateway forwarding": 5, "network and broker": 2, "rule engine": 10, "SMS and voice call": 60}
HOLD_MIN, RESPOND_MIN = 55, 20 # cold room stays in 2-8 °C for 55 min after power loss; staff need 20 min
for interval in (60, 300, 600): # sensor recording interval in seconds (WHO minimum: 6 per hour = 600 s)
steps["wait for the next reading"] = interval
steps["second reading to confirm"] = interval
alert_min = sum(steps.values()) / 60
print(f"interval {interval:>3} s: alert after {alert_min:5.1f} min, "
f"margin {HOLD_MIN - alert_min - RESPOND_MIN:5.1f} min")
interval 60 s: alert after 3.3 min, margin 31.7 min
interval 300 s: alert after 11.3 min, margin 23.7 min
interval 600 s: alert after 21.3 min, margin 13.7 min
A 600-second interval just meets the WHO minimum but delays the alert by 21 minutes, leaving only 14 minutes of margin. If staff answer late or traffic is bad, the room could be lost. A 60-second interval leaves almost 32 minutes, so the team records every 60 seconds in all zones. Note that most of the time comes from the recording interval, not the network; buying a faster network barely helps.
Minimum requirements are a starting point, not a design target. Good design numbers come from the risk of each room: a room that warms quickly or holds expensive product should record more often than one with a large thermal mass.
Example 2 Availability of the alarm path
An alarm reaches a person only if every part of the path works, so it is a series system with overall availability . If two gateways cover the same sensors, that part is a parallel system, (annual availabilities assumed).
# availability of the alarm path when every link must work (assumed annual availabilities)
chain = {"sensor": 0.9990, "gateway": 0.9950, "PoE switch": 0.9995, "core network": 0.9995,
"MQTT broker": 0.9990, "IoT platform": 0.9980, "SMS service": 0.9990}
def serial(parts):
a = 1.0
for v in parts:
a *= v
return a
one = serial(chain.values())
two_gw = dict(chain, gateway=1 - (1 - chain["gateway"]) ** 2) # two gateways covering the same sensors
two = serial(two_gw.values())
for name, a in (("one gateway", one), ("two gateways", two)):
print(f"{name:<13} A = {a:.5f}, down {(1 - a) * 8760:5.1f} h/year")
one gateway A = 0.98904, down 96.0 h/year
two gateways A = 0.99399, down 52.7 h/year
Each part looks reliable (99.5% or better), but seven in a row leave the alarm path unusable for 96 hours a year. A second gateway cuts this to 53 hours. The rest comes from the platform, sensors, broker and SMS service, which need other remedies, such as a local light-and-horn alarm at the cold room that does not depend on the network, and a second alert channel besides SMS.
Keep “cannot alert” separate from “data lost”. When a gateway fails, sensors with memory keep recording and send their backlog when the link returns, so the record is complete, but alarms in that period arrive late. Module 7 sizes that memory.
Temperature sensors and measurement uncertainty
Pharmaceutical stores use three main sensor types. A thermistor is a resistor whose resistance changes strongly with temperature; it is cheap and sensitive over a narrow range. A platinum RTD (Pt100) changes resistance almost linearly with temperature and is stable over the long term, so it is popular as a reference sensor. Integrated digital sensors output temperature and humidity as numbers directly, which suits wireless devices.
A sensor’s reading is never exactly the true value. The Guide to the Expression of Uncertainty in Measurement (GUM) of the JCGM (2008) separates each source of uncertainty, converts it to a standard uncertainty , and combines them as the root sum of squares . A source given as a range ±a with unknown distribution is treated as rectangular, ; a value from a calibration certificate stated as an expanded uncertainty with coverage factor is divided by 2.
Once the uncertainty is known, the next question is how to decide that the temperature is “still in range”. JCGM 106 (2012) describes a guard band: the interval between a tolerance limit and an acceptance limit moved inwards to allow for uncertainty, with a width often taken as a multiple of the expanded uncertainty. In a pharmaceutical store the guard band sets pre-alarm limits, and WHO Supplement 6 recommends alarms both before the temperature leaves its range and after it has left.
Example 3 Uncertainty budget and pre-alarm limits for the cold room
Data come from the datasheet and calibration certificate of the chosen sensor model (assumed values).
import math
# uncertainty budget of a cold-room monitoring sensor (values from the datasheet and certificate, assumed)
u = {"sensor accuracy ±0.30 °C (rectangular)": 0.30 / math.sqrt(3),
"calibration reference U = 0.10 °C (k = 2)": 0.10 / 2,
"display resolution 0.1 °C (rectangular)": 0.05 / math.sqrt(3),
"drift ±0.15 °C per year (rectangular)": 0.15 / math.sqrt(3)}
for k, v in u.items():
print(f"{k:<44} u = {v:.3f} °C")
uc = math.sqrt(sum(v ** 2 for v in u.values()))
U = 2 * uc
print(f"combined u = {uc:.3f} °C, expanded U (k = 2) = {U:.2f} °C")
low, high = 2.0, 8.0
print(f"acceptance limits for pre-alarms: {low + U:.1f} to {high - U:.1f} °C")
sensor accuracy ±0.30 °C (rectangular) u = 0.173 °C
calibration reference U = 0.10 °C (k = 2) u = 0.050 °C
display resolution 0.1 °C (rectangular) u = 0.029 °C
drift ±0.15 °C per year (rectangular) u = 0.087 °C
combined u = 0.202 °C, expanded U (k = 2) = 0.40 °C
acceptance limits for pre-alarms: 2.4 to 7.6 °C
An expanded uncertainty of 0.40 °C meets the WHO ±0.5 °C requirement. The sensor’s own error dominates; display resolution hardly matters. The team sets pre-alarms at 2.4 and 7.6 °C. When the sensor reads 7.7 °C the true temperature may already be above 8 °C, so the system must warn then, not wait for a reading of 8.1 °C.
Placement matters as much as accuracy. WHO asks for monitoring sensors where temperature varies most, according to temperature mapping, but positioned to be minimally affected by transient events such as door opening. Many stores therefore put the probe in a bottle of liquid that behaves like product, slowing the sensor’s response to something close to the product temperature. This reduces false alarms at door openings but also shows real events later, and that delay must be added to the time budget.
Edge devices and energy
An edge device (or end device) sits next to what is measured. It contains the sensor, a microcontroller, memory, a radio and a power source. Most run on batteries because running cables through a cold room full of racks is hard, so the device sleeps nearly all the time, wakes to measure and send, then sleeps again.
The energy of one cycle is the sum of the charge of each phase (current × time). The average current is and battery life is , where is capacity and the usable share, which falls at low temperature. Batteries also self-discharge slowly when idle, which can be modelled as a constant current.
Example 4 Battery life by radio and recording interval
Compare a sensor sending over Bluetooth Low Energy (BLE) to a nearby gateway with a LoRaWAN sensor that reaches further but transmits for longer (assumed datasheet values).
# battery life of a wireless temperature sensor in the cold room (assumed datasheet values)
CAP_MAH, USABLE = 2600, 0.70 # lithium cell; 70 % usable at 2-8 °C
SLEEP_UA, SELF_UA = 2.5, 3.0 # sleep current; self-discharge of about 1 % per year as a current
MEASURE = (1.2, 0.040) # mA, seconds per reading
RADIO = {"BLE to gateway": (6.0, 0.045), "LoRaWAN SF9": (40.0, 0.185)} # mA, s per message incl. repeats
for radio, (i_tx, t_tx) in RADIO.items():
for interval in (60, 300, 600):
charge_mas = (SLEEP_UA + SELF_UA) / 1000 * interval + MEASURE[0] * MEASURE[1] + i_tx * t_tx
avg_ua = charge_mas / interval * 1000
years = CAP_MAH * USABLE / (avg_ua / 1000) / 8760
print(f"{radio:<15} every {interval:>3} s: {avg_ua:6.1f} µA, {years:4.1f} years")
BLE to gateway every 60 s: 10.8 µA, 19.2 years
BLE to gateway every 300 s: 6.6 µA, 31.7 years
BLE to gateway every 600 s: 6.0 µA, 34.5 years
LoRaWAN SF9 every 60 s: 129.6 µA, 1.6 years
LoRaWAN SF9 every 300 s: 30.3 µA, 6.9 years
LoRaWAN SF9 every 600 s: 17.9 µA, 11.6 years
For BLE the recording interval hardly matters, because sleep current and self-discharge use more energy than transmitting. The computed life exceeds ten years, so in practice the battery’s shelf life and the device replacement cycle limit it instead. For LoRaWAN at spreading factor 9, sending every minute empties the battery in 1.6 years. The decision is clear: a cold room that must record every minute should use BLE with a nearby gateway, while LoRaWAN suits distant points that report less often, such as door sensors that send only when something happens.
The ETH Zurich white paper on warehouse drones (Wawrla et al., 2019) names integration with existing systems as a main challenge, and this applies to every IoT device in this course. The best device in the lab is useless if the platform cannot take its data. Before choosing a device, ask the vendor which protocol it sends with, whether it supports secure firmware updates, and how long it can store data internally.
Module lab
Lab: draft the architecture and check the requirements of a mock cold room
- Choose a real space, such as a chemical store, a laboratory sample refrigerator or a mock cold room prepared by the instructor, and draw the four-layer architecture of Figure 1 with every real device, answering the three questions for each (function, data lost or delayed if it fails, owner)
- Install two wireless temperature sensors next to a reference thermometer with a calibration certificate, record together for at least 30 minutes, compute the mean difference, then build an uncertainty budget as in Example 3 and set pre-alarm limits
- Use the code of Examples 1 and 2 to calculate the alert time budget and availability of the group’s design; change at least the two values the group thinks are most uncertain and record the results
- Measure the sensor’s sleep and transmit currents with a multimeter or low-current meter (if available), or use datasheet values, and calculate battery life as in Example 4 for the group’s chosen interval
Common mistakes
Watch out
- Using minimum requirements as design values, such as recording every 10 minutes because WHO asks for six per hour, without checking whether alerts arrive in time
- Judging availability part by part and concluding the system is reliable, when a series system is less available than its weakest part
- Setting alarms exactly at the limit with no allowance for measurement uncertainty
- Confusing “data lost” with “alert delayed”, which need different remedies
- Estimating battery life from transmit current alone, forgetting sleep current, self-discharge and the effect of cold
Summary
- The ITU-T Y.2060 IoT architecture has device, network, service support and application layers, with management and security across all of them
- A pharmaceutical store designs from requirements such as ±0.5 °C accuracy, at least six records per hour, out-of-hours alarms and records kept one year beyond shelf life, then turns them into design numbers with a time budget and availability
- Combined uncertainty and set guard bands and pre-alarm limits
- Battery life depends more on the radio than on the interval with BLE, but strongly on the interval with LoRaWAN
Check your understanding
- The recording interval is 120 s, events are confirmed by two consecutive readings, and all other delays total 77 s. What is the worst-case alert time in minutes?
- An alarm path has five parts with availabilities 0.999, 0.995, 0.999, 0.998 and 0.999. What is the overall availability, and how many hours a year is it down?
- Three standard uncertainties are 0.12, 0.05 and 0.09 °C. What is the expanded uncertainty at , and what should the pre-alarm limits be for a 15 to 25 °C room?
- Why does adding a second gateway not make the alarm path nearly 100% available?
- Why does the BLE sensor in Example 4 hardly change its battery life when the interval goes from 300 to 600 s?
Answers
- minutes
- , down about hours a year
- °C, °C; pre-alarms at about 15.3 and 24.7 °C
- The rest of the path, such as the platform, broker, network and SMS service, is still in series, so improving one part cannot make the path better than the others allow
- Sleep current and self-discharge, 5.5 µA together, already make up most of the average current, while measuring and sending use little energy per cycle, so sending less often lowers the average only slightly (6.6 to 6.0 µA)
Key formulas
| Worst-case time from event to alert | |
| Availability of series and parallel systems | |
| Combined and expanded uncertainty | |
| Acceptance interval with guard bands | |
| Battery life |
Key references
- International Telecommunication Union. (2012). Overview of the Internet of things (Recommendation ITU-T Y.2060). link
- International Society of Automation. ISA-95 standard: Enterprise-control system integration (ANSI/ISA-95, IEC 62264). link
- World Health Organization. (2011). Model guidance for the storage and transport of time- and temperature-sensitive pharmaceutical products (WHO Technical Report Series, No. 961, Annex 9). WHO. link
- World Health Organization. (2015). Temperature and humidity monitoring systems for fixed storage areas: Technical supplement to WHO Technical Report Series, No. 961, 2011, Annex 9 (Supplement 6). WHO. link
- ประกาศกระทรวงสาธารณสุข เรื่อง หลักเกณฑ์ วิธีการ และเงื่อนไขในการกระจายยาแผนปัจจุบัน พ.ศ. 2568. (2568). ราชกิจจานุเบกษา, 142(ตอนพิเศษ 386 ง), 27. link
- JCGM. (2008). Evaluation of measurement data — Guide to the expression of uncertainty in measurement (JCGM 100:2008). BIPM. link
- JCGM. (2012). Evaluation of measurement data: The role of measurement uncertainty in conformity assessment (JCGM 106:2012). BIPM. link
- Wawrla, L., Maghazei, O., & Netland, T. (2019). Applications of drones in warehouse operations (White paper). ETH Zurich, D-MTEC, Chair of Production and Operations Management. link
Further reading
Study the assigned knowledge units in advance, review media and take the module quiz
In class / field
Lab or field practice from worksheets with a safety checklist
Learning evidence: Checked worksheets and quiz results