# Real-Time Anomaly Detection in Cold Chain Transportation Using IoT Technology
## 3 Materials and Methods
### Real-World Testing  
Musgrave Group Ltd. is an Irish food wholesaler, founded in Cork by the [PERSON] brothers, [PERSON] and [PERSON] in 1876. It is currently Ireland's largest grocery distributor, with operations in Ireland and Spain, and they have estimated annual sales of over \(\mathfrak{K}4\) billion. The company is still largely owned by the [PERSON] family. Musgrave Northern Ireland is headquartered in Belfast, Northern Ireland. Musgrave clients include local restaurants, fast-food outlets, and convenience shops in northern Ireland, and they also operate multiple large cash and carry facilities for the general public. Musgrave maintains their own fleet of last-mile delivery vehicles to facilitate multi-drop deliveries to their business customers.  
While performing deliveries of frozen goods and general perishables to their business customers, [PERSON] noticed that the refrigeration units in the delivery vans operating in the greater Belfast area would occasionally break down without any indication to either the driver or the logistics staff at the warehouse. The temperature of the chilled and frozen food products inside the van would increase, surpassing the food storage temperature safety threshold, resulting in a van load of spoiled stock. [PERSON] sought a system which could alert them of such anomalies.  
The proposed system follows three requirements. Firstly, the transport vans should be connected to the cloud to allow for real-time data reporting/monitoring via a dashboard while the vans perform deliveries. Each of these vans have both a chill and a freeze compartment, both of which should be monitored throughout a journey. Secondly, the system should contain an alerting system which should send SMS messages to drivers and warehouse logistics staff notifying if any anomalies occur. These alerts should not be sent when the van is stationary, e.g., parked overnight, stopped while performing a delivery, etc. Thirdly, the power consumption of the proposed system should be such that maintaining the equipment does not become an arduous task.  
Figure 1(a) illustrates the proposed layout of the dual-zone monitoring system. The sensors would be placed along the roof of the van in the two different refrigerated compartments separated by an insulated wall which contains a fan to push cool air through from the refrigeration unit based in the freezer compartment at the front of the van to the chill compartment in the rear of the van. Figure 1(b) shows the actual installation location. The logger was positioned on the insulted wall in such a way to ensure it would not interfere with the loading procedures of pallets followed by [PERSON].  
For the field testing of the IoT system, it was decided to run the sensor on battery power to reduce the invasiveness of the installation. Each of the loggers were deployed with 4 \(\times\) C cell long-life power alkaline batteries, each with a capacity of 7800 mAh.  
In order to ensure minimal battery consumption was achieved, each logger deployed with the grocery distributor had the trip detection algorithm outlined in Section 3.2.3 enabled, which puts the logger in a low-energy sleep state when it is not in motion. The  
Figure 2: Planned and actual installation location of the IoT anomaly detection system.  
parameters chosen for the logger was a heartbeat signal every 12 h while out of a trip, and while in a trip, recordings were made and uploaded every 5 min. A GPS timeout of 60 s was chosen in order to reduce unnecessary battery consumption.