cold-chain-monitor
:::warning [UNTESTED] — v0.9 paper-correct
The cold_chain core is host-unit-tested on native_sim/native/64; the full app runs end-to-end on native_sim with synthetic environment data covering every state. No model ships (stub + deterministic classifier/fallback). HiL with a real BME280 + a trained model is bench-gated.
:::
A pharma/food cold-chain integrity monitor: sample a BME280 T/RH/P sensor on a slow logging cadence, compute standards-backed metrics (temperature-excursion time, Mean Kinetic Temperature, dewpoint), classify the integrity state, and emit an AI anomaly score. The environmental edge-AI vertical.
Source: examples/ai/cold-chain-monitor/.
Honest scope
A reference cold-chain logger. MKT, dewpoint, and excursion-time are the real, recognized metrics; thresholds are configurable per product. Not a certified GxP / 21-CFR-Part-11 data logger — no validated audit trail, no calibration traceability, no tamper-proof storage.
Standards-backed metrics: MKT (Mean Kinetic Temperature, ICH Q1A / USP <1079>) is the single temperature delivering the same cumulative thermal stress as the fluctuating profile (MKT ≥ arithmetic mean, so a brief hot spike counts for more than its duration); dewpoint (Magnus) flags condensation / mould risk when ambient T nears it.
Pipeline
BME280 (I2C) --window--> cold_chain (mean/min/max, MKT, dewpoint, excursion)
-> cc_classify (OK / TEMP_EXCURSION / MKT_EXCEEDED / CONDENSATION_RISK)
-> <alp/inference.h> anomaly score (deterministic fallback) -> CC record
board.yaml
som:
sku: E1M-AEN701
preset: e1m-evk
supported_boards:
- e1m-evk
- e1m-x-evk
pins:
- { e1m: E1M_I2C0, macro: EVK_I2C_BUS_SENSORS, doc: "BME280 environment sensor bus" }
cores:
a32_cluster:
os: "off"
m55_hp:
app: ./src
inference:
default_arena_kib: 64
libraries:
- tflite_micro
peripherals:
- i2c # BME280 link
chips:
- bme280 # temperature / humidity / pressure
diagnostics:
log_level: info
Flip som.sku to E1M-V2M101 for the DEEPX DX-M1 path.
Expected output
# CC,t_s,state,temp_c,rh_pct,dewpoint_c,mkt_c,excursion_min
CC,256.0,OK,5.0,50.0,-4.6,5.0,0.0
CC,768.0,CONDENSATION_RISK,5.0,95.0,4.3,5.0,0.0
See also
<alp/inference.h>·<alp/chips/bme280.h>multimodal-fusion-pdm— BME280 as one of three fused modalities- Examples overview