# Real-Time Anomaly Detection in Cold Chain Transportation Using IoT Technology
## 3 Materials and Methods
### The Network Layer: Communication Protocol  
A network down approach to architecture design was adopted when designing the IoT anomaly detection system, meaning the first area of the system considered and defined was the network layer protocol. This design approach was applied, as the chosen communication protocol would influence the rest of the sensor setup that could be deployed. The solution would require long-range transmission to connect the sensors to the cloud while the vehicles were in transport, while having low energy consumption would be required to ensure battery maintenance was kept to a minimum. Seminal works in the field focus on the low-energy aspect of the IoT requirement and propose technologies such as ZigBee and Bluetooth BLE for their IoT solutions [73; 74]; however, these are based on short-range radio transmission and thus require a separate gateway device to interface with the world wide web. Solutions to combat the transmission range have been developed based on traditional cellular communication technologies (e.g., GPRS, 3G) [45; 63]; however, these systems are very power intensive and thus inappropriate for long-term commercial use, where low maintenance is a driver toward technology acceptance. Recently, however, a wireless communication technology called low-power wide area network (LPWAN) has emerged in response to the demands of Internet of Things applications. As the name suggests, this network operates on low power, has long range, and possesses affordable communication qualities. Sub-GHz unlicensed ISM bands (e.g., 868 MHz in Europe and 915 MHz in the U.S.) are used to operate LPWAN. In urban areas, the network allows for long-distance communication of 1-5 km, while in rural areas, it has a range of 10-40 km [75]. It is also very energy-efficient, with a typical end node (i.e., sensor) battery life of more than 10 years [76]. Because of this, the LPWAN communication protocol is gaining significant traction in both the industrial and research areas. While there are various implementations of LPWAN, the top emerging technologies at the moment are Sigfox, LoRa, NB-IoT, and LTE-M. As discussed, these technologies overcome the high-power consumption of conventional cellular networks and the range limitation of short-range networks while still providing an excellent radio penetration, which allows them to establish connection with objects located in intolerant or severe environments [77]. Figure 1: Architecture of proposed real-time anomaly detection system. Sigfox is a wireless company and network operator that launched the first LPWAN technology in the IoT domain in 2009, and it has enjoyed popularity since. The physical layer of Sigfox is characterised by using binary phase-shift keying (BPSK) modulation, an ultra-narrow bandwith of 100 Hz and broadcasting on unlicensed ISM bands (e.g., 868 or 902 MHz). Its main advantages include a suitable range of 10 km in urban areas and up to 40 km in rural environments, low power consumption, high receiver sensitivity, and low-cost antenna design. However, its maximum throughput is 100 bps. Another key, energy efficient and popular LPWAN technology that emerged in recent years is LoRa (from \"long range\"). Likewise, LoRa also uses unlicensed ISM bands (e.g., 868 or 915 MHz), although the modulation relies on chirp spread spectrum (CSS) and the bandwidths are 250 kHz and 125 kHz. It was first developed by in 2009, and in 2015, it was standardised by LoRa-Alliance. LoRa has established itself as a world leader for IoT communication and as such has been rolled out in 42 countries to date. Of these, however, only a select few have countrywide coverage (for example, the Netherlands and France [78]). When considering the former technologies as candidates for the IoT solution proposed, one of the limitations encountered was the need for a broad network coverage suitable for the validation stage of the system: transport vehicles on the move delivering products in and around urban areas in northern Ireland.