Using Edge Analytics to Improve Data Collection in Precision Dairy Farming Kriti Bhargava, Stepan Ivanov, William Donnelly, Chamil Kulatunga Telecommunications Software & Systems Group Waterford Institute of Technology, Waterford, Ireland Email: (kbhargava, sivanov)@tssg.org, wdonnelly@wit.ie, ckulatunga@tssg.org Abstract—Despite the numerous advantages of using Wireless Sensor Networks (WSN) in precision farming, the lack of infras- tructure in the remote farm locations as well as the constraints of WSN devices have limited its role, to date. In this paper, we present the design and implementation of our WSN based prototype system for intelligent data collection in the context of precision dairy farming. Due to the poor Internet connectivity in a typical farm environment, we adopt the delay-tolerant networking paradigm. However, the data collection capability of our system is restricted by the memory constraints of the constituent WSN devices. To address this issue, we propose the use of Edge Mining, a novel fog computing technique, to compress farming data within the WSN. Opposed to the conventional data compression techniques, Edge Mining not only optimizes memory usage of the sensor device, but also builds a foundation for future real-time responsiveness of the prototype system. In particular, we use L-SIP, one of the Edge Mining techniques that provides real-time event-driven feedbacks while allowing accurate reconstruction of the original sensor data, for our data compression tasks. We evaluate the performance of L-SIP in terms of Root Mean Square Error (RMSE) and memory gain using R analysis. I. I NTRODUCTION Over the last decade, the use of Wireless Sensor Networks (WSN) in precision farming has been widely advocated in or- der to improve the agricultural productivity and sustainability. WSN facilitate collection of farm data, using battery-powered sensors, which is, in turn, used for better monitoring and understanding of the farm processes such as weather changes, soil composition and dynamics, crop growth, and animal health and mobility patterns. A review of WSN applications in precision farming has been presented in [1]. In spite of the numerous advantages, however, very few WSN based systems have been put into practice, to date. This is primarily due to the constrained nature of the WSN devices along with the lack of infrastructure in a typically remote farm environment. In this paper, we address some of the practical issues related to the deployment of WSN in the context of precision dairy farming. We present our WSN based prototype system for data collection in a dairy farm. Due to the intermittent or no Internet connectivity over the large area of farms, the data collected using the in-eld sensors cannot be transmitted to the cloud storage in a timely manner. We, therefore, adopt the delay-tolerant networking paradigm for our system to facilitate reliable data transfer to the cloud. We discuss the design of our sensor node, referred to as the collar device, that is used to implement the delay-tolerant communication and is so-named as it will be worn around the neck by dairy cows. The collar device is tailored to ensure animal welfare and comprises of a variety of sensors to monitor cow health, activity and location. The device also acts as a mobile node that collects data from the different in-eld sensors (e.g. grass monitoring) as the cow moves across the farm. All data is stored locally on the collar device itself until the cow is in the vicinity of the cloud gateway, presumably housed in a milking station, and ofoads data onto it. Given the wide variety of data that must be gathered periodically from the farm, a major challenge in implementing the delay-tolerant framework is the storage constraint of the collar device. Although sensor motes, today, feature a non- volatile ash memory, it is limited in capacity and is usually insufcient to store the large amounts of data that is gath- ered during the day. This, in turn, limits the data collection capability and the operational time of our prototype system. For instance, we collected temperature, humidity, acceleration, gyroscope, magnetometer and GPS (latitude, longitude and timestamp) data at a frequency of 1Hz and stored it on our collar device. The device could only gather data for a maximum of 4.5 hours before overwriting the least recent values in the ash. To address this limitation, we propose data compression on collar devices. We evaluate the feasibility of using Edge Mining, a novel fog computing approach, as opposed to the traditional compression techniques for reducing the memory requirements. Edge Mining algorithms are light- weight in nature and reduce the amount of data, rather than the size of each data entry, by storing only those values that cannot be predicted accurately using the past readings. Additionally, localised reduction of data builds the foundation for future real-time responsiveness of our system. This is key to the timely detection of critical events in precision farming. For instance, mobility pattern of cows must be monitored and analysed in real-time for virtual fence and feed management applications in order to facilitate corrective measures, if nec- essary, and redirect the cows in the desired way [2]. Moreover, real-time monitoring and evaluation of cow health is important for the early detection of diseases to alleviate the spread of any infection and ensure animal welfare. In [3], authors implement Edge Mining using three instan- tiations of the Spanish Inquisition Protocol (SIP): Linear SIP (L-SIP), ClassAct and Bare Necessities (BN). SIP transforms 2016 IEEE 41st Conference on Local Computer Networks Workshops © 2016, Kriti Bhargava. Under license to IEEE. DOI 10.1109/LCNW.2016.9 137