# Real-Time Anomaly Detection in Cold Chain Transportation Using IoT Technology
## 4 Results
### Battery Life Analysis  
The logger's were deployed with 4 \(\times\) C cell Zn-MnO\({}_{2}\) alkaline long life batteries, each with a capacity of 7800 mAh and manufactured by Varta [82]. After 179 days of continuous operation, one of the loggers installed in a delivery van ran out of battery. In its lifetime, it recorded 29,342 datapoints representing 1812 journeys: approximately 10 journeys per day. Figure 6 shows the degradation of the batteries over the lifetime of their discharge in blue. A degree one polynomial regression (i.e., a linear regression) is applied and is shown as a dashed black line laid on top to demonstrate the linear decay throughout the lifetime of the battery. Notice that near the end of the battery's useful life, the battery starts to degrade much more quickly, as to be expected in alkaline performance [83]. The battery's starting voltage was 5.672 V. The last recorded voltage by the logger before the batteries no longer had the capacity to power the device was 4.493 V. Thus, during its useful life, the logger used 1.179 V. Given that the number of recordings made was 29,342, the average voltage consumption per recording is calculated using Equation (1). \[recordingVoltage=\frac{powerConsumed}{totalRecordings} \tag{1}\]  
In this case, the resulting recording voltage per reading was equal to 4.02 \(\times\) 10\({}^{-5}\) V.  
To demonstrate the benefit of the trip detection algorithm on battery conservation, the battery performance of the logger with trip detection enabled is compared to that of a logger without trip detection enabled. Without trip detection enabled, the logger uploads data every 5 min regardless of whether the vehicle is in motion or not. This results in 288 recordings made every 24 h, every day, while there is enough battery capacity to power the device. Using the average voltage consumption per recording, an approximation of how long the logger would have lasted without trip detection enabled can be made. Assuming that the logger uses the same power consumption whether trip detection is enabled or disabled, a battery life estimate can be provided using Equation (2). \[daysOfRecording=\frac{powerConsumed}{recordingVoltage\times 288} \tag{2}\]  
resulting in an estimated days of recording of 101.8 days. To check the accuracy of this estimate, bench testing was performed on one of the devices. The logger was prepared to the same specification as the loggers deployed with the grocery distributor, and it was running the same firmware revision. The only difference between the two setups was that trip detection was disabled on the logger being used for battery performance testing. With trip detection disabled, the logger made and uploaded  
Figure 6: Battery degradation analysis. recordings every 5 min, regardless of motion. Given that the decay of the alkaline battery is linear (except at the end of its useful life), the testing can be applied at any battery voltage and be used as an insight into the life expectancy of the logger. In this case, the bench test began with a starting voltage V = 5.335. The bench testing experiment was performed for a period of 28 days. At the end of the testing, the final voltage was V = 5.039. In total, therefore, the logger used 0.296 V over 28 days. Over this period, it had made 8104 recordings, presenting an average voltage spend of 3.65 \(\times\) 10\({}^{-5}\) V per recording. For the updated estimate based on this usage, the period required for the logger with trip detection enabled to use 0.296 V was checked. Upon analysing the data, it was found that the battery of the logger deployed with the food company took 66 days to use the same voltage. Over this period, the logger had made 12081 recordings, resulting in an average recording voltage spend of 2.45 \(\times\) 10\({}^{-5}\) V per recording. The difference in these average recording voltages is by a factor of 1.4907, meaning the device with trip detection disabled is using power 1.5 times more quickly than the device which has it enabled.