Fog computing predicts cold storage temperature for fresh produce

Real-World Deployment and Performance Characterisation of Fog-Based Deep Learning for Cold-Chain Temperature Prediction over LoRaWAN

Distributed, Parallel, and Cluster ComputingMachine Learning

Summary

Fresh fruits and vegetables need to be kept cold to stay fresh, but sometimes the cold storage systems fail, causing food waste. The authors built and tested a system that runs on a small computer near the storage (called fog computing) to predict temperature changes quickly and explain why. This system works even if the internet connection is lost and avoids relying on distant cloud servers, making temperature monitoring more reliable. Their real-world tests showed the system is accurate and energy efficient, and it can warn staff if the cold chain is broken.

What this means in practice

  • For cold storage operators: Monitor and predict cold-room temperature changes locally with fast, explainable alerts to prevent food spoilage without needing cloud connectivity.
  • For precision agriculture teams: Use fog computing on edge devices to collect sensor data and predict environmental conditions in real time, enhancing supply chain quality control.

Authors

Jeremiah Taguta, Jean Frederic Isingizwe Nturambirwe, Clement Nthambazale Nyirenda

Abstract

Fresh fruits and vegetables (FFVs) are highly perishable, and cold-chain breaks contribute significantly to global food waste. While Machine Learning (ML) can enable proactive intervention, cloud-based inference faces challenges such as latency and data loss. Fog computing addresses these issues but has been tested only in simulation for FFV cold-chain temperature prediction. To the best of the authors' knowledge, this paper presents its first real-world deployment. A fog-deployed LSTM-GRU model predicted cold-room temperature using LoRaWAN sensor data collected from a South African apple cold-storage facility with induced cold-chain breaks. Running entirely on a Raspberry Pi 4 with no cloud dependency, the system generated conditional SHAP explanations only when a break is predicted. The deployed system predicts cold-room temperature with an MAE of 0.2°C at roughly 0.2 kWh per day (0.7 Wh per prediction). Predictions were delivered in under one second (555 ms), dominated by network and messaging rather than computation, with conditional explanations adding modest cost. SHAP consumes 28% more CPU but is well within the hardware's capacity. The model attributes its predictions primarily to temperature, humidity, and their interaction. Critically, the deployment surfaced what simulation cannot: a sensor-triggered single point of failure, alongside genuine resilience, autonomous recovery from infrastructure faults and continued operation through internet loss. These are the first published deployment benchmarks for fog-based temperature prediction in FFV cold chains, establishing that explainable temperature forecasting is feasible on resource-constrained edge hardware. Future work includes asynchronous sensor fusion, commercial cold chain deployment, alternative model architectures, and causal analysis.